Commit b23d9203 by liang ce

系统对账

parent 79dc335b
...@@ -9,7 +9,6 @@ const config = { ...@@ -9,7 +9,6 @@ const config = {
orgId: localStorage.getItem('orgId') orgId: localStorage.getItem('orgId')
}) })
return axios.post(`http://139.196.213.18:8300/v1/auth/query_org_agent_id?${senddate}`).then((res) => { return axios.post(`http://139.196.213.18:8300/v1/auth/query_org_agent_id?${senddate}`).then((res) => {
console.log(res)
localStorage.setItem('agentId', res.data.data) localStorage.setItem('agentId', res.data.data)
resolve(res.data.data) resolve(res.data.data)
}) })
......
...@@ -69,6 +69,6 @@ export default { ...@@ -69,6 +69,6 @@ export default {
width: 100%; width: 100%;
} }
.ant-layout-header{ .ant-layout-header{
background: #ffffff; background: #ffffff !important;
} }
</style> </style>
<template> <template>
<div class="Dashboard"> <div class="Dashboard">
<a-layout class="content" style="padding: 24px 0; background: #fff;"> <a-layout class="content" style="padding: 24px 0; background: #fff;min-height: calc(100vh - 186px)">
<div><img src="../../assets/Welcome.png"/></div> <div><img src="../../assets/Welcome.png"/></div>
<div>欢迎您进入mingwork管理后台</div> <div>欢迎您进入mingwork管理后台</div>
</a-layout> </a-layout>
......
...@@ -13,11 +13,7 @@ export default { ...@@ -13,11 +13,7 @@ export default {
return {} return {}
}, },
watch: {}, watch: {},
created: function () { created: function () {},
console.log(document.cookie)
document.cookie="username=John Doe; expires=Thu, 18 Dec 2043 12:00:00 GMT";
console.log(document.cookie)
},
computed: {}, computed: {},
methods: {}, methods: {},
mounted () {} mounted () {}
......
...@@ -278,7 +278,7 @@ export default { ...@@ -278,7 +278,7 @@ export default {
return str.substring(0, str.length - 1) return str.substring(0, str.length - 1)
}, },
createSubsidy () { createSubsidy () {
this.spinning = true; this.spinning = true
this.form.validateFields((err, fieldsValue) => { this.form.validateFields((err, fieldsValue) => {
if (err) { if (err) {
return return
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
this.userIdListObj = [] this.userIdListObj = []
this.departmentIdListObj = [] this.departmentIdListObj = []
this.$message.success('发放成功') this.$message.success('发放成功')
this.spinning = false; this.spinning = false
this.queryRecordList() this.queryRecordList()
} else { } else {
this.$message.error(res.data.message) this.$message.error(res.data.message)
......
<template> <template>
<div class="PaymentManagementHome"> <div class="PaymentManagementHome">
<a-layout style="padding: 24px 0; background: #fff; min-height: calc(100vh - 186px)"> <a-layout style="padding: 24px 0; background: #fff; min-height: calc(100vh - 186px);min-width:1100px">
<a-layout-sider width="200" style="background: #fff"> <a-layout-sider width="200" style="background: #fff">
<a-menu <a-menu
mode="inline" mode="inline"
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
<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="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>
</a-layout-sider> </a-layout-sider>
<a-layout-content :style="{ padding: '0 24px', minHeight: '280px' }"> <a-layout-content :style="{ padding: '0 24px', minHeight: '280px' }">
......
<template> <template>
<div class="SystemReconciliation"> <div class="SystemReconciliation">
系统对账 <div class="searchBox">
<a-range-picker
:defaultValue="[moment(startTime, 'YYYY/MM/DD'), moment(endTime, 'YYYY/MM/DD')]"
:disabledDate="disabledDate"
@change="onChange" />
<a-button type="primary" @click="getAccountCheck">查询</a-button>
</div>
<div class="title">账单详情</div>
<div class="SystemReconciliationContent">
<div class="contentItem">
<div class="title">
充值金额
</div>
<div>
<p><label>现金:</label>¥{{systemReconciliationDetails.internalRechargeAmount}}</p>
<p><label>支付宝:</label>¥{{systemReconciliationDetails.externalRechargeAmount}}</p>
</div>
<div><p>共计:<span>¥{{ returnRechargeAmount() }}</span></p></div>
</div>
<div class="contentItem">
<div class="title">
发放津贴
</div>
<div>
<p v-for=" item in systemReconciliationDetails.subsidyCheck" :key="item.sceneType"><label>{{ item.sceneType }}</label>¥{{ item.amount }}</p>
</div>
<div><p>共计:<span>¥{{ returnSubsidyCheckTotal() }}</span></p></div>
</div>
<div class="contentItem">
<div class="title">
消费金额
</div>
<div class="recordsBox">
<div v-for="item in systemReconciliationDetails.consumeCheck" :key="item.sceneType">
<div>{{ item.sceneType }}</div>
<div>
<p>现金:¥{{ item.realityAmount }}</p>
<p>津贴:¥{{ item.subsidyAmount }}</p>
</div>
</div>
</div>
<div>
<p>现金:<span>¥{{ returnConsumeCheck('realityAmount') }}</span></p>
<p>津贴:<span>¥{{ returnConsumeCheck('subsidyAmount') }}</span></p>
<p>共计:<span>¥{{ returnConsumeCheck('total') }}</span></p>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { $http } from './../../../api/axios.js'
import moment from 'moment'
export default { export default {
name: 'systemReconciliation' name: 'systemReconciliation',
data () {
return {
startTime: '',
endTime: '',
systemReconciliationDetails: {}
}
},
created () {
let date = new Date()
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = (new Date(year, month, 0).getDate().toString()).length > 1 ? new Date(year, month, 0).getDate() : '0' + new Date(year, month, 0).getDate()
this.startTime = `${year}-${month.toString().length > 1 ? month : '0' + month}-01`
this.endTime = `${year}-${month.toString().length > 1 ? month : '0' + month}-${day}`
this.getAccountCheck()
},
methods: {
moment,
onChange (date, dateString) {
console.log(date, dateString)
this.startTime = dateString[0]
this.endTime = dateString[1]
},
returnConsumeCheck (str) {
let totalNum = 0
if (this.systemReconciliationDetails.consumeCheck) {
if (str === 'realityAmount') {
this.systemReconciliationDetails.consumeCheck.map(item => {
totalNum = totalNum + parseFloat(item.realityAmount)
})
return totalNum.toFixed(2)
} else if (str === 'subsidyAmount') {
this.systemReconciliationDetails.consumeCheck.map(item => {
totalNum = totalNum + parseFloat(item.subsidyAmount)
})
return totalNum.toFixed(2)
} else if (str === 'total') {
this.systemReconciliationDetails.consumeCheck.map(item => {
totalNum = totalNum + parseFloat(item.orderAmount)
})
return totalNum.toFixed(2)
}
} else {
return ''
}
},
returnSubsidyCheckTotal () {
let totalNum = 0
if (this.systemReconciliationDetails.subsidyCheck) {
this.systemReconciliationDetails.subsidyCheck.map(item => {
totalNum = totalNum + parseFloat(item.amount)
})
return totalNum.toFixed(2)
} else {
return ''
}
},
returnRechargeAmount () {
if (this.systemReconciliationDetails.internalRechargeAmount) {
let totalNum = parseFloat(this.systemReconciliationDetails.internalRechargeAmount) + parseFloat(this.systemReconciliationDetails.externalRechargeAmount)
return totalNum.toFixed(2)
} else {
return ''
}
},
disabledDate (current) {
return current && current > moment().endOf('day')
},
getAccountCheck () {
let SubsidyListData = this.$qs.stringify({
startTime: this.startTime,
endTime: this.endTime,
orgId: localStorage.getItem('orgId')
})
$http.get(`/v1/account/accountCheck?${SubsidyListData}`).then((res) => {
console.log(res.data.data)
if (res.data.resultCode === '0') {
this.systemReconciliationDetails = res.data.data
} else {
this.$message.error(res.data.message)
}
})
}
}
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.title{
font-weight: bold;
margin-top: 20px;
margin-bottom: 20px;
}
.searchBox button{
margin-left: 10px;
}
.SystemReconciliationContent{
border: 1px solid #f6f6f6;
width: 100%;
}
.contentItem{
width: 100%;
display: flex;
padding: 20px;
overflow: hidden;
border-bottom: 1px solid #f6f6f6;
}
.contentItem>div{
display: flex;
flex-direction: column;
}
.contentItem>div:nth-of-type(2){
flex: 1;
padding-left: 72px;
box-sizing: border-box;
}
.contentItem>div:nth-of-type(3){
width: 300px;
flex-direction: column-reverse;
}
.contentItem>div:nth-of-type(1){
font-weight: bold;
justify-content: center;
width: 150px;
}
.recordsBox>div{
display: flex;
}
.contentItem>.recordsBox{
padding-left: 0 !important;
}
.recordsBox>div>div:nth-of-type(1){
width: 80px;
text-align: right;
margin-right: 20px;
}
.contentItem span {
color: #1890ff;
}
.contentItem label{
width: 70px;
display: inline-block;
text-align: right;
}
</style> </style>
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