作者 Win10-2023FDZSZ\Administrator

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

@@ -155,21 +155,21 @@ @@ -155,21 +155,21 @@
155 dataIndex: 'tenderInfo.bdlx' 155 dataIndex: 'tenderInfo.bdlx'
156 }, 156 },
157 157
158 - // {  
159 - // title:'库存数据',  
160 - // align:"center",  
161 - // dataIndex: 'kcsj'  
162 - // },  
163 - // {  
164 - // title:'在途库存',  
165 - // align:"center",  
166 - // dataIndex: 'ztkf'  
167 - // },  
168 - // {  
169 - // title:'库存单价(含税运)(元)',  
170 - // align:"center",  
171 - // dataIndex: 'kcdj'  
172 - // }, 158 + {
  159 + title: '税率(%)',
  160 + align: 'center',
  161 + dataIndex: 'sl'
  162 + },
  163 + {
  164 + title: '响应品牌',
  165 + align: 'center',
  166 + dataIndex: 'xypp'
  167 + },
  168 + {
  169 + title: '响应单价(不含税)',
  170 + align: 'center',
  171 + dataIndex: 'xydj'
  172 + },
173 // { 173 // {
174 // title:'在途单价(含税运)(元)', 174 // title:'在途单价(含税运)(元)',
175 // align:"center", 175 // align:"center",
@@ -178,7 +178,35 @@ @@ -178,7 +178,35 @@
178 // 新增时子表默认添加几行空数据 178 // 新增时子表默认添加几行空数据
179 addDefaultRowNum: 1, 179 addDefaultRowNum: 1,
180 validatorRules: { 180 validatorRules: {
181 - tbjg: [{ required: true, message: '请输入数据!' }] 181 + tbjg: {
  182 + validator: (rule, value, callback) => {
  183 + let flag = false
  184 + let blankFlag = false
  185 + console.log(this.tblTradeInquiryInfoTable.dataSource)
  186 + this.tblTradeInquiryInfoTable.dataSource.forEach(e => {
  187 + if (e.sfxycxxj === 'Y') {
  188 + flag = true
  189 + }
  190 + if (!e.sfxycxxj) {
  191 + blankFlag = true
  192 + }
  193 + })
  194 + if (blankFlag) {
  195 + callback()
  196 + }
  197 +
  198 + if (flag) {
  199 + this.model.tbjg = null
  200 + callback()
  201 + } else {
  202 + if (!value) {
  203 + callback('请输入数据!')
  204 + } else {
  205 + callback()
  206 + }
  207 + }
  208 + }
  209 + }
182 }, 210 },
183 refKeys: ['tblTradeInquiryInfo' ], 211 refKeys: ['tblTradeInquiryInfo' ],
184 tableKeys: ['tblTradeInquiryInfo' ], 212 tableKeys: ['tblTradeInquiryInfo' ],
@@ -179,6 +179,8 @@ @@ -179,6 +179,8 @@
179 }, 179 },
180 methods: { 180 methods: {
181 add () { 181 add () {
  182 + // 默认当前tab页为历史页
  183 + this.activeKey = this.refKeys['0']
182 this.visible = true 184 this.visible = true
183 this.$nextTick(() => { 185 this.$nextTick(() => {
184 this.loadData() 186 this.loadData()
@@ -186,8 +188,11 @@ @@ -186,8 +188,11 @@
186 }) 188 })
187 }, 189 },
188 edit (record) { 190 edit (record) {
  191 + // 默认当前tab页为新增页
  192 + this.activeKey = this.refKeys['1']
189 this.visible = true 193 this.visible = true
190 this.$nextTick(() => { 194 this.$nextTick(() => {
  195 + this.loadData()
191 this.$refs.realForm.edit(record) 196 this.$refs.realForm.edit(record)
192 }) 197 })
193 }, 198 },