|
|
@@ -2,7 +2,7 @@
|
|
|
* @Author: wanglj wanglijie@dashoo.cn
|
|
|
* @Date: 2025-03-29 14:15:09
|
|
|
* @LastEditors: wanglj wanglijie@dashoo.cn
|
|
|
- * @LastEditTime: 2025-03-29 14:51:56
|
|
|
+ * @LastEditTime: 2025-04-16 15:25:17
|
|
|
* @FilePath: \labsop_h5\src\view\entry\detail.vue
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
-->
|
|
|
@@ -99,8 +99,69 @@
|
|
|
<h4>审批记录</h4>
|
|
|
<FlowTable :id="state.form.id" :businessCode="`${state.form.id}`" defCode="plat_platform_appoint" />
|
|
|
</div>
|
|
|
+ <div class="card" v-if="state.form.appointStatus === '20'">
|
|
|
+ <van-form class="mb20" ref="formRef" required="auto">
|
|
|
+ <van-cell-group>
|
|
|
+ <van-field
|
|
|
+ v-model="state.auditForm.approveDesc"
|
|
|
+ label="审批意见"
|
|
|
+ placeholder="请输入审批意见"
|
|
|
+ :rules="[{ required: true, message: '请输入审批意见' }]"
|
|
|
+ rows="3"
|
|
|
+ type="textarea"
|
|
|
+ />
|
|
|
+ <van-field
|
|
|
+ v-model="state.auditForm.approveResult"
|
|
|
+ label="审批结果"
|
|
|
+ placeholder="请选择审批结果"
|
|
|
+ :rules="[{ required: true, message: '请选择审批结果' }]"
|
|
|
+ >
|
|
|
+ <template #input>
|
|
|
+ <van-radio-group v-model="state.auditForm.approveResult" direction="horizontal">
|
|
|
+ <van-radio name="10">通过</van-radio>
|
|
|
+ <van-radio name="20">不通过</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ </van-cell-group>
|
|
|
+ </van-form>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <van-action-bar v-if="state.form.appointStatus === '10'" placeholder>
|
|
|
+ <van-action-bar-icon icon="wap-home-o" text="首页" @click="onRouterPush('/home')" />
|
|
|
+ <van-action-bar-icon icon="send-gift-o" text="入室申请" @click="onRouterPush('/entry')" />
|
|
|
+ <van-action-bar-button class="w100" type="primary" text="上传缴费单" @click="openUpload()" />
|
|
|
+ </van-action-bar>
|
|
|
+ <van-action-bar v-else-if="state.form.appointStatus === '20'" placeholder>
|
|
|
+ <van-action-bar-icon icon="wap-home-o" text="首页" @click="onRouterPush('/home')" />
|
|
|
+ <van-action-bar-icon icon="send-gift-o" text="入室申请" @click="onRouterPush('/entry')" />
|
|
|
+ <van-action-bar-button class="w100" type="primary" text="审核" @click="onAudit()" />
|
|
|
+ </van-action-bar>
|
|
|
</div>
|
|
|
+ <van-popup v-model:show="showBottom" round closeable position="bottom" :style="{ height: '90vh' }">
|
|
|
+ <template #default>
|
|
|
+ <div class="upload-container">
|
|
|
+ <div class="content">
|
|
|
+ <h4>上传须知</h4>
|
|
|
+ <p>
|
|
|
+ 根据遵义医科大学附属医院临床医学公共实验中心要求,申请入室人员需要上传缴费单:通过审批后,点击缴费单按钮下载缴费单模板,打印并带到财务处完成缴费和确认后经财务盖章,将盖章的单据拍照上传。
|
|
|
+ </p>
|
|
|
+ <h4>信息上传</h4>
|
|
|
+ <div class="file-card">
|
|
|
+ <h4>缴费单</h4>
|
|
|
+ <van-uploader v-model="state.uploadForm.billList" :after-read="afterRead" preview-size="60" :preview-full-image="false" :max-count="1" />
|
|
|
+ </div>
|
|
|
+ <div class="file-card">
|
|
|
+ <h4>其它附件</h4>
|
|
|
+ <van-uploader v-model="state.uploadForm.fileList" :after-read="afterRead" preview-size="60" :preview-full-image="false" multiple />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <footer>
|
|
|
+ <van-button type="primary" class="w100" round @click="onSubmit">提交</van-button>
|
|
|
+ </footer>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </van-popup>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
@@ -112,6 +173,8 @@
|
|
|
import { getDictLabel } from '/@/utils/other'
|
|
|
import { usePlatformAppointApi } from '/@/api/platform/appoint'
|
|
|
import { useFlowApi } from '/@/api/execution/flow'
|
|
|
+ import { handleUpload } from '/@/utils/upload'
|
|
|
+ import { showNotify } from 'vant'
|
|
|
const FlowTable = defineAsyncComponent(() => import('/@/components/FlowTable.vue'))
|
|
|
const platformAppointApi = usePlatformAppointApi()
|
|
|
const flowApi = useFlowApi()
|
|
|
@@ -120,6 +183,8 @@
|
|
|
const dictApi = useDictApi()
|
|
|
const apprList = ref<any[]>([])
|
|
|
const userTypeList = ref(<RowDicDataType[]>[])
|
|
|
+ const showBottom = ref(false)
|
|
|
+ const formRef = ref()
|
|
|
const state = reactive({
|
|
|
detailsLoading: false,
|
|
|
form: {
|
|
|
@@ -150,7 +215,18 @@
|
|
|
molecularTime: null,
|
|
|
platOtherNeed: '',
|
|
|
createdName: '',
|
|
|
- createdTime: ''
|
|
|
+ createdTime: '',
|
|
|
+ approveStatus: '',
|
|
|
+ appointStatus: ''
|
|
|
+ },
|
|
|
+ uploadForm: {
|
|
|
+ billList: [] as any[],
|
|
|
+ fileList: [] as any[]
|
|
|
+ },
|
|
|
+ auditForm: {
|
|
|
+ id: 0,
|
|
|
+ approveResult: '',
|
|
|
+ approveDesc: ''
|
|
|
},
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
@@ -173,6 +249,74 @@
|
|
|
state.form = res.data
|
|
|
}
|
|
|
}
|
|
|
+ const onRouterPush = (val: string) => {
|
|
|
+ router.push(val)
|
|
|
+ }
|
|
|
+ const openUpload = () => {
|
|
|
+ showBottom.value = true
|
|
|
+ }
|
|
|
+ const afterRead = async (files: any) => {
|
|
|
+ if (files.length) {
|
|
|
+ for (const file of files) {
|
|
|
+ file.status = 'uploading'
|
|
|
+ const [err, res]: ToResponse = await to(handleUpload(file.file))
|
|
|
+ if (err) {
|
|
|
+ file.status = 'failed'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ file.status = 'success'
|
|
|
+ file.url = res
|
|
|
+ file.name = file.file.name
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const file = files
|
|
|
+ file.status = 'uploading'
|
|
|
+ const [err, res]: ToResponse = await to(handleUpload(file.file))
|
|
|
+ if (err) {
|
|
|
+ file.status = 'failed'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ file.status = 'success'
|
|
|
+ file.url = res
|
|
|
+ file.name = file.file.name
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 提交
|
|
|
+ const onSubmit = async () => {
|
|
|
+ const params = JSON.parse(JSON.stringify(state.uploadForm))
|
|
|
+ params.fileList = [...params.billList, ...params.fileList].map((item) => {
|
|
|
+ return {
|
|
|
+ fileName: item.name,
|
|
|
+ fileUrl: item.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ delete params.billList
|
|
|
+ params.appointId = state.form.id
|
|
|
+ const [err]: ToResponse = await to(platformAppointApi.createFile(params))
|
|
|
+ if (err) return
|
|
|
+ showNotify({
|
|
|
+ type: 'success',
|
|
|
+ message: '操作成功'
|
|
|
+ })
|
|
|
+ router.push({
|
|
|
+ path: '/entry'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const onAudit = async () => {
|
|
|
+ const [errValid] = await to(formRef.value.validate())
|
|
|
+ if (errValid) return
|
|
|
+ const params = JSON.parse(JSON.stringify(state.auditForm))
|
|
|
+ params.id = state.form.id
|
|
|
+ const [err]: ToResponse = await to(platformAppointApi.updateById(params))
|
|
|
+ if (err) return
|
|
|
+ showNotify({
|
|
|
+ type: 'success',
|
|
|
+ message: '操作成功'
|
|
|
+ })
|
|
|
+ router.push({
|
|
|
+ path: '/entry'
|
|
|
+ })
|
|
|
+ }
|
|
|
onMounted(() => {
|
|
|
const id = route.query.id ? +route.query.id : 0
|
|
|
getDicts()
|
|
|
@@ -366,4 +510,37 @@
|
|
|
border-top: 1px solid #f7f8fa;
|
|
|
}
|
|
|
}
|
|
|
+ .upload-container {
|
|
|
+ height: calc(100% - 40px);
|
|
|
+ padding: 20px 10px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ .content {
|
|
|
+ flex: 1;
|
|
|
+ overflow-y: auto;
|
|
|
+ > h4 {
|
|
|
+ height: 18px;
|
|
|
+ line-height: 18px;
|
|
|
+ margin: 10px 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ &::before {
|
|
|
+ display: inline-block;
|
|
|
+ content: '';
|
|
|
+ width: 3px;
|
|
|
+ height: 18px;
|
|
|
+ background-color: #1c9bfd;
|
|
|
+ margin-right: 4px;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .file-card {
|
|
|
+ background: #fff;
|
|
|
+ h4 {
|
|
|
+ margin-bottom: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|