lilei 1 year ago
parent
commit
188dfd5715

+ 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: {

+ 14 - 13
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>
 
       <!-- 导入产品 -->

+ 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);