Commit 1491b582 by liang ce

全局配置,新功能食堂更新

parent fec30f94
NODE_ENV = 'development'
VUE_APP_API_URL = '/api/'
\ No newline at end of file
NODE_ENV = 'production'
VUE_APP_API_URL = 'http://139.224.55.14:9999'
\ No newline at end of file
......@@ -14,6 +14,7 @@ module.exports = {
'no-callback-literal': 0,
'standard/no-callback-literal': 0,
'camelcase': 0,
'no-use-v-if-with-v-for': 0
},
parserOptions: {
parser: 'babel-eslint'
......
......@@ -4,7 +4,9 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"devserve": "vue-cli-service serve --model development",
"build": "vue-cli-service build",
"probuild": "vue-cli-service build --mode production",
"lint": "vue-cli-service lint"
},
"dependencies": {
......
import axios from 'axios'
import qs from 'qs'
var instance = axios.create()
// axios.defaults.baseURL = 'http://192.168.1.106:8300/v1/isv' // 本地荣
// axios.defaults.baseURL = 'http://192.168.1.102:8300/v1/isv' // 本地钱
axios.defaults.baseURL = 'http://139.196.213.18:8300/v1/isv' // beta环境
// 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 的实例
axios.defaults.headers['Authorization'] = `Bearer ${localStorage.getItem('token')}` // 设置请求头为 Authorization
// 配置发送请求前的拦截器可以设置token信息
axios.interceptors.request.use((config) => {
// loading开始loadingInstance.start()
return config
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 {
return new Promise((resolve, reject) => {
getToken().then((response) => {
sessionStorage.setItem('access_token', response.data.access_token)
sessionStorage.setItem('refresh_token', response.data.refresh_token)
sessionStorage.setItem('expires_in', response.data.expires_in * 1000)
sessionStorage.setItem('start_time', new Date().getTime())
resolve(config)
return config
}).catch((err) => {
console.log(err)
})
})
}
}, (error) => {
// 出错,也要loading结束
loadingInstance.close()
return Promise.reject(error)
})
function getToken () {
let loginData = qs.stringify({
refresh_token: sessionStorage.getItem('refresh_token'),
grant_type: 'refresh_token'
})
return new Promise((resolve, reject) => {
instance.post(`${BASE_URL}/auth/oauth/token`, loginData, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Authorization': 'Basic bWluZ3BheS13ZWI6bWluZ3BheS13ZWI='
}
}).then((res) => {
resolve(res)
}).catch((err) => {
console.log(err)
})
})
}
const $http = {
post: (url) => {
post: (url, data) => {
return new Promise((resolve, reject) => {
axios.post(url).then((res) => {
axios.post(`${BASE_URL}${url}`, data, {
headers: {
'Content-Type': 'application/json; charset=UTF-8'
}
}).then((res) => {
return resolve(res)
}).catch((error) => {
return reject(error)
......@@ -26,7 +68,8 @@ const $http = {
},
get: (url) => {
return new Promise((resolve, reject) => {
axios.get(url).then((res) => {
debugger
axios.get(`${BASE_URL}${url}`).then((res) => {
return resolve(res)
}).catch((error) => {
return reject(error)
......
......@@ -2,15 +2,16 @@ import * as dd from 'dingtalk-jsapi'
import axios from 'axios'
import qs from 'qs'
import { MINGPAY_CONSTANT } from './constant'
axios.defaults.headers['Authorization'] = `Bearer ${localStorage.getItem('token')}`
let basurl = process.env.VUE_APP_API_URL
// axios.defaults.headers['Authorization'] = `Bearer ${localStorage.getItem('token')}`
const config = {
ddconfig: () => {
let senddate = qs.stringify({
version: MINGPAY_CONSTANT.MINGPAY_CONSTANT_VERSION,
// version: MINGPAY_CONSTANT.MINGPAY_CONSTANT_VERSION,
url: location.href.replace(window.location.hash, ''),
orgId: localStorage.getItem('orgId')
})
return axios.post(`http://139.196.213.18:8300/v1/auth/getJsAuthenticationParameter?${senddate}`).then((res) => {
return axios.post(`${basurl}/mingpay/v1/skipAuth/getJsAuthenticationParameter?${senddate}`).then((res) => {
let timeStamp = res.data.data.timeStamp
let nonceStr = res.data.data.nonceStr
let signature = res.data.data.signature
......@@ -48,22 +49,38 @@ const config = {
corpId: localStorage.getItem('orgId'), // 企业id
onSuccess: function (info) {
let senddate = qs.stringify({
version: 'v1',
// version: 'v1',
code: info.code,
orgId: localStorage.getItem('orgId')
})
return axios.post(`http://139.196.213.18:8300/v1/auth/token?${senddate}`).then((res) => {
if (res.data.resultCode === '0') {
localStorage.setItem('token', res.data.data.accessToken.access_token)
localStorage.setItem('userId', res.data.data.oapiUser.userid)
localStorage.setItem('avatar', res.data.data.oapiUser.avatar)
localStorage.setItem('name', res.data.data.oapiUser.name)
return axios.post(`${basurl}/mingpay/v1/skipAuth/getUserInfoByCode?${senddate}`).then((res) => {
console.log(res.data.resultCode)
if (res.data.resultCode === 0) {
return res.data.data.mingUserId
}
}).then((mingUserId) => {
let loginData = qs.stringify({
username: mingUserId,
password: mingUserId,
scope: 'server',
grant_type: 'password'
})
return axios.post(`${basurl}/auth/oauth/token`, loginData,
{
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Authorization': 'Basic bWluZ3BheS13ZWI6bWluZ3BheS13ZWI='
}
}).then((response) => {
console.log(response)
sessionStorage.setItem('access_token', response.data.access_token)
sessionStorage.setItem('refresh_token', response.data.refresh_token)
sessionStorage.setItem('expires_in', response.data.expires_in * 1000)
sessionStorage.setItem('start_time', new Date().getTime())
resolve('ok')
} else {
}).catch(() => {
resolve('noPermission')
}
}).catch((err) => {
console.log(err)
})
})
},
onFail: function (err) {
......
......@@ -13,8 +13,8 @@
>
<!-- <a-menu-item key="1">应用管理</a-menu-item> -->
<a-menu-item key="accountManagement">支付管理</a-menu-item>
<!-- <a-menu-item key="3">设备管理</a-menu-item>
<a-menu-item key="4">位置管理</a-menu-item>
<a-menu-item key="classificationOfDishes">食堂管理</a-menu-item>
<!-- <a-menu-item key="4">位置管理</a-menu-item>
<a-menu-item key="5">权限管理</a-menu-item> -->
</a-menu>
</a-layout-header>
......
<template>
<div class="canteenManagementHome">
<a-layout style="padding: 24px 0; background: #fff; min-height: calc(100vh - 149px);min-width:1100px">
<a-layout-sider width="200" style="background: #fff">
<a-menu
mode="inline"
:defaultSelectedKeys="[defaultSelectedKeys]"
:defaultOpenKeys="['sub1']"
style="height: 100%"
@click="routerPush"
>
<a-menu-item class="itemFlex" key="classificationOfDishes">菜品分类</a-menu-item>
<a-menu-item class="itemFlex" key="menuManagement">菜品管理</a-menu-item>
<a-menu-item class="itemFlex" key="consumptionOrder">消费订单</a-menu-item>
<a-menu-item class="itemFlex" key="consumptionStatistics">消费统计</a-menu-item>
</a-menu>
</a-layout-sider>
<a-layout-content :style="{ padding: '0 24px', minHeight: '280px' }">
<router-view/>
</a-layout-content>
</a-layout>
</div>
</template>
<script>
export default {
name: 'canteenManagementHome',
data () {
return {
defaultSelectedKeys: 'defaultSelectedKeys',
chooseMenuList: 'classificationOfDishes'
}
},
created () {
this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name
},
watch: {
$route (to, from) {
this.defaultSelectedKeys = to.name
this.chooseMenuList = to.name
}
},
methods: {
routerPush (obj) {
this.chooseMenuList = obj.key
this.$router.push({ name: obj.key })
}
}
}
</script>
<style lang="less" scoped>
.itemFlex{
display: flex;
align-items: center;
}
.menuIcon{
width: 13px;
height: 13px;
margin-right: 5px;
margin-top: -2px;
background-size: cover;
display: inline-block;
}
.menuIcon1_1{
background-image: url('../../../assets/menuIcon/accountManagement1.png');
}
.menuIcon1_2{
background-image: url('../../../assets/menuIcon/accountManagement2.png');
}
.menuIcon2_1{
background-image: url('../../../assets/menuIcon/rechargeRecord1.png');
}
.menuIcon2_2{
background-image: url('../../../assets/menuIcon/rechargeRecord2.png');
}
.menuIcon3_1{
background-image: url('../../../assets/menuIcon/allowancePayment1.png');
}
.menuIcon3_2{
background-image: url('../../../assets/menuIcon/allowancePayment2.png');
}
.menuIcon4_1{
background-image: url('../../../assets/menuIcon/recordsOfConsumption1.png');
}
.menuIcon4_2{
background-image: url('../../../assets/menuIcon/recordsOfConsumption2.png');
}
.menuIcon5_1{
background-image: url('../../../assets/menuIcon/cashierManagement1.png');
}
.menuIcon5_2{
background-image: url('../../../assets/menuIcon/cashierManagement2.png');
}
.menuIcon6_1{
background-image: url('../../../assets/menuIcon/systemReconciliation1.png');
}
.menuIcon6_2{
background-image: url('../../../assets/menuIcon/systemReconciliation2.png');
}
.menuIcon7_1{
background-image: url('../../../assets/menuIcon/paymentManagementSetting1.png');
}
.menuIcon7_2{
background-image: url('../../../assets/menuIcon/paymentManagementSetting2.png');
}
.menuIcon8_1{
background-image: url('../../../assets/menuIcon/paymentManagementSetting1.png');
}
.menuIcon8_2{
background-image: url('../../../assets/menuIcon/paymentManagementSetting2.png');
}
</style>
<template>
<div class="classificationOfDishes">
<a-button style="margin-bottom: 20px" type="primary" @click="showModal(1)">添加分类</a-button>
<a-table :columns="columns" :dataSource="dataSource" rowKey="productCategoryId" :pagination="pagination">
<span slot="productCategoryName"></span>
<span slot="sort"></span>
<span slot="isDisplay" slot-scope="isDisplay">
<a-badge v-if="isDisplay === 'DISPLAY'" status="success" text="已显示" />
<a-badge v-else-if="isDisplay === 'HIDDEN'" status="error" text="已隐藏" />
</span>
<span slot="action" slot-scope="text, record, index">
<a style="margin-right: 8px" href="javascript:;" @click="showModal(2, record)">修改</a>
<a href="javascript:;" @click="showConfirm(record, index)">{{record.isDisplay === 'DISPLAY' ? '隐藏' : '显示'}}</a>
</span>
</a-table>
<a-modal
title="增加分类"
:visible="visible"
@ok="saveProductCategory"
:confirmLoading="confirmLoading"
@cancel="handleCancel"
>
<div class="item">
<label>分类名称:</label><a-input v-model="productCategoryName" placeholder="请输入分类名称"/>
</div>
<div class="item">
<label>排序值:</label><a-input v-model="sort" placeholder="排序值为数字"/>
</div>
</a-modal>
</div>
</template>
<script>
import { $http } from './../../../api/axios.js'
export default {
name: 'classificationOfDishes',
data () {
return {
columns: [{
title: '菜品类别',
dataIndex: 'productCategoryName'
}, {
title: '排序值',
dataIndex: 'sort'
}, {
title: '状态',
dataIndex: 'isDisplay',
scopedSlots: { customRender: 'isDisplay' }
}, {
title: '操作',
key: 'action',
scopedSlots: { customRender: 'action' }
}],
productCategoryName: '',
sort: '',
dataSource: [],
visible: false,
modelType: 1,
modelSource: '',
confirmLoading: false,
pagination: {
current: 1,
defaultCurrent: 1,
defaultPageSize: 1000,
hideOnSinglePage: true,
total: 0
}
}
},
created: function () {
this.getProductCategoryList()
},
methods: {
getProductCategoryList () {
let getProductCategoryListData = {
orgId: localStorage.getItem('orgId')
}
$http.post(`/mingpay/v1/isv/product/list_product_category`, getProductCategoryListData).then((res) => {
if (res.data.resultCode === 0) {
this.dataSource = res.data.data
}
})
},
changeItem () {
this.confirmLoading = true
let updateProductCategoryData = {
orgId: localStorage.getItem('orgId'),
productCategoryId: this.modelSource.productCategoryId,
productCategoryName: this.productCategoryName,
sort: this.sort
}
$http.post(`/mingpay/v1/isv/product/update_product_category`, updateProductCategoryData).then((res) => {
if (res.data.resultCode === 0) {
this.visible = false
this.confirmLoading = false
this.sort = ''
this.productCategoryName = ''
this.getProductCategoryList()
this.$message.success('操作成功')
} else {
this.$message.error('操作失败')
}
}).catch(() => {
this.$message.error('操作失败')
this.confirmLoading = false
})
},
showConfirm (record, index) {
let that = this
let title
let content
if (record.isDisplay === 'DISPLAY') {
title = '确认要隐藏该菜品分类吗?'
content = '隐藏后该分类下的所有菜品设备端都不可见'
} else {
title = '确认显示该分类吗?'
content = '显示后该分类下菜品可正常使用'
}
this.$confirm({
title: title,
content: content,
onOk () {
that.changeData(record, index)
},
onCancel () {}
})
},
changeData (record, index) {
console.log(record, index)
let saveProductCategoryData = {
orgId: localStorage.getItem('orgId'),
productCategoryId: this.categoryName,
sort: this.sort
}
if (record.isDisplay === 'DISPLAY') {
saveProductCategoryData = {
orgId: localStorage.getItem('orgId'),
productCategoryId: record.productCategoryId,
isDisplay: 'HIDDEN'
}
} else {
saveProductCategoryData = {
orgId: localStorage.getItem('orgId'),
productCategoryId: record.productCategoryId,
isDisplay: 'DISPLAY'
}
}
$http.post(`/mingpay/v1/isv/product/update_product_category_status`, saveProductCategoryData).then((res) => {
if (res.data.resultCode === 0) {
this.sort = ''
this.productCategoryName = ''
this.getProductCategoryList()
this.$message.success('操作成功')
} else {
this.$message.error('操作失败')
}
}).catch(() => {
this.$message.error('操作失败')
this.confirmLoading = false
})
},
showModal (type, data) {
this.modelSource = data
this.modelType = type
this.visible = true
if (type === 2) {
this.productCategoryName = data.productCategoryName
this.sort = data.sort
}
},
// 创建菜单
saveProductCategory () {
let that = this
if (this.productCategoryName === '') {
this.$message.error('分类名称不能为空')
} else if (this.sort === '') {
this.$message.error('排序值不能为空')
} else {
if (this.modelType === 2) {
this.changeItem()
return
}
this.confirmLoading = true
let saveProductCategoryData = {
orgId: localStorage.getItem('orgId'),
productCategoryName: this.productCategoryName,
sort: parseInt(this.sort)
}
$http.post(`/mingpay/v1/isv/product/save_product_category`, saveProductCategoryData).then((res) => {
if (res.data.resultCode === 0) {
this.visible = false
this.confirmLoading = false
this.sort = ''
this.productCategoryName = ''
this.getProductCategoryList()
this.$message.success('操作成功')
} else {
this.$message.error('操作失败')
}
}).catch(() => {
this.$message.error('操作失败')
this.confirmLoading = false
})
}
},
handleCancel (e) {
this.visible = false
this.sort = ''
this.productCategoryName = ''
}
}
}
</script>
<style lang="less" scoped>
.item{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin: 10px;
}
.item>label{
width: 75px;
text-align: right;
margin-right: 8px;
}
.item>input{
width: 220px;
}
</style>
<template>
<div class="consumptionOrder">
<div class="searchBox">
<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>
<a-select placeholder="状态" :allowClear="true" style="width: 120px;margin-right: 20px;" @change="selectHandlestatus">
<a-select-option value="SUCCESS">消费成功</a-select-option>
<a-select-option value="REFUND_SUCCESS">退款成功</a-select-option>
</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">
<template slot="content">
<p>{{record.buyerSysDeptNameList[indexOf]}}</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>
<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 }}
</span>
<span slot="remark">备注</span>
</a-table>
</div>
</template>
<script>
import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js'
export default {
name: 'consumptionOrder',
data () {
return {
searchSource: {
UserMessage: {
avatar: '',
emplId: '',
name: ''
},
payStatus: '',
agentId: ''
},
agentList: [],
pagination: {
current: 1,
defaultCurrent: 10,
defaultPageSize: 10,
hideOnSinglePage: true,
total: 0
},
columns: [{
title: '消费人',
dataIndex: 'buyerName'
}, {
title: '部门',
dataIndex: 'departmentNameList',
scopedSlots: { customRender: 'departmentNameList' }
}, {
title: '充值金额',
dataIndex: 'chargeAmount'
}, {
title: '经办人',
dataIndex: 'agent',
scopedSlots: { customRender: 'agent' }
}, {
title: '状态',
dataIndex: 'orderStatus',
scopedSlots: { customRender: 'orderStatus' }
}, {
title: '时间',
dataIndex: 'createTime',
scopedSlots: { customRender: 'createTime' }
}, {
title: '备注',
dataIndex: 'remark'
}],
OrderList: []
}
},
created: function () {
this.getAgentList()
this.queryOrderList()
},
methods: {
// 获取收银员列表
getAgentList () {
let AgentData = this.$qs.stringify({
orgId: localStorage.getItem('orgId'),
userType: '1'
})
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all?${AgentData}`).then((res) => {
this.agentList = res.data.data.list
})
},
// 选人组件调用
choosePeople () {
const _that = this
config.ddready('ddchooseOne').then((res) => {
this.searchSource.UserMessage = res[0]
_that.queryRechargeList()
})
},
// 清理选择帅选人list
clearUserMessage () {
this.searchSource.UserMessage = {
avatar: '',
emplId: '',
name: ''
}
},
// 用户头像处理
avatarCanvasFn (name) {
let canvas = document.createElement('canvas')
let con = canvas.getContext('2d')
let ratio = this.getPixelRatio(con)
canvas.style.width = 40 + 'px'
canvas.style.height = 40 + 'px'
canvas.width = 40 * ratio
canvas.height = 40 * ratio
con.scale(ratio, ratio)
con.fillStyle = '#1890ff'
con.fillRect(0, 0, 40, 40)
con.fillStyle = '#ffffff'
con.font = '12px Arial'
con.textAlign = 'center'
con.fillText(name, 20, 25)
return canvas.toDataURL()
},
// 头像模糊处理
getPixelRatio (context) {
var backingStore = context.backingStorePixelRatio ||
context.webkitBackingStorePixelRatio ||
context.mozBackingStorePixelRatio ||
context.msBackingStorePixelRatio ||
context.oBackingStorePixelRatio ||
context.backingStorePixelRatio || 1
return (window.devicePixelRatio || 1) / backingStore
},
selectHandlestatus (value) {
this.searchSource.payStatus = value
},
selectAgent (value) {
this.searchSource.agentId = value
},
search () {
this.pagination.current = 1
this.queryOrderList()
},
queryOrderList () {
let RechargeData = {
pageNumber: 10,
currentPage: this.pagination.current,
agentId: this.searchSource.agentId,
payStatus: this.searchSource.payStatus,
buyerId: this.searchSource.UserMessage.emplId,
orgId: localStorage.getItem('orgId')
}
$http.post(`/mingpay/v1/isv/order/list_order_page`, RechargeData).then((res) => {
let data = res.data.data
this.pagination.total = parseInt(data.totalCount)
this.OrderList = data.list
})
},
}
}
</script>
<style lang="less" scoped>
.searchBox{
display: flex;
margin-bottom: 20px;
}
.searchBox > input {
margin-right: 20px;
max-width: 180px;
}
.operationTable a{
margin-right: 8px;
}
.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;
}
.userListBox{
text-align: center;
display: flex;
}
.userListBox>div>img{
display: block;
text-align: center;
}
.choosePeople{
line-height: 32px;
width: 120px;
margin-right: 20px;
padding-left: 11px;
height: 32px;
border: 1px solid #d9d9d9;
border-radius: 4px;
color: #bfbfbf;
cursor: pointer;
}
.choosePeople:hover{
border: 1px solid #1890ff;
}
.deptModel{
background: #F2F0F0;
margin: 5px 0;
margin-right: 5px;
padding: 2px 4px;
border-radius: 3px;
line-height: 2;
}
.ant-table-tbody > tr:hover .deptModel{
background: #CAEEFF;
}
.ant-popover-inner-content>p{
margin: 0;
}
</style>
<template>
<div class="consumptionStatistics">
消费统计
</div>
</template>
<script>
export default {
name: 'consumptionStatistics'
}
</script>
<style lang="less" scoped>
</style>
......@@ -212,7 +212,7 @@ export default {
cardStatus: this.searchSource.cardStatus,
orgId: localStorage.getItem('orgId')
})
$http.get(`/account/queryAccountList?${AccountData}`).then((res) => {
$http.get(`/mingpay/v1/isv/account/queryAccountList?${AccountData}`).then((res) => {
_that.accountList = res.data.data.recordList
_that.pagination.total = parseInt(res.data.data.totalCount)
}).catch((err) => {
......@@ -345,8 +345,8 @@ export default {
this.rechargeData.remark = this.form.getFieldsValue().remark
this.rechargeData.orgId = localStorage.getItem('orgId')
let rechargeData = this.$qs.stringify(this.rechargeData)
$http.get(`/charge/charge?${rechargeData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/charge/charge?${rechargeData}`).then((res) => {
if (res.data.resultCode === 0) {
this.form.resetFields()
this.$message.success(res.data.data.message)
this.spinning = !this.spinning
......@@ -386,8 +386,8 @@ export default {
orgId: localStorage.getItem('orgId')
})
}
$http.get(`/account/${url}?${accountOperationData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/account/${url}?${accountOperationData}`).then((res) => {
if (res.data.resultCode === 0) {
this.queryAccountList()
this.$message.success('操作成功')
}
......@@ -464,13 +464,13 @@ export default {
orgId: localStorage.getItem('orgId')
})
}
$http.get(`/account/update_bind_card_status?${cardOperationData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/account/update_bind_card_status?${cardOperationData}`).then((res) => {
if (res.data.resultCode === 0) {
this.queryAccountList()
this.visible2 = false
this.updateBindCardStatusForm.resetFields()
this.$message.success('操作成功')
} else if (res.data.resultCode === '10010009') {
} else if (res.data.resultCode === 10010009) {
this.$message.error('该卡片已被占用')
} else {
this.$message.error(res.data.message)
......
......@@ -40,7 +40,6 @@
</template>
<script>
import { $http } from './../../../api/axios.js'
import { mwUtils } from './../../../lib/utils.js'
export default {
name: 'allowanceDetails',
......
......@@ -185,7 +185,7 @@ export default {
orgId: localStorage.getItem('orgId'),
userType: '1'
})
$http.get(`/cashier/list_cashier_all?${AgentData}`).then((res) => {
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all?${AgentData}`).then((res) => {
this.agentList = res.data.data.list
})
},
......@@ -209,7 +209,7 @@ export default {
agentId: this.searchSource.agentId,
orgId: localStorage.getItem('orgId')
})
$http.get(`/account/list_couponRecord?${RecordData}`).then((res) => {
$http.get(`/mingpay/v1/isv/account/list_couponRecord?${RecordData}`).then((res) => {
let data = res.data.data
this.recordsList = data.list
this.pagination.total = parseInt(data.total)
......@@ -312,8 +312,8 @@ export default {
subsidyEnumType: values.select,
orgId: localStorage.getItem('orgId')
})
$http.get(`/account/batch_create_subsidy?${RecordData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/account/batch_create_subsidy?${RecordData}`).then((res) => {
if (res.data.resultCode === 0) {
this.form.resetFields()
this.userIdListObj = []
this.departmentIdListObj = []
......
......@@ -87,8 +87,8 @@ export default {
userType: '0',
id: record.id
})
$http.get(`/cashier/delete_cashier?${DeleteCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/cashier/delete_cashier?${DeleteCashierData}`).then((res) => {
if (res.data.resultCode === 0) {
this.$message.success('操作成功')
this.getCashierList()
} else {
......@@ -105,7 +105,7 @@ export default {
orgId: localStorage.getItem('orgId'),
userType: '0'
})
$http.get(`/cashier/list_cashier?${CashierListData}`).then((res) => {
$http.get(`/mingpay/v1/isv/cashier/list_cashier?${CashierListData}`).then((res) => {
this.pagination.total = parseInt(res.data.data.total)
this.cashierManagementList = res.data.data.list
}).catch(() => {
......@@ -130,8 +130,8 @@ export default {
orgId: localStorage.getItem('orgId'),
userType: '0'
})
$http.get(`/cashier/insert_cashier?${insertCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/cashier/insert_cashier?${insertCashierData}`).then((res) => {
if (res.data.resultCode === 0) {
this.$message.success('添加成功')
this.getCashierList()
} else {
......
<template>
<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="remoteAddr"></span>
<span slot="createTime"></span>
</a-table>
</div>
</template>
<script>
import { config } from './../../../api/config.js'
import { $http } from './../../../api/axios.js'
export default {
name: 'operationLog'
name: 'operationLog',
data () {
return {
pagination: {
current: 1,
defaultCurrent: 1,
defaultPageSize: 10,
hideOnSinglePage: true,
total: 0
},
columns: [{
title: '日志类型',
dataIndex: 'title'
}, {
title: '操作人',
dataIndex: 'createBy'
}, {
title: 'IP地址',
dataIndex: 'remoteAddr'
}, {
title: '操作时间',
dataIndex: 'createTime'
}],
logData: []
}
},
created: function () {
this.queryLog()
},
methods: {
queryLog () {
let queryLogData = this.$qs.stringify({
desc: 'create_time',
serviceId: 'mingpay-web',
orgId: localStorage.getItem('orgId'),
current: this.pagination.current,
size: this.pagination.defaultPageSize
})
$http.get(`/mingpay/v1/log/query?${queryLogData}`).then((res) => {
if (res.data.resultCode === 0) {
this.pagination.total = res.data.data.total
this.logData = res.data.data.records
} else {
this.$message.error('获取日志信息失败')
}
}).catch(() => {
this.$message.error('获取日志信息失败')
})
},
handleTableChange (pagination, filters, sorter) {
this.pagination.current = pagination.current
this.queryLog()
}
}
}
</script>
<style lang="less" scoped>
</style>
......@@ -17,7 +17,7 @@
<a-menu-item class="itemFlex" key="cashierManagement"><div :class="[chooseMenuList === 'cashierManagement' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"></div>设置收银员</a-menu-item>
<a-menu-item class="itemFlex" key="SetAdministrators"><div :class="[chooseMenuList === 'SetAdministrators' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"></div>设置管理员</a-menu-item>
<a-menu-item class="itemFlex" key="paymentManagementSetting"><div :class="[chooseMenuList === 'paymentManagementSetting' ? 'menuIcon menuIcon7_2' : 'menuIcon menuIcon7_1']"></div>设置中心</a-menu-item>
<!-- <a-menu-item key="operationLog">操作日志</a-menu-item> -->
<a-menu-item class="itemFlex" key="operationLog"><div :class="[chooseMenuList === 'operationLog' ? 'menuIcon menuIcon8_2' : 'menuIcon menuIcon8_1']"></div>操作日志</a-menu-item>
</a-menu>
</a-layout-sider>
<a-layout-content :style="{ padding: '0 24px', minHeight: '280px' }">
......@@ -111,9 +111,9 @@ export default {
background-image: url('../../../assets/menuIcon/paymentManagementSetting2.png');
}
.menuIcon8_1{
background-image: url('../../../assets/menuIcon/paymentManagementSetting1.png');
background-image: url('../../../assets/menuIcon/operationLog1.png');
}
.menuIcon8_2{
background-image: url('../../../assets/menuIcon/paymentManagementSetting2.png');
background-image: url('../../../assets/menuIcon/operationLog2.png');
}
</style>
......@@ -66,10 +66,10 @@ export default {
},
methods: {
queryOrgSetting () {
let querySettingData = this.$qs.stringify({
let querySettingData = {
orgId: localStorage.getItem('orgId')
})
$http.post(`/org_setting/query_org_setting_by_org_id?${querySettingData}`).then((res) => {
}
$http.post(`/mingpay/v1/isv/org_setting/query_org_setting_by_org_id`, querySettingData).then((res) => {
console.log(res)
this.OrgSettingData = res.data.data
}).catch((err) => {
......@@ -77,14 +77,14 @@ export default {
})
},
updateOrgSetting () {
let updateSettingData = this.$qs.stringify(this.OrgSettingData)
let updateSettingData = this.OrgSettingData
if (this.OrgSettingData.chargeProcessInstanceId === '' && this.OrgSettingData.chargeSwitch === 'OPEN') {
this.$message.error('打开审批开关后必须填写审批模版ID')
} else if (this.OrgSettingData.provideSubsidyId === '' && this.OrgSettingData.provideSubsidySwitch === 'OPEN') {
this.$message.error('打开审批开关后必须填写审批模版ID')
} else {
$http.post(`/org_setting/update_org_setting_by_org_id?${updateSettingData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.post(`/mingpay/v1/isv/org_setting/update_org_setting_by_org_id`, updateSettingData).then((res) => {
if (res.data.resultCode === 0) {
this.$message.success('保存成功')
} else {
this.$message.error('保存失败')
......
......@@ -120,7 +120,7 @@ export default {
orgId: localStorage.getItem('orgId'),
userType: '1'
})
$http.get(`/cashier/list_cashier_all?${AgentData}`).then((res) => {
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all?${AgentData}`).then((res) => {
this.agentList = res.data.data.list
})
},
......@@ -183,7 +183,7 @@ export default {
ddUserId: this.searchSource.UserMessage.emplId,
orgId: localStorage.getItem('orgId')
})
$http.get(`/charge/list_charge?${RechargeData}`).then((res) => {
$http.get(`/mingpay/v1/isv/charge/list_charge?${RechargeData}`).then((res) => {
let data = res.data.data
this.pagination.total = parseInt(data.totalCount)
this.chargeList = data.recordList
......
......@@ -144,7 +144,7 @@ export default {
orgId: localStorage.getItem('orgId'),
userType: '0'
})
$http.get(`/cashier/list_cashier_all?${CashierListData}`).then((res) => {
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all?${CashierListData}`).then((res) => {
this.agentList = res.data.data.list
}).catch(() => {
this.$message.error('获取操作员信息失败')
......@@ -170,7 +170,7 @@ export default {
remark: this.form.getFieldsValue().remark || '',
orgId: localStorage.getItem('orgId')
})
$http.get(`/consume/refund?${refundData}`).then((res) => {
$http.get(`/mingpay/v1/isv/consume/refund?${refundData}`).then((res) => {
if (res.data.message === 'SUCCESS') {
this.$message.success('退款成功')
this.visible = false
......@@ -205,7 +205,7 @@ export default {
agentId: this.searchSource.agentId,
orgId: localStorage.getItem('orgId')
})
$http.get(`/consume/list_expense_record?${RecordListData}`).then((res) => {
$http.get(`/mingpay/v1/isv/consume/list_expense_record?${RecordListData}`).then((res) => {
let data = res.data.data
this.recordsList = data.recordList
this.pagination.total = parseInt(data.totalCount)
......
......@@ -87,8 +87,8 @@ export default {
userType: '1',
id: record.id
})
$http.get(`/cashier/delete_cashier?${DeleteCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/cashier/delete_cashier?${DeleteCashierData}`).then((res) => {
if (res.data.resultCode === 0) {
this.$message.success('操作成功')
this.getCashierList()
} else {
......@@ -105,7 +105,7 @@ export default {
orgId: localStorage.getItem('orgId'),
userType: '1'
})
$http.get(`/cashier/list_cashier?${CashierListData}`).then((res) => {
$http.get(`/mingpay/v1/isv/cashier/list_cashier?${CashierListData}`).then((res) => {
this.pagination.total = parseInt(res.data.data.total)
this.cashierManagementList = res.data.data.list
}).catch(() => {
......@@ -130,8 +130,8 @@ export default {
userType: '1',
orgId: localStorage.getItem('orgId')
})
$http.get(`/cashier/insert_cashier?${insertCashierData}`).then((res) => {
if (res.data.resultCode === '0') {
$http.get(`/mingpay/v1/isv/cashier/insert_cashier?${insertCashierData}`).then((res) => {
if (res.data.resultCode === 0) {
this.$message.success('添加成功')
this.getCashierList()
} else {
......
......@@ -171,9 +171,9 @@ export default {
endTime: this.endTime,
orgId: localStorage.getItem('orgId')
})
$http.get(`/account/accountCheck?${SubsidyListData}`).then((res) => {
$http.get(`/mingpay/v1/isv/account/accountCheck?${SubsidyListData}`).then((res) => {
console.log(res.data.data)
if (res.data.resultCode === '0') {
if (res.data.resultCode === 0) {
this.systemReconciliationDetails = res.data.data
} else {
this.$message.error(res.data.message)
......
......@@ -68,7 +68,7 @@ export default {
pageNumber: this.pagination.defaultPageSize,
orgId: localStorage.getItem('orgId')
})
$http.get(`/account/query_subsidyList_by_user_id?${SubsidyListData}`).then((res) => {
$http.get(`/mingpay/v1/isv/account/query_subsidyList_by_user_id?${SubsidyListData}`).then((res) => {
let data = res.data.data
this.subsidyList = data.recordList
this.pagination.total = parseInt(data.totalCount)
......
......@@ -2,7 +2,7 @@ import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { Menu, Layout, Breadcrumb, Popover, Icon, Button, DatePicker, Input, Table, Tag, Divider, Dropdown, Modal, Form, Select, message, Pagination, LocaleProvider, Spin, Badge, Switch } from 'ant-design-vue'
import { Upload, Menu, Layout, Breadcrumb, Popover, Icon, Button, DatePicker, Input, Table, Tag, Divider, Dropdown, Modal, Form, Select, message, Pagination, LocaleProvider, Spin, Badge, Switch } from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import { config } from './api/config'
import './assets/css/global.css'
......@@ -10,6 +10,7 @@ import axios from 'axios'
import qs from 'qs'
Vue.use(Layout)
Vue.use(Upload)
Vue.use(Popover)
Vue.use(LocaleProvider)
Vue.use(Menu)
......@@ -32,7 +33,6 @@ Vue.use(Input.TextArea)
Vue.use(message)
Vue.use(Pagination)
Vue.config.productionTip = false
// Vue.prototype.$http = axios
Vue.prototype.$qs = qs
Vue.prototype.$confirm = Modal.confirm
......
......@@ -95,6 +95,37 @@ export default new Router({
component: resolve => require(['./components/pages/PaymentManagement/PaymentManagementSetting.vue'], resolve)
}
]
},
{
path: '/canteenManagementHome',
name: 'canteenManagementHome',
component: resolve => require(['./components/pages/CanteenManagement/CanteenManagementHome.vue'], resolve),
children: [
{
path: '/classificationOfDishes',
name: 'classificationOfDishes',
meta: { title: '食堂管理/菜品分类' },
component: resolve => require(['./components/pages/CanteenManagement/ClassificationOfDishes.vue'], resolve)
},
{
path: '/menuManagement',
name: 'menuManagement',
meta: { title: '食堂管理/菜单管理' },
component: resolve => require(['./components/pages/CanteenManagement/MenuManagement.vue'], resolve)
},
{
path: '/consumptionOrder',
name: 'consumptionOrder',
meta: { title: '食堂管理/消费订单' },
component: resolve => require(['./components/pages/CanteenManagement/ConsumptionOrder.vue'], resolve)
},
{
path: '/consumptionStatistics',
name: 'consumptionStatistics',
meta: { title: '食堂管理/消费统计' },
component: resolve => require(['./components/pages/CanteenManagement/ConsumptionStatistics.vue'], resolve)
}
]
}
]
},
......
// vue.config.js 配置说明
// 这里只列一部分,具体配置惨考文档啊
module.exports = {
// baseUrl type:{string} default:'/'
// 将部署应用程序的基本URL
......@@ -53,12 +51,12 @@ module.exports = {
// proxy: 'http://localhost:4000' // 配置跨域处理,只有一个代理
proxy: {
'/api': {
target: '<url>',
target: 'http://192.168.1.101:9999',
ws: true,
changeOrigin: true
},
'/foo': {
target: '<other_url>'
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
}// 配置多个代理
}
......
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