Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
hooloo
web
soss
Commits
efa01e1a
Commit
efa01e1a
authored
Aug 22, 2022
by
赵永成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec
parent
5f6766b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
src/views/goods/goods/components/SpecSetting.vue
+20
-6
src/views/goods/goods/components/Specification.vue
+1
-1
No files found.
src/views/goods/goods/components/SpecSetting.vue
View file @
efa01e1a
...
...
@@ -56,7 +56,8 @@ export default {
steps
:[],
queryParams
:{},
mach_model_list
:[],
skuList
:[]
skuList
:[],
psku
:
null
,
}
},
mounted
:
function
(){
...
...
@@ -64,8 +65,10 @@ export default {
},
methods
:
{
/**提前将商品信息传入 */
setSpecGoods
(
p_goods
){
setSpecGoods
(
p_goods
,
p_sku
){
this
.
goods
=
p_goods
;
this
.
psku
=
p_sku
;
console
.
log
(
"setSpecGoods"
,
p_sku
);
},
findSpecNameById
(
p_specId
){
let
specList
=
JSON
.
parse
(
this
.
goods
.
spec
);
...
...
@@ -93,7 +96,10 @@ export default {
console
.
log
(
"getSkuByGoodsId response 123"
,
res
);
let
t_skuList
=
[];
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
){
let
sku
=
res
.
data
[
i
];
let
sku
=
res
.
data
[
i
];
//只显示当前sku的数据进行配置,不一致的先跳过;
if
(
this
.
psku
.
sku_id
!=
sku
.
id
)
continue
;
let
skuObj_ary
=
[];
let
ruleList
=
JSON
.
parse
(
sku
.
ruleList
);
for
(
let
j
=
0
;
j
<
ruleList
.
length
;
j
++
){
...
...
@@ -162,7 +168,7 @@ export default {
* 先调试完成,再试试异步加载数据是否可行 / 或者如果数据都一样是不是用一份即可!!!
*/
//这个判断是先用一份数据
if
(
this
.
steps
.
length
==
0
){
//
if(this.steps.length==0){
await
this
.
getStepListByMidAndSkuId
(
queryParams
).
then
((
res
)
=>
{
console
.
log
(
"res"
,
res
);
let
step_opts
=
[];
...
...
@@ -188,9 +194,17 @@ export default {
console
.
log
(
"step_opts"
,
step_opts
);
this
.
steps
=
step_opts
;
});
}
else
{
}
// list_step(queryParams).then((res) => {
// }).catch((res) => {
// });
// }else{
// }
//还是要每个个对象里面加上可选步骤,以后即时改动,也不用调整页面模板,只需要调整js脚本
spec_sku_item
.
step_opts
=
this
.
steps
;
}
...
...
src/views/goods/goods/components/Specification.vue
View file @
efa01e1a
...
...
@@ -167,7 +167,7 @@ export default {
},
specal_set
(
skuRow
){
this
.
$refs
.
SpecSetting
.
setSpecGoods
(
this
.
goods
);
this
.
$refs
.
SpecSetting
.
setSpecGoods
(
this
.
goods
,
skuRow
);
this
.
$refs
[
'SpecSetting'
].
showSpecial
(
true
,
this
.
goods
);
},
/**删除sku*/
...
...
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