haoxuan
2023-10-11 f450367d25cc92950b3ebed3e19d97627e0b3fb7
跟进记录的编码 接口联调和修改
4个文件已修改
46 ■■■■■ 已修改文件
src/components/wordInput.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/client/followupRecords/AddFollowupRecordsDialog.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/client/followupRecords/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/client/followupRecords/mixin/codeMixin.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/wordInput.vue
@@ -25,8 +25,8 @@
        style="
          height: 100%;
          display: inline-block;
          line-height: 24px;
          width: 24px;
          line-height: 22px;
          width: 22px;
          text-align: center;
        "
        class="el-icon-minus"
@@ -277,14 +277,15 @@
    // justify-content: space-between;
    display: inline-block;
    margin-right: 0px;
    line-height:28px;
    input {
      color: inherit;
      font-family: inherit;
      border: 0;
      outline: 0;
      border-bottom: 1px solid #919191;
      height: 24px;
      width: 24px;
      height: 22px;
      width: 22px;
      font-size:18px;
      text-align: center;
      border: #919191 1px solid;
src/views/client/followupRecords/AddFollowupRecordsDialog.vue
@@ -28,20 +28,21 @@
                </el-form-item> -->
                <el-form-item label="跟进记录编号" prop="number">
                  <WordInput
                    v-if="codenumer && (explain != '' || isIdDisabled)"
                    v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0"
                    :codenumer="codenumer"
                    :sum="sum"
                    :disabled="editConfig.infomation.id || isIdDisabled"
                    :inputValue="inputValue"
                    @codeList="codeList"
                  />
                  <span v-else style="color: #f56c6c"
                  <span v-else-if="method == 0" style="color: #f56c6c"
                    >请优先配置编码规范
                    <el-button type="text"  @click="numberClick">
                        配置规范
                      </el-button
                    ></span
                  >
                  <span  v-else>自动生成</span>
                </el-form-item>
              </el-col>
              <el-col :span="12">
@@ -437,23 +438,23 @@
    this.$store.dispatch("geLead")
    this.getCommonData()
    this.getContactInfoList()
    this.getRCodeStandardList();
    this.formInfo();
  },
  watch:{
    'editConfig.visible'(val){
    'editContactsConfig.visible'(val){
      if(val){
        this.formInfo()
      }
    },
    'editConfig.infomation'(){
    'editContactsConfig.infomation.codeStandID'(){
      this.formInfo()
    }
  },
  methods: {
    formInfo(){
      this.objCode.codeStandID = ''
      if(this.editConfig.infomation.number&&this.editConfig.infomation.codeStandardID){
        this.objCode.codeStandID = this.editConfig.infomation.codeStandardID;
      if(this.editConfig.infomation.codeStandID){
        this.objCode.codeStandID = this.editConfig.infomation.codeStandID;
      }
      this.getRCodeStandardList();
    }, 
@@ -532,7 +533,9 @@
          record: data.record || "",
          sale_chance_id: this.saleChanceId || 0,
          sales_leads_id: this.saleLeadId || 0,
          topic: data.topic || ""
          topic: data.topic || "",
          codeStandID:data.ID,
          codeRule:this.codeRule,
        }
      }
      let params = {}
src/views/client/followupRecords/index.vue
@@ -255,16 +255,16 @@
    },
    // 新建
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = { ...this.addConfig }
      this.editConfig.visible = true
    },
    // 编辑
    handleClick(row) {
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row, sale_chance_name: "", sales_leads_name: "" }
      this.editConfig.visible = true
    },
    // 删除
    delClick(id) {
src/views/client/followupRecords/mixin/codeMixin.js
@@ -14,7 +14,9 @@
      codenumer: 0, //每次输入的编码
      codenumberList: [], //整条编码
      sum: 0,
      objCode: { name: "", page: 0, pageSize: 0, type: "跟进记录编码" },
      method:0,
      objCode: { name: "", page: 0, pageSize: 0, type: "跟进记录编码",codeStandID:'' },
      codeRule:{},
    };
  },
  
@@ -28,12 +30,16 @@
        if(res.data.code==200){
          const {
            List = [],
            ID,
            AutoRule = {},
            Method,
          } = (res.data.data&&res.data.data.data) ? res.data.data.data[0] : [];
          this.codeRule= (res.data.data&&res.data.data.data) ? res.data.data.data[0]:{}
          let autoRule=AutoRule
          let method=Method?Method:0
          this.method=method;
          let rules=List
          this.editConfig.infomation.ID=ID
          if (method == 0 && res.data.data.data.length > 0) {
            rules.forEach((item, index) => {
              // setTimeout(() => {
@@ -62,10 +68,14 @@
                this.codeList(
                  this.editConfig.infomation.number ? this.editConfig.infomation.number : autoRule.PrefixValue
                );
                return true;
              }
            }
          }
          if(this.editContactsConfig.infomation.id){
            this.codeList( this.editConfig.infomation.number);
          }
          this.$forceUpdate();
        }else{
          this.$message.error(res.data.msg?res.data.msg:'获取编码规范失败,请重试!')