Procházet zdrojové kódy

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

chenrui před 1 rokem
rodič
revize
e6f8c4a64f

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.60",
+    "version": "2.2.61",
     "message": "发现有新版本发布,确定更新系统?"
 }

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

@@ -94,7 +94,6 @@
           <template slot="productCode" slot-scope="text, record">
             <span>{{ 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=='REGULAR'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge> -->
             <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
           </template>
         </s-table>

+ 2 - 2
src/views/salesManagement/pushOrderManagement/sendTypeModal.vue

@@ -42,8 +42,8 @@
         </a-form-model-item>
         <a-form-model-item label="货位编号" prop="orderBy" v-if="nowType=='print'">
           <a-radio-group v-model="form.orderBy">
-            <a-radio value="dispatch_bill_detail.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
-            <a-radio value="dispatch_bill_detail.STACK_PLACE_CODE DESC">打印(↓降序)</a-radio>
+            <a-radio value="dispDet.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
+            <a-radio value="dispDet.STACK_PLACE_CODE DESC">打印(↓降序)</a-radio>
             <a-radio value="-1">不打印</a-radio>
           </a-radio-group>
         </a-form-model-item>

+ 16 - 8
src/views/salesManagement/salesQueryNew/comps/activeQueryPart.vue

@@ -78,7 +78,7 @@
       </template>
       <!-- 价格 -->
       <template slot="productPrice" slot-scope="text, record">
-         {{ text }} <span title="原价" v-if="promoProductClz == 'GIFT' || promoProductClz == 'DISCOUNT'">({{ record.origPrice }})</span>
+         {{ text||text==0 ? text : '--' }} <span title="原价" v-if="promoProductClz == 'GIFT' || promoProductClz == 'DISCOUNT'">({{ record.origPrice||record.origPrice==0 ? record.origPrice : '--' }})</span>
       </template>
       <!-- 产品名称 -->
       <template slot="productName" slot-scope="text, record">
@@ -100,9 +100,7 @@
           class="button-info"
           :loading="newLoading"
           @click="handleAdd(record)"
-          v-if="record.productPrice"
           id="productInfoList-edit-btn">添加</a-button>
-        <span v-else>--</span>
       </template>
     </s-table>
   </div>
@@ -163,7 +161,11 @@ export default {
               const productUnit = data.list[i].productUnit || '--'
               const productPackQtyUnit = data.list[i].productPackQtyUnit || '--'
               data.list[i].packQtyV = productPackQty + productUnit + '/' + productPackQtyUnit
-              data.list[i].unitQtyV = data.list[i].unitQty + data.list[i].productUnit
+              if(data.list[i].unitType=='SL'){
+                data.list[i].unitQtyV = data.list[i].unitQty ? (data.list[i].unitQty + data.list[i].productUnit) : '--'
+              }else{
+                data.list[i].unitQtyV = data.list[i].productPackQty&&data.list[i].unitQty ? ((data.list[i].productPackQty*data.list[i].unitQty) + data.list[i].productUnit) : '--'
+              }
             }
             this.disabled = false
           }
@@ -183,13 +185,19 @@ export default {
         { title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '包装数', dataIndex: 'packQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '起订量', dataIndex: 'unitQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '起订量', dataIndex: 'unitQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '下单数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '8%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
+      let idx = 6
       if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
-        arr.splice(6, 0, { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'right', scopedSlots: { customRender: 'productPrice' } })
+        arr.splice(idx, 0, { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'right', scopedSlots: { customRender: 'productPrice' } })
+        idx = idx + 1
+      }
+      // 促销品没有起订量
+      if(this.promoProductClz != 'GIFT'){
+        arr.splice(idx+1, 0,{ title: '起订量', dataIndex: 'unitQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }
@@ -208,7 +216,7 @@ export default {
       }
     },
     // 切换tab
-    changeTab(e){
+    changeTab(e){ 
       this.promoProductClz = e
       this.resetSearchForm()
     },
@@ -262,7 +270,7 @@ export default {
         if(this.promoRuleData.promotionRuleType!='PROMO_PROD'){
           tabList.push({text:'正价产品',val:'REGULAR'})
         }
-        if(this.promoRuleData.regularPromotionSameFlag==='0'){
+        if(this.promoRuleData.regularPromotionSameFlag==='0'||this.promoRuleData.scopeFlag==='0'){
           tabList.push({text:'促销产品',val:'GIFT'})
         }
         if(this.promoRuleData.promotionRuleType=='PROMO_PROD'){

+ 16 - 6
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -17,7 +17,7 @@
             :cell-span-option="cellSpanOption"
             :column-width-resize-option="columnWidthResizeOption"
           />
-        <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品"/></div>
+        <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品" :image="simpleImage"/></div>
         <!-- 活动规则详情 -->
         <detailModal :openModal="openDetailModal" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
     </a-spin>
@@ -25,6 +25,7 @@
   
   <script>
     import { commonMixin } from '@/utils/mixin'
+    import { Empty } from 'ant-design-vue';
     import detailModal from '@/views/promotionRulesManagement/dealerPromotions/detailModal.vue'
     import { salesPromoQueryList } from '@/api/salesNew'
     import { salesDetailAllList, salesPromoDetailCount, salesDetaiCount } from '@/api/salesDetailNew'
@@ -99,7 +100,8 @@
           outStockStr: '',
           showEmpty: false,
           showTableHead: true,
-          colspanNums: 13
+          colspanNums: 13,
+          simpleImage: Empty.PRESENTED_IMAGE_SIMPLE
         }
       },
       computed: {
@@ -138,8 +140,9 @@
                   <div class="active-title">
                     {record.promo?(
                       <div>
-                        <strong style="margin-right:10px;font-size:14px;">{record.promo.promotion.title} ({record.promo.promotionRule.description})</strong>
-                        <span style="margin-left:10px;color:#00aaff;cursor: pointer;" onClick={()=>_this.showDesc(record.promo)}>
+                        <strong style="font-size:14px;">{record.promo.promotion.description}</strong>
+                        <span>({record.promo.promotionRule.description})</span>
+                        <span style="margin-left:20px;color:#00aaff;cursor: pointer;" onClick={()=>_this.showDesc(record.promo)}>
                           <a-icon title="查看活动详情" type="eye"/> 活动详情
                         </span>
                       </div>
@@ -164,7 +167,7 @@
               <div>
                 {_this.toThousands(data)}
                 {record.promotionFlag == 'GIFT' || record.promotionFlag == 'DISCOUNT' ? (
-                  <span style="color:#f5222d;" title="原价">({ _this.toThousands(record.origPrice)})</span>
+                  <span title="原价">({ _this.toThousands(record.origPrice)})</span>
                 ):''}
               </div>
             )
@@ -310,9 +313,16 @@
                 promo: promo,
                 total: acTotal
               },...aclist] : []
+              // 将活动产品数据拼接
               listData = aclist&&aclist.length ? listData.concat(retList) : listData
             }
-
+            // 如果活动没有任何产品,不显示统计一行
+            if(active.length){
+              const hasAcp = listData.filter(item => item.id.indexOf("promo-")>=0)
+              if(hasAcp && hasAcp.length==1){
+                listData = listData.filter(item => item.id.indexOf("promo-")<0) || []
+              }
+            }
             console.log(listData)
             this.dataSource = listData
 

+ 95 - 71
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -1,46 +1,56 @@
 <template>
   <div>
     <div class="table-page-search-wrapper" v-show="showDescBox">
-      <a-descriptions :column="4" v-if="descDetail">
-          <a-descriptions-item label="促销类型">
+      <a-row v-if="descDetail" type="flex" justify="start">
+          <a-col span="6" style="padding: 6px;">
+            <span>促销类型:</span>
             {{ descDetail.promotionRuleTypeDictValue||'--' }}
-          </a-descriptions-item>
-          <a-descriptions-item label="促销门槛" span="3">
-            <div v-if="descDetail.gateFlag === '1'">
-              <span v-if="descDetail.gateType==='RATIO_AMOUNT'">
-                购买门槛产品金额{{ descDetail.gateAmount*100 }}%作为配额
-              </span>
-              <span v-else-if="descDetail.gateType==='MIN_AMOUNT'">
-                购买门槛产品满最低金额{{ descDetail.gateAmount }}不限制配额。
-              </span>
-              <span v-else>购买满{{ descDetail.gateAmount }}元门槛产品,可使用 {{ descDetail.quotaAmount }}元配额,采购规则中的正价商品</span>
+          </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.gateAmount*100 }}%作为配额
+                </span>
+                <span v-else-if="descDetail.gateType==='MIN_AMOUNT'">
+                  购买门槛产品满最低金额{{ descDetail.gateAmount }}不限制配额。
+                </span>
+                <span v-else>购买满{{ descDetail.gateAmount }}元门槛产品,可使用 {{ descDetail.quotaAmount }}元配额,采购规则中的正价商品</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>
+                <span v-if="descDetail.promotionRuleType == 'BUY_PROD_GIVE_PROD'">
+                  {{ descDetail.regularSameFlag==='1'?'同款产品,':'不同款产品,' }}
+                  购买满{{ descDetail.regularQty }}个正价产品,送{{ descDetail.promotionQty }}个促销产品
+                  {{ descDetail.accrualFlag == 1 ? ',数量叠加':',数量不叠加' }}
+                </span>
+                <span v-else-if="descDetail.promotionRuleType == 'BUY_PROD_GIVE_MONEY'">
+                  {{ descDetail.regularSameFlag==='1'?'同款产品,':'不同款产品,' }}
+                  购买满{{ descDetail.regularAmount }}元正价产品,送{{ descDetail.giveAmount }}元促销品采购额
+                  {{ descDetail.accrualFlag == 1 ? ',金额叠加':',金额不叠加' }}
+                </span>
+                <span v-else>
+                  特价产品
+                </span>
+              </div>
+              <div style="display: flex;flex-grow: 1;">
+                <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>
-            <span v-else>无</span>
-          </a-descriptions-item>
-          <a-descriptions-item label="促销规则">
-            {{ descDetail.regularSameFlag==='1'?'同款,':'不同款,' }}
-            <span v-if="descDetail.promotionRuleType == 'BUY_PROD_GIVE_PROD'">
-              购买满{{ descDetail.regularQty }}个正价产品,送{{ descDetail.promotionQty }}个促销产品
-              {{ descDetail.accrualFlag ? ',数量叠加':',数量不叠加' }}
-            </span>
-            <span v-else-if="descDetail.promotionRuleType == 'BUY_PROD_GIVE_MONEY'">
-              购买满{{ descDetail.regularAmount }}元正价产品,送{{ descDetail.giveAmount }}元促销品采购额
-              {{ descDetail.accrualFlag ? ',金额叠加':',金额不叠加' }}
-            </span>
-            <span v-else>
-              特价产品
-            </span>
-          </a-descriptions-item>
-          <a-descriptions-item label="限制正价产品款数" v-if="descDetail.promotionRuleType!='PROMO_PROD'&&descDetail.promotionRuleType!='BUY_PROD_GIVE_MONEY'">
-            {{ descDetail.restrictCategory||'--' }}
-          </a-descriptions-item>
-          <a-descriptions-item label="订单起订金额(元)">
-            {{ descDetail.minOrderAmount||'无' }}
-          </a-descriptions-item>
-          <a-descriptions-item label="活动经费上线(元)">
-            {{ descDetail.upperLimitAmount||'无' }}
-          </a-descriptions-item>
-        </a-descriptions>
+          </a-col>
+        </a-row>
     </div>
     <!-- 筛选条件 -->
    <div class="table-page-search-wrapper" style="margin:0" v-show="showSearchBox">
@@ -81,7 +91,15 @@
  
     <div class="table-page-search-wrapper">
       <a-row :gutter="15" type="flex" justify="space-between" align="middle">
-        <a-col :md="12" :sm="24" style="text-align:left;">
+        <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
+            type="link"
+            class="button-info"
+             @click="showSearchBox=!showSearchBox" ><a-icon type="search"/> 筛选</a-button>
+
           <a-dropdown>
             <a-menu slot="overlay" @click="handleMenuClick">
               <a-menu-item key="0" :disabled="disablePromo">
@@ -95,28 +113,25 @@
               </a-menu-item>
             </a-menu>
             <a-button
-              type="default"
+              type="link"
               class="button-info"
             > 批量操作 <a-icon type="down" /> </a-button>
           </a-dropdown>
-          <span v-if="selectTotal" style="margin-left:5px;">已选{{ selectTotal }}项</span>
-        </a-col>
-        <a-col :md="12" :sm="24" style="text-align:right;">
-          <a-button
-            type="link"
-            class="button-info"
-             @click="showSearchBox=!showSearchBox" ><a-icon type="search"/> 筛选</a-button>
+          
           <a-dropdown :disabled="disablePromo">
             <a-menu slot="overlay" @click="handleImportClick">
-              <a-menu-item key="GATE">
+              <a-menu-item key="GATE" v-if="promo&&promo.promotionRule&&promo.promotionRule.promotionRuleType!='PROMO_PROD'">
                 导入门槛产品
               </a-menu-item>
-              <a-menu-item key="REGULAR">
+              <a-menu-item key="REGULAR" v-if="promo&&promo.promotionRule&&promo.promotionRule.promotionRuleType!='PROMO_PROD'">
                 导入正价产品
               </a-menu-item>
-              <a-menu-item key="GIFT">
+              <a-menu-item key="GIFT" v-if="promo&&promo.promotionRule&&promo.promotionRule.promotionRuleType!='PROMO_PROD'">
                 导入促销产品
               </a-menu-item>
+              <a-menu-item key="DISCOUNT" v-if="promo&&promo.promotionRule&&promo.promotionRule.promotionRuleType=='PROMO_PROD'">
+                导入特价产品
+              </a-menu-item>
             </a-menu>
             <a-button
               type="link"
@@ -148,7 +163,6 @@
       <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=='REGULAR'" :number-style="{ backgroundColor: '#108ee9', 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="Number(record.stockQty||0) < Number(record.unpushedQty||0)" :number-style="{ zoom:'80%' }"></a-badge>
       </template>
@@ -164,10 +178,14 @@
           <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'" title="原价">({{ toThousands(record.origPrice) }})</span>
+      </template>
       <!-- 促销价 -->
       <template slot="discountPrice" slot-scope="text, record">
-        <span>{{ record.discountedPrice }}</span>
+        <span>{{ toThousands(record.discountedPrice) }}</span>
         ({{ record.discountRate }}%)
       </template>
       <!-- 销售数量 -->
@@ -232,13 +250,13 @@
               </div>
               <div style="display: flex;">
                 <div>
-                  款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : '--' }}</strong>
+                  款数:<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 : '--' }}</strong>
+                  数量:<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) : '--' }}</strong></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>
@@ -384,22 +402,24 @@
         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: '20%', align: 'left' },
-          { title: '起订量', dataIndex: 'unitQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '8%', align: 'center' },
-          { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '8%', align: 'center' },
-          { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '15%', align: 'center' },
-          { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+          { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: this.promo.promotionRule.promotionRuleType=='PROMO_PROD' ? '20%' : '26%', 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: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+          { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
         ]
         if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
-          arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+          arr.splice(4, 0, { title: '售价', dataIndex: 'price', width: '6%', align: 'right', scopedSlots: { customRender: 'price' } })
+          let idx = 0
           // 如果是特价活动
           if(this.promo.promotionRule.promotionRuleType=='PROMO_PROD'){
-            arr.splice(4, 0, { title: '促销价', dataIndex: 'discountPrice', width: '8%', align: 'right', scopedSlots: { customRender: 'discountPrice' }})
+            idx = idx + 1
+            arr.splice(5, 0, { title: '促销价', dataIndex: 'discountPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'discountPrice' }})
           }
-          arr.splice(7, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+          arr.splice(8+idx, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
         }
         return arr
       }
@@ -424,6 +444,7 @@
       showDesc(descDetail){
         this.showDescBox = !this.showDescBox
         this.descDetail = descDetail
+        this.$emit("showDesc",this.showDescBox)
       },
       openCpModal(){
         this.$emit('openCpModal', 1, this.id)
@@ -439,9 +460,9 @@
         this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
       },
       // 禁用活动
-      disableActive(){
+      disableActive(flag){
         this.resetSearchForm()
-        this.disablePromo = true
+        this.disablePromo = flag
       },
       // 统计
       getCount(){
@@ -555,6 +576,7 @@
         const _this = this
         _this.spinning = true
         updateWarehouse(data).then(res => {
+          console.log(res)
           if (res.status == 200) {
             _this.openWarehouseModal = false
             _this.resetSearchForm(true)
@@ -625,6 +647,7 @@
             salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn, salesPromoSn: _this.promo.salesPromoSn }).then(res => {
               if (res.status == 200) {
                 _this.resetSearchForm(true)
+                _this.$emit('insterOk','promo')
                 _this.$message.success(res.message)
               }
               _this.delLoading = false
@@ -686,8 +709,8 @@
         }
         salesDetailInsert(params).then(res => {
           if (res.status == 200) {
-            this.resetSearchForm()
             this.$message.success('产品添加成功', 2.5)
+            this.resetSearchForm()
             this.$emit('insterOk','promo')
           }
           this.spinning = false
@@ -722,8 +745,9 @@
         
         salesBatchInsert(params).then(res => {
           if (res.status == 200) {
-            this.$refs.table.refresh(true)
-            this.getOrderDetail(false)
+            this.$message.success('产品导入成功', 2.5)
+            this.resetSearchForm()
+            this.$emit('insterOk','promo')
           }
         })
       },

+ 20 - 20
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -39,7 +39,10 @@
     
     <div class="table-page-search-wrapper">
       <a-row :gutter="15" type="flex" justify="space-between" align="middle">
-        <a-col :md="12" :sm="24" style="text-align:left;">
+        <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="16" :sm="24" style="text-align:right;">
           <a-dropdown>
             <a-menu slot="overlay" @click="handleMenuClick">
               <a-menu-item key="0">
@@ -53,13 +56,10 @@
               </a-menu-item>
             </a-menu>
             <a-button
-              type="default"
+              type="link"
               class="button-info"
             > 批量操作 <a-icon type="down" /> </a-button>
           </a-dropdown>
-          <span v-if="selectTotal" style="margin-left:5px;">已选{{ selectTotal }}项</span>
-        </a-col>
-        <a-col :md="12" :sm="24" style="text-align:right;">
           <!-- <a-button
             type="link"
             class="button-info"
@@ -156,19 +156,19 @@
       <template slot="footer">
         <!-- 总计 -->
         <a-alert type="info" v-if="showTotal" banner :showIcon="false">
-          <div slot="message">
-              <span v-if="$hasPermissions('B_salesEdit_salesPrice')">总售价:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '--' }}</strong>;</span>
-              总款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : '--' }}</strong>;
-              总数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : '--' }}</strong>;
+          <div slot="message" style="text-align: right;">
+              款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>;
+              数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>;
+              <span v-if="$hasPermissions('B_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
           </div>
         </a-alert>
       </template>
     </s-table>
 
-      <!-- 导入产品 -->
-      <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: salesBillSn}" @close="closeGuideModel" @ok="hanldeOk" />
-      <!-- 仓库设置 -->
-      <setWarehouse :show="openWarehouseModal" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
+    <!-- 导入产品 -->
+    <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: salesBillSn}" @close="closeGuideModel" @ok="hanldeOk" />
+    <!-- 仓库设置 -->
+    <setWarehouse :show="openWarehouseModal" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
   </div>
 </template>
 
@@ -407,8 +407,6 @@
             _this.resetSearchForm(true)
             _this.$message.success(res.message)
           }
-          _this.$refs.table.refresh(true)
-          _this.$refs.table.clearSelected()
           _this.spinning = false
         })
       },
@@ -454,7 +452,7 @@
           record.qty = record.qtyBackups
         }
       },
-      //  重置
+      // 重置
       resetSearchForm (flag) {
         this.queryParam.productCode = ''
         this.queryParam.productName = ''
@@ -464,6 +462,7 @@
         this.queryParam.productTypeSn2 = ''
         this.queryParam.productTypeSn3 = ''
         this.productType = []
+        this.$refs.table.clearSelected()
         this.$refs.table.refresh(!!flag)
       },
       // 删除产品
@@ -479,8 +478,8 @@
             _this.spinning = true
             salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn }).then(res => {
               if (res.status == 200) {
-                _this.resetSearchForm(true)
                 _this.$message.success(res.message)
+                _this.resetSearchForm()
                 _this.$emit('insterOk','normal')
               }
               _this.delLoading = false
@@ -520,8 +519,8 @@
           warehouseSn: row.warehouseSn
         }).then(res => {
           if (res.status == 200) {
-            this.resetSearchForm()
             this.$message.success('产品添加成功', 2.5)
+            this.resetSearchForm()
             this.$emit('insterOk','normal')
           }
           this.spinning = false
@@ -543,8 +542,9 @@
        
         salesBatchInsert(params).then(res => {
           if (res.status == 200) {
-            this.$refs.table.refresh(true)
-            this.getOrderDetail(false)
+            this.$message.success('产品导入成功', 2.5)
+            this.resetSearchForm()
+            this.$emit('insterOk','normal')
           }
         })
       },

+ 3 - 3
src/views/salesManagement/salesQueryNew/detail.vue

@@ -256,7 +256,7 @@ export default {
       }
     },
     pageHeight(){
-      return window.innerHeight - 320
+      return window.innerHeight - 330
     }
   },
   methods: {
@@ -278,7 +278,7 @@ export default {
     },
     // 查询数据
     searchTable(){
-      this.$refs.productList.pageInit()
+      this.$refs.productList.searchTable()
     },
     //  详情
     getDetail () {
@@ -286,7 +286,7 @@ export default {
         if (res.status == 200) {
           this.detailData = res.data || null
         }
-        this.resetSearchForm()
+        this.$refs.productList.pageInit()
       })
     },
     // 打开缺货明细

+ 15 - 5
src/views/salesManagement/salesQueryNew/edit.vue

@@ -51,9 +51,9 @@
       v-if="activeList.length"
       >
         <div slot="title" style="display: inline-block;width:100%;">
-          <strong style="margin-right:10px;font-size:14px;">{{item.promotion.title}}</strong> ({{item.promotionRule.description}})
+          <strong style="margin-right:10px;font-size:14px;">{{item.promotion.description}}</strong> ({{item.promotionRule.description}})
           <span style="margin-left:20px;color:#00aaff;cursor: pointer;"  @click="(event) => {showDesc(event, item)}">
-            <a-icon title="查看活动详情" type="eye"/> 活动详情
+            <a-icon :type="item.showDesc ? 'eye-invisible' : 'eye'"/> 活动详情
           </span>
           <span style="margin:0 20px;color:#ff0800;cursor: pointer;" @click="(event) => {disabledActive(event, item)}">
             <a-icon title="禁用规则" type="disconnect"/> {{item.disabled ? '启用规则' : '禁用规则'}}
@@ -66,6 +66,7 @@
           :id="item.promoRuleSn" 
           @openCpModal="openProductModal" 
           @insterOk="insterActiveOk"
+          @showDesc="v => showDescOk(v,item)"
           @upActive="upActive"
           :promo="item"
           :detailData="detailData" 
@@ -147,6 +148,7 @@
     :show="showNewActiveModal"
     :salesBillSn="salesBillSn"
     :newActiveList="newActiveList"
+    @ok="showNewActiveOk"
     ></newPromoModal>
  </div>
 </template>
@@ -241,9 +243,13 @@ export default {
         this.newActiveList = hasNewActive
         this.showNewActiveModal=true
       }
+
+      // 已参与活动列表
       this.activeList = await salesPromoQueryList({ salesBillSn: this.$route.params.sn }).then(res => res.data || [])
       this.activeList.map(item => {
         item.isActive = true
+        item.showDesc = false
+        item.disabled = item.enabledFlag == 0
         this.activeDesKey['search-'+item.promoRuleSn] = false
       })
     },
@@ -275,7 +281,6 @@ export default {
           this.$refs['productList-' + item.promoRuleSn][0].resetSearchForm()
         })
       }
-      
       this.getOrderDetail()
     },
     // 新增产品
@@ -419,6 +424,10 @@ export default {
       const row = this.$refs['productList-'+item.promoRuleSn][0]
       row&&row.showDesc(item.promotionRule)
     },
+    showDescOk(v,item){
+      item.showDesc = v
+      this.activeList.splice()
+    },
     // 禁用活动
     disabledActive(e,item){
       const _this = this
@@ -452,13 +461,14 @@ export default {
               salesDisableType: _this.disabledActiveOption
             }).then(res => {
               if(res.status == 200){
-                _this.$refs['productList-'+item.promoRuleSn][0].disableActive()
+                _this.$refs['productList-'+item.promoRuleSn][0].disableActive(true)
                 _this.disabledActiveOption = null
                 item.disabled = true
+                _this.activeList.splice()
               }
             })
           }else{
-            _this.$message.info("请选择如何禁用规则!")
+            _this.$message.info("请选择禁用方式!")
             return true
           }
         },

+ 2 - 2
src/views/salesManagement/stockPrint/sendTypeModal.vue

@@ -42,8 +42,8 @@
         </a-form-model-item>
         <a-form-model-item label="货位编号" prop="orderBy" v-if="nowType=='print'">
           <a-radio-group v-model="form.orderBy">
-            <a-radio value="dispatch_bill_detail.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
-            <a-radio value="dispatch_bill_detail.STACK_PLACE_CODE DESC">打印(↓降序)</a-radio>
+            <a-radio value="dispDet.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
+            <a-radio value="dispDet.STACK_PLACE_CODE DESC">打印(↓降序)</a-radio>
             <a-radio value="-1">不打印</a-radio>
           </a-radio-group>
         </a-form-model-item>

+ 34 - 34
src/views/salesManagement/waitDispatchNew/detailProductList.vue

@@ -29,7 +29,7 @@
                 :column-width-resize-option="columnWidthResizeOption"
                 :checkbox-option="checkboxOption"
               />
-          <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品"/></div>
+          <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品" :image="simpleImage"/></div>
       </a-spin>
   
     </div>
@@ -38,7 +38,7 @@
   <script>
   import { commonMixin } from '@/utils/mixin'
   import { deleteBatch, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
- 
+  import { Empty } from 'ant-design-vue';
   import { STable, VSelect } from '@/components'
   import chooseWarehouse from '@/views/common/chooseWarehouse'
   export default {
@@ -66,6 +66,7 @@
         },
         disabled: false, //  查询、重置按钮是否可操作
         spinning: false,
+        simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
         dataSource: [],
         tableHeight: this.maxHeight,
         cellStyleOption: {
@@ -109,35 +110,31 @@
       },
       columns () {
         const _this = this
-            const priceFormat = function(data){
-              return _this.toThousands(data) || '--'
-            }
-            const numsFormat = function(data){
-              return data || data == 0 ? data : '--'
-            }
-            const codeFormat = function(record,data,h){
-              let ftext = ''
-              let fcolor = ''
-              if(record.promotionFlag == 'GIFT'){
-                ftext = '促'
-                fcolor = '#52c41a'
-              }
-              // if(record.promotionFlag == 'REGULAR'){
-              //   ftext = '正'
-              //   fcolor = '#108ee9'
-              // }
-              if(record.promotionFlag == 'DISCOUNT'){
-                ftext = '特'
-                fcolor = '#faad14'
-              }
-              return (
-                      <div>
-                          <span style="padding-right: 15px;">{data}</span>
-                          {ftext?(<a-badge count={ftext} number-style={{ backgroundColor: fcolor, zoom:'80%' }}></a-badge>):''}
-                          {Number(record.stockQty||0) < Number(record.unpushedQty||0)?(<a-badge count="缺" number-style={{ zoom:'80%' }}></a-badge>):''}
-                      </div>
-                  )
-            }
+        const priceFormat = function(data){
+          return _this.toThousands(data) || '--'
+        }
+        const numsFormat = function(data){
+          return data || data == 0 ? data : '--'
+        }
+        const codeFormat = function(record,data,h){
+          let ftext = ''
+          let fcolor = ''
+          if(record.promotionFlag == 'GIFT'){
+            ftext = '促'
+            fcolor = '#52c41a'
+          }
+          if(record.promotionFlag == 'DISCOUNT'){
+            ftext = '特'
+            fcolor = '#faad14'
+          }
+          return (
+                  <div>
+                      <span style="padding-right: 15px;">{data}</span>
+                      {ftext?(<a-badge count={ftext} number-style={{ backgroundColor: fcolor, zoom:'80%' }}></a-badge>):''}
+                      {Number(record.stockQty||0) < Number(record.unpushedQty||0)?(<a-badge count="缺" number-style={{ zoom:'80%' }}></a-badge>):''}
+                  </div>
+              )
+        }
         // 输入框
         const inputFormat = function(record,data,h) {
           if(record.surplusQty>0){
@@ -146,7 +143,8 @@
                 <a-input-number
                   size="small"
                   value={record.qty}
-                  onChange={e => _this.cancelNumsChange(e,record)}
+                  onChange={e => record.qty = e}
+                  onBlur={e => _this.cancelNumsChange(e,record)}
                   precision={0}
                   min={1}
                   max={record.surplusQty}
@@ -268,9 +266,10 @@
          this.selectedRowKeys = []
       },
       // 已选产品  blur
-      cancelNumsChange (val, record) {
+      cancelNumsChange (e, record) {
         const _this = this
-        if (val && val != record.qtyBackups) {
+        const val = e.target.value
+        if (val && val != record.qtyBackups && val<=record.surplusQty) {
           _this.spinning = true
           updateQty({
             dispatchBillDetailSn: record.dispatchBillDetailSn,
@@ -283,6 +282,7 @@
               _this.spinning = false
               _this.$emit('refashTable')
             } else {
+              record.qty = record.qtyBackups
               _this.spinning = false
             }
           })

+ 14 - 4
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -95,7 +95,7 @@
               :column-width-resize-option="columnWidthResizeOption"
               :checkbox-option="checkboxOption"
             />
-        <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品"/></div>
+        <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品" :image="simpleImage"/></div>
         <!-- 活动规则详情 -->
         <detailModal :openModal="openDetailModal" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
     </a-spin>
@@ -107,6 +107,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { salesPromoQueryList } from '@/api/salesNew'
 import detailModal from '@/views/promotionRulesManagement/dealerPromotions/detailModal.vue'
+import { Empty } from 'ant-design-vue';
 import { salesDetailAllList, salesPromoDetailCount, salesDetaiCount } from '@/api/salesDetailNew'
 import { STable, VSelect } from '@/components'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
@@ -132,6 +133,7 @@ export default {
     return {
       advanced: true, // 高级搜索 展开/关闭
       openDetailModal: false,
+      simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
       detailSn: null,
       productType: [],
       salesBillSn: '',
@@ -266,8 +268,9 @@ export default {
               <div class="active-title">
                 {record.promo?(
                   <div>
-                    <strong style="margin-right:10px;font-size:14px;">{record.promo.promotion.title} ({record.promo.promotionRule.description})</strong>
-                    <span style="margin-left:10px;color:#00aaff;cursor: pointer;" onClick={()=>_this.showDesc(record.promo)}>
+                    <strong style="font-size:14px;">{record.promo.promotion.description} </strong>
+                    <span>({record.promo.promotionRule.description})</span>
+                    <span style="margin-left:20px;color:#00aaff;cursor: pointer;" onClick={()=>_this.showDesc(record.promo)}>
                       <a-icon title="查看活动详情" type="eye"/> 活动详情
                     </span>
                   </div>
@@ -416,7 +419,14 @@ export default {
           },...aclist]
           listData = aclist&&aclist.length ? listData.concat(retList) : listData
         }
-
+        // 如果活动没有任何产品
+        if(active.length){
+          const hasAcp = listData.filter(item => item.id.indexOf("promo-")>=0)
+          if(hasAcp && hasAcp.length==1){
+            listData = listData.filter(item => item.id.indexOf("promo-")<0) || []
+          }
+        }
+        
         console.log(listData)
         this.dataSource = listData
 

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.113:8660/ocs-admin',
+        // target: 'http://192.168.2.111/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,