Ver Fonte

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

chenrui há 1 ano atrás
pai
commit
8ad8467228

BIN
public/templ/费用明细模板.xlsx


+ 1 - 1
src/views/expenseManagement/expenseReimbursement/importGuideModal.vue

@@ -90,7 +90,7 @@ export default {
         savePathType: 'local'
       },
       exportLoading: false,
-      filePath: location.protocol + '//' +location.host + '/templ/费用明细模板.xlsx'
+      filePath: location.protocol + '//' +location.host + '/templ/费用明细模板.xlsx' + '?a=' + new Date().getTime()
     }
   },
   methods: {

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

@@ -106,7 +106,7 @@
           showTableHead: true,
           colspanNums: 13,
           hasOutStockOfActive: false,
-          simpleImage: Empty.PRESENTED_IMAGE_SIMPLE
+          simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
         }
       },
       computed: {
@@ -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>

+ 6 - 3
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -15,9 +15,12 @@
                   购买门槛产品金额{{ descDetail.gateValue*100 }}%作为配额
                 </span>
                 <span v-else-if="descDetail.gateType==='MIN_AMOUNT'">
-                  购买门槛产品满最低金额{{ descDetail.gateValue }}不限制配额。
+                  购买门槛产品满最低金额{{ descDetail.gateValue }}元,不限制配额
+                </span>
+                <span v-else>
+                  <span v-if="descDetail.promotionRuleType!='PROMO_PROD'">购买满{{ descDetail.gateValue }}元门槛产品,可使用 {{ descDetail.quotaAmount }}元配额,采购规则中的正价商品</span>
+                  <span v-else>购买每满{{ descDetail.gateValue }}{{ descDetail.regularUnit==='YUAN'?'元':'个' }}门槛产品,可采购{{ descDetail.quotaAmount }}个特价产品</span>
                 </span>
-                <span v-else>购买满{{ descDetail.gateValue }}元门槛产品,可使用 {{ descDetail.quotaAmount }}元配额,采购规则中的{{ descDetail.promotionRuleType == 'PROMO_PROD'?'特价':'正价' }}商品</span>
               </div>
               <span v-else>无</span>
             </div>
@@ -364,7 +367,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) {

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

@@ -95,7 +95,7 @@
         <span v-if="$hasPermissions('B_salesDispatch_salesPrice')">已取消金额:<strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? toThousands(detailData.totalCancelAmount) : '--' }}</strong>;</span>
         <span v-if="$hasPermissions('B_salesDispatch_salesPrice')">已下推金额:<strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? toThousands(detailData.totalPushedAmount) :'--' }}</strong>;</span>
         <span v-if="$hasPermissions('B_salesDispatch_salesPrice')">待下推金额:<strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? toThousands(detailData.totalUnpushedAmount) : '--' }}</strong>;</span>
-        <span v-if="$hasPermissions('B_salesDispatch_salesPrice')&&detailData&&detailData.totalConvertPromoGiftsAmount">促销产品转采购额金额:<strong>{{ toThousands(detailData.totalConvertPromoGiftsAmount) }}</strong>;</span>
+        <span v-if="$hasPermissions('B_salesDispatch_salesPrice')&&detailData&&detailData.totalConvertPromoGiftsAmount" style="color:red;">促销产品转采购额金额:<strong>{{ toThousands(detailData.totalConvertPromoGiftsAmount) }}</strong>;</span>
       </div>
     </div>
     
@@ -263,7 +263,7 @@ export default {
                     <div>
                         <span style="padding-right: 15px;">{data}</span>
                         {ftext?(<a-badge count={ftext} number-style={{ backgroundColor: fcolor, zoom:'80%' }}></a-badge>):''}
-                        {record.convertPromoGiftsQty?(<a-badge count="转" number-style={{ backgroundColor: '#ffaa00', zoom:'80%' }}></a-badge>):''}
+                        {record.bakConvertPromoGiftsQty?(<a-badge count="转" number-style={{ backgroundColor: '#ffaa00', zoom:'80%' }}></a-badge>):''}
                         {Number(record.stockQty||0) < Number(record.unpushedQty||0)?(<a-badge count="缺" number-style={{ zoom:'80%' }}></a-badge>):''}
                     </div>
                 )
@@ -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>
@@ -541,8 +542,10 @@ export default {
             item.maxConvertNums = 0
           }
           
+          item.bakConvertPromoGiftsQty = item.convertPromoGiftsQty
+          
           // 库存为0或待下推数为0,不可添加
-          if(!item.unpushedQty || item.unpushedQty<0 || isTjRow){
+          if(!item.convertPromoGiftsQty && (!item.unpushedQty || item.unpushedQty<0) || isTjRow){
             this.disableSelectedRowKeys.push(item.id)
           }
         })