作者 Win10-2023FDZSZ\Administrator

投标页面增加栏位展示,询价编辑默认到新增页,投标价格字段验证逻辑修改

... ... @@ -155,21 +155,21 @@
dataIndex: 'tenderInfo.bdlx'
},
// {
// title:'库存数据',
// align:"center",
// dataIndex: 'kcsj'
// },
// {
// title:'在途库存',
// align:"center",
// dataIndex: 'ztkf'
// },
// {
// title:'库存单价(含税运)(元)',
// align:"center",
// dataIndex: 'kcdj'
// },
{
title: '税率(%)',
align: 'center',
dataIndex: 'sl'
},
{
title: '响应品牌',
align: 'center',
dataIndex: 'xypp'
},
{
title: '响应单价(不含税)',
align: 'center',
dataIndex: 'xydj'
},
// {
// title:'在途单价(含税运)(元)',
// align:"center",
... ...
... ... @@ -178,7 +178,35 @@
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
validatorRules: {
tbjg: [{ required: true, message: '请输入数据!' }]
tbjg: {
validator: (rule, value, callback) => {
let flag = false
let blankFlag = false
console.log(this.tblTradeInquiryInfoTable.dataSource)
this.tblTradeInquiryInfoTable.dataSource.forEach(e => {
if (e.sfxycxxj === 'Y') {
flag = true
}
if (!e.sfxycxxj) {
blankFlag = true
}
})
if (blankFlag) {
callback()
}
if (flag) {
this.model.tbjg = null
callback()
} else {
if (!value) {
callback('请输入数据!')
} else {
callback()
}
}
}
}
},
refKeys: ['tblTradeInquiryInfo' ],
tableKeys: ['tblTradeInquiryInfo' ],
... ...
... ... @@ -179,6 +179,8 @@
},
methods: {
add () {
// 默认当前tab页为历史页
this.activeKey = this.refKeys['0']
this.visible = true
this.$nextTick(() => {
this.loadData()
... ... @@ -186,8 +188,11 @@
})
},
edit (record) {
// 默认当前tab页为新增页
this.activeKey = this.refKeys['1']
this.visible = true
this.$nextTick(() => {
this.loadData()
this.$refs.realForm.edit(record)
})
},
... ...