lilei před 4 roky
rodič
revize
6d3db2b2d0

+ 38 - 0
src/api/dealer.js

@@ -0,0 +1,38 @@
+import { axios } from '@/utils/request'
+
+//  根据sn查找经销商详情
+export const dealerDetailBySn = (params) => {
+  return axios({
+    url: `/dealer/findBySn/${params.sn}`,
+    data: params,
+    method: 'get'
+  })
+}
+// 根据sn查找修改过后的经销商信息
+export const dealerFindUpdateInfoBySn = (params) => {
+  return axios({
+    url: `/dealer/findUpdateInfoBySn/${params.sn}`,
+    data: params,
+    method: 'get'
+  })
+}
+//  经销商列表有分页
+export const dealerQueryList = (params) => {
+  const url = `/dealer/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  经销商保存
+export const dealerSave = (params) => {
+  return axios({
+    url: '/dealer/save',
+    data: params,
+    method: 'post'
+  })
+}

+ 10 - 0
src/api/subarea.js

@@ -0,0 +1,10 @@
+import { axios } from '@/utils/request'
+
+//  查询所有分区
+export const subareaQueryAll = (params) => {
+  return axios({
+    url: `/subarea/queryAll`,
+    data: params,
+    method: 'get'
+  })
+}

+ 6 - 2
src/components/Table/index.js

@@ -158,8 +158,6 @@ export default {
           this.showPagination && this.localPagination.current || this.pageNum,
         pageSize: (pagination && pagination.pageSize) ||
           this.showPagination && this.localPagination.pageSize || this.pageSize,
-        tableId: this.tableId,
-        index: this.index
       },
       (sorter && sorter.field && {
         sortField: sorter.field
@@ -170,6 +168,12 @@ export default {
         ...filters
       }
       )
+      if(this.tableId != ''){
+        parameter.tableId = this.tableId
+      }
+      if(this.index != ''){
+        parameter.index = this.index
+      }
       console.log('parameter', parameter)
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data

+ 70 - 0
src/views/common/subarea.js

@@ -0,0 +1,70 @@
+import { subareaQueryAll } from '@/api/subarea'
+const Subarea = {
+  template: `
+        <a-select
+          :id="id"
+          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.subareaName }}</a-select-option>
+        </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    defValKey: {
+      type: String,
+      default: 'subareaSn'
+    }
+  },
+  data() {
+    return {
+      defaultVal: this.value,
+      list: []
+    };
+  },
+  watch: {
+    value(newValue, oldValue) {
+      console.log(newValue)
+      this.defaultVal = newValue
+    }
+  },
+  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;
+      this.$emit('change', this.value);
+      this.$emit('input', value);
+    },
+    // 列表数据
+    getList () {
+      const _this = this
+      subareaQueryAll().then(res => {
+        if (res.status == 200) {
+          _this.list = res.data || []
+        } else {
+          _this.list = []
+        }
+      })
+    },
+  },
+};
+
+export default Subarea

+ 97 - 99
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="merchantInfoManagementEdit-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="merchantInfoManagementEdit-cont">
+    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="merchantInfoManagementEdit-cont">
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+        <a id="merchantInfoManagement-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
       </template>
     </a-page-header>
     <a-form-model
@@ -19,40 +19,38 @@
           <a-collapse-panel key="1" header="基础信息">
             <a-row>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经销商名称" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入经销商名称(最多30个字符)" />
+                <a-form-model-item label="经销商名称" prop="dealerName">
+                  <a-input v-model.trim="form.dealerName" id="merchantInfoManagementEdit-dealerName" :maxLength="30" allowClear placeholder="请输入经销商名称(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经销商别名" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入经销商别名(最多30个字符)" />
+                <a-form-model-item label="经销商别名" prop="dealerAlias">
+                  <a-input v-model.trim="form.dealerAlias" id="merchantInfoManagementEdit-dealerAlias" :maxLength="30" allowClear placeholder="请输入经销商别名(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="商户类型">
-                  <a-select placeholder="请选择商户类型" id="productLevelEdit-storageQuantity" allowClear v-model="form.storageQuantity">
-                    <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-                  </a-select>
+                <a-form-model-item label="商户类型" prop="dealerType">
+                  <v-select code="DEALER_TYPE" id="merchantInfoManagementEdit-dealerType" v-model="form.dealerType" allowClear placeholder="请选择商户类型"></v-select>
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系人1" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入联系人1(最多30个字符)" />
+                <a-form-model-item label="联系人1" prop="contact">
+                  <a-input v-model.trim="form.contact" id="merchantInfoManagementEdit-contact" :maxLength="30" allowClear placeholder="请输入联系人1(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系手机1" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="11" allowClear placeholder="请输入联系手机1(最多11个字符)" />
+                <a-form-model-item label="联系手机1" prop="contactMobile">
+                  <a-input v-model.trim="form.contactMobile" id="merchantInfoManagementEdit-contactMobile" :maxLength="11" allowClear placeholder="请输入联系手机1(最多11个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系角色1" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入联系角色1(最多30个字符)" />
+                <a-form-model-item label="联系角色1" prop="contactRole">
+                  <a-input v-model.trim="form.contactRole" id="merchantInfoManagementEdit-contactRole" :maxLength="30" allowClear placeholder="请输入联系角色1(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系电话" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="11" allowClear placeholder="请输入联系电话(最多11个字符)" />
+                <a-form-model-item label="联系电话" prop="dealerTelephone">
+                  <a-input v-model.trim="form.dealerTelephone" id="merchantInfoManagementEdit-dealerTelephone" :maxLength="11" allowClear placeholder="请输入联系电话(最多11个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
@@ -74,8 +72,8 @@
                       </a-form-model-item>
                     </a-col>
                     <a-col span="8">
-                      <a-form-model-item prop="countySn">
-                        <a-select id="merchantInfoManagementEdit-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
+                      <a-form-model-item prop="districtSn">
+                        <a-select id="merchantInfoManagementEdit-districtSn" @change="areaCharged" v-model="form.districtSn" placeholder="请选择区/县">
                           <a-select-option v-for="item in addrDistrictList" :value="item.sn" :key="item.sn + 'c'">{{ item.name }}</a-select-option>
                         </a-select>
                       </a-form-model-item>
@@ -84,21 +82,21 @@
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="详细地址" prop="supplierAddress">
+                <a-form-model-item label="详细地址" prop="address">
                   <a-input
-                    id="merchantInfoManagementEdit-supplierAddress"
+                    id="merchantInfoManagementEdit-address"
                     :maxLength="60"
-                    v-model="form.supplierAddress"
+                    v-model="form.address"
                     placeholder="请输入详细地址(最多60个字符)"
                     allowClear />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="是否可用" prop="enabledFlag">
+                <a-form-model-item label="是否可用" prop="enableFlag">
                   <a-radio-group
                     name="radioGroup"
-                    v-model="form.enabledFlag"
-                    id="merchantInfoManagementEdit-enabledFlag" >
+                    v-model="form.enableFlag"
+                    id="merchantInfoManagementEdit-enableFlag" >
                     <a-radio :value="1">是</a-radio>
                     <a-radio :value="0">否</a-radio>
                   </a-radio-group>
@@ -114,30 +112,30 @@
           <a-collapse-panel key="1" header="公司信息">
             <a-row>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经营方式" prop="productTypeName" help="(例:国有企业)">
+                <a-form-model-item label="经营方式" prop="busniessMode" help="(例:国有企业)">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.busniessMode"
+                    id="merchantInfoManagementEdit-busniessMode"
                     :maxLength="30"
                     allowClear
                     placeholder="请输入经营方式(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="经营项目" prop="productTypeName">
+                <a-form-model-item label="经营项目" prop="busniessItmes">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.busniessItmes"
+                    id="merchantInfoManagementEdit-busniessItmes"
                     :maxLength="30"
                     allowClear
                     placeholder="请输入经营项目(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="公司规模" prop="productTypeName" help="(例:100-999人)">
+                <a-form-model-item label="公司规模" prop="busniessScope" help="(例:100-999人)">
                   <a-input-number
-                    id="merchantInfoManagementEdit-name"
-                    v-model="form.storageQuantity"
+                    id="merchantInfoManagementEdit-busniessScope"
+                    v-model="form.busniessScope"
                     :precision="0"
                     :min="1"
                     :max="999999"
@@ -146,96 +144,96 @@
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="成立时间" prop="productTypeName">
+                <a-form-model-item label="成立时间" prop="buildDate">
                   <a-date-picker
                     style="width:100%"
-                    id="merchantInfoManagementEdit-time"
+                    id="merchantInfoManagementEdit-buildDate"
                     :disabledDate="disabledDate"
-                    v-model="form.time"
+                    v-model="form.buildDate"
                     :format="dateFormat"
                     placeholder="请选择日期" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="一般纳税人" prop="citySn">
+                <a-form-model-item label="一般纳税人" prop="isTaxpayer">
                   <v-select
                     code="FLAG"
-                    id="customerManagementEdit-dispatchType"
-                    v-model="form.dispatchType"
+                    id="customerManagementEdit-isTaxpayer"
+                    v-model="form.isTaxpayer"
                     allowClear
-                    placeholder="请选择"
+                    placeholder="请选择是否"
                   ></v-select>
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="身份证号码" prop="productTypeName">
+                <a-form-model-item label="身份证号码" prop="indentityCard">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.indentityCard"
+                    id="merchantInfoManagementEdit-indentityCard"
                     :maxLength="18"
                     allowClear
                     placeholder="请输入身份证号码(最多18个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="生日" prop="productTypeName">
+                <a-form-model-item label="生日" prop="brithday">
                   <a-date-picker
                     style="width:100%"
-                    id="merchantInfoManagementEdit-time"
+                    id="merchantInfoManagementEdit-brithday"
                     :disabledDate="disabledDate"
-                    v-model="form.time"
+                    v-model="form.brithday"
                     :format="dateFormat"
                     placeholder="请选择日期" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="籍贯" prop="productTypeName">
+                <a-form-model-item label="籍贯" prop="nativePlace">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.nativePlace"
+                    id="merchantInfoManagementEdit-nativePlace"
                     :maxLength="30"
                     allowClear
                     placeholder="请输入籍贯(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="邮箱" prop="productTypeName">
+                <a-form-model-item label="邮箱" prop="mail">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.mail"
+                    id="merchantInfoManagementEdit-mail"
                     :maxLength="60"
                     allowClear
                     placeholder="请输入邮箱(最多60个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系人2" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入联系人2(最多30个字符)" />
+                <a-form-model-item label="联系人2" prop="contact2">
+                  <a-input v-model.trim="form.contact2" id="merchantInfoManagementEdit-contact2" :maxLength="30" allowClear placeholder="请输入联系人2(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系手机2" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="11" allowClear placeholder="请输入联系手机2(最多11个字符)" />
+                <a-form-model-item label="联系手机2" prop="contactMobile2">
+                  <a-input v-model.trim="form.contactMobile2" id="merchantInfoManagementEdit-contactMobile2" :maxLength="11" allowClear placeholder="请输入联系手机2(最多11个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="联系角色2" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入联系角色2(最多30个字符)" />
+                <a-form-model-item label="联系角色2" prop="contractRole2">
+                  <a-input v-model.trim="form.contractRole2" id="merchantInfoManagementEdit-contractRole2" :maxLength="30" allowClear placeholder="请输入联系角色2(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="邮政编码" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入邮政编码(最多30个字符)" />
+                <a-form-model-item label="邮政编码" prop="zipCode">
+                  <a-input v-model.trim="form.zipCode" id="merchantInfoManagementEdit-zipCode" :maxLength="30" allowClear placeholder="请输入邮政编码(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="收货人" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入收货人(最多30个字符)" />
+                <a-form-model-item label="收货人" prop="receiveContact">
+                  <a-input v-model.trim="form.receiveContact" id="merchantInfoManagementEdit-receiveContact" :maxLength="30" allowClear placeholder="请输入收货人(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="收货电话" prop="productTypeName">
-                  <a-input v-model.trim="form.productTypeName" id="merchantInfoManagementEdit-name" :maxLength="30" allowClear placeholder="请输入收货电话(最多30个字符)" />
+                <a-form-model-item label="收货电话" prop="receiveMobile">
+                  <a-input v-model.trim="form.receiveMobile" id="merchantInfoManagementEdit-receiveMobile" :maxLength="30" allowClear placeholder="请输入收货电话(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
@@ -243,22 +241,22 @@
                   <a-row :gutter="20">
                     <!-- 地址 -->
                     <a-col span="8">
-                      <a-form-model-item prop="provinceSn">
-                        <a-select id="merchantInfoManagementEdit-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+                      <a-form-model-item prop="receiveProvinceSn">
+                        <a-select id="merchantInfoManagementEdit-receiveProvinceSn" @change="getCityList" v-model="form.receiveProvinceSn" placeholder="请选择省">
                           <a-select-option v-for="item in addrProvinceList" :value="item.sn" :key="item.sn + 'a'">{{ item.name }}</a-select-option>
                         </a-select>
                       </a-form-model-item>
                     </a-col>
                     <a-col span="8">
-                      <a-form-model-item prop="citySn">
-                        <a-select id="merchantInfoManagementEdit-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+                      <a-form-model-item prop="receiveCitySn">
+                        <a-select id="merchantInfoManagementEdit-receiveCitySn" @change="getAreaList" v-model="form.receiveCitySn" placeholder="请选择市">
                           <a-select-option v-for="item in addrCityList" :value="item.sn" :key="item.sn + 'b'">{{ item.name }}</a-select-option>
                         </a-select>
                       </a-form-model-item>
                     </a-col>
                     <a-col span="8">
-                      <a-form-model-item prop="countySn">
-                        <a-select id="merchantInfoManagementEdit-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
+                      <a-form-model-item prop="receiveDistrictSn">
+                        <a-select id="merchantInfoManagementEdit-receiveDistrictSn" @change="areaCharged" v-model="form.receiveDistrictSn" placeholder="请选择区/县">
                           <a-select-option v-for="item in addrDistrictList" :value="item.sn" :key="item.sn + 'c'">{{ item.name }}</a-select-option>
                         </a-select>
                       </a-form-model-item>
@@ -267,40 +265,40 @@
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="收货详细地址" prop="supplierAddress">
+                <a-form-model-item label="收货详细地址" prop="receiveAddress">
                   <a-input
-                    id="merchantInfoManagementEdit-supplierAddress"
+                    id="merchantInfoManagementEdit-receiveAddress"
                     :maxLength="60"
-                    v-model="form.supplierAddress"
+                    v-model="form.receiveAddress"
                     placeholder="请输入收货详细地址(最多60个字符)"
                     allowClear />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="银行账户" prop="productTypeName" help="(例:张三)">
+                <a-form-model-item label="银行账户" prop="tradeAccountName" help="(例:张三)">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.tradeAccountName"
+                    id="merchantInfoManagementEdit-tradeAccountName"
                     :maxLength="30"
                     allowClear
                     placeholder="请输入银行账户(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="开户行" prop="productTypeName" help="(例:交通银行)">
+                <a-form-model-item label="开户行" prop="tradeBankName" help="(例:交通银行)">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.tradeBankName"
+                    id="merchantInfoManagementEdit-tradeBankName"
                     :maxLength="30"
                     allowClear
                     placeholder="请输入开户行(最多30个字符)" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="银行账号" prop="productTypeName" help="(例:1123 5677 1112 22342 1123)">
+                <a-form-model-item label="银行账号" prop="tradeBankAccount" help="(例:1123 5677 1112 22342 1123)">
                   <a-input
-                    v-model.trim="form.productTypeName"
-                    id="merchantInfoManagementEdit-name"
+                    v-model.trim="form.tradeBankAccount"
+                    id="merchantInfoManagementEdit-tradeBankAccount"
                     :maxLength="30"
                     allowClear
                     placeholder="请输入银行账号(最多30个字符)" />
@@ -316,44 +314,44 @@
           <a-collapse-panel key="1" header="总部信息">
             <a-row>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="箭冠汽配代码" prop="supplierAddress">
+                <a-form-model-item label="箭冠汽配代码" prop="jgAutoPartsCode">
                   <a-input
-                    id="merchantInfoManagementEdit-supplierAddress"
+                    id="merchantInfoManagementEdit-jgAutoPartsCode"
                     :maxLength="30"
-                    v-model="form.supplierAddress"
+                    v-model="form.jgAutoPartsCode"
                     placeholder="请输入箭冠汽配代码(最多30个字符)"
                     allowClear />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="门头更换日期" prop="productTypeName">
+                <a-form-model-item label="门头更换日期" prop="jgDoorHeaderChangeTime">
                   <a-date-picker
                     style="width:100%"
-                    id="merchantInfoManagementEdit-time"
+                    id="merchantInfoManagementEdit-jgDoorHeaderChangeTime"
                     :disabledDate="disabledDate"
-                    v-model="form.time"
+                    v-model="form.jgDoorHeaderChangeTime"
                     :format="dateFormat"
                     placeholder="请选择日期" />
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                <a-form-model-item label="特约价是否可见" prop="enabledFlag">
+                <a-form-model-item label="特约价是否可见" prop="isShowSpecialPrice">
                   <a-radio-group
                     name="radioGroup"
-                    v-model="form.enabledFlag"
-                    id="merchantInfoManagementEdit-enabledFlag" >
+                    v-model="form.isShowSpecialPrice"
+                    id="merchantInfoManagementEdit-isShowSpecialPrice" >
                     <a-radio :value="1">是</a-radio>
                     <a-radio :value="0">否</a-radio>
                   </a-radio-group>
                 </a-form-model-item>
               </a-col>
               <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-                <a-form-model-item label="备注" prop="enabledFlag" :label-col="{span:4}" :wrapper-col="{span:20}">
+                <a-form-model-item label="备注" prop="remark" :label-col="{span:4}" :wrapper-col="{span:20}">
                   <a-textarea
-                    id="merchantInfoManagementEdit-supplierAddress"
-                    :maxLength="30"
-                    v-model="form.supplierAddress"
-                    placeholder="请输入箭冠汽配代码(最多30个字符)"
+                    id="merchantInfoManagementEdit-remark"
+                    :maxLength="300"
+                    v-model="form.remark"
+                    placeholder="请输入备注(最多300个字符)"
                     allowClear />
                 </a-form-model-item>
               </a-col>
@@ -435,7 +433,7 @@ export default {
     areaCharged (val) {
       const index = this.addrDistrictList.findIndex(item => item.sn == val)
       if (index >= 0) {
-        this.form.countyName = this.addrDistrictList[index].name
+        this.form.districtName = this.addrDistrictList[index].name
       }
       this.form.supplierAddress = ''
     },

+ 40 - 112
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -6,35 +6,28 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="区域">
-              <a-cascader
-                @change="changeProductType"
-                change-on-select
-                :options="productTypeList"
-                :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
-                id="merchantInfoManagementList-productType"
-                placeholder="请选择区域"
-                allowClear />
+              <subarea id="merchantInfoManagementList-subarea" v-model="queryParam.subareaSn"></subarea>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="商户名称/别名">
-              <a-input id="merchantInfoManagementList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入商户名称/别名"/>
+              <a-input id="merchantInfoManagementList-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入商户名称/别名"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="商户类型">
-              <v-select code="ENABLED_FLAG" id="merchantInfoManagementList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择商户类型"></v-select>
+              <v-select code="DEALER_TYPE" id="merchantInfoManagementList-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择商户类型"></v-select>
             </a-form-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="审核状态">
-                <v-select code="ENABLED_FLAG" id="merchantInfoManagementList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择审核状态"></v-select>
+                <v-select code="AUDIT_STATE" id="merchantInfoManagementList-auditState" v-model="queryParam.auditState" allowClear placeholder="请选择审核状态"></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="合作状态">
-                <v-select code="ENABLED_FLAG" id="merchantInfoManagementList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择合作状态"></v-select>
+                <v-select code="DEALER_COOPERATE_FLAG" id="merchantInfoManagementList-cooperateFlag" v-model="queryParam.cooperateFlag" allowClear placeholder="请选择合作状态"></v-select>
               </a-form-item>
             </a-col>
           </template>
@@ -51,7 +44,7 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator">
-	  <a-button id="merchantInfoManagementList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      <a-button id="merchantInfoManagementList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
     </div>
     <!-- 总计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
@@ -67,22 +60,9 @@
       :data="loadData"
       :scroll="{ x: 2070 }"
       bordered>
-      <!-- 产品图片 -->
-      <template slot="productPic" slot-scope="text, record">
-        <img :src="record.productPic[0]" width="30" height="30" class="productPic" @click="openPicModal=true" />
-      </template>
-      <!-- 产品类别 -->
-      <template slot="productType" slot-scope="text, record">
-        <a-tooltip placement="top">
-          <template slot="title">
-            <span>{{ record.productTypeName }}</span>
-          </template>
-          {{ record.productTypeName3 }}
-        </a-tooltip>
-      </template>
-      <!-- 状态 -->
-      <template slot="status" slot-scope="text, record">
-        <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '待提交': '待单据审核' }}</a-tag>
+      <!-- 区域 -->
+      <template slot="area" slot-scope="text, record">
+        {{ record.subareaNameSet&&record.subareaNameSet[0] }}
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -107,114 +87,70 @@
 </template>
 
 <script>
-import moment from 'moment'
-// import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
-// import { dealerProductTypeQuery } from '@/api/dealerProductType'
-// import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct'
+import { dealerQueryList } from '@/api/dealer'
 import { STable, VSelect } from '@/components'
+import subarea from '@/views/common/subarea.js'
 import merchantInfoManagementDetailModal from './detailModal.vue'
 export default {
-  components: { STable, VSelect, merchantInfoManagementDetailModal },
+  components: { STable, VSelect, merchantInfoManagementDetailModal, subarea },
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
-        productCode: '', //  产品编码
-        productName: '', //  产品名称
-        origCode: '', //  原厂编码
-        productBrandSn: undefined, //  产品品牌
-        productTypeSn1: '', //  产品一级类别
-        productTypeSn2: '', //  产品二级类别
-        productTypeSn3: '', //  产品三级类别
-        enabledFlag: undefined //  状态
+        nameLike: '', //  商户名称、别名
+        dealerType: undefined, //  商户类型
+        subareaSn: undefined, //  区域
+        auditState: undefined, // 审核状态
+        cooperateFlag: undefined //  合作状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       dateFormat: 'YYYY-MM-DD',
-      time: [], //  创建时间
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
-        { title: '区域', scopedSlots: { customRender: 'productPic' }, width: 140, align: 'center' },
-        { title: '商户名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '商户别名', dataIndex: 'productCode', align: 'center' },
-        { title: '商户类型', dataIndex: 'origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '联系人', scopedSlots: { customRender: 'productType' }, width: 150, align: 'center', ellipsis: true },
-        { title: '联系电话', dataIndex: 'terminaldsdPrice', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '绑定手机号码', dataIndex: 'cssreateDate', width: 120, align: 'center' },
-        { title: '审核状态', scopedSlots: { customRender: 'status' }, width: 120, align: 'center' },
-        { title: '合作状态', scopedSlots: { customRender: 'status' }, width: 120, align: 'center' },
-        { title: '生效时间', scopedSlots: { customRender: 'status' }, width: 160, align: 'center' },
+        { title: '区域', scopedSlots: { customRender: 'area' }, width: 140, align: 'center' },
+        { title: '商户名称', dataIndex: 'dealerName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '商户别名', dataIndex: 'dealerAlias', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '联系人', dataIndex: 'contact', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '联系电话', dataIndex: 'dealerTelephone', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '绑定手机号码', dataIndex: 'contactMobile', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核状态', dataIndex: 'auditStateDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '合作状态', dataIndex: 'cooperateFlagDictValue', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '生效时间', dataIndex: 'cooperateEffectiveTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 260, align: 'center', fixed: 'right' }
       ],
-      selectedRowKeys: [], // Check here to configure the default column
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         // 创建时间
-        // if (this.time && this.time.length > 0) {
-        //   this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
-        //   this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
-        // } else {
-        //   this.queryParam.beginDate = undefined
-        //   this.queryParam.endDate = undefined
-        // }
-        // return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
-        //   const 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
-        //     const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
-        //     const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
-        //     const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
-        //     data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productPic: ['https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg', 'https://qn.antdv.com/vue.png'], productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ]
-          }
+        return dealerQueryList(Object.assign(parameter, this.queryParam)).then(res => {
+          const 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
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
       },
       openModal: false, //  查看详情  弹框
-      itemId: '', //  当前产品id
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  类别下拉数据
-    }
-  },
-  computed: {
-    hasSelected () {
-      return this.selectedRowKeys.length > 0
+      itemId: '' //  当前商户sn
     }
   },
   methods: {
     //  重置
     resetSearchForm () {
-      this.queryParam.productCode = ''
-      this.queryParam.productName = ''
-      this.queryParam.origCode = ''
-      this.queryParam.productBrandSn = undefined
-      this.queryParam.productTypeSn1 = ''
-      this.queryParam.productTypeSn2 = ''
-      this.queryParam.productTypeSn3 = ''
-      this.queryParam.enabledFlag = undefined
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam = {
+        nameLike: '', //  商户名称、别名
+        dealerType: undefined, //  商户类型
+        subareaSn: undefined, //  区域
+        auditState: undefined, // 审核状态
+        cooperateFlag: undefined //  合作状态
+      }
       this.$refs.table.refresh(true)
     },
     // 新增
@@ -274,18 +210,10 @@ export default {
     closeModal () {
       this.itemId = ''
       this.openModal = false
-    },
-    //  产品类别  change
-    changeProductType (val, opt) {
-      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     }
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // vm.getProductBrand()
-      // vm.getProductType()
     })
   }
 }