Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
914cea70
提交
914cea70
authored
7月 23, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加商品接口0.5
上级
bda5cd9a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
605 行增加
和
326 行删除
+605
-326
goods.js
src/api/module/goods.js
+9
-2
permission.js
src/permission.js
+7
-8
index.js
src/router/index.js
+22
-5
permission.js
src/store/modules/permission.js
+4
-1
newyuncang.vue
src/views/entry/newyuncang.vue
+8
-6
index.vue
src/views/system/asset/bankcard/index.vue
+14
-55
index.vue
src/views/system/asset/withdraw/index.vue
+1
-1
goodsaftersale.vue
src/views/system/goods/add/components/goodsaftersale.vue
+39
-21
goodsimg.vue
src/views/system/goods/add/components/goodsimg.vue
+126
-72
goodsinfomation.vue
src/views/system/goods/add/components/goodsinfomation.vue
+121
-45
goodsparameter.vue
src/views/system/goods/add/components/goodsparameter.vue
+117
-57
goodsspecifications.vue
...views/system/goods/add/components/goodsspecifications.vue
+112
-40
index.vue
src/views/system/goods/add/index.vue
+25
-13
没有找到文件。
src/api/module/goods.js
浏览文件 @
914cea70
...
...
@@ -18,9 +18,16 @@ export function GetCategory(query) {
})
}
// 查询运费模板
// export function GetFreight(query) {
// return request({
// url: '/system/goods/getFreight',
// method: 'get',
// params: query
// })
// }
export
function
GetFreight
(
query
)
{
return
request
({
url
:
'/system/
goods
/getFreight'
,
url
:
'/system/
freightNew
/getFreight'
,
method
:
'get'
,
params
:
query
})
...
...
@@ -70,7 +77,7 @@ export function delGoods(ids) {
//上传图片
export
function
UploadImg
(
data
)
{
return
request
({
url
:
'/system/goods
/uploadImg
'
,
url
:
'/system/goods
New/uploadImage
'
,
method
:
'post'
,
data
:
data
})
...
...
src/permission.js
浏览文件 @
914cea70
...
...
@@ -7,24 +7,23 @@ import { getToken } from '@/utils/auth'
NProgress
.
configure
({
showSpinner
:
false
})
const
whiteList
=
[
'/login'
,
'/platformlogin'
,
'/auth-redirect'
,
'/bind'
,
'/register'
]
const
whiteList
=
[
'/login'
,
'/platformlogin'
,
'/auth-redirect'
,
'/bind'
,
'/register'
,
'/newyuncang'
]
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
//debugger
NProgress
.
start
()
// console.log("getToken()",getToken())
if
(
getToken
())
{
//
/* has token*/
if
(
to
.
path
===
'/login'
)
{
return
false
next
({
path
:
'/'
})
NProgress
.
done
()
}
else
{
// console.log(3333)
if
(
store
.
getters
.
roles
.
length
===
0
)
{
// console.log(4444)
// 判断当前用户是否已拉取完user_info信息
store
.
dispatch
(
'GetInfo'
).
then
(
res
=>
{
// console.log("res",res.data.Role)
// return false
// 拉取user_info
const
roles
=
res
.
data
.
Role
...
...
@@ -53,15 +52,15 @@ router.beforeEach((to, from, next) => {
}
}
}
else
{
//debugger
// 没有token
if
(
whiteList
.
indexOf
(
to
.
path
)
!==
-
1
)
{
console
.
log
(
"在免登录白名单,直接进入"
)
console
.
log
(
"在免登录白名单,直接进入"
)
// 在免登录白名单,直接进入
next
()
}
else
{
//
console.log(999999)
next
(
`/
login
?redirect=
${
to
.
path
}
`
)
// 否则全部重定向到登录页
//
next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
next
(
`/
newyuncang
?redirect=
${
to
.
path
}
`
)
// 否则全部重定向到登录页
NProgress
.
done
()
}
}
...
...
src/router/index.js
浏览文件 @
914cea70
import
Vue
from
'vue'
import
Router
from
'vue-router'
Vue
.
use
(
Router
)
/* Layout */
...
...
@@ -40,11 +41,22 @@ export const constantRoutes = [
}
]
},
{
path
:
'/setpsd'
,
component
:
(
resolve
)
=>
require
([
'@/views/system/settings/setpsd'
],
resolve
),
hidden
:
true
},
// {
// path: '/redirect',
// component: Layout,
// hidden: true,
// children: [
// {
// path: '/redirect/:path(.*)',
// component: (resolve) => require(['@/views/redirect'], resolve)
// }
// ]
// },
// {
// path: '/setpsd',
// component: (resolve) => require(['@/views/system/settings/setpsd'], resolve),
// hidden: true
// },
{
path
:
'/platformlogin'
,
component
:
(
resolve
)
=>
require
([
'@/views/platformlogin'
],
resolve
),
...
...
@@ -65,6 +77,11 @@ export const constantRoutes = [
component
:
(
resolve
)
=>
require
([
'@/views/error/401'
],
resolve
),
hidden
:
true
},
{
path
:
'/newyuncang'
,
component
:
(
resolve
)
=>
require
([
'@/views/entry/newyuncang'
],
resolve
),
hidden
:
true
},
// 总体流程
{
path
:
'/process'
,
...
...
src/store/modules/permission.js
浏览文件 @
914cea70
...
...
@@ -20,6 +20,9 @@ const permission = {
return
new
Promise
(
resolve
=>
{
// 向后端请求路由数据
getRouters
().
then
(
res
=>
{
if
(
!
res
.
data
)
{
res
.
data
=
[];
}
const
accessedRoutes
=
filterAsyncRouter
(
res
.
data
)
accessedRoutes
.
push
({
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
})
commit
(
'SET_ROUTES'
,
accessedRoutes
)
...
...
@@ -40,7 +43,7 @@ function filterAsyncRouter(asyncRouterMap) {
route
.
component
=
Layout
}
else
{
route
.
component
=
LayoutChildren
}
}
}
else
{
route
.
component
=
loadView
(
route
.
component
)
}
...
...
src/views/entry/newyuncang.vue
浏览文件 @
914cea70
...
...
@@ -181,16 +181,16 @@
<div
class=
"brand-carousel"
>
<el-carousel
ref=
"cardShow"
@
change=
"brandCarChange()"
:autoplay=
"false"
arrow=
"never"
indicator-position=
"none"
type=
"card"
class=
"card-show"
height=
"400px"
style=
"margin: 20px auto;"
>
<el-carousel-item
name=
"1"
class=
"pre-el-carousel-item"
>
<img
src=
"../../assets/image/website/
服饰
.png"
alt=
""
>
<img
src=
"../../assets/image/website/
clothesImgs
.png"
alt=
""
>
</el-carousel-item>
<el-carousel-item
name=
"2"
class=
"pre-el-carousel-item"
>
<img
src=
"../../assets/image/website/
电器
.png"
alt=
""
>
<img
src=
"../../assets/image/website/
electricalImgs
.png"
alt=
""
>
</el-carousel-item>
<el-carousel-item
name=
"3"
class=
"pre-el-carousel-item"
>
<img
src=
"../../assets/image/website/
食品
.png"
alt=
""
>
<img
src=
"../../assets/image/website/
foodImgs
.png"
alt=
""
>
</el-carousel-item>
<el-carousel-item
name=
"4"
class=
"pre-el-carousel-item"
>
<img
src=
"../../assets/image/website/
母婴
.png"
alt=
""
>
<img
src=
"../../assets/image/website/
maternalImgs
.png"
alt=
""
>
</el-carousel-item>
</el-carousel>
</div>
...
...
@@ -280,12 +280,13 @@
toRegister
()
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
var
ssa
=
window
.
location
.
host
;
window
.
location
.
href
=
'http://sso.jxhh.com/logout?redirect=http://'
+
ssa
// window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa
window
.
location
.
href
=
'http://sso.jxhh.com/logout?redirect=http://'
+
window
.
location
.
host
+
'/platformlogin'
})
},
// 去登录
toLogin
()
{
window
.
location
.
href
=
'http://sso.jxhh.com/logout?redirect=http://'
+
window
.
location
.
host
+
'/platformlogin'
//
window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + window.location.host + '/platformlogin'
}
}
// methods end
...
...
@@ -707,6 +708,7 @@
}
.el-carousel__item
:nth-child
(
2n
)
{
background-color
:
#fff
;
transform
:
scaleY
(
1
.8
);
}
//
.el-carousel__item
:nth-child
(
2n
+
1
)
{
...
...
src/views/system/asset/bankcard/index.vue
浏览文件 @
914cea70
...
...
@@ -24,13 +24,9 @@
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"商户ID"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"开户名"
align=
"center"
prop=
"bank_account_name"
/>
<!--
<el-table-column
label=
"城市名"
align=
"center"
prop=
"ProvinceCity"
/>
-->
<el-table-column
label=
"银行名称"
align=
"center"
prop=
"bank_name"
/>
<el-table-column
label=
"开户行"
align=
"center"
prop=
"bank_branch_name"
/>
<el-table-column
label=
"账号"
align=
"center"
prop=
"bank_account_sn"
/>
<!--
<el-table-column
label=
"支付宝账户名称"
align=
"center"
prop=
"ZfbAccountName"
/>
-->
<!--
<el-table-column
label=
"支付宝账户"
align=
"center"
prop=
"ZfbAccount"
/>
-->
<!--
<el-table-column
label=
"类型"
:formatter=
"btypa"
align=
"center"
prop=
"State"
/>
-->
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"scope"
>
<el-button
...
...
@@ -49,36 +45,12 @@
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加或修改商户银行卡对话框 -->
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
<!-- <el-form-item label="类型">-->
<!-- <el-select @change="selectChanged" v-model="form.txType" placeholder="类型">-->
<!-- <el-option v-for="item in state" :key="item.value" :label="item.label"-->
<!-- :value="item.value"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
<!-- <el-button @click="cancel">取 消</el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<el-dialog
:visible
.
sync=
"bank"
:title=
"banktitle"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"90px"
size=
"small"
>
<!-- <el-row>-->
<!-- <el-col :span="16" :offset="3">-->
<!-- <el-form-item label="开户城市" prop="ProvinceCity">-->
<!-- <el-input v-model="form.ProvinceCity" placeholder="请输入城市名和商户提交时一致"/>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col
:span=
"16"
:offset=
"3"
>
<el-form-item
label=
"银行名称"
>
<el-select
v-model=
"form.bankName"
placeholder=
"
状态
"
style=
"width: 100%"
>
<el-form-item
label=
"银行名称"
prop=
"bankName"
>
<el-select
v-model=
"form.bankName"
placeholder=
"
请选择银行名称
"
style=
"width: 100%"
>
<el-option
v-for=
"item in bankList"
:key=
"item.value"
:label=
"item.value"
:value=
"item.value"
></el-option>
</el-select>
...
...
@@ -117,21 +89,6 @@
</div>
</el-dialog>
<!-- <el-dialog :visible.sync="zfb" :title="banktitle">-->
<!-- <el-form ref="form" :model="form" :rules="rules2" label-width="80px">-->
<!-- <el-form-item label="支付宝账户名称" prop="ZfbAccountName">-->
<!-- <el-input v-model="form.ZfbAccountName" placeholder="请输入支付宝账户名称"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="支付宝账户" prop="ZfbAccount">-->
<!-- <el-input v-model="form.ZfbAccount" placeholder="请输入支付宝账户"/>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
<!-- <el-button @click="cancel">取 消</el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
</el-card>
</div>
</template>
...
...
@@ -183,18 +140,20 @@
},
// 表单校验
rules
:
{},
rules2
:
{
ZfbAccountName
:
[
{
required
:
true
,
message
:
"支付宝账户名称不能为空"
,
trigger
:
"blur"
}
rules
:
{
bankName
:
[
{
required
:
true
,
message
:
"银行名称不能为空"
,
trigger
:
"change"
}
],
ZfbAccount
:
[
{
required
:
true
,
message
:
"
支付宝账号
不能为空"
,
trigger
:
"blur"
}
bank_branch_name
:
[
{
required
:
true
,
message
:
"
开户行
不能为空"
,
trigger
:
"blur"
}
],
// zfb_account_name: [
// { required: true, message: "支付宝账户名称不能为空", trigger: "blur" }
// ],
}
bankAccountName
:
[
{
required
:
true
,
message
:
"户名不能为空"
,
trigger
:
"blur"
}
],
BankAccountSn
:
[
{
required
:
true
,
message
:
"账号不能为空"
,
trigger
:
"blur"
}
],
},
};
},
created
()
{
...
...
src/views/system/asset/withdraw/index.vue
浏览文件 @
914cea70
...
...
@@ -24,7 +24,7 @@
<el-form-item
label=
"银行卡"
prop=
"bank_id"
>
<el-select
v-model=
"form.bank_id"
placeholder=
"选择到账银行卡"
style=
"width:260px;"
>
<el-option
v-for=
"item in banklist"
:key=
"item.Id"
:label=
"item.bank_name ? item.bank_name : bank_account_name"
:label=
"item.bank_name ? item.bank_name :
item.
bank_account_name"
:value=
"item.id ? item.id : item.Id"
></el-option>
</el-select>
</el-form-item>
...
...
src/views/system/goods/add/components/goodsaftersale.vue
浏览文件 @
914cea70
...
...
@@ -2,28 +2,28 @@
<div
class=
"goods-after-sale"
>
<el-form
ref=
"goodsAfterSaleForm"
:model=
"goodsAfterSaleForm"
:rules=
"goodsAfterSaleRules"
label-width=
"150px"
size=
"small"
>
<el-form-item
label=
"服务标签:"
prop=
"
fwbq
"
>
<el-checkbox-group
v-model=
"goodsAfterSaleForm.
fwbq
"
>
<el-checkbox
v-for=
"item in tagOptions"
:label=
"item.id"
true-label
:key=
"item.id"
>
{{
item
.
tag
}}
</el-checkbox>
<el-form-item
label=
"服务标签:"
prop=
"
stags
"
>
<el-checkbox-group
v-model=
"goodsAfterSaleForm.
stags
"
>
<el-checkbox
v-for=
"item in tagOptions"
:label=
"item.id"
true-label
:key=
"item.id"
@
change=
"serviceTagsChange(item.id)"
>
{{
item
.
tag
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
label=
"邮费模板:"
prop=
"freight
I
d"
>
<el-select
v-model=
"goodsAfterSaleForm.freight
I
d"
placeholder=
"请选择邮费模板"
style=
"width:400px;"
>
<el-form-item
label=
"邮费模板:"
prop=
"freight
_i
d"
>
<el-select
v-model=
"goodsAfterSaleForm.freight
_i
d"
placeholder=
"请选择邮费模板"
style=
"width:400px;"
>
<el-option
v-for=
"item in freightOptions"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"发货时效:"
prop=
"
Delay
ompensate"
>
<el-select
v-model=
"goodsAfterSaleForm.
Delay
ompensate"
style=
"width:400px;"
placeholder=
"请选择发货时效"
>
<el-form-item
label=
"发货时效:"
prop=
"
delay_c
ompensate"
>
<el-select
v-model=
"goodsAfterSaleForm.
delay_c
ompensate"
style=
"width:400px;"
placeholder=
"请选择发货时效"
>
<el-option
label=
"24小时"
:value=
"24"
></el-option>
<el-option
label=
"48小时"
:value=
"48"
></el-option>
<el-option
label=
"72小时"
:value=
"72"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"售后时长:"
prop=
"aftersale
T
ime"
>
<el-select
v-model=
"goodsAfterSaleForm.aftersale
T
ime"
style=
"width:400px;"
placeholder=
"请选择售后时长"
>
<el-form-item
label=
"售后时长:"
prop=
"aftersale
_t
ime"
>
<el-select
v-model=
"goodsAfterSaleForm.aftersale
_t
ime"
style=
"width:400px;"
placeholder=
"请选择售后时长"
>
<el-option
label=
"7天"
:value=
"7"
></el-option>
<el-option
label=
"15天"
:value=
"15"
></el-option>
<el-option
label=
"30天"
:value=
"30"
></el-option>
...
...
@@ -47,8 +47,8 @@
}
},
data
()
{
let
check
Fwbq
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
goodsAfterSaleForm
.
fwbq
.
length
===
0
)
{
let
check
Stags
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
goodsAfterSaleForm
.
stags
.
length
===
0
)
{
callback
(
new
Error
(
"请选择服务类型"
));
}
else
{
callback
();
...
...
@@ -56,21 +56,23 @@
};
return
{
goodsAfterSaleForm
:
{
fwbq
:
[],
freight
I
d
:
310
,
Delay
ompensate
:
24
,
aftersale
T
ime
:
7
stags
:
[],
freight
_i
d
:
310
,
delay_c
ompensate
:
24
,
aftersale
_t
ime
:
7
},
goodsAfterSaleRules
:
{
fwbq
:
[{
required
:
true
,
validator
:
checkFwbq
}],
freight
I
d
:
[{
required
:
true
,
message
:
'请选择邮费模板'
,
trigger
:
'change'
}],
Delay
ompensate
:
[{
required
:
true
,
message
:
'请选择发货时效'
,
trigger
:
'change'
}],
aftersale
T
ime
:
[{
required
:
true
,
message
:
'请选择售后时长'
,
trigger
:
'change'
}]
stags
:
[{
required
:
true
,
validator
:
checkStags
}],
freight
_i
d
:
[{
required
:
true
,
message
:
'请选择邮费模板'
,
trigger
:
'change'
}],
delay_c
ompensate
:
[{
required
:
true
,
message
:
'请选择发货时效'
,
trigger
:
'change'
}],
aftersale
_t
ime
:
[{
required
:
true
,
message
:
'请选择售后时长'
,
trigger
:
'change'
}]
},
tagOptions
:
[
{
id
:
2
,
tag
:
"假一赔十"
},
{
id
:
3
,
tag
:
"7天退换"
},
{
id
:
4
,
tag
:
"不可退还"
},
{
id
:
5
,
tag
:
"厂家直供"
}
{
id
:
5
,
tag
:
"厂家直供"
},
{
id
:
6
,
tag
:
"售后无忧"
}
],
freightOptions
:
[]
}
// return end
...
...
@@ -81,14 +83,30 @@
methods
:
{
// 运费模板
getFreightData
()
{
// let query = { page: 1, limit: 50 };
GetFreight
().
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
freightOptions
=
res
.
data
this
.
freightOptions
=
res
.
data
.
list
;
}
else
{
this
.
freightOptions
=
''
}
});
},
// 服务标签,7天退换、不可退换互斥
serviceTagsChange
(
id
)
{
let
index4
=
this
.
goodsAfterSaleForm
.
stags
.
indexOf
(
4
);
let
index3
=
this
.
goodsAfterSaleForm
.
stags
.
indexOf
(
3
);
if
(
id
==
3
)
{
if
(
index4
>
-
1
)
{
this
.
goodsAfterSaleForm
.
stags
.
splice
(
index4
,
1
)
}
}
if
(
id
==
4
)
{
if
(
index3
>
-
1
)
{
this
.
goodsAfterSaleForm
.
stags
.
splice
(
index3
,
1
)
}
}
},
// 商品信息 子组件 form表单校验, 在父组件中被调用
validateGoodsAfterSaleForm
()
{
let
flag
=
null
...
...
src/views/system/goods/add/components/goodsimg.vue
浏览文件 @
914cea70
<
template
>
<div
class=
"goods-img"
v-loading=
"loading"
>
<el-form
ref=
"goodsDeForm"
:model=
"goodsDeForm"
:rules=
"goodsDeRules"
label-width=
"150px"
size=
"small"
>
<div
class=
"goods-img"
>
<el-form
ref=
"goodsDeForm"
:model=
"goodsDeForm"
label-width=
"150px"
size=
"small"
>
<el-form-item
label=
"商品详情:"
prop=
"spxq"
>
<span
class=
"tip-span
"
style=
"display: block;line-height: 34px;"
>
上传图片详情,用于商品详情页展示,建议尺寸宽度为750px或790px
</span>
<span
class=
"tip-span
up-img-tip"
style=
"display: block;line-height: 34px;"
>
上传图片详情,用于商品详情页展示
</span>
<el-upload
class=
"upload-img"
list-type=
"picture-card"
class=
"avatar-uploader2"
action=
"#"
:limit=
"10"
:on-exceed=
"limitImg10"
:http-request=
"uploadGoodsDetailsImg"
:on-preview=
"handlePicPreview"
:on-remove=
"handleRemove"
name=
"file"
auto-upload
:show-file-list=
"false"
multiple
:file-list=
"goodsDetailsImgFileList"
><i
class=
"el-icon-plus"
/>
</el-upload>
<el-dialog
:visible
.
sync=
"goodsDeImgVisible"
>
<img
width=
"100%"
:src=
"goodsDeImgUrlDialog"
alt=
""
>
</el-dialog>
<input
class=
"uploadImg"
style=
"display: none;"
type=
"file"
ref=
"file"
accept=
"image/*"
@
change=
"fileChange($event)"
name=
"file"
multiple
id=
"file"
>
<quill-editor
class=
"quill-editor-class"
ref=
"myTextEditor"
v-model=
"description"
:options=
"editorOption"
@
change=
"onEditorChange"
style=
"height:500px;margin-bottom:20px;"
></quill-editor>
</el-form-item>
</el-form>
</div>
...
...
@@ -25,7 +22,8 @@
<
script
>
import
{
UploadImg
}
from
'@/api/module/goods'
// 工具栏配置
const
toolbarOptions
=
[
[
'image'
]
];
export
default
{
name
:
"Goodsimg"
,
props
:
{
...
...
@@ -35,24 +33,44 @@
}
},
data
()
{
let
checkImg
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
goodsDetailsImgFileList
.
length
<
1
)
{
callback
(
new
Error
(
"请上传商品详情的图片"
));
}
else
{
callback
();
}
};
//
let checkImg = (rule, value, callback) => {
//
if (this.goodsDetailsImgFileList.length
<
1
)
{
//
callback(new Error("请上传商品详情的图片"));
//
} else {
//
callback();
//
}
//
};
return
{
loading
:
false
,
goodsDeForm
:
{
spxq
:
''
},
goodsDeRules
:
{
spxq
:[{
required
:
true
,
message
:
'请上传商品详情图片'
,
validator
:
checkImg
}]
},
goodsDeImgVisible
:
false
,
goodsDeImgUrlDialog
:
''
,
// goodsDeRules: {
// spxq:[{required: true, message: '请上传商品详情图片', validator: checkImg}]
// },
description
:
''
,
goodsDetailsImgFileList
:
[],
editorOption
:
{
placeholder
:
''
,
theme
:
'snow'
,
// or 'bubble'
modules
:
{
toolbar
:
{
container
:
toolbarOptions
,
// 工具栏
handlers
:
{
'image'
:
function
(
value
)
{
if
(
value
)
{
// 触发input框选择图片文件
document
.
querySelector
(
'#file'
).
click
()
}
else
{
this
.
quill
.
format
(
'image'
,
false
);
}
}
}
}
}
},
index
:
0
,
indexall
:
0
,
};
},
components
:
{},
...
...
@@ -60,61 +78,66 @@
},
watch
:
{},
methods
:
{
// 上传 详情 图片
uploadGoodsDetailsImg
(
param
)
{
this
.
getBase64
(
param
.
file
).
then
(
res
=>
{
// 通过原生 input上传 图片
fileChange
()
{
const
list
=
this
.
$refs
.
file
.
files
;
this
.
indexall
=
list
.
length
this
.
uploadImgs
()
},
// 向后台 传输 base64的图片数据
uploadImgs
()
{
this
.
getBase64
(
this
.
$refs
.
file
.
files
[
this
.
index
]).
then
((
res
)
=>
{
let
result
=
res
.
split
(
","
);
this
.
Base64img
=
result
[
1
];
let
data
=
{
"image"
:
this
.
Base64img
};
UploadImg
(
data
).
then
(
res
=>
{
let
urlObj
=
{
'url'
:
''
};
if
(
res
.
data
)
{
urlObj
.
url
=
res
.
data
.
data
.
imageUrl
;
this
.
goodsDetailsImgFileList
.
push
(
urlObj
);
this
.
$message
({
type
:
'success'
,
message
:
'图片上传成功'
});
// // 只清除一次,不浪费哦
if
(
this
.
goodsDetailsImgFileList
.
length
===
1
)
{
this
.
$refs
.
goodsDeForm
.
clearValidate
(
'spxq'
);
let
data
=
{
"img_data"
:
this
.
Base64img
}
debugger
// this.loading = true;
UploadImg
(
data
).
then
(
res
=>
{
debugger
if
(
res
&&
res
.
code
===
1
)
{
this
.
index
++
;
this
.
goodsDetailsImgFileList
.
push
({
'url'
:
res
.
data
.
image_url
});
this
.
$message
({
message
:
'上传成功'
,
type
:
'success'
});
// 获取富文本组件实例
let
quill
=
this
.
$refs
.
myTextEditor
.
quill
;
let
length
=
quill
.
getSelection
().
index
;
// 插入图片 res.data.url为服务器返回的图片地址
quill
.
insertEmbed
(
length
,
'image'
,
res
.
data
.
image_url
)
// 调整光标到最后
quill
.
setSelection
(
length
+
1
)
if
(
this
.
index
<
this
.
indexall
){
this
.
uploadImgs
()
}
else
{
this
.
index
=
0
}
}
else
{
this
.
$message
({
message
:
'上传失败,请重新上传'
,
type
:
'error'
});
}
});
this
.
loading
=
false
;
})
});
},
// 详情图片,限制 20 张
limitImg10
()
{
this
.
$message
({
message
:
'最多上传10张图片'
,
type
:
'warning'
})
},
// 详情图片 预览
handlePicPreview
(
file
)
{
this
.
goodsDeImgUrlDialog
=
file
.
url
;
this
.
goodsDeImgVisible
=
true
;
//
onEditorChange
({
editor
,
html
,
text
})
{
this
.
description
=
html
;
},
// 删除 详情图片
handleRemove
(
file
)
{
for
(
let
i
=
0
;
i
<
this
.
goodsDetailsImgFileList
.
length
;
i
++
)
{
if
(
file
.
uid
===
this
.
goodsDetailsImgFileList
[
i
].
uid
)
{
this
.
goodsDetailsImgFileList
.
splice
(
i
,
1
)
}
}
if
(
this
.
goodsDetailsImgFileList
.
length
===
0
)
{
this
.
$refs
.
goodsDeForm
.
validateField
(
'spxq'
)
}
else
{
this
.
$refs
.
goodsDeForm
.
clearValidate
(
'spxq'
);
}
onEditorBlur
(){
//失去焦点事件
},
// 商品详情 子组件 form表单校验, 在父组件中被调用
validateGoodsDeImgForm
()
{
let
flag
=
null
this
.
$refs
[
'goodsDeForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
flag
=
true
}
else
{
flag
=
false
}
})
return
flag
},
//
validateGoodsDeImgForm() {
//
let flag = null
//
this.$refs['goodsDeForm'].validate(valid => {
//
if (valid) {
//
flag = true
//
} else {
//
flag = false
//
}
//
})
//
return flag
//
},
// -------------------------通用
// 图片转换为 base64
getBase64
(
file
)
{
...
...
@@ -141,6 +164,37 @@
padding
:
15px
0px
;
margin-top
:
18px
;
}
.avatar-uploader2
{
display
:
none
;
}
.quill-editor-class
{
position
:
relative
;
}
.up-img-tip
{
position
:
absolute
;
top
:
0
;
left
:
60px
;
}
/
deep
/
.ql-toolbar.ql-snow
{
border
:
none
;
border-bottom
:
1px
solid
#ccc
;
padding
:
5px
8px
;
}
/
deep
/
.ql-toolbar.ql-snow
.ql-formats
{
vertical-align
:
baseline
;
margin
:
0
;
padding
:
0
8px
;
border
:
1px
solid
#ccc
;
border-radius
:
3px
;
}
/
deep
/
.ql-toolbar.ql-snow
.ql-formats
:hover
{
background-color
:
#00afff
;
border-color
:
#00afff
;
}
/* 一般提示性文字 */
.tip-span
{
...
...
src/views/system/goods/add/components/goodsinfomation.vue
浏览文件 @
914cea70
差异被折叠。
点击展开。
src/views/system/goods/add/components/goodsparameter.vue
浏览文件 @
914cea70
...
...
@@ -4,63 +4,110 @@
<el-link
class=
"edit-type-span el-icon-search"
type=
"primary"
:underline=
"false"
>
查看各类价格说明
</el-link>
<span
class=
"tip-span"
>
所有商品价格均为含税价,必须开具发票
</span>
</p>
<div
v-for=
"(item,index) in orgGoodsPam.pamTableList"
:key=
"index"
class=
"single-spe-con"
>
<p
style=
"margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;"
>
<!--
<span
v-html=
"preTableTitle[index]"
>
-->
<!--
{{
preTableTitle
[
index
]
}}
-->
<!--
</span>
-->
<span
v-for=
"(itemv,indexv) in orgGoodsPam.pamDataList[index]"
style=
"margin-right:20px;"
>
{{
orgGoodsPam
.
pamNameList
[
indexv
][
'specName'
]
}}
<span>
:
</span>
{{
itemv
[
0
]
}}
</span>
</p>
<el-table
border
size=
"small"
:data=
"item"
style=
"width: 80%"
>
<el-table-column
align=
"center"
prop=
"hh1"
label=
"协议价"
>
<template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh1"
placeholder=
"请输入协议价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh2"
label=
"结算价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh2"
:disabled=
"true"
placeholder=
"根据结算价自动计算"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh3"
label=
"指导价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh3"
placeholder=
"请输入指导价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh4"
label=
"市场价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh4"
placeholder=
"请输入市场价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh5"
label=
"库存量"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh5"
placeholder=
"请输入库存量"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh6"
label=
"库存预警"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh6"
placeholder=
"请输入预警值"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh7"
label=
"图片"
>
<
template
slot-scope=
"scope"
>
</
template
>
</el-table-column>
</el-table>
</div>
<!--
<div
v-if=
"(!orgGoodsPam.pamTableList || orgGoodsPam.pamTableList.length === 0)"
>
-->
<!--
<el-table-->
<!-- border-->
<!-- size="small"-->
<!-- :data="noSpecTable"-->
<!-- style="width: 80%"-->
<!-- >-->
<!--
<el-table-column
align=
"center"
prop=
"hh1"
label=
"协议价"
>
-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh1"
placeholder=
"请输入协议价"
></el-input>
-->
<!--
</
template
>
-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" prop="hh2" label="结算价">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input size="mini" style="width:90%" v-model="scope.row.hh2" :disabled="true" placeholder="根据结算价自动计算"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" prop="hh3" label="指导价">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input size="mini" style="width:90%" v-model="scope.row.hh3" placeholder="请输入指导价"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" prop="hh4" label="市场价">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input size="mini" style="width:90%" v-model="scope.row.hh4" placeholder="请输入市场价"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" prop="hh5" label="库存量">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input size="mini" style="width:90%" v-model="scope.row.hh5" placeholder="请输入库存量"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" prop="hh6" label="库存预警">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input size="mini" style="width:90%" v-model="scope.row.hh6" placeholder="请输入预警值"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" prop="hh7" label="图片">-->
<!-- <template slot-scope="scope">-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<div
v-for=
"(item,index) in orgGoodsPam.pamTableList"
:key=
"index"
class=
"single-spe-con"
>
<p
style=
"margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;"
>
<!-- <span v-html="preTableTitle[index]">-->
<!-- {{ preTableTitle[index] }}-->
<!-- </span>-->
<span
v-for=
"(itemv,indexv) in orgGoodsPam.pamDataList[index]"
style=
"margin-right:20px;"
>
{{orgGoodsPam.pamNameList[indexv]['specName']}}
<span>
:
</span>
{{itemv[0]}}
</span>
</p>
<el-table
border
size=
"small"
:data=
"item"
style=
"width: 80%"
>
<el-table-column
align=
"center"
prop=
"hh1"
label=
"协议价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh1"
placeholder=
"请输入协议价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh2"
label=
"结算价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh2"
:disabled=
"true"
placeholder=
"根据结算价自动计算"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh3"
label=
"指导价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh3"
placeholder=
"请输入指导价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh4"
label=
"市场价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh4"
placeholder=
"请输入市场价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh5"
label=
"库存量"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh5"
placeholder=
"请输入库存量"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh6"
label=
"库存预警"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh6"
placeholder=
"请输入预警值"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh7"
label=
"图片"
>
<
template
slot-scope=
"scope"
>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
...
...
@@ -77,6 +124,17 @@ export default {
return
{
orgGoodsPam
:
{},
preTableTitle
:
[],
noSpecTable
:
[
{
hh1
:
''
,
hh2
:
''
,
hh3
:
''
,
hh4
:
''
,
hh5
:
''
,
hh6
:
''
,
hh7
:
''
,
}
],
// 规格名称数组
// goodsSpecNameList: [],
// // 每一个规格,都是一张表格
...
...
@@ -113,7 +171,9 @@ export default {
},
watch
:{
'parameterdata'
:
function
(
val
)
{
//debugger
this
.
orgGoodsPam
=
val
;
//console.log(175,this.orgGoodsPam);
//this.preTableTitle = [];
// this.orgGoodsPam.pamDataList.forEach((item)=> {
// let preTitle = '';
...
...
src/views/system/goods/add/components/goodsspecifications.vue
浏览文件 @
914cea70
...
...
@@ -20,10 +20,10 @@
<el-option
v-for=
"(itemSN,indexSN) in speOptions"
:key=
"itemSN.id"
:label=
"itemSN.
titl
e"
:value=
"itemSN.
title
"
:label=
"itemSN.
nam
e"
:value=
"itemSN.
id
"
>
<span
style=
"float: left"
class=
"span-style"
>
{{
itemSN
.
titl
e
}}
</span>
<span
style=
"float: left"
class=
"span-style"
>
{{
itemSN
.
nam
e
}}
</span>
<div
class=
"flag"
>
<svg-icon
icon=
"edit"
iconClass=
"template_edit_style"
@
click=
"addSpeName(index)"
/>
</div>
...
...
@@ -48,7 +48,29 @@
</div>
<el-button
@
click=
"addSpe"
class=
"el-icon-plus"
size=
"mini"
>
添加规格
</el-button>
<!--
<el-button
type=
"primary"
plain
class=
"el-icon-plus"
size=
"mini"
@
click=
"hhxx()"
>
生成数据
</el-button>
-->
<!-- 添加 规格名称 -->
<el-dialog
title=
"添加规格名称"
:visible
.
sync=
"addSpecNameDialog"
:destroy-on-close=
"true"
:before-close=
"cancelSpec"
width=
"500px"
center
>
<div>
<p
class=
"add-spec-dialog-con"
>
<span
style=
"margin-right:30px;"
>
输入规格名称:
</span>
<span>
<el-input
v-model=
"specName_sm"
placeholder=
"请输入规格名称"
size=
"small"
style=
"width: 280px;"
></el-input>
</span>
</p>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelSpec"
size=
"mini"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"saveSpecName"
size=
"mini"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
...
...
@@ -77,13 +99,16 @@ export default {
},
speOptions
:
[{
id
:
'1'
,
titl
e
:
'颜色'
nam
e
:
'颜色'
},
{
id
:
'2'
,
titl
e
:
'尺码'
nam
e
:
'尺码'
}],
localSpeOptions
:
[],
// 规格名称,value组成的数组
speNameList
:
[]
speNameList
:
[],
addSpecNameDialog
:
false
,
specName_sm
:
''
,
};
},
created
()
{
...
...
@@ -92,7 +117,10 @@ export default {
this
.
$set
(
this
.
speData
,
this
.
speData
.
length
,
this
.
specsGroup
);
//console.log(71,this.specsGroup.specValue);
},
mounted
()
{},
mounted
()
{
/** 先获取 本地存储的localStorage **/
this
.
getLocalSpecNameOption
();
},
watch
:{},
methods
:
{
/** 添加规格*/
...
...
@@ -122,10 +150,20 @@ export default {
speNameChange
()
{
this
.
speNameListChange
();
},
// selectedCag(vId){
// console.log(vId)
//
// },
// 规格名称,有变化时
speNameListChange
()
{
// 将select 的value值,在
debugger
this
.
speNameList
=
[];
this
.
speData
.
forEach
((
item
,
)
=>
{
this
.
speData
.
forEach
((
item
)
=>
{
let
obj
=
{
specName
:
''
};
if
(
item
.
specName
)
{
obj
.
specName
=
item
.
specName
;
...
...
@@ -175,7 +213,7 @@ export default {
// 底部按钮的点击事件
_this
.
addSpeName
(
index
);
//
//
localSttorage 存储 下拉数据
if
(
speNameDom
.
toggleDropDownVisible
)
{
speNameDom
.
toggleDropDownVisible
(
false
);
}
else
{
...
...
@@ -186,9 +224,57 @@ export default {
}
}
},
getLocalSpecNameOption
()
{
//console.log("先获取:",window.localStorage.getItem('localSpeOptions'));
if
(
!
window
.
localStorage
.
getItem
(
'localSpeOptions'
))
{
this
.
speOptions
=
[];
}
else
{
let
options
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'localSpeOptions'
));
this
.
speOptions
=
options
;
}
},
/* 增加 规格名称 */
addSpeName
(
index
)
{
//console.log(index);
this
.
addSpecNameDialog
=
true
;
// console.log(index);
},
// 添加规格名称,对话框的退出
cancelSpec
()
{
this
.
specName_sm
=
''
;
this
.
addSpecNameDialog
=
false
;
},
// 规格名称,保存
saveSpecName
()
{
let
localObj
=
{
id
:
0
,
name
:
''
};
let
localArr
=
[];
let
localJSON
=
''
;
if
(
this
.
speOptions
.
length
===
0
)
{
let
localObj
=
{
id
:
0
,
name
:
this
.
specName_sm
};
localArr
.
push
(
localObj
);
localJSON
=
JSON
.
stringify
(
localArr
);
}
else
{
let
localObj
=
{
id
:
this
.
speOptions
.
length
,
name
:
this
.
specName_sm
};
this
.
speOptions
.
push
(
localObj
);
localJSON
=
JSON
.
stringify
(
this
.
speOptions
)
}
window
.
localStorage
.
setItem
(
'localSpeOptions'
,
localJSON
)
this
.
addSpecNameDialog
=
false
;
this
.
$message
({
type
:
'success'
,
message
:
'新增成功'
});
this
.
getLocalSpecNameOption
();
},
/** 规格参数 失焦时,进行笛卡尔积算法,并渲染 商品售价 */
...
...
@@ -221,39 +307,18 @@ export default {
];
goodsPam
.
pamTableList
.
push
(
prePamTable
)
});
//console.log("最终结果",goodsPam);
this
.
$emit
(
'calcSpeTable'
,
goodsPam
);
// goodsParametersList.forEach((item)=> {
// let goodsPrePam = {
// pamTitleList: [],
// pamTabList: []
// };
// let tableSingle = [{hh1: '', hh2: '', hh3: '', hh4: '', hh5: '', hh6: '', hh7: ''}];
// // let preTitle = '';
// // if (!Array.isArray(item)) {
// // preTitle = this.speNameList[0].specName + ':' + item;
// // }else {
// // item.forEach((itemI,indexI)=> {
// // preTitle += (this.speNameList[indexI].specName + itemI);
// // });
// // }
// // goodsPrePam.pamTitleList.push(preTitle);
// goodsPrePam.pamTabList.push(tableSingle);
//
// goodsPamList.push(goodsPrePam);
// });
//this.$emit('calcSpeTable',goodsPamList);
// console.log("规格名称:",goodsPamList);
}
// else {
// let goodsPam = {
// pamNameList: [],
// pamDataList: [],
// pamTableList: [],
// };
// this.$emit('calcSpeTable',goodsPam);
// }
}
},
...
...
@@ -376,4 +441,11 @@ export default {
color
:
#ff4949
;
cursor
:
pointer
;
}
.add-spec-dialog-con
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
}
</
style
>
src/views/system/goods/add/index.vue
浏览文件 @
914cea70
...
...
@@ -58,9 +58,9 @@
<p
class=
"card-header-title floor-item-box-title"
><span
class=
"blue-block-goods blue-block-goods-title"
></span>
售后及服务
</p>
<Goodsaftersale
ref=
"goodsaftersale"
:goodsaftersale=
"goodsaftersale"
/>
<div
class=
"submit-type-con"
>
<el-radio-group
v-model=
"submit
Type
"
size=
"small"
>
<el-radio
:label=
"
1
"
border
>
放入仓库
</el-radio>
<el-radio
:label=
"
2
"
border
>
立即上架
</el-radio>
<el-radio-group
v-model=
"submit"
size=
"small"
>
<el-radio
:label=
"
0
"
border
>
放入仓库
</el-radio>
<el-radio
:label=
"
1
"
border
>
立即上架
</el-radio>
</el-radio-group>
</div>
</div>
...
...
@@ -106,7 +106,7 @@
leaf
:
'leaf'
},
isNextStep
:
true
,
isShowGoodsDetails
:
tru
e
,
isShowGoodsDetails
:
fals
e
,
isFIActive
:
0
,
/**/
floorNav
:
[
...
...
@@ -118,6 +118,7 @@
],
/* 商品信息 */
goodsinfodata
:
{
orgGoodsInfoForm
:
{},
categoryList
:
[],
categoryStr
:
''
},
...
...
@@ -131,8 +132,7 @@
goodsaftersale
:
{
},
submitType
:
1
,
submit
:
0
,
TIMER
:
null
,
}
// return end
...
...
@@ -149,7 +149,7 @@
// 规格子组件,传给父组件的数据
calcSpeTable
(
data
)
{
this
.
parameterdata
=
data
;
//
console.log(153,this.parameterdata);
console
.
log
(
153
,
this
.
parameterdata
);
},
// 只有点击完最后一级,才会有值
SSQChange
()
{
...
...
@@ -229,6 +229,8 @@
this
.
goodsinfodata
.
categoryList
=
this
.
SSQList
;
this
.
goodsinfodata
.
categoryStr
=
ssqLabelList
[
0
]
+
'/'
+
ssqLabelList
[
1
]
+
'/'
+
ssqLabelList
[
2
];
this
.
isShowGoodsDetails
=
true
;
// console.log(232,this.goodsinfodata.categoryStr,this.goodsinfodata.categoryList);
},
//
...
...
@@ -239,22 +241,25 @@
save
()
{
// 此处变量 有顺序 校验时,电梯至某处
// // 商品信息 是否填写完整
// let isGoodsInfoMsg = this.$refs['goodsInfo'].validateGoodsInfoForm();
// 商品信息 是否填写完整
//let isGoodsInfoMsg = this.$refs['goodsInfo'].validateGoodsInfoForm();
// // 商品详情
//
let isGoodsDetailsImgMsg = this.$refs['goodsdetailsimg'].validateGoodsDeImgForm()
;
//
let isGoodsDetailsImgMsg = this.$refs.goodsdetailsimg.description ? true : false
;
// // 售后服务 是否填写完整
// let isGoodsAfterSaleMsg = this.$refs['goodsaftersale'].validateGoodsAfterSaleForm();
//
// //console.log(212,this.$refs.goodsaftersale.goodsAfterSaleForm) // 主动获取子组件数据
//
// if(!isGoodsInfoMsg) {
// this.$message({type:'error',message:'商品信息未填写完整'});
// this.setFloorNavMountClick(0);
// return
// }
// if(!isGoodsDetailsImgMsg) {
// this.$message({type:'error',message:'
商品详情未填写完整
'});
// this.$message({type:'error',message:'
请先上传描述商品详情的图片
'});
// this.setFloorNavMountClick(3);
// return
// }
...
...
@@ -265,10 +270,17 @@
// }
// 所有校验通过,整理数据
this
.
specificationsdata
=
this
.
$refs
.
goodsspecifications
.
speData
// 获取 商品信息数据
// goodsInfo goodsInfoForm
let
spxxData
=
this
.
$refs
.
goodsInfo
.
goodsInfoForm
;
// 售后服务 数据
let
ssffData
=
this
.
$refs
.
goodsaftersale
.
goodsAfterSaleForm
;
// 商品详情 数据
let
spxqData
=
this
.
$refs
.
goodsdetailsimg
.
description
;
console
.
log
(
"商品规格数据:"
,
this
.
specificationsd
ata
);
console
.
log
(
"商品规格数据:"
,
spxqD
ata
);
},
/*-----------------------*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论