|  |  | 
 |  |  |           <div class="basic-info-view"> | 
 |  |  |             <el-row> | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="回访单编号" prop="number"> | 
 |  |  |                   <el-input | 
 |  |  |                     v-if=" | 
 |  |  |                       editConfig.title == '编辑' || | 
 |  |  |                       (editConfig.title == '新建' && codenumer && (explain != '' || isIdDisabled)) | 
 |  |  |                     " | 
 |  |  |                     :disabled="editConfig.title == '编辑'" | 
 |  |  |                     v-model="editConfig.infomation.number" | 
 |  |  |                     placeholder="请输入编码" | 
 |  |  |                   > | 
 |  |  |                   </el-input> | 
 |  |  |                   <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c" | 
 |  |  |                     >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span | 
 |  |  |                   > | 
 |  |  |                   <!-- <WordInput | 
 |  |  |                     v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" | 
 |  |  |                     :codenumer="codenumer" | 
 |  |  |                     :sum="sum" | 
 |  |  |                     :disabled="editConfig.title !== '新建' || isIdDisabled" | 
 |  |  |                     :inputValue="inputValue" | 
 |  |  |                     @codeList="codeList" | 
 |  |  |                   /> | 
 |  |  |                   <span v-else-if="method == 0" style="color: #f56c6c" | 
 |  |  |                     >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span | 
 |  |  |                   > | 
 |  |  |                   <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span> --> | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-col> | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="客户名称" prop="client_name"> | 
 |  |  |                   <div class="custom-name"> | 
 |  |  |                     <el-autocomplete | 
 |  |  | 
 |  |  |                       <i class="el-icon-remove-outline" title="清除"></i> | 
 |  |  |                     </div> | 
 |  |  |                   </div> | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-col> | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="回访单编号" prop="number"> | 
 |  |  |                   <el-input v-model="editConfig.infomation.number" style="width: 100%"></el-input> | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-col> | 
 |  |  |               <el-col :span="12"> | 
 |  |  | 
 |  |  | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" | 
 |  |  | import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" | 
 |  |  | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" | 
 |  |  | import codeMixin from "@/components/makepager/mixin/codeMixin" | 
 |  |  | export default { | 
 |  |  |   name: "AddServiceFollowupDialog", | 
 |  |  |   mixins: [codeMixin], | 
 |  |  |   props: { | 
 |  |  |     editCommonConfig: { | 
 |  |  |       type: Object, | 
 |  |  | 
 |  |  |       dialogWidth: "50%", | 
 |  |  |       editConfig: this.editCommonConfig, | 
 |  |  |       rules: { | 
 |  |  |         number: [{ required: true, message: "请输入回访单单编号", trigger: "blur" }], | 
 |  |  |         memberId: [{ required: true, message: "请选择", trigger: "change" }] | 
 |  |  |         number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], | 
 |  |  |         client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], | 
 |  |  |         service_number: [{ required: true, message: "请选择客户服务单", trigger: "change" }], | 
 |  |  |         memberId: [{ required: true, validator: this.validateMemberId, trigger: "change" }] | 
 |  |  |       }, | 
 |  |  |       satisfactionOptions: [], // 满意度 | 
 |  |  |       timelyRateOptions: [], // 及时率 | 
 |  |  | 
 |  |  |     this.$store.dispatch("geContact") | 
 |  |  |     this.$store.dispatch("geServiceOrder") | 
 |  |  |     this.getCommonData() | 
 |  |  |     this.formInfo() | 
 |  |  |   }, | 
 |  |  |   watch: { | 
 |  |  |     "editCommonConfig.visible"(val) { | 
 |  |  |       if (val) { | 
 |  |  |         this.formInfo() | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     formInfo() { | 
 |  |  |       this.objCode.type = "服务回访编码" | 
 |  |  |       this.objCode.codeStandID = "" | 
 |  |  |       if (this.editConfig.infomation.codeStandID) { | 
 |  |  |         this.objCode.codeStandID = this.editConfig.infomation.codeStandID | 
 |  |  |       } | 
 |  |  |       this.getRCodeStandardList() | 
 |  |  |     }, | 
 |  |  |     getCommonData() { | 
 |  |  |       getAllData() | 
 |  |  |         .then((res) => { | 
 |  |  |           this.memberOptions = res.data.member | 
 |  |  |           // this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId) | 
 |  |  |           if (this.editConfig.title === "新建") { | 
 |  |  |             let username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") | 
 |  |  |             this.memberOptions.map((item) => { | 
 |  |  |               if (item.username == username) { | 
 |  |  |                 this.$set(this.editConfig.infomation, "memberId", item.id) | 
 |  |  |               } | 
 |  |  |             }) | 
 |  |  |           } | 
 |  |  |           this.satisfactionOptions = res.data.satisfaction // 满意度 | 
 |  |  |           this.$set(this.editConfig.infomation, "satisfactionId", this.editConfig.infomation.satisfactionId) | 
 |  |  |           this.timelyRateOptions = res.data.timely_rate // 及时率 | 
 |  |  |           this.$set(this.editConfig.infomation, "timelyRateId", this.editConfig.infomation.timelyRateId) | 
 |  |  |           this.solveRateOptions = res.data.solve_rate // 解决率 | 
 |  |  |           this.$set(this.editConfig.infomation, "solveRateId", this.editConfig.infomation.solveRateId) | 
 |  |  |           this.oldMemberOptions = res.data.member // 原服务人员 | 
 |  |  |           this.$set(this.editConfig.infomation, "oldMemberId", this.editConfig.infomation.oldMemberId) | 
 |  |  |           this.isVisitOptions = res.data.isVisit // 服务人员是否来过 | 
 |  |  |           this.$set(this.editConfig.infomation, "isVisitId", this.editConfig.infomation.isVisitId) | 
 |  |  |         }) | 
 |  |  |         .catch((err) => { | 
 |  |  |           console.log(err) | 
 |  |  | 
 |  |  |         if (valid) { | 
 |  |  |           console.log(this.editConfig.infomation) | 
 |  |  |           const params = this.saveParams() | 
 |  |  |           console.log(params) | 
 |  |  |           if (this.editConfig.title === "新建") { | 
 |  |  |             getAddServiceFollowup(params).then((res) => { | 
 |  |  |               console.log(res) | 
 |  |  | 
 |  |  |         satisfaction: data.satisfactionId || 0, | 
 |  |  |         serviceOrderId: this.serviceOrderId || 0, | 
 |  |  |         solveRate: data.solveRateId || 0, | 
 |  |  |         timelyRate: data.timelyRateId || 0 | 
 |  |  |         timelyRate: data.timelyRateId || 0, | 
 |  |  |         codeStandID: data.ID | 
 |  |  |       } | 
 |  |  |       return params | 
 |  |  |     }, | 
 |  |  | 
 |  |  |     // 添加附件 | 
 |  |  |     addAnnexClick() {}, | 
 |  |  |     // 设置允许上传文件格式 | 
 |  |  |     setFormatClick() {} | 
 |  |  |     setFormatClick() {}, | 
 |  |  |     // 回访人自定义校验规则 | 
 |  |  |     validateMemberId(rule, value, callback) { | 
 |  |  |       if (this.editConfig.infomation?.memberId > 0) { | 
 |  |  |         callback() | 
 |  |  |       } else { | 
 |  |  |         callback(new Error("请选择回访人")) | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | </script> |