src/views/service/serviceFollowup/AddServiceFollowupDialog.vue
@@ -13,7 +13,7 @@
        :model="editConfig.infomation"
        :rules="rules"
        label-position="right"
        label-width="308px"
        label-width="168px"
        size="mini"
        style="height: 60vh; overflow-x: hidden"
      >
@@ -23,6 +23,23 @@
          <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-model="editConfig.infomation.number" style="width: 100%"></el-input> -->
                  <WordInput
                    v-if="codenumer && (explain != '' || isIdDisabled) && method == 0"
                    :codenumer="codenumer"
                    :sum="sum"
                    :disabled="editConfig.infomation.id || 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>自动生成</span>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="客户名称" prop="client_name">
                  <div class="custom-name">
@@ -35,19 +52,19 @@
                      "
                      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>
                    </div>
                    <div class="common-select-btn" @click="clearupClient('client')">
                      <i class="el-icon-edit-outline" title="清除"></i>
                    <div
                      v-if="editConfig.infomation.client_name && editConfig.infomation.client_name.length > 0"
                      class="common-select-btn"
                      @click="clearupClient('client')"
                    >
                      <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"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
@@ -62,12 +79,17 @@
                      "
                      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>
                    </div>
                    <div class="common-select-btn" @click="clearupClient('contact')">
                      <i class="el-icon-edit-outline" title="清除"></i>
                    <div
                      v-if="editConfig.infomation.contact_name && editConfig.infomation.contact_name.length > 0"
                      class="common-select-btn"
                      @click="clearupClient('contact')"
                    >
                      <i class="el-icon-remove-outline" title="清除"></i>
                    </div>
                  </div>
                </el-form-item>
@@ -84,25 +106,30 @@
                      "
                      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>
                    </div>
                    <div class="common-select-btn" @click="clearupClient('customService')">
                      <i class="el-icon-edit-outline" title="清除"></i>
                    <div
                      v-if="editConfig.infomation.service_number && editConfig.infomation.service_number.length > 0"
                      class="common-select-btn"
                      @click="clearupClient('customService')"
                    >
                      <i class="el-icon-remove-outline" title="清除"></i>
                    </div>
                  </div>
                </el-form-item>
              </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>
                </el-form-item>
              </el-col>
              <el-col :span="12">
              <!-- <el-col :span="12">
                <el-form-item label="项目计划" prop="planId">
                  <div class="custom-name">
                    <el-input v-model="editConfig.infomation.planId"></el-input>
@@ -110,7 +137,7 @@
                    <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div>
                  </div>
                </el-form-item>
              </el-col>
              </el-col> -->
              <el-col :span="12">
                <el-form-item label="满意度" prop="satisfactionId">
                  <div class="common-select">
@@ -119,6 +146,7 @@
                      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>
@@ -135,6 +163,7 @@
                      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>
@@ -151,6 +180,7 @@
                      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>
@@ -161,7 +191,7 @@
              </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>
@@ -175,6 +205,7 @@
                      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>
@@ -262,8 +293,10 @@
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"
export default {
  name: "AddServiceFollowupDialog",
  mixins: [codeMixin],
  props: {
    editCommonConfig: {
      type: Object,
@@ -290,7 +323,7 @@
  },
  data() {
    return {
      dialogWidth: "80%",
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        number: [{ required: true, message: "请输入回访单单编号", trigger: "blur" }],
@@ -327,8 +360,27 @@
    this.$store.dispatch("geContact")
    this.$store.dispatch("geServiceOrder")
    this.getCommonData()
    this.formInfo()
  },
  watch: {
    "editCommonConfig.visible"(val) {
      if (val) {
        this.formInfo()
      }
    },
    "editCommonConfig.infomation.codeStandID"() {
      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) => {
@@ -391,7 +443,9 @@
        satisfaction: data.satisfactionId || 0,
        serviceOrderId: this.serviceOrderId || 0,
        solveRate: data.solveRateId || 0,
        timelyRate: data.timelyRateId || 0
        timelyRate: data.timelyRateId || 0,
        codeStandID: data.ID,
        codeRule: this.codeRule
      }
      return params
    },