master
张同海 12 months ago
parent 0851541c32
commit baa1381451

@ -0,0 +1,28 @@
import { axios } from '@/utils/requestTOjava'
// 查询待审核企业列表(运营使用)
export function tenantWaitAuditTenantList(parameter) {
return axios({
url: '/bookingAip/tenant/waitAuditTenantList',
method: 'get',
params: parameter
})
}
// 审核企业(运营使用)
export function TenantAudit(parameter) {
return axios({
url: '/bookingAip/tenant/audit',
method: 'post',
data: parameter
})
}
// 查询状态日志列表
export function bookingCustomStatusLogList(parameter) {
return axios({
url: '/bookingAip/bookingCustom/statusLogList',
method: 'get',
params: parameter
})
}
//

@ -0,0 +1,93 @@
import Vue from 'vue'
import axios from 'axios'
import store from '@/store'
import { message, Modal, notification } from 'ant-design-vue' /// es/notification
import { VueAxios } from './axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
// 创建 axios 实例
const service = axios.create({
baseURL: '/api', // api base_url
// baseURL: 'http://47.104.222.4:8210/api', // 不用代理就用这个
timeout: 18000 // 请求超时时间
})
const err = error => {
if (error.response) {
const data = error.response.data
const token = Vue.ls.get(ACCESS_TOKEN)
if (error.response.status === 403) {
console.log('服务器403啦要重新登录')
notification.error({
message: 'Forbidden',
description: data.message
})
}
if (error.response.status === 500) {
if (data.message.length > 0) {
message.error(data.message)
}
}
if (error.response.status === 401 && !(data.result && data.result.isLogin)) {
notification.error({
message: 'Unauthorized',
description: 'Authorization verification failed'
})
if (token) {
store.dispatch('Logout').then(() => {
setTimeout(() => {
window.location.reload()
}, 1500)
})
}
}
}
return Promise.reject(error)
}
// request interceptor
service.interceptors.request.use(config => {
const token = Vue.ls.get(ACCESS_TOKEN)
if (token) {
config.headers['Authorization'] = 'Bearer ' + token
}
return config
}, err)
/**
* response interceptor
* 所有请求统一返回
*/
service.interceptors.response.use(response => {
console.log(response)
if (response.request.responseType === 'blob') {
return response
}
const code = response.data.code
if (code === 1011006 || code === 1011007 || code === 1011008 || code === 1011009 || code === 401) {
Modal.error({
title: '提示:',
content: response.data.message,
okText: '重新登录',
onOk: () => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
}
})
} else if (code === 1013002 || code === 1016002 || code === 1015002) {
message.error(response.data.message)
return response.data
} else {
return response.data
}
}, err)
const installer = {
vm: {},
install(Vue) {
Vue.use(VueAxios, service)
}
}
export { installer as VueAxios, service as axios }

@ -0,0 +1,116 @@
<template>
<div class="BookingMain">
<a-table :columns="TableData" :data-source="TData" :pagination="false" bordered>
<span slot="operate" slot-scope="operate, record">
<a-button type="primary" @click="ClickExamine(record)">
审核
</a-button>
</span>
</a-table>
<a-modal v-model="dialogVisible" title="企业审核" width="30%" :before-close="handleClose">
<a-input v-model="auditOpinion" :rows="3" type="textarea" placeholder="审核意见" />
<template slot="footer">
<span class="dialog-footer">
<a-button type="success" @click="ClickExamineOk(1)"> </a-button>
<a-button type="danger" @click="ClickExamineOk(2)"> </a-button>
</span>
</template>
</a-modal>
</div>
</template>
<script>
import { tenantWaitAuditTenantList, TenantAudit } from '@/api/modular/main/ApplyJoinOperate'
export default {
data() {
return {
TableData: [
{
title: '管理员名称',
dataIndex: 'AdminName',
key: 'AdminName'
},
{
title: '公司名称',
dataIndex: 'Name',
key: 'Name'
},
{
title: '电子邮箱',
dataIndex: 'Email',
key: 'Email'
},
{
title: '电话',
dataIndex: 'Phone',
key: 'Phone'
},
{
title: '社会信用代码',
dataIndex: 'socialCreditCode',
key: 'socialCreditCode'
},
{
title: '营业执照',
dataIndex: 'businessLicenseUrl',
key: 'businessLicenseUrl'
},
{
title: '操作',
dataIndex: 'operate',
key: 'operate',
scopedSlots: { customRender: 'operate' }
}
],
dialogVisible: false,
auditOpinion: '',
ClickExamineData: '',
TData: []
}
},
mounted() {
this.init()
},
methods: {
init() {
tenantWaitAuditTenantList().then(res => {
if (res.code == 200) {
console.log(res)
this.TData = res.data
}
})
},
ClickExamine(e) {
console.log(e)
this.dialogVisible = true
this.ClickExamineData = e
},
ClickExamineOk(auditStatus) {
console.log(this.ClickExamineData.Id)
TenantAudit({
id: this.ClickExamineData.Id,
auditStatus,
auditOpinion: this.auditOpinion
}).then(res => {
this.init()
this.dialogVisible = false
this.ClickExamineData = {}
this.auditOpinion = ''
console.log(res)
})
},
handleClose() {
this.dialogVisible = false
}
}
}
</script>
<style lang="less" scoped>
.BookingMain {
width: 100%;
height: 760px;
padding: 20px;
display: flex;
flex-direction: column;
background: #fff;
}
</style>

@ -0,0 +1,19 @@
let cargoIdData = [
{
name: "S 普通货",
code: "S",
},
{
name: "R 冻柜",
code: "R",
},
{
name: "D 危险品",
code: "D",
},
{
name: "O 超限箱",
code: "O",
},
];
export { cargoIdData };

@ -47,9 +47,8 @@ const vueConfig = {
externals: isProd ? assetsCDN.externals : {}
},
chainWebpack: (config) => {
config.resolve.alias
.set('@$', resolve('src'))
chainWebpack: config => {
config.resolve.alias.set('@$', resolve('src'))
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
@ -94,14 +93,19 @@ const vueConfig = {
devServer: {
port: 82,
proxy: {
// '/api': {
// target: process.env.VUE_APP_API_BASE_URL,
// ws: false,
// changeOrigin: true,
// pathRewrite: {
// '^/api': '' // 需要rewrite的,
// }
// },
'/api': {
target: process.env.VUE_APP_API_BASE_URL,
ws: false,
changeOrigin: true,
pathRewrite: {
'^/api': '' // 需要rewrite的,
}
target: 'http://47.104.222.4:8210',
changeOrigin: true
},
'/hubs': {
target: process.env.VUE_APP_SOCKET_BASE_URL,
ws: true,

Loading…
Cancel
Save