Browse Source

报表对接

lilei 2 years ago
parent
commit
3349146402

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1673934601359
+  "version": 1674008833292
 }

+ 59 - 0
src/api/reportData.js

@@ -172,6 +172,65 @@ export const reportSalesReturnDetailExport = params => {
     responseType: 'blob'
   })
 }
+
+// 急件冲减-分页列表
+export const reportUrgentPageList = (params) => {
+  const url = `report/reportUrgent/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 急件冲减-列表合计
+export const reportUrgentQueryCount = (params) => {
+  return axios({
+    url: 'report/reportUrgent/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 急件冲减-报表导出
+export const reportUrgentExport = params => {
+  return axios.request({
+    url: `/report/reportUrgent/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
+// 急件冲减明细-分页列表
+export const reportUrgentDetailQueryPage = (params) => {
+  const url = `report/reportUrgentDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 急件冲减明细-列表合计
+export const reportUrgentDetailQueryCount = (params) => {
+  return axios({
+    url: 'report/reportUrgentDetail/queryCount',
+    data: params,
+    method: 'post'
+  })
+}
+// 急件冲减明细-报表导出
+export const reportUrgentDetailExport = params => {
+  return axios.request({
+    url: `/report/reportUrgentDetail/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+
 // 店内调出-分页列表
 export const reportStoreCallOutPageList = (params) => {
   const url = `report/reportStoreCallOut/reportPage/${params.pageNo}/${params.pageSize}`

+ 72 - 20
src/config/router.config.js

@@ -2054,6 +2054,30 @@ export const asyncRouterMap = [
               },
             ]
           },
+          {
+            path: '/reportData/urgentItemsOffsetReport',
+            redirect: '/reportData/urgentItemsOffsetReport/index',
+            name: 'urgentItemsOffsetReport',
+            component: BlankLayout,
+            meta: {
+              title: '急件冲减报表',
+              icon: 'profile',
+              // permission: 'M_urgentItemsOffsetReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'urgentItemsOffsetReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/urgentItemsOffsetReport/index.vue'),
+                meta: {
+                  title: '急件冲减报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                }
+              },
+            ]
+          },
           {
             path: '/reportData/stockIncomeReport',
             redirect: '/reportData/stockIncomeReport/list',
@@ -2301,26 +2325,6 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'M_storeTransferOutReportList'
                 }
-              },
-              {
-                path: 'list',
-                name: 'storeTransferOutReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/storeTransferOutReport/list.vue'),
-                meta: {
-                  title: '店内调出报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
-              },
-              {
-                path: 'list',
-                name: 'storeTransferOutDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/storeTransferOutReport/detailList.vue'),
-                meta: {
-                  title: '店内调出明细报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
               }
             ]
           },
@@ -2583,6 +2587,54 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/chainReportData/chainTransferReport',
+            redirect: '/chainReportData/chainTransferReport/index',
+            name: 'chainTransferReport',
+            component: BlankLayout,
+            meta: {
+              title: '连锁调入报表',
+              icon: 'profile',
+              // permission: 'M_chainTransferReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'chainTransferReportIndex',
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainTransferReport/index.vue'),
+                meta: {
+                  title: '连锁调入报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                }
+              }
+            ]
+          },
+          {
+            path: '/chainReportData/chainCallReport',
+            redirect: '/chainReportData/chainCallReport/index',
+            name: 'chainCallReport',
+            component: BlankLayout,
+            meta: {
+              title: '连锁调出报表',
+              icon: 'profile',
+              // permission: 'M_chainCallReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'chainCallReportIndex',
+                component: () => import(/* webpackChunkName: "chainReportData" */ '@/views/chainReportData/chainCallReport/index.vue'),
+                meta: {
+                  title: '连锁调出报表列表',
+                  icon: 'profile',
+                  hidden: true,
+                }
+              }
+            ]
           }
         ]
       },

+ 3 - 29
src/views/allocationManagement/chainTransferIn/list.vue

@@ -12,16 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调出对象">
-                <a-select
-                  placeholder="请选择调出对象"
-                  allowClear
-                  id="chainTransferInList-outTenantSn"
-                  v-model="queryParam.outTenantSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in outTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-                </a-select>
+                <outTenant id="chainTransferInList-outTenantSn" v-model="queryParam.outTenantSn"></outTenant>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -135,11 +126,11 @@ import { STable, VSelect } from '@/components'
 import { formatDecimal } from '@/libs/tools'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { allocLinkagePutList, allocLinkagePutAudit } from '@/api/allocLinkagePut'
-import { getTenantList } from '@/api/allocLinkageOut'
+import outTenant from '@/views/common/outTenant.js'
 import stateIcon from '@/views/common/stateIcon'
 export default {
   name: 'AllocLinkagePutList',
-  components: { STable, VSelect, rangeDate, stateIcon },
+  components: { STable, VSelect, rangeDate, stateIcon, outTenant },
   mixins: [commonMixin],
   data () {
     return {
@@ -176,7 +167,6 @@ export default {
           return data
         })
       },
-      outTenantSnData: []
     }
   },
   computed: {
@@ -250,27 +240,11 @@ export default {
         }
       })
     },
-    // 调出对象
-    getPutTenantList () {
-      getTenantList({}).then(res => {
-        if (res.status == 200) {
-          this.outTenantSnData = res.data
-        } else {
-          this.outTenantSnData = []
-        }
-      })
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getPutTenantList()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 4 - 27
src/views/allocationManagement/chainTransferOut/basicInfoModal.vue

@@ -28,15 +28,7 @@
           ></v-select>
         </a-form-model-item>
         <a-form-model-item label="调往对象" prop="putTenantSn">
-          <a-select
-            placeholder="请选择调往对象"
-            allowClear
-            v-model="form.putTenantSn"
-            :showSearch="true"
-            option-filter-prop="children"
-            :filter-option="filterOption">
-            <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-          </a-select>
+          <outTenant id="chainTransferOut-putTenantSn" placeholder="请选择调往对象" v-model="form.putTenantSn"></outTenant>
         </a-form-model-item>
         <a-form-model-item label="备注" prop="remark">
           <a-textarea id="chainTransferOut-basicInfo-remark" :maxLength="500" v-model="form.remark" placeholder="请输入备注(最多500个字符)" allowClear />
@@ -53,10 +45,11 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
-import { getTenantList, allocLinkageOutSave } from '@/api/allocLinkageOut'
+import outTenant from '@/views/common/outTenant.js'
+import { allocLinkageOutSave } from '@/api/allocLinkageOut'
 export default {
   name: 'ChainTransferOutBasicInfoModal',
-  components: { VSelect },
+  components: { VSelect, outTenant },
   mixins: [commonMixin],
   props: {
     openModal: {
@@ -82,7 +75,6 @@ export default {
         allocationType: [{ required: true, message: '请选择调出产品类型', trigger: 'change' }],
         putTenantSn: [{ required: true, message: '请选择调往对象', trigger: 'change' }]
       },
-      putTenantSnData: [] //  调往对象  下拉数据
     }
   },
   methods: {
@@ -111,19 +103,6 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    },
-    // 调往对象
-    getPutTenantList () {
-      getTenantList({}).then(res => {
-        if (res.status == 200) {
-          this.putTenantSnData = res.data
-        } else {
-          this.putTenantSnData = []
-        }
-      })
-    }
   },
   watch: {
     //  父页面传过来的弹框状态
@@ -135,8 +114,6 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
-      } else {
-        this.getPutTenantList()
       }
     }
   }

+ 4 - 29
src/views/allocationManagement/chainTransferOut/list.vue

@@ -23,16 +23,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="调往对象">
-                  <a-select
-                    placeholder="请选择调往对象"
-                    allowClear
-                    id="chainTransferOutList-putTenantSn"
-                    v-model="queryParam.putTenantSn"
-                    :showSearch="true"
-                    option-filter-prop="children"
-                    :filter-option="filterOption">
-                    <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-                  </a-select>
+                  <outTenant id="chainTransferOutList-putTenantSn" placeholder="请选择调往对象" v-model="queryParam.putTenantSn"></outTenant>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -159,10 +150,11 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import stateIcon from '@/views/common/stateIcon'
 import getDate from '@/libs/getDate.js'
-import { allocLinkageOutList, allocLinkageAudit, allocLinkageOutDel, allocLinkageOutStock, getTenantList } from '@/api/allocLinkageOut'
+import outTenant from '@/views/common/outTenant.js'
+import { allocLinkageOutList, allocLinkageAudit, allocLinkageOutDel, allocLinkageOutStock } from '@/api/allocLinkageOut'
 export default {
   name: 'AllocLinkageOutList',
-  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
+  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon, outTenant },
   mixins: [commonMixin],
   data () {
     return {
@@ -206,7 +198,6 @@ export default {
           return data
         })
       },
-      putTenantSnData: [],
       openModal: false, //  新增编辑  弹框
       itemId: '' //  当前品牌id
     }
@@ -351,28 +342,12 @@ export default {
     handleEdit (row) {
       this.$router.push({ path: `/allocationManagement/chainTransferOut/edit/${row.id}/${row.allocationLinkageOutSn}` })
     },
-    // 调往对象
-    getPutTenantList () {
-      getTenantList({}).then(res => {
-        if (res.status == 200) {
-          this.putTenantSnData = res.data
-        } else {
-          this.putTenantSnData = []
-        }
-      })
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
       this.openModal = false
-      this.getPutTenantList()
 
       // 是否打开的页签
       const a = this.$store.state.app.isNewTab

+ 286 - 0
src/views/chainReportData/chainCallReport/detailList.vue

@@ -0,0 +1,286 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="storeTransOutDetailReport-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="入库时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="连锁调入单号">
+              <a-input id="chainTransferInReport-allocationLinkagePutNo" v-model.trim="queryParam.allocationLinkagePutNo" allowClear placeholder="请输入连锁调入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调出对象">
+              <outTenant id="chainTransferInReport-outTenantSn" v-model="queryParam.outTenantSn"></outTenant>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨产品类型">
+              <v-select
+                v-model="queryParam.allocationType"
+                ref="allocationType"
+                id="chainTransferInReport-allocationType"
+                code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                placeholder="请选择调拨产品类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="chainTransferInReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="chainTransferInReport-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="chainTransferInReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="chainTransferInReport-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainTransferInReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInReport-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('M_storeTransferOutReportExport')"
+              class="button-warning"
+              id="chainTransferInReport-export-btn">导出</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-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        产品总数量:<strong>{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          调入总成本:<strong>{{ (totalData && (totalData.outCost || totalData.outCost==0)) ? '¥'+totalData.outCost : '--' }}</strong>;
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import supplier from '@/views/common/supplier'
+import outTenant from '@/views/common/outTenant.js'
+import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier, outTenant },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      outWareTime: [],
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        productType: undefined,
+        outTenantSn:undefined,
+        allocationType: undefined,
+        allocationLinkagePutNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStoreCallOutDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '连锁调入单号', dataIndex: 'allocationLinkagePutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出对象', dataIndex: 'outTenantName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'outQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(8, 0, { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportStoreCallOutDetailTotal(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.allocationType = undefined
+      this.queryParam.outTenantSn = undefined
+      this.queryParam.allocationLinkagePutNo = ''
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productType = []
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportStoreCallOutDetailExport(params).then(res => {
+            downloadExcel(res, '连锁调入细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 46 - 0
src/views/chainReportData/chainCallReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="连锁调出报表"></a-tab-pane>
+        <a-tab-pane key="2" tab="连锁调出明细报表" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1"></report>
+      <detailReport v-show="curTab==2"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'chainTransferReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 227 - 0
src/views/chainReportData/chainCallReport/list.vue

@@ -0,0 +1,227 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="storeTransOutReport-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="入库时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="连锁调出单号">
+              <a-input id="chainTransferInReport-allocationLinkagePutNo" v-model.trim="queryParam.allocationLinkagePutNo" allowClear placeholder="请输入连锁调出单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调往对象">
+              <outTenant id="chainTransferInReport-outTenantSn" v-model="queryParam.outTenantSn"></outTenant>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨产品类型">
+              <v-select
+                v-model="queryParam.allocationType"
+                ref="allocationType"
+                id="chainTransferInReport-allocationType"
+                code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                placeholder="请选择调拨产品类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainTransferInReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInReport-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('M_storeTransferOutReportExport')"
+              class="button-warning"
+              id="chainTransferInReport-export-btn">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总单数:<strong>{{ (totalData && (totalData.productTotalCategory || totalData.productTotalCategory==0)) ? totalData.productTotalCategory : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          调入总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import outTenant from '@/views/common/outTenant.js'
+import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, outTenant },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        outTenantSn:undefined,
+        allocationType: undefined,
+        allocationLinkagePutNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择入库时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStoreCallOutPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+      storeCallOutTypeList: [] //  调拨类型
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '连锁调入单号', dataIndex: 'allocationLinkagePutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出对象', dataIndex: 'outTenantName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'putWarehouseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(5, 0, { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportStoreCallOutListTotal(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.allocationType = undefined
+      this.queryParam.outTenantSn = undefined
+      this.queryParam.allocationLinkagePutNo = ''
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportStoreCallOutExport(params).then(res => {
+            downloadExcel(res, '连锁调入报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 286 - 0
src/views/chainReportData/chainTransferReport/detailList.vue

@@ -0,0 +1,286 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="storeTransOutDetailReport-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="入库时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="连锁调入单号">
+              <a-input id="chainTransferInReport-allocationLinkagePutNo" v-model.trim="queryParam.allocationLinkagePutNo" allowClear placeholder="请输入连锁调入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调出对象">
+              <outTenant id="chainTransferInReport-outTenantSn" v-model="queryParam.outTenantSn"></outTenant>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨产品类型">
+              <v-select
+                v-model="queryParam.allocationType"
+                ref="allocationType"
+                id="chainTransferInReport-allocationType"
+                code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                placeholder="请选择调拨产品类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="chainTransferInReport-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="chainTransferInReport-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="chainTransferInReport-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="chainTransferInReport-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainTransferInReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInReport-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('M_storeTransferOutReportExport')"
+              class="button-warning"
+              id="chainTransferInReport-export-btn">导出</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-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        产品总数量:<strong>{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          调入总成本:<strong>{{ (totalData && (totalData.outCost || totalData.outCost==0)) ? '¥'+totalData.outCost : '--' }}</strong>;
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import supplier from '@/views/common/supplier'
+import outTenant from '@/views/common/outTenant.js'
+import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier, outTenant },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      outWareTime: [],
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        productType: undefined,
+        outTenantSn:undefined,
+        allocationType: undefined,
+        allocationLinkagePutNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStoreCallOutDetailList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '连锁调入单号', dataIndex: 'allocationLinkagePutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出对象', dataIndex: 'outTenantName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'outQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(8, 0, { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportStoreCallOutDetailTotal(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.allocationType = undefined
+      this.queryParam.outTenantSn = undefined
+      this.queryParam.allocationLinkagePutNo = ''
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productType = []
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportStoreCallOutDetailExport(params).then(res => {
+            downloadExcel(res, '连锁调入细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 46 - 0
src/views/chainReportData/chainTransferReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="连锁调入报表"></a-tab-pane>
+        <a-tab-pane key="2" tab="连锁调入明细报表" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1"></report>
+      <detailReport v-show="curTab==2"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'chainTransferReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 227 - 0
src/views/chainReportData/chainTransferReport/list.vue

@@ -0,0 +1,227 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="storeTransOutReport-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="入库时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="连锁调入单号">
+              <a-input id="chainTransferInReport-allocationLinkagePutNo" v-model.trim="queryParam.allocationLinkagePutNo" allowClear placeholder="请输入连锁调入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调出对象">
+              <outTenant id="chainTransferInReport-outTenantSn" v-model="queryParam.outTenantSn"></outTenant>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24">
+            <a-form-item label="调拨产品类型">
+              <v-select
+                v-model="queryParam.allocationType"
+                ref="allocationType"
+                id="chainTransferInReport-allocationType"
+                code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                placeholder="请选择调拨产品类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainTransferInReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInReport-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('M_storeTransferOutReportExport')"
+              class="button-warning"
+              id="chainTransferInReport-export-btn">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总单数:<strong>{{ (totalData && (totalData.productTotalCategory || totalData.productTotalCategory==0)) ? totalData.productTotalCategory : '--' }}</strong>;
+        产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          调入总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import outTenant from '@/views/common/outTenant.js'
+import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, outTenant },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        outTenantSn:undefined,
+        allocationType: undefined,
+        allocationLinkagePutNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择入库时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportStoreCallOutPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            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
+        })
+      },
+      totalData: null, //  合计
+      storeCallOutTypeList: [] //  调拨类型
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '连锁调入单号', dataIndex: 'allocationLinkagePutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调出对象', dataIndex: 'outTenantName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'putWarehouseTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨产品类型', dataIndex: 'allocationTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(5, 0, { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportStoreCallOutListTotal(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.allocationType = undefined
+      this.queryParam.outTenantSn = undefined
+      this.queryParam.allocationLinkagePutNo = ''
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportStoreCallOutExport(params).then(res => {
+            downloadExcel(res, '连锁调入报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 76 - 0
src/views/common/outTenant.js

@@ -0,0 +1,76 @@
+import { getTenantList } from '@/api/allocLinkageOut'
+// 调出对象
+const SettleStyle = {
+  template: `
+        <a-select
+          :id="id"
+          :placeholder="placeholder"
+          allowClear
+          :value="defaultVal"
+          :showSearch="true"
+          @change="handleChange"
+          :filter-option="filterOption">
+          <a-select-option v-for="item in list" :key="item[defValKey]" :value="item[defValKey]">{{ item.name }}</a-select-option>
+        </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    defValKey: {
+      type: String,
+      default: 'sn'
+    },
+    placeholder: {
+      type: String,
+      default: '请选择调出对象'
+    }
+  },
+  data() {
+    return {
+      defaultVal: this.value||undefined,
+      list: []
+    };
+  },
+  watch: {
+    value(newValue, oldValue) {
+      console.log(newValue)
+      this.defaultVal = newValue||undefined
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleChange(value) {
+      console.log(value)
+      this.defaultVal = value;
+      const row = this.list.find(item => item[this.defValKey] == value)
+      this.$emit('input', value);
+      this.$emit('change', this.defaultVal, row?row.name:'');
+    },
+    // 列表数据
+    getList () {
+      const _this = this
+      getTenantList().then(res => {
+        if (res.status == 200) {
+          _this.list = res.data || []
+        } else {
+          _this.list = []
+        }
+      })
+    },
+  },
+};
+
+export default SettleStyle

+ 286 - 0
src/views/reportData/urgentItemsOffsetReport/detailList.vue

@@ -0,0 +1,286 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesDetailReportList-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="审核时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="销售退货单号">
+              <a-input id="salesDetailReportList-salesReturnNo" v-model.trim="queryParam.salesReturnNo" allowClear placeholder="请输入销售退货单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户名称">
+              <a-input id="salesDetailReportList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="salesDetailReportList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="salesDetailReportList-name" v-model.trim="queryParam.productEntity.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <ProductBrand id="salesDetailReportList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType id="salesDetailReportList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesDetailReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesDetailReportList-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('M_salesReturnReportExport')"
+              class="button-warning"
+              id="salesDetailReportList-export-btn">导出</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-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总退货数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
+        废品数量:<strong>{{ (totalData && (totalData.celQty || totalData.celQty==0)) ? totalData.celQty : '--' }}</strong>;
+        入库数量:<strong>{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</strong>;
+        退货金额:<strong>{{ (totalData && (totalData.price || totalData.price==0)) ? '¥'+totalData.price : '--' }}</strong>;
+        折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
+        折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          退货成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        productType: undefined,
+        buyerName: '',
+        productEntity: {
+          productBrandSn: undefined, //  产品品牌
+          productTypeSn1: '', //  产品一级分类
+          productTypeSn2: '', //  产品二级分类
+          productTypeSn3: '', //  产品三级分类
+          code: '', //  产品编码
+          name: '' //  产品名称
+        },
+        salesReturnNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportSalesReturnDetailPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].inStockQty = data.list[i].qty
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      totalData: null //  合计
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '废品数量', dataIndex: 'celQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'price', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(12, 0, { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesReturnDetailTotal(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.salesReturnNo = ''
+      this.queryParam.buyerName = ''
+      this.queryParam.productEntity.productBrandSn = undefined
+      this.queryParam.productEntity.productTypeSn1 = ''
+      this.queryParam.productEntity.productTypeSn2 = ''
+      this.queryParam.productEntity.productTypeSn3 = ''
+      this.queryParam.productEntity.code = ''
+      this.queryParam.productEntity.name = ''
+      this.queryParam.productType = []
+      this.productType = []
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportSalesReturnDetailExport(params).then(res => {
+            downloadExcel(res, '销售退货明细报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productEntity.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productEntity.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productEntity.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    pageInit () {
+      this.disabled = false
+      this.spinning = false
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 46 - 0
src/views/reportData/urgentItemsOffsetReport/index.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="tabsReportList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs default-active-key="1" v-model="curTab">
+        <a-tab-pane key="1" tab="急件冲减报表"></a-tab-pane>
+        <a-tab-pane key="2" tab="急件冲减明细报表" force-render></a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <report v-show="curTab==1"></report>
+      <detailReport v-show="curTab==2"></detailReport>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import report from './list.vue'
+import detailReport from './detailList.vue'
+export default {
+  name: 'urgentItemsOffsetReportIndex',
+  components: {
+    report,
+    detailReport
+  },
+  data () {
+    return {
+      curTab: '1'
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .tabsReportList-wrap{
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+    .ant-tabs-bar{
+      margin: 0;
+    }
+    .ant-card{
+      flex-grow: 1;
+      overflow: auto;
+    }
+  }
+</style>

+ 247 - 0
src/views/reportData/urgentItemsOffsetReport/list.vue

@@ -0,0 +1,247 @@
+<template>
+  <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model
+        id="salesReturnReportList-form"
+        ref="ruleForm"
+        class="form-model-con"
+        layout="inline"
+        :model="queryParam"
+        :rules="rules"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol"
+        @keyup.enter.native="handleSearch" >
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="冲减时间" prop="time">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="急件单号">
+              <a-input id="urgentItemsOffsetReport-urgentBillNo" v-model.trim="queryParam.urgentBillNo" allowClear placeholder="请输入急件单号"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="关联单号">
+              <a-input id="urgentItemsOffsetReport-bizBillNo" v-model.trim="queryParam.bizBillNo" allowClear placeholder="请输入销售单号"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="客户名称">
+              <a-input id="urgentItemsOffsetReport-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入客户名称"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="急件类型">
+              <v-select
+                v-model="queryParam.bizType"
+                ref="status"
+                id="urgentItemsOffsetReport-biztype"
+                code="URGENT_BIZ_TYPE"
+                placeholder="请选择状态"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="urgentItemsOffsetReport-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="urgentItemsOffsetReport-reset">重置</a-button>
+            <a-button
+              type="primary"
+              style="margin-left: 5px"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              v-if="$hasPermissions('M_salesReturnReportExport')"
+              class="button-warning"
+              id="urgentItemsOffsetReport-export-btn">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" style="margin-bottom:10px">
+      <div class="ftext" slot="message">
+        总单数:<strong>{{ (totalData && (totalData.totalCategory || totalData.totalCategory==0)) ? totalData.totalCategory : '--' }}</strong>;
+        总退货数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        废品数量:<strong>{{ (totalData && (totalData.totalCelQty || totalData.totalCelQty==0)) ? totalData.totalCelQty : '--' }}</strong>;
+        入库数量:<strong>{{ (totalData && (totalData.totalQty || totalData.totalQty==0)) ? totalData.totalQty : '--' }}</strong>;
+        退货金额:<strong>{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? '¥'+totalData.totalAmount : '--' }}</strong>;
+        折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
+        折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          退货成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>。
+        </div>
+      </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="small"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      bordered>
+    </s-table>
+  </a-spin>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { downloadExcel } from '@/libs/JGPrint.js'
+import { reportUrgentPageList, reportUrgentQueryCount, reportUrgentExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      labelCol: { span: 8 },
+      wrapperCol: { span: 16 },
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        time: [],
+        beginDate: '',
+        endDate: '',
+        buyerName: '',
+        salesReturnNo: ''
+      },
+      rules: {
+        'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        const params = Object.assign(parameter, this.queryParam)
+        this.spinning = true
+        delete params.time
+        return reportUrgentPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 总计
+            this.getCount(params)
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].inStockQty = data.list[i].totalQty
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      totalData: null //  合计
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总退货数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '废品数量', dataIndex: 'totalCelQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '退货成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(10, 0, { title: '退货成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportUrgentQueryCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        } else {
+          this.totalData = null
+        }
+      })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    //  查询
+    handleSearch () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.salesReturnNo = ''
+      this.queryParam.buyerName = ''
+      this.$refs.ruleForm.resetFields()
+      this.totalData = null
+      this.$refs.table.clearTable()
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
+          _this.exportLoading = true
+          _this.spinning = true
+          reportUrgentExport(params).then(res => {
+            downloadExcel(res, '急件冲减报表')
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    pageInit () {}
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.215:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.0.103/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,