From aae48e22108b75c7dc3325bd7934fa671c401aef Mon Sep 17 00:00:00 2001 From: zhangds Date: Mon, 13 May 2024 15:07:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=BC=96=E8=BE=91=E5=A4=9A=E4=B8=BB=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/knockGold/index.jsx | 1 + src/components/knockGold/voucherBatch.jsx | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/knockGold/index.jsx b/src/components/knockGold/index.jsx index cb65b41d..3929ee0e 100644 --- a/src/components/knockGold/index.jsx +++ b/src/components/knockGold/index.jsx @@ -954,6 +954,7 @@ export default class addKnockGold extends Component { {this.state.subjectList.length > 0 && ( { - const { channel, voucherBatchData, subjectList } = props + const { channel, voucherBatchData, subjectList, isEdit } = props const onPriceChange = useCallback( (rowIndex, key, valueType) => (val) => { setDatasets((prev) => { @@ -28,13 +28,16 @@ const VoucherBatch = forwardRef((props, ref) => { if (voucherBatchData) { let new_data = voucherBatchData.map((item) => { let provider_el = subjectList.find((row) => row.key === item.provider) - return { - id: item.id, + let obj = { provider: provider_el ? provider_el : subjectList[0], channel_activity_id: item.channel_activity_id, temp_no: item.temp_no, weight: item.weight } + if (isEdit) { + obj.id = item.id + } + return obj }) return new_data } else {