From 61883fcf237024ceb7622daf5b23434e3eb1be74 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 16 十月 2023 10:38:50 +0800
Subject: [PATCH] 产品获取值修改

---
 src/views/service/serviceFollowup/AddServiceFollowupDialog.vue |  137 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 96 insertions(+), 41 deletions(-)

diff --git a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue b/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue
index 83ed22f..229809f 100644
--- a/src/views/service/serviceFollowup/AddServiceFollowupDialog.vue
+++ b/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,22 @@
           <div class="basic-info-title">鍩烘湰淇℃伅</div>
           <div class="basic-info-view">
             <el-row>
+              <el-col :span="12">
+                <el-form-item label="鍥炶鍗曠紪鍙�" prop="number">
+                  <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">
@@ -35,23 +51,23 @@
                       "
                       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">
-                <el-form-item label="鑱旂郴浜哄鍚�" prop="contactId">
+                <el-form-item label="鑱旂郴浜哄鍚�" prop="contact_name">
                   <div class="custom-name">
                     <el-autocomplete
                       v-model="editConfig.infomation.contact_name"
@@ -62,12 +78,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 +105,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,76 +136,80 @@
                     <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="satisfaction">
+                <el-form-item label="婊℃剰搴�" prop="satisfactionId">
                   <div class="common-select">
                     <el-select
-                      v-model="editConfig.infomation.satisfaction"
+                      v-model="editConfig.infomation.satisfactionId"
                       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>
                     </el-select>
-                    <div class="common-select-btn"><i class="el-icon-setting"></i></div>
+                    <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
                   </div>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="鍙婃椂鐜�" prop="timelyRate">
+                <el-form-item label="鍙婃椂鐜�" prop="timelyRateId">
                   <div class="common-select">
                     <el-select
-                      v-model="editConfig.infomation.timelyRate"
+                      v-model="editConfig.infomation.timelyRateId"
                       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>
                     </el-select>
-                    <div class="common-select-btn"><i class="el-icon-setting"></i></div>
+                    <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
                   </div>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="瑙e喅鐜�" prop="solveRate">
+                <el-form-item label="瑙e喅鐜�" prop="solveRateId">
                   <div class="common-select">
                     <el-select
-                      v-model="editConfig.infomation.solveRate"
+                      v-model="editConfig.infomation.solveRateId"
                       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-select>
-                    <div class="common-select-btn"><i class="el-icon-setting"></i></div>
+                    <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
                   </div>
                 </el-form-item>
               </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>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="鏈嶅姟浜哄憳鏄惁鏉ヨ繃" prop="isVisit">
+                <el-form-item label="鏈嶅姟浜哄憳鏄惁鏉ヨ繃" prop="isVisitId">
                   <div class="common-select">
                     <el-select
-                      v-model="editConfig.infomation.isVisit"
+                      v-model="editConfig.infomation.isVisitId"
                       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>
                     </el-select>
-                    <div class="common-select-btn"><i class="el-icon-setting"></i></div>
+                    <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
                   </div>
                 </el-form-item>
               </el-col>
@@ -202,7 +232,7 @@
             </el-row>
           </div>
           <!-- 闄勪欢淇℃伅 -->
-          <div class="basic-info-title">闄勪欢淇℃伅</div>
+          <!-- <div class="basic-info-title">闄勪欢淇℃伅</div>
           <div class="basic-info-view">
             <el-row>
               <el-col :span="12">
@@ -227,7 +257,7 @@
                 </el-form-item>
               </el-col>
             </el-row>
-          </div>
+          </div> -->
         </div>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -262,8 +292,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,10 +322,12 @@
   },
   data() {
     return {
-      dialogWidth: "80%",
+      dialogWidth: "50%",
       editConfig: this.editCommonConfig,
       rules: {
         number: [{ required: true, message: "璇疯緭鍏ュ洖璁垮崟鍗曠紪鍙�", trigger: "blur" }],
+        client_name: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鍚嶇О", trigger: "change" }],
+        service_number: [{ required: true, message: "璇烽�夋嫨瀹㈡埛鏈嶅姟鍗�", trigger: "change" }],
         memberId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }]
       },
       satisfactionOptions: [], // 婊℃剰搴�
@@ -319,7 +353,7 @@
       },
       clientId: this.editCommonConfig.infomation.clientId,
       contactId: this.editCommonConfig.infomation.contactId,
-      serviceId: this.editCommonConfig.infomation.serviceId
+      serviceOrderId: this.editCommonConfig.infomation.serviceOrderId
     }
   },
   created() {
@@ -327,8 +361,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) => {
@@ -382,16 +435,18 @@
         clientId: this.clientId || 0,
         contactId: this.contactId || 0,
         file: data.file || "",
-        isVisit: data.isVisit || 0,
+        isVisit: data.isVisitId || 0,
         memberId: data.memberId || 0,
         number: data.number || "",
         oldMemberId: data.oldMemberId || 0,
         planId: data.planId || 0,
         remark: data.remark || "",
-        satisfaction: data.satisfaction || 0,
-        serviceId: this.serviceId || 0,
-        solveRate: data.solveRate || 0,
-        timelyRate: data.timelyRate || 0
+        satisfaction: data.satisfactionId || 0,
+        serviceOrderId: this.serviceOrderId || 0,
+        solveRate: data.solveRateId || 0,
+        timelyRate: data.timelyRateId || 0,
+        codeStandID: data.ID,
+        codeRule: this.codeRule
       }
       return params
     },
@@ -428,7 +483,7 @@
       } else if (value === "contact") {
         this.contactId = item.id
       } else if (value === "customService") {
-        this.serviceId = item.id
+        this.serviceOrderId = item.id
       }
     },
     selClientClick(value) {
@@ -452,7 +507,7 @@
         this.clientId = row.id
       } else if (value === "customService") {
         this.editConfig.infomation.service_number = row.serviceNumber
-        this.serviceId = row.id
+        this.serviceOrderId = row.id
       }
     },
     // 娓呴櫎宸查�夋嫨鐢ㄦ埛
@@ -465,7 +520,7 @@
         this.contactId = 0
       } else if (value === "customService") {
         this.editConfig.infomation.service_number = ""
-        this.serviceId = 0
+        this.serviceOrderId = 0
       }
     },
     // 娣诲姞闄勪欢

--
Gitblit v1.8.0