lilei 4 weeks ago
parent
commit
e3f79b0871

+ 5 - 5
src/views/salesManagement/salesQueryNew/comps/productActiveList.vue

@@ -376,7 +376,7 @@ export default {
           operationColumn: false,
           renderBodyCell: ({ row, column, rowIndex }, h) => {
             return (
-              !(row.promotionFlag == 'GIFT' && row.salesPromoDetailParentSn)
+              !(row.promotionFlag.indexOf('GIFT') >= 0 && row.sameGiteFlag == '1')
                 ? <a-input-number
                   id={'salesEdit-qty-' + row.id}
                   size="small"
@@ -455,7 +455,7 @@ export default {
             return (
               <div>
                 {
-                  row.sameGiteFlag != '1'
+                  !(row.promotionFlag.indexOf('GIFT') >= 0 && row.sameGiteFlag == '1')
                     ? <a-button
                       id={'salesEdit-upactive-' + row.id}
                       size="small"
@@ -466,7 +466,7 @@ export default {
                     >换促销</a-button> : ''
                 }
                 {
-                  row.sameGiteFlag != '1'
+                  !(row.promotionFlag.indexOf('GIFT') >= 0 && row.sameGiteFlag == '1')
                     ? <a-button
                       id={'salesEdit-del-' + row.id}
                       size="small"
@@ -549,7 +549,7 @@ export default {
             data[i].qtyBackups = data[i].qty
             data[i].productUnit = data[i].productEntity && data[i].productEntity.unit
             // 禁用选框
-            if (data[i].promotionFlag == 'GIFT' && !!data[i].salesPromoDetailParentSn) {
+            if (data[i].indexOf('GIFT') >= 0 && !!data[i].salesPromoDetailParentSn) {
               this.disableSelectedRowKeys.push(data[i].id)
             }
           }
@@ -722,7 +722,7 @@ export default {
       const gift = []
       rowSelect && rowSelect.map(item => {
         // 赠品
-        if (item.promotionFlag == 'GIFT') {
+        if (item.promotionFlag.indexOf('GIFT') >= 0) {
           gift.push(item.productCode)
         } else {
           // 非赠品