增加装备审核页面
This commit is contained in:
parent
acdb3df462
commit
6b36be4d64
|
|
@ -48,4 +48,37 @@ export const downLoadTemplate = () => {
|
|||
return post('/material-mall/dev/downLoadDev', {})
|
||||
}
|
||||
|
||||
// 获取装备申请列表接口
|
||||
export const getEquipmentApplyListApi = (data: any) => {
|
||||
return get('/material-mall/order/orderList', data)
|
||||
}
|
||||
|
||||
// 获取装备新增时的id
|
||||
export const getEquipmentAddIdApi = () => {
|
||||
return post('/material-mall/order/addOrder', {})
|
||||
}
|
||||
|
||||
// 新增装备 新接口
|
||||
export const equipmentAddApiNew = (data: any) => {
|
||||
return post('/material-mall/order/addDevice', data)
|
||||
}
|
||||
// 修改装备 新接口
|
||||
export const equipmentEditApiNew = (data: any) => {
|
||||
return post('/material-mall/order/editDevice', data)
|
||||
}
|
||||
// 获取草稿订单列表
|
||||
export const equipmentDraftListApiNew = (data: any) => {
|
||||
return get('/material-mall/order/devList', data)
|
||||
}
|
||||
// 提交申请接口
|
||||
export const equipmentSubmitApiNew = (data: any) => {
|
||||
return post('/material-mall/order/submitOrder', data)
|
||||
}
|
||||
// 删除接口 外侧
|
||||
export const equipmentDelApiNew = (data: any) => {
|
||||
return post('/material-mall/order/delOrder', data)
|
||||
}
|
||||
// 通过或驳回接口
|
||||
export const equipmentPassAndRejectApiNew = (data: any) => {
|
||||
return post('/material-mall/order/checkDevice', data)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,9 @@ import myInfo from './module/myInfo'
|
|||
// import login from '../hooks/login'
|
||||
// const { getLoginIwsInfo } = login()
|
||||
|
||||
|
||||
import { mainStore } from 'store/main'
|
||||
// import { el } from 'element-plus/es/locale'
|
||||
|
||||
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/index',
|
||||
|
|
@ -18,8 +15,8 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '目录页',
|
||||
keepAlive: true,
|
||||
AuthFlag: false
|
||||
}
|
||||
AuthFlag: false,
|
||||
},
|
||||
},
|
||||
/* 登录页 */
|
||||
{
|
||||
|
|
@ -29,8 +26,8 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '登录页',
|
||||
keepAlive: true,
|
||||
AuthFlag: false
|
||||
}
|
||||
AuthFlag: false,
|
||||
},
|
||||
},
|
||||
/* 注册页 */
|
||||
{
|
||||
|
|
@ -41,7 +38,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '注册页',
|
||||
keepAlive: true,
|
||||
AuthFlag: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/test', // 主路由地址
|
||||
|
|
@ -50,9 +47,9 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '测试',
|
||||
keepAlive: true,
|
||||
AuthFlag: false
|
||||
AuthFlag: false,
|
||||
},
|
||||
children: [...test]
|
||||
children: [...test],
|
||||
},
|
||||
{
|
||||
path: '/myInfo', // 主路由地址
|
||||
|
|
@ -61,14 +58,11 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '我的',
|
||||
keepAlive: true,
|
||||
AuthFlag: false
|
||||
AuthFlag: false,
|
||||
},
|
||||
children: [...myInfo]
|
||||
children: [...myInfo],
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 首页
|
||||
{
|
||||
path: '/',
|
||||
|
|
@ -77,7 +71,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '首页',
|
||||
keepAlive: false,
|
||||
AuthFlag: false
|
||||
AuthFlag: false,
|
||||
},
|
||||
|
||||
children: [
|
||||
|
|
@ -101,7 +95,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '装备共享大厅',
|
||||
activeName: 'equipList',
|
||||
}
|
||||
},
|
||||
},
|
||||
// 专区设备
|
||||
{
|
||||
|
|
@ -111,7 +105,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '装备共享大厅',
|
||||
activeName: 'zoneEquipment',
|
||||
}
|
||||
},
|
||||
},
|
||||
//装备详情
|
||||
{
|
||||
|
|
@ -122,13 +116,13 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '装备详情',
|
||||
keepAlive: false,
|
||||
AuthFlag: false,
|
||||
}
|
||||
},
|
||||
},
|
||||
// 资讯详情
|
||||
{
|
||||
path: '/consultationDetails/:id',
|
||||
name: 'consultationDetails',
|
||||
component: () => (import('views/consultationDetails/index.vue'))
|
||||
component: () => import('views/consultationDetails/index.vue'),
|
||||
},
|
||||
// 收藏夹页面
|
||||
{
|
||||
|
|
@ -136,9 +130,9 @@ const routes: Array<RouteRecordRaw> = [
|
|||
name: 'collect',
|
||||
meta: {
|
||||
title: '我的收藏',
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
component: () => import('views/collect/index.vue')
|
||||
component: () => import('views/collect/index.vue'),
|
||||
},
|
||||
// 寻源比价页面
|
||||
{
|
||||
|
|
@ -174,8 +168,8 @@ const routes: Array<RouteRecordRaw> = [
|
|||
activeName: 'parity',
|
||||
},
|
||||
component: () => import('views/parity/parityCom/notice.vue'),
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
// 寻源比价 (报价)
|
||||
{
|
||||
|
|
@ -185,9 +179,8 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '企业专区',
|
||||
isLogin: true,
|
||||
AuthFlag: false,
|
||||
|
||||
},
|
||||
component: () => import('views/parity/parityCom/quotation.vue')
|
||||
component: () => import('views/parity/parityCom/quotation.vue'),
|
||||
},
|
||||
// 企业专区页面
|
||||
{
|
||||
|
|
@ -199,7 +192,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
AuthFlag: false,
|
||||
activeName: 'enterpriseZone',
|
||||
},
|
||||
component: () => import('views/enterpriseZone/index.vue')
|
||||
component: () => import('views/enterpriseZone/index.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -212,7 +205,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '标签管理-详情',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -223,7 +216,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '数据大屏',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -234,7 +227,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '数据大屏',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -245,7 +238,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '数据大屏',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -256,7 +249,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '数据大屏',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
// 消息
|
||||
|
|
@ -268,7 +261,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '消息',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -280,10 +273,9 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '个人中心',
|
||||
keepAlive: false,
|
||||
AuthFlag: false
|
||||
AuthFlag: false,
|
||||
},
|
||||
children: [
|
||||
|
||||
{
|
||||
path: '/orderManagementCz',
|
||||
name: 'orderManagementCz',
|
||||
|
|
@ -292,20 +284,55 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '订单管理(出租方)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/goodsManagement',
|
||||
name: 'goodsManagement',
|
||||
component: () => import('views/user/goodsManagement/index.vue'),
|
||||
component: () => import('views/user/goodsManagement/index_new.vue'),
|
||||
meta: {
|
||||
title: '商品管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/equipmentInput',
|
||||
name: 'equipmentInput',
|
||||
component: () => import('views/user/goodsManagement/equipmentInput/index.vue'),
|
||||
meta: {
|
||||
title: '装备录入',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/goodsAuditing',
|
||||
name: 'goodsAuditing',
|
||||
component: () => import('views/user/goodsAuditing/index_new.vue'),
|
||||
meta: {
|
||||
title: '装备审核',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
|
||||
// 9.15 新增修改版本 原装备管理隐藏
|
||||
// {
|
||||
// path: '/goodsManagement',
|
||||
// name: 'goodsManagement',
|
||||
// component: () => import('views/user/goodsManagement/index.vue'),
|
||||
// meta: {
|
||||
// title: '商品管理',
|
||||
// keepAlive: true,
|
||||
// AuthFlag: false,
|
||||
// isLogin: true
|
||||
// },
|
||||
// },
|
||||
{
|
||||
path: '/accept-orders',
|
||||
name: 'accept-orders',
|
||||
|
|
@ -314,7 +341,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '接单管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -325,42 +352,42 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '合同管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/owned-manage',
|
||||
name: 'owned-manage',
|
||||
component: () => import('views/user/owned-manage/index.vue'),
|
||||
meta: {
|
||||
title: '自有装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/rent-facility',
|
||||
name: 'rent-facility',
|
||||
component: () => import('views/user/rent-facility/index.vue'),
|
||||
meta: {
|
||||
title: '自有装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/rent-manage',
|
||||
name: 'rent-manage',
|
||||
component: () => import('views/user/rent-manage/index.vue'),
|
||||
meta: {
|
||||
title: '自有装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/owned-manage',
|
||||
name: 'owned-manage',
|
||||
component: () => import('views/user/owned-manage/index.vue'),
|
||||
meta: {
|
||||
title: '自有装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/rent-facility',
|
||||
name: 'rent-facility',
|
||||
component: () => import('views/user/rent-facility/index.vue'),
|
||||
meta: {
|
||||
title: '自有装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/rent-manage',
|
||||
name: 'rent-manage',
|
||||
component: () => import('views/user/rent-manage/index.vue'),
|
||||
meta: {
|
||||
title: '自有装备管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/quickMessage',
|
||||
name: 'quickMessage',
|
||||
|
|
@ -369,7 +396,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '快捷消息设置',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -380,7 +407,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '个人中心',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -391,7 +418,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '退租管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -403,7 +430,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '结算管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -414,7 +441,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '装备维保',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -425,7 +452,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '安全证书管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -436,7 +463,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '标签管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -447,7 +474,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '维修保养管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -458,7 +485,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '需求管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -469,7 +496,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '订单管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -480,7 +507,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '收货地址管理',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -530,7 +557,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '订单详情',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: false
|
||||
isLogin: false,
|
||||
},
|
||||
},
|
||||
// /* 订单管理(订单详情承租) */
|
||||
|
|
@ -542,19 +569,20 @@ const routes: Array<RouteRecordRaw> = [
|
|||
title: '订单详情',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: false
|
||||
isLogin: false,
|
||||
},
|
||||
},
|
||||
// /* 订单管理(退租) */
|
||||
{
|
||||
path: '/rentinTermination',
|
||||
name: 'rentinTermination',
|
||||
component: () => import('views/user/orderManagement/orderCom/rentinTermination.vue'),
|
||||
component: () =>
|
||||
import('views/user/orderManagement/orderCom/rentinTermination.vue'),
|
||||
meta: {
|
||||
title: '订单管理(退租)',
|
||||
keepAlive: true,
|
||||
AuthFlag: false,
|
||||
isLogin: true
|
||||
isLogin: true,
|
||||
},
|
||||
},
|
||||
// /* 订单管理(续租) */
|
||||
|
|
@ -716,7 +744,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
// isLogin: true
|
||||
// },
|
||||
// },
|
||||
]
|
||||
],
|
||||
},
|
||||
// 预约车页面
|
||||
{
|
||||
|
|
@ -726,7 +754,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '预约车',
|
||||
keepAlive: false,
|
||||
AuthFlag: false
|
||||
AuthFlag: false,
|
||||
},
|
||||
},
|
||||
// 订单确认页面
|
||||
|
|
@ -737,7 +765,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '订单提交',
|
||||
keepAlive: false,
|
||||
AuthFlag: false
|
||||
AuthFlag: false,
|
||||
},
|
||||
},
|
||||
// 需求详情页面
|
||||
|
|
@ -748,7 +776,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
meta: {
|
||||
title: '需求详情',
|
||||
keepAlive: false,
|
||||
AuthFlag: false
|
||||
AuthFlag: false,
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -801,8 +829,6 @@ const routes: Array<RouteRecordRaw> = [
|
|||
// },
|
||||
// },
|
||||
|
||||
|
||||
|
||||
// ]
|
||||
// },
|
||||
// /**
|
||||
|
|
@ -843,24 +869,21 @@ const routes: Array<RouteRecordRaw> = [
|
|||
// },
|
||||
// ]
|
||||
// }
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
// 路由模式
|
||||
// history: createWebHistory('/iws/mall-view/'),
|
||||
history: import.meta.env.VITE_ENV === 'production' ? createWebHashHistory() : createWebHistory('/iws/mall-view/'),
|
||||
routes
|
||||
history:
|
||||
import.meta.env.VITE_ENV === 'production'
|
||||
? createWebHashHistory()
|
||||
: createWebHistory('/iws/mall-view/'),
|
||||
routes,
|
||||
})
|
||||
|
||||
|
||||
const white = ['/qr-code', '/big-screen']
|
||||
// 使页面跳转后滚动条恢复至顶部
|
||||
router.beforeEach((to, from, next) => {
|
||||
|
||||
const store = mainStore()
|
||||
if (to.meta.isLogin && !to.meta.AuthFlag) {
|
||||
if (store.token) {
|
||||
|
|
@ -876,15 +899,14 @@ router.beforeEach((to, from, next) => {
|
|||
next()
|
||||
}
|
||||
|
||||
|
||||
// if (store.token || to.path == '/login' || to.path == '/' || to.path == '/home' || to.path == '/register' || to.path == '/equipList' || to.path == '/equipDetail') {
|
||||
|
||||
// } else {
|
||||
// next('/login')
|
||||
// }
|
||||
// chrome
|
||||
document.body.scrollTop = 0;
|
||||
document.body.scrollTop = 0
|
||||
// firefox 兼容火狐
|
||||
document.documentElement.scrollTop = 0;
|
||||
document.documentElement.scrollTop = 0
|
||||
})
|
||||
export default router
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,210 @@
|
|||
<template>
|
||||
<template v-if="!isEquipmentInputShow">
|
||||
<el-form :model="queryParams" ref="queryFormRef" inline size="default" label-width="0">
|
||||
<!-- 表单搜索 -->
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入关键字"
|
||||
v-model.trim="queryParams.keyWord"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择审批状态"
|
||||
v-model="queryParams.status"
|
||||
>
|
||||
<el-option label="待审批" value="0" />
|
||||
<el-option label="已审批" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="applyTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
v-model="queryParams.applyTime"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item prop="code">
|
||||
<el-button class="primary-lease" type="primary" @click="onHandleSQuery()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button class="primary-lease" type="primary" @click="onHandleReset()">
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
@click="onHandleBatchImport()"
|
||||
>
|
||||
批量导入
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号" align="center" width="55" type="index" />
|
||||
<el-table-column prop="createUser" label="申请人" align="center" />
|
||||
<el-table-column prop="createTime" label="申请时间" align="center" />
|
||||
<el-table-column prop="devCount" label="设备数量" align="center" />
|
||||
<el-table-column prop="status" align="center" label="审批状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status == 0" size="small" type="info">待审批</el-tag>
|
||||
<el-tag v-if="row.status == 1" size="small" type="warning">已完成</el-tag>
|
||||
<el-tag v-if="row.status == 3" size="small" type="success">草稿</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onHandleView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="onHandleAuditing(row)">
|
||||
审批
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<!-- <el-pagination
|
||||
v-model:current-page="queryParams.pageNum"
|
||||
v-model:page-size="queryParams.pageSize"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:small="small"
|
||||
:disabled="disabled"
|
||||
:background="background"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
/> -->
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<EquipmentInput :orderIds="orderIds" :isView="isView" v-else @backList="onHandleBackList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox, FormInstance } from 'element-plus'
|
||||
import { getEquipmentApplyListApi, equipmentDelApiNew } from 'http/api/usercenter/goodsmang'
|
||||
import EquipmentInput from './equipmentInput/index.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const total = ref(0)
|
||||
const orderIds = ref('')
|
||||
const isView = ref(false)
|
||||
const isEquipmentInputShow = ref(false)
|
||||
const queryParams = ref({
|
||||
keyWord: '',
|
||||
status: '0',
|
||||
applyTime: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
const tableData = ref([
|
||||
{
|
||||
applicant: '张三',
|
||||
applyTime: '2021-01-01',
|
||||
deviceCount: 10,
|
||||
status: '待审批',
|
||||
},
|
||||
{
|
||||
applicant: '李四',
|
||||
applyTime: '2021-01-02',
|
||||
deviceCount: 20,
|
||||
status: '已审批',
|
||||
},
|
||||
])
|
||||
const queryFormRef = ref<FormInstance>()
|
||||
|
||||
// 获取装备申请列表
|
||||
const getEquipmentApplyList = async () => {
|
||||
const res: any = await getEquipmentApplyListApi(queryParams.value)
|
||||
console.log('获取装备申请列表***', res)
|
||||
tableData.value = res.data.rows
|
||||
total.value = res.data.total
|
||||
}
|
||||
|
||||
const onHandleSQuery = () => {
|
||||
console.log('onHandleSQuery')
|
||||
getEquipmentApplyList()
|
||||
}
|
||||
const onHandleReset = () => {
|
||||
console.log('onHandleReset')
|
||||
}
|
||||
const onHandleEquipmentInput = () => {
|
||||
orderIds.value = ''
|
||||
isView.value = false
|
||||
isEquipmentInputShow.value = true
|
||||
}
|
||||
const onHandleBatchImport = () => {
|
||||
console.log('onHandleBatchImport')
|
||||
}
|
||||
const onHandleView = (row: any) => {
|
||||
console.log('onHandleView')
|
||||
orderIds.value = row.id
|
||||
isView.value = true
|
||||
isEquipmentInputShow.value = true
|
||||
}
|
||||
const onHandleAuditing = (row: any) => {
|
||||
orderIds.value = row.id
|
||||
isView.value = false
|
||||
isEquipmentInputShow.value = true
|
||||
console.log('onHandleEdit')
|
||||
}
|
||||
const onHandleDelete = (row: any) => {
|
||||
// console.log('onHandleDelete')
|
||||
ElMessageBox.confirm('是否确定删除?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
console.log('onHandleDelete')
|
||||
|
||||
equipmentDelApiNew({ id: row.id }).then((res: any) => {
|
||||
console.log('onHandleDelete', res)
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
duration: 1000,
|
||||
})
|
||||
getEquipmentApplyList()
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '删除失败',
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const onHandleBackList = () => {
|
||||
isEquipmentInputShow.value = false
|
||||
getEquipmentApplyList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getEquipmentApplyList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,225 @@
|
|||
<template>
|
||||
<template v-if="!isEquipmentInputShow">
|
||||
<el-form :model="queryParams" ref="queryFormRef" inline size="default" label-width="0">
|
||||
<!-- 表单搜索 -->
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入关键字"
|
||||
v-model.trim="queryParams.keyWord"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="status">
|
||||
<el-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请选择审批状态"
|
||||
v-model="queryParams.status"
|
||||
>
|
||||
<el-option label="待审批" value="1" />
|
||||
<el-option label="已审批" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="applyTime">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择申请时间"
|
||||
v-model="queryParams.applyTime"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item prop="code">
|
||||
<el-button class="primary-lease" type="primary" @click="onHandleSQuery()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button class="primary-lease" type="primary" @click="onHandleReset()">
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
@click="onHandleEquipmentInput()"
|
||||
>
|
||||
装备录入
|
||||
</el-button>
|
||||
<el-button
|
||||
class="primary-lease"
|
||||
type="primary"
|
||||
@click="onHandleBatchImport()"
|
||||
>
|
||||
批量导入
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableData">
|
||||
<el-table-column label="序号" align="center" width="55" type="index" />
|
||||
<el-table-column prop="createUser" label="申请人" align="center" />
|
||||
<el-table-column prop="createTime" label="申请时间" align="center" />
|
||||
<el-table-column prop="devCount" label="设备数量" align="center" />
|
||||
<el-table-column prop="status" align="center" label="审批状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status == 0" size="small" type="info">待审批</el-tag>
|
||||
<el-tag v-if="row.status == 1" size="small" type="warning">已完成</el-tag>
|
||||
<el-tag v-if="row.status == 3" size="small" type="success">草稿</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="onHandleView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="onHandleEdit(row)"
|
||||
v-if="row.status == 3"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="onHandleDelete(row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<!-- <el-pagination
|
||||
v-model:current-page="queryParams.pageNum"
|
||||
v-model:page-size="queryParams.pageSize"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:small="small"
|
||||
:disabled="disabled"
|
||||
:background="background"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
/> -->
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<EquipmentInput :orderIds="orderIds" :isView="isView" v-else @backList="onHandleBackList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox, FormInstance } from 'element-plus'
|
||||
import { getEquipmentApplyListApi, equipmentDelApiNew } from 'http/api/usercenter/goodsmang'
|
||||
import EquipmentInput from './equipmentInput/index.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const total = ref(0)
|
||||
const orderIds = ref('')
|
||||
const isView = ref(false)
|
||||
const isEquipmentInputShow = ref(false)
|
||||
const queryParams = ref({
|
||||
keyWord: '',
|
||||
status: '',
|
||||
applyTime: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
const tableData = ref([
|
||||
{
|
||||
applicant: '张三',
|
||||
applyTime: '2021-01-01',
|
||||
deviceCount: 10,
|
||||
status: '待审批',
|
||||
},
|
||||
{
|
||||
applicant: '李四',
|
||||
applyTime: '2021-01-02',
|
||||
deviceCount: 20,
|
||||
status: '已审批',
|
||||
},
|
||||
])
|
||||
const queryFormRef = ref<FormInstance>()
|
||||
|
||||
// 获取装备申请列表
|
||||
const getEquipmentApplyList = async () => {
|
||||
const res: any = await getEquipmentApplyListApi(queryParams.value)
|
||||
console.log('获取装备申请列表***', res)
|
||||
tableData.value = res.data.rows
|
||||
total.value = res.data.total
|
||||
}
|
||||
|
||||
const onHandleSQuery = () => {
|
||||
console.log('onHandleSQuery')
|
||||
getEquipmentApplyList()
|
||||
}
|
||||
const onHandleReset = () => {
|
||||
console.log('onHandleReset')
|
||||
}
|
||||
const onHandleEquipmentInput = () => {
|
||||
orderIds.value = ''
|
||||
isView.value = false
|
||||
isEquipmentInputShow.value = true
|
||||
}
|
||||
const onHandleBatchImport = () => {
|
||||
console.log('onHandleBatchImport')
|
||||
}
|
||||
const onHandleView = (row: any) => {
|
||||
console.log('onHandleView')
|
||||
orderIds.value = row.id
|
||||
isView.value = true
|
||||
isEquipmentInputShow.value = true
|
||||
}
|
||||
const onHandleEdit = (row: any) => {
|
||||
orderIds.value = row.id
|
||||
isView.value = false
|
||||
isEquipmentInputShow.value = true
|
||||
console.log('onHandleEdit')
|
||||
}
|
||||
const onHandleDelete = (row: any) => {
|
||||
// console.log('onHandleDelete')
|
||||
ElMessageBox.confirm('是否确定删除?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
console.log('onHandleDelete')
|
||||
|
||||
equipmentDelApiNew({ id: row.id }).then((res: any) => {
|
||||
console.log('onHandleDelete', res)
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
duration: 1000,
|
||||
})
|
||||
getEquipmentApplyList()
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '删除失败',
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const onHandleBackList = () => {
|
||||
isEquipmentInputShow.value = false
|
||||
getEquipmentApplyList()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getEquipmentApplyList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -55,14 +55,15 @@ interface MenuItem {
|
|||
// 按角色分组定义菜单---出租方
|
||||
const lessorMenus: MenuItem[] = [
|
||||
{ title: '装备管理', name: 'goodsManagement', permission: ['1'] },
|
||||
{ title: '装备审核', name: 'goodsAuditing', permission: ['1'] },
|
||||
{ title: '出租订单', name: 'orderManagementCz', permission: ['1'] },
|
||||
{ title: '接单管理', name: 'accept-orders', permission: ['1'] },
|
||||
{ title: '装备维保', name: 'quality-manage', permission: ['1'] },
|
||||
{ title: '合同管理', name: 'contract-manage', permission: ['1'] },
|
||||
/* { title: '自有装备管理', name: 'owned-manage', permission: ['1'] }, */
|
||||
{ title: '外租装备管理', name: 'rent-manage', permission: ['1'] },
|
||||
/* { title: '自有装备管理', name: 'owned-manage', permission: ['1'] }, */
|
||||
{ title: '外租装备管理', name: 'rent-manage', permission: ['1'] },
|
||||
{ title: '机械化施工装备配置率', name: 'rent-facility', permission: ['1'] },
|
||||
{ title: '后台管理', name: 'admin', permission: ['1'] },
|
||||
{ title: '后台管理', name: 'admin', permission: ['1'] },
|
||||
]
|
||||
// 按角色分组定义菜单---承租方
|
||||
const lesseeMenus: MenuItem[] = [
|
||||
|
|
|
|||
Loading…
Reference in New Issue