From c5badac7106d4ec7f419283b39b435a92f275fbd Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 30 十月 2023 09:10:18 +0800
Subject: [PATCH] 前端增加码段类型枚举类,实现修改码段类型时提供是否清空码值对话框功能

---
 Source/UBCS-WEB/src/views/code/code.vue |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 1d0c9dd..da43e4a 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -1303,6 +1303,7 @@
 import { mapGetters } from "vuex";
 import { getByRoleUserList } from "@/api/system/user";
 import func from "@/util/func";
+import secTypeEnum from '@/enumpack/CodeSecTypeEnum';
 
 export default {
   data() {
@@ -2665,13 +2666,13 @@
         this.basicSecDialogTitle = "淇敼鐮佹淇℃伅";
         this.showbtn = true;
         this.basicSecOnlyRead = false;
-        //涓篺orm缁戝畾鍊�
       } else {
         this.basicSecDialogTitle = "鏌ョ湅鐮佹淇℃伅";
         this.showbtn = false;
         this.basicSecOnlyRead = true;
       }
       //console.log(this.form);
+      //涓篺orm缁戝畾鍊�
       this.changeSectypeFormItems(condition == "add" ? null : row);
       this.addBasicCodeSettingBox = true;
     },
@@ -2717,8 +2718,23 @@
           // let referValueInfo = JSON.parse(this.form.referValueInfo);
           // referValueInfo.referType = this.form.referBtmId;
         }
-        
-        editSave(this.form).then(
+        let oldBasicSec = this.selectionBasicList.at(-1);
+        let secType = this.form.secType;
+        Vue.set(this.form, 'isClearValue', false);
+        if((oldBasicSec.secType == "codefixedsec" || oldBasicSec.secType === "codeclassifysec") && oldBasicSec.secType != secType){
+          await this.$confirm("鐮佹绫诲瀷鐢便��"+oldBasicSec.secTypeText+"銆戯紝淇敼涓�"+"銆�"+secTypeEnum.getTextByValue(secType)+"銆戯紝璇烽棶鏄惁闇�瑕佹竻绌哄叧鑱旂殑鐮佸�硷紵", "鎻愮ず", {
+            distinguishCancelAndClose: true,
+            closeOnClickModal: false,
+            confirmButtonText: "娓呯┖鐮佸��",
+            cancelButtonText: "淇濈暀鐮佸��",
+          }).then(() => {
+            // 娓呯┖鐮佸��
+            this.form.isClearValue = true;
+          }).catch(action => {
+            this.form.isClearValue = false;
+          });
+        }
+        await editSave(this.form).then(
           () => {
             this.$message({
               type: "success",
@@ -2733,6 +2749,7 @@
           }
         );
       }
+      // 鍙栨秷淇濆瓨鎸夐挳鍔犺浇鏁堟灉
       this.isLoadingSecCodeAddBtn = false;
     },
     /** 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�*/

--
Gitblit v1.9.3