lilei 3 days ago
parent
commit
634e4439fc

+ 13 - 0
src/api/promotion.js

@@ -207,6 +207,19 @@ export const downDealerFail = (params) => {
   })
 }
 
+// 导出活动经销商列表
+export const dealerExportAudit = (params) => {
+  return axios({
+    url: '/promotion/dealer/exportAudit',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers:{
+        'module': encodeURIComponent('导出')
+    }
+  })
+}
+
 // 创建人   列表查询
 export const queryCreatorList = (params) => {
   return axios({

+ 2 - 1
src/views/promotionRulesManagement/dealerPromotions/detail.vue

@@ -105,7 +105,8 @@
             <div v-else-if="record.promotionRuleType == 'PROMO_PROD'">
               <div v-if="record.stackFlag==='1' && record.discountType !='0'">规则叠加;</div>
               <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>
+              <div v-else-if="record.discountType ==='1'" v-html="record.ruleInfo">
+              </div>
               <span v-else>各级别价直降;省级直降{{ toThousands(record.provinceValue) }},市级直降{{ toThousands(record.cityValue) }},特约直降{{ toThousands(record.specialValue) }}</span>
               <div v-if="record.borrowTimeLimtType">产品累计:{{ record.borrowTimeLimtTypeDictValue }}{{ record.borrowedShowFlag==='1'?',':'' }}<span v-if="record.borrowedShowFlag==='1'">加盟商显示“转促”标签;</span></div>
             </div>

+ 8 - 9
src/views/promotionRulesManagement/dealerPromotions/lookUpCustomersModal.vue

@@ -31,9 +31,9 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="参与情况">
-                  <a-select id="lookUpCustomers-participationStatus" v-model="queryParam.participationStatus" placeholder="请选择" allowClear>
-                    <a-select-option value="1">未参与</a-select-option>
-                    <a-select-option value="0">已参与</a-select-option>
+                  <a-select id="lookUpCustomers-dealerJoinFlag" v-model="queryParam.dealerJoinFlag" placeholder="请选择" allowClear>
+                    <a-select-option value="0">未参与</a-select-option>
+                    <a-select-option value="1">已参与</a-select-option>
                   </a-select>
                 </a-form-item>
               </a-col>
@@ -124,8 +124,7 @@ import AreaList from '@/views/common/areaList.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import chooseDealer from './chooseDealer'
 // 接口
-import { dealerExport } from '@/api/promoTerminal'
-import { queryAuditPageList, dealerMidwayUpdate } from '@/api/promotion'
+import { queryAuditPageList, dealerMidwayUpdate, dealerExportAudit } from '@/api/promotion'
 export default {
   name: 'LookUpCustomersModal',
   components: { STable, VSelect, subarea, AreaList, chooseDealer },
@@ -166,7 +165,7 @@ export default {
         citySn: undefined, // 市
         districtSn: undefined, // 区
         dealerName: '', // 经销商名称
-        participationStatus: undefined // 参与状态
+        dealerJoinFlag: undefined // 参与状态
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -193,7 +192,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '经销商名称', dataIndex: 'dealerName', scopedSlots: { customRender: 'dealerName' }, width: '20%', align: 'left', ellipsis: true },
-        { title: '活动次数', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '活动次数', dataIndex: 'dealerJoinQty', width: '10%', align: 'center', customRender: function (text) { return text || text == 0 ? text : '--' } },
         { title: '地区', scopedSlots: { customRender: 'address' }, width: '15%', align: 'center', ellipsis: true },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -267,7 +266,7 @@ export default {
         },
         dealerName: '',
         state: undefined,
-        participationStatus: undefined
+        dealerJoinFlag: undefined
       }, this.snObj)
       this.updateFlag = false
       this.$refs.areaList.clearData()
@@ -281,7 +280,7 @@ export default {
       _this.spinning = true
       _this.queryParam.dealerSnList = this.chooseDealerList
       const paramsData = _this.queryParam
-      hdExportExcel(dealerExport, paramsData, '促销经销商列表导出', function () {
+      hdExportExcel(dealerExportAudit, paramsData, '促销经销商列表导出', function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.showExport = true

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

@@ -4,7 +4,7 @@
     class="promotionList-basicInfo-modal"
     :footer="null"
     :maskClosable="false"
-    title="规则设置"
+    title="买产品送采购额-规则设置"
     v-model="isShow"
     @cancel="isShow=false"
     width="70%">

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

@@ -4,7 +4,7 @@
     class="promotionList-modal"
     :footer="null"
     :maskClosable="false"
-    title="规则设置"
+    title="卖产品送产品-规则设置"
     v-model="isShow"
     @cancel="isShow=false"
     width="70%">

+ 39 - 8
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -4,7 +4,7 @@
     class="promotionList-basicInfo-modal"
     :footer="null"
     :maskClosable="false"
-    title="规则设置"
+    title="特价产品-规则设置"
     v-model="isShow"
     @cancel="isShow=false"
     width="83%">
@@ -498,6 +498,7 @@ export default {
               return
             }
           }
+          console.log(_this.form)
           // 验证表格必填项
           const form = JSON.parse(JSON.stringify(_this.form))
           if (form.gateFlag === '1') {
@@ -524,6 +525,7 @@ export default {
           if (_this.isJudge(form.specialProductList, '特价')) {
             return
           }
+          console.log(form)
           // 校验产品折扣手动输入必填项
           if (form.discountType === '0') {
             const isCountEmpty = _this.isNumEmpty(form.specialProductList)
@@ -535,11 +537,24 @@ export default {
               _this.$message.warning('折扣金额不能为空!')
               return
             }
-          } else {
+          } else if (form.discountType === '2') { // 直降
             form.provinceValue = _this.setTableData[0].provinceValue
             form.cityValue = _this.setTableData[0].cityValue
             form.specialValue = _this.setTableData[0].specialValue
+          } else {
+            console.log(form)
+            // 折扣
+            form.specialDiscountList = _this.setTableData.map((item, index) => {
+              return {
+                scopeLevel: index + 1,
+                discountScopePrice: item.orginAmountValue,
+                provinceDiscountRate: item.provinceValue,
+                cityDiscountRate: item.cityValue,
+                specialDiscountRate: item.specialValue
+              }
+            })
           }
+          console.log(form)
           // 组后端所需数据
           form.promotionSn = _this.promotionSn
           // 门槛描述
@@ -557,12 +572,16 @@ export default {
           if (form.discountType == '0') {
             infoDetail += '手动输入特价'
           } else if (form.discountType == '1') {
-            infoDetail += '各级别价打折;省级折扣' + form.provinceValue.toFixed(2) + '%,市级折扣' + form.cityValue.toFixed(2) + '%,特约折扣' + form.specialValue.toFixed(2) + '%'
+            infoDetail += '各级别价打折;'
+            form.specialDiscountList.forEach(item => {
+              infoDetail += '阶梯' + item.scopeLevel + ':' + '原价:' + item.discountScopePrice + ',省级折扣' + item.provinceDiscountRate + '%,市级折扣' + item.cityDiscountRate + '%,特约折扣' + item.specialDiscountRate + '%;'
+            })
           } else {
             infoDetail += '各级别价直降;省级直降' + form.provinceValue.toFixed(2) + ',市级直降' + form.cityValue.toFixed(2) + ',特约直降' + form.specialValue.toFixed(2)
           }
           infoDetail += `<div>${form.borrowTimeLimtType ? '产品累计:' + (form.borrowTimeLimtType == 'LENGTH_YEAR' ? '近一年' : '本年度') : ''}${form.borrowedShowFlag === '1' ? ',加盟商显示“转促”标签;' : ''}</div>`
           form.ruleInfo = infoDetail
+          console.log(form)
           _this.spinning = true
           promotionSave(form).then(res => {
             if (res.status == 200) {
@@ -654,11 +673,23 @@ export default {
             resultObj.gateValue = resultObj.gateType === 'RATIO_AMOUNT' ? resultObj.gateValue * 100 : resultObj.gateValue
           }
           if (resultObj.discountType != '0') {
-            _this.setTableData = [{
-              provinceValue: resultObj.provinceValue,
-              cityValue: resultObj.cityValue,
-              specialValue: resultObj.specialValue
-            }]
+            if (resultObj.discountType == '1' && resultObj.specialDiscountList) {
+              _this.setTableData = resultObj.specialDiscountList.map(item => {
+                return {
+                  orginAmountValue: item.discountScopePrice,
+                  provinceValue: item.provinceDiscountRate,
+                  cityValue: item.cityDiscountRate,
+                  specialValue: item.specialDiscountRate,
+                  scopeLevel: item.scopeLevel
+                }
+              })
+            } else {
+              _this.setTableData = [{
+                provinceValue: resultObj.provinceValue,
+                cityValue: resultObj.cityValue,
+                specialValue: resultObj.specialValue
+              }]
+            }
           }
           // 重新组成保存数据
           if (resultObj.gateProductList && resultObj.gateProductList.length > 0) {

+ 35 - 39
src/views/promotionRulesManagement/dealerPromotions/tableType1.vue

@@ -13,9 +13,9 @@
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record,index">
-        <div style="max-height:126px;width:100%;overflow-y:scroll;" v-if="!record.productThisList || record.productThisList.length==0">
-          <a-row v-if="record.productTypeArr && record.productTypeArr.length>0">
-            <a-col :span="18">
+        <div v-if="!record.productThisList || record.productThisList.length==0">
+          <div style="display: flex;align-items: center;" v-if="record.productTypeArr && record.productTypeArr.length>0">
+            <div style="max-height:126px;overflow-y:auto;flex-grow: 1;display: flex;flex-wrap: wrap;" >
               <div v-for="con in record.productTypeArr" :key="con.id">
                 <a-tooltip v-if="con.title&&con.title.length > 12" :title="con.title">
                   <a-tag style="margin-bottom:10px;" closable :id="'tableType-delType'+record.productScopeSn" @close.prevent="delLabel(record.productScopeSn,con,'typeList')">
@@ -26,32 +26,30 @@
                   {{ con.title }}
                 </a-tag>
               </div>
-            </a-col>
-            <a-col :span="6" style="text-align:right;">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
-                <a-icon type="plus" />
-              </a-tag>
-            </a-col>
-          </a-row>
-          <a-row v-else>
-            <a-col :span="24">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
+            </div>
+            <div style="text-align:center;padding-left:10px;">
+              <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加分类" :id="'tableType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
-            </a-col>
-          </a-row>
+            </div>
+          </div>
+          <div v-else>
+            <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加分类" :id="'tableType-addType'+record.productScopeSn" @click="addClassifyTag(index, record)" color="blue">
+              <a-icon type="plus" />
+            </a-tag>
+          </div>
         </div>
         <div v-else>
-          <a-tag style="background: #fff; borderStyle: dashed;" :style="{color:'grey',cursor:'not-allowed'}">
+          <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加分类" :style="{color:'grey',cursor:'not-allowed'}">
             <a-icon type="plus" />
           </a-tag>
         </div>
       </template>
       <!-- 品牌 -->
       <template slot="productBrand" slot-scope="text, record,index">
-        <div style="max-height:126px;overflow-y:scroll;" v-if="!record.productThisList || record.productThisList.length==0">
-          <a-row v-if="record.productBrandArr && record.productBrandArr.length>0">
-            <a-col :span="18">
+        <div v-if="!record.productThisList || record.productThisList.length==0">
+          <div style="display: flex;align-items: center;" v-if="record.productBrandArr && record.productBrandArr.length>0">
+            <div :span="20" style="max-height:126px;overflow-y:auto;flex-grow: 1;display: flex;flex-wrap: wrap;">
               <a-tag
                 v-for="item in record.productBrandArr"
                 :key="item.brandSn"
@@ -61,23 +59,21 @@
                 @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
                 {{ item.brandName }}
               </a-tag>
-            </a-col>
-            <a-col :span="6" style="text-align:right;">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
-                <a-icon type="plus" />
-              </a-tag>
-            </a-col>
-          </a-row>
-          <a-row v-else>
-            <a-col :span="24">
-              <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
+            </div>
+            <div :span="4" style="text-align:center;padding-left:10px;">
+              <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加品牌" :id="'tableType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
-            </a-col>
-          </a-row>
+            </div>
+          </div>
+          <div v-else>
+            <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加品牌" :id="'tableType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
+              <a-icon type="plus" />
+            </a-tag>
+          </div>
         </div>
         <div v-else>
-          <a-tag style="background: #fff; borderStyle: dashed;" :style="{color:'grey',cursor:'not-allowed'}">
+          <a-tag style="background: #fff; borderStyle: dashed;cursor:pointer" title="添加品牌" :style="{color:'grey',cursor:'not-allowed'}">
             <a-icon type="plus" />
           </a-tag>
         </div>
@@ -91,7 +87,7 @@
         </div>
         <div style="max-height:126px;overflow-y:scroll;" v-else>
           <a-row v-if="record.productThisList && record.productThisList.length>0">
-            <a-col :span="18">
+            <a-col :span="20">
               <a-tag
                 style="margin-bottom:10px;"
                 closable
@@ -102,7 +98,7 @@
                 {{ item.productCode }}
               </a-tag>
             </a-col>
-            <a-col :span="6" style="text-align:right;">
+            <a-col :span="4" style="text-align:right;">
               <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableType-addProduct'+record.productScopeSn" @click="addProductTag(index, record)" color="blue">
                 <a-icon type="plus" />
               </a-tag>
@@ -205,11 +201,11 @@ export default {
     return {
       spinning: false,
       columns: [
-        { title: '产品分类', width: '27%', scopedSlots: { customRender: 'productType' }, align: 'center' },
-        { title: '品牌', width: '27%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
-        { title: '产品', width: '27%', scopedSlots: { customRender: 'product' }, align: 'center' },
-        { title: '设置起订量', width: '11%', scopedSlots: { customRender: 'setNum' }, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+        { title: '产品分类', width: '35%', scopedSlots: { customRender: 'productType' }, align: 'center' },
+        { title: '品牌', width: '25%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
+        { title: '产品', width: '30%', scopedSlots: { customRender: 'product' }, align: 'center' },
+        { title: '设置起订量', width: '7%', scopedSlots: { customRender: 'setNum' }, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '3%', align: 'center' }
       ],
       dataSource: [], // 列表数据
       openBrandModal: false, // 打开产品品牌弹窗

+ 7 - 8
src/views/promotionRulesManagement/dealerPromotions/tableType3.vue

@@ -13,7 +13,7 @@
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record,index">
-        <div style="max-height:126px;width:100%;overflow-y:scroll;" v-if="record.dataSourceOrigin=='0'">
+        <div style="max-height:126px;width:100%;overflow-y:auto;" v-if="record.dataSourceOrigin=='0'">
           <a-row v-if="record.productTypeArr && record.productTypeArr.length>0">
             <a-col :span="17">
               <div v-for="con in record.productTypeArr" :key="con.id">
@@ -45,9 +45,9 @@
       </template>
       <!-- 品牌 -->
       <template slot="productBrand" slot-scope="text, record,index">
-        <div style="max-height:126px;overflow-y:scroll;" v-if="record.dataSourceOrigin=='0'">
+        <div v-if="record.dataSourceOrigin=='0'">
           <a-row v-if="record.productBrandArr && record.productBrandArr.length>0">
-            <a-col :span="17">
+            <a-col :span="18" style="max-height:126px;width:100%;overflow-y:auto;">
               <div v-for="item in record.productBrandArr" :key="item.brandSn">
                 <a-tooltip v-if="item.brandName&&item.brandName.length > 7" :title="item.brandName">
                   <a-tag style="margin-bottom:10px;" :id="'tableaaType-delBrand'+record.productScopeSn" closable @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
@@ -59,7 +59,6 @@
                 </a-tag>
               </div>
             </a-col>
-
             <a-col :span="6" style="text-align:right;">
               <a-tag style="background: #fff; borderStyle: dashed;" :id="'tableaaType-addBrand'+record.productScopeSn" @click="addBrandTag(index, record)" color="blue">
                 <a-icon type="plus" />
@@ -332,8 +331,8 @@ export default {
     columns () {
       const _this = this
       var arr = [
-        { title: '产品分类', width: '16%', scopedSlots: { customRender: 'productType' }, align: 'center' },
-        { title: '品牌', width: '16%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
+        { title: '产品分类', width: '17%', scopedSlots: { customRender: 'productType' }, align: 'center' },
+        { title: '品牌', width: '17%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
         { title: '产品', scopedSlots: { customRender: 'product' }, width: '10%', align: 'center' },
         { title: '省级原价', dataIndex: 'provincePrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '省级特价', scopedSlots: { customRender: 'provincePrice' }, width: '5%', align: 'center' },
@@ -344,8 +343,8 @@ export default {
         { title: '特约原价', dataIndex: 'specialPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '特约特价', scopedSlots: { customRender: 'specialPrice' }, width: '5%', align: 'center' },
         // { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '5%', align: 'center' },
-        { title: '设置起订量', width: '7%', scopedSlots: { customRender: 'setNum' }, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+        { title: '设置起订量', width: '6%', scopedSlots: { customRender: 'setNum' }, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
       ]
       if (_this.rulesType === '0' || _this.rulesType === '1') {
         arr.splice(5, 0, { title: '省级折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '5%', align: 'center' })

+ 0 - 893
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -1,893 +0,0 @@
-<template>
-  <div>
-    <div class="table-page-search-wrapper" v-show="showDescBox">
-      <a-row v-if="descDetail" type="flex" justify="start">
-        <a-col span="6" style="padding: 6px;">
-          <span>促销类型:</span>
-          {{ descDetail.promotionRuleTypeDictValue||'--' }}
-        </a-col>
-        <a-col span="18" style="padding: 6px;">
-          <div style="display: flex;">
-            <div style="display: flex;">
-              <span>促销门槛:</span>
-              <div v-if="descDetail.gateFlag === '1'">
-                {{ descDetail.gateInfo }}
-              </div>
-              <span v-else>无</span>
-            </div>
-            <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>
-              <div>
-                <span style="margin-left: 50px;">订单起订金额(元):</span>{{ descDetail.minOrderAmount||'无' }}
-                <span style="margin-left: 50px;">活动经费上限(元):</span>{{ descDetail.upperLimitAmount||'无' }}
-              </div>
-            </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>
-    <!-- 筛选条件 -->
-    <div class="table-page-search-wrapper" style="margin:0" v-show="showSearchBox">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
-            <a-form-item label="出库仓库" prop="warehouseSn">
-              <chooseWarehouse :id="'salesEdit-warehouseSn-'+id" ref="warehouse" v-model="queryParam.warehouseSn" @load="warehouseLoad"></chooseWarehouse>
-            </a-form-item>
-          </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-item label="产品编码" prop="productCode">
-              <a-input :id="'salesEdit-productCode-'+id" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-            </a-form-item>
-          </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-item label="产品名称" prop="productName">
-              <a-input :id="'salesEdit-productName-'+id" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
-            </a-form-item>
-          </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-item label="品牌">
-              <ProductBrand :id="'salesEdit-productBrandSn-'+id" v-model="queryParam.productBrandSn"></ProductBrand>
-            </a-form-item>
-          </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-item label="产品分类">
-              <productTypeAll :id="'salesEdit-productType-'+id" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></productTypeAll>
-            </a-form-item>
-          </a-col>
-          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" :id="'salesEdit-refresh-'+id">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" :id="'salesEdit-reset-'+id">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-
-    <div class="table-page-search-wrapper">
-      <a-row :gutter="15" type="flex" justify="space-between" align="middle">
-        <a-col :md="8" :sm="24" style="text-align:left;">
-          <span v-if="selectTotal" style="margin-right:5px;">已选{{ selectTotal }}项</span>
-        </a-col>
-        <a-col :md="12" :sm="24" style="text-align:right;">
-          <a-button
-            :id="'salesEdit-searchBox-'+id"
-            type="link"
-            class="button-info"
-            @click="showSearchBox=!showSearchBox" ><a-icon :type="showSearchBox?'close':'search'"/> 筛选</a-button>
-          <!-- // 操作按钮 -->
-          <!-- <a-button type="link" class="button-info" @click="searchThreeStock" id="salesEdit-updateStock"><a-icon type="redo"/>第三方库存</a-button> -->
-          <a-dropdown>
-            <a-menu slot="overlay" @click="handleMenuClick" :id="'salesEdit-menu-'+id">
-              <a-menu-item key="3" :disabled="disablePromo" :id="'salesEdit-menu-3-'+id">
-                全部仓库设置
-              </a-menu-item>
-              <a-menu-item key="0" :disabled="disablePromo" :id="'salesEdit-menu-0-'+id">
-                部分仓库设置
-              </a-menu-item>
-              <a-menu-divider />
-              <a-menu-item key="1" :id="'salesEdit-menu-1-'+id">
-                删除已选项
-              </a-menu-item>
-              <a-menu-item key="2" :id="'salesEdit-menu-2-'+id">
-                全部删除
-              </a-menu-item>
-              <a-menu-divider />
-              <a-menu-item key="4" :disabled="disablePromo" :id="'salesEdit-menu-4-'+id">
-                批量取消促销
-              </a-menu-item>
-            </a-menu>
-            <a-button
-              :id="'salesEdit-plaction-'+id"
-              type="link"
-              class="button-info"
-            > 批量操作 <a-icon type="down" /> </a-button>
-          </a-dropdown>
-          <!-- 导入操作 -->
-          <a-dropdown :disabled="disablePromo">
-            <a-menu slot="overlay" @click="handleImportClick" :id="'salesEdit-menu-import-'+id">
-              <a-menu-item :id="'salesEdit-menu-import-gate-'+id" key="GATE" v-if="promo&&promo.promotionRule&&promo.promotionRule.gateFlag==='1'">
-                导入门槛产品
-              </a-menu-item>
-              <a-menu-item :id="'salesEdit-menu-import-regular-'+id" key="REGULAR" v-if="promo&&promo.promotionRule&&promo.promotionRule.promotionRuleType!='PROMO_PROD'">
-                导入正价产品
-              </a-menu-item>
-              <a-menu-item :id="'salesEdit-menu-import-gift-'+id" key="GIFT" v-if="promo&&promo.promotionRule&&(promo.promotionRule.regularPromotionSameFlag==='0'||promo.promotionRule.scopeFlag==='0'||(promo.promotionRule.promotionRuleType=='BUY_PROD_GIVE_MONEY'&&promo.promotionRule.scopeFlag==='1'))">
-                导入促销产品
-              </a-menu-item>
-              <a-menu-item :id="'salesEdit-menu-import-discount-'+id" key="DISCOUNT" v-if="promo&&promo.promotionRule&&promo.promotionRule.promotionRuleType=='PROMO_PROD'">
-                导入特价产品
-              </a-menu-item>
-            </a-menu>
-            <a-button
-              :id="'salesEdit-menu-import-plaction-'+id"
-              type="link"
-              :class="disablePromo?'button-gray':'button-info'"
-            > 导入产品 <a-icon type="down" /> </a-button>
-          </a-dropdown>
-          <a-button
-            :id="'salesEdit-menu-newProduct-'+id"
-            type="link"
-            :class="disablePromo?'button-gray':'button-info'"
-            :disabled="disablePromo"
-            @click="openCpModal"><a-icon type="plus" /> 添加产品</a-button>
-        </a-col>
-      </a-row>
-    </div>
-
-    <!-- 已选配件列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :row-selection="{ columnWidth: '4%', getCheckboxProps: record => ({ props: { disabled: record.promotionFlag == 'GIFT'&&!!record.salesPromoDetailParentSn } }) }"
-      @rowSelection="rowSelectionFun"
-      :defaultLoadData="false"
-      :pageSize="10"
-      bordered>
-      <!-- 产品编码 -->
-      <template slot="productCode" slot-scope="text, record">
-        <span style="padding-right: 15px;">{{ text }}</span>
-        <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
-        <!-- <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge> -->
-        <a-badge count="槛" v-if="record.promotionFlag=='GATE'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge>
-        <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)" :number-style="{ zoom:'80%' }"></a-badge>
-      </template>
-      <!-- 产品名称 -->
-      <template slot="productName" slot-scope="text, record">
-        <div class="ellipsisCon">
-          <a-tooltip placement="rightBottom">
-            <template slot="title">
-              <span>{{ text }}</span>
-            </template>
-            <span class="ellipsisText">{{ text }}</span>
-          </a-tooltip>
-          <a-badge :number-style="{ backgroundColor: '#52c41a' }" count="活动" v-if="record.promotableFlag == 1"></a-badge>
-        </div>
-      </template>
-      <!-- 销售价 -->
-      <template slot="price" slot-scope="text, record">
-        {{ toThousands(text) }}
-        <span v-if="record.promotionFlag=='GIFT'||record.promotionFlag=='DISCOUNT'" title="原价">({{ toThousands(record.origPrice) }})</span>
-      </template>
-      <!-- 折扣 -->
-      <template slot="discountPrice" slot-scope="text, record">
-        <div v-if="record.promotionFlag=='DISCOUNT'">
-          <span v-if="record.specialType=='1'">{{ record.priceLevel=='PROVINCE'? (record.provinceDiscount*100).toFixed(2):record.priceLevel=='CITY'?(record.cityDiscount*100).toFixed(2):(record.specialDiscount*100).toFixed(2) }}%</span>
-          <span v-else>{{ ((record.price/record.origPrice)*100).toFixed(2) }}%</span>
-        </div>
-        <div v-else>--</div>
-      </template>
-      <!-- 销售数量 -->
-      <template slot="salesNums" slot-scope="text, record">
-        <a-input-number
-          :id="'salesEdit-qty-'+id+'-'+record.id"
-          v-if="!(record.promotionFlag == 'GIFT'&&record.salesPromoDetailParentSn)"
-          size="small"
-          v-model="record.qty"
-          :precision="0"
-          :min="1"
-          :max="99999999"
-          placeholder="请输入"
-          @blur="e => onCellBlur(e.target.value, record)"
-          :style="{width:'100%',color:record.qty>=record.unitQtyR?'':'red'}" />
-        <span v-else>{{ record.qty }}</span>
-      </template>
-      <!-- 当前库存 -->
-      <template slot="stockQty" slot-scope="text, record">
-        <div v-if="record.stockQty || record.stockQty==0">
-          <p style="margin: 0;" v-if="Number(record.stockQty) < Number(record.unpushedQty)">{{ record.stockQty }}(<span class="redStyle">缺{{ Number(record.unpushedQty||0) - Number(record.stockQty||0) }}</span>)</p>
-          <p style="margin: 0;" v-else>{{ record.stockQty }}</p>
-        </div>
-        <span v-else>--</span>
-      </template>
-      <!-- 出库仓库 -->
-      <template slot="warehouseBox" slot-scope="text, record">
-        <a-select
-          :id="'salesEdit-warehouse-'+id+'-'+record.id"
-          size="small"
-          style="width:100%;"
-          placeholder="请选择仓库"
-          v-model="record.warehouseSn"
-          :showSearch="true"
-          @change="handleWarehouseBox(record)"
-          mode="default"
-          :filter-option="filterOption">
-          <a-select-option v-for="item in warehouseDataList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-        </a-select>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <div>
-          <a-button
-            :id="'salesEdit-del-'+id+'-'+record.id"
-            size="small"
-            type="link"
-            :loading="delLoading"
-            class="button-error"
-            v-if="!(record.promotionFlag == 'GIFT'&&record.salesPromoDetailParentSn)"
-            @click="handleDel(record)"
-          >删除</a-button>
-
-          <a-button
-            :id="'salesEdit-upactive-'+id+'-'+record.id"
-            size="small"
-            type="link"
-            :loading="delLoading"
-            class="button-primary"
-            v-if="record.promotionFlag != 'GIFT'"
-            @click="handleUpdateActive(record)"
-          >换促销</a-button>
-        </div>
-      </template>
-      <template slot="footer" slot-scope="currentPageData">
-        <!-- 总计 -->
-        <a-alert type="info" banner :showIcon="false">
-          <div slot="message" class="alert-bar">
-            <div class="countData" v-html="boldAmounts(countData&&countData.remarks||'')"></div>
-            <div style="display: flex;">
-              <div>
-                款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>
-              </div>
-              <div style="padding: 0 10px;">
-                数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>
-              </div>
-              <div>
-                <div v-if="$hasPermissions('B_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong></div>
-                <div v-if="$hasPermissions('B_salesEdit_salesPrice')&&countData&&countData.lossAmount">优惠金额:<strong>{{ toThousands(countData.lossAmount) }}</strong></div>
-              </div>
-            </div>
-          </div>
-        </a-alert>
-      </template>
-    </s-table>
-
-    <!-- 导入产品 -->
-    <importGuideModal
-      :openModal="openGuideModal"
-      :params="{salesBillSn: $route.params.sn, salesPromoSn: promo.salesPromoSn}"
-      :promoProductClz="promoProductClz"
-      @close="closeGuideModel"
-      @ok="hanldeImportOk" />
-    <!-- 仓库设置 -->
-    <setWarehouse :title="warehouseTit" :show="openWarehouseModal" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
-    <!-- 换促销 -->
-    <updateActiveModal ref="updateActive" :show="openUpActiveModal" @ok="upActiveOk" @cancel="openUpActiveModal=false"></updateActiveModal>
-  </div>
-</template>
-
-<script>
-import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
-import ImportGuideModal from './importGuideModal.vue'
-import setWarehouse from './setWarehouse.vue'
-import updateActiveModal from './updateActiveModal.vue'
-import chooseWarehouse from '@/views/common/chooseWarehouse'
-import ProductBrand from '@/views/common/productBrand.js'
-import productTypeAll from '@/views/common/productTypeAll.js'
-import {
-  salesDetailList,
-  salesPromoDetailCount,
-  salesDetailInsert,
-  salesDetailUpdateQty,
-  salesDetailDel,
-  salesDetailBatchDel,
-  deleteAll,
-  updateWarehouse,
-  salesBatchInsert
-} from '@/api/salesDetailNew'
-
-export default {
-  name: 'ProductList',
-  mixins: [commonMixin],
-  components: {
-    STable,
-    VSelect,
-    // 导入弹框组件
-    ImportGuideModal,
-    chooseWarehouse,
-    setWarehouse, // 设置仓库组件
-    ProductBrand, // 产品品牌组件
-    productTypeAll, // 产品分类组件
-    updateActiveModal// 更换活动弹框组件
-  },
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    },
-    newLoading: Boolean,
-    // 详情数据
-    detailData: {
-      type: Object,
-      default: function () { return null }
-    },
-    // 活动规则数据
-    promo: {
-      type: Object,
-      default: function () { return null }
-    },
-    // 表格id
-    id: {
-      type: String,
-      default: ''
-    },
-    // 仓库sn
-    warehouseSn: {
-      type: String,
-      default: ''
-    },
-    // 销售单sn
-    salesBillSn: {
-      type: String,
-      default: ''
-    }
-  },
-  data () {
-    return {
-      spinning: false,
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        this.disablePromo = this.promo.disabled
-        this.queryParam.salesBillSn = this.salesBillSn || ''
-        this.getCount()
-        return salesDetailList(Object.assign(parameter, this.queryParam, {
-          showStock: true,
-          promoRuleSn: this.promo.promoRuleSn,
-          promoSn: this.promo.promoSn,
-          salesPromoSn: this.promo.salesPromoSn
-        })).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-              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 && 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 {
-                data.list[i].unitQtyV = data.list[i].packQty && data.list[i].unitQty ? ((data.list[i].unitQty + '*' + data.list[i].packQty) + data.list[i].productUnit) : '--'
-                data.list[i].unitQtyR = data.list[i].packQty * data.list[i].unitQty
-              }
-            }
-            this.dataSource = data.list
-          }
-          this.disabled = false
-          return data
-        })
-      },
-      showSearchBox: false, // 是否显示筛选条件
-      showDescBox: false, // 收起展开规则详细
-      openWarehouseModal: false, // 打开仓库设置
-      openGuideModal: false, //  导入产品引导
-      delLoading: false, // 删除logding
-      disabled: false, //  查询、重置按钮是否可操作
-      queryParam: {
-        warehouseSn: undefined, // 仓库
-        productCode: '', // 产品编码
-        productName: '', // 产品名称
-        productBrandSn: undefined, // 产品品牌
-        productTypeSn1: '', //  产品一级分类
-        productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
-      },
-      productType: [], // 已选产品分类
-      rowSelectionInfo: null, // 已选产品数据
-      warehouseDataList: [], // 仓库列表数据
-      openUpActiveModal: false, // 更换促销活动弹框
-      descDetail: null, // 规则详细数据
-      promoProductClz: null, // 活动产品分类
-      disablePromo: false, // 是否禁用活动
-      countData: null, // 统计信息
-      warehouseTit: '', // 仓库设置唐卡标题
-      showStockCol: false // 第三方库存是否显示
-    }
-  },
-  computed: {
-    // 已选产品数量
-    selectTotal () {
-      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
-    },
-    // 表格列
-    columns () {
-      const arr = [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '13%', align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: this.promo.promotionRule.promotionRuleType == 'PROMO_PROD' ? '14%' : '20%', align: 'left' },
-        { title: '起订量', dataIndex: 'unitQtyV', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '6%', align: 'center' },
-        { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '6%', align: 'center' },
-        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '10%', align: 'center' },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
-      ]
-      if (this.showStockCol) {
-        arr.splice(6, 0, { title: '第三方库存', dataIndex: 'thirdStockQty', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
-      }
-      // 售价权限
-      if (this.$hasPermissions('B_salesEdit_salesPrice')) {
-        arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '6%', align: 'right', scopedSlots: { customRender: 'price' } })
-        arr.splice(4, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
-        let idx = 0
-        // 如果是特价活动,显示折扣
-        if (this.promo.promotionRule.promotionRuleType == 'PROMO_PROD') {
-          idx = idx + 1
-          arr.splice(5, 0, { title: '折扣', dataIndex: 'discountPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'discountPrice' } })
-        }
-        arr.splice((this.showStockCol ? 9 : 8) + idx, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-      }
-      return arr
-    }
-  },
-  watch: {
-    salesBillSn (newValue, oldValue) {
-      this.resetSearchForm()
-    },
-    spinning (a, b) {
-      if (a) {
-        this.$emit('spinning', a)
-      }
-    }
-  },
-  methods: {
-    // 仓库下拉列表筛选
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    // 仓库列表加载完成
-    warehouseLoad (sn, list) {
-      this.warehouseDataList = list
-    },
-    // 显示查询条件
-    showSearch () {
-      this.showSearchBox = !this.showSearchBox
-    },
-    // 查询第三方库存
-    searchThreeStockOk () {
-      this.showStockCol = true
-      this.resetSearchForm()
-    },
-    // 显示规则详细
-    showDesc (descDetail) {
-      this.showDescBox = !this.showDescBox
-      this.descDetail = descDetail
-      this.descDetail.gateValue = Number(this.descDetail.gateValue).toFixed(2)
-      this.descDetail.quotaAmount = Number(this.descDetail.quotaAmount).toFixed(2)
-      this.$emit('showDesc', this.showDescBox)
-    },
-    // 打开产品弹框
-    openCpModal () {
-      this.$emit('openCpModal', 1, this.id, this.countData)
-    },
-    // 表格选中项
-    rowSelectionFun (obj) {
-      this.rowSelectionInfo = obj || null
-    },
-    //  选择产品分类
-    changeProductType (val, opt) {
-      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
-    },
-    // 禁用活动
-    disableActive (flag) {
-      this.disablePromo = flag
-    },
-    // 统计
-    getCount () {
-      salesPromoDetailCount(Object.assign(this.queryParam, {
-        salesBillSn: this.salesBillSn,
-        promoRuleSn: this.promo.promoRuleSn,
-        promoSn: this.promo.promoSn,
-        salesPromoSn: this.promo.salesPromoSn
-      })).then(res => {
-        if (res.status == 200) {
-          this.countData = res.data
-        }
-      })
-    },
-    //  重置查询
-    resetSearchForm (flag) {
-      this.queryParam.productCode = ''
-      this.queryParam.productName = ''
-      this.queryParam.warehouseSn = undefined
-      this.queryParam.productBrandSn = undefined
-      this.queryParam.productTypeSn1 = ''
-      this.queryParam.productTypeSn2 = ''
-      this.queryParam.productTypeSn3 = ''
-      this.productType = []
-      this.rowSelectionInfo = null
-      this.$refs.table.clearSelected()
-      this.$refs.table.refresh(!!flag)
-    },
-    // 批量取消出现产品
-    handleBatchCancelActive () {
-      const _this = this
-      const len = _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length
-      if (!_this.rowSelectionInfo || (len < 1)) {
-        _this.$message.warning('请先选择产品后再进行批量操作!')
-        return
-      }
-      const obj = []
-      const gift = []
-      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
-        // 赠品
-        if (item.promotionFlag == 'GIFT') {
-          gift.push(item.productCode)
-        } else {
-          obj.push(item.salesBillDetailSn)
-        }
-      })
-      if (gift.length == len) {
-        this.$info({
-          title: '提示',
-          content: '所选全部为赠品,其不能转为正常产品!',
-          centered: true,
-          okText: '知道了'
-        })
-        return
-      }
-      this.$confirm({
-        title: '提示',
-        content: '已选产品' + len + '项,' + (gift.length ? '其中包含赠品' + gift.join(',') + '(赠品不能转正常产品),确认要继续批量取消促销转为正常产品吗?' : '确认要批量取消促销转为正常产品吗?'),
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          const params = {
-            salesBillDetailSnList: obj,
-            salesBillSn: _this.salesBillSn,
-            oldSalesPromoSn: _this.promo.salesPromoSn
-          }
-          // 更换活动
-          _this.$emit('upActive', _this.promo, '0', params)
-        }
-      })
-    },
-    // 删除全部产品
-    handleBatchDelAll () {
-      const _this = this
-      if (_this.dataSource.length == 0) {
-        _this.$message.warning('暂无可删除的已选产品!')
-        return
-      }
-      this.$confirm({
-        title: '提示',
-        content: '确认要删除全部已选产品吗?',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          deleteAll({ salesBillSn: _this.salesBillSn, salesPromoSn: _this.promo.salesPromoSn }).then(res => {
-            if (res.status == 200) {
-              _this.$refs.table.refresh(true)
-              _this.$emit('insterOk', 'promo')
-              _this.$message.success(res.message)
-            }
-            _this.spinning = false
-          })
-        }
-      })
-    },
-    // 批量删除已选产品
-    handleBatchDel () {
-      const _this = this
-      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
-        _this.$message.warning('请先选择要删除的产品后再进行批量操作!')
-        return
-      }
-      const obj = []
-      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
-        obj.push(item.salesBillDetailSn)
-      })
-      this.$confirm({
-        title: '提示',
-        content: '已选产品' + obj.length + '项,确认要批量删除吗?',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          salesDetailBatchDel({
-            salesBillSn: _this.salesBillSn,
-            salesPromoSn: _this.promo.salesPromoSn,
-            salesBillDetailSnList: obj
-          }).then(res => {
-            if (res.status == 200) {
-              _this.$refs.table.refresh(false)
-              _this.$emit('insterOk', 'promo')
-              _this.$message.success(res.message)
-            }
-            _this.spinning = false
-          })
-        }
-      })
-    },
-    // 设置单个出库仓库
-    handleWarehouseBox (row) {
-      const snArr = [row.salesBillDetailSn]
-      const ajax_data = {
-        warehouseSn: row.warehouseSn,
-        salesBillDetailSnList: snArr,
-        salesBillSn: this.salesBillSn,
-        salesPromoSn: this.promo.salesPromoSn
-      }
-      this.setWarehouseInfo(ajax_data)
-    },
-    // 选择仓库确认
-    chooseWarehouseOk (sn) {
-      const _this = this
-      const snArr = []
-      _this.rowSelectionInfo.selectedRows.forEach(item => {
-        snArr.push(item.salesBillDetailSn)
-      })
-      const ajax_data = {
-        warehouseSn: sn,
-        salesBillDetailSnList: snArr,
-        salesBillSn: _this.salesBillSn,
-        salesPromoSn: _this.promo.salesPromoSn,
-        allFlag: _this.warehouseTit == '全部仓库设置' ? true : undefined
-      }
-      _this.setWarehouseInfo(ajax_data)
-    },
-    // 更改仓库信息
-    setWarehouseInfo (data) {
-      const _this = this
-      _this.spinning = true
-      updateWarehouse(data).then(res => {
-        console.log(res)
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.$emit('insterOk', 'promo')
-          _this.$refs.table.refresh(false)
-          _this.$refs.table.clearSelected()
-        }
-        _this.openWarehouseModal = false
-        _this.spinning = false
-      })
-    },
-    // 更多操作下拉菜单
-    handleMenuClick (e) {
-      const _this = this
-      if (e.key == 0) { // 部分仓库设置
-        if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
-          _this.$message.warning('请先选择要设置的产品!')
-        } else {
-          _this.warehouseTit = '部分仓库设置'
-          _this.openWarehouseModal = true
-        }
-      } else if (e.key == 1) { // 删除已选项
-        this.handleBatchDel()
-      } else if (e.key == 3) { // 全部仓库设置
-        _this.$refs.table.clearSelected()
-        _this.warehouseTit = '全部仓库设置'
-        _this.openWarehouseModal = true
-      } else if (e.key == 4) { // 批量取消促销
-        _this.handleBatchCancelActive()
-      } else { // 全部删除
-        _this.handleBatchDelAll()
-      }
-    },
-    // 打开换促销活动列表选项
-    handleUpdateActive (record) {
-      this.$refs.updateActive.getActiveList({
-        productSn: record.productSn,
-        salesBillSn: this.salesBillSn,
-        promoRuleSn: this.promo.promoRuleSn
-      }, record)
-      this.openUpActiveModal = true
-    },
-    // 已选产品数量修改
-    onCellBlur (val, record) {
-      const _this = this
-      //  光标移出,值发生改变再调用编辑接口
-      if (val && val != record.qtyBackups) {
-        _this.spinning = true
-        salesDetailUpdateQty({
-          salesBillDetailSn: record.salesBillDetailSn,
-          qty: record.qty,
-          salesBillSn: _this.salesBillSn,
-          salesPromoSn: _this.promo.salesPromoSn
-        }).then(res => {
-          if (res.status == 200) {
-            _this.$emit('insterOk', 'promo')
-            _this.$message.success(res.message)
-          }
-          _this.$refs.table.refresh(false)
-          _this.spinning = false
-        })
-      } else {
-        record.qty = record.qtyBackups
-      }
-    },
-    // 删除产品
-    handleDel (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认要删除吗?',
-        centered: true,
-        closable: true,
-        onOk () {
-          _this.delLoading = true
-          _this.spinning = true
-          salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn, salesPromoSn: _this.promo.salesPromoSn }).then(res => {
-            if (res.status == 200) {
-              _this.$refs.table.refresh(false)
-              _this.$emit('insterOk', 'promo')
-              _this.$message.success(res.message)
-            }
-            _this.delLoading = false
-            _this.spinning = false
-          })
-        }
-      })
-    },
-    // 确定更换促销活动
-    async upActiveOk (data, editRow) {
-      this.spinning = true
-      const params = {
-        salesBillDetailSn: editRow.salesBillDetailSn,
-        salesBillSn: this.salesBillSn,
-        oldSalesPromoSn: this.promo.salesPromoSn,
-        priceLevel: editRow.priceLevel
-      }
-      // 更换活动
-      this.$emit('upActive', this.promo, data, params)
-    },
-    // 更换活动成功
-    upAcitveSuccess () {
-      this.spinning = false
-      this.$refs.updateActive.confirmLoading = false
-      this.openUpActiveModal = false
-      this.$refs.table.clearSelected()
-      this.$refs.table.refresh(false)
-    },
-    // 添加产品
-    insterProduct (row, promotionFlag, promoProductClz) {
-      // 防止多次添加产品
-      if (this.isInster) { return }
-      this.saveNewProduct(row, promotionFlag, promoProductClz)
-    },
-    // 保存添加的产品到销售列表
-    saveNewProduct (row, promotionFlag, promoProductClz) {
-      this.$message.loading('正在添加产品...', 1)
-      this.isInster = true
-      this.spinning = true
-      const params = {
-        salesPromoSn: this.promo.salesPromoSn,
-        promoRuleSn: this.promo.promoRuleSn,
-        promoSn: this.promo.promoSn,
-        promoProductClz: promoProductClz,
-        packQty: row.productPackQty,
-        productSn: row.productSn,
-        showCost: row.lastStockCost,
-        price: row.productPrice,
-        origPrice: row.origPrice,
-        promotionGiftsAmount: 0,
-        usePromotionGiftsAmount: 0,
-        qty: row.salesNums,
-        salesBillSn: this.detailData.salesBillSn,
-        salesBillNo: this.detailData.salesBillNo,
-        purchaseBillSn: this.detailData.purchaseBillSn,
-        purchaseBillNo: this.detailData.purchaseBillNo,
-        priceLevel: row.priceLevel,
-        stockSn: row.stockSn,
-        promotableFlag: row.isJoinActivityProduct || 0, // 可促销标记 有活动的传1,没活动的传0
-        promotionFlag: promotionFlag, // 促销标记 正品传0,促销品传1
-        warehouseSn: row.warehouseSn
-      }
-      salesDetailInsert(params).then(res => {
-        if (res.status == 200) {
-          this.$message.success('产品添加成功', 2.5)
-          this.resetSearchForm(true)
-          this.$emit('insterOk', 'promo')
-        }
-        this.spinning = false
-        this.isInster = false
-      }).catch(err => {
-        this.isInster = false
-        this.spinning = false
-      })
-    },
-    // 导入产品
-    handleImportClick (e) {
-      console.log(e)
-      this.openGuideModal = true
-      this.promoProductClz = e.key
-    },
-    // 关闭导入弹框
-    closeGuideModel () {
-      this.openGuideModal = false
-      this.promoProductClz = ''
-    },
-    // 批量导入产品
-    hanldeImportOk (data, salesPromoSn) {
-      const params = {
-        salesBillSn: this.detailData.salesBillSn,
-        salesBillDetailList: data
-      }
-      // 活动导入
-      if (salesPromoSn) {
-        params.salesPromoSn = salesPromoSn
-        params.promoRuleSn = this.promo.promoRuleSn
-        params.promoProductClz = this.promoProductClz
-      }
-      salesBatchInsert(params).then(res => {
-        if (res.status == 200) {
-          this.$message.success('产品导入成功', 2.5)
-          this.resetSearchForm(true)
-          this.$emit('insterOk', 'promo')
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="less">
-   .ant-input-number-sm input{
-    text-align: center;
-   }
-   .alert-bar{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    .countData{
-      span{
-        margin: 0 2px;
-        color: rgb(0, 153, 255);
-      }
-      span.cor1{
-        color: rgb(248, 132, 0);
-      }
-      b{
-        font-weight: bold;
-        span{
-          color: red;
-          font-weight: normal;
-        }
-      }
-    }
-    > div{
-      &:first-child{
-        flex-grow: 1;
-        width:70%;
-        padding-right: 100px;
-      }
-    }
-   }
-</style>