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 {