qa-regulatory-gwj-app/pages/super-hot/security-committee/detail.vue

458 lines
16 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" class="bth-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($store.state.filePath + form.projectPreliminarily_PRINCIPAL)"></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">
2024-10-16 09:25:19 +08:00
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in meetingImgList" :key="index" class="ml-10 mt-10">
2024-10-10 10:14:31 +08:00
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,meetingImgList)"></u--image>
2024-10-16 09:25:19 +08:00
</view>
</view>
2024-10-10 10:14:31 +08:00
</view>
</u-cell>
<u-cell>
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
2024-10-16 09:25:19 +08:00
<view style="display: flex;flex-wrap: wrap">
<view v-for="(item,index) in appendixImgList" :key="index" class="ml-10 mt-10">
2024-10-10 10:14:31 +08:00
<u--image :showLoading="true" :src="$store.state.filePath + item.FILEPATH" width="70" height="70"
mode="scaleToFill"
@click="previewImage($store.state.filePath + item.FILEPATH,appendixImgList)"></u--image>
2024-10-16 09:25:19 +08:00
</view>
</view>
2024-10-10 10:14:31 +08:00
</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($store.state.filePath + form.inspectorGeneral_PRINCIPAL)"></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">
<u-radio-group v-model="pd.isChange" placement="row">
<u-radio label="通过" name="2"></u-radio>
<view class="ml-10">
<u-radio label="不通过" name="1"></u-radio>
</view>
</u-radio-group>
</view>
</u-cell>
<u-cell v-if="pd.isChange === '2'">
<view slot="title" class="title">上传会议纪要</view>
<view slot="label" class="mt-10">
<u-upload
ref="aaa"
capture="album"
uploadIcon="plus"
:fileList="fileList"
@afterRead="afterRead"
@delete="deletePic"
name="1" multiple
:maxCount="4"></u-upload>
<!-- <u-upload-->
<!-- uploadIcon="plus"-->
<!-- :fileList="form.fileList"-->
<!-- @afterRead="afterRead"-->
<!-- @delete="deletePic"-->
<!-- multiple-->
<!-- :maxCount="4"-->
<!-- ></u-upload>-->
</view>
</u-cell>
<u-cell v-if="pd.isChange === '2'">
<view slot="title" class="title">上传附件</view>
<view slot="label" class="mt-10">
<u-upload
uploadIcon="plus"
:fileList="fileList1"
@afterRead="afterRead1"
@delete="deletePic1"
multiple
:maxCount="4"
></u-upload>
</view>
</u-cell>
<u-cell v-if="pd.isChange === '2'">
<view slot="title" class="title">(港股安委办主任)安全总监部门</view>
<view slot="value">
<u--text :text="pd.safetyDirector_dept_id ==''?'请选择':pd.safetyDirector_dept_name"
@click="showTree"></u--text>
<tki-tree ref="tkitree" :range="deptRange" rangeKey="name" selectParent @confirm="confirmTree"/>
</view>
</u-cell>
<u-cell v-if="pd.isChange === '2'">
<view slot="title" class="title">(港股安委办主任)安全总监</view>
<view slot="value">
<u--text :text="pd.safetyDirector_user_id ==''?'请选择':pd.safetyDirector_user_name"
@click="showPicker"></u--text>
<u-picker :show="show" :columns="columns" keyName="NAME" @cancel="show = false"
@confirm="confirmPicker"></u-picker>
</view>
</u-cell>
</u-cell-group>
</view>
</view>
<view class="mt-10">
<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>
import tkiTree from "@/components/tki-tree/tki-tree.vue"
import {
getHotWorkGoEdit,
getImgfilesListByKeyAndType,
getDept,
getDeptUser,
approveHotWorkSupervision,
setImgFilesListAdd
} from '../../../api/index'
2024-10-10 10:14:31 +08:00
2023-11-07 10:08:37 +08:00
export default {
components: {tkiTree},
data() {
return {
2024-10-10 10:14:31 +08:00
form: {},
fileList: [],
fileList1: [],
pd: {
safetyDirector_dept_id: '',
safetyDirector_dept_name: '',
safetyDirector_user_id: '',
safetyDirector_user_name: ''
2023-11-07 10:08:37 +08:00
},
2024-10-10 10:14:31 +08:00
range: [],
2023-11-07 10:08:37 +08:00
show: false,
columns: [],
2024-10-10 10:14:31 +08:00
HOTWORKAPPLICATION_ID: '',
2023-11-07 10:08:37 +08:00
meetingImgList: [],
appendixImgList: [],
2024-10-10 10:14:31 +08:00
deptRange: []
2023-11-07 10:08:37 +08:00
}
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
onLoad(event) {
this.HOTWORKAPPLICATION_ID = event.HOTWORKAPPLICATION_ID
this.getDate()
2024-10-10 10:14:31 +08:00
this.getImgFilesList('203', 'meetingImgList')
this.getImgFilesList('204', 'appendixImgList')
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
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});
this.$set(this.columns, 0, 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
}
})
},
showTree() {
this.$refs.tkitree._show()
},
2024-10-10 10:14:31 +08:00
confirmTree(e) {
2023-11-07 10:08:37 +08:00
this.pd.safetyDirector_dept_id = e[0].id
this.pd.safetyDirector_dept_name = e[0].name
this.pd.safetyDirector_user_id = ''
this.pd.safetyDirector_user_name = ''
this.getDeptUser(this.pd.safetyDirector_dept_id)
},
2024-10-10 10:14:31 +08:00
showPicker() {
2023-11-07 10:08:37 +08:00
this.show = true
},
2024-10-10 10:14:31 +08:00
confirmPicker(e) {
2023-11-07 10:08:37 +08:00
this.pd.safetyDirector_user_id = e.value[0].USER_ID
this.pd.safetyDirector_user_name = e.value[0].NAME
this.show = false;
},
afterRead(event) {
this.fileList = [...this.fileList, ...event.file]
},
deletePic(event) {
this.fileList = this.fileList.filter(item => item.url !== event.file.url)
},
afterRead1(event) {
2024-10-10 10:14:31 +08:00
if (!this.fileList1) this.$set(this, 'fileList1', [])
2023-11-07 10:08:37 +08:00
this.fileList1 = [...this.fileList1, ...event.file]
},
deletePic1(event) {
this.fileList1 = this.fileList1.filter(item => item.url !== event.file.url)
},
2024-10-10 10:14:31 +08:00
previewImage(current) {
2023-11-07 10:08:37 +08:00
uni.previewImage({
urls: [current],
current
});
},
async submit() {
var _this = this
if (this.pd.isChange === '2') { // 审批通过
console.log(_this.fileList)
console.log(_this.fileList1)
if (_this.fileList.length == 0) {
uni.showToast({
icon: "none",
title: '请上传会议纪要',
duration: 1500
});
return false
}
if (_this.fileList1.length == 0) {
uni.showToast({
icon: "none",
title: '请上传上传附件',
duration: 1500
});
return false
}
if (_this.pd.safetyDirector_user_id == '') {
uni.showToast({
icon: "none",
title: '请选择安全总监',
duration: 1500
});
return false
}
}
await approveHotWorkSupervision({
2024-10-10 10:14:31 +08:00
'TYPE': _this.pd.isChange,
'HOTWORKAPPLICATION_ID': _this.HOTWORKAPPLICATION_ID,
'STATE': '36',
'safetyDirector_USER_ID': _this.pd.safetyDirector_user_id,
'loginUserId': _this.userInfo.USER_ID
2023-11-07 10:08:37 +08:00
});
console.log(_this.fileList)
2024-10-10 10:14:31 +08:00
if (_this.fileList.length > 0) {
2023-11-07 10:08:37 +08:00
await this.uploadImg('fileList', '205')
await this.uploadImg('fileList1', '206')
}
uni.$u.route({
type: 'navigateBack'
})
},
async uploadImg(listName, imgType) {
let imgFiles1 = []
for (let i = 0; i < this[listName].length; i++) {
imgFiles1.push({
uri: this[listName][i].url,
FFILE: this[listName][i].url,
2024-10-10 10:14:31 +08:00
name: 'file' + i
2023-11-07 10:08:37 +08:00
})
}
2024-10-10 10:14:31 +08:00
let formData1 = {
'TYPE': imgType,
'FOREIGN_KEY': this.HOTWORKAPPLICATION_ID,
'CORPINFO_ID': this.userInfo.CORPINFO_ID,
}
await setImgFilesListAdd({files: imgFiles1, formData: formData1})
2023-11-07 10:08:37 +08:00
},
2024-10-10 10:14:31 +08:00
goBack() {
2023-11-07 10:08:37 +08:00
}
},
}
</script>
<style scoped>
</style>