generated from Leo_Ding/web-template
1
This commit is contained in:
commit
e91f27049d
1
.env.dev
1
.env.dev
@ -13,6 +13,7 @@ VITE_ROUTER_HISTORY=hash
|
||||
|
||||
# api
|
||||
VITE_API_BASIC=https://jinshan.nantong.info
|
||||
# VITE_API_BASIC=http://10.10.1.6:8071
|
||||
VITE_API_HTTP=/api/v1/
|
||||
# storage
|
||||
VITE_STORAGE_NAMESPACE = gin-admin_local_
|
||||
@ -161,6 +161,7 @@ function handleOk() {
|
||||
maxSignupNum: parseInt(values.maxSignupNum) || 0,
|
||||
cover: formData.value.cover ? spliceUrl(formData.value.cover[0]) : '',
|
||||
images: formData.value.images ? formData.value.images.map(item => spliceUrl(item)) : [],
|
||||
signupNum: formData.value.signupNum || 0,
|
||||
status: 1
|
||||
}
|
||||
let result = null
|
||||
|
||||
@ -117,7 +117,9 @@ function handleOk() {
|
||||
const params = {
|
||||
...values,
|
||||
status:1,
|
||||
imgs:formData.value.imgs.length>0?formData.value.imgs.map(item=>spliceUrl(item)):[]
|
||||
imgs:formData.value.imgs.length>0?formData.value.imgs.map(item=>spliceUrl(item)):[],
|
||||
num:formData.value.num||0,
|
||||
roomType:formData.value.roomType||1,
|
||||
}
|
||||
let result = null
|
||||
switch (modal.value.type) {
|
||||
|
||||
@ -1,4 +1,28 @@
|
||||
<template>
|
||||
<x-search-bar class="mb-8-2">
|
||||
<template #default="{ gutter, colSpan }">
|
||||
<a-form :label-col="{ style: { width: '40px' } }" :model="searchFormData" layout="inline">
|
||||
<a-row :gutter="gutter">
|
||||
<a-col v-bind="colSpan">
|
||||
<a-form-item label="状态" name="status">
|
||||
<a-select v-model:value="searchFormData.applyType" allowClear>
|
||||
<a-select-option :value="1">个人申请</a-select-option>
|
||||
<a-select-option :value="2">企业申请</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col class="align-right" v-bind="colSpan">
|
||||
<a-space>
|
||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||
<a-button ghost type="primary" @click="handleSearch">
|
||||
{{ $t('button.search') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</x-search-bar>
|
||||
<a-row :gutter="8" :wrap="false">
|
||||
<a-col flex="auto">
|
||||
<a-card type="flex">
|
||||
@ -9,12 +33,20 @@
|
||||
<span>{{ dayjs(record.startAt).format('YYYY-MM-DD HH:mm:ss') + ' - ' +
|
||||
dayjs(record.endAt).format('YYYY-MM-DD HH:mm:ss') }}</span>
|
||||
</template>
|
||||
<template v-if="'roomType' === column.dataIndex">
|
||||
<span v-if="record.roomType === 1">个人</span>
|
||||
<span v-else-if="record.roomType === 2">企业</span>
|
||||
<span v-else>未知</span>
|
||||
<template v-if="'startTime' === column.dataIndex">
|
||||
<span>{{ record.startTime + ' - ' + record.endTime }}</span>
|
||||
</template>
|
||||
<template v-if="'applyTheme' === column.dataIndex">
|
||||
<template v-if="'applyType' === column.dataIndex">
|
||||
<span v-if="record.applyType === 1">个人申请</span>
|
||||
<span v-if="record.applyType === 2">企业申请</span>
|
||||
</template>
|
||||
<template v-if="'status' === column.dataIndex">
|
||||
<a-tag color="#87d068" v-if="record.status === 3">审核通过</a-tag>
|
||||
<a-tag color="#666666" v-if="record.status === 2">待审核</a-tag>
|
||||
<a-tag color="#f50" v-if="record.status === 99">审核不通过</a-tag>
|
||||
<!-- <a-tag color="#87d068" v-if="record.status === 3">审核通过</a-tag> -->
|
||||
</template>
|
||||
<template v-if="'applyTheme' === column.dataIndex">
|
||||
<span>{{ applyThemeMap[record.applyTheme] || '未知' }}</span>
|
||||
</template>
|
||||
|
||||
@ -24,25 +56,24 @@
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'rebackApplyPdf'">
|
||||
<a v-if="record.rebackApplyPdf" :href="config('http.apiBasic') + record.rebackApplyPdf"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
查看承诺报表
|
||||
rel="noopener noreferrer">
|
||||
查看承诺报表
|
||||
</a>
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'rebackCovenantPdf'">
|
||||
<a v-if="record.rebackCovenantPdf"
|
||||
:href="config('http.apiBasic') + record.rebackCovenantPdf" target="_blank"
|
||||
:href="config('http.apiBasic') + record.rebackCovenantPdf"
|
||||
rel="noopener noreferrer">
|
||||
查看申请报表
|
||||
查看申请报表
|
||||
</a>
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
<template v-if="'action' === column.key">
|
||||
<x-action-button @click="auditHandleEdit(record)" v-if="record.status === 1">
|
||||
<x-action-button @click="auditHandleEdit(record)" v-if="record.status === 2">
|
||||
<a-tooltip>
|
||||
<template #title>下载</template>
|
||||
<DownloadOutlined />
|
||||
<!-- <i class='iconfont icon-shenhe' style='font-size:14px;color:#faad14'></i> -->
|
||||
<template #title>审核</template>
|
||||
<i class='iconfont icon-shenhe' style='font-size:14px;color:#faad14'></i>
|
||||
</a-tooltip>
|
||||
</x-action-button>
|
||||
</template>
|
||||
@ -56,7 +87,7 @@
|
||||
<a-card class="mb-8-2">
|
||||
<a-form-item :label="'审核'" name="">
|
||||
<a-radio-group v-model:value="auditStatus"
|
||||
:options="[{ value: 2, label: '通过' }, { value: 99, label: '驳回' }]"></a-radio-group>
|
||||
:options="[{ value: 3, label: '通过' }, { value: 99, label: '驳回' }]"></a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item :label="'备注'" name="">
|
||||
<a-textarea v-model:value="remark"></a-textarea>
|
||||
@ -82,34 +113,38 @@ defineOptions({
|
||||
})
|
||||
const { t } = useI18n() // 解构出t方法
|
||||
const columns = [
|
||||
{ title: '会议室名称', dataIndex: 'roomName' },
|
||||
{ title: '负责人', dataIndex: 'concatName' },
|
||||
{ title: '负责人手机号', dataIndex: 'concatPhone' },
|
||||
{ title: '申请类型', dataIndex: 'roomType' },
|
||||
{ title: '申请主题', dataIndex: 'applyTheme' },
|
||||
{ title: '申请人', dataIndex: 'userName' },
|
||||
{ title: '申请人手机号', dataIndex: 'userPhone' },
|
||||
{ title: '申请人身份证', dataIndex: 'userCardId', width: 120 },
|
||||
{ title: '会议室', dataIndex: 'roomName' },
|
||||
{ title: '申请状态', dataIndex: 'status' },
|
||||
// { title: '负责人', dataIndex: 'concatName' },
|
||||
// { title: '负责人手机号', dataIndex: 'concatPhone' },
|
||||
{ title: '申请类型', dataIndex: 'applyType', width: 100 },
|
||||
{ title: '申请主题', dataIndex: 'applyTheme', width: 100 },
|
||||
{ title: '申请人', dataIndex: 'userName', width: 100 },
|
||||
// { title: '申请人手机号', dataIndex: 'userPhone' },
|
||||
// { title: '申请人身份证', dataIndex: 'userCardId', width: 120 },
|
||||
{ title: '申请人地址', dataIndex: 'userAddress' },
|
||||
{ title: '公司名字', dataIndex: 'companyName' },
|
||||
// { title: '公司名字', dataIndex: 'companyName' },
|
||||
{ title: '申请理由', dataIndex: 'reason' },
|
||||
{ title: '场次', dataIndex: 'counter' },
|
||||
{ title: '人数', dataIndex: 'num' },
|
||||
{ title: '开始时间', dataIndex: 'startTime' },
|
||||
{ title: '结束时间', dataIndex: 'endTime' },
|
||||
{ title: '预约时间', dataIndex: 'startTime' },
|
||||
// { title: '结束时间', dataIndex: 'endTime' },
|
||||
{ title: '申请签名', dataIndex: 'applySign' },
|
||||
{ title: '备注', dataIndex: 'remark' },
|
||||
{ title: '回执申请报表', dataIndex: 'rebackCovenantPdf' },
|
||||
{ title: '回执承诺报表', dataIndex: 'rebackApplyPdf' },
|
||||
// { title: t('button.action'), key: 'action', fixed: 'right', width: 100, align: 'center' },
|
||||
// { title: '备注', dataIndex: 'remark' },
|
||||
{ title: '申请报表', dataIndex: 'rebackCovenantPdf' },
|
||||
{ title: '承诺报表', dataIndex: 'rebackApplyPdf' },
|
||||
{ title: t('button.action'), key: 'action', fixed: 'right', width: 80, align: 'center' },
|
||||
]
|
||||
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
|
||||
searchFormData.value = {
|
||||
applyType: 1,
|
||||
}
|
||||
const remark = ref('')
|
||||
const currentInfo = ref({})
|
||||
const auditStatus = ref(2)
|
||||
const auditStatus = ref(3)
|
||||
const editDialogRef = ref()
|
||||
const open = ref(false)
|
||||
const imgOpen = ref(false)
|
||||
const currentForm = ref({})
|
||||
const applyThemeMap = {
|
||||
1: '开会',
|
||||
2: '学术报告',
|
||||
@ -127,6 +162,7 @@ async function getPageList() {
|
||||
const { pageSize, current } = paginationState
|
||||
const { success, data, total } = await apis.mettingYuYue
|
||||
.getDataList({
|
||||
applyType: searchFormData.value.applyType,
|
||||
pageSize,
|
||||
current: current,
|
||||
})
|
||||
@ -145,13 +181,9 @@ async function getPageList() {
|
||||
hideLoading()
|
||||
}
|
||||
}
|
||||
const auditHandleEdit = (obj = {}, type) => {
|
||||
currentInfo.value = obj
|
||||
if (type === 'audit') {
|
||||
open.value = true
|
||||
} else {
|
||||
imgOpen.value = true
|
||||
}
|
||||
const auditHandleEdit = (obj = {}) => {
|
||||
currentForm.value = obj
|
||||
open.value = true
|
||||
|
||||
}
|
||||
const handleClick = async () => {
|
||||
@ -181,9 +213,10 @@ const handleAuditEdit = async () => {
|
||||
const params = {
|
||||
...currentForm.value,
|
||||
status: auditStatus.value,
|
||||
remark: remark.value
|
||||
remark: remark.value,
|
||||
// num: currentForm.value.num || 0,
|
||||
}
|
||||
const result = await apis.mettingRoom.updateMenu(currentForm.value.id, params).catch(() => {
|
||||
const result = await apis.mettingYuYue.updateMenu(currentForm.value.id, params).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === result?.success) {
|
||||
|
||||
@ -22,7 +22,13 @@
|
||||
<i class='iconfont icon-shenhe' style='font-size:14px;color:#faad14'></i>
|
||||
</a-tooltip>
|
||||
</x-action-button>
|
||||
<x-action-button @click="handleDelete(record)" v-if="record.status!==98">
|
||||
<x-action-button @click="auditHandleFinish(record)" v-if="record.status === 2">
|
||||
<a-tooltip>
|
||||
<template #title> {{ '完成' }}</template>
|
||||
<CheckCircleOutlined />
|
||||
</a-tooltip>
|
||||
</x-action-button>
|
||||
<x-action-button @click="handleDelete(record)" v-if="record.status !== 98">
|
||||
<a-tooltip>
|
||||
<template #title>撤销</template>
|
||||
<delete-outlined style="color: #ff4d4f" /> </a-tooltip></x-action-button>
|
||||
@ -80,7 +86,7 @@ import apis from '@/apis'
|
||||
import { config } from '@/config'
|
||||
import { usePagination } from '@/hooks'
|
||||
import EditDialog from './components/EditDialog.vue'
|
||||
import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
||||
import { PlusOutlined, CheckCircleOutlined, DeleteOutlined } from '@ant-design/icons-vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { orderStatus } from '@/enums/index.js'
|
||||
import dayjs from 'dayjs'
|
||||
@ -109,7 +115,7 @@ const currentInfo = ref({})
|
||||
const auditStatus = ref(2)
|
||||
const editDialogRef = ref()
|
||||
const open = ref(false)
|
||||
const imgOpen=ref(false)
|
||||
const imgOpen = ref(false)
|
||||
getPageList()
|
||||
/**
|
||||
* 获取用户列表
|
||||
@ -160,7 +166,7 @@ const handleClick = async () => {
|
||||
})
|
||||
if (config('http.code.success') === result?.success) {
|
||||
message.success('已审核')
|
||||
open.value=false
|
||||
open.value = false
|
||||
getPageList()
|
||||
}
|
||||
} catch (error) {
|
||||
@ -168,6 +174,36 @@ const handleClick = async () => {
|
||||
hideLoading()
|
||||
}
|
||||
}
|
||||
function auditHandleFinish(params){
|
||||
Modal.confirm({
|
||||
title: '确定完成该工单吗',
|
||||
content: t('button.confirm'),
|
||||
okText: t('button.confirm'),
|
||||
onOk: () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
; (async () => {
|
||||
try {
|
||||
const updateParams = {
|
||||
...params,
|
||||
status: 3
|
||||
}
|
||||
console.log(updateParams)
|
||||
const { success } = await apis.orderList.updateMenu(params.id, updateParams).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
resolve()
|
||||
message.success('操作成功')
|
||||
await getPageList()
|
||||
}
|
||||
} catch (error) {
|
||||
reject()
|
||||
}
|
||||
})()
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ -180,12 +216,12 @@ function handleDelete(value) {
|
||||
return new Promise((resolve, reject) => {
|
||||
; (async () => {
|
||||
try {
|
||||
const params={
|
||||
const params = {
|
||||
...value,
|
||||
status:98
|
||||
status: 98
|
||||
}
|
||||
console.log(params)
|
||||
const { success } = await apis.orderList.updateMenu(value.id, params).catch(() => {
|
||||
const { success } = await apis.orderList.updateMenu(value.id, params).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user