Commit a76cfe91 authored by Bill's avatar Bill

fix: 修复加工取消反选时继续请求接口错误

parent d87a9ce6
......@@ -283,19 +283,22 @@ const Create = () => {
}, [])
const handleBeforeProductChecked = useCallback(async (record: GetProductCommodityCommonGetCommodityListByBuyerResponseDetail, selected: boolean, list: GetProductCommodityCommonGetCommodityListByBuyerResponseDetail[]) => {
const postData = list.map((item) => {
return {
/** * 这里指的是skuid, 而接口getProductCommodityCommonGetCommodityListByBuyer 的主键id 就是skuid, 不是(commodityId)*/
productId: item.id,
memberId: item.memberId || authInfo.memberId,
memberRoleId: item.memberRoleId || authInfo.memberRoleId,
shopId: ENTERPRISE_MALL[authInfo.memberType],
/** 1.订单交易流程2.售后换货流程3.售后退货流程4.售后维修流程, @todo 5是后端说的,具体不知道代表什么意思? */
type: 5,
}
})
const { flag } = await checkProcessEnum(postData);
return flag;
if (selected) {
const postData = list.map((item) => {
return {
/** * 这里指的是skuid, 而接口getProductCommodityCommonGetCommodityListByBuyer 的主键id 就是skuid, 不是(commodityId)*/
productId: item.id,
memberId: item.memberId || authInfo.memberId,
memberRoleId: item.memberRoleId || authInfo.memberRoleId,
shopId: ENTERPRISE_MALL[authInfo.memberType],
/** 1.订单交易流程2.售后换货流程3.售后退货流程4.售后维修流程, @todo 5是后端说的,具体不知道代表什么意思? */
type: 5,
}
})
const { flag } = await checkProcessEnum(postData);
return flag;
}
return true
}, [])
/** @review 总感觉这个接口有大问题,能力中心没办法拿到shopId,不知道这个shopId 的意义在哪里 */
......@@ -982,7 +985,7 @@ const Create = () => {
}}
components={{Cascader}}
effects={($, actions) => {
useStateFilterSearchLinkageEffect($, actions, 'name', FORM_FILTER_PATH);
useStateFilterSearchLinkageEffect($, actions, 'orderNo', FORM_FILTER_PATH);
}}
mode={"checkbox"}
beforeChecked={handleBeforeOrderChecked}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment