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: "必选"
}],
methods: [{
required: true,
message: "必选"
}],
modality: [{
required: true,
message: "必选"
}],
price: [{
required: true,
message: "必填"
},
{ {
pattern: /^\d+(\.\d+)?$/, validator:supplyPass,
message: '必须为数字' trigger: 'change'
} }
], ],
type:[
{
validator: typePass,
trigger: 'change'
}
],
methods:[
{
validator:methodsPass,
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 {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save