Просмотр исходного кода

feature(订单管理系统):
1.公海客户按照所在省、所在市查询
2.储备客户增加所属销售、所在省、所在市查询类型
3.打卡方式显示居家
4.跟进方式修改

niezch 2 лет назад
Родитель
Сommit
103b5e2ab1

+ 6 - 6
src/views/customer/follow.vue

@@ -3,14 +3,14 @@
  * @Date: 2022-12-15 15:38:21
 
  * @LastEditors: niezch@dashoo.cn
- * @LastEditTime: 2023-03-28 10:07:06
+ * @LastEditTime: 2023-03-29 15:00:46
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\follow.vue
 -->
 <template>
   <div class="follow-container">
     <el-row :gutter="10" style="margin-bottom: 10px">
-      <el-col :span="4">
+      <el-col :span="3">
         <el-input v-model="queryForm.custName" placeholder="客户" @keyup.enter.native="search" />
       </el-col>
       <!-- <el-col :span="4">
@@ -21,13 +21,13 @@
           <template slot="append">天</template>
         </el-input>
       </el-col> -->
-      <el-col :span="4">
+      <el-col :span="3">
         <el-select v-model="queryForm.followType" clearable placeholder="跟进方式" style="width: 100%">
           <el-option v-for="item in FollowTypeOptions" :key="item.key" :label="item.value" :value="item.key" />
         </el-select>
       </el-col>
 
-      <el-col :span="6">
+      <el-col :span="5">
         <!-- <el-select v-model="queryForm.targetType" clearable placeholder="跟进对象类型" style="width: 100%">
           <el-option v-for="item in targetTypeOptions" :key="item.key" :label="item.value" :value="item.key" />
         </el-select> -->
@@ -45,7 +45,7 @@
       <!-- <el-col :span="4">
         <el-input v-model.number="queryForm.targetName" placeholder="跟进对象" />
       </el-col> -->
-      <el-col :span="4">
+      <el-col :span="3">
         <el-input v-model="queryForm.createdName" placeholder="跟进人" @keyup.enter.native="search" />
       </el-col>
       <el-col :span="6">
@@ -376,7 +376,7 @@
 <style lang="scss" scoped>
   $base: '.follow';
   ::v-deep .el-input-group__prepend {
-    width: 35%;
+    width: 40%;
   }
   .follow {
     display: flex;

+ 7 - 7
src/views/customer/followsell.vue

@@ -2,28 +2,28 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-15 15:38:21
  * @LastEditors: niezch@dashoo.cn
- * @LastEditTime: 2023-03-28 10:05:51
+ * @LastEditTime: 2023-03-29 15:02:12
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\followsell.vue
 -->
 <template>
   <div class="follow-container">
     <el-row :gutter="10" style="margin-bottom: 10px">
-      <!-- <el-col :span="4">
+      <el-col :span="3">
         <el-input v-model="queryForm.custName" placeholder="客户" />
-      </el-col> -->
+      </el-col>
 
       <!-- <el-col :span="4">
         <el-input v-model.number="queryForm.daysBeforeToday" placeholder="查询天数">
           <template slot="append">天</template>
         </el-input>
       </el-col> -->
-      <el-col :span="4">
+      <el-col :span="3">
         <el-select v-model="queryForm.followType" clearable placeholder="跟进方式" style="width: 100%">
           <el-option v-for="item in FollowTypeOptions" :key="item.key" :label="item.value" :value="item.key" />
         </el-select>
       </el-col>
-      <el-col :span="6">
+      <el-col :span="5">
         <!-- <el-select v-model="queryForm.targetType" clearable placeholder="跟进对象类型" style="width: 100%">
           <el-option v-for="item in targetTypeOptions" :key="item.key" :label="item.value" :value="item.key" />
         </el-select> -->
@@ -36,7 +36,7 @@
       <!-- <el-col :span="4">
         <el-input v-model.number="queryForm.targetName" placeholder="跟进对象" />
       </el-col> -->
-      <el-col :span="4">
+      <el-col :span="3">
         <el-input v-model="queryForm.createdName" clearable placeholder="跟进人" />
       </el-col>
       <el-col :span="6">
@@ -367,7 +367,7 @@
 <style lang="scss" scoped>
   $base: '.follow';
   ::v-deep .el-input-group__prepend {
-    width: 35%;
+    width: 40%;
   }
   .follow {
     height: calc(100vh - 240px);

+ 39 - 7
src/views/customer/list.vue

@@ -2,7 +2,7 @@
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-26 16:34:37
  * @LastEditors: niezch@dashoo.cn
- * @LastEditTime: 2023-03-27 11:36:13
+ * @LastEditTime: 2023-03-29 14:42:13
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\customer\list.vue
 -->
@@ -26,13 +26,27 @@
         </el-select>
       </el-col> -->
       <el-col :span="3.5">
-        <el-input v-model="queryForm.custProvince" clearable placeholder="所属省" @keyup.enter.native="handleSearch" />
+        <el-select v-model="queryForm.province" clearable placeholder="所在省" value-key="id">
+          <el-option v-for="item in provinceOptions" :key="item.id" :label="item.distName" :value="item" />
+        </el-select>
+        <!-- <el-input v-model="queryForm.custProvince" clearable placeholder="所在省" @keyup.enter.native="handleSearch" /> -->
       </el-col>
       <el-col :span="3.5">
-        <el-input v-model="queryForm.custCity" clearable placeholder="所属市" @keyup.enter.native="handleSearch" />
+        <el-select v-model="queryForm.custCity" clearable placeholder="所在市" value-key="id">
+          <el-option
+            v-for="item in queryForm.province ? queryForm.province.children : []"
+            :key="item.id"
+            clearable
+            :label="item.distName"
+            :value="item.distName" />
+        </el-select>
+        <!-- <el-input v-model="queryForm.custCity" clearable placeholder="所在市" @keyup.enter.native="handleSearch" /> -->
       </el-col>
       <el-col :span="3.5">
-        <el-input v-model="queryForm.salesName" clearable placeholder="所属销售" @keyup.enter.native="handleSearch" />
+        <el-select v-model="queryForm.salesName" clearable placeholder="所属销售" value-key="id">
+          <el-option v-for="item in sellOptions" :key="item.id" :label="item.nickName" :value="item.nickName" />
+        </el-select>
+        <!-- <el-input v-model="queryForm.salesName" clearable placeholder="所属销售" @keyup.enter.native="handleSearch" /> -->
       </el-col>
       <!-- <el-col :span="4">
         <el-select v-model="queryForm.custLevel" placeholder="客户级别" style="width: 100%">
@@ -173,7 +187,7 @@
   import Merge from './components/Merge'
   import TableTool from '@/components/table/TableTool'
   import downloadFileByByte from '@/utils/base64ToFile'
-
+  import userApi from '@/api/system/user'
   export default {
     name: 'ReserveCustomer',
     components: {
@@ -200,6 +214,7 @@
           followUpDate: [new Date(this.getLastMonth(new Date())), new Date()],
           custProvince: '',
           custCity: '',
+          province: {},
         },
         total: 0,
         listLoading: false,
@@ -207,6 +222,9 @@
         selectRows: [],
         industryOptions: [], //客户类型
         levelOptions: [], //客户级别
+        provinceOptions: [],
+        provinceDetail: [],
+        sellOptions: [],
         // 自定义列表
         showColumns: [],
         columns: [
@@ -334,10 +352,22 @@
         return year + '-' + (month - 1) + '-' + lastMonthDay // 当前天日期小于当前月总天数
       },
       getOptions() {
-        Promise.all([this.getDicts('cust_level'), this.getDicts('cust_idy')])
-          .then(([level, industry]) => {
+        Promise.all([
+          api.getProvinceDetail(),
+          this.getDicts('cust_level'),
+          this.getDicts('cust_idy'),
+          userApi.getList({
+            orderBy: 'userName',
+            roles: ['SalesEngineer', 'ProductLineManager'],
+            pageNum: 1,
+            pageSize: 50,
+          }),
+        ])
+          .then(([province, level, industry, sell]) => {
+            this.provinceOptions = province.data.list || []
             this.levelOptions = level.data.values || []
             this.industryOptions = industry.data.values || []
+            this.sellOptions = sell.data.list || []
           })
           .catch((err) => console.log(err))
       },
@@ -364,6 +394,7 @@
           CreateOn.push(_this.formatDateTime(_this.queryForm.followUpDate[1]))
         }
         params['CreateOn'] = CreateOn.join(',')
+        params.custProvince = params.province.distName ? params.province.distName : ''
         const [err, res] = await to(api.getList(params))
         if (err) return (this.listLoading = false)
         this.list = res.data.list || []
@@ -402,6 +433,7 @@
           followUpDate: [new Date(this.getLastMonth(new Date())), new Date()],
           custProvince: '',
           custCity: '',
+          province: {},
         }
         this.fetchData()
       },

+ 25 - 4
src/views/customer/openSea.vue

@@ -21,15 +21,28 @@
               placeholder="客户名称"
               @keyup.enter.native="handleSearch" />
           </el-form-item>
-          <el-form-item>
+          <!-- <el-form-item>
             <el-input
               v-model="queryForm.custProvince"
               clearable
               placeholder="所在省"
               @keyup.enter.native="handleSearch" />
+          </el-form-item> -->
+          <el-form-item>
+            <el-select v-model="queryForm.province" clearable placeholder="所在省" value-key="id">
+              <el-option v-for="item in provinceOptions" :key="item.id" :label="item.distName" :value="item" />
+            </el-select>
           </el-form-item>
           <el-form-item>
-            <el-input v-model="queryForm.custCity" clearable placeholder="所在市" @keyup.enter.native="handleSearch" />
+            <!-- <el-input v-model="queryForm.custCity" clearable placeholder="所在市" @keyup.enter.native="handleSearch" /> -->
+            <el-select v-model="queryForm.custCity" clearable placeholder="所在市" value-key="id">
+              <el-option
+                v-for="item in queryForm.province ? queryForm.province.children : []"
+                :key="item.id"
+                clearable
+                :label="item.distName"
+                :value="item.distName" />
+            </el-select>
           </el-form-item>
           <el-form-item>
             <el-select
@@ -220,11 +233,15 @@
           followUpDate: [new Date(this.getLastMonth(new Date())), new Date()], //最后跟进时间
           isPublic: true,
           custProvince: '',
+          province: {},
           custCity: '',
         },
         selectRows: [],
         industryOptions: [], //客户类型
         levelOptions: [], //客户级别
+        provinceOptions: [],
+        provinceDetail: [],
+        sellOptions: [],
         // 自定义列表
         showColumns: [],
         columns: [
@@ -341,10 +358,12 @@
         return year + '-' + (month - 1) + '-' + lastMonthDay // 当前天日期小于当前月总天数
       },
       getOptions() {
-        Promise.all([this.getDicts('cust_level'), this.getDicts('cust_idy')])
-          .then(([level, industry]) => {
+        Promise.all([api.getProvinceDetail(), this.getDicts('cust_level'), this.getDicts('cust_idy')])
+          .then(([province, level, industry, sell]) => {
+            this.provinceOptions = province.data.list || []
             this.levelOptions = level.data.values || []
             this.industryOptions = industry.data.values || []
+            this.sellOptions = sell.data.list || []
           })
           .catch((err) => console.log(err))
       },
@@ -365,6 +384,7 @@
           CreateOn.push(_this.formatDateTime(_this.queryForm.followUpDate[1]))
         }
         params['CreateOn'] = CreateOn.join(',')
+        params.custProvince = params.province.distName ? params.province.distName : ''
         if (!params.followUpDate) params.followUpDate = null
         const [err, res] = await to(api.getPublicList(params))
         if (err) return (this.listLoading = false)
@@ -415,6 +435,7 @@
           isPublic: true,
           custProvince: '',
           custCity: '',
+          province: {},
         }
         this.fetchData()
       },

+ 4 - 3
src/views/plat/punchRecords/index.vue

@@ -46,10 +46,11 @@
                     {{ item.userNickName }}
                     <span v-show="item.userPostName">({{ item.userPostName }})</span>
                     打卡 &nbsp;
-                    <!-- 打卡类型(10居家20客户30经销商40代理商) 居家不显示 -->
-                    <span v-show="item.punchType != 10" @click="lookTarget(item)">
+                    <!-- 打卡类型(10居家20客户30经销商40代理商) 居家不显示 v-show="item.punchType != 10"-->
+                    <span @click="lookTarget(item)">
                       {{ item.targetName }}
-                      <el-tag v-if="item.punchType == 20" type="success">客户</el-tag>
+                      <el-tag v-if="item.punchType == 10" type="info">居家</el-tag>
+                      <el-tag v-else-if="item.punchType == 20" type="success">客户</el-tag>
                       <el-tag v-else-if="item.punchType == 30" type="warning">经销商</el-tag>
                       <el-tag v-else-if="item.punchType == 40" type="danger">代理商</el-tag>
                     </span>