Browse Source

轮胎剔除配置

lilei 3 days ago
parent
commit
245934a218

+ 3 - 3
src/config/sysSetting.js

@@ -330,7 +330,7 @@ export default {
       name: 'salesReturnRemove',
       name: 'salesReturnRemove',
       component: BlankLayout,
       component: BlankLayout,
       meta: {
       meta: {
-        title: '开单剔除配置',
+        title: '剔除配置',
         icon: 'sketch',
         icon: 'sketch',
         permission: 'M_salesReturnRemoveList'
         permission: 'M_salesReturnRemoveList'
       },
       },
@@ -339,9 +339,9 @@ export default {
         {
         {
           path: 'list',
           path: 'list',
           name: 'salesReturnRemoveList',
           name: 'salesReturnRemoveList',
-          component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/salesReturnRemove/list.vue'),
+          component: () => import(/* webpackChunkName: "setting" */ '@/views/setting/removeSetting/index.vue'),
           meta: {
           meta: {
-            title: '开单剔除配置',
+            title: '剔除配置',
             icon: 'sketch',
             icon: 'sketch',
             hidden: true,
             hidden: true,
             permission: 'M_salesReturnRemoveList'
             permission: 'M_salesReturnRemoveList'

+ 2 - 6
src/views/setting/dailyReportSettings/index.vue

@@ -17,9 +17,6 @@
         <a-tab-pane key="5" tab="分区月目标" force-render>
         <a-tab-pane key="5" tab="分区月目标" force-render>
           <partitionTargetList pageType="PARTITION_MONTHLY_TARGET"></partitionTargetList>
           <partitionTargetList pageType="PARTITION_MONTHLY_TARGET"></partitionTargetList>
         </a-tab-pane>
         </a-tab-pane>
-        <a-tab-pane key="6" tab="销售/销售退货剔除" force-render>
-          <salesReturnRemove></salesReturnRemove>
-        </a-tab-pane>
       </a-tabs>
       </a-tabs>
     </a-card>
     </a-card>
   </div>
   </div>
@@ -30,14 +27,13 @@ import { commonMixin } from '@/utils/mixin'
 import estimatedOrderList from './estimatedOrderList.vue'
 import estimatedOrderList from './estimatedOrderList.vue'
 import categoryTargetList from './categoryTargetList.vue'
 import categoryTargetList from './categoryTargetList.vue'
 import partitionTargetList from './partitionTargetList.vue'
 import partitionTargetList from './partitionTargetList.vue'
-import salesReturnRemove from './salesReturnRemove.vue'
 export default {
 export default {
   name: 'DailyReportSettingsIndex',
   name: 'DailyReportSettingsIndex',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { estimatedOrderList, categoryTargetList, partitionTargetList, salesReturnRemove },
+  components: { estimatedOrderList, categoryTargetList, partitionTargetList },
   data () {
   data () {
     return {
     return {
-      tabVal: '1'// tab值  1区域预估订单 2轮胎月目标 3品类月目标 4品类经理月目标  5分区月目标 6销售退货剔除
+      tabVal: '1'// tab值  1区域预估订单 2轮胎月目标 3品类月目标 4品类经理月目标  5分区月目标
     }
     }
   }
   }
 }
 }

+ 5 - 4
src/views/setting/dailyReportSettings/salesReturnRemove.vue

@@ -42,6 +42,7 @@
                   @click="handleExport"
                   @click="handleExport"
                   :disabled="disabled"
                   :disabled="disabled"
                   :loading="exportLoading"
                   :loading="exportLoading"
+                  v-if="$hasPermissions('B_srr_export')"
                   id="salesReturnRemove-export">导出</a-button>
                   id="salesReturnRemove-export">导出</a-button>
               </span>
               </span>
             </a-col>
             </a-col>
@@ -54,7 +55,7 @@
           <div style="flex-grow: 1;display: flex;align-items: center;">
           <div style="flex-grow: 1;display: flex;align-items: center;">
             <!-- 操作按钮 -->
             <!-- 操作按钮 -->
             <div>
             <div>
-              <a-button type="primary" v-if="$hasPermissions('B_salesReturnNew')" @click="handleEdit">新增</a-button>
+              <a-button type="primary" v-if="$hasPermissions('B_srr_add')" @click="handleEdit">新增</a-button>
             </div>
             </div>
           </div>
           </div>
           <div></div>
           <div></div>
@@ -79,14 +80,14 @@
                 size="small"
                 size="small"
                 type="link"
                 type="link"
                 class="button-info"
                 class="button-info"
-                v-if="record.show"
+                v-if="record.show&&$hasPermissions('B_srr_edit')"
                 @click="handleEdit(record)"
                 @click="handleEdit(record)"
                 :id="'salesReturnRemove-edit-btn'+index">编辑</a-button>
                 :id="'salesReturnRemove-edit-btn'+index">编辑</a-button>
               <a-button
               <a-button
                 size="small"
                 size="small"
                 type="link"
                 type="link"
                 class="button-error"
                 class="button-error"
-                v-if="record.show"
+                v-if="record.show&&$hasPermissions('B_srr_del')"
                 @click="handleDel(record)"
                 @click="handleDel(record)"
                 :id="'salesReturnRemove-del-btn'+index">删除</a-button>
                 :id="'salesReturnRemove-del-btn'+index">删除</a-button>
             </div>
             </div>
@@ -219,7 +220,7 @@ export default {
       const _this = this
       const _this = this
       this.$confirm({
       this.$confirm({
         title: '提示',
         title: '提示',
-        content: <div>销退单号:{row.bizNo}<div>确认要删除吗?</div></div>,
+        content: <div>业务单号:{row.bizNo}<div>确认要删除吗?</div></div>,
         centered: true,
         centered: true,
         onOk () {
         onOk () {
           _this.spinning = true
           _this.spinning = true

+ 226 - 0
src/views/setting/removeSetting/baseModal.vue

@@ -0,0 +1,226 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    :width="560"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="业务单号" prop="bizNo">
+              <a-input
+                id="base-bizNo"
+                :disabled="bizSn"
+                v-model.trim="form.bizNo"
+                @change="fetchUser"
+                allowClear
+                placeholder="请输入业务单号"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="客户名称" prop="dealerSn">
+              {{ dealerData&&dealerData.dealerName||'--' }}
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="运费、服务费" prop="tireSubsidyYfFwf">
+              <a-radio-group name="radioGroup" v-model="form.tireSubsidyYfFwf">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="增量补贴" prop="tireSubsidyZl">
+              <a-radio-group name="radioGroup1" v-model="form.tireSubsidyZl">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="供应商返利" prop="tireSubsidyGc">
+              <a-radio-group name="radioGroup2" v-model="form.tireSubsidyGc">
+                <a-radio value="1">剔除</a-radio>
+                <a-radio value="0">不剔除</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import debounce from 'lodash/debounce'
+import warehouse from '@/views/common/chooseWarehouse.js'
+import { bizRemoveConfigCreate, bizRemoveConfigModify, bizRemoveConfigDetail, salesReturnDetailByNo } from '@/api/bizRemove'
+export default {
+  name: 'BaseModal',
+  mixins: [commonMixin],
+  components: { VSelect, warehouse },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '新增配置',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 8 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        bizNo: '',
+        dealerSn: undefined,
+        configType: 'TIRE_SUBSIDY',
+        bizSn: undefined, // bizsn
+        tireSubsidyYfFwf: undefined,
+        tireSubsidyZl: undefined,
+        tireSubsidyGc: undefined
+      },
+      rules: {
+        bizNo: [{ required: true, message: '请输入业务单号', trigger: ['change', 'blur'] }],
+        dealerSn: [{ required: true, message: '请选择客户', trigger: ['change', 'blur'] }],
+        tireSubsidyYfFwf: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }],
+        tireSubsidyZl: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }],
+        tireSubsidyGc: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }]
+      },
+      fetching: false,
+      dealerData: null,
+      bizSn: undefined
+    }
+  },
+  methods: {
+    fetchUser () {
+      if (!this.form.bizNo) return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = null
+      this.spinning = true
+      this.fetching = true
+      salesReturnDetailByNo({ bizNo: this.form.bizNo, configType: 'TIRE_SUBSIDY' }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        if (res.data) {
+          this.dealerData = res.data
+          this.form.dealerSn = res.data.dealerSn
+          this.form.bizSn = res.data.bizSn
+        } else {
+          this.dealerData = null
+          this.form.dealerSn = undefined
+          this.form.bizSn = undefined
+        }
+        this.fetching = false
+        this.spinning = false
+      })
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          // 保存
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建业务单
+    salesSaveFun () {
+      const _this = this
+      const form = this.form
+      const funs = !this.bizSn ? bizRemoveConfigCreate : bizRemoveConfigModify
+      _this.spinning = true
+      funs(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('ok', res.data)
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.form = {
+        configType: 'TIRE_SUBSIDY',
+        bizNo: '',
+        dealerSn: undefined,
+        bizSn: undefined, // bizsn
+        tireSubsidyYfFwf: undefined,
+        tireSubsidyZl: undefined,
+        tireSubsidyGc: undefined
+      }
+      this.bizSn = undefined
+      this.dealerData = null
+      this.$refs.ruleForm.resetFields()
+      this.$emit('cancel')
+    },
+    getDetail () {
+      bizRemoveConfigDetail({ bizSn: this.bizSn, configType: 'TIRE_SUBSIDY' }).then(res => {
+        const { bizSn, bizNo, dealerSn, dealerName, tireSubsidyYfFwf, tireSubsidyZl, tireSubsidyGc } = res.data
+        this.dealerData = { dealerName: dealerName }
+        this.form = Object.assign(this.form, {
+          bizNo: bizNo,
+          dealerSn: dealerSn,
+          bizSn: bizSn,
+          tireSubsidyYfFwf: tireSubsidyYfFwf,
+          tireSubsidyZl: tireSubsidyZl,
+          tireSubsidyGc: tireSubsidyGc
+        })
+      })
+    },
+    edit (row) {
+      if (row && row.bizSn) {
+        this.title = '编辑配置'
+        this.bizSn = row.bizSn
+        this.getDetail()
+      } else {
+        this.title = '新增配置'
+        this.bizSn = undefined
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+    }
+  }
+}
+</script>

+ 35 - 0
src/views/setting/removeSetting/index.vue

@@ -0,0 +1,35 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false">
+      <a-tabs default-active-key="1" v-model="tabVal">
+        <a-tab-pane key="1" tab="开单统计剔除" force-render>
+          <list1></list1>
+        </a-tab-pane>
+        <a-tab-pane key="2" tab="每日报表剔除" force-render>
+          <list2></list2>
+        </a-tab-pane>
+        <a-tab-pane key="3" tab="轮胎补贴剔除" force-render>
+          <list3></list3>
+        </a-tab-pane>
+      </a-tabs>
+    </a-card>
+  </div>
+</template>
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import list1 from '../salesReturnRemove/list.vue'
+import list2 from '../dailyReportSettings/salesReturnRemove.vue'
+import list3 from './list.vue'
+export default {
+  name: 'DailyReportSettingsIndex',
+  mixins: [commonMixin],
+  components: { list1, list2, list3 },
+  data () {
+    return {
+      tabVal: '1'
+    }
+  }
+}
+
+</script>

+ 291 - 0
src/views/setting/removeSetting/list.vue

@@ -0,0 +1,291 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务时间">
+                <rangeDate ref="rangeCreateDate" id="salesReturnRemove-createDate" :value="createDate" @change="dateCreateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesReturnRemove-dealerSn" @change="custChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务单号">
+                <a-input id="salesReturnRemove-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务类型">
+                <v-select
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="salesReturnRemove-bizType"
+                  code="REMOVE_BIZ_TYPE"
+                  placeholder="请选择业务类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="24" :sm="24" style="text-align: center;margin-bottom: 10px;">
+              <span class="table-page-search-submitButtons">
+                <a-button id="salesReturnRemove-search" type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button id="salesReturnRemove-reset" style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  class="button-warning"
+                  v-if="$hasPermissions('B_srr_export')"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  id="salesReturnRemove-export">导出</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div class="table-operator" style="flex-grow: 1;display: flex;justify-content: space-between;align-items: center;">
+          <div style="flex-grow: 1;display: flex;align-items: center;">
+            <!-- 操作按钮 -->
+            <div>
+              <a-button type="primary" v-if="$hasPermissions('B_srr_add')" @click="handleEdit">新增</a-button>
+            </div>
+          </div>
+          <div></div>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+75+'px' }"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record, index">
+            <div>
+              <a-button
+                size="small"
+                type="link"
+                class="button-info"
+                v-if="record.show&&$hasPermissions('B_srr_edit')"
+                @click="handleEdit(record)"
+                :id="'salesReturnRemove-edit-btn'+index">编辑</a-button>
+              <a-button
+                size="small"
+                type="link"
+                class="button-error"
+                v-if="record.show&&$hasPermissions('B_srr_del')"
+                @click="handleDel(record)"
+                :id="'salesReturnRemove-del-btn'+index">删除</a-button>
+            </div>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 选择客户弹框 -->
+      <baseModal :show="openModal" ref="openModal" @ok="handleOk" @cancel="openModal=false"></baseModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import baseModal from './baseModal.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { bizRemoveConfigPageList, bizRemoveConfigDelete, bizRemoveConfigReportExport } from '@/api/bizRemove'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  name: 'SalesReturnRemove',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    baseModal,
+    dealerSubareaScopeList,
+    rangeDate
+  },
+  data () {
+    return {
+      spinning: false,
+      // 高级搜索 展开/关闭
+      advanced: true,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      createDate: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ], //  创建时间
+      openModal: false, // 选择客户弹框是否显示
+      openDepartUserModal: false,
+      // 查询参数
+      queryParam: {
+        configType: 'TIRE_SUBSIDY',
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        dealerSn: undefined, //  客户名称
+        bizNo: undefined, //  业务单号
+        bizType: undefined
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return bizRemoveConfigPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].show = new Date(data.list[i].bizDate).getMonth() == new Date().getMonth()
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false
+    }
+  },
+  computed: {
+    columns () {
+      const a = ['', '剔除']
+      const arr = [
+        { title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务时间', dataIndex: 'bizDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '18%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '运费、服务费', dataIndex: 'tireSubsidyYfFwf', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '增量补贴', dataIndex: 'tireSubsidyZl', width: '8%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '供应商返利', dataIndex: 'tireSubsidyGc', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateCreateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 选择客户
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(bizRemoveConfigReportExport, params, '轮胎补贴剔除配置-', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 编辑
+    handleEdit (row) {
+      this.openModal = true
+      this.$refs.openModal.edit(row)
+    },
+    handleOk (res) {
+      this.$refs.table.refresh()
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: <div>业务单号:{row.bizNo}<div>确认要删除吗?</div></div>,
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          bizRemoveConfigDelete({ bizSn: row.bizSn, configType: 'TIRE_SUBSIDY' }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 重置查询
+    resetSearchForm () {
+      this.$refs.rangeCreateDate.resetDate(this.createDate)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.dealerSn = undefined
+      this.$refs.dealerSubareaScopeList.resetForm()
+      this.queryParam.bizNo = ''
+      this.queryParam.bizType = undefined
+
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 295
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 2 - 5
src/views/setting/salesReturnRemove/list.vue

@@ -49,9 +49,6 @@
           </a-row>
           </a-row>
         </a-form>
         </a-form>
       </div>
       </div>
-    </a-card>
-    <!-- 表格 -->
-    <a-card size="small" :bordered="false" class="searchBoxNormal">
       <a-spin :spinning="spinning" tip="Loading...">
       <a-spin :spinning="spinning" tip="Loading...">
         <div class="table-operator" style="flex-grow: 1;display: flex;justify-content: space-between;align-items: center;">
         <div class="table-operator" style="flex-grow: 1;display: flex;justify-content: space-between;align-items: center;">
           <div style="flex-grow: 1;display: flex;align-items: center;">
           <div style="flex-grow: 1;display: flex;align-items: center;">
@@ -220,7 +217,7 @@ export default {
       const _this = this
       const _this = this
       this.$confirm({
       this.$confirm({
         title: '提示',
         title: '提示',
-        content: <div>销退单号:{row.bizNo}<div>确认要删除吗?</div></div>,
+        content: <div>业务单号:{row.bizNo}<div>确认要删除吗?</div></div>,
         centered: true,
         centered: true,
         onOk () {
         onOk () {
           _this.spinning = true
           _this.spinning = true
@@ -254,7 +251,7 @@ export default {
     },
     },
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 245
+      this.tableHeight = window.innerHeight - tableSearchH - 295
     }
     }
   },
   },
   watch: {
   watch: {