master
xy 12 months ago
parent 8569e2774a
commit fbe3c5fb02

@ -127,9 +127,9 @@ export default {
createIndexRow(){
return <el-table-column type="index" align="center" fixed="left"></el-table-column>
},
toggleRowSelection(row){
toggleRowSelection(row, selected=true){
this.$nextTick(()=>{
this.$refs.table.toggleRowSelection(row);
this.$refs.table.toggleRowSelection(row,selected);
})
},
clearSelection(){

@ -17,6 +17,7 @@ import {
const getDefaultState = () => {
return {
token: getToken(),
username: '',
name: '',
avatar: '',
adminId: '',
@ -48,6 +49,9 @@ const mutations = {
},
SET_DEPARTMENT: (state, department) => {
state.department = department
},
SET_USERNAME: (state, username) => {
state.username = username
}
}
@ -114,13 +118,14 @@ const actions = {
if (!response) {
reject('身份验证失败请重新登录')
}
const { name, avatar, id, role, department } = response
const { name, avatar, id, role, department, username } = response
commit('SET_DEPARTMENT',department)
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)
commit('SET_ADMIN_ID', id)
commit('SET_ROLE', role)
commit('SET_USERNAME', username)
resolve(response)
}).catch(error => {
reject(error)

File diff suppressed because it is too large Load Diff

@ -625,7 +625,7 @@ import { resetSelect } from '@/utils'
},
{
label: '已用金额',
prop: 'has_money_total',
prop: 'has_moxney_total',
width: 120,
align: 'right'
}

@ -528,135 +528,19 @@
</template>
</xy-dialog>
<!-- 新增表 预算计划 -->
<xy-dialog
:is-show.sync="isShowPlan"
:width="840"
title="预算计划"
@on-ok="planSelect"
>
<template>
<div style="display: flex;width: 100%;">
<el-date-picker
v-model="planSearch.year"
type="year"
placeholder="年份"
value-format="yyyy"
style="width: 90px"
size="small"></el-date-picker>
<el-select
placeholder="科室选择"
clearable
size="small"
v-model="planSearch.plan_department_id"
style="width: 160px"
>
<el-option
v-for="item in departments"
:label="item.name"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
<Input
style="flex: 1;"
v-model="planSearch.name"
enter-button="搜 索"
placeholder="搜索预算计划.."
search
@on-search="searchBudgets"
/>
</div>
<xy-table
ref="planTable"
:height="300"
:list="plans"
:show-index="false"
:table-item="planTable"
style="margin-top: 10px"
row-key="id"
border
default-expand-all
:tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }"
@select="selectPlan"
>
<template v-slot:btns>
<el-table-column
header-align="center"
label="使用金额(元)"
fixed="right"
width="140"
>
<template slot-scope="scope">
<Input v-if="scope.row.pid === 0"
:value="scope.row.useMoney"
@input="planInput($event, scope.row)"
/>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex; justify-content: flex-end">
<Page :total="planTotal" show-elevator @on-change="planPageChange" />
</div>
</template>
<template v-slot:footerContent>
<Button type="primary" @click="planSelect"></Button>
</template>
</xy-dialog>
<!-- 新增表 框架合同-->
<Modal
title="框架协议"
v-model="isShowContractToContracts"
width="54%"
>
<Table
:data="contractList"
:columns="contractTable"
:loading="loading"
border
size="small"
@on-selection-change="selectionChange"
></Table>
<div style="display: flex; justify-content: center; margin: 10px 0">
<Page
:total="contractTotal"
size="small"
show-elevator
show-total
@on-change="
(e) => {
contractSelect.page = e;
getContractToContracts();
}
"
/>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowContractToContracts = false"> </el-button>
<el-button type="primary" @click="isShowContractToContracts = false"
> </el-button
>
</span>
</Modal>
<!-- 编辑-->
<edit-contract ref="editContract" :is-show.sync="isShowEdit"></edit-contract>
<editor
ref="editor"
:is-show-editor.sync="isShowEditor"
<edit-contract
ref="editContract"
:flow-ids="flowIds"
:group-type="groupType"
:money-way="moneyWay"
:purchase-type="purchaseType"
:purchase-way="purchaseWay"
@success="getContracts"
></editor>
:common-purchase-type="commonPurchaseType"
:types="type"
:departments="departments"
:is-show.sync="isShowEdit"
@refresh="getContracts" />
<!-- 查看-->
<detail ref="detailContract"></detail>
@ -707,7 +591,7 @@ import {
editorContract,
detailContract,
} from "@/api/contract/contract";
import { getparameter } from "@/api/system/dictionary";
import {getparameter, getparameterTree} from "@/api/system/dictionary";
import { listdeptNoAuth } from "@/api/system/department";
import { getBudget } from "@/api/budget/budget";
import { getOatoken } from "@/api/oatoken";
@ -747,7 +631,7 @@ export default {
flowIds: [{"name":"政府采购流转","id":71,"type":2},{"name":"公务接待","id":86,"type":1},{"name":"会议费用","id":87,"type":1},{"name":"培训费","id":88,"type":1},{"name":"用印","id":76,"type":1},{"name":"仪器设备维修流转","id":84,"type":1},{"name":"请休假","id":68,"type":1},{"name":"仪器设备购置流转","id":82,"type":1},{"name":"安装、维修流转","id":96,"type":1},{"name":"车船维修保养流转","id":97,"type":1}],
isShowIsFramework: true,
userList: ["ma_sm", "admin", "yu_l","wang_yx","li_f","chen_y"],
userList: ["admin"],
nowContract: {},
window: {
width: 0,
@ -837,6 +721,7 @@ export default {
purchaseType: [], //
purchaseWay: [], //
moneyWay: [], //
commonPurchaseType: [],//
departments: [], //
list: [], //
total: 0,
@ -1686,12 +1571,6 @@ export default {
return sums;
},
//y
checkName(e) {
checkContractName({ name: e }).then((res) => {
console.log(res);
});
},
confirmPlanForSearch() {
this.isShowPlanForSearch = false;
this.getContracts();
@ -1730,15 +1609,14 @@ export default {
}
}
switch (row.flow_mod_id) {
case 12:
case 82:
baseInfo = {
"6583b42c5c29a": row.name,
"cankaojiage": row.plan_price,
}
break;
case 5:
case 101:
baseInfo = {
"65b37c797845d": row.name,
"65b37c8facfc9": row.content,
"yujifeiyong": row.plan_price,
}
break;
case 29:
@ -1874,11 +1752,24 @@ export default {
},
//
async getMoneyWay() {
this.moneyWay = (
await getparameter({
number: "money_way",
})
).detail;
try {
this.moneyWay = [];
const res = await getparameterTree({
id: 3
});
const dataHandler = (data) => {
data.forEach(i => {
if (i.hasOwnProperty('detail')) {
this.moneyWay.push(...i.detail)
} else {
dataHandler(i['children'])
}
})
}
dataHandler(res?.children)
} catch (err) {
}
},
//
async getPurchaseWay() {
@ -1892,6 +1783,16 @@ export default {
this.plansPageIndex = 1;
this.getBudgets();
},
//
async getCommonPurchaseType() {
try {
this.commonPurchaseTypes = (await getparameter({
number: 'common_purchase_type'
}))?.detail || []
} catch (err) {
}
},
//
async getDepartment() {
this.departments = await listdeptNoAuth();
@ -1977,11 +1878,6 @@ export default {
},1000),
//
//
async showPlan() {
this.isShowPlan = true;
await this.getBudgets();
},
async showPlanForSearch() {
this.isShowPlanForSearch = true;
await this.getBudgets();
@ -2111,47 +2007,6 @@ export default {
this.$refs.planTable.clearSelection();
}
},
//
submit() {
addContrant({
type: this.form.type,
is_plan: this.form.isBudget ? 1 : 0,
purchase_type_id: this.form.methods,
is_contract: this.form.is_contract,
purchase_way_id: this.form.modality,
money_way_id: `${this.form.fundingChannels.toString()}`,
plan_price: this.form.price,
name: this.form.name,
contract_plan_links: this.form.plan.map((item) => {
return item.value;
}),
flow_mod_id: this.form.flow_mod_id,
is_substitute: this.form.is_substitute,
is_simple: this.form.is_simple,
supply: this.form.supply,
money: this.form?.money,
status: this.form?.is_simple ? 2 : 1,
is_framework: this.form?.is_framework,
use_framework_buy: this.form.use_framework_buy,
content: this.form.content,
contract_to_contracts: this.selections.map((i) => {
return {
to_contract_id: i.id,
use_money: i.money,
};
}),
}).then((res) => {
this.isShowAdd = false;
Message({
type: "success",
message: "操作成功",
});
this.selections = [];
this.$refs["addContract"].reset();
this.$refs["planTable"].clearSelection();
this.getContracts(false,false,true);
});
},
//
deleteContract(id) {
@ -2280,7 +2135,7 @@ export default {
(item.is_purchase === 0 && other?.flow_status === 1) ||
item.status === 2 ||
(!item.is_contract && item.is_simple) ||
(item.is_tender_audit && !item.is_contract && shenpi?.flow_status === 1) ||
(item.is_tender_audit && !item.is_contract && item.invite_status === 1) ||
(!item.is_tender_audit && !item.is_contract && (caigou?.flow_status === 1 || common_purchase?.flow_status === 1))
) {
//
@ -2356,6 +2211,7 @@ export default {
};
},
created() {
this.getCommonPurchaseType();
this.getPurchaseType();
this.getDepartment();
this.getPurchaseWay();

Loading…
Cancel
Save