Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
0cf89f67
提交
0cf89f67
authored
7月 27, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加商品09
上级
2e6905be
全部展开
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
470 行增加
和
294 行删除
+470
-294
goodsparameter.vue
src/views/system/goods/add/components/goodsparameter.vue
+314
-104
goodsspecifications.vue
...views/system/goods/add/components/goodsspecifications.vue
+90
-181
index.vue
src/views/system/goods/add/index.vue
+66
-9
没有找到文件。
src/views/system/goods/add/components/goodsparameter.vue
浏览文件 @
0cf89f67
差异被折叠。
点击展开。
src/views/system/goods/add/components/goodsspecifications.vue
浏览文件 @
0cf89f67
差异被折叠。
点击展开。
src/views/system/goods/add/index.vue
浏览文件 @
0cf89f67
...
@@ -240,24 +240,81 @@
...
@@ -240,24 +240,81 @@
//
//
save
()
{
save
()
{
// 此处变量 有顺序 校验时,电梯至某处
// 此处变量 有顺序 校验时,电梯至某处
// 商品信息 是否填写完整
// 商品信息 是否填写完整
//let isGoodsInfoMsg = this.$refs['goodsInfo'].validateGoodsInfoForm();
let
isGoodsInfoMsg
=
this
.
$refs
[
'goodsInfo'
].
validateGoodsInfoForm
();
// 商品规格 无需校验
// 商品售价,通过获取的数据,分别进行判断
let
isGoodsPrice
=
true
;
let
spsjData
=
this
.
$refs
.
goodsparameter
.
singleSpecTable
;
let
spsjData2
=
this
.
$refs
.
goodsparameter
.
orgGoodsPam
;
//debugger
// 如果有,则说明有规格组合数据
if
(
spsjData2
.
pamTableList
&&
spsjData2
.
pamTableList
.
length
>
0
)
{
//console.log(25522,spsjData2);
for
(
let
i
=
0
;
i
<
spsjData2
.
pamTableList
.
length
;
i
++
)
{
console
.
log
(
"外"
);
// for(let itemKey in spsjData2.pamTableList[i]) {
// console.log('内', spsjData2.pamTableList[i][itemKey])
// }
let
obj
=
{};
obj
=
spsjData2
.
pamTableList
[
i
];
for
(
let
itemKey
in
obj
)
{
console
.
log
(
'内'
,
itemKey
)
}
// for(let itemKey in spsjData2.pamTableList[i]) {
// if ( !spsjData2.pamTableList[i][itemKey] || spsjData2.pamTableList[i][itemKey].length === 0 ) {
// isGoodsPrice = false;
// break
// }else {
// isGoodsPrice = true;
// }
// }
// if( !isGoodsPrice ) {
// break
// }
}
}
else
{
// 无规格组合数据
let
slingleSpeObj
=
spsjData
[
0
];
for
(
let
key
in
slingleSpeObj
)
{
if
(
!
slingleSpeObj
[
key
]
||
(
slingleSpeObj
[
key
].
length
===
0
)
)
{
isGoodsPrice
=
false
;
break
}
else
{
isGoodsPrice
=
true
;
}
}
}
// 商品详情 是否填写完整
let
isGoodsDetailsImgMsg
=
this
.
$refs
.
goodsdetailsimg
.
description
?
true
:
false
;
// 售后服务 是否填写完整
let
isGoodsAfterSaleMsg
=
this
.
$refs
[
'goodsaftersale'
].
validateGoodsAfterSaleForm
();
// 商品售价,由商品规格决定,
// 如果 没有填写商品规格,那么商品售价应该获取
// console.log(258,spsjData2,spsjData);
// return;
// // 商品详情
//let isGoodsDetailsImgMsg = this.$refs.goodsdetailsimg.description ? true : false;
// // 售后服务 是否填写完整
// let isGoodsAfterSaleMsg = this.$refs['goodsaftersale'].validateGoodsAfterSaleForm();
//
// //console.log(212,this.$refs.goodsaftersale.goodsAfterSaleForm) // 主动获取子组件数据
//
// if(!isGoodsInfoMsg) {
// if(!isGoodsInfoMsg) {
// this.$message({type:'error',message:'商品信息未填写完整'});
// this.$message({type:'error',message:'商品信息未填写完整'});
// this.setFloorNavMountClick(0);
// this.setFloorNavMountClick(0);
// return
// return
// }
// }
if
(
!
isGoodsPrice
)
{
this
.
$message
({
type
:
'error'
,
message
:
'商品售价未填写完整'
});
this
.
setFloorNavMountClick
(
2
);
return
}
// if(!isGoodsDetailsImgMsg) {
// if(!isGoodsDetailsImgMsg) {
// this.$message({type:'error',message:'请先上传描述商品详情的图片'});
// this.$message({type:'error',message:'请先上传描述商品详情的图片'});
// this.setFloorNavMountClick(3);
// this.setFloorNavMountClick(3);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论