From a01f17f4d7d38c0fbe704828f3fb3719dfe2cae8 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Thu, 11 Jun 2026 16:11:50 +0800 Subject: [PATCH] 1.处理手机端复制到没反应问题 --- src/mobile/common/CommobileListEvent.js | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/mobile/common/CommobileListEvent.js b/src/mobile/common/CommobileListEvent.js index 84ad7a5..1844aec 100644 --- a/src/mobile/common/CommobileListEvent.js +++ b/src/mobile/common/CommobileListEvent.js @@ -129,7 +129,7 @@ export default (ChildComponent) => { return addState; }; - handleCopyToClick = async (name) => { + handleCopyToClick = async (name, iFlag) => { const { slaveConfig, dispatch, slaveFilterCondition, slavePagination, slaveOrderBy, app, slaveData, slaveSelectedRowKeys, token, sModelsId, formRoute, sModelsType, } = this.props; @@ -232,21 +232,36 @@ export default (ChildComponent) => { const dataUrl = `${commonConfig.server_host}bill/billCopyToCheck/?sModelsId=${sModelsId}&sActiveId=${sActiveId}&tbSuffix=${tbSuffix}`; const values = { sSlaveId: slaveSelectedRowKeys.toString() }; const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data; - if (dataReturn.code === 1) { - if (dataReturn.dataset.rows.length > 0) { - alert('Warn', commonFunc.showMessage(app.commonConst, 'beUsedToNew'), [ + if (dataReturn?.code === 1) { + // if (dataReturn?.dataset?.rows?.length > 0) { + // alert('Warn', commonFunc.showMessage(app.commonConst, 'beUsedToNew'), [ + // { + // text: 'Ok', + // onPress: () => { + // sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); + // }, + // }, + // { text: 'Cancel' }, + // ]); + // } else { + // sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); + // } + sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); + } else if (dataReturn?.code === -7) { + alert('是否继续', dataReturn?.msg, [ { text: 'Ok', onPress: () => { - sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); + iFlag = 1; + this.handleCopyToClick(name,iFlag); + // sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); }, }, { text: 'Cancel' }, ]); } else { - sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); + Toast.fail(dataReturn.msg); } - } } else { Toast.fail(commonFunc.showMessage(app.commonConst, 'pleaseChooseData')); // 请选择数据 } -- libgit2 0.22.2