合同支出采购

master
lion 9 months ago
parent 3ee9573077
commit 1f76a0b10f

@ -201,6 +201,9 @@ export default {
</el-table-column>
{
tableItem.filter(i => !i.hidden).map((item, index) => {
if ($scopedSlots[item.prop]) {
return $scopedSlots[item.prop](item, index);
}
//
if (item.customFn) {
return (

@ -1,7 +1,8 @@
<template>
<div>
<div v-if="showEdit">
<el-steps :active="step" align-center v-if="myPurchaseType === 1">
<el-step title="选择预算计划"> </el-step>
<el-step v-if="!isWeixiu" title="选择预算计划"> </el-step>
<el-step title="新增预算支出事项"> </el-step>
<el-step title="新增成功"> </el-step>
</el-steps>
@ -215,10 +216,11 @@
</el-select>
</el-form-item>
<el-form-item prop="money_way_id" label="资金渠道">
<el-form-item v-if="!isWeixiu" prop="money_way_id" label="资金渠道">
<el-select
multiple
size="small"
v-if="!isWeixiu"
clearable
disabled
placeholder="请选择资金渠道"
@ -328,7 +330,7 @@
</el-select>
</el-form-item>
<el-form-item prop="plan_price" label="预算价(元)">
<el-form-item prop="plan_price" label="预算价(元)" v-if="!isWeixiu">
<InputNumber
style="width: 100%"
:min="0"
@ -462,7 +464,7 @@
default-first-option
clearable
>
<!-- @change="e => e ? form.name = `${e}${$moment().format('YYYY-MM-DD HHmm')}` : ''"-->
<!-- @change="e => e ? form.name = `${e}${$moment().format('YYYY-MM-DD HHmm')}` : ''"-->
<el-option v-for="item in commonPurchaseTypes" :key="item.value" :label="item.value" :value="item.value" />
</el-select>
</el-form-item>
@ -473,6 +475,19 @@
style="width: 100%"
/>
</el-form-item>
<el-form-item prop="common_type" label="申购人">
<el-select
placeholder="请填写申购人"
v-model="form.apply_user_id"
style="width: 100%"
filterable
default-first-option
clearable
>
<!-- @change="e => e ? form.name = `${e}${$moment().format('YYYY-MM-DD HHmm')}` : ''"-->
<el-option v-for="item in commonPurchasePeople" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item prop="remark" label="备注">
<el-input
placeholder="请填写备注"
@ -486,7 +501,7 @@
</template>
<div style="text-align: center">
<el-button style="margin-top: 12px" v-if="myPurchaseType === 1" @click="forwardStep"
<el-button style="margin-top: 12px" v-if="myPurchaseType === 1 && !isWeixiu" @click="forwardStep"
>上一步</el-button
>
<el-button
@ -856,6 +871,8 @@
</div>
</el-card>
</div>
</div>
<el-drawer
size="580px"
@ -890,6 +907,23 @@
</div>
</div>
</el-drawer>
<!-- 选择 类型 -->
<el-dialog
title="提示"
:visible.sync="showTypes"
:before-close="()=>{
step = 2,myPurchaseType = 2,form.is_common_purchase = 1,form.flow_mod_id = 99,showTypes = false,showEdit=true
}"
width="30%">
<span>请选择类型</span>
<span slot="footer" class="dialog-footer">
<el-button @click="step = 2,myPurchaseType = 2,isWeixiu=false,form.is_common_purchase = 1,form.flow_mod_id = 99,showTypes = false,showEdit=true">一般采购</el-button>
<el-button @click="showTypes = false,myPurchaseType = 1,isWeixiu=true,form.is_common_purchase = 0,step=2,showEdit=true">维修相关</el-button>
<el-button type="primary" @click="showTypes = false,isWeixiu=false,myPurchaseType = 1,form.is_common_purchase = 0,showEdit=true">预算计划支出</el-button>
</span>
</el-dialog>
</div>
</template>
@ -908,9 +942,15 @@ import { getBudget } from "@/api/budget/budget";
import { getInfo } from "@/api/me.js";
import { listdeptNoAuth } from '@/api/system/department'
import { deepCopy } from "@/utils";
import {
listCommonuser
} from "@/api/common.js";
export default {
data() {
return {
showTypes:true,
showEdit:false,
isWeixiu:false,
myPurchaseType: 1, // 1 2
//
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}],
@ -945,6 +985,7 @@ export default {
group_type: "",
plan_price: 0,
name: "",
apply_user_id:'',
contract_plan_links: [],
is_simple: 0,
supply: "",
@ -962,6 +1003,7 @@ export default {
common_type: ''
},
commonPurchaseTypes: [],
commonPurchasePeople:[],
planTypes: [],
departments: [],
purchaseType: [],
@ -1117,18 +1159,18 @@ export default {
trigger: "blur",
},
],
money_way_id: [
{
validator: (rule, value, callback) => {
if (!this.hasValue(value)) {
callback(new Error("必填"));
} else {
callback();
}
},
trigger: "change",
},
],
// money_way_id: [
// {
// validator: (rule, value, callback) => {
// if (!this.hasValue(value)) {
// callback(new Error(""));
// } else {
// callback();
// }
// },
// trigger: "change",
// },
// ],
contract_plan_links: [
{
validator: (rule, value, callback) => {
@ -1384,6 +1426,17 @@ export default {
}
},
//
async getCommonPurchasePeople() {
try {
this.commonPurchasePeople = (await listCommonuser({
page:1,
page_size:999
}))?.data || []
} catch (err) {
}
},
//
async getPurchaseWay() {
this.purchaseWay =
@ -1703,6 +1756,7 @@ export default {
this.window.top = (window.screen.height - 30 - this.window.height) / 2;
this.window.left = (window.screen.width - 10 - this.window.width) / 2;
this.getCommonPurchaseType();
this.getCommonPurchasePeople()
this.getGroupType();
this.getPlanTypes();
this.getDepartment();
@ -1763,22 +1817,25 @@ export default {
}
})
} else {
MessageBox.confirm("请选择类型", "提示", {
confirmButtonText: "预算计划支出",
cancelButtonText: "一般采购"
}).then(_ => {
next(vm => {
vm.myPurchaseType = 1
vm.form.is_common_purchase = 0
})
}).catch(_ => {
next(vm => {
vm.step = 2
vm.myPurchaseType = 2
vm.form.is_common_purchase = 1
vm.form.flow_mod_id = 99
})
next(vm=>{
vm.showTypes = true
})
// MessageBox.confirm("", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// }).then(_ => {
// next(vm => {
// vm.myPurchaseType = 1
// vm.form.is_common_purchase = 0
// })
// }).catch(_ => {
// next(vm => {
// vm.step = 2
// vm.myPurchaseType = 2
// vm.form.is_common_purchase = 1
// vm.form.flow_mod_id = 99
// })
// })
}
}
}

@ -19,6 +19,26 @@
/>
</span>
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all">申购人</span>
<span>
<Select
v-model="select.apply_user_id"
clearable
placeholder="请选择申购人"
style="width: 140px"
filterable
>
<Option
v-for="item in commonPurchasePeople"
:key="item.name"
:value="item.id"
>{{ item.name }}</Option
>
</Select>
</span>
</div>
<el-popover
placement="bottom"
title="流程状态"
@ -44,6 +64,7 @@
</template>
<el-button slot="reference" style="margin-left: 10px" size="small" type="primary">流程状态</el-button>
</el-popover>
<xy-selectors style="margin-left: 10px;" @search="getContracts" @reset="reset">
<div class="select-content">
<div>
@ -300,6 +321,31 @@
@delete="(row) => deleteContract(row.id)"
@editor=""
>
<template v-slot:contract_flow_links>
<el-table-column
header-align="center"
label="摘要"
width="360"
>
<template slot-scope="scope">
<div v-if="scope.row.contract_flow_links && scope.row.contract_flow_links.length>0">
<div v-for="(item,index) in scope.row.contract_flow_links">
<div v-if="item.tag!='contract'">
<div>{{item.flow_title}}</div>
<div v-if="item.flow_field && item.flow_field.length>0">
<div v-for="field in item.flow_field">
<span v-if="field.show_in_list">{{field.label}}{{item.flow_data[field.name]}}</span>
</div>
</div>
</div>
</div>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column
fixed="right"
@ -531,6 +577,7 @@
style="margin-top: 10px"
ref="singlePlanTable"
>
<template v-slot:btns> </template>
</xy-table>
@ -627,7 +674,7 @@ import oaFiles from './components/oaFiles.vue';
import addContractLedger from '@/views/contract/components/addContractLedger.vue'
import EditContract from './components/EditContract.vue'
import { show } from "@/api/away";
import {flowStatusConfig} from "@/api/common";
import {flowStatusConfig,listCommonuser} from "@/api/common";
import {getFundLog} from "@/api/paymentRegistration/fundLog";
let iframe;
export default {
@ -652,6 +699,7 @@ export default {
isShowIsFramework: true,
userList: ["admin"],
commonPurchasePeople:[],
nowContract: {},
window: {
width: 0,
@ -683,6 +731,7 @@ export default {
//
select: {
keyword: "",
apply_user_id:'',
showDatePicker: "",
page: 1,
page_size: 10,
@ -701,6 +750,7 @@ export default {
},
selectCopy: {
keyword: "",
apply_user_id:'',
showDatePicker: "",
page: 1,
page_size: 10,
@ -752,7 +802,7 @@ export default {
label: "合同编号",
width: 200,
prop: 'number',
align: 'center'
align: 'center',
},
{
label: "合同类型",
@ -936,59 +986,7 @@ export default {
}
}
},
{
label: "采购形式",
width: 120,
prop: "purchase_type.value",
formatter: (cell, data, value) => {
return value ? value : "无";
},
},
{
label: "项目类型",
width: 120,
prop: "type",
formatter: (cell, data, value) => {
switch (value) {
case 1:
return "服务";
break;
case 2:
return "货物";
break;
case 3:
return "工程";
break;
default:
return "无";
}
}
},
{
label: "事前流程",
prop: "flow_mod_id",
width: 200,
hidden: !/contractAll/g.test(this.$route.path),
customFn:row => {
return (
<div>
<p>
<span>
{
this.flowIds.find(i => i.id === row.flow_mod_id)?.name
}
</span>
{
row.is_purchase ? "" : (<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.other.getStatus()) }}>[{ this.flowStatus.get(row.FLOWSTATUS.other.getStatus()) ?? '待申请' }]</span>)
}
</p>
{
(!row.is_purchase && row.FLOWSTATUS.other.getStatus() > 1) ? (<a on={{['click']:()=>this.toOaDetail('other',row)}}>查看</a>) : ""
}
</div>
)
}
},
{
label: "采购流程",
multiHd: [
@ -1087,6 +1085,74 @@ export default {
},
],
},
{
label: "申购人",
width: 120,
prop: "apply_user.name",
},
{
label: "承办人",
width: 120,
prop: "undertake_user.name",
},
{
label: "摘要",
width: 240,
prop: "contract_flow_links",
},
{
label: "采购形式",
width: 120,
prop: "purchase_type.value",
formatter: (cell, data, value) => {
return value ? value : "无";
},
},
{
label: "项目类型",
width: 120,
prop: "type",
formatter: (cell, data, value) => {
switch (value) {
case 1:
return "服务";
break;
case 2:
return "货物";
break;
case 3:
return "工程";
break;
default:
return "无";
}
}
},
{
label: "事前流程",
prop: "flow_mod_id",
width: 200,
hidden: !/contractAll/g.test(this.$route.path),
customFn:row => {
return (
<div>
<p>
<span>
{
this.flowIds.find(i => i.id === row.flow_mod_id)?.name
}
</span>
{
row.is_purchase ? "" : (<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.other.getStatus()) }}>[{ this.flowStatus.get(row.FLOWSTATUS.other.getStatus()) ?? '待申请' }]</span>)
}
</p>
{
(!row.is_purchase && row.FLOWSTATUS.other.getStatus() > 1) ? (<a on={{['click']:()=>this.toOaDetail('other',row)}}>查看</a>) : ""
}
</div>
)
}
},
{
label: "组织形式",
width: 120,
@ -1467,6 +1533,17 @@ export default {
};
},
methods: {
//
async getCommonPurchasePeople() {
try {
this.commonPurchasePeople = (await listCommonuser({
page:1,
page_size:999
}))?.data || []
} catch (err) {
}
},
printFlow (row) {
let id;
if (row.purchase_last_flow_id) {
@ -1869,6 +1946,7 @@ export default {
var url = "/api/ht/contract/index?is_auth=1&token=" + tokens;
Object.entries({
...this.select,
apply_user_id:this.select.apply_user_id?this.select.apply_user_id:'',
start_plan_price: this.select['start_plan_price'] ? this.select.start_plan_price : '',
end_plan_price: this.select['end_plan_price'] ? this.select.end_plan_price : ''
}).forEach(([key, value], item) => {
@ -1888,6 +1966,7 @@ export default {
const res = await getContract({
is_auth: 1,
...this.select,
apply_user_id:this.select.apply_user_id?this.select.apply_user_id:'',
start_plan_price: this.select['start_plan_price'] ? this.select.start_plan_price : '',
end_plan_price: this.select['end_plan_price'] ? this.select.end_plan_price : ''
},noloading);
@ -2240,6 +2319,7 @@ export default {
this.window.top = (window.screen.height - 30 - this.window.height) / 2;
this.window.left = (window.screen.width - 10 - this.window.width) / 2;
let that = this;
this.getCommonPurchasePeople()
getInfo()
.then((response) => {
console.log(response);

@ -19,6 +19,26 @@
/>
</span>
</div>
<div>
<span style="padding: 0 6px; word-break: keep-all">申购人</span>
<span>
<Select
v-model="select.apply_user_id"
clearable
placeholder="请选择申购人"
style="width: 140px"
filterable
>
<Option
v-for="item in commonPurchasePeople"
:key="item.name"
:value="item.id"
>{{ item.name }}</Option
>
</Select>
</span>
</div>
<xy-selectors style="margin-left: 10px;" @search="getContracts" @reset="reset">
<div class="select-content">
<div>
@ -275,6 +295,31 @@
@delete="(row) => deleteContract(row.id)"
@editor=""
>
<template v-slot:contract_flow_links>
<el-table-column
header-align="center"
label="摘要"
width="360"
>
<template slot-scope="scope">
<div v-if="scope.row.contract_flow_links && scope.row.contract_flow_links.length>0">
<div v-for="(item,index) in scope.row.contract_flow_links">
<div v-if="item.tag!='contract'">
<div>{{item.flow_title}}</div>
<div v-if="item.flow_field && item.flow_field.length>0">
<div v-for="field in item.flow_field">
<span v-if="field.show_in_list">{{field.label}}{{item.flow_data[field.name]}}</span>
</div>
</div>
</div>
</div>
</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column
fixed="right"
@ -447,6 +492,7 @@ import oaFiles from './components/oaFiles.vue';
import addContractLedger from '@/views/contract/components/addContractLedger.vue'
import EditContract from './components/EditContract.vue'
import { show } from "@/api/away";
import {listCommonuser} from "@/api/common";
let iframe;
export default {
components: {
@ -470,6 +516,7 @@ export default {
isShowIsFramework: true,
userList: ["admin"],
commonPurchasePeople:[],
nowContract: {},
window: {
width: 0,
@ -501,6 +548,7 @@ export default {
//
select: {
keyword: "",
apply_user_id:'',
showDatePicker: "",
pageIndex: 1,
pageSize: 10,
@ -522,6 +570,7 @@ export default {
},
selectCopy: {
keyword: "",
apply_user_id:"",
showDatePicker: "",
pageIndex: 1,
pageSize: 10,
@ -758,34 +807,7 @@ export default {
}
}
},
{
label: "采购形式",
width: 120,
prop: "purchase_type.value",
formatter: (cell, data, value) => {
return value ? value : "无";
},
},
{
label: "项目类型",
width: 120,
prop: "type",
formatter: (cell, data, value) => {
switch (value) {
case 1:
return "服务";
break;
case 2:
return "货物";
break;
case 3:
return "工程";
break;
default:
return "无";
}
}
},
{
label: "事前流程",
prop: "flow_mod_id",
@ -869,6 +891,49 @@ export default {
},
],
},
{
label: "申购人",
width: 120,
prop: "apply_user.name",
},
{
label: "承办人",
width: 120,
prop: "undertake_user.name",
},
{
label: "摘要",
width: 240,
prop: "contract_flow_links",
},
{
label: "采购形式",
width: 120,
prop: "purchase_type.value",
formatter: (cell, data, value) => {
return value ? value : "无";
},
},
{
label: "项目类型",
width: 120,
prop: "type",
formatter: (cell, data, value) => {
switch (value) {
case 1:
return "服务";
break;
case 2:
return "货物";
break;
case 3:
return "工程";
break;
default:
return "无";
}
}
},
{
label: "组织形式",
width: 120,
@ -1246,6 +1311,17 @@ export default {
};
},
methods: {
//
async getCommonPurchasePeople() {
try {
this.commonPurchasePeople = (await listCommonuser({
page:1,
page_size:999
}))?.data || []
} catch (err) {
}
},
printFlow (row) {
let id;
if (row.purchase_last_flow_id) {
@ -1641,6 +1717,7 @@ export default {
page: this.select.pageIndex,
is_auth: 1,
...this.select,
apply_user_id:this.select.apply_user_id?this.select.apply_user_id:'',
},noloading);
delete this.select.id;
@ -2009,6 +2086,7 @@ export default {
};
},
created() {
this.getCommonPurchasePeople()
this.getCommonPurchaseType();
this.getPurchaseType();
this.getDepartment();

Loading…
Cancel
Save