lilei 1 年之前
父节点
当前提交
3666f2154b

+ 4 - 3
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -141,6 +141,7 @@
           }
           // 编号,并且格式化活动分类行
           const noFormat = function(record,data,h){
+            const isBuyPSendP = record.promo && record.promo.promotionRule.convertExpenseFlag==1&&record.promo.promotionRule.promotionRuleType=='BUY_PROD_GIVE_PROD'
             return (
               <div>
                 {record.id.indexOf('promo-')>=0 ? (
@@ -159,9 +160,9 @@
                         数量:<strong>{record.total&&record.total.totalQty||'--'}</strong>;
                         {_this.$hasPermissions('B_salesEdit_salesPrice') ? (<span>总金额:<strong>{record.total&&record.total.totalAmount||'--'}</strong>;</span>):('')}
                         {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.lossAmount ? (<span>优惠金额:<strong>{record.total.lossAmount}</strong>;</span>):('')}
-                        {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount>0 ? (<span>采购额结余:<strong>{_this.toThousands(record.total.cgejyAmount)}</strong>;</span>):('')}
-                        {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount<0 ? (<span>采购额超出:<strong>{_this.toThousands(record.total.cgeccAmount)}</strong>;</span>):('')}
-                        {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.convertPromoGiftsAmount ? (<span>转采购额金额:<strong>{_this.toThousands(record.total.convertPromoGiftsAmount)}</strong>;</span>):('')}
+                        {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount>0&&!isBuyPSendP ? (<span>采购额结余:<strong>{_this.toThousands(record.total.cgejyAmount)}</strong>;</span>):('')}
+                        {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount<0&&!isBuyPSendP ? (<span>采购额超出:<strong>{_this.toThousands(record.total.cgeccAmount)}</strong>;</span>):('')}
+                        {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.totalPromoGiftsAmount&&isBuyPSendP ? (<span>转采购额金额:<strong>{_this.toThousands(record.total.totalPromoGiftsAmount)}</strong>;</span>):('')}
                         {record.total&&record.total.expenseAccountFlag!='WAIT' ? (<span style="color:red;">{record.total.expenseAccountFlagDictValue}</span>) : ''}
                     </div>
                   </div>

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -364,7 +364,7 @@ export default {
               data.list[i].qtyBackups = data.list[i].qty
               data.list[i].productUnit = data.list[i].productEntity && data.list[i].productEntity.unit
               // 按数量设置
-              if (data.list[i].unitType == 'SL') {
+              if (data.list[i].unitType && data.list[i].unitType == 'SL') {
                 data.list[i].unitQtyV = data.list[i].unitQty ? (data.list[i].unitQty + data.list[i].productUnit) : '--'
                 data.list[i].unitQtyR = data.list[i].unitQty
               } else {

+ 2 - 2
src/views/salesManagement/salesQueryNew/edit.vue

@@ -502,8 +502,8 @@ export default {
     showDesc (e, item) {
       e.stopPropagation()
       const row = this.$refs['productList-' + item.promoRuleSn][0]
-      item.promotionRule.minOrderAmount = item.promotion.minOrderAmount
-      item.promotionRule.upperLimitAmount = item.promotion.upperLimitAmount
+      item.promotionRule.minOrderAmount = item.promotion.minOrderAmount ? Number(item.promotion.minOrderAmount).toFixed(2) : ''
+      item.promotionRule.upperLimitAmount = item.promotion.upperLimitAmount ? Number(item.promotion.upperLimitAmount).toFixed(2) : ''
       row && row.showDesc(item.promotionRule)
     },
     showDescOk (v, item) {

+ 6 - 5
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 && record.convertPromoGiftsFlag){
           // 已选
           if(_this.selectedRowKeys.includes(record.id)){
             return (
@@ -329,6 +329,7 @@ export default {
       }
       // 编号,并且格式化活动分类行
       const noFormat = function(record,data,h){
+        const isBuyPSendP = record.promo && record.promo.promotionRule.convertExpenseFlag==1&&record.promo.promotionRule.promotionRuleType=='BUY_PROD_GIVE_PROD'
         return (
           <div>
             {record.id.indexOf('promo-')>=0 ? (
@@ -347,9 +348,9 @@ export default {
                   数量:<strong>{record.total&&record.total.totalQty||'--'}</strong>;
                   {_this.$hasPermissions('B_salesEdit_salesPrice') ? (<span>总金额:<strong>{record.total&&record.total.totalAmount||'--'}</strong>;</span>):('')}
                   {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.lossAmount ? (<span>优惠金额:<strong>{record.total.lossAmount}</strong>;</span>):('')}
-                  {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount>0 ? (<span>采购额结余:<strong>{_this.toThousands(record.total.cgejyAmount)}</strong>;</span>):('')}
-                  {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount<0 ? (<span>采购额超出:<strong>{_this.toThousands(record.total.cgeccAmount)}</strong>;</span>):('')}
-                  {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.totalPromoGiftsAmount ? (<span>促销产品转采购额金额:<strong>{record.total&&record.total.totalPromoGiftsAmount||'--'}</strong>;</span>):('')}
+                  {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount>0&&!isBuyPSendP ? (<span>采购额结余:<strong>{_this.toThousands(record.total.cgejyAmount)}</strong>;</span>):('')}
+                  {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.cgejyAmount<0&&!isBuyPSendP ? (<span>采购额超出:<strong>{_this.toThousands(record.total.cgeccAmount)}</strong>;</span>):('')}
+                  {_this.$hasPermissions('B_salesEdit_salesPrice')&&record.promo&&record.total&&record.total.totalPromoGiftsAmount&&isBuyPSendP ? (<span>促销产品转采购额金额:<strong>{record.total&&record.total.totalPromoGiftsAmount||'--'}</strong>;</span>):('')}
                   {record.expenseAccountFlag!='WAIT' ? record.expenseAccountFlagDictValue : ''}
                 </div>
               </div>
@@ -542,7 +543,7 @@ export default {
           }
           
           // 库存为0或待下推数为0,不可添加
-          if(!item.unpushedQty || item.unpushedQty<0 || isTjRow){
+          if(!item.convertPromoGiftsQty && (!item.unpushedQty || item.unpushedQty<0) || isTjRow){
             this.disableSelectedRowKeys.push(item.id)
           }
         })