Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayPc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
mingPayPc
Commits
7b33387f
Commit
7b33387f
authored
Jul 23, 2019
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间处理函数封装
parent
2ac9214d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
84 deletions
+11
-84
actions.js
src/api/actions.js
+0
-0
avatar.js
src/api/avatar.js
+0
-16
axios.js
src/api/axios.js
+0
-3
AllowanceDetails.vue
src/components/pages/PaymentManagement/AllowanceDetails.vue
+4
-12
AllowancePayment.vue
src/components/pages/PaymentManagement/AllowancePayment.vue
+3
-15
CashierManagement.vue
src/components/pages/PaymentManagement/CashierManagement.vue
+3
-1
RechargeRecord.vue
src/components/pages/PaymentManagement/RechargeRecord.vue
+1
-37
No files found.
src/api/actions.js
deleted
100644 → 0
View file @
2ac9214d
src/api/avatar.js
deleted
100644 → 0
View file @
2ac9214d
const
avatarFn
=
{
avatarCanvas
:
(
name
)
=>
{
let
canvas
=
document
.
createElement
(
'canvas'
)
let
con
=
canvas
.
getContext
(
'2d'
)
con
.
fillStyle
=
'#1890ff'
con
.
fillRect
(
0
,
0
,
32
,
32
)
con
.
fillStyle
=
'#ffffff'
con
.
font
=
'18px Arial'
con
.
textAlign
=
'center'
con
.
fillText
(
name
,
50
,
55
)
con
.
toDataURL
()
return
canvas
.
toDataURL
()
}
}
export
default
{
avatarFn
}
src/api/axios.js
View file @
7b33387f
...
...
@@ -4,9 +4,6 @@ import qs from 'qs'
// axios.defaults.baseURL = 'http://192.168.1.102:8300' // 本地钱
axios
.
defaults
.
baseURL
=
'http://139.196.213.18:8300'
// beta环境
let
loadingInstance
// 创建Loading 的实例
// axios.defaults.headers.post['Content-Type'] = 'application/json; charset=utf-8'
// axios.defaults.crossDomain = true
// axios.defaults.withCredentials = true // 设置cross跨域 并设置访问权限 允许跨域携带cookie信息
axios
.
defaults
.
headers
[
'Authorization'
]
=
`Bearer
${
localStorage
.
getItem
(
'token'
)}
`
// 设置请求头为 Authorization
// 配置发送请求前的拦截器可以设置token信息
axios
.
interceptors
.
request
.
use
((
config
)
=>
{
...
...
src/components/pages/PaymentManagement/AllowanceDetails.vue
View file @
7b33387f
...
...
@@ -13,7 +13,7 @@
</div>
<div>
<label>
截止日期
</label>
<div>
{{
createT
imeToStr
(
allowanceDetails
.
endTime
)
}}
</div>
<div>
{{
mwUtils
.
t
imeToStr
(
allowanceDetails
.
endTime
)
}}
</div>
</div>
<div>
<label>
津贴类型
</label>
...
...
@@ -29,7 +29,7 @@
</div>
<div>
<label>
发放时间
</label>
<div>
{{
createT
imeToStr
(
allowanceDetails
.
createTime
)
}}
</div>
<div>
{{
mwUtils
.
t
imeToStr
(
allowanceDetails
.
createTime
)
}}
</div>
</div>
<div>
<label>
备注
</label>
...
...
@@ -41,10 +41,12 @@
<
script
>
import
{
$http
}
from
'./../../../api/axios.js'
import
{
mwUtils
}
from
'./../../../lib/utils.js'
export
default
{
name
:
'allowanceDetails'
,
data
()
{
return
{
mwUtils
:
mwUtils
,
allowanceDetails
:
''
}
},
...
...
@@ -54,16 +56,6 @@ export default {
this
.
allowanceDetails
=
this
.
$route
.
params
.
allowanceDetails
},
methods
:
{
// 表格时间处理
createTimeToStr
(
time
)
{
let
timeData
=
new
Date
(
parseInt
(
time
))
let
year
=
timeData
.
getFullYear
()
let
month
=
timeData
.
getMonth
()
+
1
let
date
=
timeData
.
getDate
()
let
hour
=
timeData
.
getHours
()
let
minute
=
timeData
.
getMinutes
()
return
`
${
year
}
年
${
month
}
月
${
date
}
日
${
hour
}
:
${
minute
}
`
},
back
()
{
this
.
$router
.
go
(
-
1
)
}
...
...
src/components/pages/PaymentManagement/AllowancePayment.vue
View file @
7b33387f
...
...
@@ -27,7 +27,7 @@
<!--
<span
slot=
"grantNumber"
>
单号
</span>
-->
<span
slot=
"agentId"
>
经办人
</span>
<span
slot=
"createTime"
slot-scope=
"createTime"
>
{{
createT
imeToStr
(
createTime
)
}}
{{
mwUtils
.
t
imeToStr
(
createTime
)
}}
</span>
<span
slot=
"remark"
>
备注
</span>
<span
slot=
"couponRecordStatus"
slot-scope=
"couponRecordStatus"
>
...
...
@@ -97,10 +97,12 @@ import { config } from './../../../api/config.js'
import
{
$http
}
from
'./../../../api/axios.js'
import
{
MINGPAY_SUBSIDY_STATUS
}
from
'./../../../api/constant'
import
moment
from
'moment'
import
{
mwUtils
}
from
'./../../../lib/utils.js'
export
default
{
name
:
'AllowancePayment'
,
data
()
{
return
{
mwUtils
:
mwUtils
,
MINGPAY_SUBSIDY_STATUS
:
MINGPAY_SUBSIDY_STATUS
,
spinning
:
false
,
delayTime
:
100
,
...
...
@@ -126,10 +128,6 @@ export default {
dataIndex
:
'type'
,
scopedSlots
:
{
customRender
:
'type'
}
},
// {
// title: '单号',
// dataIndex: 'grantNumber'
// },
{
title
:
'经办人'
,
dataIndex
:
'agentId'
...
...
@@ -225,16 +223,6 @@ export default {
}
callback
()
},
// 表格时间处理
createTimeToStr
(
time
)
{
let
timeData
=
new
Date
(
parseInt
(
time
))
let
year
=
timeData
.
getFullYear
()
let
month
=
timeData
.
getMonth
()
+
1
let
date
=
timeData
.
getDate
()
let
hour
=
timeData
.
getHours
()
let
minute
=
timeData
.
getMinutes
()
return
`
${
year
}
年
${
month
}
月
${
date
}
日
${
hour
}
:
${
minute
}
`
},
// 清理选择帅选人list
clearUserMessage
()
{
this
.
searchSource
.
UserMessage
=
{
...
...
src/components/pages/PaymentManagement/CashierManagement.vue
View file @
7b33387f
...
...
@@ -11,7 +11,7 @@
<a-table
:columns=
"columns"
:dataSource=
"cashierManagementList"
size=
"default"
rowKey=
"id"
:pagination=
"pagination"
@
change=
"handleTableChange"
>
<span
slot=
"name"
>
成员
</span>
<span
slot=
"createDate"
slot-scope=
"createDate"
>
{{
createT
imeToStr
(
createDate
)
}}
{{
mwUtils
.
t
imeToStr
(
createDate
)
}}
</span>
<span
slot=
"action"
slot-scope=
"text, record, index"
>
<a
v-if=
"record.status === '0'"
href=
"javascript:;"
@
click=
"showModel(record, text, index)"
>
删除
</a>
...
...
@@ -24,10 +24,12 @@
<
script
>
import
{
config
}
from
'./../../../api/config.js'
import
{
$http
}
from
'./../../../api/axios.js'
import
{
mwUtils
}
from
'./../../../lib/utils.js'
export
default
{
name
:
'cashierManagement'
,
data
()
{
return
{
mwUtils
:
mwUtils
,
searchSource
:
{
UserMessage
:
{
avatar
:
''
,
...
...
src/components/pages/PaymentManagement/RechargeRecord.vue
View file @
7b33387f
...
...
@@ -6,7 +6,6 @@
<a-select-option
v-for=
"(item, index) in agentList"
:key=
"index"
:value=
"item.ddUserId"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
<a-select
placeholder=
"状态"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectHandlestatus"
>
<!--
<a-select-option
value=
"WAITING_PAYMENT"
>
等待支付
</a-select-option>
-->
<a-select-option
value=
"SUCCESS"
>
已完成
</a-select-option>
<a-select-option
value=
"WAITING_PERMIT"
>
审批中
</a-select-option>
<a-select-option
value=
"FAILED"
>
审批未通过
</a-select-option>
...
...
@@ -33,7 +32,6 @@
<span
slot=
"agent"
slot-scope=
"agent, record"
>
{{
agent
===
''
&&
record
.
payTypeCode
===
'EXTERNAL_ALI_RECHAGE'
?
'支付宝自充'
:
agent
}}
</span>
<!--
<span
slot=
"orderNo"
>
单号
</span>
-->
<span
slot=
"orderStatus"
slot-scope=
"orderStatus"
>
<a-badge
v-if=
"orderStatus === MINGPAY_CHARGE_ORDERSTATUS.WAITING_PERMIT"
status=
"processing"
text=
"审批中"
/>
<a-badge
v-else-if=
"orderStatus === MINGPAY_CHARGE_ORDERSTATUS.SUCCESS"
status=
"success"
text=
"已完成"
/>
...
...
@@ -72,12 +70,7 @@ export default {
title
:
'经办人'
,
dataIndex
:
'agent'
,
scopedSlots
:
{
customRender
:
'agent'
}
},
// {
// title: '单号',
// dataIndex: 'orderNo'
// },
{
},
{
title
:
'状态'
,
dataIndex
:
'orderStatus'
,
scopedSlots
:
{
customRender
:
'orderStatus'
}
...
...
@@ -125,35 +118,6 @@ export default {
this
.
agentList
=
res
.
data
.
data
.
recordList
})
},
// 充值状态
// returnStatus (str) {
// let status = ''
// switch (str) {
// case MINGPAY_CHARGE_ORDERSTATUS.WAITING_PERMIT:
// status = '审批中'
// break
// case MINGPAY_CHARGE_ORDERSTATUS.SUCCESS:
// status = '已完成'
// break
// case MINGPAY_CHARGE_ORDERSTATUS.FAILED:
// status = '审批未通过'
// break
// case MINGPAY_CHARGE_ORDERSTATUS.WAITING_PAYMENT:
// status = '等待支付'
// break
// }
// return status
// },
// 表格时间格式处理
createTimeToStr
(
time
)
{
let
timeData
=
new
Date
(
parseInt
(
time
))
let
year
=
timeData
.
getFullYear
()
let
month
=
timeData
.
getMonth
()
+
1
let
date
=
timeData
.
getDate
()
let
hour
=
timeData
.
getHours
()
let
minute
=
timeData
.
getMinutes
()
return
`
${
year
}
年
${
month
}
月
${
date
}
日
${
hour
}
:
${
minute
}
`
},
// 选人组件调用
choosePeople
()
{
config
.
ddready
(
'ddchooseOne'
).
then
((
res
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment