瀏覽代碼

Merge branch 'develop' into feature/销售区域

ZZH-wl 2 年之前
父節點
當前提交
05e20a9447

+ 46 - 27
src/views/customer/components/Edit.vue

@@ -15,21 +15,19 @@
       </el-row>
       <el-row :gutter="20">
         <el-col :span="12">
-          <el-form-item label="客户行业" prop="custIndustry">
-            <el-select v-model="editForm.custIndustry" placeholder="请选择客户行业" style="width: 100%">
+          <el-form-item label="客户类型" prop="custIndustry">
+            <el-select v-model="editForm.custIndustry" placeholder="请选择客户类型" style="width: 100%">
               <el-option v-for="item in industryOptions" :key="item.value" :label="item.value" :value="item.value" />
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <!-- <el-col :span="12">
           <el-form-item label="客户级别" prop="custLevel">
             <el-select v-model="editForm.custLevel" placeholder="请选择客户级别" style="width: 100%">
               <el-option v-for="item in levelOptions" :key="item.value" :label="item.value" :value="item.value" />
             </el-select>
           </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row :gutter="20">
+        </el-col> -->
         <el-col :span="12">
           <el-form-item label="客户来源" prop="source">
             <el-select v-model="editForm.source" placeholder="请选择客户来源" style="width: 100%">
@@ -37,18 +35,8 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12">
-          <el-form-item label="下次联系时间" prop="followUpDate">
-            <el-date-picker
-              v-model="editForm.followUpDate"
-              format="yyyy-MM-dd HH:mm"
-              placeholder="选择下次联系时间"
-              style="width: 100%"
-              type="datetime"
-              value-format="yyyy-MM-dd HH:mm" />
-          </el-form-item>
-        </el-col>
       </el-row>
+
       <el-row :gutter="20">
         <el-col :span="12">
           <el-form-item label="所在地区" required>
@@ -85,6 +73,19 @@
           </el-form-item>
         </el-col>
       </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="下次联系时间" prop="followUpDate">
+            <el-date-picker
+              v-model="editForm.followUpDate"
+              format="yyyy-MM-dd HH:mm"
+              placeholder="选择下次联系时间"
+              style="width: 100%"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:mm" />
+          </el-form-item>
+        </el-col>
+      </el-row>
       <el-form-item label="备注" prop="remark">
         <el-input
           v-model="editForm.remark"
@@ -136,7 +137,7 @@
           custAddress: '', // 详细地址
           custStatus: '', // 客户状态(10正常20)
           followUpDate: '', // 最后跟进时间
-          custIndustry: '', // 客户行业  (没数据)
+          custIndustry: '', // 客户类型  (没数据)
           custLevel: '', // 客户级别  (没数据)
           source: '', //客户来源
           province: {}, //省
@@ -145,13 +146,13 @@
         },
         editRules: {
           custName: [{ required: true, validator: checkCustName, trigger: 'blur' }],
-          custIndustry: [{ required: true, trigger: 'change', message: '请选择客户行业' }],
-          custLevel: [{ required: true, trigger: 'change', message: '请选择客户级别' }],
+          custIndustry: [{ required: true, trigger: 'change', message: '请选择客户类型' }],
+          // custLevel: [{ required: true, trigger: 'change', message: '请选择客户级别' }],
           source: [{ required: true, trigger: 'change', message: '请选择客户来源' }],
         },
         provinceOptions: [],
         provinceDetail: [],
-        industryOptions: [], //客户行业
+        industryOptions: [], //客户类型
         levelOptions: [], //客户级别
         sourceOptions: [], //客户来源
       }
@@ -194,15 +195,25 @@
         let params = { ...this.editForm }
         const [valid] = await to(this.$refs.editForm.validate())
         if (valid == false) return
-        if (!params.province.id) {
-          this.$message.warning('请选择所在地区')
-          return
-        }
+        if (!params.province.id) return this.$message.warning('请选择所在省')
+        if (!params.city.id) return this.$message.warning('请选择所在市')
+        if (!params.region.id) return this.$message.warning('请选择所在区')
         let arr = []
         arr.push(params.province.distName)
         if (params.city.id) arr.push(params.city.distName)
         if (params.region.id) arr.push(params.region.distName)
         params.custLocation = arr.join('/')
+        params.custProvinceId = params.province.id
+        params.custProvince = params.province.distName
+        params.custCityId = params.city.id
+        params.custCity = params.city.distName
+        params.custRegionId = params.region.id
+        params.custRegion = params.region.distName
+        this.industryOptions.forEach((i) => {
+          if (params.custIndustry == i.value) {
+            params.custIndustryCode = i.key
+          }
+        })
         if (!params.followUpDate) params.followUpDate = null
         const [err, res] = await to(api.createCustomer(params))
         if (err) return
@@ -220,12 +231,20 @@
         let params = { ...this.editForm }
         const [valid] = await to(this.$refs.editForm.validate())
         if (valid == false) return
-        if (!params.province.id) return this.$message.warning('请选择所在地区')
+        if (!params.province.id) return this.$message.warning('请选择所在省')
+        if (!params.city.id) return this.$message.warning('请选择所在市')
+        if (!params.region.id) return this.$message.warning('请选择所在区')
         let arr = []
         arr.push(params.province.distName)
         if (params.city.id) arr.push(params.city.distName)
         if (params.region.id) arr.push(params.region.distName)
         params.custLocation = arr.join('/')
+        params.custProvinceId = params.province.id
+        params.custProvince = params.province.distName
+        params.custCityId = params.city.id
+        params.custCity = params.city.distName
+        params.custRegionId = params.region.id
+        params.custRegion = params.region.distName
         if (!params.followUpDate) params.followUpDate = null
         const [err, res] = await to(api.updateCostomer(params))
         if (err) return
@@ -254,7 +273,7 @@
           custAddress: '', // 详细地址
           custStatus: '', // 客户状态(10正常20)
           followUpDate: '', // 最后跟进时间
-          custIndustry: '', // 客户行业  (没数据)
+          custIndustry: '', // 客户类型  (没数据)
           custLevel: '', // 客户级别  (没数据)
           source: '', //客户来源
           province: {}, //省

+ 3 - 3
src/views/customer/components/Merge.vue

@@ -19,7 +19,7 @@
       <ul class="title">
         <li :class="{ differ: flag.custName }">目标客户</li>
         <li :class="{ differ: flag.abbrName }">助记名</li>
-        <li :class="{ differ: flag.custIndustry }">客户行业</li>
+        <li :class="{ differ: flag.custIndustry }">客户类型</li>
         <li :class="{ differ: flag.custLevel }">客户级别</li>
         <li :class="{ differ: flag.source }">客户来源</li>
         <li :class="{ differ: flag.followUpDate }">下次联系时间</li>
@@ -85,7 +85,7 @@
           custAddress: '', // 详细地址
           custStatus: '', // 客户状态(10正常20)
           followUpDate: '', // 最后跟进时间
-          custIndustry: '', // 客户行业  (没数据)
+          custIndustry: '', // 客户类型  (没数据)
           custLevel: '', // 客户级别  (没数据)
           source: '', //客户来源
           salesId: '', //归属销售
@@ -98,7 +98,7 @@
           custAddress: false, // 详细地址
           custStatus: false, // 客户状态(10正常20)
           followUpDate: false, // 最后跟进时间
-          custIndustry: false, // 客户行业  (没数据)
+          custIndustry: false, // 客户类型  (没数据)
           custLevel: false, // 客户级别  (没数据)
           source: false, //客户来源
           salesName: false,

+ 2 - 2
src/views/customer/detail.vue

@@ -38,7 +38,7 @@
             <el-descriptions-item content-class-name="my-content" label="客户级别" label-class-name="my-label">
               {{ detail.custLevel }}
             </el-descriptions-item>
-            <el-descriptions-item content-class-name="my-content" label="客户行业" label-class-name="my-label">
+            <el-descriptions-item content-class-name="my-content" label="客户类型" label-class-name="my-label">
               {{ detail.custIndustry }}
             </el-descriptions-item>
             <el-descriptions-item content-class-name="my-content" label="客户状态" label-class-name="my-label">
@@ -352,7 +352,7 @@
           custCode: '', //客户编码
           abbrName: '', //助记名
           level: '', //客户级别
-          indusTry: '', //客户行业
+          indusTry: '', //客户类型
           custStatus: '', //客户状态
           followUpDate: '', //最后跟进时间
         },

+ 25 - 11
src/views/customer/list.vue

@@ -21,15 +21,15 @@
         <el-input v-model="queryForm.custName" placeholder="客户名称" />
       </el-col>
       <el-col :span="4">
-        <el-select v-model="queryForm.custIndustry" placeholder="客户行业" style="width: 100%">
+        <el-select v-model="queryForm.custIndustry" placeholder="客户类型" style="width: 100%">
           <el-option v-for="item in industryOptions" :key="item.value" :label="item.value" :value="item.value" />
         </el-select>
       </el-col>
-      <el-col :span="4">
+      <!-- <el-col :span="4">
         <el-select v-model="queryForm.custLevel" placeholder="客户级别" style="width: 100%">
           <el-option v-for="item in levelOptions" :key="item.value" :label="item.value" :value="item.value" />
         </el-select>
-      </el-col>
+      </el-col> -->
       <el-col :span="4">
         <el-date-picker
           v-model="queryForm.followUpDate"
@@ -175,7 +175,7 @@
         listLoading: false,
         list: [],
         selectRows: [],
-        industryOptions: [], //客户行业
+        industryOptions: [], //客户类型
         levelOptions: [], //客户级别
         // 自定义列表
         checkList: [],
@@ -202,26 +202,33 @@
             disableCheck: false,
           },
           {
-            label: '所在地区',
+            label: '所在',
             width: 'auto',
-            prop: 'custLocation',
+            prop: 'custProvince',
             sortable: false,
             disableCheck: false,
           },
           {
-            label: '客户行业',
+            label: '所在市',
             width: 'auto',
-            prop: 'custIndustry',
+            prop: 'custCity',
             sortable: false,
             disableCheck: false,
           },
           {
-            label: '客户级别',
+            label: '客户类型',
             width: 'auto',
-            prop: 'custLevel',
+            prop: 'custIndustry',
             sortable: false,
             disableCheck: false,
           },
+          // {
+          //   label: '客户级别',
+          //   width: 'auto',
+          //   prop: 'custLevel',
+          //   sortable: false,
+          //   disableCheck: false,
+          // },
           {
             label: '客户状态',
             width: 'auto',
@@ -236,6 +243,13 @@
             sortable: false,
             disableCheck: false,
           },
+          {
+            label: '最后跟进人',
+            width: '140px',
+            prop: 'followUpMan',
+            sortable: false,
+            disableCheck: false,
+          },
           {
             label: '创建时间',
             width: '140px',
@@ -300,7 +314,7 @@
           pageSize: 10,
           custCode: '', // 客户编码
           custName: '', //客户名称
-          indusTry: '', // 客户行业  ()
+          indusTry: '', // 客户类型  ()
         }
         this.fetchData()
       },

+ 27 - 13
src/views/customer/openSea.vue

@@ -18,15 +18,15 @@
             <el-input v-model="queryForm.custName" placeholder="客户名称" />
           </el-form-item>
           <el-form-item>
-            <el-select v-model="queryForm.custIndustry" placeholder="客户行业" style="width: 100%">
+            <el-select v-model="queryForm.custIndustry" placeholder="客户类型" style="width: 100%">
               <el-option v-for="item in industryOptions" :key="item.value" :label="item.value" :value="item.value" />
             </el-select>
           </el-form-item>
-          <el-form-item>
+          <!-- <el-form-item>
             <el-select v-model="queryForm.custLevel" placeholder="客户级别" style="width: 100%">
               <el-option v-for="item in levelOptions" :key="item.value" :label="item.value" :value="item.value" />
             </el-select>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item>
             <el-date-picker
               v-model="queryForm.followUpDate"
@@ -107,7 +107,7 @@
       </el-table-column>
       <el-table-column align="center" label="助记名" prop="abbrName" />
       <el-table-column align="center" label="所在地区" prop="custLocation" />
-      <el-table-column align="center" label="客户行业" prop="custIndustry" />
+      <el-table-column align="center" label="客户类型" prop="custIndustry" />
       <el-table-column align="center" label="客户级别" prop="custLevel" />
       <el-table-column align="center" label="客户状态" prop="custStatus">
         <template slot-scope="scope">
@@ -176,13 +176,13 @@
           pageSize: 10,
           custCode: '', // 客户编码
           custName: '', //客户名称
-          custIndustry: '', // 客户行业  ()
+          custIndustry: '', // 客户类型  ()
           custLevel: '', //客户级别
           followUpDate: '', //最后跟进时间
           isPublic: true,
         },
         selectRows: [],
-        industryOptions: [], //客户行业
+        industryOptions: [], //客户类型
         levelOptions: [], //客户级别
         // 自定义列表
         checkList: [],
@@ -209,26 +209,33 @@
             disableCheck: false,
           },
           {
-            label: '所在地区',
+            label: '所在',
             width: 'auto',
-            prop: 'custLocation',
+            prop: 'custProvince',
             sortable: false,
             disableCheck: false,
           },
           {
-            label: '客户行业',
+            label: '所在市',
             width: 'auto',
-            prop: 'custIndustry',
+            prop: 'custCity',
             sortable: false,
             disableCheck: false,
           },
           {
-            label: '客户级别',
+            label: '客户类型',
             width: 'auto',
-            prop: 'custLevel',
+            prop: 'custIndustry',
             sortable: false,
             disableCheck: false,
           },
+          // {
+          //   label: '客户级别',
+          //   width: 'auto',
+          //   prop: 'custLevel',
+          //   sortable: false,
+          //   disableCheck: false,
+          // },
           {
             label: '客户状态',
             width: 'auto',
@@ -243,6 +250,13 @@
             sortable: false,
             disableCheck: false,
           },
+          {
+            label: '最后跟进人',
+            width: '140px',
+            prop: 'followUpMan',
+            sortable: false,
+            disableCheck: false,
+          },
           {
             label: '创建人',
             width: '140px',
@@ -309,7 +323,7 @@
           pageSize: 10,
           custCode: '', // 客户编码
           custName: '', //客户名称
-          custIndustry: '', // 客户行业  ()
+          custIndustry: '', // 客户类型  ()
           custLevel: '', //客户级别
         }
         this.fetchData()