Commit 0df90a54 by liang ce

更新bug

parent 1491b582
......@@ -5,14 +5,12 @@ var instance = axios.create()
// axios.defaults.baseURL = 'http://192.168.1.102:8300/v1/isv' // 本地钱
// axios.defaults.baseURL = 'http://139.196.213.18:8300/v1/isv' // beta环境
const BASE_URL = process.env.VUE_APP_API_URL
console.log(BASE_URL)
let loadingInstance // 创建Loading 的实例
// 配置发送请求前的拦截器可以设置token信息
axios.interceptors.request.use((config) => {
// loading开始loadingInstance.start()
let isRefreshToken = new Date().getTime() - sessionStorage.getItem('start_time') < sessionStorage.getItem('expires_in') - 5 * 60 * 1000
if (isRefreshToken) {
console.log(sessionStorage.getItem('access_token'))
config.headers['Authorization'] = `Bearer ${sessionStorage.getItem('access_token')}`
return config
} else {
......@@ -68,7 +66,6 @@ const $http = {
},
get: (url) => {
return new Promise((resolve, reject) => {
debugger
axios.get(`${BASE_URL}${url}`).then((res) => {
return resolve(res)
}).catch((error) => {
......
<template>
<div class="consumptionOrder">
<div class="searchBox">
<div class="choosePeople" @click="choosePeople" style="width: 120px">选择成员</div>
<div class="choosePeople" @click="choosePeople" style="width: 120px">选择消费人</div>
<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>
......@@ -11,29 +11,51 @@
</a-select>
<a-button type="primary" @click="search()">查询</a-button>
</div>
<a-table :columns="columns" :dataSource="chargeList" :pagination="pagination" @change="handleTableChange" rowKey="orderNo">
<span slot="userName">姓名</span>
<span slot="departmentNameList" slot-scope="departmentNameList, record">
<a-popover v-if="item" v-for="(item,indexOf) in buyerParentSysDeptList" :key="indexOf">
<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="OrderList" :pagination="pagination" @change="handleTableChange" rowKey="orderId">
<span slot="buyerName">姓名</span>
<span slot="buyerSysDeptNameList" slot-scope="buyerSysDeptNameList, record">
<a-popover v-for="(item,indexOf) in buyerSysDeptNameList" :key="indexOf">
<template slot="content">
<p>{{record.buyerSysDeptNameList[indexOf]}}</p>
<p>{{record.buyerParentSysDeptList[indexOf].sysParentName}}</p>
</template>
<span class="deptModel">{{item}}</span>
</a-popover>
</span>
<span slot="chargeAmount">充值金额</span>
<span slot="agent" slot-scope="agent, record">
{{ agent === '' && record.payTypeCode === 'EXTERNAL_ALI_RECHAGE' ? '支付宝自充' : agent }}
<span slot="agentName">经办人</span>
<span slot="orderAmount">消费总额(元)</span>
<span slot="mingPayOrderDetailList" slot-scope="mingPayOrderDetailList">
<a-popover>
<template slot="content">
<div class="mingPayOrderDetailItem" v-for="item in mingPayOrderDetailList" :key="item.orderDetailId">
<div><img :src="item.productIcon" /></div>
<div>
<div>{{ item.productName }}</div>
<div>X{{ item.productQuantity }}</div>
</div>
<div>
¥{{ item.productPrice }}
</div>
</div>
</template>
<span class="deptModel">{{mingPayOrderDetailList[0].productName}} ···</span>
</a-popover>
</span>
<span slot="orderStatus" slot-scope="orderStatus">
<a-badge v-if="orderStatus === MINGPAY_CHARGE_ORDERSTATUS.WAITING_PERMIT" status="processing" text="审批中" />
<a-badge v-else-if="orderStatus === MINGPAY_CHARGE_ORDERSTATUS.SUCCESS" status="success" text="已完成" />
<a-badge v-else-if="orderStatus === MINGPAY_CHARGE_ORDERSTATUS.FAILED" status="error" text="审批未通过" />
</span>
<span slot="createTime" slot-scope="createTime">
{{ createTime }}
<a-badge v-if="orderStatus === 'SUCCESS'" status="success" text="已消费" />
<a-badge v-else-if="orderStatus === 'REFUND_SUCCESS'" status="error" text="已退款" />
</span>
<span slot="remark">备注</span>
<span slot="createTime">时间</span>
</a-table>
</div>
</template>
......@@ -67,26 +89,26 @@ export default {
dataIndex: 'buyerName'
}, {
title: '部门',
dataIndex: 'departmentNameList',
scopedSlots: { customRender: 'departmentNameList' }
}, {
title: '充值金额',
dataIndex: 'chargeAmount'
dataIndex: 'buyerSysDeptNameList',
scopedSlots: { customRender: 'buyerSysDeptNameList' }
}, {
title: '经办人',
dataIndex: 'agent',
scopedSlots: { customRender: 'agent' }
dataIndex: 'agentName',
scopedSlots: { customRender: 'agentName' }
}, {
title: '消费总额',
dataIndex: 'orderAmount'
}, {
title: '消费菜品',
dataIndex: 'mingPayOrderDetailList',
scopedSlots: { customRender: 'mingPayOrderDetailList' }
}, {
title: '状态',
dataIndex: 'orderStatus',
scopedSlots: { customRender: 'orderStatus' }
}, {
title: '时间',
dataIndex: 'createTime',
scopedSlots: { customRender: 'createTime' }
}, {
title: '备注',
dataIndex: 'remark'
dataIndex: 'createTime'
}],
OrderList: []
}
......@@ -96,6 +118,10 @@ export default {
this.queryOrderList()
},
methods: {
handleTableChange (pagination, filters, sorter) {
this.pagination.current = pagination.current
this.queryOrderList()
},
// 获取收银员列表
getAgentList () {
let AgentData = this.$qs.stringify({
......@@ -110,8 +136,9 @@ export default {
choosePeople () {
const _that = this
config.ddready('ddchooseOne').then((res) => {
debugger
this.searchSource.UserMessage = res[0]
_that.queryRechargeList()
_that.queryOrderList()
})
},
// 清理选择帅选人list
......@@ -174,7 +201,7 @@ export default {
this.pagination.total = parseInt(data.totalCount)
this.OrderList = data.list
})
},
}
}
}
</script>
......@@ -261,4 +288,42 @@ export default {
.ant-popover-inner-content>p{
margin: 0;
}
.mingPayOrderDetailItem{
display: flex;
width: 190px;
margin: 8px 0;
}
.mingPayOrderDetailItem > div:nth-of-type(1){
width: 40px;
height: 40px;
overflow: hidden;
}
.mingPayOrderDetailItem > div:nth-of-type(1) img{
width: 40px;
height: 40px;
display: block;
}
.mingPayOrderDetailItem > div:nth-of-type(2){
height: 40px;
width: 80px;
font-size: 14px;
margin-left: 10px;
}
.mingPayOrderDetailItem > div:nth-of-type(2) div:nth-of-type(1){
overflow: hidden;/*超出部分隐藏*/
text-overflow:ellipsis;/* 超出部分显示省略号 */
white-space: nowrap;/*规定段落中的文本不进行换行 */
width: 80px;/*需要配合宽度来使用*/
}
.mingPayOrderDetailItem > div:nth-of-type(2) div:nth-of-type(2){
overflow: hidden;/*超出部分隐藏*/
text-overflow:ellipsis;/* 超出部分显示省略号 */
white-space: nowrap;/*规定段落中的文本不进行换行 */
width: 80px;/*需要配合宽度来使用*/
}
.mingPayOrderDetailItem > div:nth-of-type(3){
height: 40px;
text-align: right;
flex: 1;
}
</style>
<template>
<div class="consumptionStatistics">
消费统计
<div class="searchBox">
<a-date-picker
:disabledDate="disabledStartDate"
format="YYYY-MM-DD"
v-model="startValue"
placeholder="开始日期"
@change="onChangeStartValue"
@openChange="handleStartOpenChange"
/>
<a-date-picker
:disabledDate="disabledEndDate"
format="YYYY-MM-DD"
placeholder="结束日期"
@change="onChangeEndValue"
v-model="endValue"
:open="endOpen"
@openChange="handleEndOpenChange"
/>
<a-button type="primary" @click="getStatisticalProductPage">查询</a-button>
</div>
<div class="title">账单汇总</div>
<a-table :columns="columns" :dataSource="dataSource" rowKey="productId" :pagination="pagination">
<span slot="productIcon" slot-scope="productIcon">
<img style="width: 100px" :src="productIcon" alt="" />
</span>
<span slot="productName"></span>
<span slot="productPrice"></span>
<span slot="productPrice"></span>
</a-table>
</div>
</template>
<script>
import { $http } from './../../../api/axios.js'
import moment from 'moment'
export default {
name: 'consumptionStatistics'
name: 'consumptionStatistics',
data () {
return {
startTime: '',
endTime: '',
startValue: null,
endValue: null,
endOpen: false,
pagination: {
current: 1,
defaultCurrent: 10,
defaultPageSize: 10,
hideOnSinglePage: true,
total: 0
},
columns: [{
title: '产品图',
dataIndex: 'productIcon',
scopedSlots: { customRender: 'productIcon' }
}, {
title: '菜名',
dataIndex: 'productName',
}, {
title: '价格(元)',
dataIndex: 'productPrice'
}, {
title: '售出(份数)',
dataIndex: 'productStatisticalQuantity'
}],
dataSource: []
}
},
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.startValue = this.moment(`${year}-${month.toString().length > 1 ? month : '0' + month}-01`, 'YYYY-MM-DD')
this.endValue = this.moment(`${year}-${month.toString().length > 1 ? month : '0' + month}-${day}`, 'YYYY-MM-DD')
this.getStatisticalProductPage()
},
methods: {
moment,
disabledStartDate (startValue) {
const endValue = this.endValue
if (!startValue || !endValue) {
return false
}
return startValue.valueOf() > endValue.valueOf() || startValue.valueOf() >= moment().endOf('day').valueOf()
},
disabledEndDate (endValue) {
const startValue = this.startValue
if (!endValue || !startValue) {
return false
}
return startValue.valueOf() > endValue.valueOf() || endValue.valueOf() > moment().endOf('day').valueOf()
},
handleStartOpenChange (open) {
if (!open) {
this.endOpen = true
}
},
handleEndOpenChange (open) {
this.endOpen = open
},
onChangeStartValue (date, dateString) {
this.startTime = dateString
},
onChangeEndValue (date, dateString) {
this.endTime = dateString
},
getStatisticalProductPage () {
let SubsidyListData = {
startTime: this.startTime,
endTime: this.endTime,
orgId: localStorage.getItem('orgId'),
pageNumber: 10,
currentPage: this.pagination.current
}
$http.post(`/mingpay/v1/isv/order/statistical_product_page`, SubsidyListData).then((res) => {
if (res.data.resultCode === 0) {
this.dataSource = res.data.data.list
} else {
this.$message.error(res.data.message)
}
})
}
}
}
</script>
<style lang="less" scoped>
.title{
font-weight: bold;
margin-top: 20px;
margin-bottom: 20px;
}
.searchBox button{
margin-left: 10px;
}
</style>
......@@ -172,10 +172,10 @@ export default {
let content
if (record.productStatus === 'UP') {
title = '确认要下架该菜品吗?'
content = '下架后该菜品设备端不可见'
content = '下架后该菜品设备端不可见'
} else {
title = '确认上架该菜品吗?'
content = '上架后该菜品可正常使用'
title = '确认上架该菜品吗?'
content = '上架后该菜品在设备端可正常使用'
}
this.$confirm({
title: title,
......@@ -261,13 +261,18 @@ export default {
productName: this.addProduct.productName === this.tableSource[this.changeSourceIndex].productName ? '' : this.addProduct.productName,
productPrice: this.addProduct.productPrice === this.tableSource[this.changeSourceIndex].productPrice ? '' : this.addProduct.productPrice,
productIcon: this.fileList.length === 0 ? '' : this.addProduct.productIcon,
productStatus: '0',
productStatus: '',
productCategoryId: this.addProduct.productCategoryId === this.tableSource[this.changeSourceIndex].productCategoryId ? '' : this.addProduct.productCategoryId,
productId: this.addProduct.productId,
sort: this.addProduct.sort === this.tableSource[this.changeSourceIndex].sort ? '' : parseInt(this.addProduct.sort)
}
$http.post(`/mingpay/v1/isv/product/update_product`, saveProductCategoryData).then((res) => {
if (res.data.resultCode === 0) {
this.addProduct = {}
this.imageUrl = ''
this.fileList = []
this.confirmLoading = false
this.visible = false
this.getProductCategoryList('refresh')
this.$message.success('操作成功')
} else {
......@@ -283,7 +288,7 @@ export default {
productName: this.addProduct.productName,
productPrice: this.addProduct.productPrice,
productIcon: this.addProduct.productIcon,
productStatus: '0',
productStatus: '',
productCategoryId: this.addProduct.productCategoryId,
sort: parseInt(this.addProduct.sort)
}
......@@ -370,7 +375,6 @@ export default {
headers: { 'Content-Type': 'multipart/form-data' }
}).then((res) => {
console.log(res)
debugger
if (res.status === 200) {
that.loading = false
that.addProduct.productIcon = data.get('key')
......
......@@ -33,14 +33,18 @@
<a-table :columns="columns" :dataSource="accountList" size="default" rowKey="ddUserId" :pagination="pagination" @change="handleTableChange">
<span slot="name">姓名</span>
<span slot="departmentNameList" slot-scope="departmentNameList, record">
<a-popover v-for="(item,indexOf) in departmentNameList" v-if="item" :key="indexOf">
<template slot="content">
<p>{{record.parentSysDeptNameList[indexOf]}}</p>
</template>
<span class="deptModel">{{item}}</span>
</a-popover>
<div v-if="departmentNameList.length > 0">
<a-popover v-for="(item,indexOf) in departmentNameList" :key="indexOf">
<template slot="content">
<p>{{record.parentSysDeptNameList[indexOf]}}</p>
</template>
<span class="deptModel">{{item}}</span>
</a-popover>
</div>
</span>
<span slot="realityBalance" slot-scope="realityBalance">余额
{{ realityBalance.toFixed(2) }}
</span>
<span slot="realityBalance">余额</span>
<span slot="cardNo" slot-scope="cardNo">
{{ cardNo }}
</span>
......
......@@ -2,7 +2,9 @@
<div class="OperationLog">
<a-table :columns="columns" :dataSource="logData" size="default" rowKey="id" :pagination="pagination" @change="handleTableChange">
<span slot="title"></span>
<span slot="createBy"></span>
<span slot="createBy" slot-scope="createBy">
{{ createBy ? createBy : '系统操作' }}
</span>
<span slot="remoteAddr"></span>
<span slot="createTime"></span>
</a-table>
......@@ -28,7 +30,8 @@ export default {
dataIndex: 'title'
}, {
title: '操作人',
dataIndex: 'createBy'
dataIndex: 'createBy',
scopedSlots: { customRender: 'createBy' },
}, {
title: 'IP地址',
dataIndex: 'remoteAddr'
......
......@@ -13,16 +13,16 @@
<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 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, record">
......
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