Browse Source

Merge branch 'deploy' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into deploy

chenrui 4 years ago
parent
commit
c0e2c3d1c7
1 changed files with 17 additions and 17 deletions
  1. 17 17
      src/views/salesManagement/salesQuery/chooseActive.vue

+ 17 - 17
src/views/salesManagement/salesQuery/chooseActive.vue

@@ -18,7 +18,7 @@
           onChange: onSelectChange,
           getCheckboxProps: record => ({
             props: {
-              disabled: record.product.cost == undefined, // Column configuration not to be checked
+              disabled: record.cost == undefined||record.cost==0||record.productPrice==0||record.productPrice==undefined, // Column configuration not to be checked
             }
           })
         }"
@@ -79,14 +79,14 @@ export default {
     return {
       isShow: this.openModal,
       columns: [
-        { title: '产品编码', dataIndex: 'product.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'product.cost', align: 'center', customRender: function (text) { return '¥' + (text == undefined ? '--' : text) } },
-        { title: '原售价', dataIndex: 'product.productPrice', align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
-        { title: '促销价', dataIndex: 'goodsPrice', align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'cost', align: 'center', customRender: function (text) { return (text == undefined ? '--' : ('¥' + text)) } },
+        { title: '原售价', dataIndex: 'productPrice', align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '促销价', dataIndex: 'promoRuleGoods.goodsPrice', align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '数量', dataIndex: 'qty', scopedSlots: { customRender: 'salesNums' }, align: 'center' },
-        { title: '单位', dataIndex: 'product.unit', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '促销类型', dataIndex: 'promoRuleTypeName', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '单位', dataIndex: 'unit', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '促销类型', dataIndex: 'promoRuleGoods.promoRuleTypeName', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       selectedRows: [],
@@ -121,16 +121,16 @@ export default {
       const obj = []
       _this.selectedRows.map(item => {
         obj.push({
-          showCost: item.product.cost,
-          price: item.goodsPrice,
-          origPrice: item.product.productPrice,
-          packQty: item.product.packQty,
-          productSn: item.product.productSn,
+          showCost: item.cost,
+          price: item.promoRuleGoods.goodsPrice,
+          origPrice: item.productPrice,
+          packQty: item.packQty,
+          productSn: item.productSn,
           promotionSourceSn: this.salesBillDetailSn,
-          promotionActivitySn: item.promoActiveSn,
-          promotionActivityName: item.promoActiveName,
-          promotionRules: item.promoRuleSn,
-          promoGoodsType: item.promoGoodsType,
+          promotionActivitySn: item.promoRuleGoods.promoActiveSn,
+          promotionActivityName: item.promoRuleGoods.promoActiveName,
+          promotionRules: item.promoRuleGoods.promoRuleSn,
+          promoGoodsType: item.promoRuleGoods.promoGoodsType,
           qty: item.qty,
           promotableFlag: 0, // 可促销标记 有活动的传1,没活动的传0
           promotionFlag: 1 // 促销标记 正品传0,促销品传1