Commit 183a9604 by liang ce

修复bug

parent 35bc1f6e
......@@ -12,7 +12,8 @@ module.exports = {
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars': 0,
'no-callback-literal': 0,
'standard/no-callback-literal': 0
'standard/no-callback-literal': 0,
'camelcase': 0,
},
parserOptions: {
parser: 'babel-eslint'
......
<template>
<div id="app">
<router-view></router-view>
</div>
<a-locale-provider :locale="zh_CN">
<div id="app">
<router-view></router-view>
</div>
</a-locale-provider>
</template>
<script>
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN'
import moment from 'moment'
import 'moment/locale/zh-cn'
moment.locale('zh-cn')
export default {
data () {
return {
zh_CN
}
}
}
</script>
<style lang="less">
#app{
......
......@@ -9,10 +9,10 @@
<a-select-option value="UNACTIVE">已冻结</a-select-option>
</a-select>
<a-select placeholder="账户状态" style="width: 120px;margin-right: 20px;" :allowClear="true" @change="selectHandleChangeAccount">
<a-select-option value="ACTIVE">使用中</a-select-option>
<a-select-option value="LOG_OFF">冻结并结现</a-select-option>
<a-select-option value="ACTIVE">正常</a-select-option>
<a-select-option value="LOG_OFF">注销</a-select-option>
</a-select>
<a-button type="primary" @click="queryAccountList()">查询</a-button>
<a-button type="primary" @click="search()">查询</a-button>
</div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></div>
......@@ -28,14 +28,14 @@
</span>
<span slot="realityBalance">余额</span>
<span slot="cardNo" slot-scope="cardNo">
{{ cardNo ? cardNo : '未绑卡' }}
{{ cardNo }}
</span>
<span slot="cardStatus" slot-scope="cardStatus, record">
{{ record.cardNo ? cardStatus === 'UNACTIVE' ? '已冻结' : '使用中' : ''}}
{{ record.cardNo ? cardStatus === 'UNACTIVE' ? '已冻结' : '已绑卡' : '未绑卡'}}
</span>
<span slot="status" slot-scope="status">
<!-- {{ status === MINGPAY_ACCOUNT_STATUS.ACTIVE ? '使用中' : '已注销并结现' }} -->
{{ status === MINGPAY_ACCOUNT_STATUS.ACTIVE ? '使用中' : '已注销并结现' }}
<!-- {{ status === MINGPAY_ACCOUNT_STATUS.ACTIVE ? '正常' : '已注销并结现' }} -->
{{ status === MINGPAY_ACCOUNT_STATUS.ACTIVE ? '正常' : '已注销' }}
</span>
<span slot="action" slot-scope="text, record, index" class="operationTable">
<a href="javascript:;" @click="ToViewAllowances(record)">查看津贴</a>
......@@ -47,7 +47,6 @@
<a-menu slot="overlay">
<a-menu-item v-if="record.cardStatus === MINGPAY_ACCOUNT_STATUS.ACTIVE && record.cardNo ">
<a href="javascript:;" @click="showConfirm(record.userId, 1, index)">冻结实体卡</a>
{{ record.cardNo }}
</a-menu-item>
<a-menu-item v-if="record.cardStatus === MINGPAY_ACCOUNT_STATUS.UNACTIVE && record.cardNo">
<a href="javascript:;" @click="showConfirm(record.userId, 2, index)">解冻实体卡</a>
......@@ -59,7 +58,7 @@
<a href="javascript:;" @click="changeVisible2(record.userId, index)">绑定实体卡</a>
</a-menu-item>
<a-menu-item v-if="record.status != MINGPAY_ACCOUNT_STATUS.LOG_OFF">
<a href="javascript:;" @click="showConfirm(record.userId, 3, index)">注销并结现</a>
<a href="javascript:;" @click="showConfirm(record.userId, 3, index)">注销</a>
</a-menu-item>
</a-menu>
</a-dropdown>
......@@ -124,7 +123,7 @@ export default {
title: '余额',
dataIndex: 'realityBalance'
}, {
title: '实体卡卡号',
title: '卡号',
dataIndex: 'cardNo',
scopedSlots: { customRender: 'cardNo' }
}, {
......@@ -137,6 +136,7 @@ export default {
scopedSlots: { customRender: 'status' }
}, {
title: '操作',
key: 'a',
dataIndex: 'action',
scopedSlots: { customRender: 'action' }
}],
......@@ -349,6 +349,8 @@ export default {
this.$confirm({
title: '确认要对该账户实体卡解除绑定么?',
content: '解除绑定后,该实体卡将不能付款',
okText: '确定',
cancelText: '取消',
onOk () {
_that.cardOperation(1)
}
......@@ -376,14 +378,16 @@ export default {
url = ''
break
case 3:
title = '确认要对该账户进行注销并结现操作么?'
content = '注销并结现后二维码与实体卡片均不能在使用'
title = '确认要对该账户进行注销操作么?'
content = '注销后二维码与实体卡片均不能在使用'
status = MINGPAY_ACCOUNT_STATUS.LOG_OFF
url = ''
}
this.$confirm({
title: title,
content: content,
okText: '确定',
cancelText: '取消',
onOk () {
_that.accountOperation(str, userId, status, index)
}
......@@ -407,15 +411,10 @@ export default {
})
}
$http.get(`/v1/account/update_bind_card_status?${cardOperationData}`).then((res) => {
if (res.data.message === 'SUCCESS') {
let dataSource = [...this.accountList]
if (type === 2) {
dataSource[this.selsctIndex].cardNo = cardNo
} else if (type === 1) {
dataSource[this.selsctIndex].cardNo = ''
}
this.accountList = dataSource
if (res.data.resultCode === '0') {
this.queryAccountList()
this.visible2 = false
this.updateBindCardStatusForm.resetFields()
this.$message.success('操作成功')
} else {
this.$message.error(res.data.message)
......@@ -423,6 +422,10 @@ export default {
}).catch((err) => {
console.log(err)
})
},
search () {
this.pagination.current = 1
this.queryAccountList()
}
},
mounted () {}
......
<template>
<div class="allowanceDetails">
<a-button type="primary" @click="back()"><img style="margin-top:-4px;margin-right: 6px;width: 14px" src="../../../assets/back.png"/>返回</a-button>
<div class="title">津贴详情</div>
<div class="allowanceDetailsBox">
<div>
......@@ -58,6 +59,9 @@ export default {
let hour = timeData.getHours()
let minute = timeData.getMinutes()
return `${year}${month}${date}${hour}:${minute}`
},
back () {
this.$router.go(-1)
}
// querySubsidyList () {
// let SubsidyListData = this.$qs.stringify({
......@@ -93,6 +97,7 @@ export default {
<style lang="less" scoped>
.title{
font-weight: bold;
margin-top: 20px;
}
.allowanceDetailsBox{
width: 100%;
......
......@@ -5,7 +5,7 @@
<a-select-option value="travel">交通补助</a-select-option>
<a-select-option value="meal">餐补</a-select-option>
</a-select>
<a-button type="primary" @click="queryRecordList()">查询</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>
</div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
......@@ -60,7 +60,7 @@
v-bind="formItemLayout"
label="截止日期"
>
<a-date-picker v-decorator="['date-picker', config]" />
<a-date-picker placeholder="请选择截止日期" :showToday="false" v-decorator="['date-picker', config]" />
</a-form-item>
<a-form-item label="选择成员" v-bind="formItemLayout">
<div class="peopleBox" @click="choosePeople()">
......@@ -79,6 +79,7 @@
import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js'
import { MINGPAY_RECORDS_STATUS } from './../../../api/constant'
export default {
name: 'AllowancePayment',
data () {
......@@ -281,7 +282,7 @@ export default {
this.$message.success('发放成功')
this.queryRecordList()
} else {
this.$message.success(res.data.message)
this.$message.error(res.data.message)
}
})
})
......@@ -296,6 +297,10 @@ export default {
this.departmentIdListObj = res.departments
this.form.getFieldsValue().peopleList = 'ok'
})
},
search () {
this.pagination.current = 1
this.queryRecordList()
}
}
}
......
<template>
<div class="PaymentManagementHome">
<a-layout style="padding: 24px 0; background: #fff">
<a-layout style="padding: 24px 0; background: #fff; min-height:600px">
<a-layout-sider width="200" style="background: #fff">
<a-menu
mode="inline"
......
......@@ -9,7 +9,7 @@
<a-select-option value="WAITING_PERMIT">审批中</a-select-option>
<a-select-option value="FAILED">审批未通过</a-select-option>
</a-select>
<a-button type="primary" @click="queryRechargeList()">查询</a-button>
<a-button type="primary" @click="search()">查询</a-button>
</div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></div>
......@@ -18,7 +18,7 @@
<img v-else :src="this.avatarCanvasFn(searchSource.UserMessage.name)" :alt="searchSource.UserMessage.name">
<span>{{ searchSource.UserMessage.name }}</span>
</div>
<a-table :columns="columns" :dataSource="chargeList" rowKey="orderNo">
<a-table :columns="columns" :dataSource="chargeList" :pagination="pagination" @change="handleTableChange" rowKey="orderNo">
<span slot="userName">姓名</span>
<span slot="departmentNameList" slot-scope="departmentNameList">
{{ departmentNameListToStr(departmentNameList) }}
......@@ -75,9 +75,14 @@ export default {
title: '备注',
dataIndex: 'remark'
}],
pagination: {
current: 1,
defaultCurrent: 10,
defaultPageSize: 10,
hideOnSinglePage: true,
total: 0
},
chargeList: [],
pageNum: 0,
numPerPage: 10,
searchSource: {
UserMessage: {
avatar: '',
......@@ -103,10 +108,10 @@ export default {
status = '审批中'
break
case MINGPAY_CHARGE_ORDERSTATUS.SUCCESS:
status = '充值成功'
status = '已完成'
break
case MINGPAY_CHARGE_ORDERSTATUS.FAILED:
status = '审批失败'
status = '审批未通过'
break
case MINGPAY_CHARGE_ORDERSTATUS.WAITING_PAYMENT:
status = '等待支付'
......@@ -172,7 +177,7 @@ export default {
queryRechargeList () {
let RechargeData = this.$qs.stringify({
pageNumber: 10,
currentPage: 1,
currentPage: this.pagination.current,
agentId: this.searchSource.agentId,
status: this.searchSource.status,
userId: this.searchSource.UserMessage.emplId,
......@@ -180,10 +185,17 @@ 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) {
let departmentNameListStr = ''
if (str.length !== 0) {
......@@ -193,6 +205,10 @@ export default {
}
departmentNameListStr = departmentNameListStr.substring(0, departmentNameListStr.length - 1)
return departmentNameListStr
},
search () {
this.pagination.current = 1
this.queryRechargeList()
}
},
mounted () {}
......
......@@ -7,7 +7,7 @@
<a-select-option value="WAITING_PERMIT">退款审核中</a-select-option>
<a-select-option value="REFUND_SUCCESS">已退款</a-select-option>
</a-select>
<a-button type="primary" @click="queryRecordList()">查询</a-button>
<a-button type="primary" @click="search()">查询</a-button>
</div>
<div class="searchUserMessage" v-if="searchSource.UserMessage.emplId">
<div class="positionDiv"></div>
......@@ -21,23 +21,25 @@
<span slot="departmentNameList" slot-scope="departmentNameList">
{{ departmentNameListToStr(departmentNameList) }}
</span>
<span slot="chargeAmount">消费金额</span>
<span slot="consumptionAmount">实际消费</span>
<span slot="consumptionSubsidyAmount">津贴消费</span>
<span slot="orderNo">单号</span>
<span slot="status" slot-scope="status">
{{ status === MINGPAY_RECORDS_STATUS.SUCCESS ? '已消费' : status === MINGPAY_RECORDS_STATUS.WAITING_PERMIT ? 'WAITING_PERMIT' : '退款成功'}}
<span slot="orderStatus" slot-scope="orderStatus">
{{ orderStatus === MINGPAY_RECORDS_STATUS.SUCCESS ? '已消费' : orderStatus === MINGPAY_RECORDS_STATUS.WAITING_PERMIT ? 'WAITING_PERMIT' : '已退款'}}
</span>
<span slot="remark">备注</span>
<span slot="createTime" slot-scope="createTime">
{{ createTimeToStr(createTime) }}
</span>
<span slot="action" slot-scope="text, record, index" class="operationTable">
<a 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>
</span>
</a-table>
<a-modal title="发起退款" v-model="visible" @ok="refund()">
<a-form :form="form">
<a-form-item label="退款金额" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }" >
<a href="javascript:;">{{ refundSelect.chargeAmount }}</a>
<a href="javascript:;">{{ parseFloat(refundSelect.consumptionAmount) + parseFloat(refundSelect.consumptionSubsidyAmount) }}</a>
</a-form-item>
<a-form-item label="备注" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }" >
<a-textarea v-decorator="['remark', {rules: [{ required: true, message: '备注不能为空' }]}]"/>
......@@ -55,6 +57,7 @@ export default {
name: 'recordsOfConsumption',
data () {
return {
MINGPAY_RECORDS_STATUS: MINGPAY_RECORDS_STATUS,
visible: false,
columns: [{
title: '消费人',
......@@ -64,14 +67,13 @@ export default {
dataIndex: 'departmentNameList',
scopedSlots: { customRender: 'departmentNameList' }
}, {
title: '消费金额',
dataIndex: 'chargeAmount'
title: '实际消费',
dataIndex: 'consumptionAmount'
},
{
title: '津贴消费',
dataIndex: 'consumptionSubsidyAmount'
},
// {
// title: '消费类型',
// dataIndex: 'cardNo',
// scopedSlots: { customRender: 'cardNo' }
// },
{
title: '单号',
dataIndex: 'orderNo'
......@@ -108,6 +110,7 @@ export default {
hideOnSinglePage: true,
total: 0
},
status: '',
refundSelect: '',
form: this.$form.createForm(this)
}
......@@ -120,24 +123,34 @@ export default {
this.visible = !this.visible
this.refundSelect = record
},
search () {
this.pagination.current = 1
this.queryRecordList()
},
// 退款
refund () {
let refundData = this.$qs.stringify({
orderNo: this.refundSelect.orderNo,
sum: this.refundSelect.chargeAmount,
remark: this.form.getFieldsValue().remark,
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/consume/refund?${refundData}`).then((res) => {
if (res.data.message === 'SUCCESS') {
this.$message.success('退款成功')
} else {
this.$message.success(res.data.message)
}
console.log(res)
}).catch(() => {
this.$message.error('退款失败')
})
console.log(this.form.getFieldsValue().remark)
if (this.form.getFieldsValue().remark === undefined) {
this.$message.error('请输入备注')
} else {
let refundData = this.$qs.stringify({
orderNo: this.refundSelect.orderNo,
remark: this.form.getFieldsValue().remark || '',
orgId: sessionStorage.getItem('corpId')
})
$http.get(`/v1/consume/refund?${refundData}`).then((res) => {
if (res.data.message === 'SUCCESS') {
this.$message.success('退款成功')
this.visible = false
this.form.resetFields()
} else {
this.$message.error(res.data.message)
}
console.log(res)
}).catch(() => {
this.$message.error('退款失败')
})
}
},
// table部门表格字符串处理
departmentNameListToStr (str) {
......@@ -226,7 +239,7 @@ export default {
// 搜索条件消费单状态
selectHandRecords (value) {
console.log(value)
this.searchSource.cardStatus = value
this.searchSource.status = value
}
}
}
......
<template>
<div class="viewAllowances">
<a-button type="primary" @click="back()"><img style="margin-top:-4px;margin-right: 6px;width: 14px" src="../../../assets/back.png"/>返回</a-button>
<div class="title">查看津贴</div>
<a-table :columns="columns" :dataSource="subsidyList" size="default" rowKey="grantNumber" :pagination="pagination" @change="handleTableChange">
<span slot="type" slot-scope="type">
......@@ -79,6 +80,9 @@ export default {
handleTableChange (pagination, filters, sorter) {
this.pagination.current = pagination.current
this.querySubsidyList()
},
back () {
this.$router.go(-1)
}
}
}
......@@ -88,5 +92,6 @@ export default {
.title{
font-weight: bold;
margin-bottom: 20px;
margin-top: 20px;
}
</style>
......@@ -2,13 +2,14 @@ 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 } from 'ant-design-vue'
import { Menu, Layout, Breadcrumb, Icon, Button, DatePicker, Input, Table, Tag, Divider, Dropdown, Modal, Form, Select, message, Pagination, LocaleProvider } from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import { config } from './api/config'
import axios from 'axios'
import qs from 'qs'
Vue.use(Layout)
Vue.use(LocaleProvider)
Vue.use(Menu)
Vue.use(Breadcrumb)
Vue.use(Icon)
......
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