From 02dbaaa04bc443e860a715cf907bc0fb5c1a7da4 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 11 七月 2023 09:09:34 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS-WEB/src/views/code/code.vue | 40 +++++++++++++++++++++++++++++++---------
1 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 807ace5..4bd195e 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -1394,6 +1394,11 @@
});
}else {
this.codeClassifyForm.oid = this.selectedFixedOrCodeclassifyValue.attributes.oid;
+ // 鍒嗙被鐮佹锛屽瓙鍒嗙被鍜岀埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰鏇存敼
+ if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+ return;
+ }
+ this.$delete(this.codeClassifyForm,"parentClassifyValueOid");
editCodeClassifyValue(this.codeClassifyForm).then(() => {
this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid})
this.$message({
@@ -1430,6 +1435,9 @@
});
});
}else{
+ if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+ return;
+ }
//鍒嗙被鐮佹鐮佸�煎垹闄�
this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
confirmButtonText: "纭畾",
@@ -1450,7 +1458,6 @@
});
});
}
-
},
//瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
codeFixedValueOpetion(condition,row){
@@ -1490,10 +1497,13 @@
},
//瀵瑰垎绫荤爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
codeClassifyValueOpetion(condition){
+ if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+ return;
+ }
//姝ゅ娑夊強鍒版繁娴呮嫹璐濋棶棰橈紝浣嗘槸鎵ц涓婁笅绉讳繚瀛樻搷浣滀箣鍚庝細閲嶆柊鍔犺浇treedata锛屾墍浠ュ奖鍝嶄笉澶�
let currentTreeList = this.getCodeClassifyValueTreeData();
let saveData = [];
- console.log(currentTreeList.treeList);
+ // console.log(currentTreeList.treeList);
if(condition == 'up'){
if(currentTreeList.index-1>=0){
// 璋冩暣椤哄簭
@@ -1513,8 +1523,6 @@
this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData);
}
}
- console.log(saveData);
- console.log(this.classifyValueTreeData);
},
//閫変腑琚皟鏁撮『搴忕殑涓や釜鏍戠殑鑺傜偣
getCodeClassifyValueTreeData(){
@@ -1553,7 +1561,7 @@
}
},
//涓婄Щ涓嬬Щ绛夋搷浣滅殑淇濆瓨
- saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){
+ async saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){
//淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
if(condition == "fixedValue"){
let data = {
@@ -1572,7 +1580,7 @@
});
}else {
//淇濆瓨瀵瑰垎绫荤爜鍊肩爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
- saveCodeClassifyValueOrder({
+ await saveCodeClassifyValueOrder({
"codeClassifySecOid": this.codefixedsecOrCodeclassifysecOid,
"dtoList": JSON.stringify(editOrderNumdata),
}).then(() => {
@@ -1611,7 +1619,21 @@
this.codeClassifyForm.id = node.attributes.id;
this.codeClassifyForm.name = node.attributes.name;
this.codeClassifyForm.parentClassifyValueOid = node.attributes.oid;
- //console.log(this.codeClassifyForm);
+ // console.log(this.codeClassifyForm);
+ },
+ /**
+ * 鍒嗙被鐮佹鐮佸�硷紝淇敼銆佸垹闄ゃ�佷笂涓嬬Щ涔嬪墠锛屾鏌ユ槸鍚︿负瀛愬垎绫诲拰鐖跺垎绫讳箣闂寸浉浜掓洿鏀�
+ * @currentRowClassOid 褰撳墠閫変腑琛宱id
+ * @updateClassOid 瑕佷慨鏀圭殑鍒嗙被鐮佸�紀id
+ */
+ checkClassUpdate(currentRowClassOid,updateClassOid){
+ if(currentRowClassOid!=updateClassOid){
+ this.$message({
+ type: "error",
+ message: "鎿嶄綔澶辫触銆愬瓙鍒嗙被涓庣埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰淇敼鐮佸�笺��!"
+ });
+ }
+ return currentRowClassOid!=updateClassOid;
},
@@ -1982,7 +2004,7 @@
this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false);
},
// 涓婄Щ涓嬬Щ鍩虹鐮佹
- upOrderNum(row){
+ async upOrderNum(row){
if(!this.tipsMessage(this.selectionList)){
return;
}
@@ -1994,7 +2016,7 @@
this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
return;
}
- upOrderNum(row.oid).then(() => {
+ await upOrderNum(row.oid).then(() => {
this.loadBasic(this.selectionList[0]);
this.$message({
type: "success",
--
Gitblit v1.9.3