lilei 1 rok temu
rodzic
commit
acccff6c2b

+ 5 - 2
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -188,7 +188,7 @@
                 { title: '原厂编码', field: 'productOrigCode',key: "d", width: 150, align: 'left',operationColumn: false,ellipsis: { showTitle: true },renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'} },
                 { title: '出库仓库', field: 'warehouseName',key: "e", width: 100, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}}
             ]
-            this.colspanNums = 5
+            this.colspanNums = this.showConvertPromoGifts ? 6 : 5
             if (this.$hasPermissions(this.authCode + '_costPrice')) { //  成本价权限
               this.colspanNums = this.colspanNums + 1
               arr.push({ title: '成本价', field: 'showCost', width: 80,key: "f", align: 'right',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field])} })
@@ -228,7 +228,7 @@
                 { title: '已下推数', field: 'pushedQty', width: 80,key: "p", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} },
             ])
             
-            if(this.hasConvertPromoGifts){
+            if(this.showConvertPromoGifts){
               arr.push({ title: '转采购额数量', field: 'convertPromoGiftsQty', width: 100,key: "z", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} })
             }
             arr.push({ title: '已取消数', field: 'cancelQty', width: 80,key: "q", align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field])} })
@@ -237,6 +237,9 @@
         hasConvertPromoGifts(){
           return this.detailData && this.detailData.totalConvertPromoGiftsQty
         },
+        showConvertPromoGifts(){
+          return this.activeList&&this.activeList.find(item => item.promotionRule&&item.promotionRule.convertExpenseFlag==1&&item.promotionRule.promotionRuleType=='BUY_PROD_GIVE_PROD')
+        },
         showStock(){
             return this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')
         }

+ 7 - 3
src/views/salesManagement/salesQueryNew/detail.vue

@@ -116,6 +116,9 @@
                         <a-select-option value="GIFT">
                           促销产品
                         </a-select-option>
+                        <a-select-option value="GIFT1" v-if="showConvertPromoGifts">
+                          促销产品(转采购额)
+                        </a-select-option>
                         <a-select-option value="GATE">
                           门槛产品
                         </a-select-option>
@@ -292,6 +295,9 @@ export default {
     hasPrompActive(){
       return this.detailData&&this.detailData.promoFlag==1
     },
+    showConvertPromoGifts(){
+      return this.$refs.productList && this.$refs.productList.showConvertPromoGifts
+    },
     pageHeight () {
       return window.innerHeight - 305 + (this.hideFooter ? 45 : 0)
     }
@@ -356,9 +362,7 @@ export default {
           return
         }
         
-        const acitveList = this.$refs.productList.activeList
-        const hasConvertPromoGift = acitveList&&acitveList.find(item => item.promotionRule&&item.promotionRule.convertExpenseFlag==1&&item.promotionRule.promotionRuleType=='BUY_PROD_GIVE_PROD')
-        if (hasConvertPromoGift) {
+        if (this.$refs.productList.showConvertPromoGifts) {
           this.$info({
             title: '提示',
             content: '该活动规则中,促销产品可转费用报销单,不可一键审核!',

+ 7 - 7
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -289,7 +289,7 @@ export default {
       }
       // 转采购额数量输入框
       const inputFormat1 = function(record,data,h) {
-        if(record.unpushedQty>0){
+        if(record.unpushedQty>=0){
           // 已选
           if(_this.selectedRowKeys.includes(record.id) && record.convertPromoGiftsFlag == 1){
             return (
@@ -541,9 +541,9 @@ export default {
           }
           
           // 库存为0或待下推数为0,不可添加
-          if(!item.unpushedQty || item.unpushedQty<0){
-            this.disableSelectedRowKeys.push(item.id)
-          }
+          // if(!item.unpushedQty || item.unpushedQty<0){
+          //   this.disableSelectedRowKeys.push(item.id)
+          // }
         })
         this.showEmpty = this.dataSource.length <= 0
         this.tableData = this.dataSource
@@ -598,7 +598,7 @@ export default {
         return
       }
       const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.convertPromoGiftsFlag==1)
-      const noChooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.convertPromoGiftsFlag==0)
+      const noChooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && !item.convertPromoGiftsFlag)
       const obj = []
       const noObj = []
       noChooseRow && noChooseRow.map(item => {
@@ -614,8 +614,8 @@ export default {
       if(obj.length){
         this.$confirm({
           title: '提示',
-          content: <div><div style="text-align:center;padding:10px 0;font-weight:bold;">确定将选中的促销产品转成采购额吗?</div><div style="font-size:12px;color:#999;padding:10px 0;text-align:center;">
-当该销售单完结后,可将采购额转成费用报销单。</div>{noObj.length?<div style="text-align:center;"><div>总共选择了 {chooseList.length} 个产品,其中 {obj.length} 个产品可转采购额。</div><div> 产品 ({noObj.toString()}) 不可转采购额!</div></div>:''}</div>,
+          content: <div><div style="text-align:center;padding:10px 0;font-weight:bold;">确定将选中的促销产品转成采购额吗?</div>{noObj.length?<div style="text-align:center;"><div>总共选择了 {chooseList.length} 个产品,其中 {obj.length} 个产品可转采购额。</div><div style="color:red;"> 产品 ({noObj.toString()}) 不可转采购额!</div></div>:''}<div style="font-size:12px;color:#999;padding:10px 0;text-align:center;">
+当该销售单完结后,可将采购额转成费用报销单。</div></div>,
           centered: true,
           closable: true,
           class: 'confirm-center',

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.111/ocs-admin',
+        target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,