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
83e237f5
Commit
83e237f5
authored
Aug 04, 2022
by
赵永成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shang chuantupian
parent
943c094b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
4 deletions
+52
-4
src/api/system/specification.js
+16
-0
src/views/goods/goods/components/Specification.vue
+34
-2
src/views/goods/goods/index.vue
+2
-2
No files found.
src/api/system/specification.js
View file @
83e237f5
...
...
@@ -45,3 +45,18 @@ export function del_spec_step(query) {
})
}
// 查询sku list
export
function
list_sku_byGoodsId
(
id
)
{
return
request
({
url
:
'/system/goods/sku/list/'
+
id
,
method
:
'get'
})
}
// 查询详细
export
function
getSpu
(
id
)
{
return
request
({
url
:
"/system/goods/"
+
id
,
method
:
"get"
,
});
}
\ No newline at end of file
src/views/goods/goods/components/Specification.vue
View file @
83e237f5
...
...
@@ -40,7 +40,7 @@
</div>
</template>
<
script
>
import
{
list_machine_model
,
list_step
,
add_spec_step
,
list_data_spec_step
,
del_spec_step
}
from
"@/api/system/specification.js"
;
import
{
list_machine_model
,
list_step
,
add_spec_step
,
list_data_spec_step
,
del_spec_step
,
list_sku_byGoodsId
}
from
"@/api/system/specification.js"
;
import
{
stringify
}
from
"querystring"
;
export
default
{
props
:
{
...
...
@@ -90,7 +90,10 @@ export default {
this
.
goods
=
pgoods
;
},
/**打开规格详情配置,并初始化显示内容 */
showSpecial
(
isShow
,
pgoods
){
async
showSpecial
(
isShow
,
pgoods
){
console
.
log
(
"111 "
);
await
this
.
getSkuByGoodsId
(
this
.
goods
.
id
);
console
.
log
(
"333 "
);
// 样例
// {
// "goods_code":"G169",
...
...
@@ -193,8 +196,36 @@ export default {
},
/** 规格详情配置窗体初始化数据,如果已经有配置数据则获取*/
initAll
(){
this
.
get_step_data
();
},
/**获取商品对应的sku list 组装数据结构供页面显示,*/
// getSkuByGoodsId(goodsId){
// list_sku_byGoodsId(goodsId).then((response) => {
// console.log("getSkuByGoodsId response",response);
// console.log("222 ");
// }).catch((response) => {
// console.log("getSkuByGoodsId error",response);
// console.log("222 e");
// });
// },
getSkuByGoodsId
(
goodsId
){
return
new
Promise
((
resolve
,
reject
)
=>
{
list_sku_byGoodsId
(
goodsId
).
then
((
response
)
=>
{
console
.
log
(
"getSkuByGoodsId response"
,
response
);
console
.
log
(
"222 "
);
resolve
(
response
);
}).
catch
((
response
)
=>
{
console
.
log
(
"getSkuByGoodsId error"
,
response
);
console
.
log
(
"222 e"
);
reject
(
response
);
});
});
},
/**获取已保存的步骤数据 */
get_step_data
(){
console
.
log
(
"get_step_data goods"
,
this
.
goods
);
...
...
@@ -365,6 +396,7 @@ export default {
return
cat
})
}
}
}
...
...
src/views/goods/goods/index.vue
View file @
83e237f5
...
...
@@ -251,9 +251,9 @@ export default {
this
.
$refs
.
Specification
.
setSpecGoods
(
prow
);
this
.
$nextTick
(
this
.
$refs
.
Specification
.
showSpecial
(
true
,
prow
)
);
//this.$refs.Specification.initAll();
...
...
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