소스 검색

Merge branch 'develop_yh31' of jianguan-web/jg-ocs-html into pre-release

李磊 1 년 전
부모
커밋
7c46b506fd

+ 7 - 7
src/views/promotionRulesManagement/dealerPromotions/detail.vue

@@ -65,11 +65,11 @@
                 购买门槛产品金额{{ record.gateValue?(record.gateValue*100).toFixed(2) :'0.00' }}%作为配额
               </span>
               <span v-else-if="record.gateType==='MIN_AMOUNT'">
-                购买门槛产品满最低金额{{ record.gateValue }}元,不限制配额
+                购买门槛产品满最低金额{{ toThousands(record.gateValue) }}元,不限制配额
               </span>
               <span v-else>
-                <span v-if="record.promotionRuleType!='PROMO_PROD'">购买满{{ record.gateValue }}元门槛产品,可使用 {{ record.quotaAmount }}元配额,采购规则中的正价商品</span>
-                <span v-else>购买每满{{ record.gateValue }}{{ record.gateUnit==='YUAN'?'元':'个' }}门槛产品,可采购{{ record.quotaAmount }}个特价产品</span>
+                <span v-if="record.promotionRuleType!='PROMO_PROD'">购买满{{ toThousands(record.gateValue) }}元门槛产品,可使用 {{ toThousands(record.quotaAmount) }}元配额,采购规则中的正价商品</span>
+                <span v-else>购买每满{{ record.gateUnit==='YUAN'? toThousands(record.gateValue):record.gateValue }}{{ record.gateUnit==='YUAN'?'元':'个' }}门槛产品,可采购{{ record.quotaAmount }}个特价产品</span>
               </span>
             </div>
             <span v-else>无</span>
@@ -80,18 +80,18 @@
               <div>{{ record.accrualFlag==='1'?'数量叠加;':'' }}{{ record.convertExpenseFlag==='1'?'可转费用报销单;':'' }}</div>
               <div v-if="record.giveRuleList && record.giveRuleList.length>0">
                 <div v-for="item in record.giveRuleList" :key="item.scopeLevel">
-                  {{ record.giveRuleList.length>1?item.scopeLevel+'、' :'' }}{{ item.regularSameFlag==='1'?'同款':'不同款' }}产品,购买满{{ item.regularValue }}{{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ item.promotionValue }}个促销产品;
+                  {{ record.giveRuleList.length>1?item.scopeLevel+'、' :'' }}{{ item.regularSameFlag==='1'?'同款':'不同款' }}产品,购买满{{ item.regularUnit==='YUAN'?toThousands(item.regularValue):item.regularValue }}{{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ item.promotionValue }}个促销产品;
                 </div>
               </div>
               <div v-if="record.restrictFlag==='1'">限制正价产品{{ record.restrictCategory }}款</div>
             </div>
             <div v-else-if="record.promotionRuleType == 'BUY_PROD_GIVE_MONEY'">
               <div v-if="record.giveRuleList&&record.giveRuleList.length>0">
-                <div v-if="record.giveRuleType==='SUM_MONEY'">金额叠加;购买满{{ record.giveRuleList[0].regularValue }}{{ record.giveRuleList[0].regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ record.giveRuleList[0].promotionValue }}元<span v-if="record.giveRuleList[0].regularUnit==='YUAN'">({{ record.giveRuleList[0].regularValue!=0?((record.giveRuleList[0].promotionValue/record.giveRuleList[0].regularValue).toFixed(2)*100).toFixed(2):'0.00' }}%促销品采购额)</span><span v-else>(促销品采购额)</span></div>
+                <div v-if="record.giveRuleType==='SUM_MONEY'">金额叠加;购买满{{ record.giveRuleList[0].regularUnit==='YUAN'?toThousands(record.giveRuleList[0].regularValue):record.giveRuleList[0].regularValue }}{{ record.giveRuleList[0].regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ toThousands(record.giveRuleList[0].promotionValue) }}元<span v-if="record.giveRuleList[0].regularUnit==='YUAN'">({{ record.giveRuleList[0].regularValue!=0?((record.giveRuleList[0].promotionValue/record.giveRuleList[0].regularValue).toFixed(2)*100).toFixed(2):'0.00' }}%促销品采购额)</span><span v-else>(促销品采购额)</span></div>
                 <div v-if="record.giveRuleType==='RATIO' &&record.giveRuleList && record.giveRuleList.length>0 ">
                   <span>按比例;</span>
                   <div v-for="item in record.giveRuleList" :key="item.scopeLevel">
-                    {{ record.giveRuleList.length>1?item.scopeLevel+'、' :'' }}产品购买满{{ item.regularValue }}{{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送正价产品总金额的{{ item.promotionValue.toFixed(2) }}%为促销品采购额
+                    {{ record.giveRuleList.length>1?item.scopeLevel+'、' :'' }}产品购买满{{ item.regularUnit==='YUAN'?toThousands(item.regularValue):item.regularValue }}{{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送正价产品总金额的{{ item.promotionValue.toFixed(2) }}%为促销品采购额
                   </div>
                 </div>
               </div>
@@ -100,7 +100,7 @@
             <div v-else-if="record.promotionRuleType == 'PROMO_PROD'">
               <span v-if="record.discountType ==='0'">手动输入特价</span>
               <span v-else-if="record.discountType ==='1'">各级别价打折;省级折扣{{ record.provinceValue.toFixed(2) }}%,市级折扣{{ record.cityValue.toFixed(2) }}%,特约折扣{{ record.specialValue.toFixed(2) }}%</span>
-              <span v-else>各级别价直降;省级直降{{ record.provinceValue }},市级直降{{ record.cityValue }},特约直降{{ record.specialValue }}</span>
+              <span v-else>各级别价直降;省级直降{{ toThousands(record.provinceValue) }},市级直降{{ toThousands(record.cityValue) }},特约直降{{ toThousands(record.specialValue) }}</span>
             </div>
             <div v-else>--</div>
           </template>

+ 12 - 12
src/views/promotionRulesManagement/dealerPromotions/detailModal.vue

@@ -22,15 +22,15 @@
           {{ form.gateFlag==='1'?'有':'无' }}
           <div v-if="form.gateFlag==='1'">
             <span v-if="form.gateType==='RATIO_AMOUNT'">购买门槛产品金额 {{ form.gateValue?(form.gateValue*100).toFixed(2):'0.00' }}% 作为配额 </span>
-            <span v-if="form.gateType==='MIN_AMOUNT'">购买门槛产品满最低金额 {{ form.gateValue }} 元,不限制配额。</span>
-            <span v-if="form.gateType==='FIXED_AMOUNT'&&form.promotionRuleType !='PROMO_PROD'">购买满 {{ form.gateValue }} 元门槛产品,可使用 {{ form.quotaAmount }} 元配额,采购规则中的正价商品(配额算销售额)</span>
-            <span v-if="form.gateType==='FIXED_AMOUNT'&&form.promotionRuleType ==='PROMO_PROD'">购买每满 {{ form.gateValue }} {{ form.gateUnit==='YUAN'?'元':'个' }}门槛产品,可采购 {{ form.quotaAmount }} 个特价产品(配额算销售额)</span>
+            <span v-if="form.gateType==='MIN_AMOUNT'">购买门槛产品满最低金额 {{ toThousands(form.gateValue) }} 元,不限制配额。</span>
+            <span v-if="form.gateType==='FIXED_AMOUNT'&&form.promotionRuleType !='PROMO_PROD'">购买满 {{ toThousands(form.gateValue) }} 元门槛产品,可使用 {{ toThousands(form.quotaAmount) }} 元配额,采购规则中的正价商品(配额算销售额)</span>
+            <span v-if="form.gateType==='FIXED_AMOUNT'&&form.promotionRuleType ==='PROMO_PROD'">购买每满 {{ form.gateUnit==='YUAN'?toThousands(form.gateValue):form.gateValue }} {{ form.gateUnit==='YUAN'?'元':'个' }}门槛产品,可采购 {{ form.quotaAmount }} 个特价产品(配额算销售额)</span>
           </div>
         </a-form-model-item>
         <!-- 买产品送产品 -->
         <a-form-model-item label="满赠规则" prop="regularSameFlag" v-if="form.promotionRuleType ==='BUY_PROD_GIVE_PROD'">
           <div v-if="form.giveRuleList&&form.giveRuleList.length>0">
-            <div v-for="item in form.giveRuleList" :key="item.scopeLevel">{{ form.giveRuleList.length>1?item.scopeLevel+'、' :'' }}{{ item.regularSameFlag==='1'?'同款':'不同款' }}产品购买满 {{ item.regularValue }} {{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送 {{ item.promotionValue }} 个促销产品</div>
+            <div v-for="item in form.giveRuleList" :key="item.scopeLevel">{{ form.giveRuleList.length>1?item.scopeLevel+'、' :'' }}{{ item.regularSameFlag==='1'?'同款':'不同款' }}产品购买满 {{ item.regularUnit==='YUAN'?toThousands(item.regularValue):item.regularValue }} {{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送 {{ item.promotionValue }} 个促销产品</div>
             <div v-if="form.restrictFlag&&form.restrictFlag==1">限制正价产品{{ form.restrictCategory }}款 </div>
             <div v-if="form.convertExpenseFlag&&form.convertExpenseFlag==1">可转费用报销单</div>
           </div>
@@ -40,10 +40,10 @@
         <a-form-model-item label="满赠规则" prop="regularSameFlag" v-if="form.promotionRuleType ==='BUY_PROD_GIVE_MONEY'">
           <div>{{ form.giveRuleType==='SUM_MONEY'?'金额叠加':'按比例' }}</div>
           <div v-if="form.giveRuleList&&form.giveRuleList.length>0">
-            <div v-if="form.giveRuleType==='SUM_MONEY'">购买满{{ form.giveRuleList[0].regularValue }}{{ form.giveRuleList[0].regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ form.giveRuleList[0].promotionValue }}元<span>({{ form.giveRuleList[0].regularUnit==='YUAN'?perCentNum+'%':'' }}促销品采购额)</span></div>
+            <div v-if="form.giveRuleType==='SUM_MONEY'">购买满{{ form.giveRuleList[0].regularUnit==='YUAN'?toThousands(form.giveRuleList[0].regularValue):form.giveRuleList[0].regularValue }}{{ form.giveRuleList[0].regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ toThousands(form.giveRuleList[0].promotionValue) }}元<span>({{ form.giveRuleList[0].regularUnit==='YUAN'?perCentNum+'%':'' }}促销品采购额)</span></div>
             <div v-if="form.giveRuleType==='RATIO' &&form.giveRuleList && form.giveRuleList.length>0 ">
               <div v-for="item in form.giveRuleList" :key="item.scopeLevel">
-                {{ form.giveRuleList.length>1?item.scopeLevel+'、' :'' }}产品购买满{{ item.regularValue }}{{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送正价产品总金额的{{ item.promotionValue?item.promotionValue.toFixed(2):'0.00' }}%为促销品采购额
+                {{ form.giveRuleList.length>1?item.scopeLevel+'、' :'' }}产品购买满{{ item.regularUnit==='YUAN'?toThousands(item.regularValue):item.regularValue }}{{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送正价产品总金额的{{ item.promotionValue?item.promotionValue.toFixed(2):'0.00' }}%为促销品采购额
               </div>
             </div>
           </div>
@@ -294,9 +294,9 @@ export default {
         ]
       } else if (_this.form.discountType === '2') {
         arr = [
-          { title: '省价直降', dataIndex: 'provinceValue', width: '33%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '市价直降', dataIndex: 'cityValue', width: '33%', align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '特约直降', dataIndex: 'specialValue', width: '33%', align: 'center', customRender: function (text) { return text || '--' } }
+          { title: '省价直降', dataIndex: 'provinceValue', width: '33%', align: 'center', customRender: function (text) { return _this.toThousands(text) || '--' } },
+          { title: '市价直降', dataIndex: 'cityValue', width: '33%', align: 'center', customRender: function (text) { return _this.toThousands(text) || '--' } },
+          { title: '特约直降', dataIndex: 'specialValue', width: '33%', align: 'center', customRender: function (text) { return _this.toThousands(text) || '--' } }
         ]
       }
       return arr
@@ -323,9 +323,9 @@ export default {
         arr.splice(8, 0, { title: '市级折扣', dataIndex: 'cityDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text.toFixed(2) + '%') : '--') } })
         arr.splice(11, 0, { title: '特约折扣', dataIndex: 'specialDiscountRate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? (text.toFixed(2) + '%') : '--') } })
       } else {
-        arr.splice(5, 0, { title: '省价直降金额', dataIndex: 'provinceSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + text) : '--') } })
-        arr.splice(8, 0, { title: '市价直降金额', dataIndex: 'citySubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + text) : '--') } })
-        arr.splice(11, 0, { title: '特约直降金额', dataIndex: 'specialSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + text) : '--') } })
+        arr.splice(5, 0, { title: '省价直降金额', dataIndex: 'provinceSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + _this.toThousands(text)) : '--') } })
+        arr.splice(8, 0, { title: '市价直降金额', dataIndex: 'citySubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + _this.toThousands(text)) : '--') } })
+        arr.splice(11, 0, { title: '特约直降金额', dataIndex: 'specialSubtract', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? ('-' + _this.toThousands(text)) : '--') } })
       }
       return arr
     }

+ 4 - 4
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -443,14 +443,14 @@ export default {
             if (form.gateType === 'RATIO_AMOUNT') {
               form.gateInfo = '购买门槛产品金额' + (form.gateValue * 100).toFixed(2) + '%作为配额'
             } else if (form.gateType === 'MIN_AMOUNT') {
-              form.gateInfo = '购买门槛产品满最低金额' + form.gateValue + '不限制配额'
+              form.gateInfo = '购买门槛产品满最低金额' + form.gateValue.toFixed(2) + '元,不限制配额'
             } else {
-              form.gateInfo = '购买满' + form.gateValue + '元门槛产品,可使用' + form.quotaAmount + '元配额,采购规则中的正价商品(配额算销售额)'
+              form.gateInfo = '购买满' + form.gateValue.toFixed(2) + '元门槛产品,可使用' + form.quotaAmount.toFixed(2) + '元配额,采购规则中的正价商品(配额算销售额)'
             }
           }
           var newInfo = ''
           if (form.giveRuleType == 'SUM_MONEY') {
-            newInfo = `<span>金额叠加;购买满${_this.fullGiftRuleList[0].regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送${_this.fullGiftRuleList[0].promotionValue}元</span>`
+            newInfo = `<span>金额叠加;购买满${form.regularUnit == 'YUAN' ? (_this.fullGiftRuleList[0].regularValue).toFixed(2) : _this.fullGiftRuleList[0].regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送${(_this.fullGiftRuleList[0].promotionValue).toFixed(2)}元</span>`
             if (form.regularUnit == 'YUAN') {
               newInfo += `<span>(${((_this.fullGiftRuleList[0].promotionValue / _this.fullGiftRuleList[0].regularValue) * 100).toFixed(2)} %促销品采购额)</span>`
             } else {
@@ -459,7 +459,7 @@ export default {
           } else {
             newInfo = '按比例;'
             _this.fullGiftRuleList.forEach((item, i) => {
-              newInfo += `<div>${_this.fullGiftRuleList.length > 1 ? (i * 1 + 1) + '、' : ''}购买满${item.regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送正价产品总金额的${item.promotionValue}%为促销品采购额</div>`
+              newInfo += `<div>${_this.fullGiftRuleList.length > 1 ? (i * 1 + 1) + '、' : ''}购买满${form.regularUnit == 'YUAN' ? item.regularValue.toFixed(2) : item.regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送正价产品总金额的${item.promotionValue.toFixed(2)}%为促销品采购额</div>`
             })
           }
           form.ruleInfo = newInfo

+ 3 - 3
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -483,14 +483,14 @@ export default {
             if (form.gateType === 'RATIO_AMOUNT') {
               form.gateInfo = '购买门槛产品金额' + (form.gateValue * 100).toFixed(2) + '%作为配额'
             } else if (form.gateType === 'MIN_AMOUNT') {
-              form.gateInfo = '购买门槛产品满最低金额' + form.gateValue + '不限制配额'
+              form.gateInfo = '购买门槛产品满最低金额' + form.gateValue.toFixed(2) + '元,不限制配额'
             } else {
-              form.gateInfo = '购买满' + form.gateValue + '元门槛产品,可使用' + form.quotaAmount + '元配额,采购规则中的正价商品(配额算销售额)'
+              form.gateInfo = '购买满' + form.gateValue.toFixed(2) + '元门槛产品,可使用' + form.quotaAmount.toFixed(2) + '元配额,采购规则中的正价商品(配额算销售额)'
             }
           }
           var newInfo = `<div>${form.accrualFlag == '1' ? '数量叠加;' : ''}${form.convertExpenseFlag == '1' ? '可转费用报销单;' : ''}</div>`
           _this.fullGiftRuleList.forEach((item, i) => {
-            newInfo += `<div>${_this.fullGiftRuleList.length > 1 ? (i * 1 + 1) + '、' : ''}${form.regularSameFlag == '1' ? '同款' : '不同款'}产品购买满${item.regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送${item.promotionValue}个促销产品</div>`
+            newInfo += `<div>${_this.fullGiftRuleList.length > 1 ? (i * 1 + 1) + '、' : ''}${form.regularSameFlag == '1' ? '同款' : '不同款'}产品购买满${form.regularUnit == 'YUAN' ? item.regularValue.toFixed(2) : item.regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送${item.promotionValue}个促销产品</div>`
           })
           newInfo += form.restrictFlag == '1' ? `<div>限制正价产品${form.restrictCategory}款</div>` : ''
           form.ruleInfo = newInfo

+ 14 - 12
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -26,14 +26,16 @@
             :maxLength="20"></a-input>
         </a-form-model-item>
         <a-form-model-item label="规则门槛" prop="gateFlag">
-          <a-radio-group v-model="form.gateFlag" button-style="solid" size="small" @change="handleChange">
-            <a-radio-button value="1">
-              有
-            </a-radio-button>
-            <a-radio-button value="0">
-              无
-            </a-radio-button>
-          </a-radio-group>
+          <div class="fixWidthBox">
+            <a-radio-group v-model="form.gateFlag" button-style="solid" size="small" @change="handleChange">
+              <a-radio-button value="1">
+                有
+              </a-radio-button>
+              <a-radio-button value="0">
+                无
+              </a-radio-button>
+            </a-radio-group>
+          </div>
           <div v-if="form.gateFlag && form.gateFlag === '1'">
             <v-select
               size="small"
@@ -442,9 +444,9 @@ export default {
             if (form.gateType === 'RATIO_AMOUNT') {
               form.gateInfo = '购买门槛产品金额' + (form.gateValue * 100).toFixed(2) + '%作为配额'
             } else if (form.gateType === 'MIN_AMOUNT') {
-              form.gateInfo = '购买门槛产品满最低金额' + form.gateValue + '不限制配额'
+              form.gateInfo = '购买门槛产品满最低金额' + (form.gateValue).toFixed(2) + '元,不限制配额'
             } else {
-              form.gateInfo = '购买每满' + form.gateValue + form.gateUnit == 'YUAN' ? '元' : '个' + '门槛产品,可采购' + form.quotaAmount + '个特价产品(配额算销售额)'
+              form.gateInfo = '购买每满' + (form.gateUnit == 'YUAN' ? (form.gateValue).toFixed(2) : form.gateValue) + (form.gateUnit == 'YUAN' ? '元' : '个') + '门槛产品,可采购' + form.quotaAmount + '个特价产品(配额算销售额)'
             }
           }
           if (form.discountType == '0') {
@@ -452,7 +454,7 @@ export default {
           } else if (form.discountType == '1') {
             form.ruleInfo = '各级别价打折;省级折扣' + form.provinceValue.toFixed(2) + '%,市级折扣' + form.cityValue.toFixed(2) + '%,特约折扣' + form.specialValue.toFixed(2) + '%'
           } else {
-            form.ruleInfo = '各级别价直降;省级直降' + form.provinceValue + ',市级直降' + form.cityValue + ',特约直降' + form.specialValue
+            form.ruleInfo = '各级别价直降;省级直降' + form.provinceValue.toFixed(2) + ',市级直降' + form.cityValue.toFixed(2) + ',特约直降' + form.specialValue.toFixed(2)
           }
           _this.spinning = true
           promotionSave(form).then(res => {
@@ -846,7 +848,7 @@ export default {
       max-height: 745px !important;
       overflow-y: scroll !important;
     }
-    .ant-radio-button-wrapper{
+   .fixWidthBox .ant-radio-button-wrapper{
       width:80px;
       text-align: center;
     }

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

@@ -11,16 +11,7 @@
             <div style="display: flex;">
               <span>促销门槛:</span>
               <div v-if="descDetail.gateFlag === '1'">
-                <span v-if="descDetail.gateType==='RATIO_AMOUNT'">
-                  购买门槛产品金额{{ (descDetail.gateValue*100).toFixed(2) }}%作为配额
-                </span>
-                <span v-else-if="descDetail.gateType==='MIN_AMOUNT'">
-                  购买门槛产品满最低金额{{ descDetail.gateValue }}元,不限制配额
-                </span>
-                <span v-else>
-                  <span v-if="descDetail.promotionRuleType!='PROMO_PROD'">购买满{{ descDetail.gateValue }}元门槛产品,可使用 {{ descDetail.quotaAmount }}元配额,采购规则中的正价商品</span>
-                  <span v-else>购买每满{{ descDetail.gateValue }}{{ descDetail.gateUnit==='YUAN'?'元':'个' }}门槛产品,可采购{{ descDetail.quotaAmount }}个特价产品</span>
-                </span>
+                 {{descDetail.gateInfo}}
               </div>
               <span v-else>无</span>
             </div>