chenrui 2 gadi atpakaļ
vecāks
revīzija
9909d367e5

+ 2 - 2
src/views/productManagement/productInfoJg/editPriceModal.vue

@@ -105,7 +105,7 @@ export default {
           objInfo.terminalPrice = (res.data.terminalPrice || res.data.terminalPrice == 0) ? _this.toThousands(res.data.terminalPrice) : ''
           objInfo.carOwnersPrice = (res.data.carOwnersPrice || res.data.carOwnersPrice == 0) ? _this.toThousands(res.data.carOwnersPrice) : ''
           objInfo.dealerProductPrice = {}
-          Object.assign(objInfo.dealerProductPrice, { terminalPrice: res.data.dealerProductPrice && res.data.dealerProductPrice.terminalPrice || '', carOwnersPrice: res.data.dealerProductPrice && res.data.dealerProductPrice.carOwnersPrice || '' })
+          Object.assign(objInfo.dealerProductPrice, { terminalPrice: res.data.dealerProductPrice && (res.data.dealerProductPrice.terminalPrice || res.data.dealerProductPrice.terminalPrice == 0) ? res.data.dealerProductPrice.terminalPrice : '', carOwnersPrice: res.data.dealerProductPrice && (res.data.dealerProductPrice.carOwnersPrice || res.data.dealerProductPrice.carOwnersPrice == 0) ? res.data.dealerProductPrice.carOwnersPrice : '' })
           _this.form = objInfo
         }
       })
@@ -118,7 +118,7 @@ export default {
       const ajaxData = {}
       ajaxData.productSn = this.itemId
       ajaxData.dealerProductPrice = {}
-      Object.assign(ajaxData.dealerProductPrice, this.form.dealerProductPrice)
+      Object.assign(ajaxData.dealerProductPrice, _this.form.dealerProductPrice)
       settingPrice(ajaxData).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)

+ 7 - 0
src/views/productManagement/productInfoJg/list.vue

@@ -307,6 +307,13 @@ export default {
           if (res.data.isShowSpecialPrice && res.data.isShowSpecialPrice == '1') { //  是否展示特约价
             this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
           }
+          if (_this.isTerminalPrice) {
+            cArr.splice(1, 0, { title: '自定义终端价', dataIndex: 'dealerProductPrice.terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+          }
+          if (_this.isCarOwnersPrice) {
+            const pos = _this.terminalPrice ? 3 : 2
+            cArr.splice(pos, 0, { title: '自定义车主价', dataIndex: 'dealerProductPrice.carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+          }
           this.columns = [...this.columns, ...cArr]
         }
       })