Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
fe60033d
提交
fe60033d
authored
9月 06, 2024
作者:
王天霸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
速卖通
上级
48c114d1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
43 行增加
和
12 行删除
+43
-12
index.vue
src/views/system/goodsimport/index.vue
+43
-12
没有找到文件。
src/views/system/goodsimport/index.vue
浏览文件 @
fe60033d
...
...
@@ -30,21 +30,31 @@
</div>
<el-form
ref=
"form"
:model=
"form"
label-width=
"180px"
>
<el-form-item
label=
"货币转换汇率:"
v-if=
"activeName=='second'"
>
<el-input
<el-input-number
:precision=
"2"
:step=
"0.1"
:controls =
'false'
class=
"money_exc"
style=
"width:700px;"
type=
"text"
v-model=
"form.exchange_rate"
placeholder=
"例如美元转人民币汇率"
></el-input>
placeholder=
"例如美元转人民币汇率
,只保留小说点后2位
"
></el-input
-number
>
</el-form-item>
<el-form-item
label=
"商品链接:"
>
<el-input
v-if=
"activeName=='first'"
style=
"width:700px;"
type=
"textarea"
v-model=
"form.desc"
:autosize=
"
{ minRows: 4, maxRows: 8}"
placeholder="请输入其它平台商品的链接,单次最多允许输入10条链接,以英文逗号隔开"
>
</el-input>
<el-input
v-if=
"activeName=='second'"
style=
"width:700px;"
type=
"textarea"
v-model=
"form.desc"
:autosize=
"
{ minRows: 4, maxRows: 8}"
placeholder="请输入其它平台商品的链接,单次最多允许输入1条链接,以英文逗号隔开"
>
</el-input>
</el-form-item>
<el-form-item
label=
"商品分类:"
>
<el-cascader
...
...
@@ -147,7 +157,7 @@ export default {
}
let
urlarr
if
(
this
.
form
.
desc
)
{
if
(
this
.
form
.
desc
&&
this
.
activeName
==
'first'
)
{
urlarr
=
this
.
form
.
desc
.
split
(
','
)
//debugger
...
...
@@ -166,7 +176,16 @@ export default {
this
.
$message
.
error
(
'请填写需要导入的商品链接!'
);
return
false
}
}
else
{
}
else
if
(
this
.
form
.
desc
&&
this
.
activeName
==
'second'
)
{
urlarr
=
this
.
form
.
desc
.
split
(
','
)
if
(
urlarr
.
length
>
1
)
{
this
.
$message
({
message
:
'您单次输入的链接数量超过1条!'
,
type
:
'warning'
});
return
false
}
}
else
{
this
.
$message
.
error
(
'请填写需要导入的商品链接!'
);
return
false
}
...
...
@@ -194,9 +213,11 @@ export default {
let
allCount
=
Number
(
urlarr
.
length
);
//let failCount = 0;
let
msg
=
''
;
debugger
if
(
res
.
code
===
1
)
{
// 单条导入 提示语
if
(
allCount
===
1
)
{
if
(
this
.
activeName
==
'first'
){
if
(
allCount
===
1
)
{
if
(
Number
(
res
.
data
)
===
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'您好,商品已导入成功,请在仓库中进行编辑后申请上架'
});
}
else
{
...
...
@@ -207,15 +228,23 @@ export default {
//failCount = this.minus( allCount, sucCount )
msg
=
"您好,一共导入"
+
allCount
+
"条商品,"
+
sucCount
+
"条导入成功,请在仓库中进行编辑后申请上架"
;
this
.
$message
({
type
:
'warning'
,
message
:
msg
})
}
}
else
{
msg
=
res
.
message
||
res
.
msg
?
res
.
message
||
res
.
msg
:
'导入失败'
this
.
$message
({
type
:
'error'
,
message
:
msg
})
}
}
else
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'您好,商品已导入成功,请在仓库中进行编辑后申请上架'
});
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'您好,商品导入失败,请您重新导入'
});
}
}
this
.
el_value
=
[]
this
.
$refs
.
cascaderDom
.
$refs
.
panel
.
activePath
=
[]
this
.
form
.
desc
=
''
this
.
form
.
exchange_rate
=
''
}
else
{
msg
=
res
.
message
||
res
.
msg
?
res
.
message
||
res
.
msg
:
'导入失败'
this
.
$message
({
type
:
'error'
,
message
:
msg
})
}
this
.
info
()
...
...
@@ -338,5 +367,7 @@ export default {
height
:
100%
;
overflow
:
auto
;
}
::v-deep
.money_exc
.el-input
.el-input__inner
{
text-align
:
left
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论