Prechádzať zdrojové kódy

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

chenrui 1 rok pred
rodič
commit
80040be332

+ 4 - 4
src/views/salesManagement/salesQuery/list.vue

@@ -399,15 +399,15 @@ export default {
         { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
+      if (this.$hasPermissions('M_salesQueryList_salesPrice')) { // 售价权限
+        arr.splice(6, 0, { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
       if (this.showCancelNum) {
         const ind = this.$hasPermissions('M_salesQueryList_salesPrice') ? 10 : 8
         arr.splice(ind, 0, { title: '已取消数量', dataIndex: 'totalCancelQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         arr.splice(ind + 1, 0, { title: '待下推数量', dataIndex: 'totalUnpushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
-      if (this.$hasPermissions('M_salesQueryList_salesPrice')) { // 售价权限
-        arr.splice(6, 0, { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
       return arr
     }
   },

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

@@ -69,7 +69,7 @@ export default {
     },
     // 添加产品
     insterProduct (row, promotionFlag) {
-      this.$emit('addProduct', row, promotionFlag)
+      this.$emit('addProduct', row, promotionFlag, this.type)
     }
   },
   watch: {

+ 78 - 75
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -60,22 +60,7 @@
        </a-row>
      </a-form>
    </div>
-
-   <!-- 总计 -->
-   <div class="table-page-search-wrapper">
-      <a-alert type="info" banner :showIcon="false">
-        <div slot="message" class="alert-bar">
-          <div>
-            还需门槛产品金额1000/4000(5000),已选择0元(可使用8000元配额)正价产品,已选择8个正价产品(满10送2),<strong>再满2件产品,可享受优惠</strong>,差200元到订单起订金额(1800元),可选择4个促销产品,已选择2个促销产品
-          </div>
-          <div>
-            <div v-if="$hasPermissions('B_salesEdit_salesPrice')">总金额:<strong>{{ detailData&&(detailData.totalCommonAmount || detailData.totalCommonAmount==0) ? toThousands(detailData.totalCommonAmount) : '--' }}</strong></div>
-            <div v-if="$hasPermissions('B_salesEdit_salesPrice')">优惠金额:<strong>{{ detailData&&(detailData.totalCommonAmount || detailData.totalCommonAmount==0) ? toThousands(detailData.totalCommonAmount) : '--' }}</strong></div>
-          </div>
-        </div>
-      </a-alert>
-    </div>
-    
+ 
     <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;">
@@ -103,18 +88,27 @@
             type="link"
             class="button-info"
              @click="showSearchBox=!showSearchBox" ><a-icon type="search"/> 筛选</a-button>
+          <a-dropdown>
+            <a-menu slot="overlay" @click="handleImportClick">
+              <a-menu-item key="0">
+                导入门槛产品
+              </a-menu-item>
+              <a-menu-item key="1">
+                导入正价产品
+              </a-menu-item>
+              <a-menu-item key="2">
+                导入促销产品
+              </a-menu-item>
+            </a-menu>
+            <a-button
+              type="link"
+              class="button-info"
+            > 导入产品 <a-icon type="down" /> </a-button>
+          </a-dropdown>
           <a-button
             type="link"
             class="button-info"
-            @click="openGuideModal=true"><a-icon type="login" /> 导入活动产品</a-button>
-          <a-button
-            type="link"
-            class="button-info"
-            @click="openQxModal=true"><a-icon type="plus" /> 添加促销产品</a-button>
-          <a-button
-            type="link"
-            class="button-info"
-            @click="openCpModal"><a-icon type="plus" /> 添加活动产品</a-button>
+            @click="openCpModal"><a-icon type="plus" /> 添加产品</a-button>
         </a-col>
       </a-row>
     </div>
@@ -200,15 +194,31 @@
           type="link"
           :loading="delLoading"
           class="button-primary"
-          @click="handleDel(record)"
+          @click="handleUpdateActive(record)"
         >换促销</a-button>
       </template>
+      <template slot="footer" slot-scope="currentPageData">
+        <!-- 总计 -->
+        <a-alert type="info" banner :showIcon="false">
+            <div slot="message" class="alert-bar">
+              <div>
+                还需门槛产品金额1000/4000(5000),已选择0元(可使用8000元配额)正价产品,已选择8个正价产品(满10送2),<strong>再满2件产品,可享受优惠</strong>,差200元到订单起订金额(1800元),可选择4个促销产品,已选择2个促销产品
+              </div>
+              <div>
+                <div v-if="$hasPermissions('B_salesEdit_salesPrice')">总金额:<strong>{{ detailData&&(detailData.totalCommonAmount || detailData.totalCommonAmount==0) ? toThousands(detailData.totalCommonAmount) : '--' }}</strong></div>
+                <div v-if="$hasPermissions('B_salesEdit_salesPrice')">优惠金额:<strong>{{ detailData&&(detailData.totalCommonAmount || detailData.totalCommonAmount==0) ? toThousands(detailData.totalCommonAmount) : '--' }}</strong></div>
+              </div>
+            </div>
+          </a-alert>
+      </template>
     </s-table>
-   
+    
       <!-- 导入产品 -->
-      <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn}" @close="closeGuideModel" @ok="hanldeOk" />
+      <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn}" @close="closeGuideModel" @ok="hanldeImportOk" />
       <!-- 仓库设置 -->
       <setWarehouse :show="openWarehouseModal" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
+      <!-- 换促销 -->
+      <updateActiveModal :show="openUpActiveModal" @ok="upActiveOk" @cancel="openUpActiveModal=false"></updateActiveModal>
   </div>
 </template>
 
@@ -217,6 +227,7 @@
   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'
@@ -232,7 +243,8 @@
       chooseWarehouse,
       setWarehouse,
       ProductBrand,
-      productTypeAll
+      productTypeAll,
+      updateActiveModal
     },
     props: {
       openModal: { //  弹框显示状态
@@ -297,7 +309,8 @@
         },
         productType: [],
         rowSelectionInfo: null,
-        warehouseDataList: []
+        warehouseDataList: [],
+        openUpActiveModal: false
       }
     },
     computed: {
@@ -351,6 +364,25 @@
       rowSelectionFun (obj) {
         this.rowSelectionInfo = obj || null
       },
+      //  产品分类  change
+      changeProductType (val, opt) {
+        this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+        this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+        this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+      },
+      //  重置
+      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.$refs.table.refresh(!!flag)
+      },
+      // 删除全部产品
       handleBatchDelAll () {
         const _this = this
         if (_this.dataSource.length == 0) {
@@ -439,12 +471,6 @@
           _this.spinning = false
         })
       },
-      //  产品分类  change
-      changeProductType (val, opt) {
-        this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-        this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-        this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
-      },
       handleMenuClick (e) {
         const _this = this
         if (e.key == 0) { // 仓库设置
@@ -459,6 +485,13 @@
           this.handleBatchDelAll()
         }
       },
+      // 换促销
+      upActiveOk(data){
+        this.openUpActiveModal = false
+      },
+      handleUpdateActive(record){
+        this.openUpActiveModal = true
+      },
       // 已选产品  blur
       onCellBlur (val, record) {
         const _this = this
@@ -480,40 +513,7 @@
           record.qty = record.qtyBackups
         }
       },
-      //  重置
-      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.$refs.table.refresh(!!flag)
-      },
-      // 整单删除
-      delSalerDetailAll () {
-        const _this = this
-        this.$confirm({
-          title: '提示',
-          content: '确认要整单删除吗?',
-          centered: true,
-          closable: true,
-          onOk () {
-            _this.delLoading = true
-            _this.spinning = true
-            salesDetailDelAll({ salesBillSn: _this.salesBillSn }).then(res => {
-              if (res.status == 200) {
-                _this.resetSearchForm()
-                _this.$message.success(res.message)
-              }
-              _this.delLoading = false
-              _this.spinning = false
-            })
-          }
-        })
-      },
+    
       // 删除产品
       handleDel (row) {
         const _this = this
@@ -570,20 +570,22 @@
           if (res.status == 200) {
             this.resetSearchForm()
             this.$message.success('产品添加成功', 2.5)
-            this.spinning = false
-          } else {
-            this.spinning = false
           }
+          this.spinning = false
           this.isInster = false
         }).catch(err => {
           this.isInster = false
+          this.spinning = false
         })
       },
+      // 导入产品
+      handleImportClick(e){
+        this.openGuideModal = true
+      },
       closeGuideModel () {
         this.openGuideModal = false
       },
-      // 导入产品
-      hanldeOk (obj) {
+      hanldeImportOk (obj) {
         salesBatchInsert(obj).then(res => {
           if (res.status == 200) {
             this.$refs.table.refresh(true)
@@ -599,6 +601,7 @@
    .alert-bar{
     display: flex;
     justify-content: space-between;
+    align-items: center;
     > div{
       &:first-child{
         flex-grow: 1;

+ 14 - 36
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!-- 筛选条件 -->
-    <div class="table-page-search-wrapper" style="margin:0" v-show="showSearch">
+    <div class="table-page-search-wrapper" style="margin:0">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="4" :sm="24">
@@ -36,16 +36,7 @@
         </a-row>
       </a-form>
     </div>
-    <!-- 总计 -->
-    <div class="table-page-search-wrapper">
-      <a-alert type="info" banner :showIcon="false">
-        <div slot="message">
-            <span v-if="$hasPermissions('B_salesEdit_salesPrice')">总售价:<strong>{{ detailData&&(detailData.totalCommonAmount || detailData.totalCommonAmount==0) ? toThousands(detailData.totalCommonAmount) : '--' }}</strong>;</span>
-            总款数:<strong>{{ detailData&&(detailData.totalCommonCategory || detailData.totalCommonCategory==0) ? detailData.totalCommonCategory : '--' }}</strong>;
-            总数量:<strong>{{ detailData&&(detailData.totalCommonQty || detailData.totalCommonQty==0) ? detailData.totalCommonQty : '--' }}</strong>;
-        </div>
-      </a-alert>
-    </div>
+    
     <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;">
@@ -69,10 +60,10 @@
           <span v-if="selectTotal" style="margin-left:5px;">已选{{ selectTotal }}项</span>
         </a-col>
         <a-col :md="12" :sm="24" style="text-align:right;">
-          <a-button
+          <!-- <a-button
             type="link"
             class="button-info"
-             @click="showSearch=!showSearch" ><a-icon type="search"/> 筛选</a-button>
+             @click="showSearch=!showSearch" ><a-icon type="search"/> 筛选</a-button> -->
           <a-button
             type="link"
             class="button-info"
@@ -161,6 +152,16 @@
           @click="handleDel(record)"
         >删除</a-button>
       </template>
+      <template slot="footer" slot-scope="currentPageData">
+        <!-- 总计 -->
+        <a-alert type="info" banner :showIcon="false">
+          <div slot="message">
+              <span v-if="$hasPermissions('B_salesEdit_salesPrice')">总售价:<strong>{{ detailData&&(detailData.totalCommonAmount || detailData.totalCommonAmount==0) ? toThousands(detailData.totalCommonAmount) : '--' }}</strong>;</span>
+              总款数:<strong>{{ detailData&&(detailData.totalCommonCategory || detailData.totalCommonCategory==0) ? detailData.totalCommonCategory : '--' }}</strong>;
+              总数量:<strong>{{ detailData&&(detailData.totalCommonQty || detailData.totalCommonQty==0) ? detailData.totalCommonQty : '--' }}</strong>;
+          </div>
+        </a-alert>
+      </template>
     </s-table>
 
       <!-- 导入产品 -->
@@ -439,29 +440,6 @@
         this.productType = []
         this.$refs.table.refresh(!!flag)
       },
-      // 整单删除
-      delSalerDetailAll () {
-        const _this = this
-        this.$confirm({
-          title: '提示',
-          content: '确认要整单删除吗?',
-          centered: true,
-          closable: true,
-          onOk () {
-            _this.delLoading = true
-            _this.spinning = true
-            salesDetailDelAll({ salesBillSn: _this.salesBillSn }).then(res => {
-              if (res.status == 200) {
-                _this.resetSearchForm()
-                // _this.$refs.promotable.resetCurForm()
-                _this.$message.success(res.message)
-              }
-              _this.delLoading = false
-              _this.spinning = false
-            })
-          }
-        })
-      },
       // 删除产品
       handleDel (row) {
         const _this = this

+ 116 - 0
src/views/salesManagement/salesQueryNew/comps/updateActiveModal.vue

@@ -0,0 +1,116 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    width="450px"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div style="padding: 0 30px;">
+        <aRadioGroup v-model="upActiveVal">
+          <aRadio :style="radioStyle" value="1">
+            不参加促销
+          </aRadio>
+          <div>
+            <strong>520以爱之名保护你</strong> 
+            <a-popover title="活动详情">
+              <template slot="content">
+                <ul class="active-li">
+                  <li><strong>促销类型:</strong> 买产品送产品</li>
+                  <li><strong>促销门槛:</strong> 购买1000元门槛产品,可使用200元配额,采购正价产品</li>
+                  <li><strong>促销规则:</strong> 购买满10个正价产品,送10个促销产品</li>
+                  <li><strong>显示正价产品款数:</strong> 40</li>
+                  <li><strong>订单起订金额:</strong> 20000</li>
+                  <li><strong>活动经费上线:</strong> 5000</li>
+                </ul>
+              </template>
+              <a-button type="link">详情</a-button>
+            </a-popover>
+          </div>
+          <aRadio :style="radioStyle" value="2">
+            1、满10送2
+          </aRadio>
+          <aRadio :style="radioStyle" value="3">
+            2、满10000送500(5%)采购额
+          </aRadio>
+          <div>
+            <strong>滤清器秋季大派送</strong>
+            <a-popover title="活动详情">
+              <template slot="content">
+                <ul class="active-li">
+                  <li><strong>促销类型:</strong> 买产品送产品</li>
+                  <li><strong>促销门槛:</strong> 购买1000元门槛产品,可使用200元配额,采购正价产品</li>
+                  <li><strong>促销规则:</strong> 购买满10个正价产品,送10个促销产品</li>
+                  <li><strong>显示正价产品款数:</strong> 40</li>
+                  <li><strong>订单起订金额:</strong> 20000</li>
+                  <li><strong>活动经费上线:</strong> 5000</li>
+                </ul>
+              </template>
+              <a-button type="link">详情</a-button>
+            </a-popover>
+          </div>
+          <aRadio :style="radioStyle" value="4">
+            1、满20送5
+          </aRadio>
+          <aRadio :style="radioStyle" value="5">
+            2、特价产品,33元(8折)                                                                                                                                                                          
+          </aRadio>
+        </aRadioGroup>
+      </div>
+        <div style="padding: 30px 0 0;text-align: center;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
+        </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+export default {
+  name: 'SetWarehouse',
+  mixins: [commonMixin],
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '确定换促销活动?',
+      confirmLoading: false,
+      upActiveVal: null,
+      radioStyle:"display:block;height: '30px';lineHeight: '30px';padding:5px 0;"
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      if(_this.upActiveVal){
+        _this.$emit('ok', _this.upActiveVal)
+      }else{
+        _this.$message.info("请选择活动规则!")
+      }
+    },
+    cancel () {
+      this.opened = false
+      this.upActiveVal = null
+      this.$emit('cancel')
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.upActiveVal = null
+      }
+    }
+  }
+}
+</script>

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

@@ -3,7 +3,12 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
         <template slot="subTitle" v-if="!bizSn">
-          <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
+          <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.salesBillNo }}</span>
+          <span v-if="detailData&&detailData.salesBillNoSource">(原:{{ detailData&&detailData.salesBillNoSource || '--' }})</span>
+          <span style="margin-left:15px;color:#00aaff;cursor:pointer;"  @click="showDetail=!showDetail">
+            <a-icon title="查看信息" type="eye"/> 查看信息
+          </span>
         </template>
         <template slot="extra">
           <a-button
@@ -42,26 +47,20 @@
         </template>
       </a-page-header>
       <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="salesDetail-cont">
-        <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="基础信息">
-            <a-descriptions size="small" :column="3">
-              <a-descriptions-item label="销售单号" :span="2">
-                {{ detailData&&detailData.salesBillNo || '--' }}
-                <span v-if="detailData&&detailData.salesBillNoSource">(原:{{ detailData&&detailData.salesBillNoSource || '--' }})</span>
-              </a-descriptions-item>
-              <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="收货地址" :span="2">{{ shippingAddress }}</a-descriptions-item>
-              <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="收货人">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="收货电话">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
-            </a-descriptions>
-          </a-collapse-panel>
-        </a-collapse>
+      <a-card size="small" :bordered="false" class="pages-wrap" style="margin-bottom: 8px;" v-show="showDetail">
+        <div style="padding: 0;">
+          <a-descriptions size="small" :column="3">
+            <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货地址" :span="2">{{ shippingAddress||'--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货人">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货电话">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </div>
       </a-card>
       <a-card size="small" :bordered="false" class="pages-wrap">
         <!-- alert -->
@@ -282,6 +281,7 @@ export default {
         })
       },
       localDataSource: [],
+      showDetail: false,
       openModal: false,
       detailData: null, //  详情数据
       nowType: null,

+ 30 - 17
src/views/salesManagement/salesQueryNew/edit.vue

@@ -14,17 +14,19 @@
       </a-page-header>
       <!-- 单据详情 -->
       <a-card size="small" :bordered="false" class="salesEdit-cont" v-show="showDetail">
-        <a-descriptions size="small" :column="3">
-          <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收货地址" :span="2">{{ shippingAddress||'--' }}</a-descriptions-item>
-          <a-descriptions-item label="收货人">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收货电话">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
-        </a-descriptions>
+        <div style="padding: 10px;">
+          <a-descriptions size="small" :column="3">
+            <a-descriptions-item label="客户名称">{{ detailData&&detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货地址" :span="2">{{ shippingAddress||'--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货人">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收货电话">{{ detailData&&detailData.salesBillExtEntity&&detailData.salesBillExtEntity.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </div>
       </a-card>
       <!-- 正常产品 -->
       <a-card size="small" :bordered="false" class="salesEdit-cont" v-if="salesBillSn">
@@ -46,7 +48,7 @@
             <a-icon title="查看活动详情" type="eye"/> 活动详情
           </span>
           <span style="margin:0 20px;color:#ff0800;cursor: pointer;" @click="(event) => {disabledActive(event, item.activeId)}">
-            <a-icon title="禁用活动" type="disconnect"/> 禁用活动
+            <a-icon title="禁用规则" type="disconnect"/> 禁用规则
           </span>
         </div>
         <div slot="extra" @click="tooglePanel(item)" style="cursor: pointer;">{{ item.isActive ? '收起' : '展开' }} <a-icon type="caret-right" :rotate="item.isActive ? 90 : 0"/> </div>
@@ -198,8 +200,14 @@ export default {
         this.showCpModal = true
     },
     // 新增产品
-    insterProduct(row, promotionFlag){
-      this.$refs[this.cpCurRefId][0].insterProduct(row, promotionFlag)
+    insterProduct(row, promotionFlag, type){
+      // 正常产品
+      if(type == 0){
+        this.$refs.productNormalList.insterProduct(row, promotionFlag)
+      }else{
+        // 活动产品
+        this.$refs[this.cpCurRefId][0].insterProduct(row, promotionFlag)
+      }
     },
     // 选择价格类型  并更新
     updatePrice (type) {
@@ -268,12 +276,12 @@ export default {
     disabledActive(e,id){
       const _this = this
       this.$confirm({
-        title: '禁用活动?',
+        title: '确定禁用规则?',
         centered: true,
         content: <div>
           <div>禁用规则后,将无法享受该活动规则优惠</div>
           <div style="padding:10px 0;">
-            <aRadioGroup vModel={_this.disabledActiveOption}>
+            <aRadioGroup onChange={_this.changeDaOpt}>
               <aRadio style="display:block;height: '30px';lineHeight: '30px';padding:5px 0;" value="1">
                 删除规则中相关产品
               </aRadio>
@@ -284,7 +292,12 @@ export default {
           </div>
         </div>,
         onOk() {
-           console.log(_this.disabledActiveOption)
+          if(_this.disabledActiveOption){
+            _this.disabledActiveOption = null
+          }else{
+            _this.$message.info("请选择如何禁用规则!")
+            return true
+          }
         },
         onCancel() {
           _this.disabledActiveOption = null

+ 36 - 26
src/views/salesManagement/salesQueryNew/list.vue

@@ -1,8 +1,8 @@
 <template>
+ <div>
   <a-card size="small" :bordered="false" class="salesManagementList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 搜索条件 -->
-      <div ref="tableSearch" class="table-page-search-wrapper">
+    <!-- 搜索条件 -->
+    <div ref="tableSearch" class="table-page-search-wrapper" style="margin: 0;">
         <a-form layout="inline">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -20,12 +20,12 @@
                 <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+            <a-col :md="6" :sm="24">
                 <a-form-item label="采购单号">
                   <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
                 </a-form-item>
               </a-col>
+            <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="备货打印状态">
                   <v-select
@@ -85,9 +85,18 @@
                   <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="促销单">
+                  <v-select
+                    v-model="queryParam.cxFlag"
+                    ref="cxFlag"
+                    code="FLAG"
+                    placeholder="请选择是否促销单"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
             </template>
-            <a-col :md="6" :sm="24">
-              <span class="table-page-search-submitButtons">
+            <a-col :md="24" :sm="24" style="text-align: center;">
                 <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                 <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 <a-button
@@ -103,19 +112,17 @@
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'"/>
                 </a>
-              </span>
             </a-col>
           </a-row>
         </a-form>
       </div>
+  </a-card>
+  <a-card size="small" :bordered="false" class="salesManagementList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesAdd')" @click="handleAdd">新增</a-button>
-      </div>
-      <!-- alert -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">
-          <div style="display: flex;justify-content: space-between;align-items: center;">
+      <div class="table-operator" style="display: flex;justify-content: space-between;align-items: center;">
+        <div style="padding-right: 15px;"><a-button type="primary" class="button-error" v-if="$hasPermissions('B_salesAdd')" @click="handleAdd">新增</a-button></div>
+        <div style="flex-grow: 1;display: flex;justify-content: space-between;align-items: center;">
             <div>
               <div>
                 总单数:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
@@ -134,10 +141,13 @@
                 已发货金额:<strong>{{ totalData&&(totalData.totalDispatchAmount || totalData.totalDispatchAmount==0) ? toThousands(totalData.totalDispatchAmount) : '--' }}</strong>;
               </div>
             </div>
-            <a-checkbox v-model="showCancelNum"><span style="display: inline-block;margin-top: 1px;">显示取消数量</span></a-checkbox>
+            <div>
+              <a-checkbox v-model="showCancelNum"><span style="display: inline-block;margin-top: 1px;">显示促销单</span></a-checkbox>
+              <a-checkbox v-model="showCancelNum"><span style="display: inline-block;margin-top: 1px;">显示取消数量</span></a-checkbox>
+            </div>
           </div>
-        </div>
-      </a-alert>
+      </div>
+      
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"
@@ -263,6 +273,7 @@
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
   </a-card>
+ </div>
 </template>
 
 <script>
@@ -387,9 +398,7 @@ export default {
         { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '8%', align: 'center', ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
-        // { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已下推数量', dataIndex: 'totalPushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '已发货数量', dataIndex: 'totalDispatchQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
@@ -399,15 +408,16 @@ export default {
         { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
+      
+      if (this.$hasPermissions('M_salesQueryList_salesPrice')) { // 售价权限
+        arr.splice(6, 0, { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8, 0, { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
       if (this.showCancelNum) {
         const ind = this.$hasPermissions('M_salesQueryList_salesPrice') ? 10 : 8
         arr.splice(ind, 0, { title: '已取消数量', dataIndex: 'totalCancelQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
         arr.splice(ind + 1, 0, { title: '待下推数量', dataIndex: 'totalUnpushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
-      if (this.$hasPermissions('M_salesQueryList_salesPrice')) { // 售价权限
-        arr.splice(6, 0, { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-      }
       return arr
     }
   },
@@ -568,7 +578,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 290
+      this.tableHeight = window.innerHeight - tableSearchH - 265
     }
   },
   watch: {
@@ -608,8 +618,8 @@ export default {
 </script>
 <style lang="less" scoped>
   .salesManagementList-wrap{
+    margin-bottom: 6px;
     .sTable{
-      margin-top: 10px;
       .badge-con-t{
         .ant-badge-count{
           transform: scale(0.8);