Commit 955cdc3a authored by baxibaba's avatar baxibaba

feat:更新时间回显问题

parent 201d9923
...@@ -481,7 +481,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -481,7 +481,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
let { let {
productStock, productStock,
specs, specs,
serviceItem: { maxStock }, serviceItem: { maxStock, saleTimeType, saleDates, saleTimes },
} = editData?.skuList[0]; } = editData?.skuList[0];
let { quantity, unit, salePrice } = specs[0]; let { quantity, unit, salePrice } = specs[0];
editData.productStock = productStock; editData.productStock = productStock;
...@@ -490,6 +490,15 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => { ...@@ -490,6 +490,15 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
editData.salePrice = salePrice; editData.salePrice = salePrice;
editData.maxStock = maxStock; editData.maxStock = maxStock;
editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId]; editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId];
editData.saleTimeType = saleTimeType;
editData.saleDates = [1, 2, 4];
editData.saleTimes = saleTimes.length
? saleTimes.map(item => {
item = [moment(item?.startTime, format), moment(item?.endTime, format)];
return item;
})
: [];
setTimeType(saleTimeType);
} }
form.setFieldsValue(editData); form.setFieldsValue(editData);
onCardSuccessImageList(editData?.detailImageList); onCardSuccessImageList(editData?.detailImageList);
......
...@@ -207,7 +207,6 @@ const ServiceGoods = options => { ...@@ -207,7 +207,6 @@ const ServiceGoods = options => {
setPageLoading(true); setPageLoading(true);
const sendAsyncHttpRequest = isEdit ? merchantProductEdit : merchantProductAdd; const sendAsyncHttpRequest = isEdit ? merchantProductEdit : merchantProductAdd;
const addResponse = await sendAsyncHttpRequest(sendData); const addResponse = await sendAsyncHttpRequest(sendData);
debugger;
if (addResponse.data) { if (addResponse.data) {
message.success(`${isEdit ? '修改' : '添加'}成功!`); message.success(`${isEdit ? '修改' : '添加'}成功!`);
localStorage.remove(localAutoSaveKey); localStorage.remove(localAutoSaveKey);
......
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