Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
7ad35de0
提交
7ad35de0
authored
5月 12, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、商品规格-库存不能一键应用bug修复;商品编辑,数据格式修改;
上级
7cb6808a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
158 行增加
和
134 行删除
+158
-134
goodsimg.vue
src/views/system/goods/add/components/goodsimg.vue
+10
-5
goodsinfomation.vue
src/views/system/goods/add/components/goodsinfomation.vue
+9
-11
guide.vue
src/views/system/goods/add/components/guide.vue
+66
-70
index.vue
src/views/system/goods/add/index.vue
+73
-48
没有找到文件。
src/views/system/goods/add/components/goodsimg.vue
浏览文件 @
7ad35de0
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
name
:
"goodsimg"
,
name
:
"goodsimg"
,
props
:
{
props
:
{
imgdata
:
{
imgdata
:
{
type
:
Array
,
type
:
Object
,
required
:
true
required
:
true
}
}
},
},
...
@@ -81,11 +81,16 @@
...
@@ -81,11 +81,16 @@
},
},
watch
:
{
watch
:
{
imgdata
(
curVal
,
oldVal
)
{
imgdata
(
curVal
,
oldVal
)
{
console
.
log
(
84
,
curVal
);
if
(
curVal
)
{
if
(
curVal
)
{
curVal
.
ruleFormdialogImageUrl
.
forEach
((
itemName
,
nindex
)
=>
{
if
(
curVal
.
ruleFormdialogImageUrl
)
{
this
.
ruleFormdialogImageUrl
.
push
({
'url'
:
itemName
.
thumbnailM
})
curVal
.
ruleFormdialogImageUrl
.
forEach
((
itemName
,
nindex
)
=>
{
})
this
.
ruleFormdialogImageUrl
.
push
({
'url'
:
itemName
.
thumbnailM
})
this
.
ruleFormdialogImageUrlplus
.
push
({
'url'
:
curVal
.
ruleFormdialogImageUrlplus
})
})
}
if
(
this
.
ruleFormdialogImageUrlplus
)
{
this
.
ruleFormdialogImageUrlplus
.
push
({
'url'
:
curVal
.
ruleFormdialogImageUrlplus
});
}
}
}
},
},
picall
:
{
picall
:
{
...
...
src/views/system/goods/add/components/goodsinfomation.vue
浏览文件 @
7ad35de0
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
deep
:
true
deep
:
true
},
},
infomationdatas
(
curVal
,
oldVal
)
{
infomationdatas
(
curVal
,
oldVal
)
{
console
.
log
(
"商品信息子组件:"
,
curVal
);
//
console.log("商品信息子组件:",curVal);
if
(
curVal
)
{
if
(
curVal
)
{
this
.
ruleForm
=
curVal
;
this
.
ruleForm
=
curVal
;
if
(
curVal
.
freightId
==
0
)
{
if
(
curVal
.
freightId
==
0
)
{
...
@@ -254,17 +254,17 @@
...
@@ -254,17 +254,17 @@
}
else
{
}
else
{
this
.
ruleForm
.
resource
=
'1'
;
this
.
ruleForm
.
resource
=
'1'
;
}
}
this
.
content
=
this
.
ruleForm
.
description
;
this
.
content
=
this
.
ruleForm
.
description
;
// 初始化
// 初始化
this
.
serviceagsTags
=
[];
this
.
serviceagsTags
=
[];
this
.
ruleForm
.
serviceagsTags
.
forEach
((
val
)
=>
{
if
(
this
.
ruleForm
.
serviceagsTags
)
{
if
(
val
)
{
this
.
ruleForm
.
serviceagsTags
.
forEach
((
val
)
=>
{
let
nid
=
parseInt
(
val
);
if
(
val
)
{
this
.
serviceagsTags
.
push
(
nid
);
let
nid
=
parseInt
(
val
);
}
this
.
serviceagsTags
.
push
(
nid
);
})
}
})
}
}
}
}
}
},
},
...
@@ -291,8 +291,6 @@
...
@@ -291,8 +291,6 @@
this
.
serviceagsTags
.
splice
(
index3
,
1
)
this
.
serviceagsTags
.
splice
(
index3
,
1
)
}
}
}
}
console
.
log
(
307
,
this
.
ruleForm
);
},
},
// 运费模板类型,change事件
// 运费模板类型,change事件
freightIdTypeChange
(
val
)
{
freightIdTypeChange
(
val
)
{
...
...
src/views/system/goods/add/components/guide.vue
浏览文件 @
7ad35de0
...
@@ -206,8 +206,8 @@
...
@@ -206,8 +206,8 @@
<el-input
placeholder=
""
v-model=
"scope.row.jsPrice"
></el-input>
<el-input
placeholder=
""
v-model=
"scope.row.jsPrice"
></el-input>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"kucun"
label=
"库存"
>
<el-table-column
prop=
"kucun"
label=
"库存"
align=
"center"
>
<
template
slot=
"header"
slot-scope=
"scope"
align=
"center"
>
<
template
slot=
"header"
slot-scope=
"scope"
>
<p
class=
"table_p"
>
库存
</p>
<p
class=
"table_p"
>
库存
</p>
<el-input
placeholder=
""
v-model=
"goodsNowStock"
<el-input
placeholder=
""
v-model=
"goodsNowStock"
><el-button
><el-button
...
@@ -241,7 +241,6 @@
...
@@ -241,7 +241,6 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<!-- <el-button type="primary" @click="handleinfomationclick('ruleForm')">下一步</el-button>-->
<el-button
>
重置
</el-button>
<el-button
>
重置
</el-button>
</div>
</div>
</div>
</div>
...
@@ -305,7 +304,6 @@ export default {
...
@@ -305,7 +304,6 @@ export default {
// this.driver = new Driver()
// this.driver = new Driver()
this
.
$dragging
.
$on
(
"dragged"
,
(
value
)
=>
{
this
.
$dragging
.
$on
(
"dragged"
,
(
value
)
=>
{
//因为我这在排序的时候不需要做处理,所以空着就行
//因为我这在排序的时候不需要做处理,所以空着就行
// debugger;
});
});
},
},
watch
:{
watch
:{
...
@@ -320,83 +318,80 @@ export default {
...
@@ -320,83 +318,80 @@ export default {
},
},
deep
:
true
deep
:
true
},
},
guidedata
(
curVal
,
oldVal
){
guidedata
(
curVal
,
oldVal
){
if
(
curVal
){
if
(
curVal
){
if
(
curVal
.
goodsSpec
){
if
(
curVal
.
goodsSpec
){
this
.
checked
=
true
this
.
checked
=
true
}
}
// 规格
// 规格
this
.
shopType
=
curVal
.
specName
?
curVal
.
specName
:[],
this
.
shopType
=
curVal
.
specName
;
this
.
shopType
.
forEach
((
item
,
index
)
=>
{
this
.
shopType
[
index
][
'specValue'
]
=
[]
if
(
this
.
shopType
)
{
curVal
.
specValue
.
forEach
((
itemName
,
nindex
)
=>
{
this
.
shopType
.
forEach
((
item
,
index
)
=>
{
if
(
itemName
.
specNameId
==
item
.
id
){
this
.
shopType
[
index
][
'specValue'
]
=
[]
this
.
shopType
[
index
][
'specValue'
].
push
(
itemName
)
if
(
curVal
.
specValue
)
{
curVal
.
specValue
.
forEach
((
itemName
,
nindex
)
=>
{
if
(
itemName
.
specNameId
==
item
.
id
){
this
.
shopType
[
index
][
'specValue'
].
push
(
itemName
)
}
})
}
}
})
})
//笛卡尔乘积title
})
this
.
clgoodspace
(
curVal
)
}
//笛卡尔积值
this
.
tableData7
=
curVal
.
specOption
this
.
tableData7
.
forEach
((
element
,
index
)
=>
{
this
.
tableData7
[
index
][
"goodsNowStock"
]
=
element
.
stock
});
}
this
.
clgoodspace
(
curVal
);
},
//笛卡尔积值
this
.
tableData7
=
curVal
.
specOption
;
}
},
},
},
methods
:
{
methods
:
{
guidInput
(
val
){
guidInput
(
val
){
this
.
$forceUpdate
()
this
.
$forceUpdate
()
},
},
// 处理回显数据
// 处理回显数据
clgoodspace
(
goodsspace
){
clgoodspace
(
goodsspace
){
this
.
shopTypes
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
shopType
));
this
.
shopTypes
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
shopType
));
let
specName
=
goodsspace
.
specName
let
specName
=
goodsspace
.
specName
;
let
specValue
=
goodsspace
.
specValue
let
specValue
=
goodsspace
.
specValue
;
let
specOption
=
goodsspace
.
specOption
let
specOption
=
goodsspace
.
specOption
;
specName
.
forEach
((
item
)
=>
{
this
.
tablearr
.
push
(
item
.
specName
)
if
(
specName
)
{
specValue
.
forEach
((
itemchild
)
=>
{
specName
.
forEach
((
item
)
=>
{
this
.
tablearr
.
push
(
item
.
specName
)
specValue
.
forEach
((
itemchild
)
=>
{
if
(
item
.
id
==
itemchild
.
specNameId
){
if
(
item
.
id
==
itemchild
.
specNameId
){
itemchild
[
'specName'
]
=
item
.
specName
itemchild
[
'specName'
]
=
item
.
specName
}
}
})
})
})
})
specOption
.
forEach
(
item
=>
{
}
let
goodsarr
=
item
.
specValueIds
.
split
(
'_'
)
goodsarr
.
forEach
(
itemchild
=>
{
if
(
specOption
)
{
specValue
.
forEach
(
itemgoodschild
=>
{
specOption
.
forEach
(
item
=>
{
if
(
itemchild
==
itemgoodschild
.
id
){
let
goodsarr
=
item
.
specValueIds
.
split
(
'_'
)
item
[
itemgoodschild
.
specName
]
=
itemgoodschild
.
value
goodsarr
.
forEach
(
itemchild
=>
{
}
specValue
.
forEach
(
itemgoodschild
=>
{
})
if
(
itemchild
==
itemgoodschild
.
id
){
item
[
itemgoodschild
.
specName
]
=
itemgoodschild
.
value
}
})
})
})
})
this
.
tableData7
=
specOption
})
this
.
getSpanArr
(
this
.
tableData7
);
}
},
this
.
tableData7
=
specOption
;
this
.
getSpanArr
(
this
.
tableData7
);
},
// 不能删
descartes
,
descartes
,
handleinfomationclick
(
formName
)
{
let
arrlist
=
JSON
.
stringify
(
this
.
tableData7
);
//可以将json对象转换成json对符串
let
listarr
=
JSON
.
parse
(
arrlist
);
//可以将json字符串转换成json对象
this
.
processguidelist
(
listarr
);
this
.
$emit
(
'guideclicks'
,
this
.
arrtdall
,
this
.
shopType
)
},
processguidelist
(
obj
)
{
processguidelist
(
obj
)
{
// listobj["goodsNowStock"] = "";
let
arrtdall
=
[]
// listobj["jsPrice"] = "";
// listobj["price"] = "";
// listobj["scPrice"] = "";
// listobj["wlPrice"] = "";
// listobj["pywlPrice"] = "";
// listobj["weight"] = "";
let
arrtdall
=
[]
obj
.
forEach
((
item
,
index
)
=>
{
obj
.
forEach
((
item
,
index
)
=>
{
let
objtd
=
{}
let
objtd
=
{}
let
arrtd
=
[]
let
arrtd
=
[]
...
@@ -416,11 +411,6 @@ export default {
...
@@ -416,11 +411,6 @@ export default {
deletearrinput
(
index
)
{
deletearrinput
(
index
)
{
this
.
shopType
.
splice
(
index
,
1
);
this
.
shopType
.
splice
(
index
,
1
);
},
},
weightall
()
{
this
.
tableData7
.
forEach
((
element
,
index
)
=>
{
this
.
tableData7
[
index
].
weight
=
this
.
weight
;
});
},
jsPriceall
()
{
jsPriceall
()
{
this
.
tableData7
.
forEach
((
element
,
index
)
=>
{
this
.
tableData7
.
forEach
((
element
,
index
)
=>
{
this
.
tableData7
[
index
].
jsPrice
=
this
.
jsPrice
;
this
.
tableData7
[
index
].
jsPrice
=
this
.
jsPrice
;
...
@@ -436,11 +426,18 @@ export default {
...
@@ -436,11 +426,18 @@ export default {
this
.
tableData7
[
index
].
scPrice
=
this
.
scPrice
;
this
.
tableData7
[
index
].
scPrice
=
this
.
scPrice
;
});
});
},
},
// 一键 库存
goodsNowStockall
()
{
goodsNowStockall
()
{
this
.
tableData7
.
forEach
((
element
,
index
)
=>
{
this
.
tableData7
.
forEach
((
element
,
index
)
=>
{
this
.
tableData7
[
index
].
goodsNowStock
=
this
.
goodsNowStock
;
this
.
tableData7
[
index
].
goodsNowStock
=
this
.
goodsNowStock
;
});
});
},
},
// 一键 重量
weightall
()
{
this
.
tableData7
.
forEach
((
element
,
index
)
=>
{
this
.
tableData7
[
index
].
weight
=
this
.
weight
;
});
},
//删除规格项
//删除规格项
deleteinput
(
index
,
indexs
)
{
deleteinput
(
index
,
indexs
)
{
this
.
shopType
[
index
].
specValue
.
splice
(
indexs
,
1
);
this
.
shopType
[
index
].
specValue
.
splice
(
indexs
,
1
);
...
@@ -625,7 +622,6 @@ export default {
...
@@ -625,7 +622,6 @@ export default {
},
},
//计算位置的方法
//计算位置的方法
getSpanArr
(
data
)
{
getSpanArr
(
data
)
{
// debugger
this
.
spanArrS
=
{};
this
.
spanArrS
=
{};
this
.
spanArr
=
[];
this
.
spanArr
=
[];
this
.
pos
=
""
;
this
.
pos
=
""
;
...
...
src/views/system/goods/add/index.vue
浏览文件 @
7ad35de0
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
loading
:
false
,
loading
:
false
,
applyStatus
:
''
,
applyStatus
:
''
,
title
:
"添加新商品"
,
title
:
"添加新商品"
,
imgdate
:
[]
,
imgdate
:
{}
,
guidedate
:
{},
guidedate
:
{},
parameterdate
:
{},
parameterdate
:
{},
params
:
{
params
:
{
...
@@ -67,8 +67,8 @@
...
@@ -67,8 +67,8 @@
methods
:
{
methods
:
{
// 运费模板
// 运费模板
getFreight
()
{
getFreight
()
{
GetFreight
(
this
.
queryParams
).
then
(
res
ponse
=>
{
GetFreight
(
this
.
queryParams
).
then
(
res
=>
{
this
.
expressTemplateList
=
res
ponse
.
data
;
this
.
expressTemplateList
=
res
.
data
;
this
.
expressTemplateIdList
=
this
.
expressTemplateList
.
filter
(
function
(
item
)
{
this
.
expressTemplateIdList
=
this
.
expressTemplateList
.
filter
(
function
(
item
)
{
return
item
.
Id
;
return
item
.
Id
;
})
})
...
@@ -85,64 +85,75 @@
...
@@ -85,64 +85,75 @@
genGoodsInfo
(
goodsId
)
{
genGoodsInfo
(
goodsId
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
const
goods_id
=
goodsId
;
const
goods_id
=
goodsId
;
getGoods
(
goods_id
).
then
(
res
ponse
=>
{
getGoods
(
goods_id
).
then
(
res
=>
{
//console.log(89,response
);
console
.
log
(
9999
,
res
);
if
(
res
ponse
.
data
.
code
===
1
&&
response
.
data
.
data
)
{
if
(
res
.
code
===
1
&&
res
.
data
)
{
this
.
goodsOnsale
=
res
ponse
.
data
.
data
.
isOnsale
;
this
.
goodsOnsale
=
res
.
data
.
isOnsale
;
// 对发货时效单独处理
// 对发货时效单独处理
if
(
res
ponse
.
data
.
data
.
Delayompensate
==
0
)
{
if
(
res
.
data
.
Delayompensate
==
0
)
{
res
ponse
.
data
.
data
.
Delayompensate
=
''
;
res
.
data
.
Delayompensate
=
''
;
}
}
//res
ponse.data
.data.freightId 返回的值类型有 0(string/number)|| ‘全国包邮通用模板’(string)|| 310(number)
//res.data.freightId 返回的值类型有 0(string/number)|| ‘全国包邮通用模板’(string)|| 310(number)
let
resourceType
=
'1'
;
// 为了单元框正常显示,先给一个默认值,// 字符串 ‘0’,代表 数据为单独运费
let
resourceType
=
'1'
;
// 为了单元框正常显示,先给一个默认值,// 字符串 ‘0’,代表 数据为单独运费
let
serviceagsTagsVal
=
[];
let
serviceagsTagsVal
=
[];
if
(
res
ponse
.
data
.
data
.
ServiceagsTags
)
{
if
(
res
.
data
.
ServiceagsTags
)
{
serviceagsTagsVal
=
JSON
.
parse
(
res
ponse
.
data
.
data
.
ServiceagsTags
);
serviceagsTagsVal
=
JSON
.
parse
(
res
.
data
.
ServiceagsTags
);
}
}
// 库存,后台返回字段更换,提前处理 specOption
if
(
res
.
data
.
goodsSpecs
.
specOption
&&
res
.
data
.
goodsSpecs
.
specOption
.
length
>
0
)
{
res
.
data
.
goodsSpecs
.
specOption
.
forEach
(
function
(
item
){
if
(
item
.
stock
)
{
item
[
'goodsNowStock'
]
=
item
.
stock
;
}
});
}
this
.
infomationdata
=
{
this
.
infomationdata
=
{
goodsId
:
res
ponse
.
data
.
data
.
goodsId
,
goodsId
:
res
.
data
.
goodsId
,
goodsName
:
res
ponse
.
data
.
data
.
goodsName
,
goodsName
:
res
.
data
.
goodsName
,
categoryId
:
res
ponse
.
data
.
data
.
categoryId
,
categoryId
:
res
.
data
.
categoryId
,
scPrice
:
res
ponse
.
data
.
data
.
scPrice
/
100
,
scPrice
:
res
.
data
.
scPrice
/
100
,
price
:
res
ponse
.
data
.
data
.
price
/
100
,
price
:
res
.
data
.
price
/
100
,
jsPrice
:
res
ponse
.
data
.
data
.
jsPrice
/
100
,
jsPrice
:
res
.
data
.
jsPrice
/
100
,
goodsNowStock
:
res
ponse
.
data
.
data
.
goodsNowStock
,
goodsNowStock
:
res
.
data
.
goodsNowStock
,
producingArea
:
res
ponse
.
data
.
data
.
producingArea
,
producingArea
:
res
.
data
.
producingArea
,
weight
:
res
ponse
.
data
.
data
.
weight
,
weight
:
res
.
data
.
weight
,
unit
:
res
ponse
.
data
.
data
.
unit
,
unit
:
res
.
data
.
unit
,
goodsBrand
:
res
ponse
.
data
.
data
.
goodsBrand
,
goodsBrand
:
res
.
data
.
goodsBrand
,
wlPrice
:
res
ponse
.
data
.
data
.
wlPrice
,
wlPrice
:
res
.
data
.
wlPrice
,
pywlPrice
:
res
ponse
.
data
.
data
.
pywlPrice
,
pywlPrice
:
res
.
data
.
pywlPrice
,
resource
:
resourceType
,
resource
:
resourceType
,
Delayompensate
:
res
ponse
.
data
.
data
.
Delayompensate
,
Delayompensate
:
res
.
data
.
Delayompensate
,
aftersaleTime
:
res
ponse
.
data
.
data
.
aftersaleTime
,
aftersaleTime
:
res
.
data
.
aftersaleTime
,
mark
:
res
ponse
.
data
.
data
.
mark
,
mark
:
res
.
data
.
mark
,
serviceagsTags
:
serviceagsTagsVal
,
serviceagsTags
:
serviceagsTagsVal
,
description
:
res
ponse
.
data
.
data
.
description
,
description
:
res
.
data
.
description
,
freightId
:
res
ponse
.
data
.
data
.
freightId
,
freightId
:
res
.
data
.
freightId
,
outGoodsId
:
res
ponse
.
data
.
data
.
outGoodsId
,
outGoodsId
:
res
.
data
.
outGoodsId
,
};
};
this
.
guidedate
=
res
ponse
.
data
.
data
.
goodsSpecs
;
this
.
guidedate
=
res
.
data
.
goodsSpecs
;
this
.
guidedate
[
"goodsSpec"
]
=
res
ponse
.
data
.
data
.
goodsSpec
;
this
.
guidedate
[
"goodsSpec"
]
=
res
.
data
.
goodsSpec
;
this
.
parameterdata
=
res
ponse
.
data
.
data
.
Params
;
this
.
parameterdata
=
res
.
data
.
Params
?
res
.
data
.
Params
:
{}
;
this
.
imgdate
=
{
this
.
imgdate
=
{
"ruleFormdialogImageUrl"
:
res
ponse
.
data
.
data
.
image
,
"ruleFormdialogImageUrl"
:
res
.
data
.
image
,
"ruleFormdialogImageUrlplus"
:
res
ponse
.
data
.
data
.
defaultImage
"ruleFormdialogImageUrlplus"
:
res
.
data
.
defaultImage
};
};
}
else
if
(
res
ponse
.
data
.
code
===
0
)
{
}
else
if
(
res
.
code
===
0
)
{
if
(
res
ponse
.
data
.
msg
)
{
if
(
res
.
msg
)
{
this
.
$message
({
type
:
'error'
,
message
:
res
ponse
.
data
.
msg
});
this
.
$message
({
type
:
'error'
,
message
:
res
.
msg
});
}
else
{
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'数据出错啦'
});
this
.
$message
({
type
:
'error'
,
message
:
'数据出错啦'
});
}
}
}
}
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
info
()
{
info
()
{
addgoods
(
this
.
listQuery
).
then
(
res
ponse
=>
{
addgoods
(
this
.
listQuery
).
then
(
res
=>
{
this
.
list
=
res
ponse
.
data
.
items
this
.
list
=
res
.
data
.
items
this
.
total
=
res
ponse
.
data
.
total
this
.
total
=
res
.
data
.
total
this
.
listLoading
=
false
this
.
listLoading
=
false
})
})
},
},
...
@@ -166,6 +177,20 @@
...
@@ -166,6 +177,20 @@
guideclick
(
type
,
specsGroup
)
{
guideclick
(
type
,
specsGroup
)
{
this
.
params
[
"specs"
]
=
type
;
this
.
params
[
"specs"
]
=
type
;
this
.
params
[
"specsGroup"
]
=
specsGroup
;
this
.
params
[
"specsGroup"
]
=
specsGroup
;
// 浮点处理
if
(
this
.
params
.
specs
&&
this
.
params
.
specs
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
this
.
params
.
specs
.
length
;
i
++
)
{
if
(
this
.
params
.
specs
[
i
].
jsPrice
)
{
this
.
params
.
specs
[
i
].
jsPrice
=
this
.
params
.
specs
[
i
].
jsPrice
*
100
;
}
if
(
this
.
params
.
specs
[
i
].
price
)
{
this
.
params
.
specs
[
i
].
price
=
this
.
params
.
specs
[
i
].
price
*
100
;
}
if
(
this
.
params
.
specs
[
i
].
scPrice
)
{
this
.
params
.
specs
[
i
].
scPrice
=
this
.
params
.
specs
[
i
].
scPrice
*
100
;
}
}
}
},
},
//参数
//参数
parameterclick
(
type
)
{
parameterclick
(
type
)
{
...
@@ -265,10 +290,10 @@
...
@@ -265,10 +290,10 @@
}
}
}
}
this
.
loading
=
true
;
this
.
loading
=
true
;
addGoods
(
this
.
params
).
then
(
res
ponse
=>
{
addGoods
(
this
.
params
).
then
(
res
=>
{
if
(
res
ponse
.
code
===
1
)
{
if
(
res
.
code
===
1
)
{
this
.
$message
({
this
.
$message
({
message
:
res
ponse
.
msg
,
message
:
res
.
msg
,
type
:
'success'
type
:
'success'
});
});
this
.
$emit
(
'closeDialog'
,
false
);
this
.
$emit
(
'closeDialog'
,
false
);
...
@@ -280,9 +305,9 @@
...
@@ -280,9 +305,9 @@
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
redUrl
path
:
redUrl
});
});
}
else
if
(
res
ponse
.
code
===
0
)
{
}
else
if
(
res
.
code
===
0
)
{
if
(
res
ponse
.
msg
)
{
if
(
res
.
msg
)
{
this
.
$message
.
error
(
res
ponse
.
msg
);
this
.
$message
.
error
(
res
.
msg
);
}
else
{
}
else
{
this
.
$message
.
error
(
"操作失败!"
);
this
.
$message
.
error
(
"操作失败!"
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论