2023-1-6 简易付款

master
xy 3 years ago
parent e695659c8c
commit 9177ec41c2

@ -14,7 +14,27 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:type> <template v-slot:is_simple>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;font-size: 11px;">*是否为简易流程水电煤报刊订阅网络通讯车辆使用等费用付款</span>
</div>
<div class="xy-table-item-content">
<el-switch v-model="detail.is_simple" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:supply v-if="detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;font-size: 11px;">*</span>承包商/供货商
</div>
<div class="xy-table-item-content">
<el-input v-model="detail.supply" placeholder="请填写承包商/供货商" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:type v-if="!detail.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目类型 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目类型
@ -27,7 +47,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:methods> <template v-slot:methods v-if="!detail.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购形式 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购形式
@ -39,7 +59,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:modality> <template v-slot:modality v-if="!detail.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购方式 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购方式
@ -52,7 +72,7 @@
</div> </div>
</template> </template>
<template v-slot:price> <template v-slot:price v-if="!detail.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同预算价 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同预算价
@ -229,6 +249,65 @@
callback() callback()
} }
} }
var supplyPass = (rule,value,callback) => {
if(this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var typePass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var methodsPass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var modalityPass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var pricePass = (rule,value,callback) => {
if(!this.detail.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
if(/^\d+(\.\d+)?$/.test(value)){
callback()
}else{
callback(new Error('必须为数字'))
}
}
}else{
callback()
}
}
return { return {
userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"], userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
user: null, user: null,
@ -254,33 +333,44 @@
required: true, required: true,
message: "必填" message: "必填"
}], }],
type: [{ supply:[
required: true, {
message: "必选" validator:supplyPass,
}], trigger: 'change'
methods: [{ }
required: true, ],
message: "必选" type:[
}], {
modality: [{ validator: typePass,
required: true, trigger: 'change'
message: "必选" }
}], ],
price: [{ methods:[
required: true,
message: "必填"
},
{ {
pattern: /^\d+(\.\d+)?$/, validator:methodsPass,
message: '必须为数字' trigger: 'change'
} }
], ],
modality:[
{
validator:modalityPass,
trigger: 'change'
}
],
price:[
{
validator:pricePass,
trigger: 'change'
}
],
fundingChannels: [{ fundingChannels: [{
required: true, required: true,
message: "必填" message: "必填"
}], }],
plan: [{ plan: [{
validator: planPass validator: planPass,
trigger: 'change'
}] }]
}, },
plans: [], plans: [],
@ -449,12 +539,14 @@
}) })
this.contrantId = res.id this.contrantId = res.id
this.detail = { this.detail = {
name: res.name,
is_simple:res?.is_simple,
date: res.date, date: res.date,
req_status: res.req_status, req_status: res.req_status,
purchase_status: res.purchase_status, purchase_status: res.purchase_status,
join_status: res.join_status, join_status: res.join_status,
invite_status: res.invite_status, invite_status: res.invite_status,
name: res.name, supply:res?.supply,
type: res.type, type: res.type,
methods: res.purchase_type_id, methods: res.purchase_type_id,
modality: res.purchase_way_id, modality: res.purchase_way_id,
@ -487,6 +579,8 @@
id: this.contrantId, id: this.contrantId,
type: this.detail.type, type: this.detail.type,
is_plan: this.detail.isBudget ? 1 : 0, is_plan: this.detail.isBudget ? 1 : 0,
is_simple:this.detail?.is_simple,
supply:this.detail?.supply,
purchase_type_id: this.detail.methods, purchase_type_id: this.detail.methods,
purchase_way_id: this.detail.modality, purchase_way_id: this.detail.modality,
money_way_id: this.detail.fundingChannels.toString(), money_way_id: this.detail.fundingChannels.toString(),
@ -550,7 +644,7 @@
} }
.xy-table-item-label { .xy-table-item-label {
width: 140px; width: 200px;
} }
.xy-table-item-price { .xy-table-item-price {

@ -29,7 +29,8 @@
<div> <div>
<span style="padding: 0 6px;word-break: keep-all;">签订年份</span> <span style="padding: 0 6px;word-break: keep-all;">签订年份</span>
<span> <span>
<DatePicker :value="select.year" placeholder="选择年份" placement="bottom" style="width: 90px;" type="year" <DatePicker :value="select.year" placeholder="选择年份" placement="bottom" style="width: 90px;"
type="year"
@on-change="(e)=>select.year = e"></DatePicker> @on-change="(e)=>select.year = e"></DatePicker>
</span> </span>
</div> </div>
@ -54,7 +55,8 @@
<span style="padding: 0 6px;word-break: keep-all;"> <span style="padding: 0 6px;word-break: keep-all;">
业务科室 业务科室
</span> </span>
<el-select v-model="select.department_id" clearable placeholder="业务科室选择" size="small" style="width: 120px;"> <el-select v-model="select.department_id" clearable placeholder="业务科室选择" size="small"
style="width: 120px;">
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@ -187,15 +189,18 @@
</template> </template>
<!-- <Button class="slot-btns-item" type="primary" size="small">附件管理</Button>--> <!-- <Button class="slot-btns-item" type="primary" size="small">附件管理</Button>-->
<template v-if="scope.row.req_status === 1 && scope.row.is_plan === 0 && !scope.row.is_substitute"> <template v-if="scope.row.req_status === 1 && scope.row.is_plan === 0 && !scope.row.is_substitute">
<Button class="slot-btns-item" size="small" type="primary" @click="askProcess(scope.row)"></Button> <Button class="slot-btns-item" size="small" type="primary" @click="askProcess(scope.row)">
</Button>
</template> </template>
<template <template
v-if="(scope.row.join_status === 1 && ((scope.row.invite_status === 3)||(scope.row.purchase_way.remark === 'false' && scope.row.purchase_status === 3)) || ( scope.row.is_substitute && scope.row.join_status === 1) ) "> v-if="(scope.row.join_status === 1 && ((scope.row.invite_status === 3)||(scope.row.purchase_way.remark === 'false' && scope.row.purchase_status === 3)) || ( scope.row.is_substitute && scope.row.join_status === 1) ) ">
<Button class="slot-btns-item" size="small" type="primary" @click="signProcess(scope.row)"></Button> <Button class="slot-btns-item" size="small" type="primary" @click="signProcess(scope.row)">
</Button>
</template> </template>
<template <template
v-if="scope.row.purchase_status === 1 && ((scope.row.req_status === 3 && scope.row.is_plan === 0)||scope.row.is_plan === 1)&& !scope.row.is_substitute "> v-if="scope.row.purchase_status === 1 && ((scope.row.req_status === 3 && scope.row.is_plan === 0)||scope.row.is_plan === 1)&& !scope.row.is_substitute ">
<Button class="slot-btns-item" size="small" type="primary" @click="buyProcess(scope.row)"></Button> <Button class="slot-btns-item" size="small" type="primary" @click="buyProcess(scope.row)">
</Button>
</template> </template>
<Poptip trigger="hover" placement="bottom" transfer> <Poptip trigger="hover" placement="bottom" transfer>
@ -249,7 +254,27 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:type> <template v-slot:is_simple>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;font-size: 11px;">*是否为简易流程水电煤报刊订阅网络通讯车辆使用等费用付款</span>
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.is_simple" active-text="" inactive-text="" :active-value="1" :inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:supply v-if="form.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;font-size: 11px;">*</span>承包商/供货商
</div>
<div class="xy-table-item-content">
<el-input v-model="form.supply" placeholder="请填写承包商/供货商" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:type v-if="!form.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目类型 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目类型
@ -261,7 +286,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:methods> <template v-slot:methods v-if="!form.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购形式 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购形式
@ -273,7 +298,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:modality> <template v-slot:modality v-if="!form.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购类型 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>采购类型
@ -285,7 +310,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:price> <template v-slot:price v-if="!form.is_simple">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同预算价 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同预算价
@ -350,11 +375,11 @@
</xy-dialog> </xy-dialog>
<!-- 搜索使用 预算计划 --> <!-- 搜索使用 预算计划 -->
<xy-dialog :is-show.sync="isShowPlanForSearch" title="预算计划" :width="720" @on-ok="planSelectForSearch"> <xy-dialog :is-show.sync="isShowPlanForSearch" title="预算计划" :width="720" @on-ok="planSelectForSearch">
<template v-slot:normalContent> <template v-slot:normalContent>
<Input v-model="planSearch.name" search enter-button=" " placeholder="搜索预算计划.." @on-search="searchBudgets" /> <Input v-model="planSearch.name" search enter-button=" " placeholder="搜索预算计划.."
@on-search="searchBudgets"/>
<div style="margin: 10px 0;display: flex;justify-content: space-between; <div style="margin: 10px 0;display: flex;justify-content: space-between;
align-items: center;"> align-items: center;">
<div>已选择<span style="margin-right:10px">{{ select.plan_name }}</span></div> <div>已选择<span style="margin-right:10px">{{ select.plan_name }}</span></div>
@ -478,10 +503,69 @@
var planPass = (rule, value, callback) => { var planPass = (rule, value, callback) => {
if (this.form.isBudget) { if (this.form.isBudget) {
if (this.form.plan.length === 0) { if (this.form.plan.length === 0) {
return callback(new Error('必选')) callback(new Error('必选'))
} else {
callback()
}
} else {
callback()
}
}
var supplyPass = (rule,value,callback) => {
if(this.form.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var typePass = (rule,value,callback) => {
if(!this.form.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var methodsPass = (rule,value,callback) => {
if(!this.form.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{
callback()
}
}
var modalityPass = (rule,value,callback) => {
if(!this.form.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
callback()
}
}else{ }else{
callback() callback()
} }
}
var pricePass = (rule,value,callback) => {
if(!this.form.is_simple){
if(value === ''){
callback(new Error('必填'))
}else{
if(/^\d+(\.\d+)?$/.test(value)){
callback()
}else{
callback(new Error('必须为数字'))
}
}
}else{ }else{
callback() callback()
} }
@ -751,8 +835,7 @@
}> { }> {
per per
} % } %
< </div>
/div>
) )
} }
}, },
@ -952,6 +1035,8 @@
isShowAdd: false, isShowAdd: false,
form: { form: {
name: "", name: "",
is_simple:0,
supply: "",
type: "", type: "",
methods: "", methods: "",
modality: "", modality: "",
@ -967,27 +1052,37 @@
required: true, required: true,
message: "必填" message: "必填"
}], }],
type: [{ supply:[
required: true, {
message: "必选" validator:supplyPass,
}], trigger: 'change'
methods: [{ }
required: true, ],
message: "必选" type:[
}], {
modality: [{ validator: typePass,
required: true, trigger: 'change'
message: "必选" }
}], ],
price: [{ methods:[
required: true, {
message: "必填" validator:methodsPass,
}, trigger: 'change'
}
],
modality:[
{ {
pattern: /^\d+(\.\d+)?$/, validator:modalityPass,
message: '必须为数字' trigger: 'change'
} }
], ],
price:[
{
validator:pricePass,
trigger: 'change'
}
],
fundingChannels: [{ fundingChannels: [{
required: true, required: true,
message: "必填" message: "必填"
@ -1433,8 +1528,6 @@
}) })
// //
if (sel.filter(plan => { if (sel.filter(plan => {
return plan.id == row.id return plan.id == row.id
@ -1536,7 +1629,9 @@
contract_plan_links: this.form.plan.map(item => { contract_plan_links: this.form.plan.map(item => {
return item.value return item.value
}), }),
is_substitute: this.form.is_substitute is_substitute: this.form.is_substitute,
is_simple:this.form.is_simple,
supply:this.form.supply
}).then(res => { }).then(res => {
this.isShowAdd = false this.isShowAdd = false
Message({ Message({
@ -1577,7 +1672,8 @@
that.hasEdit = true; that.hasEdit = true;
} }
}).catch(error => {}) }).catch(error => {
})
this.getPurchaseType() this.getPurchaseType()
this.getContracts() this.getContracts()
this.getDepartment() this.getDepartment()
@ -1639,7 +1735,7 @@
} }
.xy-table-item-label { .xy-table-item-label {
width: 140px; width: 200px;
} }
.xy-table-item-price { .xy-table-item-price {

Loading…
Cancel
Save