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
3c90436f
Commit
3c90436f
authored
Apr 03, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改编辑引导
parent
b78fbcf3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+9
-9
No files found.
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
3c90436f
...
@@ -486,14 +486,14 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -486,14 +486,14 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
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 } = editData;
editData.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 === '份量');
let specs = specList.filter(item => item.specGroupName !== '份量');
let specs = specList
?
.filter(item => item.specGroupName !== '份量');
const tempWeightName = JSON.parse(sessionStorage.getItem('weightUnits'));
const tempWeightName = JSON.parse(sessionStorage.getItem('weightUnits'));
weight.forEach(item => {
weight
?
.forEach(item => {
if (item?.specs?.length) {
if (item?.specs?.length) {
item
.specs
.forEach(itm => {
item
?.specs?
.forEach(itm => {
if (tempWeightName.includes(itm.unit)) {
if (tempWeightName.includes(itm.unit)) {
itm.quantity =
itm.quantity =
itm?.quantity.indexOf('约') > -1 ? itm?.quantity.slice(1) : itm?.quantity || '';
itm?.quantity.indexOf('约') > -1 ? itm?.quantity.slice(1) : itm?.quantity || '';
...
@@ -501,7 +501,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -501,7 +501,7 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
});
});
}
}
});
});
if (editData?.skuList.length) {
if (editData?.skuList
?
.length) {
editData.minPurchaseNum = editData?.skuList[0]?.serviceItem.minPurchaseNum;
editData.minPurchaseNum = editData?.skuList[0]?.serviceItem.minPurchaseNum;
// 单规格
// 单规格
if (specs.length === 0 && !editData?.specList[0]?.specs[0]?.activityPrice) {
if (specs.length === 0 && !editData?.specList[0]?.specs[0]?.activityPrice) {
...
@@ -540,12 +540,12 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
...
@@ -540,12 +540,12 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
let specList = editData?.specList;
let specList = editData?.specList;
let weight = specList.filter(item => item.specGroupName === '份量');
let weight = specList.filter(item => item.specGroupName === '份量');
const tempWeightName = JSON.parse(sessionStorage.getItem('weightUnits'));
const tempWeightName = JSON.parse(sessionStorage.getItem('weightUnits'));
weight.forEach(item => {
weight
?
.forEach(item => {
if (item?.specs?.length) {
if (item?.specs?.length) {
item.specs.forEach(itm => {
item.specs
?
.forEach(itm => {
if (tempWeightName.includes(itm.unit)) {
if (tempWeightName.includes(itm.unit)) {
itm.quantity =
itm.quantity =
itm?.quantity.indexOf('约') > -1 ? itm?.quantity.slice(1) : itm?.quantity || '';
itm?.quantity
?
.indexOf('约') > -1 ? itm?.quantity.slice(1) : itm?.quantity || '';
}
}
});
});
}
}
...
...
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