lilei 6 months ago
parent
commit
0181d68d6b

+ 63 - 9
src/components/VTable/index.vue

@@ -18,10 +18,11 @@
         :cellSelectionOption="{enable: false}"
         :cellSelectionOption="{enable: false}"
         :virtual-scroll-option="{enable: !showPagination}"
         :virtual-scroll-option="{enable: !showPagination}"
         :sort-option="sortOption"
         :sort-option="sortOption"
+        :checkbox-option="checkboxOption"
       />
       />
       <div v-show="localDataSource.length==0" :style="{height:(showPagination?scroll.y-35:scroll.y)+'px',position:!showPagination?'absolute':'relative',top:!showPagination?0:''}" class="empty-data"><a-empty description="暂无数据" :image="simpleImage"/></div>
       <div v-show="localDataSource.length==0" :style="{height:(showPagination?scroll.y-35:scroll.y)+'px',position:!showPagination?'absolute':'relative',top:!showPagination?0:''}" class="empty-data"><a-empty description="暂无数据" :image="simpleImage"/></div>
       <div class="ve-pagination" :class="'ve-pagination-align-'+pageAlign">
       <div class="ve-pagination" :class="'ve-pagination-align-'+pageAlign">
-        <div class="ve-page-left" v-if="pageAlign=='left'"><slot name="page"></slot></div>
+        <div class="ve-page-left" v-if="pageAlign=='right'"><slot name="page"></slot></div>
         <a-pagination
         <a-pagination
           v-show="showPagination"
           v-show="showPagination"
           size="small"
           size="small"
@@ -35,7 +36,7 @@
           show-size-changer
           show-size-changer
           @showSizeChange="paginationShowSizeChange"
           @showSizeChange="paginationShowSizeChange"
         />
         />
-        <div class="ve-page-right" v-if="pageAlign=='right'"><slot name="page"></slot></div>
+        <div class="ve-page-right" v-if="pageAlign=='left'"><slot name="page"></slot></div>
       </div>
       </div>
     </a-spin>
     </a-spin>
   </div>
   </div>
@@ -89,11 +90,35 @@ export default {
     pageAlign: {
     pageAlign: {
       type: String,
       type: String,
       default: 'center'
       default: 'center'
+    },
+    // 是否开启多选
+    rowSelection: {
+      type: Object,
+      default: () => null
+    },
+    disableSelectedRowKeys: {
+      type: Array,
+      default: () => []
     }
     }
   },
   },
   computed: {
   computed: {
     veColumns () {
     veColumns () {
       return this.convertColumns(this.columns)
       return this.convertColumns(this.columns)
+    },
+    // 表格复选框设置
+    checkboxOption () {
+      return {
+        disableSelectedRowKeys: this.disableSelectedRowKeys,
+        selectedRowKeys: this.selectedRowKeys,
+        // 行选择改变事件
+        selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
+          this.selectedRowChange({ row, isSelected, selectedRowKeys })
+        },
+        // 全选改变事件
+        selectedAllChange: ({ isSelected, selectedRowKeys }) => {
+          this.selectedAllChange({ isSelected, selectedRowKeys })
+        }
+      }
     }
     }
   },
   },
   data () {
   data () {
@@ -130,7 +155,9 @@ export default {
         pageSize: 10,
         pageSize: 10,
         showSizeChanger: true,
         showSizeChanger: true,
         showQuickJumper: false
         showQuickJumper: false
-      }, this.pagination)
+      }, this.pagination),
+      // 选中的项
+      selectedRowKeys: []
     }
     }
   },
   },
   created () {
   created () {
@@ -139,6 +166,23 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    // 选择单元格
+    selectedRowChange ({ row, isSelected, selectedRowKeys }) {
+      this.selectedRowKeys = selectedRowKeys
+      this.onRowSelection()
+      this.$emit('selectRowChange', { row, isSelected, selectedRowKeys })
+    },
+    // 全选行
+    selectedAllChange ({ isSelected, selectedRowKeys }) {
+      this.selectedRowKeys = selectedRowKeys
+      this.onRowSelection()
+      this.$emit('selectAllRowChange', { isSelected, selectedRowKeys })
+    },
+    // 触发已选项事件
+    onRowSelection () {
+      const selectedRows = this.localDataSource.filter(item => this.selectedRowKeys.includes(item[this.rowKeyName]))
+      this.$emit('rowSelection', { selectedRows: selectedRows, selectedRowKeys: this.selectedRowKeys })
+    },
     // 通过key.key...获取属性值
     // 通过key.key...获取属性值
     getNestedPropertyValue (obj, path) {
     getNestedPropertyValue (obj, path) {
       return path.split('.').reduce(function (o, p) {
       return path.split('.').reduce(function (o, p) {
@@ -169,7 +213,7 @@ export default {
             }
             }
             return h('span', column.title)
             return h('span', column.title)
           },
           },
-          width: String(item.width).indexOf('%') >= 0 ? Number(String(item.width).replace('%', '') * windowWidth / 100) : item.width, // 百分比转数字
+          width: String(item.width).indexOf('%') >= 0 ? Number(String(item.width).replace('%', '') * windowWidth / 100) : Number(String(item.width).replace('px', '')), // 百分比转数字
           align: item.align,
           align: item.align,
           fixed: item.fixed,
           fixed: item.fixed,
           sortBy: item.sortBy || item.sorter ? '' : undefined,
           sortBy: item.sortBy || item.sorter ? '' : undefined,
@@ -199,6 +243,12 @@ export default {
           }
           }
         })
         })
       }
       }
+      // 判断是否开启多选框
+      const hasCheckbox = columns.find(item => item.type == 'checkbox')
+      // 兼容老版本表格
+      if (!hasCheckbox && this.rowSelection) {
+        ret.unshift({ title: '', field: 'checkbox', key: 'checkbox', width: 30, type: 'checkbox', align: 'center' })
+      }
       return ret
       return ret
     },
     },
     /**
     /**
@@ -284,7 +334,7 @@ export default {
       }))
       }))
       this.loadData()
       this.loadData()
     },
     },
-    // 重置表格为空
+    // 清空表格为空
     clearTable () {
     clearTable () {
       this.localLoading = false
       this.localLoading = false
       this.localDataSource = []
       this.localDataSource = []
@@ -299,10 +349,14 @@ export default {
      */
      */
     clearSelected () {
     clearSelected () {
       if (this.rowSelection) {
       if (this.rowSelection) {
-        this.selectedRows = []
         this.selectedRowKeys = []
         this.selectedRowKeys = []
-        this.updateSelect()
+        this.onRowSelection()
       }
       }
+    },
+    // 设置 table 已选中项
+    setTableSelected (selectedRowKeys) {
+      this.selectedRowKeys = selectedRowKeys
+      this.onRowSelection()
     }
     }
   }
   }
 }
 }
@@ -332,10 +386,10 @@ export default {
       padding: 20px 0 10px 0;
       padding: 20px 0 10px 0;
     }
     }
     .ve-pagination-align-right{
     .ve-pagination-align-right{
-      justify-content: flex-end;
+      justify-content: space-between;
     }
     }
     .ve-pagination-align-left{
     .ve-pagination-align-left{
-      justify-content: flex-start;
+      justify-content: space-between;
     }
     }
     .ve-pagination-align-center{
     .ve-pagination-align-center{
       justify-content: center;
       justify-content: center;

+ 3 - 3
src/config/salesManageService.js

@@ -39,7 +39,7 @@ export default {
           }
           }
         },
         },
         {
         {
-          path: 'detail/:sn/:pageType',
+          path: 'detail/:pageType/:sn',
           name: 'salesNewDetail',
           name: 'salesNewDetail',
           component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQueryNew/detail.vue'),
           component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQueryNew/detail.vue'),
           meta: {
           meta: {
@@ -51,7 +51,7 @@ export default {
           }
           }
         },
         },
         {
         {
-          path: 'detail/:sn/:pageType',
+          path: 'detail/:pageType/:sn',
           name: 'salesNewDetailAudit',
           name: 'salesNewDetailAudit',
           component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQueryNew/detail.vue'),
           component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQueryNew/detail.vue'),
           meta: {
           meta: {
@@ -63,7 +63,7 @@ export default {
           }
           }
         },
         },
         {
         {
-          path: 'detail/:sn/:pageType',
+          path: 'detail/:pageType/:sn',
           name: 'salesNewDetailTransfer',
           name: 'salesNewDetailTransfer',
           component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQueryNew/detail.vue'),
           component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQueryNew/detail.vue'),
           meta: {
           meta: {

+ 2 - 2
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -343,7 +343,7 @@ export default {
 
 
       // 没用数据,则不显示当前表格
       // 没用数据,则不显示当前表格
       if (this.dataSource.length == 0) {
       if (this.dataSource.length == 0) {
-        this.$emit('hideTable', true)
+        this.$emit('hideTable', this.type)
       }
       }
 
 
       // 格式化数据
       // 格式化数据
@@ -406,7 +406,7 @@ export default {
         text-align: center;
         text-align: center;
         padding: 20px;
         padding: 20px;
         position: absolute;
         position: absolute;
-        bottom: 50px;
+        top: 50px;
         width: 100%;
         width: 100%;
     }
     }
     .ve-table-body-td{
     .ve-table-body-td{

+ 16 - 25
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -102,18 +102,18 @@
     </div>
     </div>
 
 
     <!-- 已选配件列表 -->
     <!-- 已选配件列表 -->
-    <s-table
+    <v-table
       class="sTable"
       class="sTable"
       ref="table"
       ref="table"
       size="small"
       size="small"
       :scroll="showTotal ? null :{ y: tableHeight }"
       :scroll="showTotal ? null :{ y: tableHeight }"
-      :rowKey="(record) => record.id"
       :columns="columns"
       :columns="columns"
       :data="loadData"
       :data="loadData"
       :row-selection="{ columnWidth: 30 }"
       :row-selection="{ columnWidth: 30 }"
       @rowSelection="rowSelectionFun"
       @rowSelection="rowSelectionFun"
-      :pageSize="showTotal?10:30"
+      :pagination="{pageSize:showTotal?10:30}"
       :defaultLoadData="false"
       :defaultLoadData="false"
+      pageAlign="right"
       bordered>
       bordered>
       <!-- 产品编码 -->
       <!-- 产品编码 -->
       <template slot="productCode" slot-scope="text, record">
       <template slot="productCode" slot-scope="text, record">
@@ -122,17 +122,6 @@
         </a-badge>
         </a-badge>
         <span v-if="!(Number(record.stockQty||0) < Number(record.unpushedQty||0))">{{ text }}</span>
         <span v-if="!(Number(record.stockQty||0) < Number(record.unpushedQty||0))">{{ text }}</span>
       </template>
       </template>
-      <!-- 产品名称 -->
-      <template slot="productName" slot-scope="text, record">
-        <div class="ellipsisCon">
-          <a-tooltip placement="rightBottom">
-            <template slot="title">
-              <span>{{ text }}</span>
-            </template>
-            <span class="ellipsisText">{{ text }}</span>
-          </a-tooltip>
-        </div>
-      </template>
       <!-- 销售数量 -->
       <!-- 销售数量 -->
       <template slot="salesNums" slot-scope="text, record">
       <template slot="salesNums" slot-scope="text, record">
         <a-input-number
         <a-input-number
@@ -188,13 +177,15 @@
           @click="handleDel(record)"
           @click="handleDel(record)"
         >删除</a-button>
         >删除</a-button>
       </template>
       </template>
-    </s-table>
-    <!-- 总计 -->
-    <div v-if="showTotal" style="width: auto;display: inline-block;bottom: 10px;position: absolute;">
-      总款数:<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>
+      <!-- 总计 -->
+      <template slot="page">
+        <div v-if="showTotal" style="width: auto;display: inline-block;">
+          总款数:<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>
+      </template>
+    </v-table>
     <!-- 导入产品 -->
     <!-- 导入产品 -->
     <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: salesBillSn}" @close="closeGuideModel" @ok="hanldeOk" />
     <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: salesBillSn}" @close="closeGuideModel" @ok="hanldeOk" />
     <!-- 仓库设置 -->
     <!-- 仓库设置 -->
@@ -206,7 +197,7 @@
 
 
 <script>
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
+import { VTable, VSelect } from '@/components'
 import ImportGuideModal from './importGuideModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
 import setWarehouse from './setWarehouse.vue'
 import setWarehouse from './setWarehouse.vue'
 import updateActiveModal from './updateActiveModal.vue'
 import updateActiveModal from './updateActiveModal.vue'
@@ -227,7 +218,7 @@ export default {
   name: 'ProductList',
   name: 'ProductList',
   mixins: [commonMixin],
   mixins: [commonMixin],
   components: {
   components: {
-    STable,
+    VTable,
     VSelect,
     VSelect,
     ImportGuideModal,
     ImportGuideModal,
     chooseWarehouse,
     chooseWarehouse,
@@ -328,14 +319,14 @@ export default {
     },
     },
     // 表格高度
     // 表格高度
     tableHeight () {
     tableHeight () {
-      return window.innerHeight - 395
+      return window.innerHeight - 335
     },
     },
     // 表格列定义
     // 表格列定义
     columns () {
     columns () {
       const arr = [
       const arr = [
         { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '100px', align: 'left' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '100px', align: 'left' },
-        { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '150px', align: 'left' },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '150px', align: 'left', ellipsis: true },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '100px', align: 'center' },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '100px', align: 'center' },
         { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '100px', align: 'center' },
         { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '100px', align: 'center' },
         { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '100px', align: 'center' },
         { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '100px', align: 'center' },

+ 52 - 37
src/views/salesManagement/salesQueryNew/detail.vue

@@ -104,14 +104,14 @@
                       </a-select>
                       </a-select>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
-                  <a-col flex="260px" v-if="showTransferDealer">
+                  <a-col flex="300px" v-if="showTransferDealer">
                     <a-form-item label="发货经销商库存">
                     <a-form-item label="发货经销商库存">
                       <v-select
                       <v-select
                         code="STOCK_LABEL"
                         code="STOCK_LABEL"
                         id="purchaseOrder-basicInfo-transferQty"
                         id="purchaseOrder-basicInfo-transferQty"
                         v-model="transferQty"
                         v-model="transferQty"
                         allowClear
                         allowClear
-                        placeholder="请选择发货经销商库存是否满足"
+                        placeholder="请选择是否满足"
                       ></v-select>
                       ></v-select>
                     </a-form-item>
                     </a-form-item>
                   </a-col>
                   </a-col>
@@ -175,10 +175,12 @@
             :transferQty="transferQty"
             :transferQty="transferQty"
             :showTransferDealer="showTransferDealer"
             :showTransferDealer="showTransferDealer"
             :showCityPrice="isCityPrice"
             :showCityPrice="isCityPrice"
-            @hideTable="v=>hideNormalTable=v">
+            @hideTable="hideTable">
           </detailProductList>
           </detailProductList>
         </div>
         </div>
-        <div v-if="hideNormalTable&&hideActiveTable" :style="{height:pageHeight+30+'px'}" class="empty-data-box"><a-empty description="暂无产品" :image="simpleImage"/></div>
+        <div v-if="hideNormalTable&&hideActiveTable" :style="{height:pageHeight+10+'px'}" class="empty-data-box">
+          <a-empty description="暂无产品" :image="simpleImage"/>
+        </div>
       </a-card>
       </a-card>
       <!-- 活动产品列表 -->
       <!-- 活动产品列表 -->
       <a-card
       <a-card
@@ -186,7 +188,7 @@
         :bordered="false"
         :bordered="false"
         title="活动产品"
         title="活动产品"
         class="salesEdit-cont"
         class="salesEdit-cont"
-        v-if="activeList.length&&!hideActiveTable"
+        v-if="!hideActiveTable"
       >
       >
         <activeStatisticsList
         <activeStatisticsList
           ref="activeTjList"
           ref="activeTjList"
@@ -205,28 +207,52 @@
           :salesBillSn="$route.params.sn || bizSn"
           :salesBillSn="$route.params.sn || bizSn"
           :authCode="authCode"
           :authCode="authCode"
           :showCityPrice="isCityPrice"
           :showCityPrice="isCityPrice"
-          @hideTable="v=>hideActiveTable=v">
+          @hideTable="hideTable">
         </detailProductList>
         </detailProductList>
       </a-card>
       </a-card>
     </a-spin>
     </a-spin>
     <div class="affix-cont" :class="bizSn?'affix-footer-bar':''" :style="{padding:hideFooter?0:'7px 0 4px'}">
     <div class="affix-cont" :class="bizSn?'affix-footer-bar':''" :style="{padding:hideFooter?0:'7px 0 4px'}">
       <a-button
       <a-button
-        style="width: 100px;margin-right:20px;"
+        style="width: 100px;margin: 0 10px;"
         :disabled="spinning"
         :disabled="spinning"
         type="primary"
         type="primary"
         class="button-info"
         class="button-info"
-        id="salesDetail-audit-btn"
+        id="salesDetail-transfer-btn"
         v-if="$hasPermissions('B_salesTransfer')&&$route.params.pageType!='salesNewDetailAudit'&&(detailData&&detailData.promoFlag!=1&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')"
         v-if="$hasPermissions('B_salesTransfer')&&$route.params.pageType!='salesNewDetailAudit'&&(detailData&&detailData.promoFlag!=1&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&detailData.salesBillSource=='PURCHASE'&&detailData.orderType=='TIRE')"
         @click="handleOrder()"
         @click="handleOrder()"
       >
       >
         转单
         转单
       </a-button>
       </a-button>
       <a-button
       <a-button
-        style="width: 100px;"
+        type="primary"
+        class="button-info"
+        ghost
+        :disabled="spinning"
+        style="width: 100px;margin: 0 10px;"
+        id="salesDetail-edit-btn"
+        v-if="detailData&&detailData.salesBillSource == 'SALES' && (detailData.billStatus == 'WAIT_SUBMIT' || detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'AUDIT_REJECT' || detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesEdit')"
+        @click="handleEdit()"
+      >
+        编辑
+      </a-button>
+      <a-button
+        style="width: 100px;margin: 0 10px;"
+        :disabled="spinning"
+        type="primary"
+        ghost
+        id="salesDetail-edit1-btn"
+        v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesEdit')"
+        @click="handleChangeOrder()"
+      >
+        改单
+      </a-button>
+      <a-button
+        style="width: 100px;margin: 0 10px;"
         :disabled="spinning"
         :disabled="spinning"
         type="primary"
         type="primary"
         class="button-info"
         class="button-info"
-        id="salesDetail-audit-btn"
+        ghost
+        id="salesDetail-UPaudit-btn"
         v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
         v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesAudit')&&$route.params.pageType!='salesNewDetailTransfer'"
         @click="handleAudit()"
         @click="handleAudit()"
       >
       >
@@ -234,7 +260,7 @@
       </a-button>
       </a-button>
       <!-- 转单审核 -->
       <!-- 转单审核 -->
       <a-button
       <a-button
-        style="width: 100px;"
+        style="width: 100px;margin: 0 10px;"
         :disabled="spinning"
         :disabled="spinning"
         type="primary"
         type="primary"
         class="button-info"
         class="button-info"
@@ -245,27 +271,7 @@
         审核
         审核
       </a-button>
       </a-button>
       <a-button
       <a-button
-        type="primary"
-        :disabled="spinning"
-        style="width: 100px;margin: 0 20px;"
-        id="salesDetail-edit-btn"
-        v-if="detailData&&detailData.salesBillSource == 'SALES' && (detailData.billStatus == 'WAIT_SUBMIT' || detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'AUDIT_REJECT' || detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesEdit')"
-        @click="handleEdit()"
-      >
-        编辑
-      </a-button>
-      <a-button
-        style="width: 100px;margin: 0 20px;"
-        :disabled="spinning"
-        type="primary"
-        id="salesDetail-edit1-btn"
-        v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE'||detailData.billStatus == 'SUPERIOR_AUDIT_REJECT' || detailData.billStatus == 'TRANSFER_AUDIT_REJECT')&&$hasPermissions('B_salesEdit')"
-        @click="handleChangeOrder()"
-      >
-        改单
-      </a-button>
-      <a-button
-        style="width: 100px;"
+        style="width: 100px;margin: 0 10px;"
         :disabled="spinning"
         :disabled="spinning"
         type="primary"
         type="primary"
         class="button-success"
         class="button-success"
@@ -277,7 +283,7 @@
       </a-button>
       </a-button>
       <a-button
       <a-button
         id="salesDetail-dispatch"
         id="salesDetail-dispatch"
-        style="width: 100px;"
+        style="width: 100px;margin: 0 10px;"
         type="primary"
         type="primary"
         class="button-warning"
         class="button-warning"
         v-if="detailData&&detailData.billStatus == 'WAIT_PUSH'&&$hasPermissions('B_salesDispatch')"
         v-if="detailData&&detailData.billStatus == 'WAIT_PUSH'&&$hasPermissions('B_salesDispatch')"
@@ -434,7 +440,7 @@ export default {
     // 表格高度计算
     // 表格高度计算
     pageHeight () {
     pageHeight () {
       if (!this.bizSn && (this.hideNormalTable || this.hideActiveTable || this.activeList.length == 0)) {
       if (!this.bizSn && (this.hideNormalTable || this.hideActiveTable || this.activeList.length == 0)) {
-        return window.innerHeight - 330 + (this.hideFooter ? 45 : 0)
+        return window.innerHeight - 320 + (this.hideFooter ? 45 : 0)
       }
       }
       return 'auto'
       return 'auto'
     }
     }
@@ -459,6 +465,14 @@ export default {
         this.searchTable()
         this.searchTable()
       })
       })
     },
     },
+    // 是否隐藏表格
+    hideTable (type) {
+      if (type == 'normal') {
+        this.hideNormalTable = true
+      } else {
+        this.hideActiveTable = true
+      }
+    },
     // 编辑
     // 编辑
     handleEdit () {
     handleEdit () {
       const row = this.detailData
       const row = this.detailData
@@ -531,10 +545,10 @@ export default {
     // 查询数据
     // 查询数据
     searchTable () {
     searchTable () {
       this.hideNormalTable = false
       this.hideNormalTable = false
-      this.hideActiveTable = false
+      this.hideActiveTable = this.activeList.length == 0
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.productList.searchTable()
         this.$refs.productList.searchTable()
-        if (this.activeList.length) this.$refs.productActiveList.searchTable()
+        if (!this.hideActiveTable) this.$refs.productActiveList.searchTable()
       })
       })
     },
     },
     // 详情
     // 详情
@@ -553,9 +567,10 @@ export default {
       // 已参与活动列表
       // 已参与活动列表
       const list = await salesPromoQueryList({ salesBillSn: this.$route.params.sn || this.bizSn }).then(res => res.data || [])
       const list = await salesPromoQueryList({ salesBillSn: this.$route.params.sn || this.bizSn }).then(res => res.data || [])
       this.activeList = list.filter(item => item.promotion && item.promotionRule)
       this.activeList = list.filter(item => item.promotion && item.promotionRule)
+      this.hideActiveTable = this.activeList.length == 0
       // 触发活动统计查询变量
       // 触发活动统计查询变量
       this.$nextTick(() => {
       this.$nextTick(() => {
-        if (this.activeList.length) {
+        if (!this.hideActiveTable) {
           this.$refs.activeTjList.hasInit = false
           this.$refs.activeTjList.hasInit = false
         }
         }
       })
       })

+ 20 - 14
src/views/salesManagement/salesQueryNew/list.vue

@@ -47,18 +47,18 @@
                   allowClear></v-select>
                   allowClear></v-select>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="财务状态">
+                <v-select
+                  v-model="queryParam.financialStatus"
+                  ref="financialStatus"
+                  id="salesManagementList-financialStatus"
+                  code="FINANCIAL_RECEIVE_STATUS"
+                  placeholder="请选择财务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
             <template v-if="advanced">
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="财务状态">
-                  <v-select
-                    v-model="queryParam.financialStatus"
-                    ref="financialStatus"
-                    id="salesManagementList-financialStatus"
-                    code="FINANCIAL_RECEIVE_STATUS"
-                    placeholder="请选择财务状态"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
                 <a-form-item label="单据来源">
                 <a-form-item label="单据来源">
                   <v-select
                   <v-select
@@ -115,7 +115,7 @@
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
             </template>
             </template>
-            <a-col :md="8" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
               <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
               <a-button style="margin-left: 10px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
               <a-button style="margin-left: 10px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
               <a-button
               <a-button
@@ -392,7 +392,8 @@ export default {
         warehouseSn: undefined, // 仓库
         warehouseSn: undefined, // 仓库
         promoFlag: undefined, // 是否促销单
         promoFlag: undefined, // 是否促销单
         expenseClainFlag: undefined, // 转费用报销单状态
         expenseClainFlag: undefined, // 转费用报销单状态
-        bizUserSn: undefined // 客服
+        bizUserSn: undefined, // 客服
+        transferDealerSn: undefined// 发货经销商
       },
       },
       // 统计数据
       // 统计数据
       totalData: {
       totalData: {
@@ -517,7 +518,7 @@ export default {
         { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '最近备货时间', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '最近备货时间', dataIndex: 'lastStockUpDate', width: '6.5%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       ]
@@ -551,6 +552,10 @@ export default {
     custChange (val) {
     custChange (val) {
       this.queryParam.buyerSn = val.key
       this.queryParam.buyerSn = val.key
     },
     },
+    // 选择发货经销商
+    custTireChange (val) {
+      this.queryParam.transferDealerSn = val.key
+    },
     // 所在区域
     // 所在区域
     subareaChange (val) {
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
@@ -802,6 +807,7 @@ export default {
       this.queryParam.promoFlag = undefined
       this.queryParam.promoFlag = undefined
       this.queryParam.expenseClainFlag = undefined
       this.queryParam.expenseClainFlag = undefined
       this.queryParam.bizUserSn = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.transferDealerSn = undefined
       if (this.advanced) {
       if (this.advanced) {
         this.$refs.subarea.clearData()
         this.$refs.subarea.clearData()
       }
       }