Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
6b071265
提交
6b071265
authored
7月 07, 2022
作者:
yyf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
云仓3.1.4提测
上级
c6a154cd
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
927 行增加
和
737 行删除
+927
-737
goodsgement.js
src/api/module/goodsgement.js
+8
-0
goodsgement.vue
src/views/system/goodsimport/goodsgement.vue
+904
-727
brand.vue
src/views/system/shop/brand.vue
+15
-10
没有找到文件。
src/api/module/goodsgement.js
浏览文件 @
6b071265
...
...
@@ -80,3 +80,11 @@ export function saveHotEditGoodsData(data) {
data
:
data
})
}
//商品导出
export
function
exportExcel
(
data
)
{
return
request
({
url
:
'/system/goodsNew/excel'
,
method
:
'post'
,
data
:
data
})
}
src/views/system/goodsimport/goodsgement.vue
浏览文件 @
6b071265
...
...
@@ -2,32 +2,67 @@
<div
class=
"app-container"
>
<el-card
class=
"box-card goods-manage-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-radio-group
v-model=
"radiomodel"
class=
"radiomodels"
@
change=
"radiomodelbtn"
>
<el-radio-button
:label=
"1"
>
上架销售中(
{{
onsale_count
}}
)
</el-radio-button>
<el-radio-button
:label=
"2"
>
仓库中的商品(
{{
downsale_count
}}
)
</el-radio-button>
<el-radio-group
v-model=
"radiomodel"
class=
"radiomodels"
@
change=
"radiomodelbtn"
>
<el-radio-button
:label=
"1"
>
上架销售中(
{{
onsale_count
}}
)
</el-radio-button
>
<el-radio-button
:label=
"2"
>
仓库中的商品(
{{
downsale_count
}}
)
</el-radio-button
>
<el-radio-button
:label=
"3"
>
审核记录
</el-radio-button>
<el-radio-button
:label=
"4"
>
最近删除(
{{
del_count
}}
)
</el-radio-button>
<el-radio-button
:label=
"4"
>
最近删除(
{{
del_count
}}
)
</el-radio-button
>
</el-radio-group>
</div>
<el-form
:inline=
"true"
class=
"queryFormInline"
:model=
"formInline"
>
<el-row
:span=
"24"
type=
"flex"
align=
"middle"
justify=
"space-between"
>
<el-col
:span=
"20"
>
<el-form-item
label=
"商品编号"
>
<el-input
v-model
.
trim=
"formInline.goods_id"
size=
"mini"
placeholder=
"填写商品编号"
></el-input>
<el-input
v-model
.
trim=
"formInline.goods_id"
size=
"mini"
placeholder=
"填写商品编号"
></el-input>
</el-form-item>
<el-form-item
label=
"商品名称"
>
<el-input
v-model
.
trim=
"formInline.goods_name"
size=
"mini"
placeholder=
"填写商品名称"
></el-input>
<el-input
v-model
.
trim=
"formInline.goods_name"
size=
"mini"
placeholder=
"填写商品名称"
></el-input>
</el-form-item>
<el-form-item
label=
"商品状态"
v-show=
"radiomodel==3"
>
<el-select
v-model
.
trim=
"formInline.status"
placeholder=
"请选择"
size=
"mini"
style=
'width:100px;'
>
<el-option
label=
"全部"
value=
"5"
v-if=
'radiomodel==3'
></el-option>
<el-option
label=
"审核中"
value=
"1"
v-if=
'radiomodel==3'
></el-option>
<el-option
label=
"审核拒绝"
value=
"2"
v-if=
'radiomodel==3'
></el-option>
<el-form-item
label=
"商品状态"
v-show=
"radiomodel == 3"
>
<el-select
v-model
.
trim=
"formInline.status"
placeholder=
"请选择"
size=
"mini"
style=
"width: 100px"
>
<el-option
label=
"全部"
value=
"5"
v-if=
"radiomodel == 3"
></el-option>
<el-option
label=
"审核中"
value=
"1"
v-if=
"radiomodel == 3"
></el-option>
<el-option
label=
"审核拒绝"
value=
"2"
v-if=
"radiomodel == 3"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"发布时间"
>
<el-date-picker
style=
'width:315px;'
style=
"width: 315px"
v-model
.
trim=
"formInline.uptime"
type=
"daterange"
range-separator=
"至"
...
...
@@ -35,20 +70,28 @@
format=
"yyyy 年 MM 月 dd 日"
value-format=
"timestamp"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"价格区间"
>
<el-input
v-model
.
trim=
"formInline.price_min"
size=
"mini"
placeholder=
"最小价格"
style=
"width:100px;"
></el-input>
<el-input
v-model
.
trim=
"formInline.price_min"
size=
"mini"
placeholder=
"最小价格"
style=
"width: 100px"
></el-input>
-
<el-input
v-model
.
trim=
"formInline.price_max"
size=
"mini"
placeholder=
"最大价格"
style=
"width:100px;"
></el-input>
<el-input
v-model
.
trim=
"formInline.price_max"
size=
"mini"
placeholder=
"最大价格"
style=
"width: 100px"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleQuery"
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleQuery"
>
查询
</el-button>
</el-form-item>
...
...
@@ -56,54 +99,62 @@
<el-col
:span=
"4"
>
<div
style=
"float: right"
>
<el-button
style=
"float:
right;margin-left: 10px;
"
style=
"float:
right; margin-left: 10px
"
type=
"danger"
v-if=
'radiomodel===2'
v-if=
"radiomodel === 2"
size=
"mini"
:disabled=
"multiple"
@
click=
"handledelsale('9',
'del',
'all')"
@
click=
"handledelsale('9',
'del',
'all')"
>
批量删除
</el-button>
<el-button
style=
"float:
right;margin-left: 10px;
"
style=
"float:
right; margin-left: 10px
"
type=
"danger"
v-if=
'radiomodel==4'
v-if=
"radiomodel == 4"
size=
"mini"
:disabled=
"multiple"
@
click=
"handledelgrain('9','all')"
@
click=
"handledelgrain('9',
'all')"
>
彻底删除
</el-button>
<el-button
v-if=
'radiomodel==1'
style=
"float:
right;margin-left: 20px;
"
v-if=
"radiomodel == 1"
style=
"float:
right; margin-left: 10px
"
type=
"primary"
:disabled=
"multiple"
size=
"mini"
@
click=
"handleUpsale('9',
'down',
'all')"
@
click=
"handleUpsale('9',
'down',
'all')"
>
批量下架
</el-button>
<el-button
v-if=
'radiomodel==2'
style=
"float:right;margin-left: 20px;"
v-if=
"radiomodel == 1"
style=
"float: right"
type=
"primary"
size=
"mini"
@
click=
"exportGoods()"
>
导出商品
</el-button>
<el-button
v-if=
"radiomodel == 2"
style=
"float: right; margin-left: 10px"
type=
"primary"
:disabled=
"multiple"
size=
"mini"
@
click=
"handleUpsale('9',
'up',
'all')"
@
click=
"handleUpsale('9',
'up',
'all')"
>
批量申请上架
</el-button>
<el-button
v-if=
'radiomodel==4'
v-if=
"radiomodel == 4"
:disabled=
"multiple"
style=
"float:
right;margin-left: 20px;
"
style=
"float:
right; margin-left: 20px
"
type=
"primary"
size=
"mini"
@
click=
"handledelsale('9',
'return',
'all')"
@
click=
"handledelsale('9',
'return',
'all')"
>
批量还原
</el-button>
<el-button
v-if=
'radiomodel==3'
v-if=
"radiomodel == 3"
:disabled=
"multiple"
style=
"float:
right;margin-left: 20px;align-items:
normal"
style=
"float:
right; margin-left: 20px; align-items:
normal"
type=
"primary"
size=
"mini"
@
click=
"handleCancelUpale"
...
...
@@ -113,40 +164,62 @@
</el-col>
</el-row>
</el-form>
<el-table
v-loading=
"loading"
:data=
"freightList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table
v-loading=
"loading"
:data=
"freightList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"商品主图"
width=
"95"
align=
"center"
>
<template
slot-scope=
"scope"
>
<img
:src=
"scope.row.default_image"
alt=
""
style=
"width:60px;height:60px;"
>
<img
:src=
"scope.row.default_image"
alt=
""
style=
"width: 60px; height: 60px"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"商品编号"
align=
"center"
prop=
"goods_id"
/>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"goods_name"
/>
<el-table-column
label=
"商品编号"
align=
"center"
prop=
"goods_id"
/>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"goods_name"
/>
<el-table-column
label=
"协议价"
align=
"center"
prop=
""
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
js_price
/
100
}}
元
{{
scope
.
row
.
js_price
/
100
}}
元
</
template
>
</el-table-column>
<!-- <el-table-column label="类型" align="center" :formatter="formatType" prop="ChargeType"/> -->
<el-table-column
label=
"库存量"
align=
"center"
prop=
"stock"
/>
<el-table-column
label=
"库存量"
align=
"center"
prop=
"stock"
/>
<el-table-column
label=
"商品状态"
align=
"center"
prop
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"radiomodel
==1||radiomodel==
2"
>
{{
scope
.
row
.
is_onsale
===
0
?
'下架'
:
'上架'
}}
<span
v-if=
"radiomodel
== 1 || radiomodel ==
2"
>
{{
scope
.
row
.
is_onsale
===
0
?
"下架"
:
"上架"
}}
</span>
<span
v-if=
"radiomodel
==
3"
>
{{
scope
.
row
.
up_onsale
===
1
?
'审核中'
:
'审核拒绝'
}}
<span
v-if=
"radiomodel
==
3"
>
{{
scope
.
row
.
up_onsale
===
1
?
"审核中"
:
"审核拒绝"
}}
</span>
<span
v-if=
"radiomodel
==
4"
>
{{
scope
.
row
.
is_on
===
0
?
'已删除'
:
'彻底删除'
}}
<span
v-if=
"radiomodel
==
4"
>
{{
scope
.
row
.
is_on
===
0
?
"已删除"
:
"彻底删除"
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"发布时间"
align=
"center"
:formatter=
"formatTime"
prop=
"add_time"
/>
<el-table-column
label=
"审核说明"
align=
"center"
prop=
"last_perate_content"
width=
"240px"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"发布时间"
align=
"center"
:formatter=
"formatTime"
prop=
"add_time"
/>
<el-table-column
label=
"审核说明"
align=
"center"
prop=
"last_perate_content"
width=
"240px"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
'radiomodel==3&&scope.row.up_onsale===1'
>
<div
v-if=
"radiomodel == 3 && scope.row.up_onsale === 1"
>
<el-button
size=
"mini"
type=
"text"
...
...
@@ -156,111 +229,159 @@
</div>
<div
v-else
>
<el-button
v-if=
"radiomodel
==
1"
v-if=
"radiomodel
==
1"
size=
"mini"
type=
"text"
@
click=
"handleUpsale(scope.row,
'down',
'one')"
@
click=
"handleUpsale(scope.row,
'down',
'one')"
>
下架
</el-button>
<el-button
v-if=
"radiomodel
==
2"
v-if=
"radiomodel
==
2"
size=
"mini"
type=
"text"
@
click=
"handleUpsale(scope.row,
'up',
'one')"
@
click=
"handleUpsale(scope.row,
'up',
'one')"
>
申请上架
</el-button>
<el-button
v-if=
"radiomodel
==
4"
v-if=
"radiomodel
==
4"
size=
"mini"
type=
"text"
@
click=
"handledelsale(scope.row,
'return',
'one')"
@
click=
"handledelsale(scope.row,
'return',
'one')"
>
还原
</el-button>
<el-divider
direction=
"vertical"
v-if=
"radiomodel!=3"
></el-divider>
<el-divider
direction=
"vertical"
v-if=
"radiomodel != 3"
></el-divider>
<!-- 上架销售中,不下架编辑 -->
<el-button
v-if=
"radiomodel
==
1"
v-if=
"radiomodel
==
1"
size=
"mini"
type=
"text"
@
click=
"hotEditGoods(scope.row)"
>
编辑
</el-button>
<el-button
v-if=
"radiomodel
!=4 && radiomodel!=
1"
v-if=
"radiomodel
!= 4 && radiomodel !=
1"
size=
"mini"
type=
"text"
@
click=
"editgoods(scope.row)"
>
编辑
</el-button>
<el-divider
direction=
"vertical"
v-if=
"radiomodel!=4"
></el-divider>
<el-button
size=
"mini
"
type=
"text"
@
click=
"lookdetail(scope.row)"
<el-divider
direction=
"vertical"
v-if=
"radiomodel != 4
"
></el-divider>
<el-button
size=
"mini"
type=
"text"
@
click=
"lookdetail(scope.row)"
>
预览
</el-button>
<el-divider
direction=
"vertical"
v-if=
"radiomodel!=1"
></el-divider>
<el-divider
direction=
"vertical"
v-if=
"radiomodel != 1"
></el-divider>
<el-button
v-if=
"radiomodel
!=4&&radiomodel!=
1"
v-if=
"radiomodel
!= 4 && radiomodel !=
1"
size=
"mini"
type=
"text"
@
click=
"handledelsale(scope.row,
'del',
'one')"
@
click=
"handledelsale(scope.row,
'del',
'one')"
>
删除
</el-button>
<el-button
v-if=
"radiomodel
==
4"
v-if=
"radiomodel
==
4"
size=
"mini"
type=
"text"
@
click=
"handledelgrain(scope.row,'one')"
@
click=
"handledelgrain(scope.row,
'one')"
>
彻底删除
</el-button>
</div>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total
>
0"
v-show=
"total
>
0"
:total=
"total"
:page
.
sync=
"formInline.page"
:limit
.
sync=
"formInline.limit"
@
pagination=
"getList"
/>
<!-- 商品编辑-->
<!-- <el-dialog title="编辑商品" :visible.sync="editisOpen" v-if="editisOpen" width="70%" class="freightTemplate-add">-->
<!-- <editGood :option="goodsid" @closeEditDialog="closeEditGoods"></editGood>-->
<!-- </el-dialog>-->
<el-dialog
title=
"商品详情"
:visible
.
sync=
"isOpen"
center
v-if=
"isOpen"
width=
"70%"
class=
"freightTemplate-add"
:close-on-click-modal=
"false"
>
<!-- <el-dialog title="编辑商品" :visible.sync="editisOpen" v-if="editisOpen" width="70%" class="freightTemplate-add">-->
<!-- <editGood :option="goodsid" @closeEditDialog="closeEditGoods"></editGood>-->
<!-- </el-dialog>-->
<el-dialog
title=
"商品详情"
:visible
.
sync=
"isOpen"
center
v-if=
"isOpen"
width=
"70%"
class=
"freightTemplate-add"
:close-on-click-modal=
"false"
>
<goodDetail
:goods-id=
"goodDetails"
></goodDetail>
</el-dialog>
</el-card>
<!-- 不下架 编辑商品 -->
<el-dialog
title=
"编辑商品"
:visible
.
sync=
"isHotEditGoods"
center
:close-on-click-modal=
"false"
:before-close=
"cancelHotEditGoods"
width=
"50%"
class=
"dialog-spe"
>
<p
class=
"hot-edit-goods-tips"
>
备注:上架销售中的商品,仅可修改【发货时效、邮费模板、售后时长、商品库存量】等信息,修改后无需审核可直接上架。
如需编辑更多商品信息,请先将商品下架再进行编辑。
</p>
<el-form
:model=
"hotEditGoodsForm"
ref=
"hotEditGoodsForm"
label-width=
"30%"
size=
"small"
>
<el-dialog
title=
"编辑商品"
:visible
.
sync=
"isHotEditGoods"
center
:close-on-click-modal=
"false"
:before-close=
"cancelHotEditGoods"
width=
"50%"
class=
"dialog-spe"
>
<p
class=
"hot-edit-goods-tips"
>
备注:上架销售中的商品,仅可修改【发货时效、邮费模板、售后时长、商品库存量】等信息,修改后无需审核可直接上架。
如需编辑更多商品信息,请先将商品下架再进行编辑。
</p>
<el-form
:model=
"hotEditGoodsForm"
ref=
"hotEditGoodsForm"
label-width=
"30%"
size=
"small"
>
<el-form-item
label=
"发货时效:"
prop=
"delay_compensate"
>
<el-select
v-model=
"hotEditGoodsForm.delay_compensate"
style=
"width:400px"
placeholder=
"请选择发货时效"
>
<el-select
v-model=
"hotEditGoodsForm.delay_compensate"
style=
"width: 400px"
placeholder=
"请选择发货时效"
>
<el-option
label=
"24小时"
:value=
"24"
></el-option>
<el-option
label=
"48小时"
:value=
"48"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"邮费模板:"
prop=
"freight_id"
>
<el-select
v-model=
"hotEditGoodsForm.freight_id"
placeholder=
"请选择邮费模板"
style=
"width:400px;"
>
<el-option
v-for=
"item in freightOptions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-select
v-model=
"hotEditGoodsForm.freight_id"
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=
"aftersale_time"
>
<el-select
v-model=
"hotEditGoodsForm.aftersale_time"
style=
"width:400px;"
placeholder=
"请选择售后时长"
>
<el-select
v-model=
"hotEditGoodsForm.aftersale_time"
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>
</el-select>
</el-form-item>
</el-form>
<el-table
:data=
"speList"
class=
"hot-edit-goods-table"
border
v-if=
"speList.length"
>
<el-table
:data=
"speList"
class=
"hot-edit-goods-table"
border
v-if=
"speList.length"
>
<el-table-column
label=
"规格项"
prop=
"spe"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span
v-for=
"(item, index) in scope.row.objArr"
:key=
"index"
>
...
...
@@ -268,7 +389,12 @@
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"库存量"
width
=
"160px"
prop
=
"stock"
align
=
"center"
>
<
el
-
table
-
column
label
=
"库存量"
width
=
"160px"
prop
=
"stock"
align
=
"center"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
input
v
-
model
=
"scope.row.stock"
/>
<
/template
>
...
...
@@ -276,11 +402,14 @@
<
/el-table
>
<
el
-
table
:
data
=
"speListone"
class
=
"hot-edit-goods-table"
border
v
-
else
>
<
el
-
table
-
column
label
=
"规格项"
prop
=
"spe"
align
=
"center"
>
<
template
slot
-
scope
=
"scope"
>
默认
<
/template
>
<
template
slot
-
scope
=
"scope"
>
默认
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"库存量"
width
=
"160px"
prop
=
"stock"
align
=
"center"
>
<
el
-
table
-
column
label
=
"库存量"
width
=
"160px"
prop
=
"stock"
align
=
"center"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
input
v
-
model
.
trim
=
"scope.row.stock"
/>
<
/template
>
...
...
@@ -288,46 +417,56 @@
<
/el-table
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
size
=
"small"
@
click
=
"cancelHotEditGoods"
>
取
消
<
/el-button
>
<
el
-
button
size
=
"small"
type
=
"primary"
@
click
=
"saveHotEditGoods"
>
保
存
<
/el-button
>
<
el
-
button
size
=
"small"
type
=
"primary"
@
click
=
"saveHotEditGoods"
>
保
存
<
/el-butto
n
>
<
/span
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
goodDetail
from
'./components/goodsdetail'
import
editGood
from
'@/views/system/goods/add/index'
import
{
GetFreight
,
getGoodsNew
}
from
'@/api/module/goods'
import
{
getlistGoods
,
shelvesStatus
,
delgoodsStatus
,
cancelOnsale
,
cancelOnsaleAllData
,
saveHotEditGoodsData
}
from
'@/api/module/goodsgement'
import
{
dateFormat
}
from
'@/utils'
import
goodDetail
from
"./components/goodsdetail"
;
import
editGood
from
"@/views/system/goods/add/index"
;
import
{
GetFreight
,
getGoodsNew
}
from
"@/api/module/goods"
;
import
{
getlistGoods
,
shelvesStatus
,
delgoodsStatus
,
cancelOnsale
,
cancelOnsaleAllData
,
saveHotEditGoodsData
,
exportExcel
,
}
from
"@/api/module/goodsgement"
;
import
{
dateFormat
}
from
"@/utils"
;
export
default
{
export
default
{
name
:
"freight"
,
data
()
{
return
{
goodDetails
:
{
goods_id
:
''
goods_id
:
""
,
}
,
// editisOpen: false,//编辑
downsale_count
:
''
,
//仓库数量
onsale_count
:
''
,
//上架数量
del_count
:
''
,
//删除数量
downsale_count
:
""
,
//仓库数量
onsale_count
:
""
,
//上架数量
del_count
:
""
,
//删除数量
radiomodel
:
1
,
formInline
:
{
page
:
1
,
limit
:
20
,
goods_name
:
''
,
goods_id
:
''
,
status
:
'5'
,
uptime
:
''
,
price_min
:
''
,
price_max
:
''
goods_name
:
""
,
goods_id
:
""
,
status
:
"5"
,
uptime
:
""
,
price_min
:
""
,
price_max
:
""
,
}
,
// fullHeight: 0,
// tableHeight: 0,
// 遮罩层
loading
:
false
,
// 选中数组
selectionsList
:
[],
selectionsList
:
[],
ids
:
[],
// 非单个禁用
single
:
true
,
...
...
@@ -363,7 +502,7 @@
// 表单校验
rules
:
{
name
:
[
{
required
:
true
,
message
:
"模板名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"模板名称不能为空"
,
trigger
:
"blur"
}
,
],
}
,
// 热更新商品
...
...
@@ -371,21 +510,21 @@
hotEditGoodsForm
:
{
delay_compensate
:
24
,
freight_id
:
310
,
aftersale_time
:
7
aftersale_time
:
7
,
}
,
freightOptions
:
[],
speList
:
[],
speListone
:
[],
speListone
:
[],
stock
:
0
,
rowInfo
:
null
rowInfo
:
null
,
}
;
}
,
components
:
{
goodDetail
,
editGood
editGood
,
}
,
created
()
{
if
(
this
.
$route
.
query
.
goodsStatus
)
{
if
(
this
.
$route
.
query
.
goodsStatus
)
{
this
.
radiomodel
=
Number
(
this
.
$route
.
query
.
goodsStatus
);
}
this
.
getList
();
...
...
@@ -405,126 +544,125 @@
// 运费模板
getFreightData
()
{
let
params
=
{
is_status
:
1
}
GetFreight
(
params
).
then
(
res
=>
{
if
(
res
.
data
)
{
is_status
:
1
,
}
;
GetFreight
(
params
).
then
((
res
)
=>
{
if
(
res
.
data
)
{
this
.
freightOptions
=
res
.
data
;
}
else
{
this
.
freightOptions
=
''
}
else
{
this
.
freightOptions
=
""
;
}
}
);
}
,
handledelgrain
(
row
,
isall
)
{
//彻底删除
let
good_id
,
is_on
,
title
,
message
if
(
isall
==
'one'
)
{
good_id
=
[
row
.
goods_id
]
is_on
=
2
title
=
"彻底删除"
message
=
"此操作将彻底删除该商品,是否继续?"
}
else
if
(
isall
==
'all'
)
{
good_id
=
this
.
ids
is_on
=
2
title
=
"彻底删除"
message
=
"此操作将彻底删除选中的商品,是否继续?"
handledelgrain
(
row
,
isall
)
{
//彻底删除
let
good_id
,
is_on
,
title
,
message
;
if
(
isall
==
"one"
)
{
good_id
=
[
row
.
goods_id
];
is_on
=
2
;
title
=
"彻底删除"
;
message
=
"此操作将彻底删除该商品,是否继续?"
;
}
else
if
(
isall
==
"all"
)
{
good_id
=
this
.
ids
;
is_on
=
2
;
title
=
"彻底删除"
;
message
=
"此操作将彻底删除选中的商品,是否继续?"
;
}
let
data
=
{
'goods_id'
:
good_id
,
'is_on'
:
is_on
}
goods_id
:
good_id
,
is_on
:
is_on
,
}
;
this
.
$msgbox
({
title
:
title
,
message
:
message
,
center
:
true
,
showCancelButton
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
beforeClose
:
(
action
,
instance
,
done
)
=>
{
if
(
action
===
'confirm'
)
{
delgoodsStatus
(
data
).
then
(
res
=>
{
if
(
action
===
"confirm"
)
{
delgoodsStatus
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
done
()
this
.
getList
()
done
();
this
.
getList
();
}
}
)
}
);
}
else
{
done
();
}
}
}
).
then
(
action
=>
{
}
,
}
).
then
((
action
)
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
type
:
"success"
,
message
:
"操作成功!"
,
}
);
}
);
}
,
handledelsale
(
row
,
status
,
isall
)
{
//删除还原
let
good_id
,
is_on
,
title
,
message
if
(
isall
==
'one'
)
{
good_id
=
[
row
.
goods_id
]
if
(
status
==
'del'
)
{
// 0 删除 1还原
is_on
=
0
title
=
"删除"
message
=
"是否删除该商品!"
}
if
(
status
==
'return'
)
{
is_on
=
1
title
=
"还原"
message
=
"是否还原该商品!"
}
}
else
if
(
isall
==
'all'
)
{
good_id
=
this
.
ids
if
(
status
==
'del'
)
{
is_on
=
0
title
=
"批量删除"
message
=
"是否删除选中的商品!"
}
if
(
status
==
'return'
)
{
is_on
=
1
title
=
"批量还原"
message
=
"是否还原选中的商品!"
handledelsale
(
row
,
status
,
isall
)
{
//删除还原
let
good_id
,
is_on
,
title
,
message
;
if
(
isall
==
"one"
)
{
good_id
=
[
row
.
goods_id
];
if
(
status
==
"del"
)
{
// 0 删除 1还原
is_on
=
0
;
title
=
"删除"
;
message
=
"是否删除该商品!"
;
}
if
(
status
==
"return"
)
{
is_on
=
1
;
title
=
"还原"
;
message
=
"是否还原该商品!"
;
}
}
else
if
(
isall
==
"all"
)
{
good_id
=
this
.
ids
;
if
(
status
==
"del"
)
{
is_on
=
0
;
title
=
"批量删除"
;
message
=
"是否删除选中的商品!"
;
}
if
(
status
==
"return"
)
{
is_on
=
1
;
title
=
"批量还原"
;
message
=
"是否还原选中的商品!"
;
}
}
let
data
=
{
'goods_id'
:
good_id
,
'is_on'
:
is_on
}
goods_id
:
good_id
,
is_on
:
is_on
,
}
;
this
.
$msgbox
({
title
:
title
,
message
:
message
,
center
:
true
,
showCancelButton
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
beforeClose
:
(
action
,
instance
,
done
)
=>
{
if
(
action
===
'confirm'
)
{
delgoodsStatus
(
data
).
then
(
res
=>
{
if
(
action
===
"confirm"
)
{
delgoodsStatus
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
done
()
done
();
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
type
:
"success"
,
message
:
"操作成功!"
,
}
);
this
.
getList
()
this
.
getList
();
}
else
{
done
()
done
();
this
.
$message
({
type
:
'warning'
,
message
:
res
.
message
type
:
"warning"
,
message
:
res
.
message
,
}
);
}
}
)
}
);
}
else
{
done
();
}
}
}
).
then
(
action
=>
{
}
,
}
).
then
((
action
)
=>
{
// this.$message(
{
// type: 'success',
// message: '操作成功!'
...
...
@@ -533,219 +671,254 @@
}
,
// 下架/申请上架
handleUpsale
(
row
,
status
,
isall
)
{
//上下架
handleUpsale
(
row
,
status
,
isall
)
{
//上下架
//console.log(442,row);
let
good_id
,
is_onsale
,
title
,
message
if
(
isall
==
'one'
)
{
good_id
=
[
row
.
goods_id
]
if
(
status
==
'up'
)
{
// 0 下架 1上架
is_onsale
=
1
title
=
"商品上架"
message
=
"是否上架该商品"
}
if
(
status
==
'down'
)
{
is_onsale
=
0
title
=
"商品下架"
message
=
"是否下架该商品!"
}
}
else
if
(
isall
==
'all'
)
{
good_id
=
this
.
ids
if
(
status
==
'up'
)
{
is_onsale
=
1
title
=
"商品批量上架"
message
=
"是否上架选中的商品!"
}
if
(
status
==
'down'
)
{
is_onsale
=
0
title
=
"商品批量下架"
message
=
"是否下架选中的商品!"
let
good_id
,
is_onsale
,
title
,
message
;
if
(
isall
==
"one"
)
{
good_id
=
[
row
.
goods_id
];
if
(
status
==
"up"
)
{
// 0 下架 1上架
is_onsale
=
1
;
title
=
"商品上架"
;
message
=
"是否上架该商品"
;
}
if
(
status
==
"down"
)
{
is_onsale
=
0
;
title
=
"商品下架"
;
message
=
"是否下架该商品!"
;
}
}
else
if
(
isall
==
"all"
)
{
good_id
=
this
.
ids
;
if
(
status
==
"up"
)
{
is_onsale
=
1
;
title
=
"商品批量上架"
;
message
=
"是否上架选中的商品!"
;
}
if
(
status
==
"down"
)
{
is_onsale
=
0
;
title
=
"商品批量下架"
;
message
=
"是否下架选中的商品!"
;
}
}
let
data
=
{
'goods_id'
:
good_id
,
'is_onsale'
:
is_onsale
}
goods_id
:
good_id
,
is_onsale
:
is_onsale
,
}
;
this
.
$msgbox
({
title
:
title
,
message
:
message
,
center
:
true
,
showCancelButton
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
beforeClose
:
(
action
,
instance
,
done
)
=>
{
if
(
action
===
'confirm'
)
{
shelvesStatus
(
data
).
then
(
res
=>
{
if
(
action
===
"confirm"
)
{
shelvesStatus
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
done
()
this
.
getList
()
}
else
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
?
res
.
message
:
'操作失败'
}
);
done
();
this
.
getList
();
}
else
{
this
.
$message
({
type
:
"success"
,
message
:
res
.
message
?
res
.
message
:
"操作失败"
,
}
);
}
}
)
}
);
}
else
{
done
();
}
}
}
).
then
(
action
=>
{
}
,
}
).
then
((
action
)
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
type
:
"success"
,
message
:
"操作成功!"
,
}
);
}
);
}
,
/** 批量取消申请上架 */
handleCancelUpale
()
{
// id组成的数组 this.ids
if
(
this
.
ids
.
length
<=
0
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'请先选择需要操作的数据'
}
);
return
if
(
this
.
ids
.
length
<=
0
)
{
this
.
$message
({
type
:
"warning"
,
message
:
"请先选择需要操作的数据"
}
);
return
;
}
let
isContinue
=
true
;
for
(
let
i
=
0
;
i
<
this
.
selectionsList
.
length
;
i
++
)
{
if
(
this
.
selectionsList
[
i
].
up_onsale
!=
1
)
{
isContinue
=
false
break
if
(
this
.
selectionsList
[
i
].
up_onsale
!=
1
)
{
isContinue
=
false
;
break
;
}
}
//
if
(
!
isContinue
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'所选商品中有部分未申请上架,请重新勾选'
}
);
return
this
.
$message
({
type
:
"warning"
,
message
:
"所选商品中有部分未申请上架,请重新勾选"
,
}
);
return
;
}
let
ids
=
{
goods_id
:
this
.
ids
.
join
(
','
)
}
;
let
ids
=
{
goods_id
:
this
.
ids
.
join
(
","
)
}
;
this
.
$confirm
(
'是否批量取消所选中的商品的上架申请'
,
'批量取消申请上架'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
center
:
true
}
).
then
(
async
()
=>
{
let
res
=
await
cancelOnsaleAllData
(
ids
)
this
.
$confirm
(
"是否批量取消所选中的商品的上架申请"
,
"批量取消申请上架"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
center
:
true
,
}
)
.
then
(
async
()
=>
{
let
res
=
await
cancelOnsaleAllData
(
ids
);
if
(
res
.
code
==
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'批量取消成功'
}
);
this
.
$message
({
type
:
"success"
,
message
:
"批量取消成功"
}
);
}
else
{
this
.
$message
({
type
:
'success'
,
message
:
res
.
message
?
res
.
message
:
'批量取消失败'
}
);
this
.
$message
({
type
:
"success"
,
message
:
res
.
message
?
res
.
message
:
"批量取消失败"
,
}
);
}
this
.
getList
()
}
).
catch
(()
=>
{
}
);
this
.
getList
();
}
)
.
catch
(()
=>
{
}
);
}
,
// 取消上架申请
handleCancelUpsale
(
row
)
{
let
id
=
{
goods_id
:
0
goods_id
:
0
,
}
;
id
.
goods_id
=
row
.
goods_id
?
row
.
goods_id
:
0
;
this
.
$msgbox
({
title
:
'取消商品上架申请'
,
title
:
"取消商品上架申请"
,
message
:
"是否取消选中商品的上架申请!"
,
center
:
true
,
showCancelButton
:
true
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
beforeClose
:
(
action
,
instance
,
done
)
=>
{
if
(
action
===
'confirm'
)
{
cancelOnsale
(
id
).
then
(
res
=>
{
if
(
action
===
"confirm"
)
{
cancelOnsale
(
id
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
done
()
this
.
getList
()
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
?
res
.
message
:
'操作失败'
}
);
done
();
this
.
getList
();
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
res
.
message
?
res
.
message
:
"操作失败"
,
}
);
}
}
)
}
);
}
else
{
done
();
}
}
}
).
then
(
action
=>
{
}
,
}
).
then
((
action
)
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
type
:
"success"
,
message
:
"操作成功!"
,
}
);
}
);
}
,
editgoods
(
row
)
{
//商品编辑
editgoods
(
row
)
{
//商品编辑
// this.editisOpen = true
let
goodsId
=
Number
(
row
.
goods_id
);
// let goodsParam =
{
// goods_id: Number(row.goods_id)
//
}
;
this
.
$router
.
push
({
path
:
'/system/goods/editgoods'
,
query
:
{
goods_id
:
goodsId
}
path
:
"/system/goods/editgoods"
,
query
:
{
goods_id
:
goodsId
}
,
}
);
//this.$router.push(
{
path
:
'/system/goods/editgoods'
}
);
}
,
/** 不下架 编辑部分商品信息 */
hotEditGoods
(
row
)
{
let
data
=
{
goodsId
:
row
.
goods_id
goodsId
:
row
.
goods_id
,
}
;
if
(
!
data
.
goodsId
)
{
return
return
;
}
// 获取运费模板
this
.
getFreightData
();
getGoodsNew
(
data
).
then
(
res
=>
{
getGoodsNew
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
&&
res
.
data
)
{
this
.
isHotEditGoods
=
true
;
this
.
stock
=
res
.
data
.
stock
this
.
rowInfo
=
res
.
data
this
.
hotEditGoodsForm
.
delay_compensate
=
res
.
data
.
delay_compensate
this
.
hotEditGoodsForm
.
freight_id
=
res
.
data
.
freight_id
this
.
hotEditGoodsForm
.
aftersale_time
=
res
.
data
.
aftersale_time
this
.
stock
=
res
.
data
.
stock
;
this
.
rowInfo
=
res
.
data
;
this
.
hotEditGoodsForm
.
delay_compensate
=
res
.
data
.
delay_compensate
;
this
.
hotEditGoodsForm
.
freight_id
=
res
.
data
.
freight_id
;
this
.
hotEditGoodsForm
.
aftersale_time
=
res
.
data
.
aftersale_time
;
// 规格组合
this
.
speList
=
[]
this
.
speListone
=
[]
this
.
speList
=
[];
this
.
speListone
=
[];
if
(
res
.
data
.
specs
&&
res
.
data
.
specs_group
)
{
let
nameArr
=
[]
res
.
data
.
specs
.
map
(
item
=>
{
nameArr
.
push
(
item
.
spec_name
)
}
)
let
nameArr
=
[];
res
.
data
.
specs
.
map
((
item
)
=>
{
nameArr
.
push
(
item
.
spec_name
);
}
);
for
(
let
i
=
0
,
len
=
res
.
data
.
specs_group
.
length
;
i
<
len
;
i
++
)
{
this
.
speList
.
push
({
nameArr
,
spec_name
:
res
.
data
.
specs_group
[
i
].
spec_values
,
stock
:
res
.
data
.
specs_group
[
i
].
stock
,
id
:
res
.
data
.
specs_group
[
i
].
id
}
)
id
:
res
.
data
.
specs_group
[
i
].
id
,
}
);
}
for
(
let
i
=
0
,
len
=
this
.
speList
.
length
;
i
<
len
;
i
++
)
{
let
arr
=
[]
let
arr
=
[];
for
(
let
j
=
0
,
len
=
res
.
data
.
specs
.
length
;
j
<
len
;
j
++
)
{
arr
.
push
({
name
:
this
.
speList
[
i
].
nameArr
[
j
],
spec_values
:
this
.
speList
[
i
].
spec_name
[
j
]
}
)
spec_values
:
this
.
speList
[
i
].
spec_name
[
j
],
}
);
}
this
.
speList
[
i
].
objArr
=
arr
this
.
speList
[
i
].
objArr
=
arr
;
}
}
else
{
debugger
}
else
{
debugger
;
this
.
speListone
.
push
({
stock
:
res
.
data
.
stock
}
)
stock
:
res
.
data
.
stock
,
}
);
}
}
}
);
console
.
log
(
this
.
speList
)
console
.
log
(
this
.
speList
);
}
,
//商品导出
exportGoods
()
{
exportExcel
().
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
res
.
data
.
url
;
//aLink.download = '订单.xls'; //下载的文件名
aLink
.
style
.
display
=
"none"
;
document
.
body
.
appendChild
(
aLink
);
aLink
.
click
();
document
.
body
.
removeChild
(
aLink
);
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
res
.
message
?
res
.
message
:
"导出失败"
,
}
);
}
}
);
}
,
/** 保存 不下架 编辑商品 */
saveHotEditGoods
()
{
let
groupArr
=
[]
this
.
speList
.
map
(
item
=>
{
let
groupArr
=
[];
this
.
speList
.
map
((
item
)
=>
{
groupArr
.
push
({
id
:
item
.
id
,
stock
:
item
.
stock
}
)
}
)
stock
:
item
.
stock
,
}
);
}
);
let
data
=
{
goods_id
:
this
.
rowInfo
.
goods_id
,
...
...
@@ -753,23 +926,23 @@
aftersale_time
:
this
.
hotEditGoodsForm
.
aftersale_time
,
freight_id
:
this
.
hotEditGoodsForm
.
freight_id
,
specs_group
:
this
.
speList
.
length
?
groupArr
:
undefined
,
stock
:
this
.
speList
.
length
?
undefined
:
this
.
speListone
[
0
].
stock
}
stock
:
this
.
speList
.
length
?
undefined
:
this
.
speListone
[
0
].
stock
,
}
;
saveHotEditGoodsData
(
data
).
then
(
res
=>
{
saveHotEditGoodsData
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
type
:
'success'
,
message
:
'保存成功'
}
)
type
:
"success"
,
message
:
"保存成功"
,
}
);
this
.
isHotEditGoods
=
false
;
this
.
getList
()
}
else
if
(
res
.
code
==
0
)
{
this
.
getList
();
}
else
if
(
res
.
code
==
0
)
{
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
}
)
this
.
isHotEditGoods
=
false
type
:
"error"
,
message
:
res
.
message
,
}
);
this
.
isHotEditGoods
=
false
;
}
}
);
}
,
...
...
@@ -777,23 +950,25 @@
cancelHotEditGoods
()
{
this
.
isHotEditGoods
=
false
;
}
,
lookdetail
(
row
)
{
//预览商品详情
this
.
isOpen
=
true
this
.
goodDetails
.
goods_id
=
row
.
goods_id
lookdetail
(
row
)
{
//预览商品详情
this
.
isOpen
=
true
;
this
.
goodDetails
.
goods_id
=
row
.
goods_id
;
}
,
radiomodelbtn
(
val
)
{
//头部切换
radiomodelbtn
(
val
)
{
//头部切换
//console.log(505,val)
this
.
formInline
=
{
page
:
1
,
limit
:
20
,
goods_name
:
''
,
goods_id
:
''
,
status
:
'5'
,
uptime
:
''
,
price_min
:
''
,
price_max
:
''
}
this
.
getList
()
goods_name
:
""
,
goods_id
:
""
,
status
:
"5"
,
uptime
:
""
,
price_min
:
""
,
price_max
:
""
,
}
;
this
.
getList
();
}
,
closeEditGoods
(
val
)
{
this
.
editisOpen
=
false
;
...
...
@@ -801,23 +976,23 @@
}
,
//格式化状态
formatDefault
(
row
)
{
var
types
=
row
.
IsDefault
var
optDes
=
''
var
types
=
row
.
IsDefault
;
var
optDes
=
""
;
if
(
types
==
1
)
{
optDes
=
"是"
optDes
=
"是"
;
}
else
if
(
types
==
0
)
{
optDes
=
"否"
optDes
=
"否"
;
}
return
optDes
return
optDes
;
}
,
//格式化时间
formatTime
(
row
)
{
var
Time
=
row
.
add_time
var
newtime
=
""
var
Time
=
row
.
add_time
;
var
newtime
=
""
;
if
(
Time
>
0
)
{
newtime
=
dateFormat
(
Time
*
1000
,
"Y-m-d H:i:s"
);
}
return
newtime
return
newtime
;
}
,
/** 查询freight列表 */
getList
()
{
...
...
@@ -825,50 +1000,50 @@
let
data
=
{
page
:
this
.
formInline
.
page
,
limit
:
this
.
formInline
.
limit
,
}
}
;
if
(
this
.
radiomodel
===
1
)
{
data
[
'is_onsale'
]
=
1
data
[
'is_on'
]
=
1
data
[
'up_onsale'
]
=
0
data
[
"is_onsale"
]
=
1
;
data
[
"is_on"
]
=
1
;
data
[
"up_onsale"
]
=
0
;
}
if
(
this
.
radiomodel
===
2
)
{
data
[
'is_onsale'
]
=
0
data
[
'is_on'
]
=
1
data
[
'up_onsale'
]
=
0
data
[
"is_onsale"
]
=
0
;
data
[
"is_on"
]
=
1
;
data
[
"up_onsale"
]
=
0
;
}
if
(
this
.
radiomodel
===
3
)
{
data
[
'up_onsale'
]
=
Number
(
this
.
formInline
.
status
)
data
[
'is_onsale'
]
=
0
data
[
'is_on'
]
=
1
data
[
"up_onsale"
]
=
Number
(
this
.
formInline
.
status
);
data
[
"is_onsale"
]
=
0
;
data
[
"is_on"
]
=
1
;
}
if
(
this
.
radiomodel
===
4
)
{
data
[
'is_on'
]
=
0
data
[
"is_on"
]
=
0
;
}
if
(
this
.
formInline
.
goods_name
)
{
data
[
'goods_name'
]
=
this
.
formInline
.
goods_name
data
[
"goods_name"
]
=
this
.
formInline
.
goods_name
;
}
if
(
this
.
formInline
.
goods_id
)
{
data
[
'goods_id'
]
=
this
.
formInline
.
goods_id
data
[
"goods_id"
]
=
this
.
formInline
.
goods_id
;
}
if
(
this
.
formInline
.
uptime
&&
this
.
formInline
.
uptime
.
length
==
2
)
{
data
[
'start_time'
]
=
this
.
formInline
.
uptime
[
0
]
/
1000
data
[
'end_time'
]
=
this
.
formInline
.
uptime
[
1
]
/
1000
+
86399
data
[
"start_time"
]
=
this
.
formInline
.
uptime
[
0
]
/
1000
;
data
[
"end_time"
]
=
this
.
formInline
.
uptime
[
1
]
/
1000
+
86399
;
}
if
(
this
.
formInline
.
price_min
&&
this
.
formInline
.
price_max
)
{
data
[
'price_min'
]
=
this
.
formInline
.
price_min
data
[
'price_max'
]
=
this
.
formInline
.
price_max
data
[
"price_min"
]
=
this
.
formInline
.
price_min
;
data
[
"price_max"
]
=
this
.
formInline
.
price_max
;
}
//console.log("查询list的参数:", data);
getlistGoods
(
data
).
then
(
res
=>
{
getlistGoods
(
data
).
then
((
res
)
=>
{
if
(
res
.
data
)
{
this
.
freightList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
count
;
this
.
downsale_count
=
res
.
data
.
downsale_count
//仓库数量
this
.
onsale_count
=
res
.
data
.
onsale_count
//上架数量
this
.
del_count
=
res
.
data
.
del_count
//删除数量
this
.
downsale_count
=
res
.
data
.
downsale_count
;
//仓库数量
this
.
onsale_count
=
res
.
data
.
onsale_count
;
//上架数量
this
.
del_count
=
res
.
data
.
del_count
;
//删除数量
}
}
);
}
,
...
...
@@ -890,26 +1065,24 @@
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
selectionsList
=
selection
;
this
.
ids
=
selection
.
map
(
item
=>
item
.
goods_id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
ids
=
selection
.
map
((
item
)
=>
item
.
goods_id
);
this
.
single
=
selection
.
length
!==
1
;
this
.
multiple
=
!
selection
.
length
;
}
,
}
//methods结束
}
;
}
,
//methods结束
}
;
<
/script
>
<
style
scoped
lang
=
"scss"
type
=
"text/stylus"
>
.
app
-
container
{
.
app
-
container
{
width
:
100
%
;
height
:
100
%
;
}
.
goods
-
manage
-
card
>>>
.
el
-
card__body
{
}
.
goods
-
manage
-
card
>>>
.
el
-
card__body
{
height
:
calc
(
100
%
-
61
px
);
overflow
-
y
:
auto
;
}
overflow
-
y
:
auto
;
}
.
freightTemplate
-
add
{
.
freightTemplate
-
add
{
::
v
-
deep
.
el
-
dialog
{
height
:
80
%
;
overflow
:
hidden
;
...
...
@@ -920,48 +1093,52 @@
overflow
-
x
:
hidden
;
overflow
-
y
:
scroll
;
}
}
}
.
radiomodels
.
el
-
radio
-
button
{
.
radiomodels
.
el
-
radio
-
button
{
margin
:
0
10
px
;
}
}
::
v
-
deep
.
radiomodels
.
el
-
radio
-
button
.
el
-
radio
-
button__inner
{
border
:
1
px
solid
#
DCDFE
6
!
important
;
::
v
-
deep
.
radiomodels
.
el
-
radio
-
button
.
el
-
radio
-
button__inner
{
border
:
1
px
solid
#
dcdfe
6
!
important
;
border
-
radius
:
4
px
!
important
;
}
}
::
v
-
deep
.
radiomodels
.
el
-
radio
-
button
.
el
-
radio
-
button__orig
-
radio
:
checked
+
.
el
-
radio
-
button__inner
{
::
v
-
deep
.
radiomodels
.
el
-
radio
-
button
.
el
-
radio
-
button__orig
-
radio
:
checked
+
.
el
-
radio
-
button__inner
{
box
-
shadow
:
none
;
}
}
.
queryFormInline
{
.
queryFormInline
{
padding
-
bottom
:
20
px
;
}
}
.
hot
-
edit
-
goods
-
tips
{
.
hot
-
edit
-
goods
-
tips
{
color
:
red
;
font
-
size
:
14
px
;
width
:
80
%
;
margin
:
0
auto
20
px
;
line
-
height
:
20
px
;
}
}
/* 弹窗 样式 重置 */
.
dialog
-
spe
>>>
.
el
-
dialog
{
/* 弹窗 样式 重置 */
.
dialog
-
spe
>>>
.
el
-
dialog
{
width
:
75
%
;
height
:
75
%
;
overflow
:
hidden
;
}
}
.
dialog
-
spe
>>>
.
el
-
dialog
.
el
-
dialog__body
{
height
:
calc
(
100
%
-
115
px
);
.
dialog
-
spe
>>>
.
el
-
dialog
.
el
-
dialog__body
{
height
:
calc
(
100
%
-
115
px
);
padding
:
0
20
px
20
px
40
px
;
overflow
:
auto
;
}
}
.
hot
-
edit
-
goods
-
table
{
.
hot
-
edit
-
goods
-
table
{
width
:
90
%
;
margin
:
20
px
auto
0
;
}
}
<
/style
>
src/views/system/shop/brand.vue
浏览文件 @
6b071265
...
...
@@ -49,7 +49,7 @@
<el-table-column
label=
"品牌名称"
prop=
"brand_cn"
align=
"center"
></el-table-column>
<el-table-column
label=
"品牌经营类型"
prop=
"brand_type"
align=
"center"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
brand_type
===
1
?
'自有品牌'
:
'
品牌厂商授权
'
}}
{{
scope
.
row
.
brand_type
===
1
?
'自有品牌'
:
'
授权品牌
'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"品牌商标注册号"
prop=
"brand_number"
align=
"center"
></el-table-column>
...
...
@@ -101,7 +101,7 @@
<el-form-item
label=
"经营品牌类型:"
prop=
"brand_type"
>
<el-radio-group
v-model=
"brandForm.brand_type"
@
change=
"chooseBrandType"
>
<el-radio
:label=
"1"
>
自有品牌
</el-radio>
<el-radio
:label=
"2"
>
品牌厂商授权
</el-radio>
<el-radio
:label=
"2"
>
授权品牌
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
...
...
@@ -177,8 +177,8 @@
action=
"#"
list-type=
"picture-card"
:http-request=
"uploadCertImgs"
:limit=
"
1
"
:on-exceed=
"limit
1
"
:limit=
"
5
"
:on-exceed=
"limit
Img
"
:before-upload=
"UpImgSizeTwoMb"
:on-preview=
"handlePreviewCert"
:on-remove=
"handleRemoveCert"
...
...
@@ -196,7 +196,7 @@
</span>
</div>
<div
style=
"width:380px;line-height: 24px;padding-top: 6px;"
>
<span
class=
"tips-text"
>
图片大小在500KB以内,支持png/jpg,限
一
张,请确保图片清晰
</span>
<span
class=
"tips-text"
>
图片大小在500KB以内,支持png/jpg,限
五
张,请确保图片清晰
</span>
</div>
</div>
</el-form-item>
...
...
@@ -251,8 +251,9 @@
<el-upload
class=
"uploadData"
action=
"#"
:limit=
"
1
"
:limit=
"
5
"
list-type=
"picture-card"
:on-exceed=
"limitImg"
:http-request=
"uploadFactoryImgs"
:before-upload=
"UpImgSizeTwoMb"
:on-preview=
"handlePreviewFactory"
...
...
@@ -271,7 +272,7 @@
</span>
</div>
<div
style=
"width:380px;line-height: 24px;padding-top: 6px;"
>
<span
class=
"tips-text"
>
图片大小在500KB以内,支持png/jpg,限
一
张,请确保图片清晰
</span>
<span
class=
"tips-text"
>
图片大小在500KB以内,支持png/jpg,限
五
张,请确保图片清晰
</span>
</div>
</div>
<p
class=
"brand-auth-tips"
>
上传完整授权链路,品牌方给予企业的授权书,如果是多级授权,请上传各级授权证书
</p>
...
...
@@ -287,7 +288,8 @@
<el-upload
class=
"uploadData"
action=
"#"
:limit=
"1"
:limit=
"5"
:on-exceed=
"limitImg"
:http-request=
"uploadShopImgs"
list-type=
"picture-card"
:before-upload=
"UpImgSizeTwoMb"
...
...
@@ -307,7 +309,7 @@
</span>
</div>
<div
style=
"width:380px;line-height: 24px;padding-top: 6px;"
>
<span
class=
"tips-text"
>
图片大小在500KB以内,支持png/jpg,限
一
张,请确保图片清晰
</span>
<span
class=
"tips-text"
>
图片大小在500KB以内,支持png/jpg,限
五
张,请确保图片清晰
</span>
</div>
</div>
</el-form-item>
...
...
@@ -404,7 +406,7 @@
brandTypeOptions
:
[
{
label
:
"全部品牌"
,
value
:
'-1'
},
{
label
:
"自有品牌"
,
value
:
'1'
},
{
label
:
"
品牌厂商授权
"
,
value
:
'2'
},
{
label
:
"
授权品牌
"
,
value
:
'2'
},
],
statusOptions
:
[
{
label
:
'未审核'
,
value
:
'0'
},
...
...
@@ -828,6 +830,9 @@
limit1
()
{
this
.
$message
({
message
:
'最多上传1张图片'
,
type
:
'warning'
});
},
limitImg
()
{
this
.
$message
({
message
:
'最多上传5张图片'
,
type
:
'warning'
});
},
/** 时间格式化 */
timeFormatter
(
timeVal
)
{
return
dateFormat
(
timeVal
*
1000
,
'Y-m-d'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论