Преглед на файлове

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

chenrui преди 1 година
родител
ревизия
e09055d7f4

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


+ 4 - 2
src/views/salesManagement/salesQueryNew/comps/activeQueryPart.vue

@@ -257,6 +257,8 @@ export default {
       this.queryParam.dealerLevel = data.buyerLevel
       this.queryParam.promoRuleSn = promo.promoRuleSn
       this.queryParam.salesPromoSn = promo.salesPromoSn
+      // 是否是买产品送产品
+      const isMcpScge = promo.promotionRule&&promo.promotionRule.convertExpenseFlag==1&&promo.promotionRule.promotionRuleType=='BUY_PROD_GIVE_PROD'
       
       const tabList = []
       if(this.promoRuleData){ 
@@ -266,8 +268,8 @@ export default {
         if(this.promoRuleData.promotionRuleType!='PROMO_PROD'){
           tabList.push({text:'正价产品',val:'REGULAR'})
         }
-        if(this.promoRuleData.regularPromotionSameFlag==='0'||this.promoRuleData.scopeFlag==='0'||(this.promoRuleData.promotionRuleType=='BUY_PROD_GIVE_MONEY'&&this.promoRuleData.scopeFlag==='1')){
-          const levelText = promo.countData.scopeLevelFlag ? '(阶梯'+promo.countData.scopeLevel+')' : ''
+        if(this.promoRuleData.regularPromotionSameFlag==='0'||this.promoRuleData.scopeFlag==='0'||isMcpScge){
+          const levelText = promo.countData.scopeLevelFlag && isMcpScge ? '(阶梯'+promo.countData.scopeLevel+')' : ''
           tabList.push({text:'促销产品'+ levelText ,val:'GIFT'})
         }
         if(this.promoRuleData.promotionRuleType=='PROMO_PROD'){

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

@@ -134,7 +134,7 @@
                     <div>
                         <span style="padding-right: 15px;">{data}</span>
                         {ftext?(<a-badge count={ftext} number-style={{ backgroundColor: fcolor, zoom:'80%' }}></a-badge>):''}
-                        {record.convertPromoGiftsFlag == '1'?(<a-badge count="转" number-style={{ backgroundColor: '#ffaa00', zoom:'80%' }}></a-badge>):''}
+                        {record.convertPromoGiftsQty?(<a-badge count="转" number-style={{ backgroundColor: '#ffaa00', zoom:'80%' }}></a-badge>):''}
                         {(Number(record.stockQty||0) < Number(record.unpushedQty||0)) && _this.showStock?(<a-badge count="缺" number-style={{ zoom:'80%' }}></a-badge>):''}
                     </div>
                 )

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

@@ -7,27 +7,21 @@
           {{ descDetail.promotionRuleTypeDictValue||'--' }}
         </a-col>
         <a-col span="18" style="padding: 6px;">
-          <div style="display: flex;">
-            <span>促销门槛:</span>
-            <div v-if="descDetail.gateFlag === '1'">
-              <span v-if="descDetail.gateType==='RATIO_AMOUNT'">
-                购买门槛产品金额{{ descDetail.gateValue*100 }}%作为配额
-              </span>
-              <span v-else-if="descDetail.gateType==='MIN_AMOUNT'">
-                购买门槛产品满最低金额{{ descDetail.gateValue }}不限制配额。
-              </span>
-              <span v-else>购买满{{ descDetail.gateValue }}元门槛产品,可使用 {{ descDetail.quotaAmount }}元配额,采购规则中的{{ descDetail.promotionRuleType == 'PROMO_PROD'?'特价':'正价' }}商品</span>
-            </div>
-            <span v-else>无</span>
-          </div>
-        </a-col>
-        <a-col span="24" style="padding: 6px;">
           <div style="display: flex;">
             <div style="display: flex;">
-              <span>促销规则:</span>
-              <div class="ruleInfo" v-html="descDetail.ruleInfo"></div>
+              <span>促销门槛:</span>
+              <div v-if="descDetail.gateFlag === '1'">
+                <span v-if="descDetail.gateType==='RATIO_AMOUNT'">
+                  购买门槛产品金额{{ descDetail.gateValue*100 }}%作为配额
+                </span>
+                <span v-else-if="descDetail.gateType==='MIN_AMOUNT'">
+                  购买门槛产品满最低金额{{ descDetail.gateValue }}不限制配额。
+                </span>
+                <span v-else>购买满{{ descDetail.gateValue }}元门槛产品,可使用 {{ descDetail.quotaAmount }}元配额,采购规则中的{{ descDetail.promotionRuleType == 'PROMO_PROD'?'特价':'正价' }}商品</span>
+              </div>
+              <span v-else>无</span>
             </div>
-            <div style="display: flex;flex-grow: 1;">
+            <div style="display: flex;">
               <div v-if="descDetail.promotionRuleType!='PROMO_PROD'&&descDetail.promotionRuleType!='BUY_PROD_GIVE_MONEY'">
                 <span style="margin-left: 50px;">限制正价产品款数:</span>{{ descDetail.restrictCategory||'无' }}
               </div>
@@ -38,6 +32,12 @@
             </div>
           </div>
         </a-col>
+        <a-col span="24" style="padding: 6px;">
+          <div style="display: flex;">
+            <span>促销规则:</span>
+            <div class="ruleInfo" v-html="descDetail.ruleInfo"></div>
+          </div>
+        </a-col>
       </a-row>
     </div>
     <!-- 筛选条件 -->
@@ -179,9 +179,9 @@
       <!-- 折扣 -->
       <template slot="discountPrice" slot-scope="text, record">
         <div v-if="record.promotionFlag=='DISCOUNT'&&detailData">
-          <span v-if="detailData.buyerLevel=='PROVINCE'">{{ record.provinceDiscount*100 }}%</span>
-          <span v-if="detailData.buyerLevel=='CITY'">{{ record.cityDiscount*100 }}%</span>
-          <span v-if="detailData.buyerLevel=='SPECIAL'">{{ record.specialDiscount*100 }}%</span>
+          <span v-if="detailData.buyerLevel=='PROVINCE'">{{ ((record.provinceDiscount/record.origPrice)*100).toFixed(2) }}%</span>
+          <span v-if="detailData.buyerLevel=='CITY'">{{ ((record.cityDiscount/record.origPrice)*100).toFixed(2) }}%</span>
+          <span v-if="detailData.buyerLevel=='SPECIAL'">{{ ((record.specialDiscount/record.origPrice)*100).toFixed(2) }}%</span>
         </div>
         <div v-else>--</div>
       </template>

+ 0 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -296,7 +296,6 @@ export default {
       return this.detailData && this.detailData.promoFlag == 1
     },
     showConvertPromoGifts () {
-      console.log('11111111:', this.$refs.productList.showConvertPromoGifts)
       return this.$refs.productList && this.$refs.productList.showConvertPromoGifts
     },
     pageHeight () {

+ 8 - 6
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -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.convertPromoGiftsFlag == '1'?(<a-badge count="转" number-style={{ backgroundColor: '#ffaa00', zoom:'80%' }}></a-badge>):''}
+                        {record.convertPromoGiftsQty?(<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>
                 )
@@ -291,7 +291,7 @@ export default {
       const inputFormat1 = function(record,data,h) {
         if(record.unpushedQty>=0){
           // 已选
-          if(_this.selectedRowKeys.includes(record.id) && record.convertPromoGiftsFlag == 1){
+          if(_this.selectedRowKeys.includes(record.id)){
             return (
               <div>
                 <a-input-number
@@ -522,7 +522,8 @@ export default {
         // 格式化数据
         let f = 0
         this.dataSource.map((item,i) => {
-          if(item.id.indexOf('promo-')>=0){f = f - 1}
+          const isTjRow = item.id.indexOf('promo-')>=0
+          if(isTjRow){f = f - 1}
           item.no = i + 1 + f
           const productCode = (item.productEntity && item.productEntity.code) || (item.dealerProductEntity && item.dealerProductEntity.code)
           const productName = (item.productEntity && item.productEntity.name) || (item.dealerProductEntity && item.dealerProductEntity.name)
@@ -541,9 +542,9 @@ export default {
           }
           
           // 库存为0或待下推数为0,不可添加
-          // if(!item.unpushedQty || item.unpushedQty<0){
-          //   this.disableSelectedRowKeys.push(item.id)
-          // }
+          if(!item.unpushedQty || item.unpushedQty<0 || isTjRow){
+            this.disableSelectedRowKeys.push(item.id)
+          }
         })
         this.showEmpty = this.dataSource.length <= 0
         this.tableData = this.dataSource
@@ -637,6 +638,7 @@ export default {
       }
       const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.stockQty > 0)
       const noStockRow = this.dataSource.filter(item => chooseList.includes(item.id) && !item.stockQty)
+      console.log(noStockRow)
       const obj = []
       const noObj = []
       chooseRow && chooseRow.map(item => {