Commit bcd57370 authored by 陈万宝's avatar 陈万宝

feat: 修改从草稿箱创建sku 自动删除草稿

parent 46c07611
...@@ -271,6 +271,9 @@ const ServiceGoods = options => { ...@@ -271,6 +271,9 @@ const ServiceGoods = options => {
return origin; return origin;
}, {}); }, {});
const sendData = filterSendData(productType, params); const sendData = filterSendData(productType, params);
if (options.isDraft) {
sendData.productDraftId = SourceData.id;
}
if (productType === 5) { if (productType === 5) {
if (+sendData?.repertoryType === 2 && sendData?.items?.length < 2) { if (+sendData?.repertoryType === 2 && sendData?.items?.length < 2) {
message.error('最少生成2个sku'); message.error('最少生成2个sku');
...@@ -282,9 +285,9 @@ const ServiceGoods = options => { ...@@ -282,9 +285,9 @@ const ServiceGoods = options => {
if (isEdit) { if (isEdit) {
sendData.id = pageId; sendData.id = pageId;
} }
if (options.isDraft) { // if (options.isDraft) {
sendData.productDraftId = SourceData.id; // sendData.productDraftId = SourceData.id;
} // }
console.log('sendData :>> ', sendData); console.log('sendData :>> ', sendData);
sendMerchantProductHttpRequest(sendData); sendMerchantProductHttpRequest(sendData);
} }
......
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