1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153 |
- <template>
- <div class="approvalPage">
- <div class="approvalPage-min" v-if="pageType == 1">
- <div class="title-box">
- <p>化学品申购</p>
- <p class="reset-button-one button-p" @click="backPage(0)">返回</p>
- <!--已拒绝/已撤销时显示-->
- <p class="inquire-button-one button-p" v-if="dataInfo.approvalStatus==2||dataInfo.approvalStatus==3" @click="goEditPage">编辑</p>
- </div>
- <div class="page-max-box scrollbar-box">
- <div class="text-box-one">
- <p>编号:</p>
- <p>{{dataInfo.applyNum}}</p>
- <p>申购人:{{dataInfo.applyUserName}}</p>
- <p :class="dataInfo.approvalStatus==0?'colorA':(dataInfo.approvalStatus==1?'colorB':(dataInfo.approvalStatus==2?'colorC':(dataInfo.approvalStatus==3?'colorD':'')))"
- >{{dataInfo.approvalStatus==0&&approvalPagePropsData.userType==1?'等待我审批':(dataInfo.approvalStatus==0&&approvalPagePropsData.userType!=1?'等待审批':(dataInfo.approvalStatus==1?'已通过':(dataInfo.approvalStatus==2?'已拒绝':(dataInfo.approvalStatus==3?'已撤销':''))))}}</p>
- </div>
- <div class="text-box-two">
- <p>申购原因:</p>
- <p>{{dataInfo.applyReason}}</p>
- </div>
- <div class="text-box-one">
- <p>实验室:</p>
- <p style="flex:1;">{{dataInfo.subName}}</p>
- </div>
- <div class="text-box-three">
- <p class="el-icon-info"></p>
- <p>勾选的化学品为已同意申购</p>
- </div>
- <!--审批单-->
- <div class="table-title-box-one" v-if="approvalPagePropsData.type == 2">
- <!--<img @click="allCheckClick" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="!allCheckType" src="@/assets/ZDimages/medicUniversity-3_1/icon_sp_wxz.png">-->
- <!--<img @click="allCheckClick" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="allCheckType" src="@/assets/ZDimages/medicUniversity-3_1/icon_ytg_xz.png">-->
- <p></p>
- <p></p>
- <p>化学品名</p>
- <p>化学品柜</p>
- <p>位置</p>
- <p>申购人剩余可存放量</p>
- <p>本次申购量</p>
- </div>
- <div class="table-list-box-one" v-if="approvalPagePropsData.type == 2" v-for="(item,index) in dataInfo.actHxpapplyDetailList" :key="index">
- <img @click="checkClick(item)" v-if="item.tickStatus != 1" src="@/assets/ZDimages/medicUniversity-3_1/icon_sp_wxz.png">
- <img @click="checkClick(item)" v-if="item.tickStatus == 1" src="@/assets/ZDimages/medicUniversity-3_1/icon_ytg_xz.png">
- <p></p>
- <el-tooltip class="item" effect="dark" :content="item.chemicalName" placement="top">
- <p>{{item.chemicalName}}</p>
- </el-tooltip>
- <el-tooltip class="item" effect="dark" :content="item.cabinetName" placement="top">
- <p>{{item.cabinetName}}</p>
- </el-tooltip>
- <el-tooltip class="item" effect="dark" :content="item.posi" placement="top">
- <p>{{item.posi}}</p>
- </el-tooltip>
- <p>{{item.remainingStorage}}g</p>
- <p>{{item.applyNum}}</p>
- </div>
- <p class="approval-title-p">审批流程</p>
- <!--审批流程-->
- <div class="approval-list-max-box">
- <div class="approval-for-box">
- <div class="approval-for-box-min">
- <div class="left-max-box">
- <div class="left-top-box">
- <img src="">
- <!--<img src="">-->
- <div class="left-top-text-box">
- <p>发起申请</p>
- <p>{{dataInfo.applyUserName}}</p>
- </div>
- </div>
- <p class="left-bottom-p"></p>
- <img class="left-position-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png">
- </div>
- <div class="right-max-box" style="border:none;">
- </div>
- <p class="right-right-time-p">{{dataInfo.createTime}}</p>
- </div>
- </div>
- <div class="approval-for-box" v-if="dataInfo.approvalStatus!=3" v-for="(item,index) in dataInfo.configInfoList" :key="index">
- <div class="approval-for-box-min">
- <div class="left-max-box">
- <div class="left-top-box" v-if="item.auditType == 1">
- <img v-if="item.actApplytaskNodeList[1]" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ycsp.png">
- <img v-if="!item.actApplytaskNodeList[1]" :src="item.actApplytaskNodeList[0].applyUserList[0].avatar">
- <div class="left-top-text-box">
- <p>{{item.actApplytaskNodeList[1]?'依次审批':item.actApplytaskNodeList[0].applyUserList[0].postName}}</p>
- <p>{{item.approvalName}}</p>
- </div>
- </div>
- <div class="left-top-box" v-if="item.auditType == 2">
- <img v-if="item.actApplytaskNodeList[0].applyUserList[1]" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ycsp.png">
- <img v-if="!item.actApplytaskNodeList[0].applyUserList[1]" :src="item.actApplytaskNodeList[0].applyUserList[0].avatar">
- <div class="left-top-text-box">
- <p>{{item.actApplytaskNodeList[0].applyUserList[1]?'或签':item.actApplytaskNodeList[0].applyUserList[0].postName}}</p>
- <p>{{item.approvalName}}</p>
- </div>
- </div>
- <p class="left-bottom-p" v-if="index!=dataInfo.configInfoList.length-1"></p>
- <img class="left-position-img" v-if="item.applyTaskStatus == 1" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png">
- <img class="left-position-img" v-if="item.applyTaskStatus == 2" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_yjj.png">
- </div>
- <!--依次审批-->
- <div class="right-max-box" v-if="item.auditType == 1">
- <div class="right-for-name-box" v-for="(minItem,minIndex) in item.actApplytaskNodeList" :key="minIndex">
- <div class="right-for-name-box-min">
- <img :src="minItem.applyUserList[0].avatar">
- <p>{{minItem.applyUserList[0].name}}</p>
- <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_1.png" v-if="minItem.nodeStatus == 1&&minIndex!=item.actApplytaskNodeList.length-1">
- <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_2.png" v-if="!minItem.nodeStatus == 1&&minIndex!=item.actApplytaskNodeList.length-1">
- <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png" v-if="minItem.nodeStatus == 1">
- <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_yjj.png" v-if="minItem.nodeStatus == 2">
- </div>
- </div>
- </div>
- <!--或审-->
- <div class="right-max-box" v-if="item.auditType == 2">
- <div class="right-for-name-box" v-for="(minItem,minIndex) in item.actApplytaskNodeList[0].applyUserList" :key="minIndex">
- <div class="right-for-name-box-min">
- <img :src="minItem.avatar">
- <p>{{minItem.name}}</p>
- <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_1.png" v-if="item.actApplytaskNodeList[0].applyUserid == minItem.id&&minIndex!=item.actApplytaskNodeList[0].applyUserList.length-1">
- <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_2.png" v-if="item.actApplytaskNodeList[0].applyUserid != minItem.id&&minIndex!=item.actApplytaskNodeList[0].applyUserList.length-1">
- <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png" v-if="item.actApplytaskNodeList[0].applyUserid == minItem.id&&item.actApplytaskNodeList[0].nodeStatus == 1">
- <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_yjj.png" v-if="item.actApplytaskNodeList[0].applyUserid == minItem.id&&item.actApplytaskNodeList[0].nodeStatus == 2">
- </div>
- </div>
- </div>
- <p class="right-right-time-p">{{item.applyTaskTime}}</p>
- </div>
- </div>
- <div class="approval-for-box" v-if="dataInfo.approvalStatus==3">
- <div class="approval-for-box-min">
- <div class="left-max-box">
- <div class="left-top-box">
- <img src="">
- <!--<img src="">-->
- <div class="left-top-text-box">
- <p>已撤销</p>
- <p>{{dataInfo.applyUserName}}</p>
- </div>
- </div>
- </div>
- <div class="right-max-box" style="border:none;">
- </div>
- <p class="right-right-time-p">{{dataInfo.actApplytask.overTime}}</p>
- </div>
- </div>
- <p class="approval-for-min-p" v-if="dataInfo.approvalStatus==2">{{refuseContentText}}</p>
- </div>
- </div>
- </div>
- <el-dialog title="化学品详情" :visible.sync="infoDialogType" v-if="infoDialogType" width="900px" append-to-body class="approvalPage-info-dialog-box">
- <div class="approvalPage-info-dialog-text-big-box">
- <div class="approvalPage-info-dialog-box-text-box">
- <p>化学品名:</p>
- <p>{{infoDialogData.chemicalName}}</p>
- </div>
- <div class="approvalPage-info-dialog-box-text-box">
- <p>化学品ID:</p>
- <p>{{infoDialogData.id}}</p>
- </div>
- </div>
- <div class="approvalPage-info-dialog-text-big-box">
- <div class="approvalPage-info-dialog-box-text-box">
- <p>CAS:</p>
- <p>{{infoDialogData.casNum}}</p>
- </div>
- <div class="approvalPage-info-dialog-box-text-box">
- <p>别名:</p>
- <p>{{infoDialogData.anotherName}}</p>
- </div>
- </div>
- <div class="approvalPage-info-dialog-text-big-box">
- <div class="approvalPage-info-dialog-box-text-box">
- <p>分类:</p>
- <p>{{infoDialogData.chemicalClassify}}</p>
- </div>
- <div class="approvalPage-info-dialog-box-text-box">
- <p>属性:</p>
- <p>{{infoDialogData.classifyAttribute}}</p>
- </div>
- </div>
- <div class="approvalPage-info-dialog-text-big-box">
- <div class="approvalPage-info-dialog-box-text-box">
- <p>纯度:</p>
- <p>{{infoDialogData.purity}}</p>
- </div>
- <div class="approvalPage-info-dialog-box-text-box">
- <p>形态:</p>
- <p>{{infoDialogData.chemicalShape}}</p>
- </div>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="getHxpChemicalInfoOff">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog title="拒绝审批意见" :visible.sync="approvalTextType" v-if="approvalTextType" width="900px" append-to-body class="approvalPage-info-dialog-box">
- <el-form :model="formData" ref="form" :inline="true" label-width="120px">
- <el-form-item label="拒绝意见:" prop="refuseContent">
- <el-input
- maxlength="50"
- style="width:500px;"
- v-model="refuseContent"
- placeholder="请输入拒绝意见"
- clearable
- size="small"/>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="rejectButton">取 消</el-button>
- <el-button type="primary" @click="rejectDialogButton">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { getHxpapply,getHxpChemicalInfo } from "@/api/studentApi/chemicalManagement/index";
- import { classifyList,hxpapplyAudit,approvalTask,approvalRefuse } from "@/api/medicUniversity-3_1/index";
- export default {
- name: "approvalPage",
- props:{
- approvalPagePropsData:{},
- },
- data(){
- return{
- //页面状态
- pageType:0,
- //详情展示弹窗开关
- infoDialogType:false,
- //拒绝审批开关
- approvalTextType:false,
- formData:{},
- refuseContent:"",
- dataInfo:{},
- //全选状态
- allCheckType:false,
- refuseContentText:"",
- //化学品详情
- infoDialogData:{},
- //化学品形态
- optionsList:[],
- //化学品分类列表
- optionsListOne:[],
- //属性列表
- optionsListTwo:[],
- //机柜页面传参
- listPropsData:{}
- }
- },
- created() {
- },
- mounted(){
- this.classifyList();
- this.getDicts("chemical_shape").then(response => {
- this.optionsList = response.data;
- })
- this.getDicts("hxp_classifyattribute").then(response => {
- this.optionsListTwo = response.data;
- })
- this.hxpapplyAudit();
- },
- methods: {
- //同意审批
- agreeButton(){
- let self = this;
- let list = [];
- for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
- if(self.dataInfo.actHxpapplyDetailList[i].checkType){
- let obj = {
- // cabinetId:self.dataInfo.actHxpapplyDetailList[i].cabinetId,
- // chemicalId:self.dataInfo.actHxpapplyDetailList[i].chemicalId,
- id:self.dataInfo.actHxpapplyDetailList[i].id,
- remainingStorage:self.dataInfo.actHxpapplyDetailList[i].remainingStorage
- };
- list.push(obj);
- }
- }
- if(!list[0]){
- this.msgError('请选择通过审批的化学品')
- return
- }
- self.$confirm(`是否确认审批通过?`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(async () => {
- let obj = {
- taskId:self.dataInfo.id,
- actHxpapplyDetailList:list,
- };
- approvalTask(obj).then(response => {
- this.msgSuccess(response.msg);
- this.backPage(1);
- });
- }).catch(() => {})
- },
- //拒绝审批
- rejectButton(){
- this.approvalTextType = !this.approvalTextType;
- },
- rejectDialogButton(){
- let self = this;
- // self.$confirm(`是否确认拒绝通过?`, "提示", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning"
- // }).then(async () => {
- // let obj = {
- // taskId:self.dataInfo.id,
- // refuseContent:self.refuseContent,
- // };
- // approvalRefuse(obj).then(response => {
- // this.msgSuccess(response.msg);
- // this.backPage(1);
- // });
- // }).catch(() => {})
- let obj = {
- taskId:self.dataInfo.id,
- refuseContent:self.refuseContent,
- };
- approvalRefuse(obj).then(response => {
- this.msgSuccess(response.msg);
- this.backPage(1);
- });
- },
- //获取审批详情
- hxpapplyAudit(){
- let userId = localStorage.getItem('userId')
- if(this.approvalPagePropsData.type == 1){
- hxpapplyAudit(this.approvalPagePropsData.id).then(response => {
- //处理添加勾选状态
- for(let i=0;i<response.data.actHxpapplyDetailList.length;i++){
- response.data.actHxpapplyDetailList[i].checkType = false;
- }
- for(let i=0;i<response.data.configInfoList.length;i++){
- if(response.data.configInfoList[i].auditType == 1){
- //依次审批
- for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++){
- if(response.data.configInfoList[i].applyTaskStatus == 0){
- if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- //进行中
- if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = '我(审批中)'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批中)'
- break
- }
- }
- }else{
- //未进行的
- if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = '我(审批人)'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批人)'
- break
- }
- }
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 1){
- if(response.data.configInfoList[i].actApplytaskNodeList[1]){
- response.data.configInfoList[i].approvalName = '已通过'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已通过)'
- break
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 2){
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].id){
- response.data.configInfoList[i].approvalName = '我(已拒绝)'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已拒绝)'
- break
- }
- }
- }
- }else if(response.data.configInfoList[i].auditType == 2){
- //或签审批
- for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++) {
- let minNum = 0;
- for(let x=0;x<response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList.length;x++){
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[x].id){
- minNum++
- }
- }
- if(minNum == 0){
- //没自己
- if(response.data.configInfoList[i].applyTaskStatus == 0){
- //未审批
- if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = "审批中";
- }else{
- response.data.configInfoList[i].approvalName = "待审批";
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 1){
- //已通过
- response.data.configInfoList[i].approvalName = "已通过";
- }else if(response.data.configInfoList[i].applyTaskStatus == 2){
- //已拒绝
- response.data.configInfoList[i].approvalName = "已拒绝";
- }
- }else{
- //有自己
- if(response.data.configInfoList[i].applyTaskStatus == 0){
- //未审批
- if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = "我(审批中)";
- }else{
- response.data.configInfoList[i].approvalName = "我(审批人)";
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 1){
- //已通过
- response.data.configInfoList[i].approvalName = "我(已通过)";
- }else if(response.data.configInfoList[i].applyTaskStatus == 2){
- //已拒绝
- response.data.configInfoList[i].approvalName = "我(已拒绝)";
- }
- }
- }
- }
- }
- let type = true;
- let configInfoList = [];
- for(let i=0;i<response.data.configInfoList.length;i++){
- if(type){
- configInfoList.push(response.data.configInfoList[i]);
- }
- if(response.data.configInfoList[i].applyTaskStatus == 2){
- type = false;
- }
- }
- this.$set(response.data,'configInfoList',configInfoList);
- this.$set(this,'dataInfo',response.data);
- this.$set(this,'pageType',1);
- });
- }else if(this.approvalPagePropsData.type == 2){
- getHxpapply(this.approvalPagePropsData.id).then(response => {
- //处理添加勾选状态
- for(let i=0;i<response.data.actHxpapplyDetailList.length;i++){
- if(response.data.actHxpapplyDetailList[i].tickStatus == 1){
- response.data.actHxpapplyDetailList[i].checkType = true;
- }else{
- response.data.actHxpapplyDetailList[i].checkType = false;
- }
- }
- for(let i=0;i<response.data.configInfoList.length;i++){
- if(response.data.configInfoList[i].auditType == 1){
- //依次审批
- for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++){
- if(response.data.configInfoList[i].applyTaskStatus == 0){
- if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- //进行中
- if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = '我(审批中)'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批中)'
- break
- }
- }
- }else{
- //未进行的
- if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = '我(审批人)'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批人)'
- break
- }
- }
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 1){
- if(response.data.configInfoList[i].actApplytaskNodeList[1]){
- response.data.configInfoList[i].approvalName = '已通过'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已通过)'
- break
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 2){
- this.refuseContentText = response.data.configInfoList[i].refuseContent;
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].id){
- response.data.configInfoList[i].approvalName = '我(已拒绝)'
- break
- }else{
- response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已拒绝)'
- break
- }
- }
- }
- }else if(response.data.configInfoList[i].auditType == 2){
- //或签审批
- for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++) {
- let minNum = 0;
- for(let x=0;x<response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList.length;x++){
- if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[x].id){
- minNum++
- }
- }
- if(minNum == 0){
- //没自己
- if(response.data.configInfoList[i].applyTaskStatus == 0){
- //未审批
- if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = "审批中";
- }else{
- response.data.configInfoList[i].approvalName = "待审批";
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 1){
- //已通过
- response.data.configInfoList[i].approvalName = "已通过";
- }else if(response.data.configInfoList[i].applyTaskStatus == 2){
- //已拒绝
- this.refuseContentText = response.data.configInfoList[i].refuseContent;
- response.data.configInfoList[i].approvalName = "已拒绝";
- }
- }else{
- //有自己
- if(response.data.configInfoList[i].applyTaskStatus == 0){
- //未审批
- if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
- response.data.configInfoList[i].approvalName = "我(审批中)";
- }else{
- response.data.configInfoList[i].approvalName = "我(审批人)";
- }
- }else if(response.data.configInfoList[i].applyTaskStatus == 1){
- //已通过
- response.data.configInfoList[i].approvalName = "我(已通过)";
- }else if(response.data.configInfoList[i].applyTaskStatus == 2){
- //已拒绝
- this.refuseContentText = response.data.configInfoList[i].refuseContent;
- response.data.configInfoList[i].approvalName = "我(已拒绝)";
- }
- }
- }
- }
- }
- let type = true;
- let configInfoList = [];
- for(let i=0;i<response.data.configInfoList.length;i++){
- if(type){
- configInfoList.push(response.data.configInfoList[i]);
- }
- if(response.data.configInfoList[i].applyTaskStatus == 2){
- type = false;
- }
- }
- this.$set(response.data,'configInfoList',configInfoList);
- this.$set(this,'dataInfo',response.data);
- this.$set(this,'pageType',1);
- });
- }
- },
- //返回
- backPage(type){
- if(type == 0){
- this.$parent.pageToggle(0);
- }else if(type == 1){
- this.$parent.pageToggle(1);
- }
- },
- goEditPage(){
- let obj = {
- id:this.approvalPagePropsData.id
- }
- this.$parent.pageToggle(5,obj);
- },
- //勾选处理
- checkClick(item){
- let self = this;
- if(self.approvalPagePropsData.type != 1){
- return
- }
- item.checkType = !item.checkType;
- let num = 0;
- for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
- if(self.dataInfo.actHxpapplyDetailList[i].checkType){
- num++
- }
- }
- this.allCheckType = num == self.dataInfo.actHxpapplyDetailList.length;
- },
- //全选
- allCheckClick(){
- let self = this;
- if(self.approvalPagePropsData.type != 1){
- return
- }
- if(this.allCheckType){
- this.allCheckType = false;
- for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
- self.dataInfo.actHxpapplyDetailList[i].checkType = false;
- }
- }else{
- this.allCheckType = true;
- for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
- self.dataInfo.actHxpapplyDetailList[i].checkType = true;
- }
- }
- },
- //化学品详情
- getHxpChemicalInfo(id){
- let self = this;
- getHxpChemicalInfo(id).then(response => {
- //化学品形态
- for(let i=0;i<self.optionsList.length;i++){
- if(response.data.chemicalShape == self.optionsList[i].dictValue){
- this.$set(response.data,'chemicalShape',self.optionsList[i].dictLabel);
- }
- }
- //化学品分类列表
- for(let i=0;i<self.optionsListOne.length;i++){
- if(response.data.chemicalClassify == self.optionsListOne[i].id){
- this.$set(response.data,'chemicalClassify',self.optionsListOne[i].classifyName);
- }
- }
- //属性列表
- let list = response.data.classifyAttribute.split(',');
- console.log("list",list);
- let newText = '';
- for(let o=0;o<list.length;o++){
- for(let i=0;i<self.optionsListTwo.length;i++){
- if(list[o] == self.optionsList[i].dictValue){
- if(o == 0){
- newText = self.optionsList[i].dictLabel
- }else{
- newText = newText + ',' +self.optionsList[i].dictLabel
- }
- }
- }
- }
- this.$set(response.data,'classifyAttribute',newText);
- this.infoDialogData = response.data;
- this.infoDialogType = true;
- });
- },
- getHxpChemicalInfoOff(){
- this.infoDialogType = false;
- },
- //获取化学品分类列表
- classifyList(){
- classifyList().then(response => {
- this.optionsListOne = response.rows;
- });
- },
- pageToggle(type,item){
- if(type == 1){
- this.pageType = 1;
- }else if(type == 2){
- let obj = {
- cabinetName:item.chemicalName,
- posi:item.posi,
- safeUserName:item.safeUserNames,
- id:item.cabinetId,
- };
- this.$set(this,'listPropsData',obj);
- this.pageType = 2;
- }
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .approvalPage{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- font-weight: 500;
- p{
- margin:0;
- padding:0;
- }
- .approvalPage-min{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .title-box{
- display: flex;
- height:90px;
- border-bottom: 1px solid #D8D8D8;
- p:nth-child(1){
- flex:1;
- font-size:16px;
- line-height:90px;
- margin-left:18px;
- color:#0045AF;
- }
- .button-p{
- margin:25px 25px 0 0;
- }
- }
- .page-max-box{
- flex:1;
- display: flex;
- flex-direction: column;
- padding:20px 80px;
- .text-box-one{
- display: flex;
- margin-bottom:10px;
- font-size:16px;
- p{
- color:#333;
- line-height:50px;
- }
- p:nth-child(1){
- width:85px;
- text-align: right;
- }
- p:nth-child(2){
- width:205px;
- padding-left:10px;
- }
- p:nth-child(3){
- flex:1;
- }
- p:nth-child(4){
- }
- .colorA{
- color:#FF8C00;
- }
- .colorB{
- color:#25C402;
- }
- .colorC{
- color:#FA5151;
- }
- .colorD{
- color:#666666;
- }
- }
- .text-box-two{
- display: flex;
- margin-bottom:10px;
- font-size:16px;
- p{
- color:#333;
- line-height:50px;
- }
- p:nth-child(1){
- width:85px;
- text-align: right;
- }
- p:nth-child(2){
- padding-left:10px;
- flex:1;
- background: #F5F5F5;
- border-radius:4px;
- }
- }
- .text-box-three{
- display: flex;
- font-size:14px;
- p:nth-child(1){
- font-size:14px;
- width:14px;
- height:14px;
- margin:14px 11px 14px 14px;
- text-align: center;
- color:#ffb400;
- border-radius:50%;
- }
- p:nth-child(2){
- flex:1;
- line-height:42px;
- }
- }
- .table-title-box-one{
- display: flex;
- background: #f5f5f5;
- margin-bottom:10px;
- .cursor-img{
- cursor: pointer;
- }
- p:nth-child(1){
- width:16px;
- height:16px;
- margin:17px 17px 0 29px;
- }
- p{
- line-height: 50px;
- font-size:16px;
- }
- p:nth-child(2){
- width:130px;
- }
- p:nth-child(3){
- width:184px;
- }
- p:nth-child(4){
- width:299px;
- }
- p:nth-child(5){
- width:288px;
- }
- p:nth-child(6){
- flex:1;
- }
- p:nth-child(7){
- width:145px;
- }
- }
- .table-list-box-one{
- display: flex;
- .cursor-img{
- cursor: pointer;
- }
- img:nth-child(1){
- width:16px;
- height:16px;
- margin:13px 17px 0 29px;
- }
- p{
- line-height: 42px;
- font-size:14px;
- }
- p:nth-child(2){
- width:130px;
- }
- p:nth-child(3){
- width:184px;
- padding-right:20px;
- display:block;
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
- }
- p:nth-child(4){
- width:299px;
- padding-right:20px;
- display:block;
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
- }
- p:nth-child(5){
- width:288px;
- padding-right:20px;
- display:block;
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
- }
- p:nth-child(6){
- flex:1;
- }
- p:nth-child(7){
- width:145px;
- color: #0045AF;
- }
- }
- .table-title-box-two{
- display: flex;
- background: #f5f5f5;
- margin-bottom:10px;
- .cursor-img{
- cursor: pointer;
- }
- img:nth-child(1){
- width:16px;
- height:16px;
- margin:17px 17px 0 18px;
- }
- p{
- line-height: 50px;
- font-size:16px;
- }
- p:nth-child(2){
- width:72px;
- }
- p:nth-child(3){
- width:113px;
- }
- p:nth-child(4){
- width:121px;
- }
- p:nth-child(5){
- width:165px;
- }
- p:nth-child(6){
- width:121px;
- }
- p:nth-child(7){
- width:136px;
- }
- p:nth-child(8){
- width:132px;
- }
- p:nth-child(9){
- width:169px;
- }
- p:nth-child(10){
- flex:1;
- }
- p:nth-child(11){
- width:145px;
- margin-left:55px;
- }
- }
- .table-list-box-two{
- display: flex;
- .cursor-img{
- cursor: pointer;
- }
- img:nth-child(1){
- width:16px;
- height:16px;
- margin:17px 17px 0 18px;
- }
- p{
- line-height: 50px;
- font-size:14px;
- }
- p:nth-child(2){
- width:72px;
- }
- p:nth-child(3){
- width:113px;
- padding-right:20px;
- display:block;
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
- }
- p:nth-child(4){
- width:121px;
- padding-right:20px;
- display:block;
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
- }
- p:nth-child(5){
- width:165px;
- padding-right:20px;
- display:block;
- overflow:hidden;
- text-overflow:ellipsis;
- white-space:nowrap;
- }
- p:nth-child(6){
- width:121px;
- }
- p:nth-child(7){
- width:136px;
- }
- p:nth-child(8){
- width:132px;
- }
- p:nth-child(9){
- width:169px;
- }
- p:nth-child(10){
- flex:1;
- }
- p:nth-child(11){
- width:80px;
- height:28px;
- line-height:28px;
- margin-right:14px;
- color:#0045af;
- border:1px solid #0045af;
- border-radius:4px;
- text-align: center;
- margin-top:11px;
- cursor: pointer;
- }
- p:nth-child(12){
- width:100px;
- height:28px;
- line-height:28px;
- margin-right:14px;
- color:#0045af;
- border:1px solid #0045af;
- border-radius:4px;
- text-align: center;
- margin-top:11px;
- cursor: pointer;
- }
- }
- .approval-title-p{
- font-size:16px;
- background: #f5f5f5;
- line-height: 50px;
- margin-bottom:23px;
- padding-left:20px;
- margin-top:10px;
- }
- .approval-list-max-box{
- .approval-for-box{
- .approval-for-box-min{
- display: flex;
- .left-max-box{
- display: flex;
- flex-direction: column;
- width:219px;
- position: relative;
- .left-top-box{
- display: flex;
- img{
- width:60px;
- height:60px;
- border-radius:4px;
- margin-right:30px;
- }
- .left-top-text-box{
- p{
- line-height:30px;
- font-size:14px;
- color:#333;
- }
- }
- }
- .left-bottom-p{
- width:2px;
- flex:1;
- background: #e0e0e0;
- margin-left:29px;
- }
- .left-position-img{
- width:20px;
- height:20px;
- position: absolute;
- top:50px;
- left:50px;
- }
- }
- .right-max-box{
- flex:1;
- min-height:80px;
- border:1px solid #e0e0e0;
- margin-bottom:27px;
- padding:19px 14px 0;
- .right-for-name-box{
- display: inline-block;
- margin-bottom:17px;
- .right-for-name-box-min{
- display: flex;
- position: relative;
- img:nth-child(1){
- width:40px;
- height:40px;
- border-radius:4px;
- margin-right:8px;
- }
- p:nth-child(2){
- line-height:44px;
- font-size:14px;
- }
- .right-min-img{
- width:12px;
- height:10px;
- margin:16px 17px 0 13px;
- }
- .position-min-img{
- width:20px;
- height:20px;
- position: absolute;
- top:30px;
- left:30px;
- }
- }
- }
- }
- .right-max-box-border-none{
- border:none;
- }
- .right-max-end{
- margin-bottom:0;
- }
- .right-right-time-p{
- font-size:14px;
- color: #666666;
- width:160px;
- text-align: right;
- padding-top:10px;
- }
- }
- }
- .approval-for-min-p{
- margin:20px 95px;
- font-size:14px;
- line-height:20px;
- color:#666666;
- background: #F5F5F5;
- padding:10px 35px;
- word-wrap:break-word;
- word-break:break-all;
- overflow: hidden;
- }
- }
- .bottom-button-box{
- display: flex;
- width:217px;
- margin:30px auto;
- p{
- width:100px;
- }
- p:nth-child(1){
- margin-right:17px;
- }
- }
- }
- }
- }
- </style>
- <style lang="scss">
- .approvalPage-info-dialog-box{
- p{
- margin:0;
- }
- .approvalPage-info-dialog-text-big-box{
- display: flex;
- .approvalPage-info-dialog-box-text-box:nth-child(1){
- margin-right:100px;
- margin-left:20px;
- }
- .approvalPage-info-dialog-box-text-box{
- width:357px;
- display: flex;
- p{
- line-height:50px;
- color:#333;
- font-size:16px;
- }
- p:nth-child(1){
- width:80px;
- text-align: right;
- }
- p:nth-child(2){
- flex:1;
- text-align: right;
- }
- }
- }
- .el-dialog__footer{
- text-align:center;
- }
- }
- </style>
|