|  |  | 
 |  |  |           <div class="basic-info-view"> | 
 |  |  |             <el-row> | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="服务单编号" prop="serviceNumber"> | 
 |  |  |                   <el-input | 
 |  |  |                     v-if=" | 
 |  |  |                       editConfig.title == '编辑' || | 
 |  |  |                       (editConfig.title == '新建' && codenumer && (explain != '' || isIdDisabled)) | 
 |  |  |                     " | 
 |  |  |                     :disabled="editConfig.title == '编辑'" | 
 |  |  |                     v-model="editConfig.infomation.serviceNumber" | 
 |  |  |                     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.serviceNumber | 
 |  |  |                   }}</span> --> | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-col> | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="客户名称" prop="client_name"> | 
 |  |  |                   <div class="custom-name"> | 
 |  |  |                     <el-autocomplete | 
 |  |  | 
 |  |  |                   </div> | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-col> | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="服务单编号" prop="serviceNumber"> | 
 |  |  |                   <el-input v-model="editConfig.infomation.serviceNumber" style="width: 100%"></el-input> | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-col> | 
 |  |  |  | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="服务合同"> | 
 |  |  |                   <div class="custom-name"> | 
 |  |  | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-col> | 
 |  |  |               <el-col :span="12"> | 
 |  |  |                 <el-form-item label="严重程度" prop="severity"> | 
 |  |  |                 <el-form-item label="严重程度" prop="severityId"> | 
 |  |  |                   <div class="common-select"> | 
 |  |  |                     <el-select | 
 |  |  |                       v-model="editConfig.infomation.severity" | 
 |  |  |                       v-model="editConfig.infomation.severityId" | 
 |  |  |                       placeholder="请选择" | 
 |  |  |                       class="common-select-sel" | 
 |  |  |                       size="mini" | 
 |  |  | 
 |  |  |   getTimeSpentList | 
 |  |  | } from "@/api/common/other" | 
 |  |  | import Status from "@/common/const/commonStatus" | 
 |  |  | import codeMixin from "./mixin/codeMixin" | 
 |  |  |  | 
 |  |  | export default { | 
 |  |  |   name: "AddClientServiceOrderDialog", | 
 |  |  |   mixins: [pageMixin], | 
 |  |  |   mixins: [pageMixin, codeMixin], | 
 |  |  |   props: { | 
 |  |  |     editCommonConfig: { | 
 |  |  |       type: Object, | 
 |  |  | 
 |  |  |       dialogWidth: "50%", | 
 |  |  |       editConfig: this.editCommonConfig, | 
 |  |  |       rules: { | 
 |  |  |         serviceNumber: [{ required: true, message: "请输入服务单编号", trigger: "blur" }], | 
 |  |  |         // faultTypeId: [{ required: true, message: "请选择故障类别", trigger: "change" }], | 
 |  |  |         serviceNumber: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], | 
 |  |  |         client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], | 
 |  |  |         subject: [{ required: true, message: "请输入主题", trigger: "blur" }], | 
 |  |  |         // productCategory: [{ required: true, message: "请选择产品类别", trigger: "change" }], | 
 |  |  |         serviceManId: [{ required: true, message: "请选择产品类别", trigger: "change" }], | 
 |  |  |         serviceManId: [{ required: true, validator: this.validateMemberId, trigger: "change" }], | 
 |  |  |         serviceOrderStatusId: [{ required: true, message: "请选择故障类别", trigger: "change" }], | 
 |  |  |         problemDesc: [{ required: true, message: "请输入问题描述", trigger: "blur" }] | 
 |  |  |       }, | 
 |  |  | 
 |  |  |     this.getSeverityList() | 
 |  |  |     this.getPriorityLevelList() | 
 |  |  |     this.getTimeSpentList() | 
 |  |  |     this.formInfo() | 
 |  |  |   }, | 
 |  |  |   watch: { | 
 |  |  |     "editCommonConfig.visible"(val) { | 
 |  |  |       if (val) { | 
 |  |  |         this.formInfo() | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     formInfo() { | 
 |  |  |       this.objCode.codeStandID = "" | 
 |  |  |       if (this.editConfig.infomation.codeStandID) { | 
 |  |  |         this.objCode.codeStandID = this.editConfig.infomation.codeStandID | 
 |  |  |       } | 
 |  |  |       this.getRCodeStandardList() | 
 |  |  |     }, | 
 |  |  |     setTable() { | 
 |  |  |       this.recordTableList = { | 
 |  |  |         tableInfomation: [], | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     getCommonData() { | 
 |  |  |       getAllData().then((res) => { | 
 |  |  |         this.memberOptions = res.data.member | 
 |  |  |         this.serviceManOptions = res.data.member | 
 |  |  |         if (this.editConfig.title === "新建") { | 
 |  |  |           let username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") | 
 |  |  |           this.serviceManOptions.map((item) => { | 
 |  |  |             if (item.username == username) { | 
 |  |  |               this.$set(this.editConfig.infomation, "serviceManId", item.id) | 
 |  |  |             } | 
 |  |  |           }) | 
 |  |  |         } | 
 |  |  |         this.reportSourceOptions = res.data.reportSource | 
 |  |  |       }) | 
 |  |  |       this.getServiceTypeList() | 
 |  |  | 
 |  |  |         serviceManId: data.serviceManId || 0, | 
 |  |  |         serviceNumber: data.serviceNumber || "", | 
 |  |  |         serviceTypeId: data.serviceTypeId || 0, | 
 |  |  |         severity: data.severity || 0, | 
 |  |  |         severityId: data.severityId || 0, | 
 |  |  |         solution: data.solution || "", | 
 |  |  |         solutionRemark: data.solutionRemark || "", | 
 |  |  |         serviceOrderStatusId: data.serviceOrderStatusId || 0, | 
 |  |  |         subject: data.subject || "", | 
 |  |  |         timeSpentId: data.timeSpentId || 0 | 
 |  |  |         timeSpentId: data.timeSpentId || 0, | 
 |  |  |         codeStandID: data.ID | 
 |  |  |       } | 
 |  |  |       return params | 
 |  |  |     }, | 
 |  |  | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 故障类别 | 
 |  |  |     async getFaultTypeList() { | 
 |  |  |       await getFaultTypeList().then((res) => { | 
 |  |  |         this.faultTypeOptions = res.data.data | 
 |  |  |     getFaultTypeList() { | 
 |  |  |       getFaultTypeList().then((res) => { | 
 |  |  |         this.faultTypeOptions = res.data.data ? res.data.data : [] | 
 |  |  |         this.$set(this.editConfig.infomation, "faultTypeId", this.editConfig.infomation.faultTypeId) | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     // 服务方式 | 
 |  |  |     async getServiceTypeList() { | 
 |  |  |       await getServiceTypeList().then((res) => { | 
 |  |  |         this.serviceTypeOptions = res.data.data | 
 |  |  |     getServiceTypeList() { | 
 |  |  |       getServiceTypeList().then((res) => { | 
 |  |  |         this.serviceTypeOptions = res.data.data ? res.data.data : [] | 
 |  |  |         this.$set(this.editConfig.infomation, "serviceTypeId", this.editConfig.infomation.serviceTypeId) | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     // 严重程度 | 
 |  |  |     async getSeverityList() { | 
 |  |  |       await getSeverityList().then((res) => { | 
 |  |  |         this.severityOptions = res.data.data | 
 |  |  |     getSeverityList() { | 
 |  |  |       getSeverityList().then((res) => { | 
 |  |  |         this.severityOptions = res.data.data ? res.data.data : [] | 
 |  |  |  | 
 |  |  |         this.$set(this.editConfig.infomation, "severityId", this.editConfig.infomation.severityId) | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     // 优先级别 | 
 |  |  |     async getPriorityLevelList() { | 
 |  |  |       await getPriorityLevelList().then((res) => { | 
 |  |  |         this.priorityLevelOptions = res.data.data | 
 |  |  |     getPriorityLevelList() { | 
 |  |  |       getPriorityLevelList().then((res) => { | 
 |  |  |         this.priorityLevelOptions = res.data.data ? res.data.data : [] | 
 |  |  |  | 
 |  |  |         this.$set(this.editConfig.infomation, "priorityLevelId", this.editConfig.infomation.priorityLevelId) | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     // 花费时间 | 
 |  |  |     async getTimeSpentList() { | 
 |  |  |       await getTimeSpentList().then((res) => { | 
 |  |  |         this.timeSpentOptions = res.data.data | 
 |  |  |     getTimeSpentList() { | 
 |  |  |       getTimeSpentList().then((res) => { | 
 |  |  |         this.timeSpentOptions = res.data.data ? res.data.data : [] | 
 |  |  |         this.$set(this.editConfig.infomation, "timeSpentId", this.editConfig.infomation.timeSpentId) | 
 |  |  |       }) | 
 |  |  |     }, | 
 |  |  |     // 服务人员自定义校验规则 | 
 |  |  |     validateMemberId(rule, value, callback) { | 
 |  |  |       if (this.editConfig.infomation?.serviceManId > 0) { | 
 |  |  |         callback() | 
 |  |  |       } else { | 
 |  |  |         callback(new Error("请选择服务人员")) | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } |