qa-regulatory-gwj-app/pages/super-hot/safety-director/detail.vue

408 lines
15 KiB
Vue
Raw Normal View History

2023-11-07 10:08:37 +08:00
<template>
<view class="content p-10">
<view class="card">
<view class="view-title">
<u--text text="特级动火申请" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">申请人</view>
<view slot="value">{{ form.APPLY_USER_NAME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">申请时间</view>
<view slot="value">{{ form.APPLICATION_DATE }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">作业证编号</view>
<view slot="value">{{ form.JOB_NUMBER }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">作业类型</view>
<view slot="value">{{ form.JOB_TYPE_NAME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">动火许可证</view>
<view slot="value">
<u-button type="primary" text="查看" size="mini" @click="fnNavigator"></u-button>
</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card">
<view class="view-title">
<u--text text="动火单位作业负责人确认" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">动火单位作业负责人</view>
<view slot="value">{{ form.projectCompetent_USER_NAME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">确认时间</view>
<view slot="value">{{ form.projectCompetent_OPERATTIME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">是否确认通过</view>
<view slot="value">{{ form.projectCompetent_TYPE == '2' ? '通过' : '不通过' }}</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card">
<view class="view-title">
<u--text text="项目主管人员初审" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">项目主管人员</view>
<view slot="value">{{ form.projectPreliminarily_USER_NAME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">初审时间</view>
<view slot="value">{{ form.projectPreliminarily_OPERATTIME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">初审结果</view>
<view slot="value">{{ form.projectPreliminarily_TYPE == '2' ? '通过' : '不通过' }}</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card">
<view class="view-title">
<u--text text="项目主管部门负责人审批" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">初审结果</view>
<view slot="value">{{ form.projectPreliminarily_TYPE == '2' ? '通过' : '不通过' }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签字</view>
<view slot="label" class="mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + form.projectPreliminarily_PRINCIPAL"
width="70" height="70" mode="scaleToFill" @click="previewImage"></u--image>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签字时间</view>
<view slot="value">{{ form.projectPreliminarily_OPERATTIME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传会签文件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in meetingImgList" :key="index">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill" @click="previewImage"></u--image>
</u-col>
</u-row>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in appendixImgList" :key="index">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill" @click="previewImage"></u--image>
</u-col>
</u-row>
</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card">
<view class="view-title">
<u--text text="分公司安全总监审批" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">审批结果</view>
<view slot="value">{{ form.inspectorGeneral_TYPE == '2' ? '通过' : '不通过' }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签字</view>
<view slot="label" class="mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + form.inspectorGeneral_PRINCIPAL" width="70"
height="70" mode="scaleToFill" @click="previewImage"></u--image>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签字时间</view>
<view slot="value">{{ form.inspectorGeneral_OPERATTIME }}</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card">
<view class="view-title">
<u--text text="分公司主要负责人签批" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">签批结果</view>
<view slot="value">{{ form.supervision_TYPE == '2' ? '通过' : '不通过' }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签字</view>
<view slot="label" class="mt-10">
<u--image :showLoading="true" :src="$store.state.filePath + form.supervision_PRINCIPAL" width="70"
height="70" mode="scaleToFill"
@click="previewImage($store.state.filePath + form.supervision_PRINCIPAL)"></u--image>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签字时间</view>
<view slot="value">{{ form.supervision_OPERATTIME }}</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card">
<view class="view-title">
<u--text text="(港股)安全监督部初审" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">初审结果</view>
<view slot="value">{{ form.committee_TYPE == '2' ? '通过' : '不通过' }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">初审人员</view>
<view slot="value">{{ form.committee_USER_NAME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">初审时间</view>
<view slot="value">{{ form.committee_OPERATTIME }}</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card">
<view class="view-title">
<u--text text="(港股)安委会办公室审批" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">审核结果</view>
<view slot="value">{{ form.safetyDirector_TYPE == '2' ? '通过' : '不通过' }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传会议纪要</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in fileList" :key="index">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,fileList)"></u--image>
</u-col>
</u-row>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
<u-row>
<u-col span="3" v-for="(item,index) in fileList1" :key="index">
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,fileList1)"></u--image>
</u-col>
</u-row>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">港股安委会办公室审批</view>
<view slot="value">{{ form.safetyDirector_USER_NAME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">时间</view>
<view slot="value">{{ form.safetyDirector_OPERATTIME }}</view>
</u-cell>
</u-cell-group>
</view>
2023-11-07 10:08:37 +08:00
</view>
<view class="card" v-if="type==2">
<view class="view-title">
<u--text text="(港股安委办主任)安全总监签发" bold></u--text>
</view>
2024-10-10 10:14:31 +08:00
<view class="mt-10">
<u-cell-group :border="false">
<u-cell>
<view slot="title" class="title">签批结果</view>
<view slot="value">
<u-radio-group v-model="form.TYPE" placement="row">
<u-radio label="同意" name="2"></u-radio>
<!-- <u-radio label="不同意" name="1" class="ml-10"></u-radio> -->
</u-radio-group>
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签批人</view>
<view slot="value">{{ userInfo.NAME }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title">签批时间</view>
<view slot="value">{{ $u.timeFormat(new Date(), 'yyyy年mm月dd日 hh时MM分ss秒') }}</view>
</u-cell>
<u-cell>
<view slot="title" class="title" @click="signShow = true">签字</view>
<view slot="value">
<u-button type="primary" text="手写添加" size="mini" class="bth-mini" @click="signShow = true"></u-button>
<sign v-if="signShow" :signShow.sync="signShow" @confirm="signConfirm"></sign>
</view>
</u-cell>
<u-cell v-if="form.safetyDirectorSign">
<view slot="title" class="title"></view>
<view slot="label">
<u--image v-show="form.safetyDirectorSign" :showLoading="true" :src="form.safetyDirectorSign"
width="200px" height="80px" mode="scaleToFill"
@click="previewImage(form.safetyDirectorSign)"></u--image>
</view>
</u-cell>
</u-cell-group>
</view>
</view>
<view class="mt-10" v-if="type==2">
<u-button type="primary" text="提交"
@click="$u.debounce(submit, 1000,true)"></u-button>
2023-11-07 10:08:37 +08:00
</view>
</view>
</template>
<script>
2024-10-10 10:14:31 +08:00
import {
approveHotWorkSupervisionAndFfile,
getDept,
getDeptUser,
getHotWorkGoEdit,
getImgfilesListByKeyAndType
} from "../../../api";
import sign from "../../../components/sign/sign";
2023-11-07 10:08:37 +08:00
export default {
components: {
sign,
},
data() {
return {
2024-10-10 10:14:31 +08:00
signShow: false,
form: {TYPE: '2'},
2023-11-07 10:08:37 +08:00
HOTWORKAPPLICATION_ID: '',
meetingImgList: [],
appendixImgList: [],
2024-10-10 10:14:31 +08:00
fileList: [],
fileList1: [],
type: 1
2023-11-07 10:08:37 +08:00
}
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
onLoad(event) {
2024-10-10 10:14:31 +08:00
this.type = event.type
2023-11-07 10:08:37 +08:00
this.HOTWORKAPPLICATION_ID = event.HOTWORKAPPLICATION_ID
this.getDate()
2024-10-10 10:14:31 +08:00
this.getImgFilesList('203', 'meetingImgList')
this.getImgFilesList('204', 'appendixImgList')
this.getImgFilesList('205', 'fileList')
this.getImgFilesList('206', 'fileList1')
2023-11-07 10:08:37 +08:00
this.getDept()
},
methods: {
2024-10-10 10:14:31 +08:00
async getDate() {
let resData = await getHotWorkGoEdit({HOTWORKAPPLICATION_ID: this.HOTWORKAPPLICATION_ID});
2023-11-07 10:08:37 +08:00
this.form = resData.pd
2024-10-10 10:14:31 +08:00
this.form.TYPE = '2'
2023-11-07 10:08:37 +08:00
},
2024-10-10 10:14:31 +08:00
async getImgFilesList(type, listName) {
let imgPd = {'FOREIGN_KEY': this.HOTWORKAPPLICATION_ID, 'TYPE': type}
2023-11-07 10:08:37 +08:00
let resData = await getImgfilesListByKeyAndType({...imgPd});
this[listName] = resData.imgs
},
2024-10-10 10:14:31 +08:00
async getDept() {
let resData = await getDept({'DEPARTMENT_ID': '0'});
2023-11-07 10:08:37 +08:00
this.deptRange = JSON.parse(resData.zTreeNodes)
},
2024-10-10 10:14:31 +08:00
async getDeptUser(detpId) {
let resData = await getDeptUser({'DEPARTMENT_ID': detpId});
2023-11-07 10:08:37 +08:00
this.deptUserRange = JSON.parse(resData.userList)
2024-10-10 10:14:31 +08:00
this.$set(this.columns, 0, JSON.parse(resData.userList))
2023-11-07 10:08:37 +08:00
},
2024-10-10 10:14:31 +08:00
fnNavigator() {
2023-11-07 10:08:37 +08:00
uni.$u.route({
url: '/pages/super-hot/hot-work-permit/index',
params: {
HOTWORKAPPLICATION_ID: this.HOTWORKAPPLICATION_ID
}
})
},
2024-10-10 10:14:31 +08:00
previewImage(current, imgList) {
if (imgList) {
2023-11-07 10:08:37 +08:00
let urls = []
for (let i = 0; i < imgList.length; i++) {
urls.push(this.$store.state.filePath + imgList[i].FILEPATH)
}
uni.previewImage({
urls,
current
});
2024-10-10 10:14:31 +08:00
} else {
2023-11-07 10:08:37 +08:00
uni.previewImage({
urls: [current],
current
});
}
},
2024-10-10 10:14:31 +08:00
signConfirm({path}) {
this.form.safetyDirectorSign = path
2023-11-07 10:08:37 +08:00
},
2024-10-10 10:14:31 +08:00
async submit() {
if (this.form.TYPE === '2') {
if (!this.form.safetyDirectorSign) {
2023-11-07 10:08:37 +08:00
uni.showToast({
icon: "none",
title: '请在确认人签字处签字',
duration: 1500
});
return false
}
}
let formData = {
2024-10-10 10:14:31 +08:00
'TYPE': this.form.TYPE,
'HOTWORKAPPLICATION_ID': this.HOTWORKAPPLICATION_ID,
'STATE': '37',
'loginUserId': this.userInfo.USER_ID,
'CORPINFO_ID': this.userInfo.CORPINFO_ID
2023-11-07 10:08:37 +08:00
}
2024-10-10 10:14:31 +08:00
let rePD = {'filePath': this.form.safetyDirectorSign, name: 'FFILE', 'formData': formData}
2023-11-07 10:08:37 +08:00
2024-10-10 10:14:31 +08:00
await approveHotWorkSupervisionAndFfile({...rePD})
2023-11-07 10:08:37 +08:00
uni.$u.route({
type: 'navigateBack'
})
}
},
}
</script>
<style scoped>
</style>