Răsfoiți Sursa

pms 设备bom关联维修保养

zhangcl 2 luni în urmă
părinte
comite
1cebbc5d8a

+ 3 - 1
src/views/pms/iotmainworkorder/IotMainWorkOrderAdd.vue

@@ -625,6 +625,7 @@ const deviceChoose = async(selectedDevices) => {
     deviceIds: deviceIds.value.join(',') // 明确传递数组参数
   }
   queryParams.deviceIds = JSON.parse(JSON.stringify(params.deviceIds))
+  queryParams.bomFlag = 'b'
   // 根据选择的设备筛选出设备关系的分类BOM中与保养相关的节点项
   const res = await IotDeviceApi.deviceAssociateBomList(queryParams)
   const rawData = res || []
@@ -774,7 +775,8 @@ const handleInput = (value, obj) => {
 
 const queryParams = reactive({
   deviceIds: undefined,
-  workOrderId: id
+  workOrderId: id,
+  bomFlag: 'b'
 })
 
 const close = () => {

+ 3 - 1
src/views/pms/maintain/material/ChooseMaintain.vue

@@ -111,7 +111,8 @@ const tableRef = ref()
 const queryParams = reactive({
   pageNo: 1,
   pageSize: 10,
-  deviceIds: []
+  deviceIds: [],
+  bomFlag: 'w'
 })
 const props = defineProps({
   deptId: propTypes.number.def(undefined)
@@ -180,6 +181,7 @@ const open = async (type: string, id?: number) => {
   dialogVisible.value = true
   queryParams.deviceIds = []
   queryParams.deviceIds.push(id)
+  queryParams.bomFlag = 'w'
   list.value = []
   await getList()
 }

+ 3 - 1
src/views/pms/maintenance/IotMaintenancePlan.vue

@@ -503,7 +503,8 @@ const saveConfig = () => {
 
 const queryParams = reactive({
   deviceIds: undefined,
-  planId: id
+  planId: id,
+  bomFlag: 'b'
 })
 
 /**
@@ -555,6 +556,7 @@ const deviceChoose = async(selectedDevices) => {
     deviceIds: newIds.join(',') // 明确传递数组参数
   }
   queryParams.deviceIds = JSON.parse(JSON.stringify(params.deviceIds))
+  queryParams.bomFlag = 'b'
   // 根据选择的设备筛选出设备关系的分类BOM中与保养相关的节点项
   const res = await IotDeviceApi.deviceAssociateBomList(queryParams)
   const rawData = res || []