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
dd4ceb1b
Commit
dd4ceb1b
authored
Apr 04, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交信息
parent
293c3965
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
.eslintrc.js
.eslintrc.js
+1
-0
index.jsx
src/pages/ServiceGoods/index.jsx
+9
-10
utils.js
src/pages/ServiceGoods/utils.js
+13
-13
No files found.
.eslintrc.js
View file @
dd4ceb1b
...
@@ -15,5 +15,6 @@ module.exports = {
...
@@ -15,5 +15,6 @@ module.exports = {
'
import/no-unresolved
'
:
0
,
'
import/no-unresolved
'
:
0
,
'
import/extensions
'
:
0
,
'
import/extensions
'
:
0
,
'
no-unused-expressions
'
:
[
'
error
'
,
{
allowShortCircuit
:
true
}],
'
no-unused-expressions
'
:
[
'
error
'
,
{
allowShortCircuit
:
true
}],
'
template-curly-spacing
'
:
'
off
'
,
},
},
};
};
src/pages/ServiceGoods/index.jsx
View file @
dd4ceb1b
...
@@ -87,21 +87,20 @@ const ServiceGoods = options => {
...
@@ -87,21 +87,20 @@ const ServiceGoods = options => {
const
resetForm
=
()
=>
clearCurrent
(
checkFormList
).
forEach
(({
current
})
=>
current
.
reset
());
const
resetForm
=
()
=>
clearCurrent
(
checkFormList
).
forEach
(({
current
})
=>
current
.
reset
());
const
onValuesChange
=
e
=>
{
const
onValuesChange
=
e
=>
{
if
(
!
isEdit
&&
productType
!==
5
)
{
if
(
!
isEdit
)
{
const
typeObj
=
{
type
:
productType
,
};
if
(
visibleCacheEdit
)
{
if
(
visibleCacheEdit
)
{
setVisibleCacheEdit
(
false
);
setVisibleCacheEdit
(
false
);
localStorage
.
remove
(
localAutoSaveKey
);
localStorage
.
remove
(
localAutoSaveKey
);
onAutoSaveValue
(
onAutoSaveValue
(
typeObj
,
!
0
);
{
type
:
productType
,
},
!
0
,
);
}
}
onAutoSaveValue
(
e
);
onAutoSaveValue
(
Object
.
assign
(
typeObj
,
e
)
);
}
}
if
(
productType
===
5
)
{
if
(
productType
===
5
)
{
setTakeawayInfoMation
(
e
);
setTakeawayInfoMation
(
e
);
// console.log('takeawayInfoMation', takeawayInfoMation);
}
}
};
};
...
@@ -253,8 +252,8 @@ const ServiceGoods = options => {
...
@@ -253,8 +252,8 @@ const ServiceGoods = options => {
if
(
productType
===
5
)
{
if
(
productType
===
5
)
{
console
.
log
(
sendData
,
'
sendData
'
);
console
.
log
(
sendData
,
'
sendData
'
);
if
(
+
sendData
?.
repertoryType
===
2
&&
sendData
?.
items
?.
length
<
2
)
{
if
(
+
sendData
?.
repertoryType
===
2
&&
sendData
?.
items
?.
length
<
2
)
{
message
.
error
(
'
最少生成2个sku
'
)
message
.
error
(
'
最少生成2个sku
'
)
;
return
return
;
}
}
sendMerchantProductHttpRequest
(
sendData
);
sendMerchantProductHttpRequest
(
sendData
);
return
;
return
;
...
...
src/pages/ServiceGoods/utils.js
View file @
dd4ceb1b
...
@@ -319,25 +319,25 @@ export const onAutoSaveValue = (e, isClear) => {
...
@@ -319,25 +319,25 @@ export const onAutoSaveValue = (e, isClear) => {
localStorage.set(localAutoSaveKey, Object.assign({}, e));
localStorage.set(localAutoSaveKey, Object.assign({}, e));
} else {
} else {
const info = localStorage.get(localAutoSaveKey) || {};
const info = localStorage.get(localAutoSaveKey) || {};
localStorage.set(localAutoSaveKey, Object.assign({
type:e.type
}, info, e));
localStorage.set(localAutoSaveKey, Object.assign({}, info, e));
}
}
};
};
export const
calcDescartes = (array)
=> {
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, function(col, set) {
var res = [];
var res = [];
col.forEach(function
(c) {
col.forEach(function
(c) {
set.forEach(function
(s) {
set.forEach(function
(s) {
var t = [].concat(Array.isArray(c) ? c : [c]);
var t = [].concat(Array.isArray(c) ? c : [c]);
t.push(s);
t.push(s);
res.push(t);
res.push(t);
})
});
});
});
return res;
return res;
});
});
}
};
\ No newline at end of file
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