|
|
|
|
@ -14,7 +14,27 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</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-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>项目类型
|
|
|
|
|
@ -27,7 +47,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:methods>
|
|
|
|
|
<template v-slot:methods 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;">*</span>采购形式
|
|
|
|
|
@ -39,7 +59,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:modality>
|
|
|
|
|
<template v-slot:modality 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;">*</span>采购方式
|
|
|
|
|
@ -52,7 +72,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:price>
|
|
|
|
|
<template v-slot:price 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;">*</span>合同预算价
|
|
|
|
|
@ -229,6 +249,65 @@
|
|
|
|
|
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 {
|
|
|
|
|
userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
|
|
|
|
|
user: null,
|
|
|
|
|
@ -254,33 +333,44 @@
|
|
|
|
|
required: true,
|
|
|
|
|
message: "必填"
|
|
|
|
|
}],
|
|
|
|
|
type: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "必选"
|
|
|
|
|
}],
|
|
|
|
|
methods: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "必选"
|
|
|
|
|
}],
|
|
|
|
|
modality: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "必选"
|
|
|
|
|
}],
|
|
|
|
|
price: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "必填"
|
|
|
|
|
},
|
|
|
|
|
supply:[
|
|
|
|
|
{
|
|
|
|
|
pattern: /^\d+(\.\d+)?$/,
|
|
|
|
|
message: '必须为数字'
|
|
|
|
|
validator:supplyPass,
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
type:[
|
|
|
|
|
{
|
|
|
|
|
validator: typePass,
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
methods:[
|
|
|
|
|
{
|
|
|
|
|
validator:methodsPass,
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
modality:[
|
|
|
|
|
{
|
|
|
|
|
validator:modalityPass,
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
price:[
|
|
|
|
|
{
|
|
|
|
|
validator:pricePass,
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
fundingChannels: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "必填"
|
|
|
|
|
}],
|
|
|
|
|
plan: [{
|
|
|
|
|
validator: planPass
|
|
|
|
|
validator: planPass,
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
plans: [],
|
|
|
|
|
@ -449,12 +539,14 @@
|
|
|
|
|
})
|
|
|
|
|
this.contrantId = res.id
|
|
|
|
|
this.detail = {
|
|
|
|
|
name: res.name,
|
|
|
|
|
is_simple:res?.is_simple,
|
|
|
|
|
date: res.date,
|
|
|
|
|
req_status: res.req_status,
|
|
|
|
|
purchase_status: res.purchase_status,
|
|
|
|
|
join_status: res.join_status,
|
|
|
|
|
invite_status: res.invite_status,
|
|
|
|
|
name: res.name,
|
|
|
|
|
supply:res?.supply,
|
|
|
|
|
type: res.type,
|
|
|
|
|
methods: res.purchase_type_id,
|
|
|
|
|
modality: res.purchase_way_id,
|
|
|
|
|
@ -487,6 +579,8 @@
|
|
|
|
|
id: this.contrantId,
|
|
|
|
|
type: this.detail.type,
|
|
|
|
|
is_plan: this.detail.isBudget ? 1 : 0,
|
|
|
|
|
is_simple:this.detail?.is_simple,
|
|
|
|
|
supply:this.detail?.supply,
|
|
|
|
|
purchase_type_id: this.detail.methods,
|
|
|
|
|
purchase_way_id: this.detail.modality,
|
|
|
|
|
money_way_id: this.detail.fundingChannels.toString(),
|
|
|
|
|
@ -550,7 +644,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.xy-table-item-label {
|
|
|
|
|
width: 140px;
|
|
|
|
|
width: 200px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.xy-table-item-price {
|
|
|
|
|
|