chenrui 2 mesi fa
parent
commit
1b16e010d0

+ 15 - 3
src/api/allocateReport.js

@@ -9,7 +9,7 @@ export const allocateReportList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -31,7 +31,7 @@ export const allocateReportDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -51,7 +51,19 @@ export const allocateReportDetailExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}
+
+export const allocateReportExportExcel = (params) => {
+  return axios({
+    url: '/report/allocateReport/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
       'module': encodeURIComponent('导出')
     }
   })

+ 3 - 3
src/views/productManagement/foreignTradeGoods/list.vue

@@ -210,9 +210,9 @@ export default {
     },
     //  产品分类  change
     changeProductType (val, opt) {
-      this.queryParam.product.productTypeSn1 = val[0] ? val[0] : undefined
-      this.queryParam.product.productTypeSn2 = val[1] ? val[1] : undefined
-      this.queryParam.product.productTypeSn3 = val[2] ? val[2] : undefined
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : undefined
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : undefined
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : undefined
     },
     pageInit () {
       const _this = this

+ 77 - 36
src/views/reportData/allocationOrderTotal/list.vue

@@ -29,41 +29,43 @@
                 <dealerSubareaScopeList ref="custList" id="allocationOrderTotalList-buyerSn" :itemSn="queryParam.buyerSn" @change="custChange"></dealerSubareaScopeList>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="客户类型">
-                <v-select
-                  v-model="queryParam.dealerType"
-                  id="allocationOrderTotalList-dealerType"
-                  code="Flag"
-                  placeholder="请选择客户类型"
-                  allowClear></v-select>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="费用/调拨类型">
-                <AllocateType id="allocationOrderTotalList-allocateTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
-              <a-form-model-item label="客服">
-                <customerService ref="customerName" id="allocationOrderTotalList-customerName" v-model="queryParam.bizUserSn"></customerService>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="操作员">
-                <a-select
-                  id="allocationOrderTotalList-creatorId"
-                  allowClear
-                  v-model="queryParam.creatorId"
-                  placeholder="请选择操作员"
-                  :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>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="isShowCustomerSearch?6:24" :sm="24" style="margin-bottom: 10px;" :style="{textAlign: !isShowCustomerSearch?'center':''}">
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户类型">
+                  <v-select
+                    v-model="queryParam.dealerType"
+                    id="allocationOrderTotalList-dealerType"
+                    code="Flag"
+                    placeholder="请选择客户类型"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="费用/调拨类型">
+                  <AllocateType id="allocationOrderTotalList-allocateTypeSn" v-model="allocateTypeVal" :changeOnSelect="true" placeholder="请选择费用/调拨类型" @change="changeAllocatype"></AllocateType>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24" v-show="isShowCustomerSearch">
+                <a-form-model-item label="客服">
+                  <customerService ref="customerName" id="allocationOrderTotalList-customerName" v-model="queryParam.bizUserSn"></customerService>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="操作员">
+                  <a-select
+                    id="allocationOrderTotalList-creatorId"
+                    allowClear
+                    v-model="queryParam.creatorId"
+                    placeholder="请选择操作员"
+                    :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>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <!-- <a-button
                 type="primary"
                 class="button-info"
@@ -72,6 +74,19 @@
                 id="allocationOrderTotalList-stockDate">盘点区间日期</a-button> -->
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="allocationOrderTotalList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocationOrderTotalList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                v-if="$hasPermissions('B_allocationOrderTotalList_export')"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="allocationOrderTotalList-export">导出</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>
@@ -128,6 +143,7 @@ import { commonMixin } from '@/utils/mixin'
 import getDate from '@/libs/getDate.js'
 // 组件
 import { STable, VSelect } from '@/components'
+import { exportExcel } from '@/libs/JGPrint.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import AllocateType from '@/views/common/allocateType.js'
 import customerService from '@/views/common/customerService'
@@ -135,7 +151,7 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 // 接口
 import { allocateTypeAllList } from '@/api/allocateType'
 import { userQueryList } from '@/api/power-user'
-import { allocateReportList, allocateReportCount } from '@/api/allocateReport'
+import { allocateReportList, allocateReportCount, allocateReportExportExcel } from '@/api/allocateReport'
 export default {
   name: 'AllocationOrderTotalList',
   mixins: [commonMixin],
@@ -146,6 +162,7 @@ export default {
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       tableHeight: 0, // 表格高度
+      advanced: true, // 高级搜索 展开/关闭
       //  查询条件
       queryParam: {
         // 调拨开单日期 默认值
@@ -226,6 +243,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: {
     // 费用/调拨类型 change
     changeAllocatype (val, opts) {
@@ -262,6 +290,19 @@ export default {
         }
       })
     },
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      _this.spinning = true
+      _this.exportLoading = true
+      _this.$store.state.app.curActionPermission = 'B_allocationOrderTotalList_export'
+      exportExcel(allocateReportExportExcel, params, '调拨开单报表', function () {
+        _this.spinning = false
+        _this.exportLoading = false
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
     //  查询
     handleSearch () {
       const _this = this