ソースを参照

维修物料处理

lipenghui 1 週間 前
コミット
446fbdf092
1 ファイル変更2 行追加10 行削除
  1. 2 10
      src/views/pms/maintain/IotMaintainAddEdit.vue

+ 2 - 10
src/views/pms/maintain/IotMaintainAddEdit.vue

@@ -265,7 +265,7 @@
   </ContentWrap>
 
 
-  <ContentWrap>
+  <ContentWrap v-loading="formLoading">
     <ContentWrap>
       <!-- 搜索工作栏 -->
       <el-form class="-mb-15px" ref="queryFormRef" :inline="true" label-width="68px">
@@ -333,7 +333,7 @@
     <ChooseMaintain ref="maintainFormRef" @choose="maintainChoose" />
   </ContentWrap>
 
-  <ContentWrap v-if="materialIfShow">
+  <ContentWrap v-loading="formLoading" v-if="materialIfShow">
     <ContentWrap>
       <!-- 搜索工作栏 -->
       <el-form class="-mb-15px" ref="queryFormRef" :inline="true" label-width="68px">
@@ -560,7 +560,6 @@ const handleIfNeedChange = (row) =>{
   } else {
     materialIfShow.value = false
     //关闭的同时清除该维修项的物料
-    debugger
     materialList.value = materialList.value.filter(item => item.bomNodeId !== row.bomNodeId);
     const targetItem = list.value.find(item => item.bomNodeId === row.bomNodeId);
     if (targetItem) {
@@ -638,7 +637,6 @@ const handleRowClick = (row: any) => {
   }
   // 保留原有的点击逻辑(如果有的话)
   console.log('点击了行:', selectedRowId.value)
-  debugger
   if (selectedRow.value === null) {
     filteredMaterials.value = materialList.value;
   } else {
@@ -666,7 +664,6 @@ const typeChange = async () =>{
       applyPeoPle.value = res
     })
     await IotMaintainApi.getProjectUsers("").then((res) => {
-      debugger
       projectManager.value = res
     })
   }
@@ -791,7 +788,6 @@ const materialDelete = (row) =>{
   totalFee.value = 0
   const index = materialList.value.findIndex((item) => item.bomNodeId === selectedRowId.value&&item.materialCode===row.materialCode)
   const filterIndex = filteredMaterials.value.findIndex((item) => item.bomNodeId === selectedRowId.value&&item.materialCode===row.materialCode)
-  debugger
   if (index>-1) {
     materialList.value.splice(index,1)
   }
@@ -815,7 +811,6 @@ const materialList = ref<IotMainWorkOrderBomMaterialVO[]>([]) // 保养工单bom
 const bomNodeId = ref() // 最新的bomNodeId
 
 const selectChoose = (selectedMaterial) => {
-  debugger
   selectedMaterial.bomNodeId = bomNodeId.value
   // 关联 bomNodeId
   const processedMaterials = selectedMaterial.map((material) => ({
@@ -910,7 +905,6 @@ const submitForm = async () => {
       maintain: formData.value,
       maintainMaterials: list.value
     }
-    debugger
     if (formType.value === 'create') {
       await IotMaintainApi.createIotMaintain(data)
       message.success(t('common.createSuccess'))
@@ -968,7 +962,6 @@ onMounted(async () => {
         applyPeoPle.value = res
       })
       await IotMaintainApi.getProjectUsers("").then((res) => {
-        debugger
         projectManager.value = res
       })
     }
@@ -985,7 +978,6 @@ const handleDelete = async (id: number) => {
       list.value.splice(index, 1)
       materialList.value = materialList.value.filter((item) => item.bomNodeId !== id)
       totalFee.value = 0
-      debugger
       // list.value.forEach(item => {
       //   // item.materials = item.materials.filter(item => item.bomNodeId !== id);
       //   item.materials.forEach((it) => {