Commit 28992c1d by liang ce

bug 修改

parent f38796ac
......@@ -57,7 +57,6 @@ const config = {
corpId: 'ding9a93ca550f036ffe35c2f4657eb6378f'
})
return axios.post(`http://139.196.213.18:8300/v1/auth/token?${senddate}`).then((res) => {
console.log(res)
if (res.data.resultCode === '0') {
sessionStorage.setItem('token', res.data.data.accessToken.access_token)
sessionStorage.setItem('userId', res.data.data.oapiUser.userid)
......@@ -82,11 +81,9 @@ const config = {
corpId: sessionStorage.getItem('corpId'), // 企业id
max: 1, // 人数限制,当multiple为true才生效,可选范围1-1500
onSuccess: function (data) {
console.log(data)
return resolve(data)
},
onFail: function (err) {
console.log(err)
return reject(err)
}
})
......@@ -117,20 +114,6 @@ const config = {
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>
<a-layout id="components-layout-demo-top-side">
<a-layout-header class="header">
<div class="logo" />
<div class="logo">
<img src="../../assets/logo.png" />
</div>
<a-menu
theme="dark"
mode="horizontal"
:defaultSelectedKeys="['1']"
:defaultSelectedKeys="['accountManagement']"
:style="{ lineHeight: '64px' }"
@click="routerPush"
>
......@@ -18,14 +20,13 @@
</a-layout-header>
<a-layout-content style="padding: 0 50px">
<a-breadcrumb style="margin: 16px 0">
<a-breadcrumb-item>Home</a-breadcrumb-item>
<a-breadcrumb-item>List</a-breadcrumb-item>
<a-breadcrumb-item>App</a-breadcrumb-item>
<a-breadcrumb-item>首页</a-breadcrumb-item>
<a-breadcrumb-item v-for="item in title" :key="item">{{item}}</a-breadcrumb-item>
</a-breadcrumb>
<router-view/>
</a-layout-content>
<a-layout-footer style="text-align: center">
Ant Design ©2018 Created by Ant UED
mingwork后台管理系统
</a-layout-footer>
</a-layout>
</template>
......@@ -35,9 +36,18 @@ export default {
name: 'home',
components: {},
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: {},
methods: {
routerPush (obj) {
......@@ -50,10 +60,12 @@ export default {
<style>
#components-layout-demo-top-side .logo {
width: 120px;
width: 200px;
height: 31px;
background: rgba(255,255,255,.2);
margin: 16px 28px 16px 0;
float: left;
margin-right: 25px;
}
#components-layout-demo-top-side .logo img{
width: 100%;
}
</style>
......@@ -14,12 +14,20 @@
</a-select>
<a-button type="primary" @click="search()">查询</a-button>
</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="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 class="userListBox">
<div v-for="item in alreadyChoose.users" :key="item.emplId">
<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>
<a-table :columns="columns" :dataSource="accountList" size="default" rowKey="userId" :pagination="pagination" @change="handleTableChange">
<span slot="name">姓名</span>
......@@ -40,6 +48,7 @@
<span slot="action" slot-scope="text, record, index" class="operationTable">
<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-else href="javascript:;" style="color:#cccccc">充值</a>
<a-dropdown v-if="record.status === MINGPAY_ACCOUNT_STATUS.ACTIVE">
<a class="ant-dropdown-link" href="javascript:;">
更多操作 <a-icon type="down" />
......@@ -62,6 +71,11 @@
</a-menu-item>
</a-menu>
</a-dropdown>
<a-dropdown v-else>
<a style="color: #cccccc">
更多操作 <a-icon type="down" />
</a>
</a-dropdown>
</span>
</a-table>
<a-modal title="绑定实体卡" v-model="visible2" @ok="cardOperation(2)">
......@@ -147,6 +161,10 @@ export default {
orderPrice: '',
remark: ''
},
alreadyChoose: {
departments: [],
users: []
},
selsctUserId: '',
selsctIndex: 0,
searchSource: {
......@@ -193,7 +211,6 @@ export default {
},
// 搜索条件,卡片和账户状态
selectHandleChangeCard (value) {
console.log(value)
this.searchSource.cardStatus = value
},
selectHandleChangeAccount (value) {
......@@ -202,7 +219,6 @@ export default {
// 选人组件调用
choosePeople () {
config.ddready('ddchoose').then((res) => {
console.log(res)
let userIdListObj = []
let departmentIdListObj = []
res.departments.map((item, index) => {
......@@ -211,6 +227,10 @@ export default {
res.users.map((item, index) => {
userIdListObj.push(item.emplId)
})
this.alreadyChoose = {
departments: res.departments,
users: res.users
}
this.searchSource.ddchoosePeople.departmentIdList = departmentIdListObj
this.searchSource.ddchoosePeople.userIdList = userIdListObj
})
......@@ -226,10 +246,9 @@ export default {
},
// 清理选择帅选人list
clearUserMessage () {
this.searchSource.UserMessage = {
avatar: '',
emplId: '',
name: ''
this.alreadyChoose = {
departments: [],
users: []
}
},
// 用户头像处理
......@@ -293,7 +312,6 @@ export default {
},
// 查看津贴
ToViewAllowances (str) {
console.log(str.userId)
this.$router.push({ name: 'viewAllowances', params: { userId: str.userId } })
},
// 内部充值接口
......@@ -304,7 +322,6 @@ export default {
this.rechargeData.orgId = sessionStorage.getItem('corpId')
let rechargeData = this.$qs.stringify(this.rechargeData)
$http.get(`/v1/charge/charge?${rechargeData}`).then((res) => {
console.log(res.data.message)
if (res.data.message === 'SUCCESS') {
this.visible = false
this.form.resetFields()
......@@ -416,6 +433,8 @@ export default {
this.visible2 = false
this.updateBindCardStatusForm.resetFields()
this.$message.success('操作成功')
} else if (res.data.resultCode === '10010009') {
this.$message.error('该卡片已被占用')
} else {
this.$message.error(res.data.message)
}
......@@ -451,6 +470,7 @@ export default {
justify-content: center;
font-size: 12px;
padding: 8px 8px;
padding-right: 20px;
border: 1px solid #cccccc;
margin-bottom: 15px;
border-radius: 8px;
......@@ -478,4 +498,18 @@ export default {
position: absolute;
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>
......@@ -12,6 +12,10 @@
<div>{{allowanceDetails.money}}</div>
</div>
<div>
<label>截止日期</label>
<div>{{createTimeToStr(allowanceDetails.endTime) }}</div>
</div>
<div>
<label>津贴类型</label>
<div>{{allowanceDetails.type === 'travel' ? '交通补贴' : '餐补'}}</div>
</div>
......@@ -21,10 +25,10 @@
</div>
<div>
<label>经办人</label>
<div>{{allowanceDetails.agent}}</div>
<div>{{allowanceDetails.agentId}}</div>
</div>
<div>
<label>时间</label>
<label>发放时间</label>
<div>{{createTimeToStr(allowanceDetails.createTime) }}</div>
</div>
<div>
......
......@@ -5,22 +5,27 @@
<a-select-option value="travel">交通补助</a-select-option>
<a-select-option value="meal">餐补</a-select-option>
</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="changeModel()" style="margin-left: 20px;"><a-icon type="pay-circle" />发放津贴</a-button>
</div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<!-- <div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></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-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span>
</div>
</div> -->
<a-table :columns="columns" :dataSource="recordsList" size="default" rowKey="grantNumber" :pagination="pagination" @change="handleTableChange">
<span slot="recipient">成员</span>
<span slot="money">金额</span>
<span slot="type" slot-scope="type">{{ type === 'travel' ? '交通补助' : '餐补' }}</span>
<span slot="grantNumber">单号</span>
<span slot="agent">经办人</span>
<span slot="agentId">经办人</span>
<span slot="createTime" slot-scope="createTime">
{{ createTimeToStr(createTime) }}
</span>
......@@ -60,7 +65,12 @@
v-bind="formItemLayout"
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 label="选择成员" v-bind="formItemLayout">
<div class="peopleBox" @click="choosePeople()">
......@@ -79,7 +89,7 @@
import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js'
import { MINGPAY_RECORDS_STATUS } from './../../../api/constant'
import moment from 'moment'
export default {
name: 'AllowancePayment',
data () {
......@@ -96,7 +106,8 @@ export default {
},
columns: [{
title: '成员',
dataIndex: 'recipient'
dataIndex: 'recipient',
width: '20%'
}, {
title: '金额',
dataIndex: 'money'
......@@ -109,7 +120,7 @@ export default {
dataIndex: 'grantNumber'
}, {
title: '经办人',
dataIndex: 'agent'
dataIndex: 'agentId'
}, {
title: '备注',
dataIndex: 'remark'
......@@ -145,29 +156,47 @@ export default {
rules: [{ type: 'object', required: true, message: '请选择时间' }]
},
userIdListObj: [],
departmentIdListObj: []
departmentIdListObj: [],
agentList: []
}
},
created: function () {
this.queryRecordList()
this.getAgentList()
},
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) {
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 () {
let RecordData = this.$qs.stringify({
currentPage: this.pagination.current,
pageNumber: this.pagination.defaultPageSize,
type: this.searchSource.type,
agentId: this.searchSource.agentId,
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/account/list_couponRecord?${RecordData}`).then((res) => {
let data = res.data.data
this.recordsList = data.list
this.pagination.total = parseInt(data.total)
console.log(res.data.data)
})
},
// 校验账户充值金额大小和纯数字
......@@ -231,7 +260,6 @@ export default {
},
// 搜索条件津贴类型
selectHandType (value) {
console.log(value)
this.searchSource.type = value
},
peopleListStr () {
......@@ -254,7 +282,6 @@ export default {
...fieldsValue,
'date-picker': fieldsValue['date-picker'].format('YYYY-MM-DD')
}
console.log('Received values of form: ', values)
let userIdList = []
let departmentIdList = []
this.userIdListObj.map((item, index) => {
......@@ -273,7 +300,6 @@ export default {
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/account/batch_create_subsidy?${RecordData}`).then((res) => {
console.log(res)
if (res.data.message === 'SUCCESS') {
this.visible = false
this.form.resetFields()
......@@ -292,7 +318,6 @@ export default {
},
choosePeople () {
config.ddready('ddchoose').then((res) => {
console.log(res)
this.userIdListObj = res.users
this.departmentIdListObj = res.departments
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 @@
<a-layout-sider width="200" style="background: #fff">
<a-menu
mode="inline"
:defaultSelectedKeys="['accountManagement']"
:defaultSelectedKeys="[defaultSelectedKeys]"
:defaultOpenKeys="['sub1']"
style="height: 100%"
@click="routerPush"
......@@ -13,6 +13,7 @@
<a-menu-item key="rechargeRecord">充值记录</a-menu-item>
<a-menu-item key="allowancePayment">津贴发放</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="operationLog">操作日志</a-menu-item> -->
</a-menu>
......@@ -27,6 +28,19 @@
<script>
export default {
name: 'paymentManagementHome',
data () {
return {
defaultSelectedKeys: 'defaultSelectedKeys'
}
},
created () {
this.defaultSelectedKeys = this.$route.name
},
watch: {
$route (to, from) {
this.defaultSelectedKeys = to.name
}
},
methods: {
routerPush (obj) {
this.$router.push({ name: obj.key })
......
......@@ -2,7 +2,9 @@
<div class="RechargeRecord">
<div class="searchBox">
<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-option value="WAITING_PAYMENT">等待支付</a-select-option> -->
<a-select-option value="SUCCESS">已完成</a-select-option>
......@@ -14,10 +16,14 @@
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></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-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span>
</div>
</div>
</div>
<a-table :columns="columns" :dataSource="chargeList" :pagination="pagination" @change="handleTableChange" rowKey="orderNo">
<span slot="userName">姓名</span>
<span slot="departmentNameList" slot-scope="departmentNameList">
......@@ -91,15 +97,26 @@ export default {
},
status: '',
agentId: ''
}
},
agentList: []
}
},
watch: {},
computed: {},
created: function () {
this.queryRechargeList()
this.getAgentList()
},
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) {
let status = ''
......@@ -174,6 +191,9 @@ export default {
selectHandlestatus (value) {
this.searchSource.status = value
},
selectAgent (value) {
this.searchSource.agentId = value
},
queryRechargeList () {
let RechargeData = this.$qs.stringify({
pageNumber: 10,
......@@ -186,14 +206,12 @@ export default {
$http.get(`/v1/charge/list_charge?${RechargeData}`).then((res) => {
let data = res.data.data
this.pagination.total = parseInt(data.totalCount)
console.log(data.recordList)
this.chargeList = data.recordList
})
},
// 分页
handleTableChange (pagination, filters, sorter) {
this.pagination.current = pagination.current
console.log(pagination.current)
this.queryRechargeList()
},
departmentNameListToStr (str) {
......@@ -261,4 +279,12 @@ export default {
position: absolute;
right: 10px;
}
.userListBox{
text-align: center;
display: flex;
}
.userListBox>div>img{
display: block;
text-align: center;
}
</style>
......@@ -4,26 +4,33 @@
<a-input placeholder="消费人" @click="choosePeople" style="width: 120px"/>
<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="WAITING_PERMIT">退款审核中</a-select-option>
<a-select-option value="REFUND_SUCCESS">已退款</a-select-option>
</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>
</div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></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-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span>
</div>
</div>
</div>
<a-table :columns="columns" :dataSource="recordsList" size="default" rowKey="orderNo" :pagination="pagination" @change="handleTableChange">
<span slot="userName">消费人</span>
<span slot="departmentNameList" slot-scope="departmentNameList">
{{ departmentNameListToStr(departmentNameList) }}
</span>
<span slot="agent">操作人</span>
<span slot="consumptionAmount">实际消费</span>
<span slot="consumptionSubsidyAmount">津贴消费</span>
<span slot="orderNo">单号</span>
<!-- <span slot="orderNo">单号</span> -->
<span slot="orderStatus" slot-scope="orderStatus">
{{ orderStatus === MINGPAY_RECORDS_STATUS.SUCCESS ? '已消费' : orderStatus === MINGPAY_RECORDS_STATUS.WAITING_PERMIT ? 'WAITING_PERMIT' : '已退款'}}
</span>
......@@ -33,7 +40,7 @@
</span>
<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-else style="color: #cccccc;" href="javascript:;">退款</a>
<a v-else style="color: #cccccc;" href="javascript:;">退款</a>
</span>
</a-table>
<a-modal title="发起退款" v-model="visible" @ok="refund()">
......@@ -67,6 +74,9 @@ export default {
dataIndex: 'departmentNameList',
scopedSlots: { customRender: 'departmentNameList' }
}, {
title: '操作人',
dataIndex: 'agent'
}, {
title: '实际消费',
dataIndex: 'consumptionAmount'
},
......@@ -74,10 +84,11 @@ export default {
title: '津贴消费',
dataIndex: 'consumptionSubsidyAmount'
},
// {
// title: '单号',
// dataIndex: 'orderNo'
// },
{
title: '单号',
dataIndex: 'orderNo'
}, {
title: '状态',
dataIndex: 'orderStatus',
scopedSlots: { customRender: 'orderStatus' }
......@@ -112,13 +123,25 @@ export default {
},
status: '',
refundSelect: '',
form: this.$form.createForm(this)
form: this.$form.createForm(this),
agentList: []
}
},
created: function () {
this.queryRecordList()
this.queryAgentList()
},
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) {
this.visible = !this.visible
this.refundSelect = record
......@@ -129,7 +152,6 @@ export default {
},
// 退款
refund () {
console.log(this.form.getFieldsValue().remark)
if (this.form.getFieldsValue().remark === undefined) {
this.$message.error('请输入备注')
} else {
......@@ -146,7 +168,6 @@ export default {
} else {
this.$message.error(res.data.message)
}
console.log(res)
}).catch(() => {
this.$message.error('退款失败')
})
......@@ -177,7 +198,6 @@ export default {
let data = res.data.data
this.recordsList = data.recordList
this.pagination.total = parseInt(data.totalCount)
console.log(res.data.data)
})
},
// 选人组件调用
......@@ -238,8 +258,10 @@ export default {
},
// 搜索条件消费单状态
selectHandRecords (value) {
console.log(value)
this.searchSource.status = value
},
selectagent (value) {
this.searchSource.agentId = value
}
}
}
......@@ -291,4 +313,12 @@ export default {
position: absolute;
right: 10px;
}
.userListBox{
text-align: center;
display: flex;
}
.userListBox>div>img{
display: block;
text-align: center;
}
</style>
......@@ -43,12 +43,10 @@ router.beforeEach(function (to, from, next) {
} else {
config.ddconfig().then((res) => {
if (res === 'no') {
console.log('no', res)
next({ name: 'configError' })
}
}).then(() => {
config.ddready('ddpermission').then((res) => {
console.log('ddpermission', res)
if (res === 'noPermission') {
next({ name: 'noPermission' })
} else {
......
......@@ -31,41 +31,55 @@ export default new Router({
{
path: '/accountManagement',
name: 'accountManagement',
meta: { title: '支付管理/账户中心' },
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',
name: 'allowancePayment',
meta: { title: '支付管理/津贴发放' },
component: resolve => require(['./components/pages/PaymentManagement/AllowancePayment.vue'], resolve)
},
{
path: '/operationLog',
name: 'operationLog',
meta: { title: '支付管理/操作日志' },
component: resolve => require(['./components/pages/PaymentManagement/OperationLog.vue'], resolve)
},
{
path: '/rechargeRecord',
name: 'rechargeRecord',
meta: { title: '支付管理/充值记录' },
component: resolve => require(['./components/pages/PaymentManagement/RechargeRecord.vue'], resolve)
},
{
path: '/recordsOfConsumption',
name: 'recordsOfConsumption',
meta: { title: '支付管理/消费记录' },
component: resolve => require(['./components/pages/PaymentManagement/RecordsOfConsumption.vue'], resolve)
},
{
path: '/systemReconciliation',
name: 'systemReconciliation',
meta: { title: '支付管理/系统对账' },
component: resolve => require(['./components/pages/PaymentManagement/SystemReconciliation.vue'], resolve)
},
{
path: '/viewAllowances',
name: 'viewAllowances',
meta: { title: '支付管理/账户中心/查看津贴' },
component: resolve => require(['./components/pages/PaymentManagement/ViewAllowances.vue'], resolve)
},
{
path: '/allowanceDetails',
name: 'allowanceDetails',
meta: { title: '支付管理/津贴发放/津贴详情' },
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