| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="168px" |
| | | size="mini" |
| | | style="height: 60vh; overflow-x: hidden" |
| | | > |
| | |
| | | <div class="basic-info-title">基本信息</div> |
| | | <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"> |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('client', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('client')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="回访单编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contact_name"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | |
| | | " |
| | | value-key="name" |
| | | @select="handleSelectClient('contact', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('contact')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | |
| | | " |
| | | value-key="serviceNumber" |
| | | @select="handleSelectClient('customService', $event)" |
| | | style="width: 100%" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('customService')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="回访人" prop="memberId"> |
| | | <el-select v-model="editConfig.infomation.memberId" size="mini"> |
| | | <el-select v-model="editConfig.infomation.memberId" size="mini" style="width: 100%"> |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in satisfactionOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in timelyRateOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in solveRateOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="原服务人员" prop="oldMemberId"> |
| | | <el-select v-model="editConfig.infomation.oldMemberId" size="mini"> |
| | | <el-select v-model="editConfig.infomation.oldMemberId" size="mini" style="width: 100%"> |
| | | <el-option v-for="item in oldMemberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in isVisitOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | 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, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | 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> |