Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
d61fdbab
提交
d61fdbab
authored
8月 30, 2022
作者:
王天霸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1113
上级
0e7fcd05
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
903 行增加
和
14 行删除
+903
-14
invoiceManagement.js
src/api/invoiceManagement.js
+183
-0
goods.js
src/api/module/goods.js
+18
-2
msgtemplate.js
src/api/msgtemplate.js
+49
-0
goodsaftersale.vue
src/views/system/goods/add/components/goodsaftersale.vue
+2
-2
goodsparameter.vue
src/views/system/goods/add/components/goodsparameter.vue
+25
-2
index.vue
src/views/system/goods/add/index.vue
+39
-7
goodsgement.vue
src/views/system/goodsimport/goodsgement.vue
+25
-1
msgtemplateInfo.vue
...views/system/messageCenter/components/msgtemplateInfo.vue
+151
-0
msgtemplate.vue
src/views/system/messageCenter/msgtemplate.vue
+411
-0
没有找到文件。
src/api/invoiceManagement.js
0 → 100644
浏览文件 @
d61fdbab
import
request
from
'@/utils/request'
// 可开发票列表
export
function
invoiceListStatics
(
params
)
{
return
request
({
url
:
'/receipt/openOrderList'
,
method
:
'get'
,
params
})
}
// 可开发票-订单详情
export
function
orderListInvo
(
params
)
{
return
request
({
url
:
'/receipt/orderList'
,
method
:
'get'
,
params
})
}
// 可开发票-订单详情-导出列表
export
function
getOrderListExport
(
params
)
{
return
request
({
url
:
'/receipt/orderListExport'
,
method
:
'get'
,
params
})
}
// 可开发票-申请开票-发票抬头
export
function
receipt
(
params
)
{
return
request
({
url
:
'/operate/receipt/getReceipt'
,
method
:
'get'
,
params
})
}
// 可开发票-申请开票-保存发票抬头
export
function
updateReceipt
(
data
)
{
return
request
({
url
:
'/operate/receipt/updateReceipt'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-领取方式
export
function
addressList
(
params
)
{
return
request
({
url
:
'/operate/receipt/getAddressList'
,
method
:
'get'
,
params
})
}
// 可开发票-申请开票-领取方式-设为默认
export
function
setAddress
(
data
)
{
return
request
({
url
:
'/operate/receipt/setAddress'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-领取方式-编辑
export
function
updateAddress
(
data
)
{
return
request
({
url
:
'/operate/receipt/updateAddress'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-领取方式-删除
export
function
delAddress
(
data
)
{
return
request
({
url
:
'/operate/receipt/delAddress'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-领取方式-添加
export
function
addAddress
(
data
)
{
return
request
({
url
:
'/operate/receipt/addAddress'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-提交开票
export
function
saveReceipt
(
data
)
{
return
request
({
url
:
'/receipt/invoice'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-去支付
export
function
createReceipt
(
data
)
{
return
request
({
url
:
'/receipt/createReceipt'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-验证是否设置密码
export
function
accountSafePwd
(
params
)
{
return
request
({
url
:
'/accountSafePwd'
,
method
:
'get'
,
params
})
}
// 可开发票-申请开票-余额支付
export
function
notifyReceipt
(
data
)
{
return
request
({
url
:
'/receipt/balanceNotify'
,
method
:
'post'
,
data
})
}
// 可开发票-申请开票-支付宝支付
export
function
pay
(
data
)
{
return
request
({
url
:
'/receipt/pay'
,
method
:
'post'
,
data
})
}
// 支付验证
export
function
checkNotify
(
params
)
{
return
request
({
url
:
'/checkNotify'
,
method
:
'get'
,
params
})
}
// 开票记录列表
export
function
invoiceList
(
params
)
{
return
request
({
url
:
'/invoicesmanagement/invoiceList'
,
method
:
'get'
,
params
})
}
// 开票记录-发票详情
export
function
invoiceInfo
(
params
)
{
return
request
({
url
:
'/invoicesmanagement/getInvoiceInfo'
,
method
:
'get'
,
params
})
}
// 【new】发票用户信息详情
export
function
receiptUserInfo
(
params
)
{
return
request
({
url
:
'/receipt/receiptUserInfo'
,
method
:
'get'
,
params
})
}
// 【new】发票用户信息编辑
export
function
addUserReceiptInfo
(
data
)
{
return
request
({
url
:
'/receipt/receiptUserInfoEdit'
,
method
:
'post'
,
data
})
}
src/api/module/goods.js
浏览文件 @
d61fdbab
...
...
@@ -29,13 +29,22 @@ export function GetCategory(query) {
// 经营类目-12-23-bak
export
function
NewGetCategory
(
query
)
{
return
request
({
url
:
'
/system/goodsNew/b
usinessList'
,
url
:
'
goodsNew/B
usinessList'
,
method
:
'get'
,
params
:
query
})
}
// 营业类目
export
function
NewGetCategoryDataall
(
query
)
{
return
request
({
url
:
'system/goodsNew/businessList'
,
method
:
'get'
,
params
:
query
})
}
// 营业类目动态获取
export
function
NewGetCategoryData
(
data
)
{
return
request
({
url
:
'/local/getCategoryList'
,
...
...
@@ -43,7 +52,6 @@ export function NewGetCategoryData(data) {
data
:
data
})
}
// 查询运费模板
export
function
GetFreight
(
query
)
{
return
request
({
...
...
@@ -156,3 +164,11 @@ export function synthesisList(data) {
data
:
data
})
}
//商品复制
export
function
goodsNewcopy
(
query
)
{
return
request
({
url
:
'/system/goodsNew/copy'
,
method
:
'get'
,
params
:
query
})
}
src/api/msgtemplate.js
0 → 100644
浏览文件 @
d61fdbab
import
request
from
'@/utils/request'
//获取系统公告列表
export
function
msgMessageList
(
params
)
{
return
request
({
url
:
'/operate/system/messageList'
,
method
:
'get'
,
params
})
}
//删除全部已读
export
function
delIsRead
(
data
)
{
return
request
({
url
:
'/message/delIsRead'
,
method
:
'post'
,
data
})
}
//全部已读
export
function
readingNotes
(
data
)
{
return
request
({
url
:
'/message/readingNotes'
,
method
:
'post'
,
data
})
}
// 查看消息详情
export
function
GetMessageDetail
(
data
)
{
return
request
({
url
:
'/operate/system/messageDetail'
,
method
:
'post'
,
data
})
}
//是否为paas账号
export
function
GetIsPaas
(
data
)
{
return
request
({
url
:
'/operate/system/getIsPaas'
,
method
:
'post'
,
data
})
}
//转发
export
function
Forward
(
data
)
{
return
request
({
url
:
'/operate/system/messageFor'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/views/system/goods/add/components/goodsaftersale.vue
浏览文件 @
d61fdbab
...
...
@@ -75,7 +75,7 @@
</el-form-item>
<el-form-item
label=
"邮费模板:"
prop=
"freight_id"
>
<el-select
v-model=
"goodsAfterSaleForm.freight_id"
placeholder=
"请选择邮费模板"
@
change=
"diupfont"
style=
"width:400px;"
>
<el-select
v-model=
"goodsAfterSaleForm.freight_id"
filterable
placeholder=
"请选择邮费模板"
@
change=
"diupfont"
style=
"width:400px;"
>
<el-option
v-for=
"(item,index) in freightOptions"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -498,7 +498,7 @@
if
(
this
.
option
==
0
)
{
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
if
(
res
.
data
[
i
].
is_default
==
1
)
{
this
.
goodsAfterSaleForm
.
freight_id
=
res
.
data
[
i
].
id
//
this.goodsAfterSaleForm.freight_id = res.data[i].id
}
}
}
...
...
src/views/system/goods/add/components/goodsparameter.vue
浏览文件 @
d61fdbab
<
template
>
<div
:class=
"['goods-parameter']"
>
<div
v-
if
=
"parameterdata.isradioguide === 1"
>
<div
v-
show
=
"parameterdata.isradioguide === 1"
>
<!--
<p
style=
"margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;"
>
默认
</p>
-->
<el-table
border
size=
"small"
:data=
"singleSpecTable"
style=
"width: 100%;margin-right:10%;"
:key=
"keyvalue"
>
<el-table-column
align=
"center"
prop=
"sc_price"
label=
"市场划线价"
class-name=
"spe-cell-icon"
>
<template
slot-scope=
"scope"
>
...
...
@@ -431,9 +432,31 @@ export default {
mounted
()
{
this
.
getSpanArr
(
this
.
parameterdata
);
this
.
keyvalue
++
//
debugger
debugger
if
(
this
.
parameterdata
.
singleSpecTable
&&
this
.
parameterdata
.
singleSpecTable
.
length
===
1
)
{
this
.
singleSpecTable
=
this
.
parameterdata
.
singleSpecTable
}
else
{
if
(
localStorage
.
getItem
(
'SpecTable'
)){
this
.
singleSpecTable
=
JSON
.
parse
(
localStorage
.
getItem
(
'SpecTable'
))
}
else
{
this
.
singleSpecTable
=
[
{
sc_price
:
''
,
// 市场划线价
price
:
''
,
// 销售指导价
js_price
:
''
,
// 供货结算价
prime_cost
:
''
,
// 成本核算价
stock
:
''
,
// 库存
stock_warning
:
''
,
// 库存预警
weight
:
''
,
// 重量 g
volume
:
''
,
// 体积
goods_code
:
''
,
// 编码
bar_code
:
''
,
// 条码
}
]
}
}
// 接受 多规格是否启用阶梯定价
...
...
src/views/system/goods/add/index.vue
浏览文件 @
d61fdbab
...
...
@@ -10,8 +10,18 @@
<p
class=
"goods-type-tip"
>
为商品设置正确的类目,能让商品快速的被搜索到
</p>
</div>
<div
class=
"goods-type-options"
>
类目搜索:
<el-cascader
placeholder=
"请输入"
:options=
"option"
v-model=
"SSQLists"
:props=
'propsOptions'
@
change=
"searchChange"
style=
"width:300px;"
filterable
></el-cascader>
</div>
<div
class=
"goods-type-options"
>
<!--
<el-cascader-panel
v-model=
"SSQList"
:props=
'props'
@
change=
"SSQChange"
ref=
"ssqCascader"
></el-cascader-panel>
-->
<el-cascader-panel
v-model=
"SSQList
"
:props=
'propsOptions'
@
change=
"SSQChange"
ref=
"ssqCascader"
></el-cascader-panel>
<el-cascader-panel
:key=
"optionnew"
v-model=
"SSQList"
:options=
"option
"
:props=
'propsOptions'
@
change=
"SSQChange"
ref=
"ssqCascader"
></el-cascader-panel>
</div>
<el-button
type=
"primary"
class=
"next-step"
:disabled=
"isNextStep"
@
click=
"nextStep"
>
下一步
</el-button>
</div>
...
...
@@ -115,7 +125,7 @@
</
template
>
<
script
>
import
{
NewGetCategory
,
NewGetCategoryData
,
addGoods
,
getGoodsNew
,
updateGoodsNew
}
from
'@/api/module/goods'
;
import
{
NewGetCategory
,
NewGetCategoryData
all
,
NewGetCategoryData
,
addGoods
,
getGoodsNew
,
updateGoodsNew
}
from
'@/api/module/goods'
;
import
Goodsinfomation
from
'./components/goodsinfomation'
;
import
GoodsSpecifications
from
'./components/goodsspecifications'
;
import
GoodsParameter
from
'./components/goodsparameter'
;
...
...
@@ -133,20 +143,21 @@
},
data
()
{
return
{
optionnew
:
1
,
isViewPriceExp
:
false
,
radioguide
:
1
,
keyvalue
:
1
,
goodsLoading
:
false
,
SSQLists
:[],
SSQList
:
[],
// 省市区
SSQStr
:
''
,
// 省市区 拼接
propsOptions
:
{
expandTrigger
:
'click'
,
lazy
:
true
,
lazyLoad
:
this
.
lazyLoad
,
value
:
"id"
,
label
:
'
title
'
,
label
:
'
label
'
,
leaf
:
'leaf'
},
option
:[],
isNextStep
:
true
,
isShowGoodsDetails
:
false
,
isFIActive
:
0
,
...
...
@@ -192,7 +203,7 @@
goods_brand
:
''
,
// 品牌
brand_id
:
''
,
// 品牌、
stags
:
[],
freight_id
:
310
,
freight_id
:
''
,
delay_compensate
:
24
,
aftersale_time
:
7
},
...
...
@@ -205,6 +216,7 @@
},
created
()
{
this
.
getalloption
()
// option 商品的id
//debugger
this
.
option
=
Number
(
this
.
$route
.
query
.
goods_id
)
||
0
...
...
@@ -396,8 +408,28 @@
mounted
()
{
},
methods
:
{
searchChange
(){
this
.
optionnew
++
this
.
SSQList
=
this
.
SSQLists
if
(
this
.
SSQList
&&
this
.
SSQList
.
length
>
0
)
{
this
.
isNextStep
=
false
}
else
{
this
.
SSQList
=
[]
this
.
isNextStep
=
true
}
},
getalloption
(){
NewGetCategoryDataall
().
then
(
res
=>
{
if
(
res
.
code
==
1
){
this
.
option
=
res
.
data
}
})
},
radiochange
(
val
){
this
.
parameterdata
.
isradioguide
=
this
.
radioguide
if
(
val
===
2
){
localStorage
.
setItem
(
'SpecTable'
,
JSON
.
stringify
(
this
.
$refs
.
goodsparameter
.
singleSpecTable
))
}
this
.
keyvalue
++
},
// 查看各类价格说明
...
...
src/views/system/goodsimport/goodsgement.vue
浏览文件 @
d61fdbab
...
...
@@ -268,6 +268,17 @@
@
click=
"editgoods(scope.row)"
>
编辑
</el-button>
<el-divider
direction=
"vertical"
v-if=
"radiomodel != 1"
></el-divider>
<el-button
v-if=
"radiomodel != 4 && radiomodel != 1"
size=
"mini"
type=
"text"
@
click=
"copylist(scope.row)"
>
商品复制
</el-button>
<el-divider
direction=
"vertical"
v-if=
"radiomodel != 4"
...
...
@@ -427,7 +438,7 @@
<
script
>
import
goodDetail
from
"./components/goodsdetail"
;
import
editGood
from
"@/views/system/goods/add/index"
;
import
{
GetFreight
,
getGoodsNew
}
from
"@/api/module/goods"
;
import
{
GetFreight
,
getGoodsNew
,
goodsNewcopy
}
from
"@/api/module/goods"
;
import
{
getlistGoods
,
shelvesStatus
,
...
...
@@ -541,6 +552,19 @@ export default {
//
}
}
,
methods
:
{
copylist
(
row
){
debugger
let
data
=
{
id
:
row
.
goods_id
}
goodsNewcopy
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
1
){
this
.
getList
();
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
}
)
}
,
// 运费模板
getFreightData
()
{
let
params
=
{
...
...
src/views/system/messageCenter/components/msgtemplateInfo.vue
0 → 100644
浏览文件 @
d61fdbab
<
template
>
<div
class=
"box-drawer"
>
<div>
<div
style=
"display: inline-block"
>
<h4>
{{
messageDetailInfo
.
title
}}
</h4>
</div>
<div
style=
"float: right; margin-top: 20px; padding-right: 30px"
>
<el-button
type=
"primary"
plain
size=
"mini"
icon=
"el-icon-arrow-left"
@
click=
"goBack"
>
返回
</el-button
>
<el-button
type=
"primary"
plain
size=
"mini"
v-if=
"ispaas==1"
@
click=
"redeposit"
>
转存为系统公告
</el-button
>
<el-button
type=
"primary"
plain
size=
"mini"
icon=
"el-icon-delete"
@
click=
"delRead"
>
删除
</el-button
>
</div>
</div>
<div
class=
"button-text"
>
<i
class=
"el-icon-message-solid"
style=
"color: #fbaf2d"
></i>
<span
class=
"left-text"
>
消息类型:
{{
messageDetailInfo
.
type
==
1
?
"系统公告"
:
"活动公告"
}}
</span
>
<span
class=
"right-text"
>
发布时间:
{{
timeFormatters
(
messageDetailInfo
.
add_time
)
}}
</span
>
</div>
<div
class=
"Info-text"
v-html=
"messageDetailInfo.content"
></div>
</div>
</
template
>
<
script
>
import
{
delIsRead
,
GetMessageDetail
,
Forward
,
GetIsPaas
}
from
"@/api/msgtemplate"
;
import
{
parseTime
}
from
"@/utils"
;
export
default
{
name
:
"messageDetail"
,
props
:
[
"messageDetailIds"
],
data
()
{
return
{
messageDetailInfo
:
{},
ispaas
:
0
,
};
},
created
()
{
this
.
getMessageInfos
();
this
.
getIsPaas
();
},
methods
:
{
//获取详情信息
getMessageInfos
()
{
let
data
=
{
id
:
this
.
messageDetailIds
,
};
GetMessageDetail
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
messageDetailInfo
=
res
.
data
;
}
});
},
//删除单个
delRead
()
{
let
data
=
{
id
:
this
.
messageDetailIds
,
};
delIsRead
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
message
:
"删除成功"
,
type
:
"success"
});
this
.
$emit
(
"closeOrderDetailDialog"
);
}
});
},
//返回
goBack
()
{
this
.
$emit
(
"closeOrderDetailDialog"
);
},
redeposit
()
{
let
data
=
{
id
:
this
.
messageDetailIds
,
};
Forward
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
message
:
"转存成功"
,
type
:
"success"
});
this
.
$emit
(
"closeOrderDetailDialog"
);
}
});
},
getIsPaas
()
{
GetIsPaas
().
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
ispaas
=
res
.
data
.
ispaas
;
}
});
},
//日期转换
timeFormatters
(
cellValue
)
{
return
parseTime
(
cellValue
,
"{y}-{m}-{d} {h}:{i}:{s}"
);
},
},
};
</
script
>
<
style
scoped
>
.Info-text
{
width
:
100%
;
height
:
470px
;
/* border: 1px solid black; */
overflow
:
auto
;
}
.box-drawer
{
/* border: 1px solid black; */
width
:
96%
;
margin
:
0
auto
;
}
.button-text
{
line-height
:
48px
;
width
:
100%
;
height
:
48px
;
background
:
#f8f8f8
;
padding-left
:
15px
;
}
.left-text
{
font-size
:
14px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#666666
;
}
.right-text
{
font-size
:
14px
;
font-family
:
Microsoft
YaHei
;
font-weight
:
400
;
color
:
#999999
;
float
:
right
;
padding-right
:
20px
;
}
</
style
>
\ No newline at end of file
src/views/system/messageCenter/msgtemplate.vue
0 → 100644
浏览文件 @
d61fdbab
<
template
>
<div
class=
"app-container"
>
<el-card
class=
"box-card"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"系统消息"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"活动消息"
name=
"second"
></el-tab-pane>
</el-tabs>
<el-form
:inline=
"true"
size=
"mini"
label-width=
"auto"
class=
"params-form"
>
<el-form-item>
<el-input
v-model
.
trim=
"title"
placeholder=
"请输入搜索关键词"
>
</el-input>
</el-form-item>
<el-form-item>
<el-select
v-model=
"readStatus"
placeholder=
"消息阅读状态"
>
<el-option
label=
"全部"
value=
"-1"
></el-option>
<el-option
label=
"已读"
value=
"1"
></el-option>
<el-option
label=
"未读"
value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
size=
"mini"
type=
"primary"
@
click=
"searchMsg"
>
搜索
</el-button
>
</el-form-item>
<el-form-item
style=
"float: right"
>
<el-button
type=
"text"
style=
"color: #666666; margin-right: 20px; font-size: 14px"
icon=
"el-icon-document"
@
click=
"allRead"
>
全部标记为已读
</el-button
>
<el-button
style=
"color: #666666; font-size: 14px"
type=
"text"
icon=
"el-icon-delete"
@
click=
"delRead"
>
删除全部已读消息
</el-button
>
</el-form-item>
</el-form>
<div>
<el-table
ref=
"msgTableCon"
:data=
"msgTableList"
:height=
"msgConHeight"
style=
"width: 100%"
:header-cell-style=
"
{
background: '#F9F9FA',
}"
>
<el-table-column
prop=
"title"
label=
"系统公告标题"
min-width=
"50%"
v-if=
"this.activeName == 'first'"
></el-table-column>
<el-table-column
prop=
"title"
label=
"活动公告标题"
min-width=
"50%"
v-if=
"this.activeName == 'second'"
></el-table-column>
<el-table-column
prop=
"add_time"
label=
"发布时间"
min-width=
"20%"
:formatter=
"timeFormatters"
></el-table-column>
<el-table-column
label=
"状态"
min-width=
"15%"
>
<template
slot-scope=
"scope"
>
<div
class=
"dotColorRed"
v-if=
"scope.row.status == 0"
></div>
<span
v-if=
"scope.row.status == 0"
>
未读
</span>
<div
class=
"dotColorGreen"
v-if=
"scope.row.status == 1"
></div>
<span
v-if=
"scope.row.status == 1"
>
已读
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"15%"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
size=
"mini"
@
click=
"editMsg(scope.row)"
>
查看详情
</el-button
>
<el-button
type=
"text"
size=
"mini"
@
click=
"forward(scope.row)"
v-if=
"ispaas == 1"
>
转发
</el-button
>
<el-button
type=
"text"
size=
"mini"
style=
"color: red"
@
click=
"delMsg(scope.row)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
<!-- 分页 -->
<div
class=
"footer_pagination"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[20, 40, 60, 80, 100]"
:page-size=
"pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</div>
</div>
</el-card>
<el-drawer
title=
"公告详情"
center
:withHeader=
"true"
:append-to-body=
"false"
:modal=
"false"
v-if=
"dialogMessageDetail"
:modal-append-to-body=
"false"
:visible
.
sync=
"dialogMessageDetail"
:direction=
"direction"
class=
"custom-drawer"
size=
"100%"
>
<msgtemplateInfo
@
closeOrderDetailDialog=
"closeOrderDetailDialog"
:messageDetailIds=
"messageDetailIds"
></msgtemplateInfo>
</el-drawer>
</div>
</template>
<
script
>
import
msgtemplateInfo
from
"./components/msgtemplateInfo"
;
import
{
parseTime
}
from
"@/utils"
;
import
{
readingNotes
,
msgMessageList
,
delIsRead
,
GetIsPaas
,
Forward
,
}
from
"@/api/msgtemplate"
;
export
default
{
name
:
"msgtemplate"
,
components
:
{
msgtemplateInfo
,
},
data
()
{
// application_id 只能为数字校验
let
checkAppid
=
(
rule
,
value
,
callback
)
=>
{
const
reg
=
/^
[
0-9
]
*$/
;
if
(
!
reg
.
test
(
value
)
||
value
==
""
)
{
callback
(
new
Error
(
"应用ID(appId)不能为空,且只能是数字"
));
}
else
{
callback
();
}
};
return
{
activeName
:
"first"
,
msgConHeight
:
0
,
// 列表 数据
currentPage
:
1
,
// 分页
pageSize
:
20
,
// 每页多少条
msgTableList
:
[],
total
:
0
,
title
:
""
,
//关键词
// selectone: "", //商品消息类型
readStatus
:
"-1"
,
//消息阅读状态
dialogMessageDetail
:
false
,
//查看详情
direction
:
"rtl"
,
messageDetailIds
:
""
,
//传给详情页面的id
ispaas
:
0
,
};
},
created
()
{
this
.
getList
();
this
.
getIsPaas
();
},
mounted
()
{
this
.
$nextTick
(()
=>
{
let
queryHeight
=
document
.
querySelector
(
".params-form"
).
clientHeight
;
this
.
msgConHeight
=
document
.
querySelector
(
".box-card"
).
clientHeight
-
queryHeight
-
140
+
"px"
;
});
},
methods
:
{
/** 列表 */
getList
()
{
let
data
=
{
page
:
this
.
currentPage
,
limit
:
this
.
pageSize
,
plat_ids
:
4
// status:-1
};
if
(
this
.
activeName
==
"first"
)
{
data
[
"type"
]
=
"1"
;
}
if
(
this
.
activeName
==
"second"
)
{
data
[
"type"
]
=
"3"
;
}
if
(
!
this
.
readStatus
==
""
)
{
data
[
"status"
]
=
this
.
readStatus
;
}
if
(
!
this
.
title
==
""
)
{
data
[
"title"
]
=
this
.
title
;
}
msgMessageList
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
total
=
res
.
data
.
counts
;
this
.
msgTableList
=
res
.
data
.
data
;
}
});
},
//全部标记已读
allRead
()
{
this
.
$confirm
(
"确认将全部消息标为已读状态?"
,
"提示:"
,
{
type
:
"warning"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
})
.
then
(
async
()
=>
{
readingNotes
().
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
message
:
"标记成功"
,
type
:
"success"
});
this
.
getList
();
}
});
})
.
catch
(()
=>
{});
},
//删除全部已读
delRead
()
{
this
.
$confirm
(
"确认将全部消息删除?"
,
"提示:"
,
{
type
:
"warning"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
})
.
then
(
async
()
=>
{
delIsRead
().
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
message
:
"删除成功"
,
type
:
"success"
});
this
.
getList
();
}
});
})
.
catch
(()
=>
{});
},
/** 搜索 */
searchMsg
()
{
this
.
getList
();
},
/** 查看详情 */
editMsg
(
row
)
{
this
.
dialogMessageDetail
=
true
;
this
.
messageDetailIds
=
row
.
id
;
},
// 转发
forward
(
row
)
{
this
.
$confirm
(
"<strong>确认把此条消息创建到系统公告列表吗?</strong><br/><span>点击确定后请到系统公告中查看或编辑</span>"
,
"消息转发"
,
{
dangerouslyUseHTMLString
:
true
,
type
:
"warning"
,
confirmButtonText
:
"确定"
,
}
)
.
then
(
async
()
=>
{
let
data
=
{
id
:
row
.
id
,
};
Forward
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
message
:
"转发成功"
,
type
:
"success"
});
this
.
getList
();
}
});
})
.
catch
(()
=>
{});
},
/** 删除 */
delMsg
(
row
)
{
let
data
=
{
id
:
row
.
id
,
};
delIsRead
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
$message
({
message
:
"删除成功"
,
type
:
"success"
});
this
.
getList
();
}
});
},
/** 列表 调整每页显示数量 */
handleSizeChange
(
val
)
{
this
.
pageSize
=
val
;
this
.
getList
();
},
/** 列表 翻页 */
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
getList
();
},
/** 时间格式化 */
timeFormatters
(
row
,
column
,
cellValue
)
{
return
parseTime
(
cellValue
,
"{y}-{m}-{d} {h}:{i}:{s}"
);
},
/** 关闭 对话框 */
closeOrderDetailDialog
()
{
this
.
dialogMessageDetail
=
false
;
this
.
getList
();
},
handleClick
(
tab
,
event
)
{
this
.
title
=
""
;
this
.
readStatus
=
"-1"
;
this
.
currentPage
=
1
;
this
.
getList
();
},
getIsPaas
()
{
GetIsPaas
().
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
ispaas
=
res
.
data
.
ispaas
;
}
});
},
},
};
</
script
>
<
style
scoped
>
.app-container
>>>
.el-card
{
height
:
100%
;
overflow
:
hidden
;
}
.app-container
>>>
.el-card
.el-card__body
{
height
:
100%
;
overflow
:
hidden
;
}
.msg-table-con
{
overflow
:
auto
;
padding-right
:
15px
;
}
::v-deep
.params-form
.el-form-item
{
margin
:
0
20px
15px
0
;
}
::v-deep
.msg-table-con
.el-button--mini
{
padding
:
3px
5px
;
}
.footer_pagination
{
/* border-top: 1px solid #e6ebf5; */
text-align
:
center
;
padding
:
20px
0
0
;
}
.dotColorGreen
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
background
:
#23c58f
;
border-radius
:
50%
;
margin-right
:
4px
;
}
.dotColorRed
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
background
:
#f14e4e
;
border-radius
:
50%
;
margin-right
:
4px
;
}
/*详情 start*/
.custom-drawer
{
position
:
absolute
;
height
:
100%
;
}
.custom-drawer
>>>
.el-drawer__header
{
text-align
:
center
;
margin
:
0
;
}
.custom-drawer
>>>
.el-drawer__body
{
height
:
100%
;
overflow
:
auto
;
padding
:
0
0
20px
0
;
}
.el-drawer__title
{
margin
:
10px
0
;
}
/*详情 end*/
.el-drawer
::v-deep
:focus
{
outline
:
none
;
}
.el-drawer
:focus
{
outline
:
none
;
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论