| | |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 根据物资配置id和领取人获取领取情况 |
| | | getMaterialDetail: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/specialWork/material/receive`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | } |
| | | }; |
| | | } |
| | |
| | | transform: translateY(0); |
| | | } |
| | | } |
| | | @media screen and (min-width: 1400px) { |
| | | @media screen and (min-width: 1600px) { |
| | | .gridCont { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | } |
| | | |
| | | .itemTit1 { |
| | | font-size: 34px; |
| | | font-size: 32px; |
| | | line-height: 42px; |
| | | height: 40%; |
| | | letter-spacing: 1px; |
| | |
| | | margin-bottom: 12px; |
| | | } |
| | | .enTit1 { |
| | | font-size: 20px; |
| | | font-size: 18px; |
| | | line-height: 24px; |
| | | color: #072270; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1200px) and (max-width: 1400px) { |
| | | @media screen and (min-width: 1200px) and (max-width: 1600px) { |
| | | .gridCont { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | z-index: 99; |
| | | |
| | | .itemTit { |
| | | font-size: 26px; |
| | | font-size: 22px; |
| | | line-height: 30px; |
| | | height: 40%; |
| | | color: #072270; |
| | | margin-bottom: 2px; |
| | | } |
| | | .enTit { |
| | | font-size: 14px; |
| | | font-size: 12px; |
| | | color: #072270; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .itemTit1 { |
| | | font-size: 28px; |
| | | font-size: 24px; |
| | | line-height: 36px; |
| | | height: 40%; |
| | | letter-spacing: 1px; |
| | |
| | | margin-bottom: 12px; |
| | | } |
| | | .enTit1 { |
| | | font-size: 16px; |
| | | font-size: 14px; |
| | | color: #072270; |
| | | } |
| | | } |
| | |
| | | z-index: 99; |
| | | |
| | | .itemTit { |
| | | font-size: 18px; |
| | | font-size: 14px; |
| | | line-height: 22px; |
| | | color: #072270; |
| | | } |
| | | .enTit { |
| | | font-size: 12px; |
| | | font-size: 10px; |
| | | line-height: 14px; |
| | | color: #072270; |
| | | } |
| | |
| | | } |
| | | |
| | | .itemTit1 { |
| | | font-size: 24px; |
| | | font-size: 16px; |
| | | line-height: 36px; |
| | | height: 40%; |
| | | letter-spacing: 1px; |
| | |
| | | margin-bottom: 12px; |
| | | } |
| | | .enTit1 { |
| | | font-size: 14px; |
| | | font-size: 12px; |
| | | color: #072270; |
| | | } |
| | | } |
| | |
| | | position: absolute; |
| | | left: -100px; |
| | | top: 0; |
| | | width: 240px; |
| | | width: 220px; |
| | | height: 100%; |
| | | z-index: 99; |
| | | background: url('../../assets/newMenu/leftbg.png') no-repeat center; |
| | |
| | | } |
| | | } |
| | | .menuGrid { |
| | | width: calc(100vw - 240px); |
| | | width: calc(100vw - 220px); |
| | | height: calc(100vh - 320px); |
| | | padding: 20px 20px 0; |
| | | position: absolute; |
| | | top: 260px; |
| | | left: 240px; |
| | | left: 220px; |
| | | .gridCont { |
| | | .grid-content { |
| | | border-radius: 16px; |
| | |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), |
| | | }, |
| | | props:['workerList','departList'], |
| | | setup() { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | | form: { |
| | | operatorUids: [], |
| | | workType: 5, |
| | | workLevel: null, |
| | | workLevel: 0, |
| | | workContent: '', |
| | | workLocation: '', |
| | | hazardIdentification: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | workDetail:{ |
| | | operationDepId: null, |
| | | bcReason: '', |
| | |
| | | bcPath: [], |
| | | involvedDepIds: [] |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | emitPath: false, |
| | | value: 'depId', |
| | | label: 'depName', |
| | | multiple: true |
| | | multiple: true, |
| | | expandTrigger: 'hover' |
| | | }, |
| | | casProps2: { |
| | | emitPath: false, |
| | |
| | | // } |
| | | |
| | | const openMaList = ()=>{ |
| | | material.value.equipmentDialog = true |
| | | if(state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业人再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | } |
| | | |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), |
| | | }, |
| | | props:['workerList'], |
| | | setup() { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | |
| | | workLevel: null, |
| | | workContent: '', |
| | | workLocation: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | hazardIdentification: '', |
| | | workDetail:{ |
| | | hotMethod: '', |
| | | otherSpecialWork: [] |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | // } |
| | | // } |
| | | const openMaList = ()=>{ |
| | | if(state.form.workLevel == null){ |
| | | if(state.form.workLevel == null || state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业等级再获取相应物资配置' |
| | | message: '请先选择作业人和作业等级再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | material.value.equipmentDialog = true |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | import axios from 'axios'; |
| | | |
| | | |
| | | interface stateType { |
| | | equipmentDialog: boolean, |
| | | form: Object, |
| | |
| | | form: { |
| | | operatorUids: [], |
| | | workType: 4, |
| | | workLevel: null, |
| | | workLevel: 0, |
| | | workContent: '', |
| | | workLocation: '', |
| | | hazardIdentification: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | workDetail:{ |
| | | operationDepId: null, |
| | | gbScope: '', |
| | |
| | | gbPath: [], |
| | | otherSpecialWork: [] |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | // } |
| | | |
| | | const openMaList = ()=>{ |
| | | material.value.equipmentDialog = true |
| | | if(state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业人再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), |
| | | }, |
| | | props:['workerList','departList'], |
| | | setup() { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | |
| | | workContent: '', |
| | | workLocation: '', |
| | | hazardIdentification: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | workDetail:{ |
| | | operationDepId: '', |
| | | operationHeight: null, |
| | | otherSpecialWork: [] |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | // } |
| | | // } |
| | | const openMaList = ()=>{ |
| | | if(state.form.workLevel == null){ |
| | | if(state.form.workLevel == null || state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业等级再获取相应物资配置' |
| | | message: '请先选择作业人和作业等级再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | material.value.equipmentDialog = true |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | |
| | | |
| | | interface stateType { |
| | | equipmentDialog: boolean, |
| | | form: Object, |
| | |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), |
| | | }, |
| | | props:['workerList'], |
| | | setup() { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | |
| | | workLevel: null, |
| | | workContent: '', |
| | | workLocation: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | hazardIdentification: '', |
| | | workDetail:{ |
| | | hoistingToolName: '', |
| | | weightMass: null |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | // } |
| | | // } |
| | | const openMaList = ()=>{ |
| | | if(state.form.workLevel == null){ |
| | | if(state.form.workLevel == null || state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业等级再获取相应物资配置' |
| | | message: '请先选择作业人和作业等级再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | material.value.equipmentDialog = true |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | <el-button @click="openList(item)" type="success">选用</el-button> |
| | | </div> |
| | | |
| | | <el-dialog v-model="equipDetailDialog" title="物资标准详情" width="40%" center @open="openDetail" > |
| | | <el-dialog v-model="equipDetailDialog" title="物资标准详情" width="75%" center @open="openDetail"> |
| | | <div class="choose-receiver"> |
| | | <span>选择其他作业关联人员</span> |
| | | <el-select v-model="receiveUids" multiple @change="changeReceiver"> |
| | | <el-option |
| | | v-for="item in workerList" |
| | | :key="item.uid" |
| | | :label="item.username" |
| | | :value="item.uid" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | <table class="table"> |
| | | <tr> |
| | | <th class="w-20">物资名称</th> |
| | | <th class="w-20">出库部门(仓库)</th> |
| | | <th class="w-15">对应库存</th> |
| | | <th class="w-25">物资名称</th> |
| | | <th class="w-15">标准值</th> |
| | | <th class="w-15">级别</th> |
| | | <th class="w-30">关联人员与个数</th> |
| | | <th class="w-15">实际使用</th> |
| | | </tr> |
| | | <tr v-for="(item,index) in materialDetail"> |
| | | <td class="w-20">{{item.materialName}}</td> |
| | | <td class="w-20"> |
| | | <el-select v-model="addList[index].depId" @change="changeDep($event,index)"> |
| | | <el-option |
| | | v-for="i in item.msList" |
| | | :key="i.depId" |
| | | :label="i.depName" |
| | | :value="i.depId" |
| | | /> |
| | | </el-select> |
| | | </td> |
| | | <td class="w-15"> |
| | | {{stockCount[index]}} |
| | | </td> |
| | | <td class="w-25">{{item.materialName}}</td> |
| | | <!-- <td class="w-1">--> |
| | | <!-- <el-select v-model="addList[index].depId" @change="changeDep($event,index)">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="i in item.msList"--> |
| | | <!-- :key="i.depId"--> |
| | | <!-- :label="i.depName"--> |
| | | <!-- :value="i.depId"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </td>--> |
| | | <!-- <td class="w-15">--> |
| | | <!-- {{stockCount[index]}}--> |
| | | <!-- </td>--> |
| | | <td class="w-15">{{item.standVal}}</td> |
| | | <td class="w-15">{{item.configurationLevelName}}</td> |
| | | <td class="w-30"> |
| | | {{item.receiveUnames}} |
| | | </td> |
| | | <!-- <td class="w-15">--> |
| | | <!-- <el-input type="number" v-model.number="addList[index].useCount"/>--> |
| | | <!-- </td>--> |
| | | <td class="w-15"> |
| | | <el-input type="number" v-model.number="addList[index].useCount"/> |
| | | {{item.receiveCount}} |
| | | </td> |
| | | </tr> |
| | | </table> |
| | |
| | | equipDetailDialog: boolean |
| | | materialDetail: Array<any> |
| | | stockCount: Array<number> |
| | | addList: Array<any> |
| | | chosenId: number | null |
| | | chosenId: number | null, |
| | | receiveUids: Array<number> |
| | | } |
| | | |
| | | |
| | |
| | | import {ElMessage, ElMessageBox} from 'element-plus'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import {storeToRefs} from "pinia"; |
| | | |
| | | export default { |
| | | name: 'materialDialog', |
| | | setup(props,context) { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const approveBasicFormRef = ref(); |
| | |
| | | equipDetailDialog: false, |
| | | materialDetail: [], |
| | | stockCount: [], |
| | | addList: [] |
| | | receiveUids: [] |
| | | }); |
| | | |
| | | // 确认物资标准 |
| | |
| | | if (res.data.code === '200') { |
| | | if(res.data.data && res.data.data.length>0){ |
| | | state.materialList = JSON.parse(JSON.stringify(res.data.data)) |
| | | state.equipmentDialog = true |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '暂时查询不到物资标准信息' |
| | | }); |
| | | state.equipmentDialog = false |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | state.equipmentDialog = false |
| | | } |
| | | } |
| | | const openList =(item:object)=>{ |
| | | const openList = async(item:object)=>{ |
| | | state.chosenId = item.id |
| | | state.addList = [] |
| | | state.stockCount = [] |
| | | if(item.mcList && item.mcList.length>0){ |
| | | for(let j in item.mcList){ |
| | | if(item.mcList[j].msList == null || item.mcList[j].msList.length==0){ |
| | | item.mcList.splice(j,1) |
| | | } |
| | | } |
| | | state.materialDetail = item.mcList |
| | | for(let i in state.materialDetail){ |
| | | state.addList.push( |
| | | { |
| | | materialId: state.materialDetail[i].materialId, |
| | | depId: null, |
| | | depName: '', |
| | | useCount: null |
| | | } |
| | | ) |
| | | for(let x in state.materialDetail[i].msList){ |
| | | if(state.materialDetail[i].msList[x].depId == userInfos.value.depId){ |
| | | state.addList[i].depId = userInfos.value.depId |
| | | state.addList[i].depName = state.materialDetail[i].msList[x].depName |
| | | state.stockCount[i] = state.materialDetail[i].msList.find((e) => e.depId == state.addList[i].depId).stockCount |
| | | } |
| | | } |
| | | } |
| | | } |
| | | const data = {maBaseId: state.chosenId,receiveUids:state.receiveUids} |
| | | const res = await workApplyApi().getMaterialDetail(data) |
| | | if (res.data.code === '200') { |
| | | if(res.data.data && res.data.data.length>0){ |
| | | state.materialDetail = res.data.data |
| | | state.equipDetailDialog = true |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '暂时查询不到物资标准信息' |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | // state.stockCount = [] |
| | | // if(item.mcList && item.mcList.length>0){ |
| | | // for(let j in item.mcList){ |
| | | // if(item.mcList[j].msList == null || item.mcList[j].msList.length==0){ |
| | | // item.mcList.splice(j,1) |
| | | // } |
| | | // } |
| | | // state.materialDetail = item.mcList |
| | | // for(let i in state.materialDetail){ |
| | | // state.addList.push( |
| | | // { |
| | | // materialId: state.materialDetail[i].materialId, |
| | | // depId: null, |
| | | // depName: '', |
| | | // useCount: null |
| | | // } |
| | | // ) |
| | | // for(let x in state.materialDetail[i].msList){ |
| | | // if(state.materialDetail[i].msList[x].depId == userInfos.value.depId){ |
| | | // state.addList[i].depId = userInfos.value.depId |
| | | // state.addList[i].depName = state.materialDetail[i].msList[x].depName |
| | | // state.stockCount[i] = state.materialDetail[i].msList.find((e) => e.depId == state.addList[i].depId).stockCount |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | const changeReceiver = async ()=>{ |
| | | const data = {maBaseId: state.chosenId,receiveUids:state.receiveUids} |
| | | const res = await workApplyApi().getMaterialDetail(data) |
| | | if (res.data.code === '200') { |
| | | if(res.data.data && res.data.data.length>0){ |
| | | state.materialDetail = res.data.data |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '暂时查询不到物资标准信息' |
| | | }); |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | const openDetail = ()=>{ |
| | | console.log(state.addList,'打开弹窗') |
| | | } |
| | | |
| | | const changeDep = (val:number,index:number)=>{ |
| | | state.addList[index].depName = state.materialDetail[index].msList.find((i) => i.depId == val).depName |
| | | state.stockCount[index] = state.materialDetail[index].msList.find((i) => i.depId == val).stockCount |
| | | } |
| | | const submitMaterials = ()=>{ |
| | | if(state.addList.length > 0 && (state.addList.some((e) => e.depId == null && e.useCount != null ) || state.addList.some((e) => e.useCount == null && e.depId != null))){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '出库部门或实际使用值不可为空' |
| | | }); |
| | | return |
| | | } |
| | | for(let i in state.materialDetail){ |
| | | if(state.materialDetail[i].configurationLevelName == '必选' && state.addList[i].depId != null && state.addList[i].useCount <= 0){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '必选物资数量不能小于等于0' |
| | | }); |
| | | return |
| | | } |
| | | if((state.stockCount[i] !=null && state.addList[i].useCount !=null) && (state.stockCount[i] < state.addList[i].useCount)){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '物资配置数量超出库存量,请重新配置' |
| | | }); |
| | | return |
| | | } |
| | | } |
| | | // if(state.addList.length > 0 && (state.addList.some((e) => e.depId == null && e.useCount != null ) || state.addList.some((e) => e.useCount == null && e.depId != null))){ |
| | | // ElMessage({ |
| | | // type: 'warning', |
| | | // message: '出库部门或实际使用值不可为空' |
| | | // }); |
| | | // return |
| | | // } |
| | | // for(let i in state.materialDetail){ |
| | | // if(state.materialDetail[i].configurationLevelName == '必选' && state.addList[i].depId != null && state.addList[i].useCount <= 0){ |
| | | // ElMessage({ |
| | | // type: 'warning', |
| | | // message: '必选物资数量不能小于等于0' |
| | | // }); |
| | | // return |
| | | // } |
| | | // if((state.stockCount[i] !=null && state.addList[i].useCount !=null) && (state.stockCount[i] < state.addList[i].useCount)){ |
| | | // ElMessage({ |
| | | // type: 'warning', |
| | | // message: '物资配置数量超出库存量,请重新配置' |
| | | // }); |
| | | // return |
| | | // } |
| | | // } |
| | | // if(state.addList.length > 0){ |
| | | // for(let n in state.addList){ |
| | | // if(state.addList[n].depId == null && state.addList[n].useCount == null){ |
| | |
| | | // } |
| | | // } |
| | | // } |
| | | console.log(state.addList,state.chosenId,'666666666') |
| | | context.emit('conFirmMaterials',state.addList,state.chosenId) |
| | | console.log(state.receiveUids,state.chosenId,'666666666') |
| | | context.emit('conFirmMaterials',state.receiveUids,state.chosenId) |
| | | state.equipDetailDialog = false |
| | | state.equipmentDialog = false |
| | | } |
| | |
| | | } |
| | | const closeChoose = () =>{ |
| | | state.equipDetailDialog = false |
| | | state.equipmentDialog = false |
| | | } |
| | | return { |
| | | ...toRefs(state), |
| | | changeDep, |
| | | getMaList, |
| | | openList, |
| | | changeReceiver, |
| | | openDetail, |
| | | closeChoose, |
| | | closeMaterial, |
| | |
| | | .table{ |
| | | width: 100%; |
| | | border-collapse: collapse; |
| | | margin-top: 20px; |
| | | tr{ |
| | | width: 100%; |
| | | border: 1px solid #ccc; |
| | | th,td{ |
| | | padding: 6px 0; |
| | | border-left: 1px solid #ccc; |
| | | &:first-of-type{ |
| | | border-left: none; |
| | | } |
| | | } |
| | | th{ |
| | | padding: 10px 0; |
| | | td{ |
| | | font-weight: bolder; |
| | | } |
| | | |
| | |
| | | width: 20%; |
| | | text-align: center; |
| | | } |
| | | .w-25{ |
| | | width: 25%; |
| | | text-align: center; |
| | | } |
| | | .w-30{ |
| | | width: 30%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), |
| | | }, |
| | | props:['workerList'], |
| | | setup() { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | |
| | | workLevel: null, |
| | | workContent: '', |
| | | workLocation: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | hazardIdentification: '', |
| | | workDetail:{ |
| | | bpCode: '', |
| | |
| | | uninstallBpTime: '', |
| | | otherSpecialWork: [] |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | // } |
| | | // } |
| | | const openMaList = ()=>{ |
| | | if(state.form.workLevel == null){ |
| | | if(state.form.workLevel == null || state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业等级再获取相应物资配置' |
| | | message: '请先选择作业人和作业等级再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | material.value.equipmentDialog = true |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | |
| | | |
| | | interface stateType { |
| | | form: Object, |
| | | workLevelList: Array<any>, |
| | | equipmentDialog: boolean |
| | | } |
| | | export default defineComponent({ |
| | |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), |
| | | }, |
| | | props:['workerList'], |
| | | setup() { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | |
| | | workLevel: 0, |
| | | workContent: '', |
| | | workLocation: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | hazardIdentification: '', |
| | | workDetail:{ |
| | | powerAccessPoint: '', |
| | | workingVoltage: null, |
| | | equipmentAndPower: '' |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | | }, |
| | | workLevelList: [ |
| | | { |
| | | label: "一级吊装作业", |
| | | value: 8 |
| | | }, |
| | | { |
| | | label: "二级吊装作业", |
| | | value: 9 |
| | | }, |
| | | { |
| | | label: "三级吊装作业", |
| | | value: 10 |
| | | } |
| | | ] |
| | | }); |
| | | const material = ref() |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const applyRules = reactive<FormRules>({ |
| | | operatorUids: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | hazardIdentification: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | |
| | | // } |
| | | |
| | | const openMaList = ()=>{ |
| | | if(state.form.workLevel == null){ |
| | | if(state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业等级再获取相应物资配置' |
| | | message: '请先选择作业人再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | material.value.equipmentDialog = true |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | |
| | | |
| | | interface stateType { |
| | | form: Object, |
| | | csDepList: Array<any>, |
| | |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')), |
| | | }, |
| | | props:['workerList','departList'], |
| | | setup() { |
| | | setup(props: any, context: any) { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | |
| | | form: { |
| | | operatorUids: [], |
| | | workType: 2, |
| | | workLevel: null, |
| | | workLevel: 0, |
| | | workContent: '', |
| | | workLocation: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | hazardIdentification: '', |
| | | workDetail:{ |
| | | csDepId: null, |
| | |
| | | csOriginalName: '', |
| | | otherSpecialWork: [] |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | // } |
| | | |
| | | const openMaList = ()=>{ |
| | | material.value.equipmentDialog = true |
| | | if(state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业人再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | } |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-tabs type="border-card"> |
| | | <el-tabs type="border-card" @tab-change="switchTab"> |
| | | <el-tab-pane label="动火作业"> |
| | | <fire-form :workerList = allWorkers></fire-form> |
| | | <fire-form ref="fire" :workerList = allWorkers></fire-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="受限空间作业"> |
| | | <space-form :workerList = allWorkers :departList = departmentList></space-form> |
| | | <space-form ref="space" :workerList = allWorkers :departList = departmentList></space-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="吊装作业"> |
| | | <hoist-form :workerList = allWorkers></hoist-form> |
| | | <hoist-form ref="hoist" :workerList = allWorkers></hoist-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="动土作业"> |
| | | <ground-form :workerList = allWorkers :departList = departmentList></ground-form> |
| | | <ground-form ref="ground" :workerList = allWorkers :departList = departmentList></ground-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="断路作业"> |
| | | <broken-form :workerList = allWorkers :departList = departmentList></broken-form> |
| | | <broken-form ref="broken" :workerList = allWorkers :departList = departmentList></broken-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="高处作业"> |
| | | <height-form :workerList = allWorkers :departList = departmentList></height-form> |
| | | <height-form ref="height" :workerList = allWorkers :departList = departmentList></height-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="临时用电作业"> |
| | | <power-form :workerList = allWorkers></power-form> |
| | | <power-form ref="power" :workerList = allWorkers></power-form> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="盲板抽堵作业"> |
| | | <plate-form :workerList = allWorkers></plate-form> |
| | | <plate-form ref="plate" :workerList = allWorkers></plate-form> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <material-dialog ref="material"></material-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | brokenForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/broken.vue')), |
| | | heightForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/height.vue')), |
| | | powerForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/power.vue')), |
| | | plateForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/plate.vue')) |
| | | plateForm: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/plate.vue')), |
| | | materialDialog: defineAsyncComponent(() => import('/@/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue')) |
| | | }, |
| | | setup() { |
| | | const userInfo = useUserInfo() |
| | |
| | | allWorkers: [], |
| | | departmentList: [] |
| | | }); |
| | | |
| | | const fire = ref() |
| | | const space = ref() |
| | | const hoist = ref() |
| | | const ground = ref() |
| | | const broken = ref() |
| | | const height = ref() |
| | | const power = ref() |
| | | const plate = ref() |
| | | const material = ref() |
| | | // 获取用户列表 |
| | | const getAll = async ()=>{ |
| | | const res = await workApplyApi().getAllUsers() |
| | |
| | | } |
| | | }; |
| | | |
| | | const switchTab = (name)=>{ |
| | | console.log(name,'name') |
| | | fire.value.form.resetFields() |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } |
| | | |
| | | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | getAll(); |
| | |
| | | |
| | | return { |
| | | ...toRefs(state), |
| | | fire, |
| | | space, |
| | | broken, |
| | | ground, |
| | | height, |
| | | hoist, |
| | | plate, |
| | | power, |
| | | material, |
| | | switchTab |
| | | }; |
| | | }, |
| | | }); |