fix: 产品管理: 编辑: 保存后绑定项目未显示; 删除绑定项目1;

main
Lei OT 10 months ago
parent fe58f01f22
commit 0bb1f24977

@ -132,7 +132,7 @@ const Extras = ({ productId, onChange, ...props }) => {
} }
const handleDelAddon = async (item) => { const handleDelAddon = async (item) => {
const delSuccess = await delProductExtrasAction({ travel_agency_id, id: productId, extras: [item.id] }); const delSuccess = await delProductExtrasAction({ travel_agency_id, id: productId, del_extras_ids: [item.id] });
delSuccess ? message.success(`${t('Success')}`) : message.error(`${t('Failed')}`); delSuccess ? message.success(`${t('Success')}`) : message.error(`${t('Failed')}`);
await handleGetAgencyProductExtras(); await handleGetAgencyProductExtras();
}; };
@ -150,7 +150,7 @@ const Extras = ({ productId, onChange, ...props }) => {
dataIndex: 'operation', dataIndex: 'operation',
width: '4rem', width: '4rem',
render: (_, r) => ( render: (_, r) => (
<Popconfirm title={t('sureDelete')} onConfirm={(e) => handleDelAddon(r)} okText={t('Yes')} > <Popconfirm title={t('sureDelete')} onConfirm={(e) => handleDelAddon(r.info)} okText={t('Yes')} >
<Button size='small' type='link' danger> <Button size='small' type='link' danger>
{t('Delete')} {t('Delete')}
</Button> </Button>

@ -89,6 +89,7 @@ const ProductInfo = ({ ...props }) => {
success ? message.success(t('Success')) : message.error(t('Failed')); success ? message.success(t('Success')) : message.error(t('Failed'));
// //
// result.quotation = isEmpty(result.quotation) ? editingProduct.quotation : result.quotation; // result.quotation = isEmpty(result.quotation) ? editingProduct.quotation : result.quotation;
result.info.htid = editingProduct?.info?.htid;
appendNewProduct(result); appendNewProduct(result);
setEditingProduct(result); setEditingProduct(result);
}; };

Loading…
Cancel
Save