From 5b67b073b1596ab228ad51b276b88ff6da0d23e4 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 28 十一月 2024 13:41:50 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectMange.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 45 insertions(+), 7 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectMange.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectMange.vue
index 320fe17..933e6bb 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectMange.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectMange.vue
@@ -4,11 +4,10 @@
import deepClone from "@/utils/deepClone"
import {Search} from "@element-plus/icons-vue";
import request from "@/utils/request";
-import {ElDatePicker, ElMessage} from "element-plus";
+import {ElDatePicker, ElMessage, ElMessageBox} from "element-plus";
import useOrderInfoStore from "@/stores/sd/order/orderInfo";
import useUserInfoStore from "@/stores/userInfo";
import userInfo from "@/stores/userInfo";
-import {VxeUI} from 'vxe-pc-ui'
import GlassComputed from "@/views/pp/glassOptimize/GlassComputed.vue";
const {t} = useI18n()
@@ -86,8 +85,8 @@
{code: 'undocompute', name: '鎾ら攢妯℃嫙璁$畻', prefixIcon: 'vxe-icon-error-circle-fill'},
{code: 'Initializeproject', name: '鍒濆鍖栧伐绋�', prefixIcon: 'vxe-icon-undo'},
{code: 'delproject', name: '鍒犻櫎宸ョ▼', prefixIcon: 'vxe-icon-delete'},
- {code: 'viewtempered ', name: '鏌ョ湅閽㈠寲鐗堝浘', prefixIcon: 'vxe-icon-custom-column'},
- {code: 'viewoptimize', name: '鏌ョ湅浼樺寲鐗堝浘', prefixIcon: 'vxe-icon-layout'},
+ {code: 'viewTempered', name: '鏌ョ湅閽㈠寲鐗堝浘', prefixIcon: 'vxe-icon-custom-column'},
+ {code: 'viewOptimize', name: '鏌ョ湅浼樺寲鐗堝浘', prefixIcon: 'vxe-icon-layout'},
{code: 'Export', name: '鏁版嵁瀵煎嚭', prefixIcon: 'vxe-icon-download', visible: true, disabled: false},
],
@@ -162,7 +161,6 @@
initialState: ['1', '2', '10', '20', '100'],
targetState: null,
successMsg: '宸ョ▼鍒犻櫎鎴愬姛锛�',
- failureMsg: '宸ョ▼鍒犻櫎澶辫触锛岃鑱旂郴绠$悊鍛橈紒',
checkMessage: '褰撳墠宸ョ▼鐘舵�佷笉绗﹀悎鍒犻櫎鏉′欢锛岃纭宸ョ▼鐘舵�佸悗鍐嶆搷浣滐紒',
},
{
@@ -170,8 +168,22 @@
initialState: [],
targetState: null,
successMsg: '鏂囦欢瀵煎嚭鎴愬姛锛�',
- gridRef: xGrid, // 灏唜Grid鐨勫紩鐢ㄤ紶閫掕繘鏉ワ紝鐢ㄤ簬璋冪敤exportData鏂规硶
+ gridRef: xGrid,
requiresRow: false,
+ },
+ {
+ code: 'viewTempered',
+ initialState: [],
+ targetState: null,
+ successMsg: '閽㈠寲鐗堝浘宸叉墦寮�锛�',
+ failureMsg: '宸ョ▼鍒犻櫎澶辫触锛岃鑱旂郴绠$悊鍛橈紒',
+ },
+ {
+ code: 'viewOptimize',
+ initialState: [],
+ targetState: null,
+ successMsg: '浼樺寲鐗堝浘宸叉墦寮�锛�',
+ failureMsg: '宸ョ▼鍒犻櫎澶辫触锛岃鑱旂郴绠$悊鍛橈紒',
}
];
function getOriginalState(targetState) {
@@ -202,9 +214,31 @@
if ($grid) {
const config = operationConfigs.find(c => c.code === menu.code);
if (config) {
+ if (config.requiresRow &&!row) {
+ ElMessage.warning('鏈�変腑宸ョ▼锛岃閫変腑宸ョ▼鍚庡啀杩涜褰撳墠鎿嶄綔锛�');
+ return;
+ }
if (config.code === 'Export') {
config.gridRef.value.exportData();
ElMessage.success(config.successMsg);
+ return;
+ }
+ // 娣诲姞纭鎻愮ず寮圭獥锛岃闂敤鎴锋槸鍚﹁繘琛屽綋鍓嶆搷浣�
+ ElMessageBox.confirm('鏄惁杩涜褰撳墠鎿嶄綔锛�', '纭鎿嶄綔', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ if (config.code === 'viewTempered'){
+ ElMessageBox.alert('褰撳墠鐐瑰嚮鐨勬槸鏌ョ湅閽㈠寲鐗堝浘鍔熻兘锛岀洰鍓嶆殏鏃朵粎鍋氭彁绀猴紝鏆傛棤瀹為檯鏌ョ湅鎿嶄綔!', '鍔熻兘鎻愮ず', {
+ confirmButtonText: '鎴戠煡閬撲簡'
+ });
+ return;
+ }
+ if (config.code === 'viewOptimize'){
+ ElMessageBox.alert('褰撳墠鐐瑰嚮鐨勬槸鏌ョ湅閽㈠寲鐗堝浘鍔熻兘锛岀洰鍓嶆殏鏃朵粎鍋氭彁绀猴紝鏆傛棤瀹為檯鏌ョ湅鎿嶄綔!', '鍔熻兘鎻愮ず', {
+ confirmButtonText: '鎴戠煡閬撲簡'
+ });
return;
}
if (config.code === 'delproject') {
@@ -234,6 +268,10 @@
updateProjectStateAndHandleResponse(row, row.projectNumber, config.targetState, config.successMsg);
}
}
+ }).catch(() => {
+ // 鐢ㄦ埛鐐瑰嚮鍙栨秷鍚庢墽琛岀殑閫昏緫
+ ElMessage.info('宸插彇娑堟搷浣�');
+ });
} else {
console.error(`鏈壘鍒版搷浣滈�夐」 ${menu.code} 瀵瑰簲鐨勯厤缃紝璇锋鏌ラ厤缃」`);
}
@@ -333,7 +371,7 @@
},
{
value: '100',
- label: '瀹屾垚浼樺寲',
+ label: '鍏佽鐢熶骇',
},
{
value: '200',
--
Gitblit v1.8.0