|
@@ -0,0 +1,324 @@
|
|
|
+<script setup>
|
|
|
+import { closeToast, showLoadingToast, showToast } from 'vant'
|
|
|
+import { userInfo } from '~/store/user'
|
|
|
+const { user_realname, user_id } = userInfo
|
|
|
+const { currentRoute } = useRouter()
|
|
|
+const route = currentRoute.value
|
|
|
+const xm_id = route.query.xm_id
|
|
|
+const detailData = ref({})
|
|
|
+
|
|
|
+let show = $ref(false);//遮罩层
|
|
|
+let auditShow = $ref(false);
|
|
|
+let auditedShow = $ref(false);
|
|
|
+let auditedData = $ref({});//已审核信息
|
|
|
+let auditCheck = $ref();
|
|
|
+let rejectMsg = $ref('');
|
|
|
+showLoadingToast({
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true,
|
|
|
+})
|
|
|
+function initData() {
|
|
|
+ request({
|
|
|
+ url: '/jdbg/sbcg_cgxm/detail',
|
|
|
+ data: {
|
|
|
+ xm_id,
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ closeToast()
|
|
|
+ detailData.value = res.data.one_info;
|
|
|
+ res.data.one_info.shjl.forEach(item => {
|
|
|
+ if (item.sh_user_id == user_id) {
|
|
|
+ auditedData = item;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+initData();
|
|
|
+
|
|
|
+let sh_id = $ref('');
|
|
|
+function handleAudit() {
|
|
|
+ auditShow = true;
|
|
|
+ sh_id = detailData.value.xm_id;
|
|
|
+ console.log(sh_id, '222222222');
|
|
|
+}
|
|
|
+
|
|
|
+function onBeforeClose(action) {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ auditConfirm();
|
|
|
+ } else {
|
|
|
+ auditShow = false;
|
|
|
+ }
|
|
|
+}
|
|
|
+function auditConfirm() {
|
|
|
+ if (!auditCheck) {
|
|
|
+ showToast("请选择是否通过~");
|
|
|
+ } else {
|
|
|
+ if (auditCheck == "3" && rejectMsg == "") {
|
|
|
+ return showToast("请填写反驳原因");
|
|
|
+ }
|
|
|
+ request({
|
|
|
+ url: '/jdbg/sbcg_cgxm/check',
|
|
|
+ data: {
|
|
|
+ sh_id,
|
|
|
+ sh_status: auditCheck,
|
|
|
+ sh_reason: rejectMsg,
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == '1') {
|
|
|
+ showToast(res.msg);
|
|
|
+ initData();
|
|
|
+ auditShow = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+function handleAudited() {
|
|
|
+ auditedShow = true;
|
|
|
+ show = true;
|
|
|
+ console.log(user_id,'2222222222222');
|
|
|
+ detailData.value.shjl.forEach(el => {
|
|
|
+ console.log(el,'11111111');
|
|
|
+ if (el.sh_user_id === user_id) {
|
|
|
+ auditedData = el;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // request({
|
|
|
+ // url: '/jdbg/sbcg_cgxm/detail',
|
|
|
+ // data: {
|
|
|
+ // xm_id: detailData.value.xm_id,
|
|
|
+ // }
|
|
|
+ // }).then(res => {
|
|
|
+ // if (res.code == '1') {
|
|
|
+ // res.data.one_info.shjl.forEach(el => {
|
|
|
+ // if (el.sh_user_id === user_id) {
|
|
|
+ // auditedData = el;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
+}
|
|
|
+function cancel() {
|
|
|
+ auditedShow = false;
|
|
|
+ show = false;
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="tableContainer">
|
|
|
+ <div class="topPart">
|
|
|
+ <table class="Tb" width="100%" cellspacing="0" cellpadding="0">
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 申请科室
|
|
|
+ </td>
|
|
|
+ <td>{{ detailData.department_name }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 申请人
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ {{ detailData.xm_user_name }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 项目名称
|
|
|
+ </td>
|
|
|
+ <td>{{ detailData.xm_name }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 采购的主要理由及依据
|
|
|
+ </td>
|
|
|
+ <td>{{ detailData.xm_lyyj }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 采购类型
|
|
|
+ </td>
|
|
|
+ <td>{{ detailData.lb_name }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 采购金额
|
|
|
+ </td>
|
|
|
+ <td>{{ detailData.xm_price }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 采购清单
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div v-html="detailData.xm_qd"></div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 审核人
|
|
|
+ </td>
|
|
|
+ <td v-if="detailData.xm_shlc">
|
|
|
+ <div v-for="item in JSON.parse(detailData.xm_shlc)">
|
|
|
+ {{ item.user_name }}
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="titleOpt">
|
|
|
+ 状态
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="flex items-center py-5px justify-between pr-10px">
|
|
|
+ <div>
|
|
|
+ <span v-if="detailData.xm_status === '4' || detailData.xm_status === '5'"
|
|
|
+ :class="{ 'text-red': detailData.xm_status === '4' }">{{
|
|
|
+ detailData.xm_status_option_n
|
|
|
+ }}</span>
|
|
|
+ <span
|
|
|
+ v-else-if="detailData.xm_status !== '4' && detailData.xm_status !== '5' && detailData.is_check === 1">已审核</span>
|
|
|
+ <span
|
|
|
+ v-else-if="detailData.xm_status !== '4' && detailData.xm_status !== '5' && detailData.is_check === 0">待审核</span>
|
|
|
+ </div>
|
|
|
+ <van-button class="w-60px"
|
|
|
+ v-if="(detailData.xm_status == 3 && detailData.is_check === 0) || (detailData.xm_status == 2 && detailData.is_check === 0)"
|
|
|
+ type="primary" size="small" @click="handleAudit()">审核</van-button>
|
|
|
+ <van-button class="w-60px bg-hex-BDBDBD border-hex-BDBDBD audited" plain
|
|
|
+ v-else-if="detailData.xm_status == 3 && detailData.is_check == 1" type="primary"
|
|
|
+ size="small" @click="handleAudited()">已审核</van-button>
|
|
|
+ <van-button class="w-60px bg-hex-BDBDBD border-hex-BDBDBD audited" plain
|
|
|
+ v-else-if="detailData.xm_status == 5" type="primary" size="small"
|
|
|
+ @click="handleAudited()">已通过</van-button>
|
|
|
+ <van-button class="w-60px bg-hex-BDBDBD border-hex-BDBDBD un_audited" plain
|
|
|
+ v-else-if="detailData.xm_status == 5 || detailData.xm_status == 4" type="primary"
|
|
|
+ size="small" @click="handleAudited()">已退回</van-button>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <van-overlay :show="show" />
|
|
|
+ <!-- 审核弹窗 -->
|
|
|
+ <van-dialog v-model:show="auditShow" title="审核" show-cancel-button class="pl-30px" :before-close="onBeforeClose">
|
|
|
+ <van-radio-group v-model="auditCheck">
|
|
|
+ <van-radio name="2">通过</van-radio>
|
|
|
+ <van-radio name="3">不通过</van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ <textarea class="textarea" v-if="auditCheck == 3" v-model="rejectMsg" rows="4" placeholder="填写不通过原因"></textarea>
|
|
|
+ </van-dialog>
|
|
|
+ <!-- 已审核弹窗 -->
|
|
|
+ <div class="plan-nav reject-nav" v-show="auditedShow">
|
|
|
+ <van-icon class="cha" @click="cancel" name="cross" size="5vw"></van-icon>
|
|
|
+ <h3>查看详情</h3>
|
|
|
+ <p class="text_blue">{{ auditedData.sh_status === '2' ? '通过' : '不通过' }}</p>
|
|
|
+ <p class="text-gray-500 mt-10px" v-if="auditedData.sh_reason">{{ auditedData.sh_reason }}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.titleOpt {
|
|
|
+ width: 45%;
|
|
|
+}
|
|
|
+
|
|
|
+.border_bottom {
|
|
|
+ border-bottom: 2px solid #666;
|
|
|
+ border-top: 2px solid #666;
|
|
|
+}
|
|
|
+
|
|
|
+.text-red {
|
|
|
+ color: red;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.specialTd table tbody tr td) {
|
|
|
+ border: 1px #CCCCCC solid !important;
|
|
|
+}
|
|
|
+
|
|
|
+.textarea {
|
|
|
+ width: 90%;
|
|
|
+ /* height: 15vw; */
|
|
|
+ margin: 0 auto;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ border-radius: 10px;
|
|
|
+ padding-left: 2px;
|
|
|
+ background: #f2f2f2;
|
|
|
+}
|
|
|
+
|
|
|
+.van-radio-group {
|
|
|
+ margin: 20px auto;
|
|
|
+
|
|
|
+ .van-radio {
|
|
|
+ margin: 20px auto;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.text_blue {
|
|
|
+ color: #003EEE;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .audited {
|
|
|
+ .van-button__text {
|
|
|
+ color: #fff !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .un_audited {
|
|
|
+ color: red;
|
|
|
+}
|
|
|
+
|
|
|
+.plan-nav {
|
|
|
+ width: 80vw;
|
|
|
+ height: 70vw;
|
|
|
+ color: #333333;
|
|
|
+ background-color: #fff;
|
|
|
+ position: fixed;
|
|
|
+ top: 35vw;
|
|
|
+ left: 10vw;
|
|
|
+ border-radius: 2vw;
|
|
|
+ z-index: 5;
|
|
|
+ padding: 0 5vw;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.cha {
|
|
|
+ display: block;
|
|
|
+ font-size: 20px;
|
|
|
+ position: absolute;
|
|
|
+ right: 5vw;
|
|
|
+ top: 5vw;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+h3 {
|
|
|
+ display: block;
|
|
|
+ width: 12vw;
|
|
|
+ height: 10vw;
|
|
|
+ font-size: 5vw;
|
|
|
+ font-weight: 400;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+h3::before {
|
|
|
+ position: absolute;
|
|
|
+ content: "";
|
|
|
+ width: 100%;
|
|
|
+ height: 2vw;
|
|
|
+ bottom: 3.3vw;
|
|
|
+ left: 0;
|
|
|
+ border-radius: 10vw;
|
|
|
+ background-color: #c5c5ff;
|
|
|
+ opacity: 0.6;
|
|
|
+}
|
|
|
+
|
|
|
+.reject-nav {
|
|
|
+ padding: 20px;
|
|
|
+
|
|
|
+ h3 {
|
|
|
+ width: 25vw;
|
|
|
+ font-size: 4.4vw;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|