From 236d023721b83472bd36c1122fc99d56ab8b3bef Mon Sep 17 00:00:00 2001
From: chenxt <10125295+chen-xintao97@user.noreply.gitee.com>
Date: Tue, 27 Jan 2026 17:08:27 +0800
Subject: [PATCH] 表格保存
---
src/components/Common/CommonTable/index.js | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------
src/mes/teamInfo/index.js | 11 ++++++-----
2 files changed, 107 insertions(+), 42 deletions(-)
diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js
index 36c776c..6330382 100644
--- a/src/components/Common/CommonTable/index.js
+++ b/src/components/Common/CommonTable/index.js
@@ -4860,7 +4860,7 @@ class CommonTableRc extends React.Component {
const { [this.rowKey]: rowKeyId } = record;
const { selectedRowKeys = [] } = props;
if (sControlName?.includes('BtnTableCopyTo.tmpInfoBySqlActProduceReport')) {
- const copyToConfig = props?.config?.gdsconfigformslave.filter(x=>x.sControlName.includes('BtnTableCopyTo.tmpInfoBySqlActProduceReport'))
+ const copyToConfig = props?.config?.gdsconfigformslave.filter(x => x.sControlName.includes('BtnTableCopyTo.tmpInfoBySqlActProduceReport'))
props.onCopyTo(props.name, config.sActiveId, config, copyToConfig, record)
return
}
@@ -12282,29 +12282,68 @@ const useGetTableBtnOprSetting = props => {
);
};
} else if (btnType.includes("del")) {
- resultTemp.mesDel = params => {
- const { record } = params;
- const { sDefault: str } = btnTableDelConfig;
- let disabled = props.getBtnDisabled({
- str,
- defaultValue: false,
- record
- });
- if (props.parentProps.bMesBill && !str) {
- disabled = !props.enabled;
- }
- return (
- }
- onClick={e => {
- e.stopPropagation();
- props.onMesTableLineDel && props.onMesTableLineDel(params);
- }}
- />
- );
- };
+ if (btnType.includes("enventdel")) {
+ resultTemp.mesDel = params => {
+ const { record } = params;
+ const { sDefault: str } = btnTableDelConfig;
+ let disabled = props.getBtnDisabled({
+ str,
+ defaultValue: false,
+ record
+ });
+ if (props.parentProps.bMesBill && !str) {
+ disabled = !props.enabled;
+ }
+ return (
+ }
+ onClick={e => {
+ e.stopPropagation();
+ // props.onMesTableLineDel && props.onMesTableLineDel(params);
+ const btnsConfig =
+ gdsconfigformslave.find(
+ item => item.sControlName?.toLowerCase().includes("btnenventdel")
+ ) || {};
+ props.parentProps.onExecInstructSet({
+ btnConfig: {
+ ...btnsConfig,
+ sInstruct: btnsConfig.sButtonParam
+ },
+ nextProps: {
+ ...props
+ }
+ });
+ }}
+ />
+ );
+ };
+ } else {
+ resultTemp.mesDel = params => {
+ const { record } = params;
+ const { sDefault: str } = btnTableDelConfig;
+ let disabled = props.getBtnDisabled({
+ str,
+ defaultValue: false,
+ record
+ });
+ if (props.parentProps.bMesBill && !str) {
+ disabled = !props.enabled;
+ }
+ return (
+ }
+ onClick={e => {
+ e.stopPropagation();
+ props.onMesTableLineDel && props.onMesTableLineDel(params);
+ }}
+ />
+ );
+ };
+ }
} else if (btnType.includes("copy")) {
resultTemp.mesCopy = params => {
let disabled = false;
@@ -12326,22 +12365,47 @@ const useGetTableBtnOprSetting = props => {
/>
}
;
- } else if (btnType.includes("slave")) {
- resultTemp.mesSave = () => (
- }
- onClick={e => {
- e.stopPropagation();
- props.onMesTableLineSave && props.onMesTableLineSave();
- }}
- />
- );
+ } else if (btnType.includes("save")) {
+ if (btnType.includes("enventsave")) {
+ resultTemp.mesSave = () => (
+ }
+ onClick={e => {
+ e.stopPropagation();
+ const btnsConfig =
+ gdsconfigformslave.find(
+ item => item.sControlName?.toLowerCase().includes("btnenventsave")
+ ) || {};
+
+ props.parentProps.onExecInstructSet({
+ btnConfig: {
+ ...btnsConfig,
+ sInstruct: btnsConfig.sButtonParam
+ },
+ nextProps: {
+ ...props
+ }
+ });
+ }}
+ />
+ );
+ } else {
+ resultTemp.mesSave = () => (
+ }
+ onClick={e => {
+ e.stopPropagation();
+ props.onMesTableLineSave && props.onMesTableLineSave();
+ }}
+ />
+ );
+ }
+
} else if (btnType.includes("materials")) {
resultTemp.mesMaterials = (text, record, index) => {
let { rowTag } = record || {};
- console.log(rowTag, 'rowTag');
-
return (
*/}
@@ -604,7 +605,7 @@ const TeamInfo = baseProps => {
- {
@@ -613,7 +614,7 @@ const TeamInfo = baseProps => {
>
{'保存'}
-
+ */}
--
libgit2 0.22.2