Browse Source

等级设置

chenrui 1 year ago
parent
commit
34cef2322f

+ 2 - 1
src/config/router.config.js

@@ -3088,7 +3088,8 @@ export const asyncRouterMap = [
                 meta: {
                   title: '关联经销商',
                   icon: 'share-alt',
-                  hidden: true
+                  hidden: true,
+                  replaceTab: true
                   // permission: 'M_relatedDealersList'
                 }
               }

+ 5 - 2
src/views/dealerManagement/merchantInfoManagement/updateDealerLevel.vue

@@ -64,7 +64,8 @@ export default {
           { required: true, message: '请选择商户级别', trigger: 'change' }
         ]
       },
-      dealerLevelBak: undefined
+      dealerLevelBak: undefined,
+      isProvincialCustomers: undefined
     }
   },
   methods: {
@@ -73,15 +74,17 @@ export default {
       this.form.dealerName = row.dealerName
       this.form.dealerLevel = row.dealerLevel
       this.dealerLevelBak = row.dealerLevel
+      this.isProvincialCustomers = row.serviceCenterSn ? '1' : '0'// 是否是省仓客户
     },
     onSubmit () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           if (_this.dealerLevelBak && _this.form.dealerLevel != _this.dealerLevelBak) {
+            const tipInfo = '商户价格级别变更后,该商户关联的经销商' + (_this.isProvincialCustomers == '1' ? '关系绑定、省仓' : '上下级') + '关系绑定将同步解除,确定变更该商户级别吗?'
             this.$confirm({
               title: '提示',
-              content: '商户价格级别变更后,该商户关联的经销商关系绑定、省仓关系绑定将同步解除,确定变更该商户级别吗?',
+              content: tipInfo,
               centered: true,
               onOk () {
                 _this.submitForm()

+ 0 - 1
src/views/dealerManagement/provincialWarehouseManagement/list.vue

@@ -211,7 +211,6 @@ export default {
     }
   },
   activated () {
-    console.log('111111111111111:', this.$store.state.app)
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()

+ 0 - 268
src/views/dealerManagement/provincialWarehouseManagement/lookUpCustomersModal.vue

@@ -1,268 +0,0 @@
-<template>
-  <a-drawer
-    centered
-    class="lookUpCustomers-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="省仓客户"
-    v-model="isShow"
-    @cancel="isShow = false"
-    width="60%">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-card size="small" :bordered="false">
-        <!-- 筛选条件 -->
-        <div 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-model-item label="地区">
-                  <AreaList id="actualSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="区域/分区">
-                  <subarea ref="subarea" id="salesManagementList-subarea" @change="subareaChange"></subarea>
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="经销商名称">
-                  <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckMakeInventoryList-refresh">查询</a-button>
-                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
-                <a-button
-                  style="margin-left: 10px"
-                  type="primary"
-                  class="button-warning"
-                  @click="handleExport"
-                  :disabled="disabled"
-                  :loading="exportLoading"
-                >导出</a-button>
-              </a-col>
-            </a-row>
-          </a-form>
-        </div>
-        <!-- 列表 -->
-        <s-table
-          class="sTable"
-          ref="table"
-          size="small"
-          :rowKey="(record) => record.dealerSn"
-          rowKeyName="dealerSn"
-          :columns="columns"
-          :data="loadData"
-          :defaultLoadData="false"
-          :scroll="{ y: 450 }"
-          :rowClassName="(record, index) => record.checkProfitLossQty < 0 ? 'redBg-row':''"
-          bordered>
-          <!-- 地区 -->
-          <template slot="address" slot-scope="text, record">
-            {{ record.provinceName }}/{{ record.cityName }}/{{ record.districtName }}
-          </template>
-          <!-- 操作 -->
-          <template slot="action" slot-scope="text, record">
-            <a-button
-              size="small"
-              type="link"
-              v-if="$hasPermissions('B_dealerAccount_edit')"
-              class="button-info"
-              @click="handleDelete(record)"
-              id="provincialWarehouse-edit-btn">解绑</a-button>
-            <span v-else>--</span>
-          </template>
-        </s-table>
-      </a-card>
-      <div class="btn-cont">
-        <a-button id="lookUpCustomers-modal-back" @click="isShow = false">关闭</a-button>
-      </div>
-    </a-spin>
-  </a-drawer>
-</template>
-
-<script>
-import { commonMixin } from '@/utils/mixin'
-import { STable } from '@/components'
-import ProductType from '@/views/common/productType.js'
-import subarea from '@/views/common/subarea.js'
-import AreaList from '@/views/common/areaList.js'
-import { hdExportExcel } from '@/libs/exportExcel'
-import { queryServiceCenterDealerPage, serviceCenterUnbinding, serviceCenterExport } from '@/api/serviceCenter'
-export default {
-  name: 'LookUpCustomersModal',
-  components: { STable, ProductType, subarea, AreaList },
-  mixins: [commonMixin],
-  props: {
-    openModal: { //  弹框显示状态
-      type: Boolean,
-      default: false
-    }
-  },
-  data () {
-    return {
-      spinning: false,
-      isShow: this.openModal, //  是否打开弹框
-      disabled: false,
-      exportLoading: false,
-      queryParam: {
-        subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
-        },
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined,
-        dealerName: undefined,
-        serviceCenterSn: '',
-        relationType: 'PURCHASE'
-      },
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        return queryServiceCenterDealerPage(Object.assign(parameter, this.queryParam)).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-              data.list[i].loginFlag = Number(data.list[i].loginFlag)
-            }
-            this.disabled = false
-          }
-          this.spinning = false
-          return data
-        })
-      },
-      basicInfoData: null, //  基本信息
-      productTotal: null,
-      productType: [],
-      snObj: undefined, // 经销商列表
-      warehouseList: [], //  仓库  下拉数据
-      localDataSource: [],
-      isPrice: false, //  仅显示盈亏
-      openPrintModal: false,
-      nowType: null,
-      printerType: 'NEEDLE', //  打印机类型
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '地区', scopedSlots: { customRender: 'address' }, width: '20%', align: 'center', ellipsis: true },
-        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '经销商名称', dataIndex: 'dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '商户类型', dataIndex: 'dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
-      ]
-    }
-  },
-  methods: {
-    areaChange (val) {
-      this.queryParam.provinceSn = val[0] ? val[0] : ''
-      this.queryParam.citySn = val[1] ? val[1] : ''
-      this.queryParam.districtSn = val[2] ? val[2] : ''
-    },
-    subareaChange (val) {
-      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
-    },
-    pageInit (item) {
-      this.queryParam.serviceCenterSn = item.itemSn
-      this.serviceCenterName = item.name
-      const _this = this
-      this.$nextTick(() => {
-        _this.$refs.table.refresh(true)
-      })
-    },
-    // 解绑
-    handleDelete (row) {
-      const ajaxData = {
-        serviceCenterSn: this.queryParam.serviceCenterSn,
-        dealerSn: row.dealerSn
-      }
-      this.spinning = true
-      serviceCenterUnbinding(ajaxData).then(res => {
-        if (res.status == 200) {
-          this.$message.success('解绑成功')
-          this.$refs.table.refresh(true)
-        }
-        this.spinning = false
-      })
-    },
-    //  重置
-    resetSearchForm () {
-      this.queryParam = {
-        subareaArea: {
-          subareaSn: undefined,
-          subareaAreaSn: undefined
-        },
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined,
-        dealerName: undefined,
-        relationType: 'PURCHASE'
-      }
-      this.$refs.areaList.clearData()
-      this.$refs.subarea.clearData()
-    },
-    //  导出
-    handleExport () {
-      const _this = this
-      _this.exportLoading = true
-      _this.spinning = true
-      _this.queryParam.serviceCenterName = _this.serviceCenterName
-      hdExportExcel(serviceCenterExport, _this.queryParam, '省仓客户列表导出', function () {
-        _this.exportLoading = false
-        _this.spinning = false
-      })
-    }
-  },
-  watch: {
-    //  父页面传过来的弹框状态
-    openModal (newValue, oldValue) {
-      this.isShow = newValue
-    },
-    //  重定义的弹框状态
-    isShow (newValue, oldValue) {
-      if (!newValue) {
-        this.$emit('close')
-        this.queryParam.serviceCenterSn = ''
-        this.resetSearchForm()
-      }
-    }
-  }
-}
-</script>
-<style lang="less" scoped>
-  .lookUpCustomers-modal{
-    .ant-modal-body{
-      padding: 0 24px 24px;
-    }
-    .redBg-row{
-      background-color: #f5cdc8;
-    }
-    .btn-cont {
-      text-align: center;
-      margin: 5px 0 10px;
-    }
-    .table-page-search-wrapper{
-      margin-bottom:6px;
-      /deep/.ant-select-selection{
-        border:0 !important;
-        box-shadow: none !important;
-      }
-      .ant-form.ant-form-inline .ant-form-item{
-        border:1px solid #dadada;
-        border-radius: 3px;
-        overflow: hidden;
-        margin-bottom: 10px!important;
-        /deep/.ant-form-item-label{
-          padding-left: 11px !important;
-          padding-right: 0!important;
-        }
-      }
-    }
-  }
-</style>

+ 1 - 14
src/views/dealerManagement/provincialWarehouseManagement/relatedDealersList.vue

@@ -85,19 +85,6 @@
       </a-tabs>
     </a-card>
     <!-- 关联经销商 -->
-    <!-- <a-modal
-      title="选择经销商"
-      :visible="openDealerModal"
-      :footer="null"
-      centered
-      class="lookUpCustomers-modal"
-      @cancel="closeDealerModal"
-      width="60%"
-    >
-      <div class="dealerModalCon">
-        <chooseDealer ref="dealerChoose" :itemSn="$route.query.sn" @plAdd="handleAddDealer"></chooseDealer>
-      </div>
-    </a-modal> -->
     <a-drawer
       title="选择经销商"
       placement="right"
@@ -261,7 +248,7 @@ export default {
     },
     //  返回
     handleBack () {
-      this.$router.go(-1)
+      this.$router.push({ name: 'provincialWarehouseList' })
     },
     pageInit () {
       const _this = this