From 6ca4914a18d1b1561e537674292cf9374791de7c Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期二, 20 十二月 2022 17:23:40 +0800
Subject: [PATCH] Default Changelist
---
src/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue | 246 ++++++++++++--------
src/views/specialWorkSystem/workTicket/zysq/components/broken.vue | 47 ++-
src/views/specialWorkSystem/workTicket/zysq/components/height.vue | 38 +-
src/views/specialWorkSystem/workTicket/zysq/components/plate.vue | 38 +-
src/views/specialWorkSystem/workTicket/zysq/components/space.vue | 44 +-
src/views/specialWorkSystem/workTicket/zysq/components/hoist.vue | 39 +-
src/views/specialWorkSystem/workTicket/zysq/components/power.vue | 57 +---
src/api/specialWorkSystem/workApply/index.ts | 9
src/views/newHome/index.vue | 30 +-
src/views/specialWorkSystem/workTicket/zysq/components/ground.vue | 40 +-
src/views/specialWorkSystem/workTicket/zysq/index.vue | 50 +++
src/views/specialWorkSystem/workTicket/zysq/components/fire.vue | 36 +-
12 files changed, 366 insertions(+), 308 deletions(-)
diff --git a/src/api/specialWorkSystem/workApply/index.ts b/src/api/specialWorkSystem/workApply/index.ts
index 1286cbe..6258f0e 100644
--- a/src/api/specialWorkSystem/workApply/index.ts
+++ b/src/api/specialWorkSystem/workApply/index.ts
@@ -176,6 +176,15 @@
method: 'post',
data: data
});
+ },
+
+ // 根据物资配置id和领取人获取领取情况
+ getMaterialDetail: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/specialWork/material/receive`,
+ method: 'post',
+ data: data
+ });
}
};
}
diff --git a/src/views/newHome/index.vue b/src/views/newHome/index.vue
index f93269a..8450675 100644
--- a/src/views/newHome/index.vue
+++ b/src/views/newHome/index.vue
@@ -452,7 +452,7 @@
transform: translateY(0);
}
}
-@media screen and (min-width: 1400px) {
+@media screen and (min-width: 1600px) {
.gridCont {
width: 100%;
height: 100%;
@@ -520,7 +520,7 @@
}
.itemTit1 {
- font-size: 34px;
+ font-size: 32px;
line-height: 42px;
height: 40%;
letter-spacing: 1px;
@@ -528,7 +528,7 @@
margin-bottom: 12px;
}
.enTit1 {
- font-size: 20px;
+ font-size: 18px;
line-height: 24px;
color: #072270;
}
@@ -548,7 +548,7 @@
}
}
-@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%;
@@ -570,14 +570,14 @@
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;
}
@@ -616,7 +616,7 @@
}
.itemTit1 {
- font-size: 28px;
+ font-size: 24px;
line-height: 36px;
height: 40%;
letter-spacing: 1px;
@@ -624,7 +624,7 @@
margin-bottom: 12px;
}
.enTit1 {
- font-size: 16px;
+ font-size: 14px;
color: #072270;
}
}
@@ -663,12 +663,12 @@
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;
}
@@ -708,7 +708,7 @@
}
.itemTit1 {
- font-size: 24px;
+ font-size: 16px;
line-height: 36px;
height: 40%;
letter-spacing: 1px;
@@ -716,7 +716,7 @@
margin-bottom: 12px;
}
.enTit1 {
- font-size: 14px;
+ font-size: 12px;
color: #072270;
}
}
@@ -822,7 +822,7 @@
position: absolute;
left: -100px;
top: 0;
- width: 240px;
+ width: 220px;
height: 100%;
z-index: 99;
background: url('../../assets/newMenu/leftbg.png') no-repeat center;
@@ -901,12 +901,12 @@
}
}
.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;
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue b/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue
index 8378a7c..da141bb 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/broken.vue
@@ -138,7 +138,7 @@
</template>
<script lang="ts">
- import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+import {toRefs, reactive, defineComponent, ref, defineAsyncComponent} from 'vue';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
import {useUserInfo} from "/@/stores/userInfo";
@@ -170,18 +170,18 @@
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: '',
@@ -189,7 +189,7 @@
bcPath: [],
involvedDepIds: []
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -230,7 +230,8 @@
emitPath: false,
value: 'depId',
label: 'depName',
- multiple: true
+ multiple: true,
+ expandTrigger: 'hover'
},
casProps2: {
emitPath: false,
@@ -264,22 +265,24 @@
// }
const openMaList = ()=>{
- material.value.equipmentDialog = true
- 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])
- }
+ 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)
+ 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) => {
@@ -313,8 +316,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/fire.vue b/src/views/specialWorkSystem/workTicket/zysq/components/fire.vue
index b31069e..9af9738 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/fire.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/fire.vue
@@ -138,7 +138,7 @@
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>({
@@ -149,13 +149,13 @@
workLevel: null,
workContent: '',
workLocation: '',
- maId: null,
+ maBaseId: null,
hazardIdentification: '',
workDetail:{
hotMethod: '',
otherSpecialWork: []
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -232,28 +232,24 @@
// }
// }
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
@@ -283,8 +279,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue b/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue
index 9b16ea0..26a089b 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/ground.vue
@@ -151,7 +151,6 @@
import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
import axios from 'axios';
-
interface stateType {
equipmentDialog: boolean,
form: Object,
@@ -182,11 +181,11 @@
form: {
operatorUids: [],
workType: 4,
- workLevel: null,
+ workLevel: 0,
workContent: '',
workLocation: '',
hazardIdentification: '',
- maId: null,
+ maBaseId: null,
workDetail:{
operationDepId: null,
gbScope: '',
@@ -194,7 +193,7 @@
gbPath: [],
otherSpecialWork: []
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -295,21 +294,24 @@
// }
const openMaList = ()=>{
- material.value.equipmentDialog = true
- 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])
- }
+ 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)
+ 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) => {
@@ -343,8 +345,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/height.vue b/src/views/specialWorkSystem/workTicket/zysq/components/height.vue
index eed8f97..0fcee6b 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/height.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/height.vue
@@ -131,7 +131,7 @@
</template>
<script lang="ts">
- import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+import {toRefs, reactive, defineComponent, ref, defineAsyncComponent} from 'vue';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
import {useUserInfo} from "/@/stores/userInfo";
@@ -157,7 +157,7 @@
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>({
@@ -169,13 +169,13 @@
workContent: '',
workLocation: '',
hazardIdentification: '',
- maId: null,
+ maBaseId: null,
workDetail:{
operationDepId: '',
operationHeight: null,
otherSpecialWork: []
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -297,28 +297,24 @@
// }
// }
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) => {
@@ -342,8 +338,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/hoist.vue b/src/views/specialWorkSystem/workTicket/zysq/components/hoist.vue
index 188beab..f9ae96f 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/hoist.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/hoist.vue
@@ -116,7 +116,7 @@
</template>
<script lang="ts">
- import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+import {toRefs, reactive, defineComponent, ref, defineAsyncComponent} from 'vue';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
import {useUserInfo} from "/@/stores/userInfo";
@@ -125,7 +125,6 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
-
interface stateType {
equipmentDialog: boolean,
@@ -138,7 +137,7 @@
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>({
@@ -149,13 +148,13 @@
workLevel: null,
workContent: '',
workLocation: '',
- maId: null,
+ maBaseId: null,
hazardIdentification: '',
workDetail:{
hoistingToolName: '',
weightMass: null
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -195,28 +194,24 @@
// }
// }
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
@@ -239,8 +234,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue b/src/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue
index 3dbb18e..384515a 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/materialDialog.vue
@@ -5,38 +5,54 @@
<el-button @click="openList(item)" type="success">选用</el-button>
</div>
- <el-dialog v-model="equipDetailDialog" title="物资标准详情" width="40%" center @open="openDetail" >
- <table class="table">
- <tr>
- <th class="w-20">物资名称</th>
- <th class="w-20">出库部门(仓库)</th>
- <th class="w-15">对应库存</th>
- <th class="w-15">标准值</th>
- <th class="w-15">级别</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-15">{{item.standVal}}</td>
- <td class="w-15">{{item.configurationLevelName}}</td>
- <td class="w-15">
- <el-input type="number" v-model.number="addList[index].useCount"/>
- </td>
- </tr>
- </table>
+ <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-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-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">
+ {{item.receiveCount}}
+ </td>
+ </tr>
+ </table>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeChoose()" size="default">取消</el-button>
@@ -56,8 +72,8 @@
equipDetailDialog: boolean
materialDetail: Array<any>
stockCount: Array<number>
- addList: Array<any>
- chosenId: number | null
+ chosenId: number | null,
+ receiveUids: Array<number>
}
@@ -66,9 +82,10 @@
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();
@@ -79,7 +96,7 @@
equipDetailDialog: false,
materialDetail: [],
stockCount: [],
- addList: []
+ receiveUids: []
});
// 确认物资标准
@@ -89,85 +106,112 @@
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)
- }
+ 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: '暂时查询不到物资标准信息'
+ });
}
- 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
- }
- }
- }
- }
- state.equipDetailDialog = true
- }
-
- 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))){
+ } else {
ElMessage({
type: 'warning',
- message: '出库部门或实际使用值不可为空'
+ message: res.data.msg
});
- return
}
- for(let i in state.materialDetail){
- if(state.materialDetail[i].configurationLevelName == '必选' && state.addList[i].depId != null && state.addList[i].useCount <= 0){
+ // 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: '必选物资数量不能小于等于0'
+ message: '暂时查询不到物资标准信息'
});
- return
}
- if((state.stockCount[i] !=null && state.addList[i].useCount !=null) && (state.stockCount[i] < state.addList[i].useCount)){
- ElMessage({
- type: 'warning',
- message: '物资配置数量超出库存量,请重新配置'
- });
- return
- }
+ } else {
+ ElMessage({
+ type: 'warning',
+ message: res.data.msg
+ });
}
+ }
+ const openDetail = ()=>{
+ }
+ 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){
// for(let n in state.addList){
// if(state.addList[n].depId == null && state.addList[n].useCount == null){
@@ -175,8 +219,8 @@
// }
// }
// }
- 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
}
@@ -186,13 +230,12 @@
}
const closeChoose = () =>{
state.equipDetailDialog = false
- state.equipmentDialog = false
}
return {
...toRefs(state),
- changeDep,
getMaList,
openList,
+ changeReceiver,
openDetail,
closeChoose,
closeMaterial,
@@ -214,17 +257,18 @@
.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;
}
@@ -236,6 +280,14 @@
width: 20%;
text-align: center;
}
+ .w-25{
+ width: 25%;
+ text-align: center;
+ }
+ .w-30{
+ width: 30%;
+ text-align: center;
+ }
}
}
</style>
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/plate.vue b/src/views/specialWorkSystem/workTicket/zysq/components/plate.vue
index 46e0656..f0e9544 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/plate.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/plate.vue
@@ -215,7 +215,7 @@
</template>
<script lang="ts">
- import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+import {toRefs, reactive, defineComponent, ref, defineAsyncComponent} from 'vue';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
import {useUserInfo} from "/@/stores/userInfo";
@@ -248,7 +248,7 @@
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>({
@@ -259,7 +259,7 @@
workLevel: null,
workContent: '',
workLocation: '',
- maId: null,
+ maBaseId: null,
hazardIdentification: '',
workDetail:{
bpCode: '',
@@ -275,7 +275,7 @@
uninstallBpTime: '',
otherSpecialWork: []
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -384,28 +384,24 @@
// }
// }
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
@@ -437,8 +433,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/power.vue b/src/views/specialWorkSystem/workTicket/zysq/components/power.vue
index 8f4d84e..07d84b4 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/power.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/power.vue
@@ -114,7 +114,7 @@
</template>
<script lang="ts">
- import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+import {toRefs, reactive, defineComponent, ref, defineAsyncComponent} from 'vue';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
import {useUserInfo} from "/@/stores/userInfo";
@@ -124,10 +124,8 @@
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({
@@ -136,7 +134,7 @@
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>({
@@ -147,39 +145,24 @@
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' }],
@@ -196,28 +179,24 @@
// }
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) => {
@@ -241,8 +220,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/components/space.vue b/src/views/specialWorkSystem/workTicket/zysq/components/space.vue
index 73b9e4f..a474192 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/components/space.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/components/space.vue
@@ -125,7 +125,7 @@
</template>
<script lang="ts">
- import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';
+import {toRefs, reactive, defineComponent, ref, defineAsyncComponent} from 'vue';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
import {useUserInfo} from "/@/stores/userInfo";
@@ -134,7 +134,6 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
import { workApplyApi } from '/@/api/specialWorkSystem/workApply';
-
interface stateType {
form: Object,
@@ -149,7 +148,7 @@
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>({
@@ -157,10 +156,10 @@
form: {
operatorUids: [],
workType: 2,
- workLevel: null,
+ workLevel: 0,
workContent: '',
workLocation: '',
- maId: null,
+ maBaseId: null,
hazardIdentification: '',
workDetail:{
csDepId: null,
@@ -168,7 +167,7 @@
csOriginalName: '',
otherSpecialWork: []
},
- wmAddReqDTOList: [],
+ receiveUids: [],
workTimeLine: [],
expStartTime: '',
expEndTime: ''
@@ -263,21 +262,24 @@
// }
const openMaList = ()=>{
- material.value.equipmentDialog = true
- 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])
- }
+ 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)
+ 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) => {
@@ -302,8 +304,8 @@
message: res.data.msg
});
}
- state.form.maId = null
- state.form.wmAddReqDTOList = []
+ material.value.maBaseId = null
+ material.value.receiveUids = []
} else {
console.log('error submit!', fields)
}
diff --git a/src/views/specialWorkSystem/workTicket/zysq/index.vue b/src/views/specialWorkSystem/workTicket/zysq/index.vue
index 6a6906b..fea4f09 100644
--- a/src/views/specialWorkSystem/workTicket/zysq/index.vue
+++ b/src/views/specialWorkSystem/workTicket/zysq/index.vue
@@ -1,31 +1,32 @@
<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>
@@ -55,7 +56,8 @@
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()
@@ -64,7 +66,15 @@
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()
@@ -91,6 +101,14 @@
}
};
+ const switchTab = (name)=>{
+ console.log(name,'name')
+ fire.value.form.resetFields()
+ material.value.maBaseId = null
+ material.value.receiveUids = []
+ }
+
+
// 页面载入时执行方法
onMounted(() => {
getAll();
@@ -99,6 +117,16 @@
return {
...toRefs(state),
+ fire,
+ space,
+ broken,
+ ground,
+ height,
+ hoist,
+ plate,
+ power,
+ material,
+ switchTab
};
},
});
--
Gitblit v1.9.2