lilei 2 năm trước cách đây
mục cha
commit
8c9c9008f0

+ 1 - 1
public/version.json

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

+ 32 - 69
src/config/router.config.js

@@ -1931,7 +1931,7 @@ export const asyncRouterMap = [
             meta: {
               title: '销售退货报表',
               icon: 'profile',
-              // permission: 'M_salesReturnReportList'
+              permission: 'M_salesReturnReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -1943,31 +1943,9 @@ export const asyncRouterMap = [
                   title: '销售退货报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_salesReturnReportList'
-                }
-              },
-              {
-                path: 'list',
-                name: 'salesReturnReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/list.vue'),
-                meta: {
-                  title: '销售退货报表列表',
-                  icon: 'profile',
-                  hidden: true,
                   permission: 'M_salesReturnReportList'
                 }
               },
-              {
-                path: 'list',
-                name: 'salesReturnDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/salesReturnReport/detailList.vue'),
-                meta: {
-                  title: '销售退货明细报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                  permission: 'M_salesReturnDetailReportList'
-                }
-              }
             ]
           },
           {
@@ -2020,6 +1998,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/reportData/stockImportReport',
+            redirect: '/reportData/stockImportReport/index',
+            name: 'stockImportReport',
+            component: BlankLayout,
+            meta: {
+              title: '库存导入报表',
+              icon: 'profile',
+              // permission: 'M_stockImportReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'index',
+                name: 'stockImportReportIndex',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/stockImportReport/index.vue'),
+                meta: {
+                  title: '库存导入报表',
+                  icon: 'profile',
+                  hidden: true,
+                  // permission: 'M_stockImportReportList'
+                }
+              },
+            ]
+          },
           {
             path: '/reportData/receivedSendStorageReport',
             redirect: '/reportData/receivedSendStorageReport/list',
@@ -2128,7 +2131,7 @@ export const asyncRouterMap = [
             meta: {
               title: '散件入库报表',
               icon: 'profile',
-              // permission: 'M_bulkWarehousingReportList'
+              permission: 'M_bulkWarehousingReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2140,29 +2143,9 @@ export const asyncRouterMap = [
                   title: '散件入库报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_bulkWarehousingReportList'
-                }
-              },
-              {
-                path: 'list',
-                name: 'bulkWarehousingReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkWarehousingReport/list.vue'),
-                meta: {
-                  title: '散件入库报表列表',
-                  icon: 'profile',
-                  hidden: true,
+                  permission: 'M_bulkWarehousingReportList'
                 }
               },
-              {
-                path: 'list',
-                name: 'bulkWarehousingDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkWarehousingReport/detailList.vue'),
-                meta: {
-                  title: '散件入库明细报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
-              }
             ]
           },
           {
@@ -2173,7 +2156,7 @@ export const asyncRouterMap = [
             meta: {
               title: '散件退货报表',
               icon: 'profile',
-              // permission: 'M_bulkReturnReportList'
+              permission: 'M_bulkReturnReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2185,29 +2168,9 @@ export const asyncRouterMap = [
                   title: '散件退货报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_bulkReturnReportList'
+                  permission: 'M_bulkReturnReportList'
                 }
               },
-              {
-                path: 'list',
-                name: 'bulkReturnReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkReturnReport/list.vue'),
-                meta: {
-                  title: '散件退货报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
-              },
-              {
-                path: 'list',
-                name: 'bulkReturnDetailReportList',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/bulkReturnReport/detailList.vue'),
-                meta: {
-                  title: '散件退货明细报表列表',
-                  icon: 'profile',
-                  hidden: true,
-                }
-              }
             ]
           },
           {
@@ -2218,7 +2181,7 @@ export const asyncRouterMap = [
             meta: {
               title: '店内调出报表',
               icon: 'profile',
-              // permission: 'M_storeTransferOutReportList'
+              permission: 'M_storeTransferOutReportList'
             },
             hideChildrenInMenu: true,
             children: [
@@ -2230,7 +2193,7 @@ export const asyncRouterMap = [
                   title: '店内调出报表',
                   icon: 'profile',
                   hidden: true,
-                  // permission: 'M_storeTransferOutReportList'
+                  permission: 'M_storeTransferOutReportList'
                 }
               },
               {

+ 293 - 0
src/views/reportData/stockImportReport/detailList.vue

@@ -0,0 +1,293 @@
+<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="库存导入单号">
+              <a-input v-model.trim="queryParam.salesReturnNo" allowClear placeholder="请输入库存导入单号"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="导入类型">
+              <v-select
+                v-model="queryParam.salesBillSource"
+                ref="salesBillSource"
+                code="SALES_SOURCE"
+                placeholder="请选择导入类型"
+                allowClear></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="供应商">
+              <supplier
+                placeholder="请选择供应商"
+                v-model="queryParam.supplierSn"
+              ></supplier>
+            </a-form-model-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input 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 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 placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品分类">
+                <ProductType placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="导入时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </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>;
+        <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 supplier from '@/views/common/supplier'
+import { reportSalesReturnDetailPageList, reportSalesReturnDetailTotal, reportSalesReturnDetailExport } from '@/api/reportData'
+export default {
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  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: '5%', align: 'center' },
+        { title: '库存导入单号', dataIndex: 'salesReturnNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '导入类型', dataIndex: 'buyerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '供应商', dataIndex: 'supplierName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'qty', width: '5%', 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: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '导入时间', dataIndex: 'auditTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(8, 0, { title: '成本', dataIndex: 'cost', width: '5%', 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/stockImportReport/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: 'StockImportReportIndex',
+  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>

+ 190 - 0
src/views/reportData/stockImportReport/list.vue

@@ -0,0 +1,190 @@
+<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="导入类型">
+              <v-select
+                v-model="queryParam.salesBillSource"
+                ref="salesBillSource"
+                code="SALES_SOURCE"
+                placeholder="请选择导入类型"
+                allowClear></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-model-item label="导入时间">
+              <rangeDate ref="rangeDate" @change="dateChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnReportList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReportList-reset">重置</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>;
+        <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 { reportSalesReturnPageList, reportSalesReturnBillTotal } 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 reportSalesReturnPageList(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: '5%', align: 'center' },
+        { title: '库存导入单', dataIndex: 'salesReturnNo', width: '20%', 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: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'totalQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '导入时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(5, 0, { title: '成本', dataIndex: 'totalCost', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    // 合计
+    getCount (params) {
+      reportSalesReturnBillTotal(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()
+    },
+    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>

+ 0 - 1
src/views/salesManagement/salesReturn/detail.vue

@@ -26,7 +26,6 @@
               </a-descriptions-item>
               <a-descriptions-item label="联系电话">{{ detailData&&detailData.contactTel || '--' }}</a-descriptions-item>
               <a-descriptions-item label="退货单号">{{ detailData&&detailData.salesReturnNo || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="销售单号">{{ detailData&&detailData.salesBillNo || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ detailData&&detailData.stateDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="备注">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
             </a-descriptions>