@@ -523,6 +533,21 @@ export default {
callback()
}
}
+ var moneyPass = (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{
+ callback()
+ }
+ }
var typePass = (rule,value,callback) => {
if(!this.form.is_simple){
if(value === ''){
@@ -571,6 +596,7 @@ export default {
callback()
}
}
+
return {
userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
window: {
@@ -613,8 +639,8 @@ export default {
year: "",
plan_id: "",
plan_name: "请选择预算计划",
- start_plan_price: "",
- end_plan_price: ""
+ start_plan_price: undefined,
+ end_plan_price: undefined
},
type: [{
label: '服务',
@@ -703,7 +729,7 @@ export default {
width: 158,
prop: 'purchase_status',
formatter: (cell, data, value) => {
- if (cell.is_substitute) {
+ if (cell.is_substitute || cell.is_simple) {
return '无'
}
switch (value) {
@@ -727,7 +753,7 @@ export default {
width: 145,
prop: 'invite_status',
formatter: (cell, data, value) => {
- if (cell.is_substitute) {
+ if (cell.is_substitute || cell.is_simple) {
return '无'
}
if (cell.purchase_way?.remark === 'false') {
@@ -754,6 +780,9 @@ export default {
width: 145,
prop: 'join_status',
formatter: (cell, data, value) => {
+ if(cell.is_simple){
+ return "无"
+ }
switch (value) {
case 1:
return "待申请"
@@ -1044,6 +1073,7 @@ export default {
name: "",
is_simple:0,
supply: "",
+ money:0,
type: "",
methods: "",
modality: "",
@@ -1065,6 +1095,12 @@ export default {
trigger: 'change'
}
],
+ money:[
+ {
+ validator:moneyPass,
+ trigger: 'change'
+ }
+ ],
type:[
{
validator: typePass,
@@ -1203,7 +1239,7 @@ export default {
columnIndex
}) {
if (column.property === 'req_status') {
- if (row.is_plan === 1 || row.is_substitute) {
+ if (row.is_plan || row.is_substitute || row.is_simple) {
return {
'color': 'rgb(140,140,140)'
}
@@ -1231,7 +1267,7 @@ export default {
}
}
if (column.property === 'purchase_status') {
- if (row.is_substitute) {
+ if (row.is_substitute || row.is_simple) {
return {
'color': 'rgb(140,140,140)'
}
@@ -1259,7 +1295,7 @@ export default {
}
}
if (column.property === 'invite_status') {
- if (row.purchase_way?.remark === 'false' || row.is_substitute) {
+ if (row.purchase_way?.remark === 'false' || row.is_substitute || row.is_simple) {
return {
'color': 'rgb(140,140,140)'
}
@@ -1287,6 +1323,11 @@ export default {
}
}
if (column.property === 'join_status') {
+ if(row.is_simple){
+ return {
+ 'color': 'rgb(140,140,140)'
+ }
+ }
switch (row.join_status) {
case 1:
return {
@@ -1638,7 +1679,9 @@ export default {
}),
is_substitute: this.form.is_substitute,
is_simple:this.form.is_simple,
- supply:this.form.supply
+ supply:this.form.supply,
+ money:this.form?.money,
+ status:this.form?.is_simple ? 2 : 1
}).then(res => {
this.isShowAdd = false
Message({