Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
b54ece7e
提交
b54ece7e
authored
5月 19, 2022
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'yc-3.1.0' into test
上级
6e21d708
90fa9292
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
38 行增加
和
2 行删除
+38
-2
goodsparameter.vue
src/views/system/goods/add/components/goodsparameter.vue
+38
-2
没有找到文件。
src/views/system/goods/add/components/goodsparameter.vue
浏览文件 @
b54ece7e
...
...
@@ -91,7 +91,8 @@
</el-table-column>
<el-table-column
align=
"center"
prop=
""
label=
"起订量"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model
.
number=
"scope.row.quantity"
placeholder=
"起订量"
></el-input>
<el-input
size=
"mini"
style=
"width:90%"
v-model
.
number=
"scope.row.quantity"
placeholder=
"起订量"
@
input=
"oninput(scope.$index,scope.row,1)"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
""
label=
"价格"
>
...
...
@@ -319,6 +320,7 @@
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
v-for=
"(iten,inde) in scope.row.ladder"
:key=
"inde"
style=
"width:90%"
v-model
.
number=
"scope.row.ladder[inde].quantity"
placeholder=
"请输入"
@
input=
"oninput2(scope.$index,inde,scope.row.ladder[inde])"
class=
"custom-el-input-con"
></el-input>
</
template
>
</el-table-column>
...
...
@@ -361,6 +363,7 @@
<
script
>
import
{
UploadImg
}
from
'@/api/module/goods'
;
import
{
debounce
}
from
"@/utils"
;
export
default
{
name
:
'goodsparameter'
,
props
:
{
...
...
@@ -411,6 +414,12 @@ export default {
pos0
:
""
,
pos1
:
""
,
},
scopeIndex
:
0
,
scopeRow
:
{},
specIndex
:
0
,
scopeIndex2
:
0
,
scopeRow2
:
{},
}
// return end
},
watch
:{
...
...
@@ -449,12 +458,39 @@ export default {
this
.
$bus
.
$emit
(
"initSpecIsLadderVal"
,
this
.
parameterdata
.
is_ladder_spec
)
}
console
.
log
(
"编辑刚加载:"
,
this
.
parameterdata
)
//
console.log("编辑刚加载:",this.parameterdata)
},
beforeDestroy
()
{
this
.
$bus
.
$off
(
'customPriceSpec'
)
},
methods
:
{
oninput
(
a
,
b
,
type
)
{
this
.
scopeIndex
=
a
;
this
.
scopeRow
=
b
;
this
.
debounceOninput
();
},
// 单规格
debounceOninput
:
debounce
(
function
(){
if
(
this
.
scopeIndex
>
0
)
{
if
(
this
.
scopeRow
.
quantity
<=
this
.
parameterdata
.
ladder
[
this
.
scopeIndex
-
1
].
quantity
)
{
this
.
$message
({
type
:
"warning"
,
message
:
"当前数量应该比前一个数量值大"
});
}
}
},
500
),
// 多规格
oninput2
(
a
,
b
,
c
)
{
this
.
specIndex
=
a
;
this
.
scopeIndex2
=
b
;
this
.
scopeRow2
=
c
;
this
.
debounceOninput2
();
},
debounceOninput2
:
debounce
(
function
(){
if
(
this
.
scopeIndex2
>
0
)
{
if
(
this
.
scopeRow2
.
quantity
<=
this
.
parameterdata
.
specs_group
[
this
.
specIndex
].
ladder
[
this
.
scopeIndex2
-
1
].
quantity
)
{
this
.
$message
({
type
:
"warning"
,
message
:
"当前数量应该比前一个数量值大"
});
}
}
},
500
),
/** 初始化 商品售价 数据 */
initInfo
()
{
this
.
orgGoodsPam
=
{};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论