From c2839ca281a846fb1f3d270cc75725f83b6e3636 Mon Sep 17 00:00:00 2001 From: chenxt <10125295+chen-xintao97@user.noreply.gitee.com> Date: Thu, 26 Mar 2026 13:55:17 +0800 Subject: [PATCH] 质量完工 --- src/components/Common/CommonHooks/useCommonBase.js | 7 +++++-- src/components/Common/CommonTable/index.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/components/Common/CommonHooks/useCommonBase.js b/src/components/Common/CommonHooks/useCommonBase.js index 434a999..266ecc4 100644 --- a/src/components/Common/CommonHooks/useCommonBase.js +++ b/src/components/Common/CommonHooks/useCommonBase.js @@ -2771,17 +2771,20 @@ const useCommonBase = props => { tableData, config = {}, onSuccess, - nextProps + nextProps, + inscallback } = params; const { sControlName = "", sInstruct } = config; const sControlLowerName = sControlName.toLowerCase(); // 调用指令集 + console.log(sInstruct, 'sInstruct'); if (sInstruct) { handleExecInstructSet({ ...props, btnConfig: config, tableLineParams: params, - nextProps + nextProps, + inscallback }); return; } diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js index 81f3e59..8c967ce 100644 --- a/src/components/Common/CommonTable/index.js +++ b/src/components/Common/CommonTable/index.js @@ -34,6 +34,7 @@ import { } from "@ant-design/icons"; import { Icon as LegacyIcon } from "@ant-design/compatible"; import "@ant-design/compatible/assets/index.css"; +import * as commonServices from "@/services/services"; import lodash, { cloneDeep } from "lodash"; import { Table, @@ -4855,6 +4856,7 @@ class CommonTableRc extends React.Component { }} loading={bLoading} onClick={e => { + console.log("🚀 ~ CommonTableRc ~ e:", e) e.stopPropagation(); /* 阻止父级穿透 */ const onTempTableBtnClick = nextProps => { props.onTableBtnClick && @@ -4864,7 +4866,7 @@ class CommonTableRc extends React.Component { config, name: props.name, tableData: props.data, - nextProps + nextProps, }); }; @@ -4876,7 +4878,52 @@ class CommonTableRc extends React.Component { return } if (selectedRowKeys.includes(rowKeyId)) { - onTempTableBtnClick(); + if (sControlName.includes('_qlyqualityinspec')) { + const { app } = props; + const { token, currentMesPane } = app; + const { sModelsId } = currentMesPane || {}; + props.onTableBtnClick && + props.onTableBtnClick({ + record, + index, + config, + name: props.name, + tableData: props.data, + inscallback: async nextProps => { + const value = { + sBtnName: sControlName, + sProName: "Sp_mes_qualityinspect_complete", + sProInParam: JSON.stringify({ + changeValue: {}, + sButtonParam: { + sproName: "Sp_mes_qualityinspect_complete", + inMap: "qualityinspect.sId" + }, + params: [ + { + key: "qualityinspect", + value: [ + { + sId: record.sId, + } + ] + } + ] + }) + }; + const url = `${commonConfig.server_host + }procedureCall/doGenericProcedureCall?sModelsId=${sModelsId}`; + const returnData = (await commonServices.postValueService( + token, + value, + url + )).data; + } + }); + } else { + onTempTableBtnClick(); + + } } else { props.onSaveState( { -- libgit2 0.22.2