changhaoning 2 лет назад
Родитель
Сommit
0d35a31da8

+ 2 - 0
src/api/pages/common/common.js

@@ -109,6 +109,8 @@ export default {
     getGoodsForPurchaseReturnByPage:'get_goods_for_purchase_return_by_page',
     //获取员工的范围权限类型
     getPurviewType:'get_purview_type',
+    //获取基础数据
+    getInitData:'get_init_data',
   },
 }
 

+ 2 - 1
src/api/pages/mst/cus-follow.js

@@ -5,7 +5,8 @@
  */
 export default {
   cusFollowService: {
-    prefix: '/mdm-server/core/customerFollow/',
+    prefix: '/mdm-server/mst/cusFollow/',
+    updateMeasure:'update_measure',
   }
 }
 

+ 2 - 1
src/api/pages/mst/customer.js

@@ -5,7 +5,8 @@
  */
 export default {
   customerService: {
-    prefix: '/mdm-server/core/customer/',
+    prefix: '/mdm-server/mst/customer/',
+    selectByCondNoPage:'select_by_cond_no_page',
   }
 }
 

+ 10 - 0
src/locale/lang/zh-CN.js

@@ -536,6 +536,16 @@ export const columns = {
   trfInMacName:'转入账户',
   trfOutMacName:'转出账户',
   amtTrf:'转账金额',
+  intention: '客户意向',
+  stayTimeLen: '留店时长',
+  followData: '跟进内容',
+  nextFollowTime:'提醒时间',
+  allReceipt:'全部接待',
+  followTask2: '跟进任务',
+  flgAgainMeasure:'是否复尺',
+  measureRemarks:'量尺备注',
+  measureTime: '量尺时间',
+  usedLocation2: '空间名称',
 }
 
 /**

+ 333 - 196
src/view/mst/cus-follow/index.vue

@@ -24,15 +24,17 @@
     <card style="padding: 0">
       <DkTabs ref="tab" v-model="tabsModel" :options="tabsOptions" @on-click="clickTab"></DkTabs>
       <DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData"
-               :height="this.tableHeight-50" :primaryKey="tabsModel===$t('followTask2')?'planId':'followId'"
-               @pageChange="pageSizeChange"
+               :height="this.tableHeight-50"
+               primaryKey="followId"
+               :page-size-opts="pageSizeOpts"
                :page-size="pageInfo.pageSize"
+               :choose-flag="false"
                name="table">
-        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerCode"
+        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusCode"
                        @on-link="openCustomerMessage"></DkTableColumn>
-        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerName"
+        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusName"
                        @on-link="openCustomerMessage"></DkTableColumn>
-        <DkTableColumn field="customerPhone"></DkTableColumn>
+        <DkTableColumn field="cusPhone"></DkTableColumn>
         <DkTableColumn field="addressFull"></DkTableColumn>
         <DkTableColumn field="contactName"></DkTableColumn>
         <DkTableColumn field="contactPhones"></DkTableColumn>
@@ -85,103 +87,79 @@
         <Radio label="2">{{ $t('receptionNew') }}</Radio>
         <Radio label="1">{{ $t('receptionOld') }}</Radio>
       </RadioGroup>
-      <DkCollapse ref="collapse">
+      <DkCollapse ref="collapse" v-if="receptionType=='1'">
         <DkPanel prop="customerInfo">
-          <DkForm slot="content" ref="formReception" style="width:100%;" :label-max-words="6">
+          <DkForm slot="content" ref="formReception" v-model="customerInfo4" style="width:100%;">
             <!--客户名称-->
-            <DkFormItem prop="customerName" :errorMessage="getErrMessage('customerName')" required>
-              <InputPop v-model="customerInfo4.customerName"/>
+            <DkFormItem prop="cusName" :required="true">
+              <InputPop v-model="customerInfo4.cusName"/>
             </DkFormItem>
             <!--客户电话-->
-            <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')" required>
-              <InputPop :telephone="true" v-model="customerInfo4.customerPhone" @on-change="changeTel"/>
+            <DkFormItem prop="cusPhone" :required="true">
+              <InputPop :telephone="true" v-model="customerInfo4.cusPhone" @on-change="changeTel"/>
+            </DkFormItem>
+            <!--客户区域-->
+            <DkFormItem prop="addressName" :required="true">
+              <RegionsChoose v-model="addressArea" :options="cityData" :default-value="customerInfo4.addressName"
+                             ref="customerDistrict"
+                             @on-choose="chooseAddress"></RegionsChoose>
             </DkFormItem>
-            <!--行政区划-->
-            <!--              <DkFormItem prop="customerDistrict" :errorMessage="getErrMessage('customerDistrict')">-->
-            <!--                &lt;!&ndash; 高德 &ndash;&gt;-->
-            <!--                <RegionsChooseAmap v-model="regionData" :options="cityData" ref="RegionsChoose"-->
-            <!--                                   :default-value="customerInfo4.addressName"-->
-            <!--                                   @on-choose="chooseAddress"></RegionsChooseAmap>-->
-            <!--              </DkFormItem>-->
             <!--门牌号-->
-            <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
+            <DkFormItem :label="$t('addressNo')" prop="addressNo">
               <InputPop v-model="customerInfo4.addressNo" @input="setAddressFull"/>
             </DkFormItem>
             <!--详细地址-->
-            <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
+            <DkFormItem :label="$t('addressFull')" prop="addressFull">
               <InputPop v-model="customerInfo4.addressFull" readonly/>
             </DkFormItem>
           </DkForm>
         </DkPanel>
-        <DkPanel prop="receptionNew">
-          <DkForm slot="content" ref="formReceptionNew" style="width:100%;" :label-max-words="6">
-            <!--                客户意向-->
-            <DkFormItem prop="intention" :errorMessage="getErrMessage('intention')" required>
-              <SelectPop v-model="customerInfo4.intention" :options="intentionList.filter((it)=>it.dataName!=='已流失')"
+        <DkPanel prop="receptionOld" v-if="receptionType=='1'">
+          <DkForm slot="content" ref="formReceptionNew" style="width:100%;">
+            <!-- 客户意向-->
+            <DkFormItem prop="intention" :required="true">
+              <SelectPop v-model="customerInfo4.intention" :options="intentionList"
                          :multiple="false" :clearable="false"
-                         label-key="dataName" value-key="dataCode" transfer
+                         label-key="kindName" value-key="kindCode" transfer
                          @on-change="(val)=>cleanCompetitiveBrands(val, 'customerInfo4')"/>
             </DkFormItem>
-            <!--                竞品品牌-->
-            <DkFormItem prop="competitiveBrands" :errorMessage="getErrMessage('competitiveBrands')" required>
-              <InputPop v-model="customerInfo4.competitiveBrands" maxlength="100"/>
-            </DkFormItem>
-            <!--                意向品类-->
-            <DkFormItem prop="intentionInfo" :errorMessage="getErrMessage('intentionInfo')">
-              <DkRow>
-                <Col span="8" v-for="(item, index) of goodsSpecsList" :key="index">
-                  <div v-if="!item.otherFlag">
-                    <Col span="12">
-                      <Checkbox v-model="customerInfo4.intentionInfo[index].value"
-                                @on-change="selectIntentionInfo(customerInfo4.intentionInfo[index])"
-                      >{{ item.specsName }}
-                      </Checkbox>
-                    </Col>
-                    <Col span="12">
-                      <InputNumberPop v-model="customerInfo4.intentionInfo[index].count" style="width: 100px"/>
-                    </Col>
-                  </div>
-                  <div v-else>
-                    <Col span="12">
-                      <Checkbox v-model="customerInfo4.intentionInfo[index].value"
-                                :disabled="!customerInfo4.intentionInfo[index].other">
-                      </Checkbox>
-                      <Poptip transfer width="500" placement="left">
-                        <a>{{ item.specsName }}</a>
-                        <div slot="content">
-                          <RadioGroup v-model="otherIntentionInfo" @on-change="radioChange('4')">
-                            <Col span="6" v-for="(item2, index2) of item.children" :key="index2">
-                              <radio :label="item2.specsId">{{ item2.specsName }}</radio>
-                            </Col>
-                          </RadioGroup>
-                        </div>
-                      </Poptip>
-                    </Col>
-                    <Col span="12">
-                      <InputNumberPop v-model="customerInfo4.intentionInfo[index].count" style="width: 100px"/>
-                    </Col>
-                  </div>
-                </Col>
-              </DkRow>
-            </DkFormItem>
             <!--留店时长-->
-            <DkFormItem prop="stayTimeLen" :errorMessage="getErrMessage('stayTimeLen')">
+            <DkFormItem prop="stayTimeLen">
               <SelectPop v-model="customerInfo4.stayTimeLen" :options="stayTimeLenList" :multiple="false"
                          :clearable="false"
-                         label-key="dataName" value-key="dataCode" transfer/>
+                         label-key="kindName" value-key="kindCode" transfer/>
             </DkFormItem>
             <!--下次邀约时间(提醒时间)-->
-            <DkFormItem prop="nextFollowTime" :errorMessage="getErrMessage('nextFollowTime')">
+            <DkFormItem prop="nextFollowTime">
               <DatePickerPop type="datetime" v-model="customerInfo4.nextFollowTime" transfer
                              format="yyyy-MM-dd HH:mm:ss"/>
             </DkFormItem>
             <!--跟进内容-->
-            <DkFormItem prop="followData" :errorMessage="getErrMessage('followData')" required>
+            <DkFormItem prop="followData" :required="true">
               <InputPop textarea-flag v-model="customerInfo4.followData" maxlength="100"/>
             </DkFormItem>
-            <!--下次跟进计划-->
-            <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-              <InputPop textarea-flag v-model="customerInfo4.nextFollowPlan" maxlength="100"/>
+          </DkForm>
+        </DkPanel>
+      </DkCollapse>
+      <DkCollapse ref="collapse" v-if="receptionType=='2'">
+        <DkPanel prop="receptionNew">
+          <DkForm slot="content" ref="formReceptionNew" style="width:100%;">
+            <!-- 客户意向-->
+            <DkFormItem prop="intention" :required="true">
+              <SelectPop v-model="customerInfo4.intention" :options="intentionList"
+                         :multiple="false" :clearable="false"
+                         label-key="kindName" value-key="kindCode" transfer
+                         @on-change="(val)=>cleanCompetitiveBrands(val, 'customerInfo4')"/>
+            </DkFormItem>
+            <!--留店时长-->
+            <DkFormItem prop="stayTimeLen">
+              <SelectPop v-model="customerInfo4.stayTimeLen" :options="stayTimeLenList" :multiple="false"
+                         :clearable="false"
+                         label-key="kindName" value-key="kindCode" transfer/>
+            </DkFormItem>
+            <!--跟进内容-->
+            <DkFormItem prop="followData" :required="true">
+              <InputPop v-model="customerInfo4.followData" maxlength="100"/>
             </DkFormItem>
           </DkForm>
         </DkPanel>
@@ -190,7 +168,7 @@
         <p slot="title">
           {{ $t('appendix') }}
         </p>
-        <DkPicWall v-model="customerInfo4.annexPaths.annexPaths" folder="t_csm_follow/annex_paths"></DkPicWall>
+        <DkPicWall v-model="customerInfo4.annexPaths" folder="t_csm_follow/annex_paths"></DkPicWall>
       </Card>
 
 
@@ -204,62 +182,63 @@
         <DkPanel prop="customerInfo">
           <DkForm slot="content" ref="formMeasure" style="width:100%;" name="dk-form" v-model="customerInfo5">
             <!--客户名称-->
-            <DkFormItem prop="customerId" :errorMessage="getErrMessage('customerId')">
-              <span>{{ customerInfo.customerName }}</span>
+            <DkFormItem prop="cusName">
+              <InputPop v-model="customerInfo.cusName" :readonly="true"/>
             </DkFormItem>
             <!--客户电话-->
-            <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')">
-              <span>{{ customerInfo.customerPhone }}</span>
+            <DkFormItem prop="cusPhone">
+              <InputPop v-model="customerInfo.cusPhone" :readonly="true"/>
             </DkFormItem>
             <!--详细地址-->
-            <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
-              <span>{{ customerInfo.addressFull }}</span>
+            <DkFormItem :label="$t('addressFull')" prop="addressFull">
+              <InputPop v-model="customerInfo.addressFull" :readonly="true"/>
             </DkFormItem>
             <!--门牌号-->
-            <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
-              <span>{{ customerInfo.addressNo }}</span>
+            <DkFormItem :label="$t('addressNo')" prop="addressNo">
+              <InputPop v-model="customerInfo.addressNo" :readonly="true"/>
             </DkFormItem>
             <!--导购员-->
-            <DkFormItem :label="$t('shoppingGuide')" required>
-              {{ $store.state.user.userName }}
+            <DkFormItem :label="$t('staffName')">
+              <InputPop v-model="customerInfo.staffName" :readonly="true"/>
             </DkFormItem>
             <!--是否复尺-->
-            <DkFormItem prop="flgAgainMeasure" :errorMessage="getErrMessage('flgAgainMeasure')" required>
+            <DkFormItem prop="flgAgainMeasure" :required="true">
               <RadioGroup v-model="customerInfo5.flgAgainMeasure">
                 <Radio label="true">{{ $t('yes') }}</Radio>
                 <Radio label="false">{{ $t('no') }}</Radio>
               </RadioGroup>
             </DkFormItem>
             <!--量尺备注-->
-            <DkFormItem prop="measureRemarks" :errorMessage="getErrMessage('measureRemarks')">
+            <DkFormItem prop="measureRemarks">
               <InputPop textarea-flag v-model="customerInfo5.measureRemarks" maxlength="100"/>
             </DkFormItem>
             <!--量尺时间-->
-            <DkFormItem prop="measureTime" :errorMessage="getErrMessage('measureTime')" required>
+            <DkFormItem prop="measureTime" :required="true">
               <DatePickerPop type="datetime" v-model="customerInfo5.measureTime" transfer/>
             </DkFormItem>
           </DkForm>
         </DkPanel>
         <DkPanel prop="appendix">
           <!--  下拉区域  -->
-          <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%" :labelMaxWords="7">
-            <div v-for="(item,index) of customerInfo5.measureAnnex" :key="index">
-              <DkFormItem :label="$t('usedLocation2')" prop="usedLocation"
-                          :errorMessage="getErrMessage('usedLocation')"
-                          required>
+          <DkForm slot="content" ref="formInline" v-model="customerInfo5" style="width: 100%" :labelMaxWords="7"
+                  :col-count="1">
+            <div v-for="(item,index) of customerInfo5.measureAnnex" :key="index" style="width: 100%;margin:25px 35px">
+              <DkFormItem :label="$t('usedLocation2')" prop="usedLocation"  :required="true">
                 <InputPop v-model="item.usedLocation" maxlength="100"/>
               </DkFormItem>
-              <DkPicWall v-model="item.annexPaths" folder="t_csm_follow/measure_annex"></DkPicWall>
-              <Button @click="removeNewMeasureAnnex(index)" icon="md-close" long type="error"></Button>
+              <div style="display: flex;justify-content: space-between;align-items: center">
+                <DkPicWall v-model="item.annexPaths"></DkPicWall>
+                <Button @click="removeNewMeasureAnnex(index)" icon="md-close" long type="error" style="width: 30px"></Button>
+              </div>
             </div>
-            <Button @click="addNewMeasureAnnex" icon="md-add" long style="margin-top: 10px"></Button>
+            <Button @click="addNewMeasureAnnex" icon="md-add" long style="margin-top: 10px;margin-left: 20px"></Button>
           </DkForm>
         </DkPanel>
       </DkCollapse>
     </DkModal>
 
     <!--    跟进任务-->
-    <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.customerNames"
+    <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.cusNames"
                 :customer-ids="customerInfo6.customerIds" @ok="initData(1)"/>
 
     <!--    跟进-->
@@ -294,19 +273,14 @@
 
 <script>
 import {indexMixin} from '@/mixins'
-import FollowTask from './follow-task'
-import Follow from './follow'
 
 export default {
-  name: 'customer-follow',
+  name: 'cus-follow',
   mixins: [indexMixin],
-  components: {
-    FollowTask,
-    Follow
-  },
   data() {
     let self = this
     return {
+      addressArea: [],
       cityData: [],
       //当前展示行附件
       currentRow: {},
@@ -315,35 +289,36 @@ export default {
       customerReadOnly: false,
       // 客户信息 接待
       customerInfo4: {
-        customerId: null,
-        customerName: '',
-        customerPhone: null,
-        addressFull: null,
-        addressNo: null,
+        cusId: null,
+        cusName: '',
+        cusPhone: null,
         followData: null,
-        nextFollowPlan: null,
         followType: null,
         stayTimeLen: 1,
         nextFollowTime: null,
         intention: null,
         competitiveBrands: null,
         intentionInfo: [],
-        annexPaths: {
-          annexPaths: []
-        },
+        addressArea: null,              // 行政区划
+        addressGcj02: null,             // 经纬度
+        addressName: null,              // 小区
+        addressNo: null,                // 门牌号
+        addressFull: null,              // 详细地址
+        annexPaths: null,
       },
       // 客户信息 量尺回执
       customerInfo5: {
+        cusId:null,
         followId: null,
         flgAgainMeasure: 'false',
         measureRemarks: null,
-        measureTime: new Date(),
+        measureTime: new Date().format(),
         measureAnnex: [{usedLocation: null, annexPaths: []}],
       },
       // 客户信息 跟进任务
       customerInfo6: {
         customerIds: [],
-        customerNames: [],
+        cusNames: [],
         followUsers: []
       },
       // 错误信息
@@ -371,56 +346,21 @@ export default {
       receptionModal: false,
       // 接待类型 1 留资 2 陌生
       receptionType: '2',
-      regionData: [],
-      // 接待校验
-      rule4: {
-        customerName: [
-          {required: true, trigger: 'none'},
-        ],
-        customerPhone: [
-          {required: true, trigger: 'none'},
-          {
-            required: true,
-            trigger: 'none',
-            max: 11,
-            min: 11,
-            message: self.$t('W_071', {'param': self.$t('customerPhone')})
-          },
-        ],
-        followData: [
-          {required: true, trigger: 'none'},
-        ],
-        intention: [
-          {required: true, trigger: 'none'},
-        ],
-      },
-      // 回执校验
-      rule5: {
-        flgAgainMeasure: [
-          {required: true, trigger: 'none'},
-        ],
-        measureTime: [
-          {required: true, trigger: 'none', type: 'date'},
-        ],
-      },
-      // 客成状态list
-      saleStatusList: [],
       // 留店时长list
       stayTimeLenList: [],
       // 查询条件
       searchCond: {},
-      //TODO 以后会是动态的所以先做个查询的例子
       searchContent: [
         {
-          valueFormat: {code: 'customerCode'},
+          valueFormat: {code: 'cusCode'},
           valueKind: 'STR'
         },
         {
-          valueFormat: {code: 'customerName'},
+          valueFormat: {code: 'cusName'},
           valueKind: 'STR'
         },
         {
-          valueFormat: {code: 'customerPhone'},
+          valueFormat: {code: 'cusPhone'},
           valueKind: 'STR'
         },
         {
@@ -484,6 +424,8 @@ export default {
       tabsOptions: [
         {label: self.$t('allReceipt'), name: self.$t('allReceipt')},
         {label: self.$t('followTask2'), name: self.$t('followTask2')},
+        {label: self.$t('followToStore'), name: self.$t('followToStore')},
+        {label: self.$t('followReserve'), name: self.$t('followReserve')}
       ],
       pageInfo: {
         total: 0,
@@ -499,8 +441,8 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     openCustomerMessage(row) {
-      if (row['customerId']) {
-        this.$router.push('/sale/customer/detail/' + row['customerId'])
+      if (row['cusId']) {
+        this.$router.push('/sale/customer/detail/' + row['cusId'])
       }
     },
     /**
@@ -518,6 +460,18 @@ export default {
      */
     cancelReception() {
       this.receptionModal = false
+      this.customerInfo4.cusId = null
+      this.customerInfo4.cusName = null
+      this.customerInfo4.cusPhone = null
+      this.customerInfo4.addressFull = null
+      this.customerInfo4.addressNo = null
+      this.customerInfo4.addressName = null
+      this.customerInfo4.addressArea = null
+      this.customerInfo4.addressGcj02 = null
+      this.customerInfo4.followData = null
+      this.customerInfo4.intention = null
+      this.customerInfo4.nextFollowTime = null
+      this.customerInfo4.stayTimeLen = null
     },
     /**
      * @desc   : checkBox修改意向品类
@@ -547,7 +501,32 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     changeTel() {
-
+      this.$nextTick(() => {
+        if (this.customerInfo4.cusPhone == null || this.customerInfo4.cusPhone == '') {
+          return
+        }
+        let params = {
+          cusPhone: this.customerInfo4.cusPhone
+        }
+        this.excute(this.$service.customerService, this.$service.customerService.selectByCondNoPage, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            if (res.data) {
+              this.customerInfo4.cusId = res.data[0].cusId
+              this.customerInfo4.cusName = res.data[0].cusName
+              this.customerInfo4.cusPhone = res.data[0].cusPhone
+              this.customerInfo4.addressFull = res.data[0].addressFull
+              this.customerInfo4.addressNo = res.data[0].addressNo
+              this.customerInfo4.addressName = res.data[0].addressName
+              this.customerInfo4.addressArea = res.data[0].addressArea
+              this.customerInfo4.addressGcj02 = res.data[0].addressGcj02
+            } else {
+              this.customerInfo4.cusId = null
+            }
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      })
     },
     /**
      * @desc   : 选择地址
@@ -555,6 +534,20 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     chooseAddress(value) {
+      this.customerInfo4.customerDistrict = value;
+      // 说明是清空
+      if (!value) {
+        this.customerInfo4.addressName = null;
+        this.customerInfo4.addressArea = {};
+        this.customerInfo4.addressFull = null;
+        this.customerInfo4.addressGcj02 = {};
+      } else {
+        //按照title进行
+        this.customerInfo4.addressName = value.addressName;
+        this.customerInfo4.addressArea = value.addressArea;
+        this.customerInfo4.addressGcj02 = value.addressGcj02;
+        this.customerInfo4.addressFull = value.addressFull + (this.customerInfo4.addressNo ? this.customerInfo4.addressNo : '');
+      }
     },
     /**
      * @desc   : 清除竞争品牌
@@ -569,31 +562,14 @@ export default {
      * @author : 付斌
      * @date   : 2024-02-01 14:24
      */
-    clickTab(val) {
-      if (val == this.$t('followTask2')) {
-        // 仅在跟进任务添加此查询条件
-        this.searchContent.push(
-          {
-            valueFormat: {
-              code: 'finishStatus',
-              data: [
-                {id: 1, name: '完结'},
-                {id: 2, name: '逾期'},
-                {id: 3, name: '未逾期'},
-              ],
-              valueKey: 'id',
-              labelKey: 'name',
-              default: [3]
-            },
-            valueKind: 'M-CHOICE'
-          },
-        )
-        this.$refs.searchCond.setForm()
-      } else {
-        this.searchContent.splice(this.searchContent.length - 1, 1)
-      }
-      this.tabsModel = val
-      this.initData(1)
+    clickTab() {
+      this.$nextTick(() => {
+        //查询条件
+        this.loading = true
+        this.tableData = []
+        this.pageInfo.currentPage = 1
+        this.searchData()
+      })
     },
     /**
      * @desc   : 跟进任务完成
@@ -628,14 +604,6 @@ export default {
 
     },
     /**
-     * @desc   : 查询事件
-     * @author : 付斌
-     * @date   : 2024-02-01 14:24
-     */
-    initData(currentPage) {
-
-    },
-    /**
      * @desc   : 打开跟进弹窗
      * @author : 付斌
      * @date   : 2024-02-01 14:24
@@ -652,13 +620,37 @@ export default {
     followTask() {
       this.followTaskModal = true
     },
+
+    /**
+     * @desc   : 查询参数设定
+     * @author : 常皓宁
+     * @date   : 2024/4/7 11:22
+     */
+    setSearchParams(params) {
+      params.flgValid = true
+      if (this.tabsModel === this.$t('allReceipt')) {
+        params.followStatus = ''
+      } else if (this.tabsModel === this.$t('followTask2')) {
+        params.followStatus = '跟进状态-跟进'
+      } else if (this.tabsModel === this.$t('followToStore')) {
+        params.followStatus = '跟进状态-邀约'
+      } else if (this.tabsModel === this.$t('followReserve')) {
+        params.followStatus = '跟进状态-约尺'
+      }
+      return params
+    },
     /**
      * @desc   : 查询数据
      * @author : 付斌
      * @date   : 2024-02-01 14:24
      */
-    getData() {
-
+    getData(params) {
+      // 查询数据
+      this.excute(this.$service.cusFollowService, this.$service.cusFollowService.selectByCond, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.tableData = res.data.list
+        }
+      })
     },
     /**
      * @desc   : 校验
@@ -674,8 +666,36 @@ export default {
      * @date   : 2024-02-01 14:25
      */
     measuringStickReceipt() {
-      this.measureModal = true
+      if (this.$refs['table-select'].batchKeys.length == 1 &&
+        this.$refs['table-select'].batchRows[0].followStatus == '跟进状态-约尺') {
+        if (!this.$refs['table-select'].batchRows[0].cusId) {
+          this.$Message.error(this.$t('W_068'))
+          return
+        }
+        this.measureModal = true
+        this.customerInfo5.followId = this.$refs['table-select'].batchRows[0].followId
+        this.customerInfo5.cusId = this.$refs['table-select'].batchRows[0].cusId
+        this.getCustomerInfo()
+      } else {
+        this.$Message.error(this.$t('W_040'))
+      }
     },
+
+    /**
+     * @desc   : 查询客户信息
+     * @author : 常皓宁
+     * @date   : 2024/4/8 13:00
+     */
+    getCustomerInfo() {
+      this.excuteNoParam(this.$service.customerService, this.$service.customerService.selectById, [this.$refs['table-select'].batchRows[0].cusId], false).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.customerInfo = res.data
+        } else {
+          this.$Message.error(res.message)
+        }
+      })
+    },
+
     /**
      * @desc   : 量尺回执客户选中
      * @author : 付斌
@@ -721,7 +741,10 @@ export default {
      * @date   : 2024-02-01 14:26
      */
     setAddressFull(e) {
-
+      // 客户区域有值才会拼接详细地址
+      if (!this.setCustomerFlag && this.customerInfo4.customerDistrict && this.customerInfo4.customerDistrict.addressFull) {
+        this.customerInfo4.addressFull = this.customerInfo4.customerDistrict.addressFull + (this.customerInfo4.addressNo ? this.customerInfo4.addressNo : '')
+      }
     },
     /**
      * @desc   : 展示附件
@@ -737,6 +760,52 @@ export default {
      * @date   : 2024-02-01 14:26
      */
     submitReception() {
+      this.$refs['formReception'].validate().then(valid => {
+        // 校验
+        if (!valid) {
+          return
+        }
+        let param
+        // 1 留资 建客户是报备,旧客户是接待 2 陌生
+        if (this.receptionType == 1) {
+          param = Object.assign({
+            followStatus: (this.customerInfo4.cusId ? '跟进状态-接待' : '跟进状态-报备')
+          }, this.customerInfo4)
+        } else {
+          param = Object.assign({
+            followStatus: '跟进状态-报备'
+          }, {
+            stayTimeLen: this.customerInfo4.stayTimeLen,
+            followData: this.customerInfo4.followData,
+            annexPaths: this.customerInfo4.annexPaths,
+            followType: this.customerInfo4.followType,
+          })
+        }
+
+        // 下次邀约时间
+        if (param.nextFollowTime) {
+          param.nextFollowTime = param.nextFollowTime.format()
+        }
+
+        //附件
+        if (param.annexPaths && param.annexPaths.annexPaths) {
+          param.annexPaths.annexPaths = param.annexPaths.annexPaths.map(m => m.path)
+        }
+        param.followOrg = this.$store.state.user.orgId
+        this.loading = true
+        // 保存
+        this.excute(this.$service.cusFollowService, this.$service.cusFollowService.insert, param).then(res => {
+          this.loading = false
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.$Message.success(res.message)
+            //关闭接待弹窗
+            this.cancelReception()
+            this.initData(1)
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      })
 
     },
     /**
@@ -745,7 +814,35 @@ export default {
      * @date   : 2024-02-01 14:26
      */
     submitMeasure() {
+      this.$refs['formMeasure'].validate().then(valid => {
+        // 校验
+        if (!valid) {
+          return
+        }
+        let param = Object.assign({}, this.customerInfo5)
+
+        //量尺附件
+        if (param.measureAnnex) {
+          for (let it of param.measureAnnex) {
+            if (it.annexPaths) {
+              it.annexPaths = it.annexPaths.map(m => m.path)
+            }
+          }
+        }
+        this.loading = true
+        //保存
+        this.excute(this.$service.cusFollowService,this.$service.cusFollowService.updateMeasure,param).then(res => {
+          this.loading = false
+          if (res.code === 200) {
+            this.$Message.success(res.message)
+            //关闭接待弹窗
+            this.cancelMeasure()
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
 
+      })
     },
     /**
      * @desc   : 上传文件
@@ -755,10 +852,50 @@ export default {
     uploadFile(response, file, fileList) {
 
     },
+    /**
+     * @desc   : 获取客户意向
+     * @author : 常皓宁
+     * @date   : 2024/4/7 13:30
+     */
+    getIntention() {
+      let params = {
+        dataSourceCode: 'customerIntention'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.intentionList = res.data
+        }
+      })
+    },
+    /**
+     * @desc   : 获取留店时长
+     * @author : 常皓宁
+     * @date   : 2024/4/7 13:31
+     */
+    getStayTimeLen() {
+      let params = {
+        dataSourceCode: 'storeRetentionTime'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.stayTimeLenList = res.data
+        }
+      })
+    },
+
+    /**
+     * @desc   : 查询事件
+     * @author : 付斌
+     * @date   : 2024-02-01 14:24
+     */
+    initData() {
+      this.getStayTimeLen()
+      this.getIntention()
+    },
   },
   created() {
-    this.primaryKey = 'customerFollowId'  // 设置主键Id
-    this.routeObjName = 'customerFollow'  // 设置路由名称
+    this.primaryKey = 'followId'  // 设置主键Id
+    this.routeObjName = 'cusFollow'  // 设置路由名称
   }
 }
 </script>

+ 10 - 2
src/view/mst/customer/index.vue

@@ -252,6 +252,9 @@ export default {
       tableData: [],
       tabsModel: null,
       tabsOptions: [
+        {label: self.$t('潜在客户'), name: self.$t('潜在客户'), index: 0},
+        {label: self.$t('公海客户'), name: self.$t('公海客户'), index: 1},
+        {label: self.$t('成交客户'), name: self.$t('成交客户'), index: 2},
         {label: self.$t('allCustomers'), name: self.$t('allCustomers'), index: 3},
       ],
       //业务部门list
@@ -368,8 +371,13 @@ export default {
      * @author : 付斌
      * @date   : 2024-02-01 14:22
      */
-    getData() {
-
+    getData(params) {
+      // 查询数据
+      this.excute(this.$service.customerService, this.$service.customerService.selectByCond, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.tableData = res.data.list
+        }
+      })
     },
   },
   created() {

+ 0 - 10
src/view/mst/staff/index.vue

@@ -61,7 +61,6 @@
       ref="modal_editAdd"
       @on-visible-change="handleVisibleModal"
       @modalOk="save"
-      @modalCancel="clear"
       :saveFlag="true"
       :title="modalTitle"
     >
@@ -434,15 +433,6 @@ export default {
     },
 
     /**
-    * @desc   : 关闭弹窗
-    * @author : 常皓宁
-    * @date   : 2024/3/13 9:05
-    */
-    clear() {
-      this.formData = []
-    },
-
-    /**
      * @desc   : 提交事件
      * @author : 常皓宁
      * @date   : 2024/3/5 14:19

+ 13 - 0
src/view/pur/pur-enter/form.vue

@@ -651,6 +651,7 @@ export default {
         whName: null,
         remarks: null,
         annexPaths: null,
+        flgAutoHandle: false,//自动入库标识
       },
         this.purchaseItemList = []
     },
@@ -711,6 +712,18 @@ export default {
       // 公司
       this.params.cpId = this.$store.state.user.cpId
 
+      //附件
+      if (this.formData.annexPaths.length > 0) {
+        this.params.annexPaths = this.formData.annexPaths.map(m => {
+          return {
+            name: m.name,
+            url: m.path,
+            type: m.type,
+            createTime: m.createTime
+          }
+        })
+      }
+
       // 新建
       if (this.type === this.$config.formMode.add) {
         let tableFilter = this.$refs['detailTable'].getTableDataFilter();

+ 12 - 8
src/view/pur/pur-enter/index.vue

@@ -304,7 +304,7 @@ export default {
         this.loading = true
         this.tableData = []
         this.pageInfo.currentPage = 1
-        this.getData()
+        this.searchData()
       })
 
     },
@@ -322,15 +322,10 @@ export default {
      * @author : 常皓宁
      * @date   : 2023/8/26 16:25
      */
-    setSearchParams() {
-      let params = this.searchList
-      params.currentPage = this.pageInfo.currentPage
-      params.pageSize = this.pageInfo.pageSize
+    setSearchParams(params) {
+      console.log('123123')
       params.flgValid = true
       params.intoType = this.$config.intoTypeBySql.purchase
-      if (this.$store.state.user.cpId) {
-        params.cpId = this.$store.state.user.cpId  //所属公司
-      }
       if (this.tableModel === 'waitEntry') {
         params.intoStatusList = [this.$config.intoStatus.ruKuZhong]
       } else if (this.tableModel === 'ingEntry') {
@@ -364,6 +359,15 @@ export default {
       if (row != null) {
         this.intoId = row.intoId
         this.getDetail(1)
+        if (row.annexPaths) {
+          row.annexPaths = row.annexPaths.map(m => {
+            return {
+              path: m.url,
+              name: m.name,
+              type: 'img'
+            }
+          })
+        }
         //订单附件
         this.tableDataDetail_files = row.annexPaths
       }

+ 2 - 9
src/view/pur/pur-return/index.vue

@@ -306,7 +306,7 @@ export default {
         this.tableData = []
         this.pageInfo.currentPage = 1
         // 查询数据
-        this.getData()
+        this.searchData()
       })
 
     },
@@ -378,20 +378,13 @@ export default {
      * @author : 常皓宁
      * @date   : 2023/8/26 16:25
      */
-    setSearchParams() {
-      let params = this.searchList
-      params.currentPage = this.pageInfo.currentPage
-      params.pageSize = this.pageInfo.pageSize
+    setSearchParams(params) {
       params.flgValid = true
       params.intoType = this.$config.intoTypeBySql.purchaseReturn
       if (this.isShowCancel) {
         params.isShowCancel = 1
       } else {
         params.isShowCancel = null
-
-      }
-      if (this.$store.state.user.cpId) {
-        params.cpId = this.$store.state.user.cpId  //所属公司
       }
       if (this.tableModel === 'waitOut') {
         params.intoStatusList = [this.$config.intoStatus.ruKuZhong]