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
8cb9cbd3
Commit
8cb9cbd3
authored
Jul 16, 2019
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增设置模块
parent
6dcb6030
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
205 additions
and
22 deletions
+205
-22
axios.js
src/api/axios.js
+2
-2
AccountManagement.vue
src/components/pages/PaymentManagement/AccountManagement.vue
+23
-19
PaymentManagementHome.vue
...ponents/pages/PaymentManagement/PaymentManagementHome.vue
+1
-0
PaymentManagementSetting.vue
...ents/pages/PaymentManagement/PaymentManagementSetting.vue
+171
-0
main.js
src/main.js
+2
-1
router.js
src/router.js
+6
-0
No files found.
src/api/axios.js
View file @
8cb9cbd3
import
axios
from
'axios'
import
qs
from
'qs'
// axios.defaults.baseURL = 'http://192.168.1.1
93
:8300' // 本地荣
// axios.defaults.baseURL = 'http://192.168.1.1
74
:8300' // 本地钱
// axios.defaults.baseURL = 'http://192.168.1.1
01
:8300' // 本地荣
// axios.defaults.baseURL = 'http://192.168.1.1
02
: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'
...
...
src/components/pages/PaymentManagement/AccountManagement.vue
View file @
8cb9cbd3
...
...
@@ -326,26 +326,30 @@ export default {
// 内部充值接口
internalRecharge
()
{
let
_that
=
this
this
.
spinning
=
!
this
.
spinning
this
.
visible
=
false
this
.
rechargeData
.
orderPrice
=
this
.
form
.
getFieldsValue
().
orderPrice
this
.
rechargeData
.
remark
=
this
.
form
.
getFieldsValue
().
remark
this
.
rechargeData
.
orgId
=
localStorage
.
getItem
(
'orgId'
)
let
rechargeData
=
this
.
$qs
.
stringify
(
this
.
rechargeData
)
$http
.
get
(
`/v1/charge/charge?
${
rechargeData
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
message
===
'SUCCESS'
)
{
this
.
form
.
resetFields
()
this
.
$message
.
success
(
'充值已提交,审批中请耐心等待'
)
this
.
spinning
=
!
this
.
spinning
}
else
{
this
.
spinning
=
!
this
.
spinning
this
.
$message
.
success
(
res
.
data
.
message
)
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
if
(
this
.
form
.
getFieldsValue
().
orderPrice
===
''
||
this
.
form
.
getFieldsValue
().
remark
===
''
)
{
this
.
$message
.
error
(
'备注不能为空'
)
}
else
{
this
.
spinning
=
!
this
.
spinning
this
.
$message
.
error
(
'充值失败'
)
})
this
.
visible
=
false
this
.
rechargeData
.
orderPrice
=
this
.
form
.
getFieldsValue
().
orderPrice
this
.
rechargeData
.
remark
=
this
.
form
.
getFieldsValue
().
remark
this
.
rechargeData
.
orgId
=
localStorage
.
getItem
(
'orgId'
)
let
rechargeData
=
this
.
$qs
.
stringify
(
this
.
rechargeData
)
$http
.
get
(
`/v1/charge/charge?
${
rechargeData
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
message
===
'SUCCESS'
)
{
this
.
form
.
resetFields
()
this
.
$message
.
success
(
'充值已提交,审批中请耐心等待'
)
this
.
spinning
=
!
this
.
spinning
}
else
{
this
.
spinning
=
!
this
.
spinning
this
.
$message
.
success
(
res
.
data
.
message
)
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
this
.
spinning
=
!
this
.
spinning
this
.
$message
.
error
(
'充值失败'
)
})
}
},
// 充值modal
showModal
(
userId
,
userName
,
index
)
{
...
...
src/components/pages/PaymentManagement/PaymentManagementHome.vue
View file @
8cb9cbd3
...
...
@@ -15,6 +15,7 @@
<a-menu-item
key=
"recordsOfConsumption"
>
消费记录
</a-menu-item>
<a-menu-item
key=
"cashierManagement"
>
收银员管理
</a-menu-item>
<a-menu-item
key=
"systemReconciliation"
>
系统对账
</a-menu-item>
<a-menu-item
key=
"paymentManagementSetting"
>
设置中心
</a-menu-item>
<!--
<a-menu-item
key=
"operationLog"
>
操作日志
</a-menu-item>
-->
</a-menu>
</a-layout-sider>
...
...
src/components/pages/PaymentManagement/PaymentManagementSetting.vue
0 → 100644
View file @
8cb9cbd3
<
template
>
<div
class=
"paymentManagementSetting"
>
<div
class=
"title"
>
<span>
以下功能是否需要审批
</span>
<span>
开启后钉钉管理员将会收到需要审批的审批单
</span>
</div>
<div
class=
"paymentManagementSettingContent"
>
<div>
<label>
现金充值:
</label>
<a-input
v-model=
"OrgSettingData.chargeProcessInstanceId"
placeholder=
"请输入审批模板ID"
/>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
:checked=
"OrgSettingData.chargeSwitch !== '' && OrgSettingData.chargeSwitch !== 'CLOSE'"
@
change=
'chargeSwitchOnChange'
/>
</div>
<div>
<label>
津贴发放:
</label>
<a-input
v-model=
"OrgSettingData.provideSubsidyId"
placeholder=
"请输入审批模板ID"
/>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
:checked=
"OrgSettingData.provideSubsidySwitch !== '' && OrgSettingData.provideSubsidySwitch !== 'CLOSE'"
@
change=
'provideSubsidySwitchOnChange'
/>
</div>
<!--
<div>
<label>
退款:
</label>
<a-input
v-model=
"refundNotice"
placeholder=
"请输入审批模板ID"
/>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
defaultChecked
@
change=
'onChange'
/>
</div>
-->
<p><span>
*
</span>
请先到钉钉的管理后台创建相关的审批模板
</p>
</div>
<div
class=
"title"
>
<span>
以下功能是否开启消息通知
</span>
<span>
开启后用户将收到钉钉消息通知
</span>
</div>
<div
class=
"switchList"
>
<div>
<label>
充值通知:
</label>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
:checked=
"OrgSettingData.chargeNotice !== '' && OrgSettingData.chargeNotice !== 'CLOSE'"
@
change=
'chargeNoticeOnChange'
/>
</div>
<div>
<label>
退款通知:
</label>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
:checked=
"OrgSettingData.refundNotice !== '' && OrgSettingData.refundNotice !== 'CLOSE'"
@
change=
'refundNoticeOnChange'
/>
</div>
<div>
<label>
发津贴通知:
</label>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
:checked=
"OrgSettingData.provideSubsidyNotice !== '' && OrgSettingData.provideSubsidyNotice !== 'CLOSE'"
@
change=
'provideSubsidyNoticeOnChange'
/>
</div>
<div>
<label>
消费通知:
</label>
<a-switch
checkedChildren=
"开"
unCheckedChildren=
"关"
:checked=
"OrgSettingData.consumeSwitch !== '' && OrgSettingData.consumeSwitch !== 'CLOSE'"
@
change=
'consumeSwitchOnChange'
/>
</div>
</div>
<div
style=
"margin-top: 60px;margin-left: 200px"
>
<a-button
type=
"primary"
@
click=
"updateOrgSetting()"
>
保存修改
</a-button>
</div>
</div>
</
template
>
<
script
>
import
{
$http
}
from
'./../../../api/axios.js'
export
default
{
name
:
'paymentManagementSetting'
,
data
()
{
return
{
OrgSettingData
:
{}
}
},
watch
:
{},
computed
:
{},
created
:
function
()
{
this
.
queryOrgSetting
()
},
methods
:
{
queryOrgSetting
()
{
let
querySettingData
=
this
.
$qs
.
stringify
({
orgId
:
localStorage
.
getItem
(
'orgId'
)
})
$http
.
post
(
`/v1/org_setting/query_org_setting_by_org_id?
${
querySettingData
}
`
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
OrgSettingData
=
res
.
data
.
data
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
updateOrgSetting
()
{
let
updateSettingData
=
this
.
$qs
.
stringify
(
this
.
OrgSettingData
)
if
(
this
.
OrgSettingData
.
chargeProcessInstanceId
===
''
&&
this
.
OrgSettingData
.
chargeSwitch
===
'OPEN'
)
{
this
.
$message
.
error
(
'打开审批开关后必须填写审批模版ID'
)
}
else
if
(
this
.
OrgSettingData
.
provideSubsidyId
===
''
&&
this
.
OrgSettingData
.
provideSubsidySwitch
===
'OPEN'
)
{
this
.
$message
.
error
(
'打开审批开关后必须填写审批模版ID'
)
}
else
{
$http
.
post
(
`/v1/org_setting/update_org_setting_by_org_id?
${
updateSettingData
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
'0'
)
{
this
.
$message
.
success
(
'保存成功'
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
}
}).
catch
((
err
)
=>
{
this
.
$message
.
error
(
err
)
})
}
},
chargeSwitchOnChange
(
checked
)
{
this
.
OrgSettingData
.
chargeSwitch
=
checked
?
'OPEN'
:
'CLOSE'
},
provideSubsidySwitchOnChange
(
checked
)
{
this
.
OrgSettingData
.
provideSubsidySwitch
=
checked
?
'OPEN'
:
'CLOSE'
console
.
log
(
`a-switch to
${
checked
}
`
)
},
chargeNoticeOnChange
(
checked
)
{
console
.
log
(
`a-switch to
${
checked
}
`
)
this
.
OrgSettingData
.
chargeNotice
=
checked
?
'OPEN'
:
'CLOSE'
},
refundNoticeOnChange
(
checked
)
{
this
.
OrgSettingData
.
refundNotice
=
checked
?
'OPEN'
:
'CLOSE'
console
.
log
(
`a-switch to
${
checked
}
`
)
},
provideSubsidyNoticeOnChange
(
checked
)
{
this
.
OrgSettingData
.
provideSubsidyNotice
=
checked
?
'OPEN'
:
'CLOSE'
console
.
log
(
`a-switch to
${
checked
}
`
)
},
consumeSwitchOnChange
(
checked
)
{
this
.
OrgSettingData
.
consumeSwitch
=
checked
?
'OPEN'
:
'CLOSE'
console
.
log
(
`a-switch to
${
checked
}
`
)
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.title
{
height
:
47px
;
width
:
100%
;
background
:
#f7f7f7
;
line-height
:
47px
;
font-size
:
14px
;
}
.title
span
:nth-of-type
(
1
)
{
margin
:
0
20px
;
}
.title
span
:nth-of-type
(
2
)
{
color
:
#979797
;
}
.paymentManagementSettingContent
{
padding-left
:
10px
;
padding-top
:
20px
;
padding-bottom
:
20px
;
}
.paymentManagementSettingContent
div
{
margin
:
10px
0
;
}
.paymentManagementSettingContent
div
label
{
width
:
70px
;
font-size
:
14px
;
display
:
inline-block
;
}
.paymentManagementSettingContent
div
input
{
width
:
210px
;
margin
:
0
10px
;
}
.paymentManagementSettingContent
p
{
padding-left
:
80px
;
font-size
:
12px
;
margin
:
0
0
10px
0
;
}
.paymentManagementSettingContent
p
span
{
color
:
#FF0000
;
}
.switchList
{
padding-top
:
30px
;
padding-left
:
10px
;
}
.switchList
div
{
display
:
inline-block
;
margin-right
:
20px
;
}
</
style
>
src/main.js
View file @
8cb9cbd3
...
...
@@ -2,7 +2,7 @@ import Vue from 'vue'
import
App
from
'./App.vue'
import
router
from
'./router'
import
store
from
'./store'
import
{
Menu
,
Layout
,
Breadcrumb
,
Icon
,
Button
,
DatePicker
,
Input
,
Table
,
Tag
,
Divider
,
Dropdown
,
Modal
,
Form
,
Select
,
message
,
Pagination
,
LocaleProvider
,
Spin
,
Badge
}
from
'ant-design-vue'
import
{
Menu
,
Layout
,
Breadcrumb
,
Icon
,
Button
,
DatePicker
,
Input
,
Table
,
Tag
,
Divider
,
Dropdown
,
Modal
,
Form
,
Select
,
message
,
Pagination
,
LocaleProvider
,
Spin
,
Badge
,
Switch
}
from
'ant-design-vue'
import
'ant-design-vue/dist/antd.css'
import
{
config
}
from
'./api/config'
import
'./assets/css/global.css'
...
...
@@ -13,6 +13,7 @@ Vue.use(Layout)
Vue
.
use
(
LocaleProvider
)
Vue
.
use
(
Menu
)
Vue
.
use
(
Badge
)
Vue
.
use
(
Switch
)
Vue
.
use
(
Spin
)
Vue
.
use
(
Breadcrumb
)
Vue
.
use
(
Icon
)
...
...
src/router.js
View file @
8cb9cbd3
...
...
@@ -81,6 +81,12 @@ export default new Router({
name
:
'allowanceDetails'
,
meta
:
{
title
:
'支付管理/津贴发放/津贴详情'
},
component
:
resolve
=>
require
([
'./components/pages/PaymentManagement/AllowanceDetails.vue'
],
resolve
)
},
{
path
:
'/paymentManagementSetting'
,
name
:
'paymentManagementSetting'
,
meta
:
{
title
:
'支付管理/设置中心'
},
component
:
resolve
=>
require
([
'./components/pages/PaymentManagement/PaymentManagementSetting.vue'
],
resolve
)
}
]
}
...
...
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