Commit a01f17f4d7d38c0fbe704828f3fb3719dfe2cae8
1 parent
451b9efd
1.处理手机端复制到没反应问题
Showing
1 changed file
with
22 additions
and
7 deletions
src/mobile/common/CommobileListEvent.js
| ... | ... | @@ -129,7 +129,7 @@ export default (ChildComponent) => { |
| 129 | 129 | return addState; |
| 130 | 130 | }; |
| 131 | 131 | |
| 132 | - handleCopyToClick = async (name) => { | |
| 132 | + handleCopyToClick = async (name, iFlag) => { | |
| 133 | 133 | const { |
| 134 | 134 | slaveConfig, dispatch, slaveFilterCondition, slavePagination, slaveOrderBy, app, slaveData, slaveSelectedRowKeys, token, sModelsId, formRoute, sModelsType, |
| 135 | 135 | } = this.props; |
| ... | ... | @@ -232,21 +232,36 @@ export default (ChildComponent) => { |
| 232 | 232 | const dataUrl = `${commonConfig.server_host}bill/billCopyToCheck/?sModelsId=${sModelsId}&sActiveId=${sActiveId}&tbSuffix=${tbSuffix}`; |
| 233 | 233 | const values = { sSlaveId: slaveSelectedRowKeys.toString() }; |
| 234 | 234 | const dataReturn = (await commonServices.postValueService(token, values, dataUrl)).data; |
| 235 | - if (dataReturn.code === 1) { | |
| 236 | - if (dataReturn.dataset.rows.length > 0) { | |
| 237 | - alert('Warn', commonFunc.showMessage(app.commonConst, 'beUsedToNew'), [ | |
| 235 | + if (dataReturn?.code === 1) { | |
| 236 | + // if (dataReturn?.dataset?.rows?.length > 0) { | |
| 237 | + // alert('Warn', commonFunc.showMessage(app.commonConst, 'beUsedToNew'), [ | |
| 238 | + // { | |
| 239 | + // text: 'Ok', | |
| 240 | + // onPress: () => { | |
| 241 | + // sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); | |
| 242 | + // }, | |
| 243 | + // }, | |
| 244 | + // { text: 'Cancel' }, | |
| 245 | + // ]); | |
| 246 | + // } else { | |
| 247 | + // sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); | |
| 248 | + // } | |
| 249 | + sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); | |
| 250 | + } else if (dataReturn?.code === -7) { | |
| 251 | + alert('是否继续', dataReturn?.msg, [ | |
| 238 | 252 | { |
| 239 | 253 | text: 'Ok', |
| 240 | 254 | onPress: () => { |
| 241 | - sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); | |
| 255 | + iFlag = 1; | |
| 256 | + this.handleCopyToClick(name,iFlag); | |
| 257 | + // sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); | |
| 242 | 258 | }, |
| 243 | 259 | }, |
| 244 | 260 | { text: 'Cancel' }, |
| 245 | 261 | ]); |
| 246 | 262 | } else { |
| 247 | - sendSocketMessage('copy', 'execute', slaveSelectedRowKeys.toString(), app.userinfo.sId, null, null); | |
| 263 | + Toast.fail(dataReturn.msg); | |
| 248 | 264 | } |
| 249 | - } | |
| 250 | 265 | } else { |
| 251 | 266 | Toast.fail(commonFunc.showMessage(app.commonConst, 'pleaseChooseData')); // 请选择数据 |
| 252 | 267 | } | ... | ... |