Pārlūkot izejas kodu

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

lilei 1 gadu atpakaļ
vecāks
revīzija
9ed2fc61ce

+ 330 - 226
src/views/allocationManagement/allocateReturnConfirmation/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="transferReturnConfirmation-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="transferReturnConfirmation-wrap" style="margin-bottom:6px;">
       <!-- 搜索条件 -->
-      <div ref="tableSearch" class="table-page-search-wrapper">
+      <div ref="tableSearch" class="table-page-search-wrapper" >
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -12,35 +12,27 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调拨退货单号">
-                <a-input id="transferReturnConfirmation-allocateReturnNo" v-model.trim="queryParam.allocateReturnNo" allowClear placeholder="请输入调拨退货单号"/>
+                <a-input id="transferReturnConfirmation-allocateReturnNo" v-model.trim="queryParam.allocateReturnNo"
+                  allowClear placeholder="请输入调拨退货单号" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <a-input id="transferReturnConfirmation-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入客户名称"/>
+                <a-input id="transferReturnConfirmation-targetName" v-model.trim="queryParam.targetName" allowClear
+                  placeholder="请输入客户名称" />
               </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="是否抓单">
-                  <v-select
-                    v-model="queryParam.grabFlag"
-                    ref="grabFlag"
-                    id="transferReturnConfirmation-grabFlag"
-                    code="FLAG"
-                    placeholder="请选择"
-                    allowClear></v-select>
+                  <v-select v-model="queryParam.grabFlag" ref="grabFlag" id="transferReturnConfirmation-grabFlag"
+                    code="FLAG" placeholder="请选择" allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="状态">
-                  <v-select
-                    v-model="queryParam.state"
-                    ref="state"
-                    id="transferReturnConfirmation-state"
-                    code="ALLOCATE_RETURN_STATE_CONFIRM"
-                    placeholder="请选择状态"
-                    allowClear></v-select>
+                  <v-select v-model="queryParam.state" ref="state" id="transferReturnConfirmation-state"
+                    code="ALLOCATE_RETURN_STATE_CONFIRM" placeholder="请选择状态" allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -50,241 +42,353 @@
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="transferReturnConfirmation-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="transferReturnConfirmation-reset">重置</a-button>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled"
+                id="transferReturnConfirmation-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled"
+                id="transferReturnConfirmation-reset">重置</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
+                <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
             </a-col>
           </a-row>
         </a-form>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 销退单号 -->
-        <template slot="allocateReturnNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('M_allocateReturnConfirmationDetail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateReturnNo }}</span>
-          <span v-else>{{ record.allocateReturnNo }}</span>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            v-if="record.state=='WAIT_FINANCIAL_AUDIT' && $hasPermissions('B_allocateReturnConfirmationAudit')"
-            class="button-warning"
-            @click="handleAudit(record)"
-            id="transferReturnConfirmation-audit-btn">退货确认</a-button>
-          <span v-else>--</span>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 查看 -->
-    <AllocateReturnDetailModal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
-  </a-card>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table class="sTable fixPagination" ref="table" :style="{ height: tableHeight+84.5+'px' }" size="small"
+          :rowKey="(record) => record.id" :columns="columns" :data="loadData" :scroll="{ y: tableHeight }"
+          :defaultLoadData="false" bordered>
+          <!-- 销退单号 -->
+          <template slot="allocateReturnNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('M_allocateReturnConfirmationDetail')" class="link-bule"
+              @click="handleDetail(record)">{{ record.allocateReturnNo }}</span>
+            <span v-else>{{ record.allocateReturnNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button size="small" type="link"
+              v-if="record.state=='WAIT_FINANCIAL_AUDIT' && $hasPermissions('B_allocateReturnConfirmationAudit')"
+              class="button-warning" @click="handleAudit(record)"
+              id="transferReturnConfirmation-audit-btn">退货确认</a-button>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 查看 -->
+      <AllocateReturnDetailModal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
+    </a-card>
+  </div>
 </template>
 
 <script>
-import { commonMixin } from '@/utils/mixin'
-import rangeDate from '@/views/common/rangeDate.vue'
-import { STable, VSelect } from '@/components'
-import AllocateReturnDetailModal from './detailModal.vue'
-import chooseWarehouse from '@/views/common/chooseWarehouse'
-import { allocateReturnQueryConfirmPage, allocateReturnFinanceAudit } from '@/api/allocateReturn'
-export default {
-  name: 'AllocateReturnConfirmationList',
-  mixins: [commonMixin],
-  components: { STable, VSelect, AllocateReturnDetailModal, rangeDate, chooseWarehouse },
-  data () {
-    return {
-      spinning: false,
-      tableHeight: 0,
-      queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
-        allocateReturnNo: '', //  单号
-        targetName: '',
-        grabFlag: undefined,
-        state: undefined, //  状态
-        warehouseSn: undefined
+  import {
+    commonMixin
+  } from '@/utils/mixin'
+  import rangeDate from '@/views/common/rangeDate.vue'
+  import {
+    STable,
+    VSelect
+  } from '@/components'
+  import AllocateReturnDetailModal from './detailModal.vue'
+  import chooseWarehouse from '@/views/common/chooseWarehouse'
+  import {
+    allocateReturnQueryConfirmPage,
+    allocateReturnFinanceAudit
+  } from '@/api/allocateReturn'
+  export default {
+    name: 'AllocateReturnConfirmationList',
+    mixins: [commonMixin],
+    components: {
+      STable,
+      VSelect,
+      AllocateReturnDetailModal,
+      rangeDate,
+      chooseWarehouse
+    },
+    data() {
+      return {
+        spinning: false,
+        tableHeight: 0,
+        queryParam: { //  查询条件
+          beginDate: '',
+          endDate: '',
+          allocateReturnNo: '', //  单号
+          targetName: '',
+          grabFlag: undefined,
+          state: undefined, //  状态
+          warehouseSn: undefined
+        },
+        disabled: false, //  查询、重置按钮是否可操作
+        advanced: true,
+        // 加载数据方法 必须为 Promise 对象
+        loadData: parameter => {
+          this.disabled = true
+          this.spinning = true
+          return allocateReturnQueryConfirmPage(Object.assign(parameter, this.queryParam)).then(res => {
+            let data
+            if (res.status == 200) {
+              data = res.data
+              const no = (data.pageNo - 1) * data.pageSize
+              for (var i = 0; i < data.list.length; i++) {
+                data.list[i].no = no + i + 1
+              }
+              this.disabled = false
+            }
+            this.spinning = false
+            return data
+          })
+        },
+        openModal: false,
+        itemSn: ''
+      }
+    },
+    // 根据权限显示列表字段
+    computed: {
+      columns() {
+        const arr = [{
+            title: '序号',
+            dataIndex: 'no',
+            width: '4%',
+            align: 'center'
+          },
+          {
+            title: '创建时间',
+            dataIndex: 'createDate',
+            width: '11%',
+            align: 'center',
+            customRender: function(text) {
+              return text || '--'
+            }
+          },
+          {
+            title: '退货单号',
+            scopedSlots: {
+              customRender: 'allocateReturnNo'
+            },
+            width: '16%',
+            align: 'center'
+          },
+          {
+            title: '调拨退货客户',
+            dataIndex: 'targetName',
+            align: 'center',
+            width: '15%',
+            customRender: function(text) {
+              return text || '--'
+            },
+            ellipsis: true
+          },
+          {
+            title: '仓库',
+            dataIndex: 'warehouseName',
+            align: 'center',
+            width: '15%',
+            customRender: function(text) {
+              return text || '--'
+            },
+            ellipsis: true
+          },
+          {
+            title: '是否抓单',
+            dataIndex: 'grabFlagDictValue',
+            width: '7%',
+            align: 'center',
+            customRender: function(text) {
+              return text || '--'
+            }
+          },
+          {
+            title: '退货总数量',
+            dataIndex: 'totalQty',
+            width: '7%',
+            align: 'center',
+            customRender: function(text) {
+              return ((text || text == 0) ? text : '--')
+            }
+          },
+          {
+            title: '坏件数量',
+            dataIndex: 'totalBadQty',
+            width: '7%',
+            align: 'center',
+            customRender: function(text) {
+              return ((text || text == 0) ? text : '--')
+            }
+          },
+          {
+            title: '返库数量',
+            dataIndex: 'totalBackStockQty',
+            width: '7%',
+            align: 'center',
+            customRender: function(text) {
+              return ((text || text == 0) ? text : '--')
+            }
+          },
+          // { title: '退货总金额', dataIndex: 'totalPrice', width: '7%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+          {
+            title: '确认时间',
+            dataIndex: 'financeAuditTime',
+            width: '11%',
+            align: 'center',
+            customRender: function(text) {
+              return text || '--'
+            }
+          },
+          {
+            title: '状态',
+            dataIndex: 'stateDictValue',
+            width: '6%',
+            align: 'center',
+            customRender: function(text) {
+              return text || '--'
+            }
+          },
+          {
+            title: '操作',
+            scopedSlots: {
+              customRender: 'action'
+            },
+            width: '8%',
+            align: 'center'
+          }
+        ]
+        if (this.$hasPermissions('M_allocateReturnConfirmationList_salesPrice')) { //  售价权限
+          arr.splice(9, 0, {
+            title: '退货总金额',
+            dataIndex: 'totalPrice',
+            width: '7%',
+            align: 'right',
+            customRender: text => ((text || text == 0) ? this.toThousands(text) : '--')
+          })
+        }
+        return arr
+      }
+    },
+    methods: {
+      //  创建时间  change
+      dateChange(date) {
+        this.queryParam.beginDate = date[0]
+        this.queryParam.endDate = date[1]
       },
-      disabled: false, //  查询、重置按钮是否可操作
-      advanced: true,
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        return allocateReturnQueryConfirmPage(Object.assign(parameter, this.queryParam)).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
+      custChange(val) {
+        this.queryParam.buyerSn = val.key
+      },
+      //  重置
+      resetSearchForm() {
+        this.$refs.rangeDate.resetDate()
+        this.queryParam.beginDate = ''
+        this.queryParam.endDate = ''
+        this.queryParam.allocateReturnNo = ''
+        this.queryParam.targetName = ''
+        this.queryParam.grabFlag = undefined
+        this.queryParam.state = undefined
+        this.queryParam.warehouseSn = undefined
+        this.$refs.table.refresh(true)
+      },
+      // 详情
+      handleDetail(row) {
+        this.itemSn = row.allocateReturnSn
+        this.openModal = true
+      },
+      closeModal() {
+        this.itemSn = ''
+        this.openModal = false
+      },
+      // 单个审核
+      handleAudit(row) {
+        const _this = this
+        this.$confirm({
+          title: '提示',
+          content: '请点击下方按钮确认操作',
+          centered: true,
+          closable: true,
+          okText: '通过',
+          cancelText: '不通过',
+          onOk() {
+            _this.auditOrder(row.allocateReturnSn, 'FINISH')
+          },
+          onCancel(e) {
+            if (!e.triggerCancel) {
+              _this.auditOrder(row.allocateReturnSn, 'FINANCIAL_REJECT')
             }
-            this.disabled = false
+            _this.$destroyAll()
           }
-          this.spinning = false
-          return data
         })
       },
-      openModal: false,
-      itemSn: ''
-    }
-  },
-  // 根据权限显示列表字段
-  computed: {
-    columns () {
-      const arr = [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货单号', scopedSlots: { customRender: 'allocateReturnNo' }, width: '16%', align: 'center' },
-        { title: '调拨退货客户', dataIndex: 'targetName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '是否抓单', dataIndex: 'grabFlagDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货总数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '坏件数量', dataIndex: 'totalBadQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '返库数量', dataIndex: 'totalBackStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '退货总金额', dataIndex: 'totalPrice', width: '7%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '确认时间', dataIndex: 'financeAuditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
-      ]
-      if (this.$hasPermissions('M_allocateReturnConfirmationList_salesPrice')) { //  售价权限
-        arr.splice(9, 0, { title: '退货总金额', dataIndex: 'totalPrice', width: '7%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-      }
-      return arr
-    }
-  },
-  methods: {
-    //  创建时间  change
-    dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
-    },
-    custChange (val) {
-      this.queryParam.buyerSn = val.key
-    },
-    //  重置
-    resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
-      this.queryParam.allocateReturnNo = ''
-      this.queryParam.targetName = ''
-      this.queryParam.grabFlag = undefined
-      this.queryParam.state = undefined
-      this.queryParam.warehouseSn = undefined
-      this.$refs.table.refresh(true)
-    },
-    // 详情
-    handleDetail (row) {
-      this.itemSn = row.allocateReturnSn
-      this.openModal = true
-    },
-    closeModal () {
-      this.itemSn = ''
-      this.openModal = false
-    },
-    // 单个审核
-    handleAudit (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作',
-        centered: true,
-        closable: true,
-        okText: '通过',
-        cancelText: '不通过',
-        onOk () {
-          _this.auditOrder(row.allocateReturnSn, 'FINISH')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.allocateReturnSn, 'FINANCIAL_REJECT')
+      auditOrder(sn, flag) {
+        const _this = this
+        _this.spinning = true
+        allocateReturnFinanceAudit({
+          allocateReturnSn: sn,
+          state: flag
+        }).then(res => {
+          if (res.status == 200) {
+            _this.$message.success(res.message)
+            _this.$refs.table.refresh()
+            _this.spinning = false
+          } else {
+            _this.spinning = false
           }
-          _this.$destroyAll()
-        }
-      })
+        })
+      },
+      pageInit() {
+        const _this = this
+        this.$nextTick(() => { // 页面渲染完成后的回调
+          _this.setTableH()
+        })
+      },
+      setTableH() {
+        const tableSearchH = this.$refs.tableSearch.offsetHeight
+        this.tableHeight = window.innerHeight - tableSearchH - 226
+      }
     },
-    auditOrder (sn, flag) {
-      const _this = this
-      _this.spinning = true
-      allocateReturnFinanceAudit({ allocateReturnSn: sn, state: flag }).then(res => {
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.$refs.table.refresh()
-          _this.spinning = false
-        } else {
-          _this.spinning = false
-        }
-      })
+    watch: {
+      advanced(newValue, oldValue) {
+        const _this = this
+        this.$nextTick(() => { // 页面渲染完成后的回调
+          _this.setTableH()
+        })
+      },
+      '$store.state.app.winHeight'(newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+        this.setTableH()
+      }
     },
-    pageInit () {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
+    mounted() {
+      if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+        this.pageInit()
+        this.resetSearchForm()
+      }
     },
-    setTableH () {
-      const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 200
-    }
-  },
-  watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
+    activated() {
+      // 如果是新页签打开,则重置当前页面
+      if (this.$store.state.app.isNewTab) {
+        this.pageInit()
+        this.resetSearchForm()
+      }
+      // 仅刷新列表,不重置页面
+      if (this.$store.state.app.updateList) {
+        this.pageInit()
+        this.$refs.table.refresh()
+      }
     },
-    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-      this.setTableH()
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-      this.resetSearchForm()
+    beforeRouteEnter(to, from, next) {
+      next(vm => {})
     }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-      this.resetSearchForm()
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
-    }
-  },
-  beforeRouteEnter (to, from, next) {
-    next(vm => {})
   }
-}
 </script>
 
 <style lang="less">
-  .transferReturnConfirmation-wrap{
-    .active{
+  .transferReturnConfirmation-wrap {
+    .active {
       color: #ed1c24;
       cursor: pointer;
     }
-    .common{
+
+    .common {
       color: rgba(0, 0, 0);
     }
   }
-</style>
+</style>

+ 455 - 173
src/views/allocationManagement/allocationList/list.vue

@@ -1,169 +1,207 @@
 <template>
-  <a-card size="small" :bordered="false" class="pushOrder-wrap">
-    <!-- 搜索条件 -->
-    <div ref="tableSearch" class="table-page-search-wrapper">
-      <a-form-model
-        id="allocateBillList-form"
-        ref="ruleForm"
-        class="form-model-con"
-        layout="inline"
-        :rules="rules"
-        :model="queryParam"
-        @keyup.enter.native="handleSearch">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="创建时间" prop="time">
-              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="调往对象">
-              <a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="费用/调拨类型">
-              <AllocateType id="allocateBillList-costTypeName" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
-            </a-form-model-item>
-          </a-col>
-          <template v-if="advanced">
+  <div>
+    <a-card size="small" :bordered="false" class="pushOrder-wrap" style="margin-bottom:6px;">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form-model
+          id="allocateBillList-form"
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam"
+          @keyup.enter.native="handleSearch">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="收货客户名称">
-                <dealerSearchList ref="receiverSn" @change="custChange" />
+              <a-form-model-item label="创建时间" prop="time">
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="业务状态">
-                <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="allocateBillList-state"
-                  code="ALLOCATE_STATUS2"
-                  placeholder="请选择业务状态"
+              <a-form-model-item label="调往对象">
+                <a-input
+                  id="allocateBillList-targetName"
+                  v-model.trim="queryParam.targetName"
                   allowClear
-                ></v-select>
+                  placeholder="请输入调往对象" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="调拨单号">
-                <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+              <a-form-model-item label="费用/调拨类型">
+                <AllocateType
+                  id="allocateBillList-costTypeName"
+                  v-model="allocateTypeVal"
+                  :changeOnSelect="true"
+                  placeholder="请选择费用/调拨类型"
+                  @change="changeAllocatype"></AllocateType>
               </a-form-model-item>
             </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="收货客户名称">
+                  <dealerSearchList ref="receiverSn" @change="custChange" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="allocateBillList-state"
+                    code="ALLOCATE_STATUS2"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="调拨单号">
+                  <a-input
+                    id="allocateBillList-allocateNo"
+                    v-model.trim="queryParam.allocateNo"
+                    allowClear
+                    placeholder="请输入调拨单号" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="调出仓库">
+                  <warehouse v-model="queryParam.warehouseSn" id="allocateBillList-warehouseSn" placeholder="请选择调出仓库" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="打印状态">
+                  <v-select
+                    v-model="queryParam.printState"
+                    ref="printState"
+                    id="allocateBillList-printState"
+                    code="PRINT_STATUS"
+                    placeholder="请选择打印状态"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="对单状态">
+                  <v-select
+                    v-model="queryParam.checkStatus"
+                    ref="checkStatus"
+                    id="allocateBillList-checkStatus"
+                    code="CHECK_STATUS"
+                    placeholder="请选择对单状态"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="调出仓库">
-                <warehouse
-                  v-model="queryParam.warehouseSn"
-                  id="allocateBillList-warehouseSn"
-                  placeholder="请选择调出仓库"
-                />
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="打印状态">
-                <v-select
-                  v-model="queryParam.printState"
-                  ref="printState"
-                  id="allocateBillList-printState"
-                  code="PRINT_STATUS"
-                  placeholder="请选择打印状态"
-                  allowClear
-                ></v-select>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="对单状态">
-                <v-select
-                  v-model="queryParam.checkStatus"
-                  ref="checkStatus"
-                  id="allocateBillList-checkStatus"
-                  code="CHECK_STATUS"
-                  placeholder="请选择对单状态"
-                  allowClear
-                ></v-select>
-              </a-form-model-item>
+              <a-button
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="allocateBillList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 5px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="allocateBillList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'" />
+              </a>
             </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y:tableHeight, x:1890 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 起止时间 -->
+          <template slot="promoDate" slot-scope="text, record">
+            <span v-if="record.promoStartDate || record.promoEndDate">{{ record.promoStartDate }} ~
+              {{ record.promoEndDate }}</span>
+            <span v-else>--</span>
           </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 列表 -->
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y:tableHeight, x:1890 }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 起止时间 -->
-        <template slot="promoDate" slot-scope="text, record">
-          <span v-if="record.promoStartDate || record.promoEndDate">{{ record.promoStartDate }} ~ {{ record.promoEndDate }}</span>
-          <span v-else>--</span>
-        </template>
-        <!-- 调拨单号 -->
-        <template slot="allocateNo" slot-scope="text, record">
-          <span class="link-bule" @click="handleDetail(record,2)">{{ record.allocateNo }}</span>
-        </template>
-        <!-- 发货单号  -->
-        <template slot="sendBillNo" slot-scope="text, record">
-          <span v-if="record.sendBill&&record.sendBill.sendBillNo" class="link-bule" @click="handleDetail(record,1)">{{ record.sendBill.sendBillNo }}</span>
-          <span v-else>--</span>
-        </template>
-        <!-- 调拨类型 -->
-        <template slot="allocateType" slot-scope="text, record">
-          <div>
-            <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
-            <span v-if="record.allocateSortName&&record.allocateTypeName">/</span>
-            <span v-if="record.allocateTypeName">{{ record.allocateTypeName }}</span>
-          </div>
-        </template>
-      </s-table>
-      <!-- 查看详情 -->
-      <commonModal
-        modalTit="调拨单详情"
-        bodyPadding="10px"
-        width="70%"
-        :showFooter="false"
-        :openModal="showDetailModal"
-        @cancel="showDetailModal = false">
-        <allocationDetailModal v-if="showDetailModal" :outBizSn="bizSn" />
-      </commonModal>
-      <!-- 发货单详情 -->
-      <detailModal v-drag ref="detailModal" :openModal="showTipModal" @cancel="showTipModal=false"></detailModal>
-    </a-spin>
-  </a-card>
-  </div></template>
+          <!-- 调拨单号 -->
+          <template slot="allocateNo" slot-scope="text, record">
+            <span class="link-bule" @click="handleDetail(record,2)">{{ record.allocateNo }}</span>
+          </template>
+          <!-- 发货单号  -->
+          <template slot="sendBillNo" slot-scope="text, record">
+            <span
+              v-if="record.sendBill&&record.sendBill.sendBillNo"
+              class="link-bule"
+              @click="handleDetail(record,1)">{{ record.sendBill.sendBillNo }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 调拨类型 -->
+          <template slot="allocateType" slot-scope="text, record">
+            <div>
+              <span v-if="record.allocateSortName">{{ record.allocateSortName }}</span>
+              <span v-if="record.allocateSortName&&record.allocateTypeName">/</span>
+              <span v-if="record.allocateTypeName">{{ record.allocateTypeName }}</span>
+            </div>
+          </template>
+        </s-table>
+        <!-- 查看详情 -->
+        <commonModal
+          modalTit="调拨单详情"
+          bodyPadding="10px"
+          width="70%"
+          :showFooter="false"
+          :openModal="showDetailModal"
+          @cancel="showDetailModal = false">
+          <allocationDetailModal v-if="showDetailModal" :outBizSn="bizSn" />
+        </commonModal>
+        <!-- 发货单详情 -->
+        <detailModal v-drag ref="detailModal" :openModal="showTipModal" @cancel="showTipModal=false"></detailModal>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
 
 <script>
-import { commonMixin } from '@/utils/mixin'
+import {
+  commonMixin
+} from '@/utils/mixin'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { STable, VSelect } from '@/components'
+import {
+  STable,
+  VSelect
+} from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import detailModal from '@/views/salesManagement/sendOutOrder/detailModal.vue'
 import AllocateType from '@/views/common/allocateType.js'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
 import warehouse from '@/views/common/chooseWarehouse.js'
-import { queryOverviewPage } from '@/api/allocateBill'
+import {
+  queryOverviewPage
+} from '@/api/allocateBill'
 import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
 export default {
   name: 'PushOrderManagementList',
   mixins: [commonMixin],
-  components: { STable, VSelect, allocationDetailModal, AllocateType, warehouse, dealerSearchList, rangeDate, commonModal, detailModal },
+  components: {
+    STable,
+    VSelect,
+    allocationDetailModal,
+    AllocateType,
+    warehouse,
+    dealerSearchList,
+    rangeDate,
+    commonModal,
+    detailModal
+  },
   data () {
     return {
       spinning: false,
@@ -195,7 +233,11 @@ export default {
         warehouseSn: undefined
       },
       rules: {
-        'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
+        'time': [{
+          required: true,
+          message: '请选择退货完成时间',
+          trigger: 'change'
+        }]
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -220,39 +262,279 @@ export default {
   computed: {
     columns () {
       const _this = this
-      const arr = [
-        { title: '创建时间', dataIndex: 'createDate', width: '130px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
-        { title: '起止时间', scopedSlots: { customRender: 'promoDate' }, align: 'center', width: '150px', fixed: 'left' },
-        { title: '调往对象', dataIndex: 'targetName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, fixed: 'left' },
-        { title: '省份', dataIndex: 'provinceName', align: 'center', width: '80px', customRender: function (text) { return text || '--' }, fixed: 'left' },
-        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '120px', fixed: 'left' },
-        { title: '发货单号', scopedSlots: { customRender: 'sendBillNo' }, width: '120px', align: 'center' },
-        { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '150px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总成本', dataIndex: 'totalCost', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
-        { title: '总售价', dataIndex: 'totalPrice', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
-        { title: '总数量', dataIndex: 'totalQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '费用类型', dataIndex: 'costTypeName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨类型', scopedSlots: { customRender: 'allocateType' }, width: '100px', align: 'center' },
-        { title: '调出仓库', dataIndex: 'warehouseName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '130px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '发货创建时间', dataIndex: 'sendBill.createDate', width: '130px', align: 'center', customRender: function (text) { return text || '--' } },
+      const arr = [{
+        title: '创建时间',
+        dataIndex: 'createDate',
+        width: '130px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        fixed: 'left'
+      },
+      {
+        title: '起止时间',
+        scopedSlots: {
+          customRender: 'promoDate'
+        },
+        align: 'center',
+        width: '150px',
+        fixed: 'left'
+      },
+      {
+        title: '调往对象',
+        dataIndex: 'targetName',
+        width: '150px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true,
+        fixed: 'left'
+      },
+      {
+        title: '省份',
+        dataIndex: 'provinceName',
+        align: 'center',
+        width: '80px',
+        customRender: function (text) {
+          return text || '--'
+        },
+        fixed: 'left'
+      },
+      {
+        title: '调拨单号',
+        scopedSlots: {
+          customRender: 'allocateNo'
+        },
+        align: 'center',
+        width: '120px',
+        fixed: 'left'
+      },
+      {
+        title: '发货单号',
+        scopedSlots: {
+          customRender: 'sendBillNo'
+        },
+        width: '120px',
+        align: 'center'
+      },
+      {
+        title: '客户类型',
+        dataIndex: 'dealerLevelDictValue',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '收货客户名称',
+        dataIndex: 'receiverName',
+        width: '150px',
+        align: 'left',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      },
+      {
+        title: '所在区域',
+        dataIndex: 'subareaArea.subareaName',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '所在分区',
+        dataIndex: 'subareaArea.subareaAreaName',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '总成本',
+        dataIndex: 'totalCost',
+        width: '80px',
+        align: 'right',
+        customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--')
+      },
+      {
+        title: '总售价',
+        dataIndex: 'totalPrice',
+        width: '80px',
+        align: 'right',
+        customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--')
+      },
+      {
+        title: '总数量',
+        dataIndex: 'totalQty',
+        width: '80px',
+        align: 'center',
+        customRender: function (text) {
+          return ((text || text == 0) ? text : '--')
+        }
+      },
+      {
+        title: '费用类型',
+        dataIndex: 'costTypeName',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '调拨类型',
+        scopedSlots: {
+          customRender: 'allocateType'
+        },
+        width: '100px',
+        align: 'center'
+      },
+      {
+        title: '调出仓库',
+        dataIndex: 'warehouseName',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '审核时间',
+        dataIndex: 'auditTime',
+        width: '130px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '业务状态',
+        dataIndex: 'stateDictValue',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '发货创建时间',
+        dataIndex: 'sendBill.createDate',
+        width: '130px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
 
-        { title: '发货状态', dataIndex: 'sendBill.sendFlagDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '发货编号', dataIndex: 'sendNo', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '托运日期', dataIndex: 'sendBill.sendDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收货人', dataIndex: 'sendBill.customerCacateName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '物流电话', dataIndex: 'sendBill.transportTele', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '物流单号', dataIndex: 'sendBill.transportNo', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+      {
+        title: '发货状态',
+        dataIndex: 'sendBill.sendFlagDictValue',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '发货编号',
+        dataIndex: 'sendNo',
+        width: '80px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '托运日期',
+        dataIndex: 'sendBill.sendDate',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '收货人',
+        dataIndex: 'sendBill.customerCacateName',
+        width: '80px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      },
+      {
+        title: '物流电话',
+        dataIndex: 'sendBill.transportTele',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '物流单号',
+        dataIndex: 'sendBill.transportNo',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
 
-        { title: '总件数', dataIndex: 'sendBill.totalQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收货状态', dataIndex: 'sendBill.receiveFlagDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收货时间', dataIndex: 'sendBill.receiveDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '物流情况', dataIndex: 'sendBill.transportStateDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'sendBill.transportRemark', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      {
+        title: '总件数',
+        dataIndex: 'sendBill.totalQty',
+        width: '80px',
+        align: 'center',
+        customRender: function (text) {
+          return ((text || text == 0) ? text : '--')
+        }
+      },
+      {
+        title: '收货状态',
+        dataIndex: 'sendBill.receiveFlagDictValue',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '收货时间',
+        dataIndex: 'sendBill.receiveDate',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '物流情况',
+        dataIndex: 'sendBill.transportStateDictValue',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '备注',
+        dataIndex: 'sendBill.transportRemark',
+        width: '100px',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      }
       ]
       return arr
     }
@@ -340,7 +622,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 210
+      this.tableHeight = window.innerHeight - tableSearchH - 226
     }
   },
   watch: {
@@ -376,8 +658,8 @@ export default {
 }
 </script>
 <style lang="less">
-  .pushOrder-wrap{
-    .sTable{
+  .pushOrder-wrap {
+    .sTable {
       margin-top: 10px;
     }
   }

+ 55 - 51
src/views/allocationManagement/matchSendOutOrder/list.vue

@@ -1,6 +1,6 @@
 <template>
-  <a-card size="small" :bordered="false" class="allocateBillList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="allocateBillList-wrap" style="margin-bottom:6px;">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
@@ -21,7 +21,7 @@
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="4" :sm="24" v-show="isShowWarehouse">
+              <a-col :md="6" :sm="24" v-show="isShowWarehouse">
                 <a-form-item label="调出仓库">
                   <warehouse
                     v-model="queryParam.warehouseSn"
@@ -31,7 +31,7 @@
                   />
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="业务状态">
                   <v-select
                     v-model="queryParam.state"
@@ -48,7 +48,7 @@
                   <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="对单状态">
                   <v-select
                     v-model="queryParam.checkStatus"
@@ -72,47 +72,51 @@
           </a-row>
         </a-form>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :defaultLoadData="false"
-        :scroll="{ y: tableHeight }"
-        bordered>
-        <!-- 单号 -->
-        <template slot="allocateNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('M_transferOut_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
-          <span v-else>{{ record.allocateNo }}</span>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            v-if="record.checkStatus == 'WAIT'&&$hasPermissions('B_YxAudit')"
-            class="button-warning"
-            @click="handleYxAudit(record)"
-            id="allocateBillList-checkStatus">对单通过</a-button>
-          <span v-else>--</span>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 查看详情 -->
-    <commonModal
-      modalTit="调拨单详情"
-      bodyPadding="10px"
-      width="70%"
-      :showFooter="false"
-      :openModal="showDetailModal"
-      @cancel="cancelDetail">
-      <allocationDetailModal v-if="showDetailModal" :outBizSn="bizSn" />
-    </commonModal>
-  </a-card>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :scroll="{ y: tableHeight }"
+          bordered>
+          <!-- 单号 -->
+          <template slot="allocateNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('M_transferOut_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+            <span v-else>{{ record.allocateNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.checkStatus == 'WAIT'&&$hasPermissions('B_YxAudit')"
+              class="button-warning"
+              @click="handleYxAudit(record)"
+              id="allocateBillList-checkStatus">对单通过</a-button>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 查看详情 -->
+      <commonModal
+        modalTit="调拨单详情"
+        bodyPadding="10px"
+        width="70%"
+        :showFooter="false"
+        :openModal="showDetailModal"
+        @cancel="cancelDetail">
+        <allocationDetailModal v-if="showDetailModal" :outBizSn="bizSn" />
+      </commonModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -157,7 +161,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return allocateBillList(Object.assign(parameter, this.queryParam, {authWarehouseFlag:1})).then(res => {
+        return allocateBillList(Object.assign(parameter, this.queryParam, { authWarehouseFlag: 1 })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -184,7 +188,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '9%' },
-        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '调往对象', dataIndex: 'targetName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '发货说明', dataIndex: 'explainInfo', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '9%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -196,8 +200,8 @@ export default {
         { title: '对单时间', dataIndex: 'checkDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
-      if(this.isShowWarehouse){
-        arr.splice(4,0,{ title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },)
+      if (this.isShowWarehouse) {
+        arr.splice(4, 0, { title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
       }
       return arr
     }
@@ -273,7 +277,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 200
+      this.tableHeight = window.innerHeight - tableSearchH - 226
     }
   },
   watch: {

+ 37 - 14
src/views/allocationManagement/transferReturn/detail.vue

@@ -7,19 +7,41 @@
           <a id="allocateBillDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <a-button
             v-if="isEdit"
-            type="primary"
-            size="small"
-            style="background-color: #1890ff;margin-left: 20px;border: #1890ff;"
+            type="link"
+            class="button-default"
             id="allocateBillDetail-edit-btn"
-            @click.stop="handleEdit">编辑</a-button>
+            @click.stop="handleEdit">
+            <a-icon type="edit"/>编辑
+          </a-button>
+          <a-button type="link" class="button-default" @click="showDetail=!showDetail">
+            <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
+          </a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="pageType=='pages'">
           <print :params="{allocateReturnSn: $route.params.sn || outBizSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
-      <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
-        <a-collapse :activeKey="['1']">
+      <a-card size="small" :bordered="false" :class="pageType=='pages'?'allocateBillDetail-cont':''" v-show="showDetail">
+        <a-descriptions :column="3" v-if="pageType=='pages'">
+          <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="调入仓库">{{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="费用类型">
+            {{ (basicInfoData&&basicInfoData.costTypeName) || '--' }}
+          </a-descriptions-item>
+          <a-descriptions-item label="调拨退货类型">
+            <div>
+              <span v-if="basicInfoData&&basicInfoData.allocateSortName">{{ basicInfoData.allocateSortName || '--' }}</span>
+              <span v-if="basicInfoData&&basicInfoData.allocateReturnTypeName">/{{ basicInfoData.allocateReturnTypeName || '--' }}</span>
+            </div>
+          </a-descriptions-item>
+          <a-descriptions-item label="是否抓单">{{ basicInfoData&&basicInfoData.grabFlagDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remarks) || '--' }}</a-descriptions-item>
+        </a-descriptions>
+        <a-collapse :activeKey="['1']" v-else>
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
               <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
@@ -42,7 +64,7 @@
           </a-collapse-panel>
         </a-collapse>
       </a-card>
-      <a-card size="small" :bordered="false" class="allocateBillDetail-cont">
+      <a-card size="small" :bordered="false">
         <!-- 总计 -->
         <a-alert type="info" style="margin-bottom:10px">
           <div slot="message">
@@ -82,7 +104,7 @@ export default {
       type: [Number, String],
       default: ''
     },
-    showPrice:{
+    showPrice: {
       type: Boolean,
       default: false
     },
@@ -114,7 +136,8 @@ export default {
       basicInfoData: null, //  基本信息
       localDataSource: [],
       openModal: false,
-      nowType: null
+      nowType: null,
+      showDetail: true
     }
   },
   computed: {
@@ -125,8 +148,8 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', width: '27%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', width: '27%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'product.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货数量', dataIndex: 'returnQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '坏件数量', dataIndex: 'badQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -136,10 +159,10 @@ export default {
       if (this.basicInfoData && this.basicInfoData.grabFlag == '1') {
         arr.splice(1, 0, { title: '调拨单号', dataIndex: 'allocateNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
       }
-      if(this.showPrice||this.$hasPermissions('M_transferReturnDetail_salesPrice')){
+      if (this.showPrice || this.$hasPermissions('M_transferReturnDetail_salesPrice')) {
         const ind = this.basicInfoData && this.basicInfoData.grabFlag == '1' ? 1 : 0
-        arr.splice(4+ind,0,{ title: '退货单价', dataIndex: 'price', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8+ind,0,{ title: '退货金额', dataIndex: 'totalReturnPrice', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(4 + ind, 0, { title: '退货单价', dataIndex: 'price', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(8 + ind, 0, { title: '退货金额', dataIndex: 'totalReturnPrice', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }

+ 50 - 50
src/views/allocationManagement/transferReturn/edit.vue

@@ -6,48 +6,47 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <a-button type="link" class="button-default" @click="showDetail=!showDetail">
+            <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
+          </a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
           <print :params="{allocateReturnSn: $route.params.sn || outBizSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
-      <a-card size="small" :bordered="false" v-if="basicInfoData" class="allocateBillEdit-cont">
-        <a-collapse :activeKey="['0']">
-          <a-collapse-panel key="0" header="基础信息">
-            <a-descriptions :column="3">
-              <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调入仓库">
-                <!-- <warehouse
-                style="width:200px;"
-                :allowClear="false"
-                  v-model="basicInfoData.warehouseSn"
-                  @change="updateWarehouse"
-                  id="basicInfo-warehouseSn"
-                  placeholder="请选择调入仓库"
-                /> -->
-                {{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}
-              </a-descriptions-item>
-              <a-descriptions-item label="费用/调拨退货类型">
-                <AllocateType
-                  id="allocateEdit-allocateReturnTypeSn"
-                  style="width: 220px;"
-                  v-model="allocateTypeVal"
-                  :allowClear="false"
-                  placeholder="请选择费用/调拨退货类型"
-                  @change="changeAllocateType"></AllocateType>
-              </a-descriptions-item>
-              <a-descriptions-item label="是否抓单">{{ (basicInfoData&&basicInfoData.grabFlagDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">
-                {{ (basicInfoData&&basicInfoData.remarks) }}
-                <a-icon type="form" title="编辑备注" @click="editRemark = true" style="color: dodgerblue;font-size: 14px;" />
-              </a-descriptions-item>
-            </a-descriptions>
-          </a-collapse-panel>
-        </a-collapse>
+      <a-card size="small" :bordered="false" v-if="basicInfoData" class="allocateBillEdit-cont" v-show="showDetail">
+        <a-descriptions :column="3">
+          <a-descriptions-item label="调拨退货单号">{{ (basicInfoData&&basicInfoData.allocateReturnNo) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="调拨退货对象">{{ (basicInfoData&&basicInfoData.targetTypeDictValue) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="调拨退货对象名称">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="调入仓库">
+            <!-- <warehouse
+          style="width:200px;"
+          :allowClear="false"
+            v-model="basicInfoData.warehouseSn"
+            @change="updateWarehouse"
+            id="basicInfo-warehouseSn"
+            placeholder="请选择调入仓库"
+          /> -->
+            {{ (basicInfoData&&basicInfoData.warehouseName) || '--' }}
+          </a-descriptions-item>
+          <a-descriptions-item label="费用/调拨退货类型">
+            <AllocateType
+              id="allocateEdit-allocateReturnTypeSn"
+              style="width: 220px;"
+              v-model="allocateTypeVal"
+              :allowClear="false"
+              placeholder="请选择费用/调拨退货类型"
+              @change="changeAllocateType"></AllocateType>
+          </a-descriptions-item>
+          <a-descriptions-item label="是否抓单">{{ (basicInfoData&&basicInfoData.grabFlagDictValue) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="备注">
+            {{ (basicInfoData&&basicInfoData.remarks) }}
+            <a-icon type="form" title="编辑备注" @click="editRemark = true" style="color: dodgerblue;font-size: 14px;" />
+          </a-descriptions-item>
+        </a-descriptions>
       </a-card>
       <!-- 选择产品 -->
       <a-card size="small" :bordered="false" class="allocateBillEdit-cont">
@@ -299,7 +298,7 @@ export default {
         this.disabled = true
         const dealerLevel = this.$route.params.dealerLevel == 'OTHER' ? undefined : this.$route.params.dealerLevel
         const warehouseSn = this.basicInfoData.warehouseSn
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn})).then(res => {
+        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -334,15 +333,16 @@ export default {
       openGuideModal: false, //  导入产品引导
       openModal: false,
       nowType: null,
-      allocateTypeVal: []
+      allocateTypeVal: [],
+      showDetail: true
     }
   },
-  computed:{
-    columns(){
+  computed: {
+    columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'left', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productUnit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货单价', scopedSlots: { customRender: 'returnPrice' }, width: '10%', align: 'right' },
         { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' },
@@ -350,20 +350,20 @@ export default {
       ]
       return arr
     },
-    chooseColumns(){
+    chooseColumns () {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'product.name', align: 'center', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'product.code', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', align: 'left', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'product.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货单价', scopedSlots: { customRender: 'returnPrice' }, width: '10%', align: 'right' },
         { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
-      
-      arr.splice(6,0,{ title: '退货金额', dataIndex: 'totalReturnPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-     
+
+      arr.splice(6, 0, { title: '退货金额', dataIndex: 'totalReturnPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+
       return arr
     }
   },
@@ -383,7 +383,7 @@ export default {
       _this.editRemark = false
     },
     // 修改仓库
-    updateWarehouse(warehouseSn){
+    updateWarehouse (warehouseSn) {
       this.basicInfoData.warehouseSn = warehouseSn
       this.handleEditRemark(true)
     },
@@ -542,7 +542,7 @@ export default {
           if (this.basicInfoData.costTypeSn) {
             this.allocateTypeVal = [this.basicInfoData.costTypeSn, this.basicInfoData.allocateSortSn, this.basicInfoData.allocateReturnTypeSn]
           }
-          if(flag){
+          if (flag) {
             this.$refs.table.refresh()
           }
         } else {

+ 8 - 5
src/views/allocationManagement/transferReturn/list.vue

@@ -174,7 +174,7 @@ export default {
         allocateSortSn: undefined, //  调拨类别
         allocateReturnTypeSn: undefined, // 调拨退货类型2
         state: undefined, //  业务状态
-        warehouseSn: undefined, 
+        warehouseSn: undefined,
         allocateReturnNo: '' //  调拨单号
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -183,7 +183,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return allocateReturnQueryPage(Object.assign(parameter, this.queryParam,{authWarehouseFlag: 0})).then(res => {
+        return allocateReturnQueryPage(Object.assign(parameter, this.queryParam, { authWarehouseFlag: 0 })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -223,8 +223,8 @@ export default {
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
-      if(this.$hasPermissions('M_transferReturnList_salesPrice')){
-        arr.splice(11,0,{ title: '退货总金额', dataIndex: 'totalPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      if (this.$hasPermissions('M_transferReturnList_salesPrice')) {
+        arr.splice(11, 0, { title: '退货总金额', dataIndex: 'totalPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       return arr
     }
@@ -367,7 +367,7 @@ export default {
   }
 }
 </script>
-<style lang="less">
+<style lang="less" scoped>
 	.active{
 		color: #ed1c24;
 		cursor: pointer;
@@ -375,4 +375,7 @@ export default {
 	.common{
 		color: rgba(0, 0, 0);
 	}
+  /deep/.anticon.anticon-down.ant-cascader-picker-arrow{
+  color:#ccc !important;
+  }
 </style>

+ 1 - 1
src/views/allocationManagement/transfersPrint/list.vue

@@ -208,7 +208,7 @@ import { printBase64Fun } from '@/libs/JGPrint.js'
 export default {
   name: 'TransfersPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, dealerSearchList, printModal, commonModal, recordModal, subarea, Area, commonModal, allocationDetailModal, warehouse },
+  components: { STable, VSelect, rangeDate, dealerSearchList, printModal, commonModal, recordModal, subarea, Area, allocationDetailModal, warehouse },
   data () {
     return {
       spinning: false,

+ 43 - 40
src/views/allocationManagement/transfersPrint/recordModal.vue

@@ -10,40 +10,42 @@
     width="60%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
-        <a-descriptions :column="2">
-          <a-descriptions-item label="调拨单号">
-            {{ tipData&&tipData.allocateNo }}
-          </a-descriptions-item>
-          <a-descriptions-item label="调拨类型">
-            <span v-if="tipData&&tipData.allocateSortName">{{ tipData.allocateSortName || '--' }}</span>
-            <span v-if="tipData&&tipData.allocateTypeName">/{{ tipData.allocateTypeName || '--' }}</span>
-          </a-descriptions-item>
-          <a-descriptions-item label="调往对象">
-            {{ tipData&&tipData.targetName }}
-          </a-descriptions-item>
-          <a-descriptions-item label="调出仓库">
-            {{ tipData&&tipData.warehouseName }}
-          </a-descriptions-item>
-          <a-descriptions-item label="收货客户名称">
-            {{ tipData&&tipData.receiverName }}
-          </a-descriptions-item>
-        </a-descriptions>
-        <div>
-          <s-table
-            class="sTable"
-            ref="table"
-            size="small"
-            :rowKey="(record) => record.id"
-            :columns="columns"
-            :data="loadData"
-            :defaultLoadData="false"
-            :scroll="{ y: 240 }"
-            bordered>
-          </s-table>
-        </div>
-        <div class="btn-box">
-          <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
-        </div>
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="2">
+              <a-descriptions-item label="调拨单号">
+                {{ tipData&&tipData.allocateNo }}
+              </a-descriptions-item>
+              <a-descriptions-item label="调拨类型">
+                <span v-if="tipData&&tipData.allocateSortName">{{ tipData.allocateSortName || '--' }}</span>
+                <span v-if="tipData&&tipData.allocateTypeName">/{{ tipData.allocateTypeName || '--' }}</span>
+              </a-descriptions-item>
+              <a-descriptions-item label="调往对象">
+                {{ tipData&&tipData.targetName }}
+              </a-descriptions-item>
+              <a-descriptions-item label="调出仓库">
+                {{ tipData&&tipData.warehouseName }}
+              </a-descriptions-item>
+              <a-descriptions-item label="收货客户名称">
+                {{ tipData&&tipData.receiverName ?tipData.receiverName:'--' }}
+              </a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </div>
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :defaultLoadData="false"
+        :scroll="{ y: 240 }"
+        bordered>
+      </s-table>
+      <div class="btn-box">
+        <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -138,12 +140,13 @@ export default {
 <style lang="less">
   .record-detail-modal{
     .common-main{
-      .btn-box{
-        text-align: center;
-        margin-top: 30px;
-        .ant-btn{
-          margin:0 10px;
-        }
+     margin-bottom:10px;
+    }
+    .btn-box{
+      text-align: center;
+      margin-top: 30px;
+      .ant-btn{
+        margin:0 10px;
       }
     }
   }

+ 78 - 59
src/views/reportData/actualSalesReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="actualSalesReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="actualSalesReportList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="actualSalesReportList-form"
           ref="ruleForm"
@@ -33,16 +33,16 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            
+
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-model-item label="所在区域">
-                <subarea id="actualSalesReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="actualSalesReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -71,43 +71,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2250 }"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
-          <a-row>
-            <a-col span="2">合计:</a-col>
-            <a-col span="22">
-              <a-row>
-                <a-col span="4" v-for="item in countLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-              <a-row>
-                <a-col span="24" style="padding:8px;"></a-col>
-              </a-row>
-              <a-row>
-                <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2250,y: tableHeight-126 }"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
+            <a-row>
+              <a-col span="2">合计:</a-col>
+              <a-col span="22">
+                <a-row>
+                  <a-col span="4" v-for="item in countLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="24" style="padding:8px;"></a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -140,7 +145,7 @@ export default {
         ],
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined,
           bizUserSn: undefined
@@ -162,9 +167,6 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
         return salesBillRealAmountQueryPageList(paramsPage).then(res => {
           let data
@@ -184,7 +186,18 @@ export default {
       totalData: null,
       columns: [],
       countLabel: [],
-      countBrandLabel:[]
+      countBrandLabel: []
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
     }
   },
   methods: {
@@ -263,9 +276,9 @@ export default {
         dealerLevel: undefined
       }
       this.queryParam.subareaArea = {
-          subareaSn: undefined,
-          subareaAreaSn: undefined,
-          bizUserSn: undefined
+        subareaSn: undefined,
+        subareaAreaSn: undefined,
+        bizUserSn: undefined
       }
       this.totalData = null
       if (this.advanced) {
@@ -286,33 +299,39 @@ export default {
       const _this = this
       const tableTitle = await salesBillRealReportTitle().then(res => res.data)
       this.columns = tableTitle.list
-      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
-      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
+      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
+      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
         let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
-        }else{
+        } else {
           item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 ? mw*5 : w
+        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
       this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.getTableTitle()
+      this.setTableH()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.getTableTitle()
+      this.setTableH()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 75 - 56
src/views/reportData/salesAmountReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesAmountReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesAmountReportList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="salesAmountReportList-form"
           ref="ruleForm"
@@ -35,13 +35,13 @@
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-model-item label="所在区域">
-                <subarea id="salesAmountReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea id="salesAmountReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -70,43 +70,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2250 }"
-        bordered>
-        <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
-          <a-row>
-            <a-col span="2">合计:</a-col>
-            <a-col span="22">
-              <a-row>
-                <a-col span="4" v-for="item in countLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-              <a-row>
-                <a-col span="24" style="padding:8px;"></a-col>
-              </a-row>
-              <a-row>
-                <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2250 ,y: tableHeight-136 }"
+          bordered>
+          <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
+            <a-row>
+              <a-col span="2">合计:</a-col>
+              <a-col span="22">
+                <a-row>
+                  <a-col span="4" v-for="item in countLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="24" style="padding:8px;"></a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -144,15 +149,15 @@ export default {
         citySn: undefined,
         districtSn: undefined,
         dealerLevel: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined,
           bizUserSn: undefined
-        },
+        }
       },
       columns: [],
       countLabel: [],
-      countBrandLabel:[],
+      countBrandLabel: [],
       rules: {
         'time': [{ required: true, message: '请选择销售日期', trigger: 'change' }]
       },
@@ -162,9 +167,6 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
         return salesBillReportGroupByBuyerList(paramsPage).then(res => {
           let data
@@ -184,6 +186,17 @@ export default {
       totalData: null
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  导出
     handleExport () {
@@ -279,33 +292,39 @@ export default {
       const _this = this
       const tableTitle = await salesKdxxReportTitle().then(res => res.data)
       this.columns = tableTitle.list
-      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
-      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
+      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
+      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
         let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
-        }else{
+        } else {
           item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 ? mw*5 : w
+        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
       this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.getTableTitle()
+      this.setTableH()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.getTableTitle()
+      this.setTableH()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 55 - 31
src/views/reportData/salesDetails/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesDetailsList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesDetailsList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="salesSlipReportList-form"
           ref="ruleForm"
@@ -123,34 +123,39 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2480 }"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">实售价:{{ (totalData && (totalData.totalRealSaleAmount || totalData.totalRealSaleAmount==0)) ? toThousands(totalData.totalRealSaleAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">开单价:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_costPrice')">成本:{{ (totalData && (totalData.totalRealCost || totalData.totalRealCost==0)) ? toThousands(totalData.totalRealCost) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">优惠金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
-          <!--  <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">折后金额:{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? toThousands(totalData.discountedAmount) : '--' }}</a-col>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2480 , y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">实售价:{{ (totalData && (totalData.totalRealSaleAmount || totalData.totalRealSaleAmount==0)) ? toThousands(totalData.totalRealSaleAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">开单价:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_costPrice')">成本:{{ (totalData && (totalData.totalRealCost || totalData.totalRealCost==0)) ? toThousands(totalData.totalRealCost) : '--' }}</a-col>
+              <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">优惠金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
+              <!--  <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">折后金额:{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? toThousands(totalData.discountedAmount) : '--' }}</a-col>
             <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesDetailsList_salesPrice')">折扣金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col> -->
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -287,6 +292,17 @@ export default {
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     // 盘点库存日期
     handleStock () {
@@ -398,7 +414,15 @@ export default {
       this.queryParam.dealerCountySn = val[2] ? val[2] : ''
     },
     pageInit () {
-      this.resetSearchForm()
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      _this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {

+ 348 - 75
src/views/reportData/salesOrderTotal/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesOrderTotalList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesOrderTotalList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
+      <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
           id="salesOrderTotalList-form"
           ref="ruleForm"
@@ -17,14 +17,22 @@
                 <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="销售单号">
-                <a-input id="salesOrderTotalList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                <a-input
+                  id="salesOrderTotalList-salesBillNo"
+                  v-model.trim="queryParam.salesBillNo"
+                  allowClear
+                  placeholder="请输入销售单号" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="客户名称">
-                <a-input id="salesOrderTotalList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入客户名称"/>
+                <a-input
+                  id="salesOrderTotalList-dealerName"
+                  v-model.trim="queryParam.dealerName"
+                  allowClear
+                  placeholder="请输入客户名称" />
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
@@ -49,30 +57,46 @@
                     :showSearch="true"
                     option-filter-prop="children"
                     :filter-option="filterOption">
-                    <a-select-option v-for="item in operatorList" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+                    <a-select-option
+                      v-for="item in operatorList"
+                      :key="item.sn"
+                      :value="item.sn">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesOrderTotalList-subareaSn" ref="subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
-              <a-col :md="5" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区" prop="dealerProvinceSn">
-                  <Area id="salesOrderTotalList-shippingAddrProvinceSn" defValKey="id" v-model="queryParam.dealerProvinceSn" placeholder="请选择省"></Area>
+                  <Area
+                    id="salesOrderTotalList-shippingAddrProvinceSn"
+                    defValKey="id"
+                    v-model="queryParam.dealerProvinceSn"
+                    placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button
                 type="primary"
                 class="button-info"
                 size="small"
                 @click="handleStock"
                 id="salesOrderTotalList-stockDate">盘点区间日期</a-button>
-              <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesOrderTotalList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesOrderTotalList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                @click="handleSearch"
+                :disabled="disabled"
+                id="salesOrderTotalList-refresh">查询</a-button>
+              <a-button
+                style="margin-left: 8px"
+                @click="resetSearchForm"
+                :disabled="disabled"
+                id="salesOrderTotalList-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -84,60 +108,106 @@
                 id="salesOrderTotalList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
+                <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
             </a-col>
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.salesBillNo"
-        rowKeyName="salesBillNo"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1990 }"
-        :defaultLoadData="false"
-        bordered>
-        <template slot="footer">
-          <a-row :gutter="15">
-            <a-col :md="4" :sm="24">数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">实售价:{{ (totalData && (totalData.totalRealSaleAmount || totalData.totalRealSaleAmount==0)) ? toThousands(totalData.totalRealSaleAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">开单价:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_costPrice')">成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_costPrice')&&$hasPermissions('M_salesOrderTotalList_salesPrice')">毛利:{{ (totalData && (totalData.grossProfit || totalData.grossProfit==0)) ? toThousands(totalData.grossProfit) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">返利:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? toThousands(totalData.rebateAmount) : '--' }}</a-col>
-            <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">优惠金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
-            <!-- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">折扣金额:{{ (totalData && (totalData.totalDiscountAmount || totalData.totalDiscountAmount==0)) ? toThousands(totalData.totalDiscountAmount) : '--' }}</a-col>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.salesBillNo"
+          :style="{ height: tableHeight+84.5+'px' }"
+          rowKeyName="salesBillNo"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1990, y: tableHeight-32 }"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="footer">
+            <a-row :gutter="15">
+              <a-col
+                :md="4"
+                :sm="24">数量:{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</a-col>
+              <a-col
+                :md="4"
+                :sm="24"
+                v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">实售价:{{ (totalData && (totalData.totalRealSaleAmount || totalData.totalRealSaleAmount==0)) ? toThousands(totalData.totalRealSaleAmount) : '--' }}</a-col>
+              <a-col
+                :md="4"
+                :sm="24"
+                v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">开单价:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? toThousands(totalData.totalAmount) : '--' }}</a-col>
+              <a-col
+                :md="4"
+                :sm="24"
+                v-if="$hasPermissions('M_salesOrderTotalList_costPrice')">成本:{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? toThousands(totalData.totalCost) : '--' }}</a-col>
+              <a-col
+                :md="4"
+                :sm="24"
+                v-if="$hasPermissions('M_salesOrderTotalList_costPrice')&&$hasPermissions('M_salesOrderTotalList_salesPrice')">毛利:{{ (totalData && (totalData.grossProfit || totalData.grossProfit==0)) ? toThousands(totalData.grossProfit) : '--' }}</a-col>
+              <a-col
+                :md="4"
+                :sm="24"
+                v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">返利:{{ (totalData && (totalData.rebateAmount || totalData.rebateAmount==0)) ? toThousands(totalData.rebateAmount) : '--' }}</a-col>
+              <a-col
+                :md="4"
+                :sm="24"
+                v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">优惠金额:{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? toThousands(totalData.discountAmount) : '--' }}</a-col>
+              <!-- <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">折扣金额:{{ (totalData && (totalData.totalDiscountAmount || totalData.totalDiscountAmount==0)) ? toThousands(totalData.totalDiscountAmount) : '--' }}</a-col>
             <a-col :md="4" :sm="24" v-if="$hasPermissions('M_salesOrderTotalList_salesPrice')">折后金额:{{ (totalData && (totalData.totalDiscountedAmount || totalData.totalDiscountedAmount==0)) ? toThousands(totalData.totalDiscountedAmount) : '--' }}</a-col> -->
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
-import { commonMixin } from '@/utils/mixin'
+import {
+  commonMixin
+} from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
-import { STable, VSelect } from '@/components'
+import {
+  STable,
+  VSelect
+} from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import custList from '@/views/common/custList.vue'
 import reportModal from '@/views/common/reportModal.vue'
 import Area from '@/views/common/area.js'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { userQueryList } from '@/api/power-user'
-import { reportSalesBillList, reportSalesBillCount, reportSalesBillExport } from '@/api/reportData'
+import {
+  hdExportExcel
+} from '@/libs/exportExcel'
+import {
+  userQueryList
+} from '@/api/power-user'
+import {
+  reportSalesBillList,
+  reportSalesBillCount,
+  reportSalesBillExport
+} from '@/api/reportData'
 export default {
   name: 'SalesOrderTotalList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, custList, subarea, reportModal, Area },
+  components: {
+    STable,
+    VSelect,
+    rangeDate,
+    custList,
+    subarea,
+    reportModal,
+    Area
+  },
   data () {
     return {
       spinning: false,
@@ -162,7 +232,11 @@ export default {
         dealerProvinceSn: undefined
       },
       rules: {
-        'time': [{ required: true, message: '请选择销售日期', trigger: 'change' }]
+        'time': [{
+          required: true,
+          message: '请选择销售日期',
+          trigger: 'change'
+        }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -194,16 +268,91 @@ export default {
   computed: {
     columns () {
       const _this = this
-      const arr = [
-        { title: '销售单号', dataIndex: 'salesBillNo', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '开单日期', dataIndex: 'createDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售日期', dataIndex: 'auditDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '直接绑定客户名称', dataIndex: 'directDealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '间接绑定客户名称', dataIndex: 'indirectDealerName', width: 120, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总数量', dataIndex: 'totalQty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量(促)', dataIndex: 'giftQty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      const arr = [{
+        title: '销售单号',
+        dataIndex: 'salesBillNo',
+        width: 160,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '开单日期',
+        dataIndex: 'createDate',
+        width: 130,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '销售日期',
+        dataIndex: 'auditDate',
+        width: 130,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '客户名称',
+        dataIndex: 'dealerName',
+        width: 120,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      },
+      {
+        title: '客户级别',
+        dataIndex: 'dealerLevelDictValue',
+        width: 120,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      },
+      {
+        title: '直接绑定客户名称',
+        dataIndex: 'directDealerName',
+        width: 120,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      },
+      {
+        title: '间接绑定客户名称',
+        dataIndex: 'indirectDealerName',
+        width: 120,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      },
+      {
+        title: '总数量',
+        dataIndex: 'totalQty',
+        width: 70,
+        align: 'center',
+        customRender: function (text) {
+          return ((text || text == 0) ? text : '--')
+        }
+      },
+      {
+        title: '数量(促)',
+        dataIndex: 'giftQty',
+        width: 70,
+        align: 'center',
+        customRender: function (text) {
+          return ((text || text == 0) ? text : '--')
+        }
+      }
         // { title: '实售价', dataIndex: 'totalRealSaleAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '开单价', dataIndex: 'totalAmount', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本价', dataIndex: 'totalCost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -219,37 +368,153 @@ export default {
 
       ]
       if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
-        arr.push({ title: '实售价', dataIndex: 'totalRealSaleAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.push({ title: '开单价', dataIndex: 'totalAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({
+          title: '实售价',
+          dataIndex: 'totalRealSaleAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
+        arr.push({
+          title: '开单价',
+          dataIndex: 'totalAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
       }
       if (this.$hasPermissions('M_salesOrderTotalList_costPrice')) { //  成本价权限
-        arr.push({ title: '成本价', dataIndex: 'totalCost', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.push({ title: '成本价(促)', dataIndex: 'totalGiftCost', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({
+          title: '成本价',
+          dataIndex: 'totalCost',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
+        arr.push({
+          title: '成本价(促)',
+          dataIndex: 'totalGiftCost',
+          width: 90,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
         if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
-          arr.push({ title: '毛利', dataIndex: 'grossProfit', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+          arr.push({
+            title: '毛利',
+            dataIndex: 'grossProfit',
+            width: 70,
+            align: 'right',
+            customRender: function (text) {
+              return ((text || text == 0) ? _this.toThousands(text) : '--')
+            }
+          })
         }
       }
       if (this.$hasPermissions('M_salesOrderTotalList_provincePrice')) {
-        arr.push({ title: '省级价', dataIndex: 'totalProvinceAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({
+          title: '省级价',
+          dataIndex: 'totalProvinceAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
       }
       if (this.$hasPermissions('M_salesOrderTotalList_cityPrice')) {
-        arr.push({ title: '市级价', dataIndex: 'totalCityAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({
+          title: '市级价',
+          dataIndex: 'totalCityAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
       }
       if (this.$hasPermissions('M_salesOrderTotalList_specialPrice')) {
-        arr.push({ title: '特约加盟店价', dataIndex: 'totalSpecialAmount', width: 90, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({
+          title: '特约加盟店价',
+          dataIndex: 'totalSpecialAmount',
+          width: 90,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
       }
       if (this.$hasPermissions('M_salesOrderTotalList_salesPrice')) {
-        arr.push({ title: '直接差价', dataIndex: 'directRebateAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.push({ title: '间接差价', dataIndex: 'indirectRebateAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.push({ title: '返利', dataIndex: 'rebateAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.push({ title: '优惠金额', dataIndex: 'discountAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({
+          title: '直接差价',
+          dataIndex: 'directRebateAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
+        arr.push({
+          title: '间接差价',
+          dataIndex: 'indirectRebateAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
+        arr.push({
+          title: '返利',
+          dataIndex: 'rebateAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
+        arr.push({
+          title: '优惠金额',
+          dataIndex: 'discountAmount',
+          width: 70,
+          align: 'right',
+          customRender: function (text) {
+            return ((text || text == 0) ? _this.toThousands(text) : '--')
+          }
+        })
         // arr.push({ title: '折扣金额', dataIndex: 'totalDiscountAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         // arr.push({ title: '折后金额', dataIndex: 'totalDiscountedAmount', width: 70, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
-      arr.push({ title: '操作员', dataIndex: 'operatorName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
+      arr.push({
+        title: '操作员',
+        dataIndex: 'operatorName',
+        width: 100,
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
+      })
       return arr
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     // 盘点库存日期
     handleStock () {
@@ -352,7 +617,15 @@ export default {
       })
     },
     pageInit () {
-      this.getUserList()
+      const _this = this
+      _this.getUserList()
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 236
     }
   },
   mounted () {

+ 73 - 55
src/views/reportData/salesSlipReport/list.vue

@@ -1,8 +1,8 @@
 <template>
-  <a-card size="small" :bordered="false" class="salesSlipReportList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
+  <div>
+    <a-card size="small" :bordered="false" class="salesSlipReportList-wrap searchBottomSpace">
       <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper newTableSearchName">
+      <div class="table-page-search-wrapper newTableSearchName" ref="tableSearch">
         <a-form-model
           id="salesSlipReportList-form"
           ref="ruleForm"
@@ -33,13 +33,12 @@
                   allowClear></v-select>
               </a-form-model-item>
             </a-col>
-            
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-              <a-form-model-item label="销售单号">
-                <a-input id="salesSlipReportList-allocateTypeSn" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-              </a-form-model-item>
-            </a-col>
+                <a-form-model-item label="销售单号">
+                  <a-input id="salesSlipReportList-allocateTypeSn" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                </a-form-model-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="所在区域">
                   <subarea id="salesSlipReportList-allocateTypeSn" ref="subarea" @change="subareaChange"></subarea>
@@ -47,7 +46,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域负责人">
-                    <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
+                  <BizUser v-model="queryParam.subareaArea.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -76,43 +75,48 @@
           </a-row>
         </a-form-model>
       </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :defaultLoadData="false"
-        :rowKey="(record) => record.no"
-        rowKeyName="no"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 2410 }"
-        bordered>
-        <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
-          <a-row>
-            <a-col span="2">合计:</a-col>
-            <a-col span="22">
-              <a-row>
-                <a-col span="4" v-for="item in countLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-              <a-row>
-                <a-col span="24" style="padding:8px;"></a-col>
-              </a-row>
-              <a-row>
-                <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
-                  {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
-                </a-col>
-              </a-row>
-            </a-col>
-          </a-row>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 导出提示框 -->
-    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-  </a-card>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :defaultLoadData="false"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :style="{ height: tableHeight+84.5+'px' }"
+          :scroll="{ x: 2410,y: tableHeight-136 }"
+          bordered>
+          <template slot="footer" v-if="countLabel.length||countBrandLabel.length">
+            <a-row>
+              <a-col span="2">合计:</a-col>
+              <a-col span="22">
+                <a-row>
+                  <a-col span="4" v-for="item in countLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex]||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="24" style="padding:8px;"></a-col>
+                </a-row>
+                <a-row>
+                  <a-col span="4" v-for="item in countBrandLabel" :key="item.key">
+                    {{ item.title }}:{{ totalData?(totalData[item.dataIndex] ||totalData[item.dataIndex]==0)?toThousands(totalData[item.dataIndex]):'--':'--' }}
+                  </a-col>
+                </a-row>
+              </a-col>
+            </a-row>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 导出提示框 -->
+      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -150,7 +154,7 @@ export default {
         provinceSn: undefined,
         citySn: undefined,
         districtSn: undefined,
-        subareaArea:{
+        subareaArea: {
           subareaSn: undefined,
           subareaAreaSn: undefined,
           bizUserSn: undefined
@@ -159,7 +163,7 @@ export default {
       },
       columns: [],
       countLabel: [],
-      countBrandLabel:[],
+      countBrandLabel: [],
       rules: {
         'time': [{ required: true, message: '请选择销售日期', trigger: 'change' }]
       },
@@ -169,9 +173,6 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        if (this.tableHeight == 0) {
-          this.tableHeight = window.innerHeight - 380
-        }
         const paramsPage = Object.assign(this.queryParam, { pageNo: parameter.pageNo, pageSize: parameter.pageSize }) //  有分页
         return salesBillReportList(paramsPage).then(res => {
           let data
@@ -191,6 +192,17 @@ export default {
       totalData: null
     }
   },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
   methods: {
     //  导出
     handleExport () {
@@ -287,33 +299,39 @@ export default {
       const _this = this
       const tableTitle = await salesKdxxdReportTitle().then(res => res.data)
       this.columns = tableTitle.list
-      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')<0)
-      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌')>=0)
+      this.countLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') < 0)
+      this.countBrandLabel = tableTitle.count.filter(item => item.title.indexOf('品牌') >= 0)
       this.columns.map(item => {
         let mw = 20
         if (item.customRender == 'amount') {
           mw = 15
           item.customRender = function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' }
-        }else{
+        } else {
           item.customRender = function (text) { return text || '--' }
         }
         const w = item.title.length * mw
-        const tw = w <= 80 ? mw*5 : w
+        const tw = w <= 80 ? mw * 5 : w
         item.width = tw + 'px'
         this.tableWidth = this.tableWidth + tw
       })
       this.resetSearchForm()
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 230
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.getTableTitle()
+      this.setTableH()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.getTableTitle()
+      this.setTableH()
     }
   },
   beforeRouteEnter (to, from, next) {