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
08408684
Commit
08408684
authored
Apr 06, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新重复约字段
parent
db4ed06f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
package-lock.json
package-lock.json
+1
-1
utils.js
src/pages/ServiceGoods/utils.js
+16
-14
No files found.
package-lock.json
View file @
08408684
...
@@ -20971,7 +20971,7 @@
...
@@ -20971,7 +20971,7 @@
},
},
"pubsub-js": {
"pubsub-js": {
"version": "1.9.4",
"version": "1.9.4",
"resolved": "http
://npmprivate.quantgroups.com
/pubsub-js/-/pubsub-js-1.9.4.tgz",
"resolved": "http
s://registry.npmjs.org
/pubsub-js/-/pubsub-js-1.9.4.tgz",
"integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A=="
"integrity": "sha512-hJYpaDvPH4w8ZX/0Fdf9ma1AwRgU353GfbaVfPjfJQf1KxZ2iHaHl3fAUw1qlJIR5dr4F3RzjGaWohYUEyoh7A=="
},
},
"pump": {
"pump": {
src/pages/ServiceGoods/utils.js
View file @
08408684
...
@@ -114,16 +114,18 @@ export const filterSendData = (type, params) => {
...
@@ -114,16 +114,18 @@ export const filterSendData = (type, params) => {
// 外卖商品
// 外卖商品
if
(
type
===
5
)
{
if
(
type
===
5
)
{
const
temp
=
Object
.
assign
({},
takeawayItem
?.
intactData
,
infoMation
);
const
temp
=
Object
.
assign
({},
takeawayItem
?.
intactData
,
infoMation
);
temp
.
categoryId
=
const
deepTemp
=
JSON
.
parse
(
JSON
.
stringify
(
temp
))
Array
.
isArray
(
temp
.
categoryId
)
&&
temp
.
categoryId
?.
slice
(
temp
.
categoryId
?.
length
-
1
)?.
toString
();
deepTemp
.
categoryId
=
temp
.
productRefShopId
=
temp
.
productRefShopId
.
toString
();
Array
.
isArray
(
deepTemp
.
categoryId
)
&&
deepTemp
.
categoryId
?.
slice
(
deepTemp
.
categoryId
?.
length
-
1
)?.
toString
();
deepTemp
.
productRefShopId
=
deepTemp
.
productRefShopId
.
toString
();
const
tempWeightName
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
weightUnits
'
));
const
tempWeightName
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
weightUnits
'
));
t
emp
.
items
.
forEach
(
item
=>
{
deepT
emp
.
items
.
forEach
(
item
=>
{
item
.
autoStock
=
item
.
autoStock
?
1
:
0
;
item
.
autoStock
=
item
.
autoStock
?
1
:
0
;
item
.
serviceItem
.
autoStock
=
item
?.
serviceItem
?.
autoStock
?
1
:
0
;
item
.
serviceItem
.
autoStock
=
item
?.
serviceItem
?.
autoStock
?
1
:
0
;
item
.
productStock
=
item
?.
serviceItem
?.
productStock
;
item
.
productStock
=
item
?.
serviceItem
?.
productStock
;
item
.
list
=
t
emp
.
list
;
item
.
list
=
deepT
emp
.
list
;
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
))
{
...
@@ -133,8 +135,8 @@ export const filterSendData = (type, params) => {
...
@@ -133,8 +135,8 @@ export const filterSendData = (type, params) => {
});
});
}
}
});
});
t
emp.specList &&
deepT
emp.specList &&
t
emp.specList.forEach(item => {
deepT
emp.specList.forEach(item => {
if (item?.specs?.length) {
if (item?.specs?.length) {
item?.specs.forEach(itm => {
item?.specs.forEach(itm => {
itm.unit =
itm.unit =
...
@@ -149,7 +151,7 @@ export const filterSendData = (type, params) => {
...
@@ -149,7 +151,7 @@ export const filterSendData = (type, params) => {
});
});
}
}
});
});
return
t
emp;
return
deepT
emp;
}
}
const items = filterItems(type, params);
const items = filterItems(type, params);
const commonImageList = type === 4 ? [] : infoImageData.commonImageList;
const commonImageList = type === 4 ? [] : infoImageData.commonImageList;
...
@@ -327,12 +329,12 @@ export const calcDescartes = array => {
...
@@ -327,12 +329,12 @@ export const calcDescartes = array => {
console.log(array, 'array');
console.log(array, 'array');
if (array.length < 2) return array[0] || [];
if (array.length < 2) return array[0] || [];
return [].reduce.call(array,
function(col, set)
{
return [].reduce.call(array,
(col, set) =>
{
var
res = [];
const
res = [];
col.forEach(
function(c)
{
col.forEach(
c =>
{
set.forEach(
function(s)
{
set.forEach(
s =>
{
var
t = [].concat(Array.isArray(c) ? c : [c]);
const
t = [].concat(Array.isArray(c) ? c : [c]);
t.push(s);
t.push(s);
res.push(t);
res.push(t);
});
});
...
...
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