From 84dfaf7b7ee6f4fccf5dfe7534c81ab2687a2b07 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期五, 13 十月 2023 17:19:48 +0800
Subject: [PATCH] feat: 所有请求都走拦截器

---
 src/views/sales/quotation/AddQuotationDialog.vue |   70 ++++++++++++++++------------------
 1 files changed, 33 insertions(+), 37 deletions(-)

diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue
index 386c0bb..d186f73 100644
--- a/src/views/sales/quotation/AddQuotationDialog.vue
+++ b/src/views/sales/quotation/AddQuotationDialog.vue
@@ -27,21 +27,17 @@
               <el-col :span="12">
                 <el-form-item label="鎶ヤ环缂栧彿" prop="number">
                   <WordInput
-                      v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0"
-                      :codenumer="codenumer"
-                      :sum="sum"
-                      :disabled="editConfig.infomation.id || isIdDisabled"
-                      :inputValue="inputValue"
-                      @codeList="codeList"
+                    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
+                    >璇蜂紭鍏堥厤缃紪鐮佽鑼� <el-button type="text" @click="numberClick"> 閰嶇疆瑙勮寖 </el-button></span
                   >
-                  <span  v-else>鑷姩鐢熸垚</span>
+                  <span v-else>{{ editConfig.title === "鏂板缓" ? "鑷姩鐢熸垚" : editConfig.infomation.number }}</span>
                 </el-form-item>
               </el-col>
 
@@ -71,11 +67,11 @@
                   </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="number">-->
+              <!--                  <el-input v-model="editConfig.infomation.number"></el-input>-->
+              <!--                </el-form-item>-->
+              <!--              </el-col>-->
               <el-col :span="12">
                 <el-form-item label="鎶ヤ环鍗曠姸鎬�" prop="quotation_status_id">
                   <div class="common-select">
@@ -316,10 +312,10 @@
 import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
 import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog"
 import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog"
-import codeMixin from "@/views/client/followupRecords/mixin/codeMixin";
+import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
 export default {
   name: "QuotationDialog",
-  mixins:[codeMixin],
+  mixins: [codeMixin],
   props: {
     editCommonConfig: {
       type: Object,
@@ -391,7 +387,7 @@
       tableData: [],
       productId: 1,
       isNoProduct: true,
-      objCode: { name: "", page: 0, pageSize: 0, type: "鎶ヤ环缂栫爜",codeStandID:'' },
+      objCode: { name: "", page: 0, pageSize: 0, type: "鎶ヤ环缂栫爜", codeStandID: "" }
     }
   },
   created() {
@@ -402,23 +398,23 @@
     this.getCommonData()
     this.formInfo()
   },
-  watch:{
-    'editConfig.visible'(val){
-      if(val){
+  watch: {
+    "editConfig.visible"(val) {
+      if (val) {
         this.formInfo()
       }
     },
-    'editConfig.infomation.codeStandID'(){
+    "editConfig.infomation.codeStandID"() {
       this.formInfo()
     }
   },
   methods: {
-    formInfo(){
-      this.objCode.codeStandID = ''
-      if(this.editConfig.infomation.codeStandID){
-        this.objCode.codeStandID = this.editConfig.infomation.codeStandID;
+    formInfo() {
+      this.objCode.codeStandID = ""
+      if (this.editConfig.infomation.codeStandID) {
+        this.objCode.codeStandID = this.editConfig.infomation.codeStandID
       }
-      this.getRCodeStandardList();
+      this.getRCodeStandardList()
     },
     getCommonData() {
       getAllData()
@@ -484,10 +480,10 @@
      * 寮哄埗鍒锋柊form缁勪欢
      * 澶栭儴鏇存敼琛ㄥ崟鍊间笉浼氳Е鍙戣〃鍗曟牎楠�,瀵艰嚧鍗充娇鏈夊�煎琚〃鍗曟牎楠岄樆濉炰綇
      */
-    refresh(){
-      this.refreshFlag=false
-      requestAnimationFrame(()=>{
-        this.refreshFlag=true
+    refresh() {
+      this.refreshFlag = false
+      requestAnimationFrame(() => {
+        this.refreshFlag = true
       })
     },
     saveParams() {
@@ -504,8 +500,8 @@
         sale_chance_id: this.saleChanceId || 0,
         validity_date: data.validity_date || "",
         products: this.tableData,
-        codeStandID:data.ID,
-        codeRule:this.codeRule,
+        codeStandID: data.ID,
+        codeRule: this.codeRule
       }
       return params
     },
@@ -693,8 +689,8 @@
             cursor: pointer;
           }
         }
-        .custom-name{
-          .el-autocomplete{
+        .custom-name {
+          .el-autocomplete {
             flex: 1;
           }
         }

--
Gitblit v1.8.0