|
|
|
|
@ -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"
|
|
|
|
|
@ -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
|
|
|
|
|
})
|
|
|
|
|
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
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|