Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
c452c3c5
提交
c452c3c5
authored
4月 29, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、入驻,获取品牌信息接口更换;2、运费模块bug修改
上级
fe59aa82
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
248 行增加
和
229 行删除
+248
-229
entry.js
src/api/module/entry.js
+1
-1
fillBrandInf.vue
src/views/entry/fillBrandInf.vue
+3
-3
indexbtn.vue
src/views/system/freight/freight_list/indexbtn.vue
+18
-15
index.vue
src/views/system/goods/add/index.vue
+226
-210
没有找到文件。
src/api/module/entry.js
浏览文件 @
c452c3c5
...
...
@@ -20,7 +20,7 @@ export function addMain(data) {
// 获取品牌信息
export
function
getBrandsInf
(
query
)
{
return
request
({
url
:
'/local/
brands
'
,
url
:
'/local/
shopbrand
'
,
method
:
'get'
,
params
:
query
});
...
...
src/views/entry/fillBrandInf.vue
浏览文件 @
c452c3c5
...
...
@@ -486,9 +486,9 @@
// 初始化
//this.resetForm();
getBrandsInf
().
then
(
res
=>
{
console
.
log
(
"获取品牌:"
,
res
);
if
(
res
.
code
===
1
&&
res
.
data
.
data
)
{
this
.
brandForm
=
res
.
data
.
data
[
0
];
console
.
log
(
"获取品牌:"
,
res
.
data
);
if
(
res
.
code
===
1
&&
res
.
data
)
{
this
.
brandForm
=
res
.
data
[
0
];
// 商标logo图片处理
let
brandList
=
{};
let
brandArr
=
[];
...
...
src/views/system/freight/freight_list/indexbtn.vue
浏览文件 @
c452c3c5
...
...
@@ -207,13 +207,7 @@ export default {
IsDefault
:
0
,
ChargeType
:
0
,
Dispatching
:
[
{
a
:
"全国"
,
f
:
500
,
fp
:
10
,
n
:
100
,
np
:
5
,
}
{
a
:
"全国"
,
f
:
500
,
fp
:
10
,
n
:
100
,
np
:
5
}
],
Disdispatching
:
""
,
Publish
:
0
,
...
...
@@ -226,13 +220,17 @@ export default {
},
methods
:
{
btndisabled
(){
console
.
log
(
this
.
checkList
,
this
.
btnindex
)
if
(
this
.
btnindex
==
99
){
this
.
goodsDate
.
Disdispatching
=
this
.
checkList
.
join
()
}
else
{
this
.
goodsDate
.
Dispatching
[
this
.
btnindex
].
a
=
this
.
checkList
.
join
()
}
this
.
dialogVisible
=
false
let
checkListString
=
''
;
if
(
this
.
btnindex
==
99
){
checkListString
=
this
.
checkList
.
join
();
if
(
checkListString
.
substr
(
0
,
1
)
===
','
)
{
checkListString
=
checkListString
.
slice
(
1
);
}
this
.
goodsDate
.
Disdispatching
=
checkListString
;
}
else
{
this
.
goodsDate
.
Dispatching
[
this
.
btnindex
].
a
=
this
.
checkList
.
join
()
}
this
.
dialogVisible
=
false
},
unique
(
obj
,
ary
){
return
obj
.
filter
(
function
(
item
){
...
...
@@ -241,6 +239,7 @@ export default {
},
opendias
(
type
,
i
,
index
)
{
this
.
goodsDate
.
Dispatching
.
forEach
((
element
)
=>
{
let
arrd
=
element
.
a
.
split
(
','
)
for
(
let
i
=
0
;
i
<
arrd
.
length
;
i
++
){
...
...
@@ -268,9 +267,13 @@ export default {
this
.
dialogVisible
=
true
;
},
handleinfomationclick
()
{
//提交
this
.
goodsDate
.
Disdispatching
.
forEach
(
item
=>
{
//debugger;
this
.
goodsDate
.
Dispatching
.
forEach
(
item
=>
{
item
.
np
=
Number
(
item
.
np
*
100
).
toFixed
()
})
//console.log("提交前的数据:",this.goodsDate);
addFreight
(
this
.
goodsDate
).
then
(
response
=>
{
console
.
log
(
296
,
response
);
if
(
response
.
data
.
code
===
1
)
{
...
...
src/views/system/goods/add/index.vue
浏览文件 @
c452c3c5
<
template
>
<div
class=
"app-container goods"
v-loading=
"loading"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button
style=
"float: right; "
icon=
"el-icon-check"
size=
"mini"
type=
"primary"
@
click=
"submitForm"
>
提 交
</el-button>
</div>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"商品信息"
>
<Goodsinfomation
:infomationdatas=
'infomationdata'
@
infomationclick=
'infomationclick'
/>
</el-tab-pane>
<el-tab-pane
label=
"商品图片"
>
<Goodsimg
:imgdata=
'imgdate'
@
imgclicks=
'imgclick'
/>
</el-tab-pane>
<el-tab-pane
label=
"商品规格"
>
<Guide
:guidedata=
'guidedate'
@
guideclicks=
'guideclick'
/>
</el-tab-pane>
<el-tab-pane
label=
"商品参数"
>
<Goodsparameter
:parameterdata=
'parameterdata'
@
parameterclicks=
'parameterclick'
/>
</el-tab-pane>
</el-tabs>
</el-card>
<el-button
style=
"float: right; "
icon=
"el-icon-check"
size=
"mini"
type=
"primary"
@
click=
"submitForm"
>
提 交
</el-button>
</div>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"商品信息"
>
<Goodsinfomation
:infomationdatas=
'infomationdata'
@
infomationclick=
'infomationclick'
/>
</el-tab-pane>
<el-tab-pane
label=
"商品图片"
>
<Goodsimg
:imgdata=
'imgdate'
@
imgclicks=
'imgclick'
/>
</el-tab-pane>
<el-tab-pane
label=
"商品规格"
>
<Guide
:guidedata=
'guidedate'
@
guideclicks=
'guideclick'
/>
</el-tab-pane>
<el-tab-pane
label=
"商品参数"
>
<Goodsparameter
:parameterdata=
'parameterdata'
@
parameterclicks=
'parameterclick'
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</
template
>
<
script
>
import
{
getGoods
}
from
'@/api/module/goods'
import
descartes
from
"@/utils/dikaerjs.js"
;
import
Guide
from
'./components/guide'
import
Goodsinfomation
from
'./components/goodsinfomation'
import
Goodsimg
from
'./components/goodsimg'
import
Goodsparameter
from
'./components/goodsparameter'
import
{
addGoods
}
from
'@/api/module/goods'
export
default
{
name
:
'goods'
,
data
()
{
return
{
goodsOnsale
:
0
,
loading
:
false
,
title
:
"添加新商品"
,
imgdate
:[],
guidedate
:{},
parameterdate
:{},
params
:{}
}
},
components
:{
Guide
,
Goodsinfomation
,
Goodsimg
,
Goodsparameter
},
created
()
{
this
.
getParams
()
},
methods
:
{
getParams
(){
var
goodsId
=
this
.
$route
.
query
.
goodsId
if
(
goodsId
>
0
){
this
.
title
=
"编辑商品信息"
this
.
genGoodsInfo
(
goodsId
)
import
{
getGoods
}
from
'@/api/module/goods'
import
descartes
from
"@/utils/dikaerjs.js"
;
import
Guide
from
'./components/guide'
import
Goodsinfomation
from
'./components/goodsinfomation'
import
Goodsimg
from
'./components/goodsimg'
import
Goodsparameter
from
'./components/goodsparameter'
import
{
addGoods
}
from
'@/api/module/goods'
export
default
{
name
:
'goods'
,
data
()
{
return
{
goodsOnsale
:
0
,
loading
:
false
,
title
:
"添加新商品"
,
imgdate
:
[],
guidedate
:
{},
parameterdate
:
{},
params
:
{}
}
// if (goodsId > 0 ) {
// this.genGoodsInfo(goodsId)
// }
},
// 获取商品详情
genGoodsInfo
(
goodsId
)
{
const
goods_id
=
goodsId
getGoods
(
goods_id
).
then
(
response
=>
{
console
.
log
(
"商品详情"
,
response
.
data
.
data
)
this
.
goodsOnsale
=
response
.
data
.
data
.
isOnsale
,
this
.
infomationdata
=
{
goodsId
:
response
.
data
.
data
.
goodsId
,
goodsName
:
response
.
data
.
data
.
goodsName
,
categoryId
:
response
.
data
.
data
.
categoryId
,
scPrice
:
response
.
data
.
data
.
scPrice
/
100
,
price
:
response
.
data
.
data
.
price
/
100
,
jsPrice
:
response
.
data
.
data
.
jsPrice
/
100
,
goodsNowStock
:
response
.
data
.
data
.
goodsNowStock
,
producingArea
:
response
.
data
.
data
.
producingArea
,
weight
:
response
.
data
.
data
.
weight
,
unit
:
response
.
data
.
data
.
unit
,
goodsBrand
:
response
.
data
.
data
.
goodsBrand
,
wlPrice
:
response
.
data
.
data
.
wlPrice
,
Delayompensate
:
response
.
data
.
data
.
Delayompensate
,
aftersaleTime
:
response
.
data
.
data
.
aftersaleTime
,
mark
:
response
.
data
.
data
.
mark
,
servicetagsTags
:
response
.
data
.
data
.
ServiceagsTags
.
split
(
','
),
goodsNowStock
:
response
.
data
.
data
.
goodsNowStock
,
description
:
response
.
data
.
data
.
description
,
freightId
:
response
.
data
.
data
.
freightId
,
outGoodsId
:
response
.
data
.
data
.
outGoodsId
,
};
this
.
guidedate
=
response
.
data
.
data
.
goodsSpecs
this
.
guidedate
[
"goodsSpec"
]
=
response
.
data
.
data
.
goodsSpec
this
.
parameterdata
=
response
.
data
.
data
.
Params
this
.
imgdate
=
{
"ruleFormdialogImageUrl"
:
response
.
data
.
data
.
image
,
"ruleFormdialogImageUrlplus"
:
response
.
data
.
data
.
defaultImage
}
});
},
info
(){
addgoods
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
items
this
.
total
=
response
.
data
.
total
this
.
listLoading
=
false
})
components
:
{
Guide
,
Goodsinfomation
,
Goodsimg
,
Goodsparameter
},
//商品信息
infomationclick
(
type
){
// this.Goodsinfomation = type
Object
.
assign
(
this
.
params
,
type
);
console
.
log
(
111111
)
// console.log(this.params,9999)
},
//商品图片
imgclick
(
type
){
type
.
ruleFormdialogImageUrlplus
//主图
type
.
ruleFormdialogImageUrl
//多图
let
img
=
[]
type
.
ruleFormdialogImageUrl
.
forEach
((
res
,
index
)
=>
{
img
.
push
(
res
.
url
)
})
this
.
params
[
"imgs"
]
=
img
this
.
params
[
"defaultImg"
]
=
type
.
ruleFormdialogImageUrlplus
[
0
].
url
},
//规格
guideclick
(
type
,
specsGroup
){
this
.
params
[
"specs"
]
=
type
this
.
params
[
"specsGroup"
]
=
specsGroup
console
.
log
(
333333
)
console
.
log
(
"type"
,
type
)
console
.
log
(
"specsGroup"
,
specsGroup
)
},
//参数
parameterclick
(
type
){
this
.
params
[
"goodsPram"
]
=
type
console
.
log
(
44444
)
console
.
log
(
type
)
created
()
{
this
.
getParams
()
},
methods
:
{
getParams
()
{
var
goodsId
=
this
.
$route
.
query
.
goodsId
if
(
goodsId
>
0
)
{
this
.
title
=
"编辑商品信息"
this
.
genGoodsInfo
(
goodsId
)
}
// if (goodsId > 0 ) {
// this.genGoodsInfo(goodsId)
// }
},
// 获取商品详情
genGoodsInfo
(
goodsId
)
{
const
goods_id
=
goodsId
getGoods
(
goods_id
).
then
(
response
=>
{
console
.
log
(
"商品详情"
,
response
.
data
.
data
)
this
.
goodsOnsale
=
response
.
data
.
data
.
isOnsale
;
this
.
infomationdata
=
{
goodsId
:
response
.
data
.
data
.
goodsId
,
goodsName
:
response
.
data
.
data
.
goodsName
,
categoryId
:
response
.
data
.
data
.
categoryId
,
scPrice
:
response
.
data
.
data
.
scPrice
/
100
,
price
:
response
.
data
.
data
.
price
/
100
,
jsPrice
:
response
.
data
.
data
.
jsPrice
/
100
,
goodsNowStock
:
response
.
data
.
data
.
goodsNowStock
,
producingArea
:
response
.
data
.
data
.
producingArea
,
weight
:
response
.
data
.
data
.
weight
,
unit
:
response
.
data
.
data
.
unit
,
goodsBrand
:
response
.
data
.
data
.
goodsBrand
,
wlPrice
:
response
.
data
.
data
.
wlPrice
,
Delayompensate
:
response
.
data
.
data
.
Delayompensate
,
aftersaleTime
:
response
.
data
.
data
.
aftersaleTime
,
mark
:
response
.
data
.
data
.
mark
,
servicetagsTags
:
response
.
data
.
data
.
ServiceagsTags
.
split
(
','
),
description
:
response
.
data
.
data
.
description
,
freightId
:
response
.
data
.
data
.
freightId
,
outGoodsId
:
response
.
data
.
data
.
outGoodsId
,
};
this
.
guidedate
=
response
.
data
.
data
.
goodsSpecs
this
.
guidedate
[
"goodsSpec"
]
=
response
.
data
.
data
.
goodsSpec
this
.
parameterdata
=
response
.
data
.
data
.
Params
this
.
imgdate
=
{
"ruleFormdialogImageUrl"
:
response
.
data
.
data
.
image
,
"ruleFormdialogImageUrlplus"
:
response
.
data
.
data
.
defaultImage
}
/** 确定按钮 */
submitForm
()
{
this
.
loading
=
true
addGoods
(
this
.
params
).
then
(
response
=>
{
this
.
loading
=
false
if
(
response
.
data
.
code
==
1
){
this
.
$message
({
message
:
response
.
data
.
msg
,
type
:
'success'
});
if
(
this
.
goodsOnsale
){
var
redUrl
=
'/system/goods/onsale'
}
else
{
var
redUrl
=
'/system/goods/offsale'
}
this
.
$router
.
push
({
path
:
redUrl
});
}
else
{
this
.
$message
.
error
(
response
.
data
.
msg
);
}
});
});
},
info
()
{
addgoods
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
items
this
.
total
=
response
.
data
.
total
this
.
listLoading
=
false
})
},
//商品信息
infomationclick
(
type
)
{
Object
.
assign
(
this
.
params
,
type
);
},
//商品图片
imgclick
(
type
)
{
type
.
ruleFormdialogImageUrlplus
//主图
type
.
ruleFormdialogImageUrl
//多图
let
img
=
[]
type
.
ruleFormdialogImageUrl
.
forEach
((
res
,
index
)
=>
{
img
.
push
(
res
.
url
)
})
this
.
params
[
"imgs"
]
=
img
this
.
params
[
"defaultImg"
]
=
type
.
ruleFormdialogImageUrlplus
[
0
].
url
},
//规格
guideclick
(
type
,
specsGroup
)
{
this
.
params
[
"specs"
]
=
type
this
.
params
[
"specsGroup"
]
=
specsGroup
},
//参数
parameterclick
(
type
)
{
this
.
params
[
"goodsPram"
]
=
type
},
},
/** 确定按钮 */
submitForm
()
{
this
.
loading
=
true
;
//-------------------------
if
(
this
.
goodsOnsale
)
{
var
redUrl
=
'/system/goods/onsale'
}
else
{
var
redUrl
=
'/system/goods/offsale'
}
this
.
$router
.
push
({
path
:
redUrl
});
this
.
loading
=
false
;
return
;
//------------------------
addGoods
(
this
.
params
).
then
(
response
=>
{
if
(
response
.
data
.
code
==
1
)
{
this
.
$message
({
message
:
response
.
data
.
msg
,
type
:
'success'
});
if
(
this
.
goodsOnsale
)
{
var
redUrl
=
'/system/goods/onsale'
}
else
{
var
redUrl
=
'/system/goods/offsale'
}
this
.
$router
.
push
({
path
:
redUrl
});
}
else
{
this
.
$message
.
error
(
response
.
data
.
msg
);
}
this
.
loading
=
false
;
});
},
}
}
}
</
script
>
<
style
scoped
>
.el-tabs
{
height
:
calc
(
100%
-
60px
);
}
ul
,
li
{
list-style
:
none
;
margin
:
0
;
padding
:
0
;
}
.ullist
{
.el-tabs
{
height
:
calc
(
100%
-
60px
);
}
ul
,
li
{
list-style
:
none
;
margin
:
0
;
padding
:
0
;
}
.ullist
{
border
:
1px
solid
#e7eaec
;
padding
:
10px
;
margin-bottom
:
10px
;
}
.el-input-group
{
width
:
calc
(
100%
-
60px
);
}
.addbtn
{
background-color
:
#5bc0de
!important
;
color
:
#fff
!important
;
border-radius
:
0
4px
4px
0
;
}
.app-container
{
height
:
100%
;
}
.box-card
{
height
:
100%
;
}
.box-card
/
deep
/
.el-card__body
{
height
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
scroll
;
}
.el-tabs
{
height
:
calc
(
100%
-
35px
);
}
.el-tabs
/
deep
/
.el-tabs__content
{
height
:
calc
(
100%
-
39px
);
overflow-y
:
scroll
;
}
.eldelbtn
{
height
:
30px
;
padding
:
5px
20px
!important
;
margin-left
:
-3px
;
}
.childlist
{
margin-top
:
10px
;
}
.el-button--medium
{
}
.el-input-group
{
width
:
calc
(
100%
-
60px
);
}
.addbtn
{
background-color
:
#5bc0de
!important
;
color
:
#fff
!important
;
border-radius
:
0
4px
4px
0
;
}
.app-container
{
height
:
100%
;
}
.box-card
{
height
:
100%
;
}
.box-card
/
deep
/
.el-card__body
{
height
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
scroll
;
}
.el-tabs
{
height
:
calc
(
100%
-
35px
);
}
.el-tabs
/
deep
/
.el-tabs__content
{
height
:
calc
(
100%
-
39px
);
overflow-y
:
scroll
;
}
.eldelbtn
{
height
:
30px
;
padding
:
5px
20px
!important
;
margin-left
:
-3px
;
}
.childlist
{
margin-top
:
10px
;
}
.el-button--medium
{
padding
:
10px
12px
;
}
.dfbtn
{
}
.dfbtn
{
position
:
relative
;
}
.goods
.el-tabs__content
{
height
:
100%
;
.goods
.el-tabs__content
{
height
:
100%
;
overflow-y
:
scroll
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论