Jelajahi Sumber

客户 角色修改

changhaoning 2 tahun lalu
induk
melakukan
b057624032

+ 37 - 0
src/config/index.js

@@ -1022,6 +1022,43 @@ export default {
     {value: 'right', name: '居右'}
   ],
 
+  /**
+   * @desc   : 系统字典dataCode
+   * @author : 洪旭东
+   * @date   : 2022-05-25 19:11
+   */
+  basicDataCode: {
+    // 跟进状态
+    followStatus1: '跟进状态-跟进',
+    followStatus2: '跟进状态-邀约',
+    followStatus3: '跟进状态-约尺',
+    followStatus4: '跟进状态-接待',
+    followStatus5: '跟进状态-报备',
+    followStatus6: '跟进状态-量尺',
+    // 跟进状态-报备
+    // 跟进状态-报价
+    // 跟进状态-成交
+
+    // 跟进类型
+    followType1: '跟进方式-进店',
+    followType2: '跟进方式-上门',
+
+    // 审核状态
+    reviewStatus1: '审-待审',
+
+
+    // 邀约结果
+    inviteResult1: '邀约结果-接受',
+    inviteResult2: '邀约结果-拒绝',
+
+    //客意品类
+    customerIntention1: '客意品类-智能',
+    customerIntention2: '客意品类-定制',
+
+    salesStatus1: '客成状态-潜客',
+    salesStatus2: '客成状态-成交',
+  },
+
 }
 
 

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

@@ -667,6 +667,7 @@ export const messages = {
   W_117: '出库中数据不允许进行出库撤回',
   W_118: '作废单据不允许进行此操作',
   W_119: '出库数量不能大于库存量',
+  W_120: '预制类角色不允许进行编辑或停用操作',
   E_001: '系统出现异常,请联系管理员。',
   Q_001: '当前页面的数据有过更改,请确认需要保存吗?',
   Q_002: '确定要进行{param}操作吗?',

+ 142 - 176
src/view/mst/cus-follow/follow.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!--    跟进-->
-    <DkModal v-model="visible" :title="$t('follow2')" width="1000px" ref="modal_follow"
+    <DkModal v-model="visible" :title="$t('follow2')" width="1400px" ref="modal_follow"
              :loading="loading"
              @on-cancel="cancelFollow"
              @modalOk="submitFollow"
@@ -13,28 +13,27 @@
           <DkPanel prop="customerInfo">
             <DkForm slot="content" style="width:100%;" v-model="customerInfo" name="dk-form" ref="customerInfo">
               <!--客户名称-->
-              <DkFormItem prop="customerName" :errorMessage="getErrMessage('customerName')" required>
-                <InputPop v-model="customerInfo.customerName"/>
+              <DkFormItem prop="cusName" :required="true">
+                <InputPop v-model="customerInfo.cusName"/>
               </DkFormItem>
               <!--客户电话-->
-              <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')"
+              <DkFormItem prop="cusPhone"
                           :required="!customerInfo.qvExternalUserid">
-                <InputPop :telephone="true" v-model="customerInfo.customerPhone"/>
+                <InputPop :telephone="true" v-model="customerInfo.cusPhone"/>
               </DkFormItem>
               <!--行政区划-->
-              <!--                <DkFormItem prop="customerDistrict" :errorMessage="getErrMessage('customerDistrict')" >-->
-              <!--                  &lt;!&ndash; 高德 &ndash;&gt;-->
-              <!--                  <RegionsChooseAmap v-model="regionData" :options="cityData"-->
-              <!--                                 :default-value="customerInfo.addressName" ref="customerDistrict"-->
-              <!--                                 @on-choose="chooseAddress"></RegionsChooseAmap>-->
-              <!--                </DkFormItem>-->
+              <DkFormItem prop="addressName" required>
+                <RegionsChoose v-model="regionData" :options="cityData" :default-value="customerInfo.addressName"
+                               ref="customerDistrict"
+                               @on-choose="chooseAddress"></RegionsChoose>
+              </DkFormItem>
               <!--门牌号-->
-              <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
+              <DkFormItem :label="$t('addressNo')" prop="addressNo">
                 <InputPop v-model="customerInfo.addressNo" @input="setAddressFull"/>
               </DkFormItem>
               <!--详细地址-->
-              <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
-                <InputPop v-model="customerInfo.addressFull" readonly/>
+              <DkFormItem prop="addressFull" :required="true">
+                <InputPop ref="addressCustomerFull" :readonly="true" v-model="customerInfo.addressFull" maxlength="50"/>
               </DkFormItem>
             </DkForm>
           </DkPanel>
@@ -43,179 +42,119 @@
             <p slot="title">
               {{ $t('followInfo') }}
             </p>
-            <DkTabs v-model="followTab" :options="[
-            { label: $t('followDaily'), name: '1' },
-            { label: $t('followToStore'), name: '2' },
-            { label: $t('followReserve'), name: '3' }
-          ]">
+            <DkTabs v-model="followTab" :options="tabsOptions">
               <template slot="1">
-                <DkForm ref="formFollow1" style="width:100%;" name="dk-form" v-model="customerInfo1" :rules="rule1"
+                <DkForm ref="formFollow1" style="width:100%;margin-top: 10px;" name="dk-form" v-model="customerInfo1" :rules="rule1"
                         @onValidate="onValidate" :label-max-words="6">
-                  <!--                客户意向-->
-                  <DkFormItem prop="intention" :errorMessage="getErrMessage('intention')" required>
+                  <!--客户意向-->
+                  <DkFormItem prop="intention" :required="true">
                     <SelectPop v-model="customerInfo1.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, '1')"/>
                   </DkFormItem>
-                  <!--                竞品品牌-->
-                  <DkFormItem prop="competitiveBrands" :errorMessage="getErrMessage('competitiveBrands')">
-                    <InputPop v-model="customerInfo1.competitiveBrands" maxlength="100"/>
+                  <!--下次邀约时间(提醒时间)-->
+                  <DkFormItem prop="nextFollowTime" :required="true" :data-type="$config.dataType.date">
+                    <DatePickerPop v-model="customerInfo1.nextFollowTime"
+                                   :placeholder="$t('inputWords',{'search-name':$t('DeliveryDate')})"
+                                   type="datetime" :short-cut-flag="true"/>
                   </DkFormItem>
-                  <!--流失原因-->
-                  <DkFormItem prop="loseReasonIds" :errorMessage="getErrMessage('loseReasonIds')" required>
-                    <SelectPop v-model="customerInfo1.loseReasonIds" :options="loseReasonList" multiple
+                  <!--留店时长-->
+                  <DkFormItem prop="stayTimeLen" :required="true">
+                    <SelectPop v-model="customerInfo1.stayTimeLen" :options="stayTimeLen" :multiple="false"
                                :clearable="false"
-                               label-key="dataValue" value-key="dataId" transfer @on-change="changeInviteResult"/>
+                               label-key="kindName" value-key="kindCode" transfer/>
                   </DkFormItem>
-                  <!--                意向品类-->
-                  <!--                    <DkFormItem prop="intentionInfo" :errorMessage="getErrMessage('intentionInfo')">-->
-                  <!--                          <div>-->
-                  <!--                              <Checkbox v-model="customerInfo1.intentionInfo[index].value" @on-change="selectIntentionInfo(customerInfo1.intentionInfo[index])"-->
-                  <!--                              >{{ item.specsName }}</Checkbox>-->
-                  <!--                              <InputNumberPop v-model="customerInfo1.intentionInfo[index].count" style="width: 100px"/>-->
-                  <!--                          </div>-->
-                  <!--                          <div>-->
-                  <!--                              <Checkbox v-model="customerInfo1.intentionInfo[index].value" :disabled="!customerInfo1.intentionInfo[index].other">-->
-                  <!--                              </Checkbox>-->
-                  <!--                              <Poptip transfer width="500" placement="left">-->
-                  <!--                                <a>{{item.specsName}}</a>-->
-                  <!--                                <div slot="content">-->
-                  <!--                                  <RadioGroup v-model="otherIntentionInfo" @on-change="radioChange('1')">-->
-                  <!--                                      <radio :label="item2.specsId">{{item2.specsName}}</radio>-->
-                  <!--                                  </RadioGroup>-->
-                  <!--                                </div>-->
-                  <!--                              </Poptip>-->
-                  <!--                              <InputNumberPop v-model="customerInfo1.intentionInfo[index].count" style="width: 100px"/>-->
-                  <!--                          </div>-->
-                  <!--                    </DkFormItem>-->
                   <!--跟进内容-->
-                  <DkFormItem prop="followData" :errorMessage="getErrMessage('followData')" required>
+                  <DkFormItem prop="followData" :required="true">
                     <InputPop textarea-flag v-model="customerInfo1.followData" maxlength="100"/>
                   </DkFormItem>
-                  <!--下次跟进计划-->
-                  <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-                    <InputPop textarea-flag v-model="customerInfo1.nextFollowPlan" maxlength="100"/>
-                  </DkFormItem>
-                  <!--跟进方式-->
-                  <DkFormItem prop="followType" :errorMessage="getErrMessage('followType')" required>
-                    <SelectPop v-model="customerInfo1.followType" :options="followTypeList" :multiple="false"
-                               :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer/>
-                  </DkFormItem>
-                  <!--下次邀约时间(提醒时间)-->
-                  <DkFormItem prop="nextFollowTime" :errorMessage="getErrMessage('nextFollowTime')">
-                    <DatePickerPop type="datetime" v-model="customerInfo1.nextFollowTime" transfer
-                                   format="yyyy-MM-dd HH:mm:ss"/>
-                  </DkFormItem>
                 </DkForm>
                 <Card class="follow-card">
                   <p slot="title">
                     {{ $t('appendix') }}
                   </p>
-                  <DkPicWall v-model="customerInfo1.annexPaths.annexPaths"
+                  <DkPicWall v-model="customerInfo1.annexPaths"
                              folder="t_csm_follow/annex_paths"></DkPicWall>
                 </Card>
               </template>
               <template slot="2">
-                <DkForm ref="formFollow2" style="width:100%;" name="dk-form" v-model="customerInfo2" :rules="rule2"
+                <DkForm ref="formFollow2" style="width:100%; margin-top: 10px;" name="dk-form" v-model="customerInfo2" :rules="rule2"
                         @onValidate="onValidate" :label-max-words="6">
-                  <!--                客户意向-->
-                  <DkFormItem prop="intention" :errorMessage="getErrMessage('intention')" required>
+                  <!-- 客户意向-->
+                  <DkFormItem prop="intention" :required="true">
                     <SelectPop v-model="customerInfo2.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, '2')"/>
                   </DkFormItem>
-                  <!--                竞品品牌-->
-                  <DkFormItem prop="competitiveBrands" :errorMessage="getErrMessage('competitiveBrands')">
-                    <InputPop v-model="customerInfo2.competitiveBrands" maxlength="100"/>
-                  </DkFormItem>
-                  <!--流失原因-->
-                  <DkFormItem prop="loseReasonIds" :errorMessage="getErrMessage('loseReasonIds')" required>
-                    <SelectPop v-model="customerInfo2.loseReasonIds" :options="loseReasonList" multiple
-                               :clearable="false"
-                               label-key="dataValue" value-key="dataId" transfer @on-change="changeInviteResult"/>
-                  </DkFormItem>
                   <!--邀约结果-->
-                  <DkFormItem prop="inviteResult" :errorMessage="getErrMessage('inviteResult')" required>
+                  <DkFormItem prop="inviteResult" :required="true">
                     <SelectPop v-model="customerInfo2.inviteResult" :options="inviteResultList" :multiple="false"
                                :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer @on-change="changeInviteResult"/>
+                               label-key="kindName" value-key="kindCode" transfer @on-change="changeInviteResult"/>
                   </DkFormItem>
                   <!--邀约时间-->
-                  <DkFormItem ref="formFollow2_inviteTime" :label="$t('inviteTime2')" prop="inviteTime"
-                              :errorMessage="getErrMessage('inviteTime')"
-                  >
+                  <DkFormItem :label="$t('inviteTime2')" prop="inviteTime"  :data-type="$config.dataType.date">
                     <DatePickerPop type="datetime" v-model="customerInfo2.inviteTime" transfer
-                                   format="yyyy-MM-dd HH:mm:ss"/>
-                  </DkFormItem>
-                  <!--跟进内容-->
-                  <DkFormItem ref="formFollow2_followData" prop="followData"
-                              :errorMessage="getErrMessage('followData')">
-                    <InputPop textarea-flag v-model="customerInfo2.followData" maxlength="100"/>
-                  </DkFormItem>
-                  <!--下次跟进计划-->
-                  <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-                    <InputPop textarea-flag v-model="customerInfo2.nextFollowPlan" maxlength="100"/>
+                                   :placeholder="$t('inputWords',{'search-name':$t('inviteTime')})"
+                                   :short-cut-flag="true"/>
                   </DkFormItem>
                   <!--下次邀约时间(提醒时间)-->
-                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime"
-                              :errorMessage="getErrMessage('nextFollowTime')">
+                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime">
                     <DatePickerPop type="datetime" v-model="customerInfo2.nextFollowTime" transfer
                                    format="yyyy-MM-dd HH:mm:ss"/>
                   </DkFormItem>
+                  <!--跟进内容-->
+                  <DkFormItem ref="formFollow2_followData" prop="followData">
+                    <InputPop textarea-flag v-model="customerInfo2.followData" maxlength="100"/>
+                  </DkFormItem>
                 </DkForm>
                 <Card class="follow-card">
                   <p slot="title">
                     {{ $t('appendix') }}
                   </p>
-                  <DkPicWall v-model="customerInfo2.annexPaths.annexPaths"
+                  <DkPicWall v-model="customerInfo2.annexPaths"
                              folder="t_csm_follow/annex_paths"></DkPicWall>
                 </Card>
               </template>
               <template slot="3">
-                <DkForm ref="formFollow3" style="width:100%;" name="dk-form" v-model="customerInfo3" :rules="rule3"
+                <DkForm ref="formFollow3" style="width:100%; margin-top: 10px;" name="dk-form" v-model="customerInfo3" :rules="rule3"
                         @onValidate="onValidate" :label-max-words="6">
                   <!--设计师-->
-                  <DkFormItem prop="designUser" :errorMessage="getErrMessage('designUser')">
-                    <SelectMagnifier v-model="customerInfo3.designUser" searchType="S"
-                                     :other-condition="{jobIds: [-101, -102]}"
-                                     :type="this.$config.MagnifierType.user"></SelectMagnifier>
+                  <DkFormItem prop="designUser" :required="true">
+                    <SelectMagnifier v-model="customerInfo3.designUser"
+                                     :multiple="false"
+                                     :type="this.$config.MagnifierType.staff"
+                                     :display-text="customerInfo3.staffName"/>
                   </DkFormItem>
                   <!--邀约结果-->
-                  <DkFormItem prop="inviteResult" :errorMessage="getErrMessage('inviteResult')" required>
+                  <DkFormItem prop="inviteResult" :required="true">
                     <SelectPop v-model="customerInfo3.inviteResult" :options="inviteResultList" :multiple="false"
                                :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer/>
+                               label-key="kindName" value-key="kindCode" transfer/>
                   </DkFormItem>
                   <!--邀约时间-->
-                  <DkFormItem :label="$t('inviteTime3')" prop="inviteTime"
-                              :errorMessage="getErrMessage('inviteTime')">
+                  <DkFormItem :label="$t('inviteTime3')" prop="inviteTime">
                     <DatePickerPop type="datetime" v-model="customerInfo3.inviteTime" transfer
                                    format="yyyy-MM-dd HH:mm:ss"
                                    :readonly="!customerInfo3.inviteResult || customerInfo3.inviteResult == $config.basicDataCode.inviteResult2"/>
                   </DkFormItem>
-                  <!--跟进内容-->
-                  <DkFormItem prop="followData" :errorMessage="getErrMessage('followData')">
-                    <InputPop textarea-flag v-model="customerInfo3.followData" maxlength="100"/>
-                  </DkFormItem>
-                  <!--下次跟进计划-->
-                  <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-                    <InputPop textarea-flag v-model="customerInfo3.nextFollowPlan" maxlength="100"/>
-                  </DkFormItem>
                   <!--下次邀约时间(提醒时间)-->
-                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime"
-                              :errorMessage="getErrMessage('nextFollowTime')">
+                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime">
                     <DatePickerPop type="datetime" v-model="customerInfo3.nextFollowTime" transfer
                                    format="yyyy-MM-dd HH:mm:ss"/>
                   </DkFormItem>
+                  <!--跟进内容-->
+                  <DkFormItem prop="followData">
+                    <InputPop textarea-flag v-model="customerInfo3.followData" maxlength="100"/>
+                  </DkFormItem>
                 </DkForm>
                 <Card class="follow-card">
                   <p slot="title">
                     {{ $t('appendix') }}
                   </p>
-                  <DkPicWall v-model="customerInfo3.annexPaths.annexPaths"
+                  <DkPicWall v-model="customerInfo3.annexPaths"
                              folder="t_csm_follow/annex_paths"></DkPicWall>
                 </Card>
               </template>
@@ -233,7 +172,7 @@ import {formMixin} from '@/mixins/form'
 export default {
   components: {},
   mixins: [formMixin],
-  name: 'customer-follow',
+  name: 'cus-follow',
   model: {
     prop: 'value',
     event: 'close'
@@ -277,79 +216,50 @@ export default {
     inviteResultList: {
       type: Array
     },
-    followTypeList: {
+    stayTimeLen: {
       type: Array
     }
   },
   data() {
     let self = this
     return {
+      tabsOptions: [
+        { label: self.$t('followDaily'), name: '1' },
+        { label: self.$t('followToStore'), name: '2' },
+        { label: self.$t('followReserve'), name: '3' }
+      ],
       cityData: [],
       customerInfo: self.customerData,
       // 客户信息 日常跟进
       customerInfo1: {
-        followData: null,
-        nextFollowPlan: null,
-        followType: null,
-        nextFollowTime: null,
-        intention: null,
-        competitiveBrands: null,
-        intentionInfo: [],
-        loseReasonIds: [],
-        annexPaths: {
-          annexPaths: []
-        },
+        intention: null,//客户意向
+        followData: null,//跟进内容
+        nextFollowTime: null,//提醒时间
+        stayTimeLen:null,//留店时长
+        annexPaths: null,
       },
       // 客户信息 邀约进店
       customerInfo2: {
-        inviteResult: null,
-        inviteTime: null,
-        followData: null,
-        nextFollowPlan: null,
-        followType: null,
-        nextFollowTime: null,
-        intention: null,
-        competitiveBrands: null,
-        loseReasonIds: [],
-        annexPaths: {
-          annexPaths: []
-        },
+        intention: null,//客户意向
+        inviteResult: null,//邀约结果
+        inviteTime: null,//邀约时间
+        followData: null,//跟进内容
+        nextFollowTime: null,//提醒时间
+        annexPaths: null,
       },
       // 客户信息 预约量尺
       customerInfo3: {
-        designUser: null,
-        inviteResult: null,
-        followData: null,
-        nextFollowPlan: null,
-        followType: null,
-        nextFollowTime: null,
-        annexPaths: {
-          annexPaths: []
-        },
-      },
-      custRules: {
-        customerName: [
-          {required: true, trigger: 'none'},
-        ],
-      },
-      phoneRules: {
-        customerPhone: [
-          {required: true, trigger: 'none'},
-          {
-            required: true,
-            trigger: 'none',
-            max: 11,
-            min: 11,
-            message: self.$t('W_071', {'param': self.$t('customerPhone')})
-          },
-        ],
+        designUser: null,//设计师
+        inviteResult: null,//邀约结果
+        inviteTime: null,//邀约时间
+        followData: null,//跟进内容
+        nextFollowTime: null,//提醒时间
+        annexPaths: null,
       },
       // 错误信息
       errMessage: {},
       // 跟进的tab切换
       followTab: '1',
-      goodsSpecsList: [],
-      loseReasonList: [],
       otherIntentionInfo: null,
       regionData: [],
       // 日常跟进校验
@@ -429,7 +339,7 @@ export default {
       this.visible = false
       this.$refs['formFollow' + this.followTab].$refs['dk-form'].resetFields()
       this.$refs.customerInfo.$refs['dk-form'].resetFields()
-      this['customerInfo' + this.followTab].annexPaths.annexPaths = null
+      this['customerInfo' + this.followTab].annexPaths = null
       // 清空客户区域
       if (this.$refs.customerDistrict) {
         this.$refs.customerDistrict.clear();
@@ -447,7 +357,6 @@ export default {
      */
     changeInviteResult(val) {
       if (val == this.$config.basicDataCode.inviteResult1) {
-        this.customerInfo2.nextFollowPlan = null
         this.customerInfo2.nextFollowTime = null
         this.customerInfo2.followData = ''
         this.$set(this, 'rule2', {
@@ -580,7 +489,64 @@ export default {
      * @date   : 2024-02-01 14:34
      */
     submitFollow() {
+      this.$refs['formFollow' + this.followTab].validate().then(valid => {
+        // 校验
+        if (!valid) {
+          return
+        }
+        this.$refs.customerInfo.validate().then(valid2=>{
+          // 校验
+          if (!valid2) {
+            return
+          }
+
+          let param = Object.assign({
+            cusId: this.customerInfo.cusId,
+            followOrg:this.$store.state.user.orgId,
+            followStatus: this.$config.basicDataCode['followStatus' + this.followTab],
+          }, this['customerInfo' + this.followTab])
+
+          param = Object.assign(param, {
+            cusName: this.customerInfo.cusName,
+            cusPhone:this.customerInfo.cusPhone,
+            addressFull: this.customerInfo.addressFull,
+            addressNo: this.customerInfo.addressNo,
+            addressArea: this.customerInfo.addressArea,
+            addressGcj02: this.customerInfo.addressGcj02,
+            addressName: this.customerInfo.addressName,
+          })
 
+          // 下次邀约时间
+          if (param.nextFollowTime && param.nextFollowTime instanceof Date) {
+            param.nextFollowTime = param.nextFollowTime.format()
+          }
+          // 邀约时间
+          if (param.inviteTime) {
+            param.inviteTime = param.inviteTime.format()
+          }
+
+          /* 沈博 2022年10月12日10:20:57 */
+          let requestBody = {...param}
+
+          //附件
+          if (requestBody.annexPaths) {
+            requestBody.annexPaths = requestBody.annexPaths.map(m => m.path)
+          }
+          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.cancelFollow()
+            } else {
+              this.$Message.error(res.message)
+            }
+          })
+
+        })
+      })
     },
     /**
      * @desc   : 上传文件
@@ -603,7 +569,7 @@ export default {
       // console.log('ttt',this.customerInfo)
       // 设置地址(不包括门牌号)
       this.customerInfo.customerDistrict = {}
-      this.customerInfo.customerDistrict.addressFull = this.customerInfo.addressFull.replace(this.customerInfo.addressNo, '')
+      this.customerInfo.addressFull = this.customerInfo.addressFull.replace(this.customerInfo.addressNo, '')
     }
     //设置意向
     this.setGoodsSpecs()

+ 62 - 92
src/view/mst/cus-follow/index.vue

@@ -120,8 +120,7 @@
             <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')"/>
+                         label-key="kindName" value-key="kindCode" transfer/>
             </DkFormItem>
             <!--留店时长-->
             <DkFormItem prop="stayTimeLen">
@@ -148,8 +147,7 @@
             <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')"/>
+                         label-key="kindName" value-key="kindCode" transfer/>
             </DkFormItem>
             <!--留店时长-->
             <DkFormItem prop="stayTimeLen">
@@ -222,12 +220,12 @@
           <!--  下拉区域  -->
           <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"/>
+            <div v-for="(item,index) of customerInfo5.measureRoomList" :key="index" style="width: 100%;margin:25px 35px">
+              <DkFormItem :label="$t('usedLocation2')" prop="roomName"  :required="true">
+                <InputPop v-model="item.roomName" maxlength="100"/>
               </DkFormItem>
               <div style="display: flex;justify-content: space-between;align-items: center">
-                <DkPicWall v-model="item.annexPaths"></DkPicWall>
+                <DkPicWall v-model="item.measureAnnex"></DkPicWall>
                 <Button @click="removeNewMeasureAnnex(index)" icon="md-close" long type="error" style="width: 30px"></Button>
               </div>
             </div>
@@ -245,7 +243,7 @@
     <Follow v-model="followModal" :goods-specs="goodsSpecsList" :customer-data="customerInfo"
             :goods-specs-list-back-up="goodsSpecsListBackUp" ref="modal_inner_follow"
             :intention-list="intentionList" :invite-result-list="inviteResultList"
-            :follow-type-list="followTypeList"></Follow>
+            :follow-type-list="followTypeList" :stay-time-len="stayTimeLenList"></Follow>
 
     <Modal v-model="filesShow" :title="$t('files')" @on-cancel="currentRow={}">
 
@@ -258,13 +256,13 @@
       </div>
 
       <divider v-if="currentRow && currentRow.annexPaths && currentRow.annexPaths.annexPaths &&
-        currentRow.annexPaths.annexPaths.length>0 && currentRow.measureAnnex"/>
+        currentRow.annexPaths.annexPaths.length>0 && currentRow.measureRoomList"/>
 
-      <div v-if="currentRow.measureAnnex">
-        <span v-if="currentRow.measureAnnex">{{ $t('measureAnnex') }}</span>
-        <div v-for="(item, index) of currentRow.measureAnnex" :key="index">
-          <Tag style="margin-left: 5px">{{ item.usedLocation }}</Tag>
-          <DkPicWall v-model="item.annexPaths" only-show></DkPicWall>
+      <div v-if="currentRow.measureRoomList">
+        <span v-if="currentRow.measureRoomList">{{ $t('measureRoomList') }}</span>
+        <div v-for="(item, index) of currentRow.measureRoomList" :key="index">
+          <Tag style="margin-left: 5px">{{ item.roomName }}</Tag>
+          <DkPicWall v-model="item.measureAnnex" only-show></DkPicWall>
         </div>
       </div>
     </Modal>
@@ -273,10 +271,14 @@
 
 <script>
 import {indexMixin} from '@/mixins'
+import Follow from './follow'
 
 export default {
   name: 'cus-follow',
   mixins: [indexMixin],
+  components: {
+    Follow
+  },
   data() {
     let self = this
     return {
@@ -313,7 +315,7 @@ export default {
         flgAgainMeasure: 'false',
         measureRemarks: null,
         measureTime: new Date().format(),
-        measureAnnex: [{usedLocation: null, annexPaths: []}],
+        measureRoomList: [{roomName: null, measureAnnex: null,displayNo:null,}],
       },
       // 客户信息 跟进任务
       customerInfo6: {
@@ -451,7 +453,7 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     addNewMeasureAnnex() {
-      this.customerInfo5.measureAnnex.push({"usedLocation": null, "annexPaths": null})
+      this.customerInfo5.measureRoomList.push({"roomName": null, "measureAnnex": null, "displayNo": null})
     },
     /**
      * @desc   : 关闭接待弹窗
@@ -474,18 +476,6 @@ export default {
       this.customerInfo4.stayTimeLen = null
     },
     /**
-     * @desc   : checkBox修改意向品类
-     * @author : 付斌
-     * @date   : 2024-02-01 14:23
-     */
-    selectIntentionInfo(val) {
-      if (val.value) {
-        val.count = 1
-      } else {
-        val.count = 0
-      }
-    },
-    /**
      * @desc   : 取消量尺回执
      * @author : 付斌
      * @date   : 2024-02-01 14:23
@@ -493,7 +483,7 @@ export default {
     cancelMeasure() {
       this.measureModal = false
       this.$refs['formMeasure'].$refs['dk-form'].resetFields()
-      this.customerInfo5.measureAnnex = [{usedLocation: null, annexPaths: null}]
+      this.customerInfo5.measureRoomList = [{roomName: null, annexPaths: null}]
     },
     /**
      * @desc   : 接待输入电话
@@ -550,14 +540,6 @@ export default {
       }
     },
     /**
-     * @desc   : 清除竞争品牌
-     * @author : 付斌
-     * @date   : 2024-02-01 14:23
-     */
-    cleanCompetitiveBrands(val, col) {
-
-    },
-    /**
      * @desc   : 点击tab
      * @author : 付斌
      * @date   : 2024-02-01 14:24
@@ -588,29 +570,22 @@ export default {
 
     },
     /**
-     * @desc   : 查询客户来源
-     * @author : 付斌
-     * @date   : 2024-02-01 14:24
-     */
-    getCustomerFrom() {
-
-    },
-    /**
-     * @desc   : 分页
-     * @author : 付斌
-     * @date   : 2024-02-01 14:24
-     */
-    pageSizeChange(pageInfo) {
-
-    },
-    /**
      * @desc   : 打开跟进弹窗
      * @author : 付斌
      * @date   : 2024-02-01 14:24
      */
     follow() {
-      this.followModal = true
-
+      if (this.$refs['table-select'].batchKeys.length == 1) {
+        if (!this.$refs['table-select'].batchRows[0].cusId) {
+          this.$Message.error(this.$t('W_068'))
+          return
+        }
+        this.followModal = true
+        // 查询客户信息
+        this.getCustomerInfo()
+      } else {
+        this.$Message.error(this.$t('W_013'))
+      }
     },
     /**
      * @desc   : 跟进任务
@@ -653,14 +628,6 @@ export default {
       })
     },
     /**
-     * @desc   : 校验
-     * @author : 付斌
-     * @date   : 2024-02-01 14:25
-     */
-    getErrMessage(prop) {
-      return this.errMessage[prop]
-    },
-    /**
      * @desc   : 量尺回执
      * @author : 付斌
      * @date   : 2024-02-01 14:25
@@ -695,30 +662,6 @@ export default {
         }
       })
     },
-
-    /**
-     * @desc   : 量尺回执客户选中
-     * @author : 付斌
-     * @date   : 2024-02-01 14:25
-     */
-    measureCusOk(val) {
-
-    },
-    /**
-     * @desc   : 意向 其他分类选中事件
-     * @author : 付斌
-     * @date   : 2024-02-01 14:26
-     */
-    radioChange(val) {
-      let other = this.goodsSpecsList.filter(f => f.otherFlag)
-      if (other && other.length > 0) {
-        other[0].specsId = this.otherIntentionInfo
-        other[0].specsName = other[0].children.filter(f => f.specsId == this.otherIntentionInfo)[0].specsName
-      }
-      this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].specsId = this.otherIntentionInfo
-      this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].other = true
-      this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].value = true
-    },
     /**
      * @desc   : 打开接待弹窗
      * @author : 付斌
@@ -822,10 +765,20 @@ export default {
         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)
+        if (param.measureRoomList) {
+          for (let it of param.measureRoomList) {
+            let i = 1
+            it.displayNo = i
+            i++
+            if (it.measureAnnex) {
+              it.measureAnnex = it.measureAnnex.map(m => {
+                return {
+                  name: m.name,
+                  url: m.path,
+                  type: m.type,
+                  createTime: m.createTime
+                }
+              })
             }
           }
         }
@@ -884,6 +837,22 @@ export default {
     },
 
     /**
+     * @desc   : 获取邀约结果
+     * @author : 常皓宁
+     * @date   : 2024/4/7 13:31
+     */
+    getInviteResult() {
+      let params = {
+        dataSourceCode: 'inviteResult'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.inviteResultList = res.data
+        }
+      })
+    },
+
+    /**
      * @desc   : 查询事件
      * @author : 付斌
      * @date   : 2024-02-01 14:24
@@ -891,6 +860,7 @@ export default {
     initData() {
       this.getStayTimeLen()
       this.getIntention()
+      this.getInviteResult()
     },
   },
   created() {

+ 16 - 0
src/view/mst/role/index.vue

@@ -129,6 +129,22 @@ export default {
     }
   },
   methods: {
+
+    /**
+    * @desc   : 编辑角色校验
+    * @author : 常皓宁
+    * @date   : 2024/4/10 13:09
+    */
+    openValidData(btnName, rows) {
+      //编辑
+      if (rows && rows[0] && (btnName === 'edit' || btnName === 'disable') ) {
+        if (rows[0].sysCode != null) {
+          this.$Message.warning(this.$t('W_007', {'param': this.$t('W_120')}));
+          return false;
+        }
+      }
+      return true;
+    },
     /**
      * @desc   : 打开功能权限弹窗
      * @author : 常皓宁