Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
8f1a428f
Commit
8f1a428f
authored
Apr 04, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改时间问题
parent
b747ee46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+13
-12
No files found.
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
8f1a428f
...
@@ -492,7 +492,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -492,7 +492,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
useEffect(() => {
useEffect(() => {
if (customer.isEdit || customer.isUseCache) {
if (customer.isEdit || customer.isUseCache) {
if (!editData) return;
if (!editData) return;
let { label, firstCategoryId, secondCategoryId, thirdCategoryId, id } = editData;
let { label, firstCategoryId, secondCategoryId, thirdCategoryId, id
,saleTimes
} = editData;
editData.label = label && label.split(',')?.map(item => +item);
editData.label = label && label.split(',')?.map(item => +item);
let specList = editData?.specList;
let specList = editData?.specList;
let weight = specList?.filter(item => item.specGroupName === '份量');
let weight = specList?.filter(item => item.specGroupName === '份量');
...
@@ -508,6 +508,11 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -508,6 +508,11 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
});
});
}
}
});
});
editData.saleTimes = saleTimes.length
? saleTimes.map(item => {
return [moment(item?.startTime, format), moment(item?.endTime, format)];
})
: [];
if (editData?.skuList?.length) {
if (editData?.skuList?.length) {
// editData.minPurchaseNum = editData?.skuList[0]?.serviceItem.minPurchaseNum;
// editData.minPurchaseNum = editData?.skuList[0]?.serviceItem.minPurchaseNum;
// 单规格
// 单规格
...
@@ -528,11 +533,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -528,11 +533,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
// editData.saleTimeType = saleTimeType;
// editData.saleTimeType = saleTimeType;
// editData.saleDates = saleDates;
// editData.saleDates = saleDates;
editData.autoStock = +autoStock === 1 ? true : false;
editData.autoStock = +autoStock === 1 ? true : false;
editData.saleTimes = saleTimes.length
? saleTimes.map(item => {
return [moment(item?.startTime, format), moment(item?.endTime, format)];
})
: [];
editData.productRefShopId = editData.shopId;
editData.productRefShopId = editData.shopId;
editData.skuId = id;
editData.skuId = id;
form.setFieldsValue(editData);
form.setFieldsValue(editData);
...
@@ -563,11 +564,11 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -563,11 +564,11 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId];
editData.categoryId = [firstCategoryId, secondCategoryId, thirdCategoryId];
// editData.saleTimeType = saleTimeType;
// editData.saleTimeType = saleTimeType;
// editData.saleDates = saleDates;
// editData.saleDates = saleDates;
editData.saleTimes = saleTimes.length
//
editData.saleTimes = saleTimes.length
? saleTimes.map(item => {
//
? saleTimes.map(item => {
return [moment(item?.startTime, format), moment(item?.endTime, format)];
//
return [moment(item?.startTime, format), moment(item?.endTime, format)];
})
//
})
: [];
//
: [];
editData.productRefShopId = editData.shopId;
editData.productRefShopId = editData.shopId;
// setTempWeight(weight)
// setTempWeight(weight)
// setTempSpecs(specs)
// setTempSpecs(specs)
...
@@ -1206,7 +1207,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -1206,7 +1207,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
showAddRepertoryModal('multi', `
$
{
item
.
unique
}
`, item); // 多个库存
showAddRepertoryModal('multi', `
$
{
item
.
unique
}
`, item); // 多个库存
}}
}}
>
>
设置库存
去设置
</div>
</div>
</div>
</div>
</Form.Item>
</Form.Item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment