| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="回访单编号" prop="number"> |
| | | <WordInput |
| | | <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" |
| | |
| | | <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> |
| | | <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span> --> |
| | | </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 "@/views/client/followupRecords/mixin/codeMixin" |
| | | import codeMixin from "@/components/makepager/mixin/codeMixin" |
| | | export default { |
| | | name: "AddServiceFollowupDialog", |
| | | mixins: [codeMixin], |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | number: [{ required: true, message: "请输入回访单单编号", trigger: "blur" }], |
| | | 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, message: "请选择", trigger: "change" }] |
| | | memberId: [{ required: true, validator: this.validateMemberId, trigger: "change" }] |
| | | }, |
| | | satisfactionOptions: [], // 满意度 |
| | | timelyRateOptions: [], // 及时率 |
| | |
| | | if (val) { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | "editCommonConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | 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) |
| | |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | this.validateFormNumber() |
| | | 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) |
| | |
| | | serviceOrderId: this.serviceOrderId || 0, |
| | | solveRate: data.solveRateId || 0, |
| | | timelyRate: data.timelyRateId || 0, |
| | | codeStandID: data.ID, |
| | | codeRule: this.codeRule |
| | | codeStandID: data.ID |
| | | } |
| | | return params |
| | | }, |
| | |
| | | // 添加附件 |
| | | addAnnexClick() {}, |
| | | // 设置允许上传文件格式 |
| | | setFormatClick() {} |
| | | setFormatClick() {}, |
| | | // 回访人自定义校验规则 |
| | | validateMemberId(rule, value, callback) { |
| | | if (this.editConfig.infomation?.memberId > 0) { |
| | | callback() |
| | | } else { |
| | | callback(new Error("请选择回访人")) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |