Commit 28992c1d by liang ce

bug 修改

parent f38796ac
...@@ -57,7 +57,6 @@ const config = { ...@@ -57,7 +57,6 @@ const config = {
corpId: 'ding9a93ca550f036ffe35c2f4657eb6378f' corpId: 'ding9a93ca550f036ffe35c2f4657eb6378f'
}) })
return axios.post(`http://139.196.213.18:8300/v1/auth/token?${senddate}`).then((res) => { return axios.post(`http://139.196.213.18:8300/v1/auth/token?${senddate}`).then((res) => {
console.log(res)
if (res.data.resultCode === '0') { if (res.data.resultCode === '0') {
sessionStorage.setItem('token', res.data.data.accessToken.access_token) sessionStorage.setItem('token', res.data.data.accessToken.access_token)
sessionStorage.setItem('userId', res.data.data.oapiUser.userid) sessionStorage.setItem('userId', res.data.data.oapiUser.userid)
...@@ -82,11 +81,9 @@ const config = { ...@@ -82,11 +81,9 @@ const config = {
corpId: sessionStorage.getItem('corpId'), // 企业id corpId: sessionStorage.getItem('corpId'), // 企业id
max: 1, // 人数限制,当multiple为true才生效,可选范围1-1500 max: 1, // 人数限制,当multiple为true才生效,可选范围1-1500
onSuccess: function (data) { onSuccess: function (data) {
console.log(data)
return resolve(data) return resolve(data)
}, },
onFail: function (err) { onFail: function (err) {
console.log(err)
return reject(err) return reject(err)
} }
}) })
...@@ -117,20 +114,6 @@ const config = { ...@@ -117,20 +114,6 @@ const config = {
return reject(err) return reject(err)
} }
}) })
// dd.biz.contact.choose({
// multiple: false, // 是否多选:true多选 false单选; 默认true
// users: [], // 默认选中的用户列表,员工userid;成功回调中应包含该信息
// corpId: 'ding9a93ca550f036ffe35c2f4657eb6378f', // 企业id
// max: 10, // 人数限制,当multiple为true才生效,可选范围1-1500
// onSuccess: function (data) {
// console.log(data)
// return resolve(data)
// },
// onFail: function (err) {
// console.log(err)
// return reject(err)
// }
// })
}) })
} }
} }
......
src/assets/logo.png

6.69 KB | W: | H:

src/assets/logo.png

3.85 KB | W: | H:

src/assets/logo.png
src/assets/logo.png
src/assets/logo.png
src/assets/logo.png
  • 2-up
  • Swipe
  • Onion skin
<template> <template>
<a-layout id="components-layout-demo-top-side"> <a-layout id="components-layout-demo-top-side">
<a-layout-header class="header"> <a-layout-header class="header">
<div class="logo" /> <div class="logo">
<img src="../../assets/logo.png" />
</div>
<a-menu <a-menu
theme="dark" theme="dark"
mode="horizontal" mode="horizontal"
:defaultSelectedKeys="['1']" :defaultSelectedKeys="['accountManagement']"
:style="{ lineHeight: '64px' }" :style="{ lineHeight: '64px' }"
@click="routerPush" @click="routerPush"
> >
...@@ -18,14 +20,13 @@ ...@@ -18,14 +20,13 @@
</a-layout-header> </a-layout-header>
<a-layout-content style="padding: 0 50px"> <a-layout-content style="padding: 0 50px">
<a-breadcrumb style="margin: 16px 0"> <a-breadcrumb style="margin: 16px 0">
<a-breadcrumb-item>Home</a-breadcrumb-item> <a-breadcrumb-item>首页</a-breadcrumb-item>
<a-breadcrumb-item>List</a-breadcrumb-item> <a-breadcrumb-item v-for="item in title" :key="item">{{item}}</a-breadcrumb-item>
<a-breadcrumb-item>App</a-breadcrumb-item>
</a-breadcrumb> </a-breadcrumb>
<router-view/> <router-view/>
</a-layout-content> </a-layout-content>
<a-layout-footer style="text-align: center"> <a-layout-footer style="text-align: center">
Ant Design ©2018 Created by Ant UED mingwork后台管理系统
</a-layout-footer> </a-layout-footer>
</a-layout> </a-layout>
</template> </template>
...@@ -35,9 +36,18 @@ export default { ...@@ -35,9 +36,18 @@ export default {
name: 'home', name: 'home',
components: {}, components: {},
data () { data () {
return {} return {
title: []
}
},
created () {
this.title = this.$route.meta.title ? this.$route.meta.title.split('/') : ''
},
watch: {
$route (to, from) {
this.title = to.meta.title.split('/')
}
}, },
watch: {},
computed: {}, computed: {},
methods: { methods: {
routerPush (obj) { routerPush (obj) {
...@@ -50,10 +60,12 @@ export default { ...@@ -50,10 +60,12 @@ export default {
<style> <style>
#components-layout-demo-top-side .logo { #components-layout-demo-top-side .logo {
width: 120px; width: 200px;
height: 31px; height: 31px;
background: rgba(255,255,255,.2);
margin: 16px 28px 16px 0;
float: left; float: left;
margin-right: 25px;
}
#components-layout-demo-top-side .logo img{
width: 100%;
} }
</style> </style>
...@@ -14,12 +14,20 @@ ...@@ -14,12 +14,20 @@
</a-select> </a-select>
<a-button type="primary" @click="search()">查询</a-button> <a-button type="primary" @click="search()">查询</a-button>
</div> </div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId"> <div class="searchUserMessage" v-if="alreadyChoose.users.length > 0 || alreadyChoose.departments.length > 0" >
<div class="positionDiv"></div> <div class="positionDiv"></div>
<div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div> <div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div>
<img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/> <div class="userListBox">
<img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name"> <div v-for="item in alreadyChoose.users" :key="item.emplId">
<span>{{ searchSource.UserMessage.name }}</span> <img v-if="item.avatar" :src="item.avatar" :alt="item.name"/>
<img v-else :src="avatarCanvasFn(item.name)" :alt="item.name">
<span>{{ item.name }}</span>
</div>
<div v-for="item in alreadyChoose.departments" :key="item.id">
<img src="../../../assets/department.png" :alt="item.name"/>
<span>{{ item.name }}</span>
</div>
</div>
</div> </div>
<a-table :columns="columns" :dataSource="accountList" size="default" rowKey="userId" :pagination="pagination" @change="handleTableChange"> <a-table :columns="columns" :dataSource="accountList" size="default" rowKey="userId" :pagination="pagination" @change="handleTableChange">
<span slot="name">姓名</span> <span slot="name">姓名</span>
...@@ -40,6 +48,7 @@ ...@@ -40,6 +48,7 @@
<span slot="action" slot-scope="text, record, index" class="operationTable"> <span slot="action" slot-scope="text, record, index" class="operationTable">
<a href="javascript:;" @click="ToViewAllowances(record)">查看津贴</a> <a href="javascript:;" @click="ToViewAllowances(record)">查看津贴</a>
<a v-if="record.status === MINGPAY_ACCOUNT_STATUS.ACTIVE" href="javascript:;" @click="showModal(record.userId, record.name, index)">充值</a> <a v-if="record.status === MINGPAY_ACCOUNT_STATUS.ACTIVE" href="javascript:;" @click="showModal(record.userId, record.name, index)">充值</a>
<a v-else href="javascript:;" style="color:#cccccc">充值</a>
<a-dropdown v-if="record.status === MINGPAY_ACCOUNT_STATUS.ACTIVE"> <a-dropdown v-if="record.status === MINGPAY_ACCOUNT_STATUS.ACTIVE">
<a class="ant-dropdown-link" href="javascript:;"> <a class="ant-dropdown-link" href="javascript:;">
更多操作 <a-icon type="down" /> 更多操作 <a-icon type="down" />
...@@ -62,6 +71,11 @@ ...@@ -62,6 +71,11 @@
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
<a-dropdown v-else>
<a style="color: #cccccc">
更多操作 <a-icon type="down" />
</a>
</a-dropdown>
</span> </span>
</a-table> </a-table>
<a-modal title="绑定实体卡" v-model="visible2" @ok="cardOperation(2)"> <a-modal title="绑定实体卡" v-model="visible2" @ok="cardOperation(2)">
...@@ -147,6 +161,10 @@ export default { ...@@ -147,6 +161,10 @@ export default {
orderPrice: '', orderPrice: '',
remark: '' remark: ''
}, },
alreadyChoose: {
departments: [],
users: []
},
selsctUserId: '', selsctUserId: '',
selsctIndex: 0, selsctIndex: 0,
searchSource: { searchSource: {
...@@ -193,7 +211,6 @@ export default { ...@@ -193,7 +211,6 @@ export default {
}, },
// 搜索条件,卡片和账户状态 // 搜索条件,卡片和账户状态
selectHandleChangeCard (value) { selectHandleChangeCard (value) {
console.log(value)
this.searchSource.cardStatus = value this.searchSource.cardStatus = value
}, },
selectHandleChangeAccount (value) { selectHandleChangeAccount (value) {
...@@ -202,7 +219,6 @@ export default { ...@@ -202,7 +219,6 @@ export default {
// 选人组件调用 // 选人组件调用
choosePeople () { choosePeople () {
config.ddready('ddchoose').then((res) => { config.ddready('ddchoose').then((res) => {
console.log(res)
let userIdListObj = [] let userIdListObj = []
let departmentIdListObj = [] let departmentIdListObj = []
res.departments.map((item, index) => { res.departments.map((item, index) => {
...@@ -211,6 +227,10 @@ export default { ...@@ -211,6 +227,10 @@ export default {
res.users.map((item, index) => { res.users.map((item, index) => {
userIdListObj.push(item.emplId) userIdListObj.push(item.emplId)
}) })
this.alreadyChoose = {
departments: res.departments,
users: res.users
}
this.searchSource.ddchoosePeople.departmentIdList = departmentIdListObj this.searchSource.ddchoosePeople.departmentIdList = departmentIdListObj
this.searchSource.ddchoosePeople.userIdList = userIdListObj this.searchSource.ddchoosePeople.userIdList = userIdListObj
}) })
...@@ -226,10 +246,9 @@ export default { ...@@ -226,10 +246,9 @@ export default {
}, },
// 清理选择帅选人list // 清理选择帅选人list
clearUserMessage () { clearUserMessage () {
this.searchSource.UserMessage = { this.alreadyChoose = {
avatar: '', departments: [],
emplId: '', users: []
name: ''
} }
}, },
// 用户头像处理 // 用户头像处理
...@@ -293,7 +312,6 @@ export default { ...@@ -293,7 +312,6 @@ export default {
}, },
// 查看津贴 // 查看津贴
ToViewAllowances (str) { ToViewAllowances (str) {
console.log(str.userId)
this.$router.push({ name: 'viewAllowances', params: { userId: str.userId } }) this.$router.push({ name: 'viewAllowances', params: { userId: str.userId } })
}, },
// 内部充值接口 // 内部充值接口
...@@ -304,7 +322,6 @@ export default { ...@@ -304,7 +322,6 @@ export default {
this.rechargeData.orgId = sessionStorage.getItem('corpId') this.rechargeData.orgId = sessionStorage.getItem('corpId')
let rechargeData = this.$qs.stringify(this.rechargeData) let rechargeData = this.$qs.stringify(this.rechargeData)
$http.get(`/v1/charge/charge?${rechargeData}`).then((res) => { $http.get(`/v1/charge/charge?${rechargeData}`).then((res) => {
console.log(res.data.message)
if (res.data.message === 'SUCCESS') { if (res.data.message === 'SUCCESS') {
this.visible = false this.visible = false
this.form.resetFields() this.form.resetFields()
...@@ -416,6 +433,8 @@ export default { ...@@ -416,6 +433,8 @@ export default {
this.visible2 = false this.visible2 = false
this.updateBindCardStatusForm.resetFields() this.updateBindCardStatusForm.resetFields()
this.$message.success('操作成功') this.$message.success('操作成功')
} else if (res.data.resultCode === '10010009') {
this.$message.error('该卡片已被占用')
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
...@@ -451,6 +470,7 @@ export default { ...@@ -451,6 +470,7 @@ export default {
justify-content: center; justify-content: center;
font-size: 12px; font-size: 12px;
padding: 8px 8px; padding: 8px 8px;
padding-right: 20px;
border: 1px solid #cccccc; border: 1px solid #cccccc;
margin-bottom: 15px; margin-bottom: 15px;
border-radius: 8px; border-radius: 8px;
...@@ -478,4 +498,18 @@ export default { ...@@ -478,4 +498,18 @@ export default {
position: absolute; position: absolute;
right: 10px; right: 10px;
} }
.userListBox{
display: flex;
flex-flow: wrap;
}
.userListBox>div{
margin: 8px;
display: flex;
flex-direction: column;
align-items: center;
}
.userListBox>div>img{
display: block;
text-align: center;
}
</style> </style>
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
<div>{{allowanceDetails.money}}</div> <div>{{allowanceDetails.money}}</div>
</div> </div>
<div> <div>
<label>截止日期</label>
<div>{{createTimeToStr(allowanceDetails.endTime) }}</div>
</div>
<div>
<label>津贴类型</label> <label>津贴类型</label>
<div>{{allowanceDetails.type === 'travel' ? '交通补贴' : '餐补'}}</div> <div>{{allowanceDetails.type === 'travel' ? '交通补贴' : '餐补'}}</div>
</div> </div>
...@@ -21,10 +25,10 @@ ...@@ -21,10 +25,10 @@
</div> </div>
<div> <div>
<label>经办人</label> <label>经办人</label>
<div>{{allowanceDetails.agent}}</div> <div>{{allowanceDetails.agentId}}</div>
</div> </div>
<div> <div>
<label>时间</label> <label>发放时间</label>
<div>{{createTimeToStr(allowanceDetails.createTime) }}</div> <div>{{createTimeToStr(allowanceDetails.createTime) }}</div>
</div> </div>
<div> <div>
......
...@@ -5,22 +5,27 @@ ...@@ -5,22 +5,27 @@
<a-select-option value="travel">交通补助</a-select-option> <a-select-option value="travel">交通补助</a-select-option>
<a-select-option value="meal">餐补</a-select-option> <a-select-option value="meal">餐补</a-select-option>
</a-select> </a-select>
<a-select placeholder="经办人" :allowClear="true" style="width: 120px;margin-right: 20px;" @change="selectAgent">
<a-select-option v-for="(item, index) in agentList" :key="index" :value="item.ddUserId">{{ item.name }}</a-select-option>
</a-select>
<a-button type="primary" @click="search()">查询</a-button> <a-button type="primary" @click="search()">查询</a-button>
<a-button type="primary" @click="changeModel()" style="margin-left: 20px;"><a-icon type="pay-circle" />发放津贴</a-button> <a-button type="primary" @click="changeModel()" style="margin-left: 20px;"><a-icon type="pay-circle" />发放津贴</a-button>
</div> </div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId"> <!-- <div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></div> <div class="positionDiv"></div>
<div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div> <div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div>
<div style="text-align: center">
<img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/> <img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/>
<img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name"> <img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span> <span>{{ searchSource.UserMessage.name }}</span>
</div> </div>
</div> -->
<a-table :columns="columns" :dataSource="recordsList" size="default" rowKey="grantNumber" :pagination="pagination" @change="handleTableChange"> <a-table :columns="columns" :dataSource="recordsList" size="default" rowKey="grantNumber" :pagination="pagination" @change="handleTableChange">
<span slot="recipient">成员</span> <span slot="recipient">成员</span>
<span slot="money">金额</span> <span slot="money">金额</span>
<span slot="type" slot-scope="type">{{ type === 'travel' ? '交通补助' : '餐补' }}</span> <span slot="type" slot-scope="type">{{ type === 'travel' ? '交通补助' : '餐补' }}</span>
<span slot="grantNumber">单号</span> <span slot="grantNumber">单号</span>
<span slot="agent">经办人</span> <span slot="agentId">经办人</span>
<span slot="createTime" slot-scope="createTime"> <span slot="createTime" slot-scope="createTime">
{{ createTimeToStr(createTime) }} {{ createTimeToStr(createTime) }}
</span> </span>
...@@ -60,7 +65,12 @@ ...@@ -60,7 +65,12 @@
v-bind="formItemLayout" v-bind="formItemLayout"
label="截止日期" label="截止日期"
> >
<a-date-picker placeholder="请选择截止日期" :showToday="false" v-decorator="['date-picker', config]" /> <a-date-picker
placeholder="请选择截止日期"
:disabledDate="disabledDate"
:showToday="false"
v-decorator="['date-picker', config]"
/>
</a-form-item> </a-form-item>
<a-form-item label="选择成员" v-bind="formItemLayout"> <a-form-item label="选择成员" v-bind="formItemLayout">
<div class="peopleBox" @click="choosePeople()"> <div class="peopleBox" @click="choosePeople()">
...@@ -79,7 +89,7 @@ ...@@ -79,7 +89,7 @@
import { config } from './../../../api/config.js' import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js' import { $http } from './../../../api/axios.js'
import { MINGPAY_RECORDS_STATUS } from './../../../api/constant' import { MINGPAY_RECORDS_STATUS } from './../../../api/constant'
import moment from 'moment'
export default { export default {
name: 'AllowancePayment', name: 'AllowancePayment',
data () { data () {
...@@ -96,7 +106,8 @@ export default { ...@@ -96,7 +106,8 @@ export default {
}, },
columns: [{ columns: [{
title: '成员', title: '成员',
dataIndex: 'recipient' dataIndex: 'recipient',
width: '20%'
}, { }, {
title: '金额', title: '金额',
dataIndex: 'money' dataIndex: 'money'
...@@ -109,7 +120,7 @@ export default { ...@@ -109,7 +120,7 @@ export default {
dataIndex: 'grantNumber' dataIndex: 'grantNumber'
}, { }, {
title: '经办人', title: '经办人',
dataIndex: 'agent' dataIndex: 'agentId'
}, { }, {
title: '备注', title: '备注',
dataIndex: 'remark' dataIndex: 'remark'
...@@ -145,29 +156,47 @@ export default { ...@@ -145,29 +156,47 @@ export default {
rules: [{ type: 'object', required: true, message: '请选择时间' }] rules: [{ type: 'object', required: true, message: '请选择时间' }]
}, },
userIdListObj: [], userIdListObj: [],
departmentIdListObj: [] departmentIdListObj: [],
agentList: []
} }
}, },
created: function () { created: function () {
this.queryRecordList() this.queryRecordList()
this.getAgentList()
}, },
methods: { methods: {
// 获取操作人列表
getAgentList () {
let AgentData = this.$qs.stringify({
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/account/query_user_admin_list?${AgentData}`).then((res) => {
this.agentList = res.data.data.recordList
})
},
toAllowanceDetails (record, text, index) { toAllowanceDetails (record, text, index) {
this.$router.push({ name: 'allowanceDetails', params: { allowanceDetails: record } }) this.$router.push({ name: 'allowanceDetails', params: { allowanceDetails: record } })
}, },
selectAgent (value) {
this.searchSource.agentId = value
},
disabledDate (current) {
// Can not select days before today and today
return current && current < moment().endOf('day')
},
// 获取消费列表 // 获取消费列表
queryRecordList () { queryRecordList () {
let RecordData = this.$qs.stringify({ let RecordData = this.$qs.stringify({
currentPage: this.pagination.current, currentPage: this.pagination.current,
pageNumber: this.pagination.defaultPageSize, pageNumber: this.pagination.defaultPageSize,
type: this.searchSource.type, type: this.searchSource.type,
agentId: this.searchSource.agentId,
orgId: sessionStorage.getItem('corpId') orgId: sessionStorage.getItem('corpId')
}) })
$http.get(`/v1/account/list_couponRecord?${RecordData}`).then((res) => { $http.get(`/v1/account/list_couponRecord?${RecordData}`).then((res) => {
let data = res.data.data let data = res.data.data
this.recordsList = data.list this.recordsList = data.list
this.pagination.total = parseInt(data.total) this.pagination.total = parseInt(data.total)
console.log(res.data.data)
}) })
}, },
// 校验账户充值金额大小和纯数字 // 校验账户充值金额大小和纯数字
...@@ -231,7 +260,6 @@ export default { ...@@ -231,7 +260,6 @@ export default {
}, },
// 搜索条件津贴类型 // 搜索条件津贴类型
selectHandType (value) { selectHandType (value) {
console.log(value)
this.searchSource.type = value this.searchSource.type = value
}, },
peopleListStr () { peopleListStr () {
...@@ -254,7 +282,6 @@ export default { ...@@ -254,7 +282,6 @@ export default {
...fieldsValue, ...fieldsValue,
'date-picker': fieldsValue['date-picker'].format('YYYY-MM-DD') 'date-picker': fieldsValue['date-picker'].format('YYYY-MM-DD')
} }
console.log('Received values of form: ', values)
let userIdList = [] let userIdList = []
let departmentIdList = [] let departmentIdList = []
this.userIdListObj.map((item, index) => { this.userIdListObj.map((item, index) => {
...@@ -273,7 +300,6 @@ export default { ...@@ -273,7 +300,6 @@ export default {
orgId: sessionStorage.getItem('corpId') orgId: sessionStorage.getItem('corpId')
}) })
$http.get(`/v1/account/batch_create_subsidy?${RecordData}`).then((res) => { $http.get(`/v1/account/batch_create_subsidy?${RecordData}`).then((res) => {
console.log(res)
if (res.data.message === 'SUCCESS') { if (res.data.message === 'SUCCESS') {
this.visible = false this.visible = false
this.form.resetFields() this.form.resetFields()
...@@ -292,7 +318,6 @@ export default { ...@@ -292,7 +318,6 @@ export default {
}, },
choosePeople () { choosePeople () {
config.ddready('ddchoose').then((res) => { config.ddready('ddchoose').then((res) => {
console.log(res)
this.userIdListObj = res.users this.userIdListObj = res.users
this.departmentIdListObj = res.departments this.departmentIdListObj = res.departments
this.form.getFieldsValue().peopleList = 'ok' this.form.getFieldsValue().peopleList = 'ok'
......
<template>
<div class="cashierManagement">
<a-button type="primary" style="margin-bottom: 20px" @click="choosePeople"><a-icon type="user" />添加收银人</a-button>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></div>
<div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div>
<img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/>
<img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span>
</div>
<a-table :columns="columns" :dataSource="cashierManagementList" size="default" rowKey="id" :pagination="pagination" @change="handleTableChange">
<span slot="name">成员</span>
<span slot="createTime" slot-scope="createTime">
{{ createTimeToStr(createTime) }}
</span>
<span slot="action" slot-scope="text, record, index">
<a href="javascript:;" @click="showModel(record, text, index)">删除</a>
</span>
</a-table>
</div>
</template>
<script>
import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js'
export default {
name: 'cashierManagement',
data () {
return {
searchSource: {
UserMessage: {
avatar: '',
emplId: '',
name: ''
},
status: '',
agentId: ''
},
columns: [{
title: '成员',
dataIndex: 'name'
}, {
title: '时间',
dataIndex: 'createDate',
scopedSlots: { customRender: 'createDate' }
}, {
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' }
}],
cashierManagementList: [],
pagination: {
current: 1,
defaultCurrent: 1,
defaultPageSize: 10,
hideOnSinglePage: true,
total: 0
}
}
},
watch: {},
computed: {},
created: function () {
this.getCashierList()
},
methods: {
showModel (record, text, index) {
const _that = this
this.$confirm({
title: '确认要删除该收银员吗?',
content: '删除后,该人员无法在设备上进行收钱操作',
okText: '确定',
cancelText: '取消',
onOk () {
_that.deleteCashier(record)
}
})
},
deleteCashier (record) {
let DeleteCashierData = this.$qs.stringify({
userId: record.userId,
status: '1',
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/cashier/delete_cashier?${DeleteCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
this.$message.success('操作成功')
this.getCashierList()
} else {
this.$message.error(res.data.message)
}
}).catch(() => {
this.$message.error('删除失败')
})
},
getCashierList () {
let CashierListData = this.$qs.stringify({
pageNumber: this.pagination.defaultPageSize,
currentPage: this.pagination.current,
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/cashier/list_cashier?${CashierListData}`).then((res) => {
this.pagination.total = parseInt(res.data.data.total)
this.cashierManagementList = res.data.data.list
}).catch(() => {
this.$message.error('获取收银员信息失败')
})
},
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) => {
let insertCashierData = this.$qs.stringify({
name: res[0].name,
userId: res[0].emplId,
orgId: sessionStorage.getItem('corpId')
})
$http.get(`v1/cashier/insert_cashier?${insertCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
this.$message.success('添加成功')
this.getCashierList()
} else {
this.$message.error(res.data.message)
}
}).catch((err) => {
console.log(err)
})
})
},
handleTableChange (pagination, filters, sorter) {
this.pagination.current = pagination.current
this.getCashierList()
}
}
}
</script>
<style lang="less" scoped>
.searchUserMessage{
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
font-size: 12px;
padding: 8px 8px;
border: 1px solid #cccccc;
margin-bottom: 15px;
border-radius: 8px;
position: relative;
}
.searchUserMessage img{
width: 32px;
height: 32px;
border-radius: 50%;
margin-bottom: 8px;
}
.positionDiv{
height: 12px;
width: 12px;
transform:rotate(45deg);
border-left: 1px solid #cccccc;
border-top: 1px solid #cccccc;
position: absolute;
top: -7px;
left: 30px;
background: white;
z-index: 99;
}
.clearUserMessage{
position: absolute;
right: 10px;
}
.peopleBox{
width: 100%;
border: 1px solid #d9d9d9;
min-height: 40px;
border-radius: 4px;
padding: 4px 11px;
font-size: 14px;
line-height: 1.5;
cursor: pointer;
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<a-layout-sider width="200" style="background: #fff"> <a-layout-sider width="200" style="background: #fff">
<a-menu <a-menu
mode="inline" mode="inline"
:defaultSelectedKeys="['accountManagement']" :defaultSelectedKeys="[defaultSelectedKeys]"
:defaultOpenKeys="['sub1']" :defaultOpenKeys="['sub1']"
style="height: 100%" style="height: 100%"
@click="routerPush" @click="routerPush"
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<a-menu-item key="rechargeRecord">充值记录</a-menu-item> <a-menu-item key="rechargeRecord">充值记录</a-menu-item>
<a-menu-item key="allowancePayment">津贴发放</a-menu-item> <a-menu-item key="allowancePayment">津贴发放</a-menu-item>
<a-menu-item key="recordsOfConsumption">消费记录</a-menu-item> <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="systemReconciliation">系统对账</a-menu-item>
<a-menu-item key="operationLog">操作日志</a-menu-item> --> <a-menu-item key="operationLog">操作日志</a-menu-item> -->
</a-menu> </a-menu>
...@@ -27,6 +28,19 @@ ...@@ -27,6 +28,19 @@
<script> <script>
export default { export default {
name: 'paymentManagementHome', name: 'paymentManagementHome',
data () {
return {
defaultSelectedKeys: 'defaultSelectedKeys'
}
},
created () {
this.defaultSelectedKeys = this.$route.name
},
watch: {
$route (to, from) {
this.defaultSelectedKeys = to.name
}
},
methods: { methods: {
routerPush (obj) { routerPush (obj) {
this.$router.push({ name: obj.key }) this.$router.push({ name: obj.key })
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<div class="RechargeRecord"> <div class="RechargeRecord">
<div class="searchBox"> <div class="searchBox">
<a-input placeholder="选择成员" @click="choosePeople"/> <a-input placeholder="选择成员" @click="choosePeople"/>
<!-- <a-input placeholder="经办人"/> --> <a-select placeholder="经办人" :allowClear="true" style="width: 120px;margin-right: 20px;" @change="selectAgent">
<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 placeholder="状态" :allowClear="true" style="width: 120px;margin-right: 20px;" @change="selectHandlestatus">
<!-- <a-select-option value="WAITING_PAYMENT">等待支付</a-select-option> --> <!-- <a-select-option value="WAITING_PAYMENT">等待支付</a-select-option> -->
<a-select-option value="SUCCESS">已完成</a-select-option> <a-select-option value="SUCCESS">已完成</a-select-option>
...@@ -14,10 +16,14 @@ ...@@ -14,10 +16,14 @@
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId"> <div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></div> <div class="positionDiv"></div>
<div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div> <div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div>
<div class="userListBox">
<div>
<img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/> <img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/>
<img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name"> <img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span> <span>{{ searchSource.UserMessage.name }}</span>
</div> </div>
</div>
</div>
<a-table :columns="columns" :dataSource="chargeList" :pagination="pagination" @change="handleTableChange" rowKey="orderNo"> <a-table :columns="columns" :dataSource="chargeList" :pagination="pagination" @change="handleTableChange" rowKey="orderNo">
<span slot="userName">姓名</span> <span slot="userName">姓名</span>
<span slot="departmentNameList" slot-scope="departmentNameList"> <span slot="departmentNameList" slot-scope="departmentNameList">
...@@ -91,15 +97,26 @@ export default { ...@@ -91,15 +97,26 @@ export default {
}, },
status: '', status: '',
agentId: '' agentId: ''
} },
agentList: []
} }
}, },
watch: {}, watch: {},
computed: {}, computed: {},
created: function () { created: function () {
this.queryRechargeList() this.queryRechargeList()
this.getAgentList()
}, },
methods: { methods: {
// 获取操作人列表
getAgentList () {
let AgentData = this.$qs.stringify({
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/account/query_user_admin_list?${AgentData}`).then((res) => {
this.agentList = res.data.data.recordList
})
},
// 充值状态 // 充值状态
returnStatus (str) { returnStatus (str) {
let status = '' let status = ''
...@@ -174,6 +191,9 @@ export default { ...@@ -174,6 +191,9 @@ export default {
selectHandlestatus (value) { selectHandlestatus (value) {
this.searchSource.status = value this.searchSource.status = value
}, },
selectAgent (value) {
this.searchSource.agentId = value
},
queryRechargeList () { queryRechargeList () {
let RechargeData = this.$qs.stringify({ let RechargeData = this.$qs.stringify({
pageNumber: 10, pageNumber: 10,
...@@ -186,14 +206,12 @@ export default { ...@@ -186,14 +206,12 @@ export default {
$http.get(`/v1/charge/list_charge?${RechargeData}`).then((res) => { $http.get(`/v1/charge/list_charge?${RechargeData}`).then((res) => {
let data = res.data.data let data = res.data.data
this.pagination.total = parseInt(data.totalCount) this.pagination.total = parseInt(data.totalCount)
console.log(data.recordList)
this.chargeList = data.recordList this.chargeList = data.recordList
}) })
}, },
// 分页 // 分页
handleTableChange (pagination, filters, sorter) { handleTableChange (pagination, filters, sorter) {
this.pagination.current = pagination.current this.pagination.current = pagination.current
console.log(pagination.current)
this.queryRechargeList() this.queryRechargeList()
}, },
departmentNameListToStr (str) { departmentNameListToStr (str) {
...@@ -261,4 +279,12 @@ export default { ...@@ -261,4 +279,12 @@ export default {
position: absolute; position: absolute;
right: 10px; right: 10px;
} }
.userListBox{
text-align: center;
display: flex;
}
.userListBox>div>img{
display: block;
text-align: center;
}
</style> </style>
...@@ -4,26 +4,33 @@ ...@@ -4,26 +4,33 @@
<a-input placeholder="消费人" @click="choosePeople" style="width: 120px"/> <a-input placeholder="消费人" @click="choosePeople" style="width: 120px"/>
<a-select placeholder="状态" :allowClear="true" style="width: 120px;margin-right: 20px;" @change="selectHandRecords"> <a-select placeholder="状态" :allowClear="true" style="width: 120px;margin-right: 20px;" @change="selectHandRecords">
<a-select-option value="SUCCESS">已消费</a-select-option> <a-select-option value="SUCCESS">已消费</a-select-option>
<a-select-option value="WAITING_PERMIT">退款审核中</a-select-option>
<a-select-option value="REFUND_SUCCESS">已退款</a-select-option> <a-select-option value="REFUND_SUCCESS">已退款</a-select-option>
</a-select> </a-select>
<a-select placeholder="收银员" :allowClear="true" style="width: 120px;margin-right: 20px;" @change="selectagent">
<a-select-option v-for="item in agentList" :value="item.userId" :key="item">{{item.name}}</a-select-option>
</a-select>
<a-button type="primary" @click="search()">查询</a-button> <a-button type="primary" @click="search()">查询</a-button>
</div> </div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId"> <div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></div> <div class="positionDiv"></div>
<div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div> <div class="clearUserMessage"><a href="javascript:;" @click="clearUserMessage">清除</a></div>
<div class="userListBox">
<div>
<img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/> <img v-if="searchSource.UserMessage.avatar" :src="searchSource.UserMessage.avatar" :alt="searchSource.UserMessage.name"/>
<img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name"> <img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span> <span>{{ searchSource.UserMessage.name }}</span>
</div> </div>
</div>
</div>
<a-table :columns="columns" :dataSource="recordsList" size="default" rowKey="orderNo" :pagination="pagination" @change="handleTableChange"> <a-table :columns="columns" :dataSource="recordsList" size="default" rowKey="orderNo" :pagination="pagination" @change="handleTableChange">
<span slot="userName">消费人</span> <span slot="userName">消费人</span>
<span slot="departmentNameList" slot-scope="departmentNameList"> <span slot="departmentNameList" slot-scope="departmentNameList">
{{ departmentNameListToStr(departmentNameList) }} {{ departmentNameListToStr(departmentNameList) }}
</span> </span>
<span slot="agent">操作人</span>
<span slot="consumptionAmount">实际消费</span> <span slot="consumptionAmount">实际消费</span>
<span slot="consumptionSubsidyAmount">津贴消费</span> <span slot="consumptionSubsidyAmount">津贴消费</span>
<span slot="orderNo">单号</span> <!-- <span slot="orderNo">单号</span> -->
<span slot="orderStatus" slot-scope="orderStatus"> <span slot="orderStatus" slot-scope="orderStatus">
{{ orderStatus === MINGPAY_RECORDS_STATUS.SUCCESS ? '已消费' : orderStatus === MINGPAY_RECORDS_STATUS.WAITING_PERMIT ? 'WAITING_PERMIT' : '已退款'}} {{ orderStatus === MINGPAY_RECORDS_STATUS.SUCCESS ? '已消费' : orderStatus === MINGPAY_RECORDS_STATUS.WAITING_PERMIT ? 'WAITING_PERMIT' : '已退款'}}
</span> </span>
...@@ -33,7 +40,7 @@ ...@@ -33,7 +40,7 @@
</span> </span>
<span slot="action" slot-scope="text, record, index" class="operationTable"> <span slot="action" slot-scope="text, record, index" class="operationTable">
<a v-if="record.orderStatus === MINGPAY_RECORDS_STATUS.SUCCESS" href="javascript:;" @click="refundModal(record, text, index)">退款</a> <a v-if="record.orderStatus === MINGPAY_RECORDS_STATUS.SUCCESS" href="javascript:;" @click="refundModal(record, text, index)">退款</a>
<a v-else style="color: #cccccc;" href="javascript:;">退款</a> <a v-else style="color: #cccccc;" href="javascript:;">退款</a>
</span> </span>
</a-table> </a-table>
<a-modal title="发起退款" v-model="visible" @ok="refund()"> <a-modal title="发起退款" v-model="visible" @ok="refund()">
...@@ -67,6 +74,9 @@ export default { ...@@ -67,6 +74,9 @@ export default {
dataIndex: 'departmentNameList', dataIndex: 'departmentNameList',
scopedSlots: { customRender: 'departmentNameList' } scopedSlots: { customRender: 'departmentNameList' }
}, { }, {
title: '操作人',
dataIndex: 'agent'
}, {
title: '实际消费', title: '实际消费',
dataIndex: 'consumptionAmount' dataIndex: 'consumptionAmount'
}, },
...@@ -74,10 +84,11 @@ export default { ...@@ -74,10 +84,11 @@ export default {
title: '津贴消费', title: '津贴消费',
dataIndex: 'consumptionSubsidyAmount' dataIndex: 'consumptionSubsidyAmount'
}, },
// {
// title: '单号',
// dataIndex: 'orderNo'
// },
{ {
title: '单号',
dataIndex: 'orderNo'
}, {
title: '状态', title: '状态',
dataIndex: 'orderStatus', dataIndex: 'orderStatus',
scopedSlots: { customRender: 'orderStatus' } scopedSlots: { customRender: 'orderStatus' }
...@@ -112,13 +123,25 @@ export default { ...@@ -112,13 +123,25 @@ export default {
}, },
status: '', status: '',
refundSelect: '', refundSelect: '',
form: this.$form.createForm(this) form: this.$form.createForm(this),
agentList: []
} }
}, },
created: function () { created: function () {
this.queryRecordList() this.queryRecordList()
this.queryAgentList()
}, },
methods: { methods: {
queryAgentList () {
let CashierListData = this.$qs.stringify({
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/cashier/list_cashier_all?${CashierListData}`).then((res) => {
this.agentList = res.data.data.list
}).catch(() => {
this.$message.error('获取操作员信息失败')
})
},
refundModal (record, text, index) { refundModal (record, text, index) {
this.visible = !this.visible this.visible = !this.visible
this.refundSelect = record this.refundSelect = record
...@@ -129,7 +152,6 @@ export default { ...@@ -129,7 +152,6 @@ export default {
}, },
// 退款 // 退款
refund () { refund () {
console.log(this.form.getFieldsValue().remark)
if (this.form.getFieldsValue().remark === undefined) { if (this.form.getFieldsValue().remark === undefined) {
this.$message.error('请输入备注') this.$message.error('请输入备注')
} else { } else {
...@@ -146,7 +168,6 @@ export default { ...@@ -146,7 +168,6 @@ export default {
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
} }
console.log(res)
}).catch(() => { }).catch(() => {
this.$message.error('退款失败') this.$message.error('退款失败')
}) })
...@@ -177,7 +198,6 @@ export default { ...@@ -177,7 +198,6 @@ export default {
let data = res.data.data let data = res.data.data
this.recordsList = data.recordList this.recordsList = data.recordList
this.pagination.total = parseInt(data.totalCount) this.pagination.total = parseInt(data.totalCount)
console.log(res.data.data)
}) })
}, },
// 选人组件调用 // 选人组件调用
...@@ -238,8 +258,10 @@ export default { ...@@ -238,8 +258,10 @@ export default {
}, },
// 搜索条件消费单状态 // 搜索条件消费单状态
selectHandRecords (value) { selectHandRecords (value) {
console.log(value)
this.searchSource.status = value this.searchSource.status = value
},
selectagent (value) {
this.searchSource.agentId = value
} }
} }
} }
...@@ -291,4 +313,12 @@ export default { ...@@ -291,4 +313,12 @@ export default {
position: absolute; position: absolute;
right: 10px; right: 10px;
} }
.userListBox{
text-align: center;
display: flex;
}
.userListBox>div>img{
display: block;
text-align: center;
}
</style> </style>
...@@ -43,12 +43,10 @@ router.beforeEach(function (to, from, next) { ...@@ -43,12 +43,10 @@ router.beforeEach(function (to, from, next) {
} else { } else {
config.ddconfig().then((res) => { config.ddconfig().then((res) => {
if (res === 'no') { if (res === 'no') {
console.log('no', res)
next({ name: 'configError' }) next({ name: 'configError' })
} }
}).then(() => { }).then(() => {
config.ddready('ddpermission').then((res) => { config.ddready('ddpermission').then((res) => {
console.log('ddpermission', res)
if (res === 'noPermission') { if (res === 'noPermission') {
next({ name: 'noPermission' }) next({ name: 'noPermission' })
} else { } else {
......
...@@ -31,41 +31,55 @@ export default new Router({ ...@@ -31,41 +31,55 @@ export default new Router({
{ {
path: '/accountManagement', path: '/accountManagement',
name: 'accountManagement', name: 'accountManagement',
meta: { title: '支付管理/账户中心' },
component: resolve => require(['./components/pages/PaymentManagement/AccountManagement.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/AccountManagement.vue'], resolve)
}, },
{ {
path: '/cashierManagement',
name: 'cashierManagement',
meta: { title: '支付管理/收银员管理' },
component: resolve => require(['./components/pages/PaymentManagement/CashierManagement.vue'], resolve)
},
{
path: '/allowancePayment', path: '/allowancePayment',
name: 'allowancePayment', name: 'allowancePayment',
meta: { title: '支付管理/津贴发放' },
component: resolve => require(['./components/pages/PaymentManagement/AllowancePayment.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/AllowancePayment.vue'], resolve)
}, },
{ {
path: '/operationLog', path: '/operationLog',
name: 'operationLog', name: 'operationLog',
meta: { title: '支付管理/操作日志' },
component: resolve => require(['./components/pages/PaymentManagement/OperationLog.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/OperationLog.vue'], resolve)
}, },
{ {
path: '/rechargeRecord', path: '/rechargeRecord',
name: 'rechargeRecord', name: 'rechargeRecord',
meta: { title: '支付管理/充值记录' },
component: resolve => require(['./components/pages/PaymentManagement/RechargeRecord.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/RechargeRecord.vue'], resolve)
}, },
{ {
path: '/recordsOfConsumption', path: '/recordsOfConsumption',
name: 'recordsOfConsumption', name: 'recordsOfConsumption',
meta: { title: '支付管理/消费记录' },
component: resolve => require(['./components/pages/PaymentManagement/RecordsOfConsumption.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/RecordsOfConsumption.vue'], resolve)
}, },
{ {
path: '/systemReconciliation', path: '/systemReconciliation',
name: 'systemReconciliation', name: 'systemReconciliation',
meta: { title: '支付管理/系统对账' },
component: resolve => require(['./components/pages/PaymentManagement/SystemReconciliation.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/SystemReconciliation.vue'], resolve)
}, },
{ {
path: '/viewAllowances', path: '/viewAllowances',
name: 'viewAllowances', name: 'viewAllowances',
meta: { title: '支付管理/账户中心/查看津贴' },
component: resolve => require(['./components/pages/PaymentManagement/ViewAllowances.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/ViewAllowances.vue'], resolve)
}, },
{ {
path: '/allowanceDetails', path: '/allowanceDetails',
name: 'allowanceDetails', name: 'allowanceDetails',
meta: { title: '支付管理/津贴发放/津贴详情' },
component: resolve => require(['./components/pages/PaymentManagement/AllowanceDetails.vue'], resolve) component: resolve => require(['./components/pages/PaymentManagement/AllowanceDetails.vue'], resolve)
} }
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment