Просмотр исходного кода

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dengfei

695593266@qq.com 9 месяцев назад
Родитель
Сommit
923d5133a3
37 измененных файлов с 4333 добавлено и 452 удалено
  1. 94 0
      src/api/flowable/manage.js
  2. 101 0
      src/api/maintenance/classifyManage.js
  3. 171 0
      src/api/maintenance/outin.js
  4. 146 0
      src/api/maintenance/patrol_maintenance.js
  5. 114 0
      src/api/maintenance/plan.js
  6. 79 0
      src/api/maintenance/repair.js
  7. 36 0
      src/api/maintenance/repair_plan.js
  8. 122 0
      src/api/maintenance/repair_report.js
  9. 11 0
      src/api/produce/workOrder.js
  10. 9 0
      src/api/produceOrder/index.js
  11. 44 0
      src/api/producetaskrecordrulesrecord/index.js
  12. 46 0
      src/api/producetaskrulerecord/index.js
  13. 19 0
      src/api/recordRules/index.js
  14. 61 0
      src/api/ruleManagement/matter.js
  15. 116 0
      src/api/ruleManagement/plan.js
  16. 231 175
      src/components/common/seekPage.vue
  17. 4 0
      src/components/select/SelectUser/index.vue
  18. 2 2
      src/components/select/organization/components/org-user-edit.vue
  19. 4 1
      src/enum/dict.js
  20. 4 0
      src/store/modules/user.js
  21. 29 0
      src/views/batchRecord/after.vue
  22. 96 0
      src/views/batchRecord/before.vue
  23. 204 4
      src/views/batchRecord/index.vue
  24. 24 0
      src/views/batchRecord/process.vue
  25. 12 12
      src/views/home/data.js
  26. 118 59
      src/views/produce/components/footBtn.vue
  27. 25 1
      src/views/produce/components/new_produceOrder.vue
  28. 296 0
      src/views/produce/components/prenatalExamination/ProductModal.vue
  29. 206 0
      src/views/produce/components/prenatalExamination/index.vue
  30. 242 0
      src/views/produce/components/prenatalExamination/operationGuideDialog.vue
  31. 114 0
      src/views/produce/components/prenatalExamination/product-search.vue
  32. 765 0
      src/views/produce/components/prenatalExamination/programRulesDialog.vue
  33. 559 0
      src/views/produce/components/prenatalExamination/releaseRulesDialog.vue
  34. 69 2
      src/views/produce/index.vue
  35. 15 0
      src/views/produceOrder/index.vue
  36. 143 195
      src/views/produceOrder/print.vue
  37. 2 1
      vue.config.js

+ 94 - 0
src/api/flowable/manage.js

@@ -0,0 +1,94 @@
+import request from '@/utils/request';
+import { Message } from 'element-ui';
+
+export function postAction(url, parameter) {
+  return request({
+    url: url,
+    method: 'post',
+    data: parameter
+  });
+}
+
+export async function listDictionaries() {
+  const res = await request.get('/system/dict/getPage', {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+export function httpAction(url, parameter, method) {
+  return request({
+    url: url,
+    method: method,
+    data: parameter
+  });
+}
+
+export function putAction(url, parameter) {
+  return request({
+    url: url,
+    method: 'put',
+    data: parameter
+  });
+}
+
+export function getAction(url, parameter) {
+  return request({
+    url: url,
+    method: 'get',
+    params: parameter
+  });
+}
+
+export function downloadAction(url, method, parameter, filename) {
+  return request({
+    url: url,
+    method: method,
+    params: parameter,
+    responseType: 'blob'
+  })
+    .then((response) => {
+      const type = response.type || '';
+      if (type.includes('application/json')) {
+        let reader = new FileReader();
+        reader.onload = (e) => {
+          if (e.target.readyState === 2) {
+            let res = {};
+            res = JSON.parse(e.target.result);
+            Message.error(res.message);
+          }
+        };
+        reader.readAsText(response);
+      } else {
+        filename = decodeURI(filename);
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(response, filename);
+        } else {
+          var blobURL = window.URL.createObjectURL(response); // 将blob对象转为一个URL
+          var tempLink = document.createElement('a'); // 创建一个a标签
+          tempLink.style.display = 'none';
+          tempLink.href = blobURL;
+          tempLink.setAttribute('download', filename); // 给a标签添加下载属性
+          if (typeof tempLink.download === 'undefined') {
+            tempLink.setAttribute('target', '_blank');
+          }
+          document.body.appendChild(tempLink); // 将a标签添加到body当中
+          tempLink.click(); // 启动下载
+          document.body.removeChild(tempLink); // 下载完毕删除a标签
+          window.URL.revokeObjectURL(blobURL);
+        }
+      }
+    })
+    .catch((error) => {
+      console.log(error);
+    });
+}
+
+export function deleteAction(url, parameter) {
+  return request({
+    url: url,
+    method: 'delete',
+    params: parameter
+  });
+}

+ 101 - 0
src/api/maintenance/classifyManage.js

@@ -0,0 +1,101 @@
+import request from '@/utils/request';
+
+export async function getSubPage(data) {
+  const res = await request.get('/main/categoryLevel/getSubPage', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function saveOrUpdate(data) {
+  const res = await request.post('/main/categoryLevel/saveOrUpdate', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 根据父级id查分类树
+export async function getTreeByPid(parentId) {
+  const res = await request.get(`/main/categoryLevel/getTreeByPid/${parentId}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 查询所有物品分类
+export async function allCategoryLevel() {
+  const res = await request.get(`/main/categoryLevel/allCategoryLevel`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 根据type查分类树组
+export async function getTreeByGroup(data) {
+  const res = await request.get(`/main/categoryLevel/getProduceTreeByPid`, {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 根据类型查分类树
+export async function getTreeByType(type) {
+  const res = await request.get(`/main/categoryLevel/getTreeByType/${type}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 删除分类
+export async function deleteCategory(id) {
+  const res = await request.get(`/main/categoryLevel/delete/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//根据ID查询分类详情系信息
+export async function getInfoById(id) {
+  const res = await request.get(`/main/categoryLevel/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 批次明细
+
+export async function getBatchDetails(data) {
+  const res = await request.get(`/wms/outin/getBatchDetails`, { params: data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+export async function getDetailById(data) {
+  const res = await request.post(`/wms/outin/getDetailById`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 产品列表
+ */
+export async function getProductList(params) {
+  const res = await request.get(`/main/category/getList`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 171 - 0
src/api/maintenance/outin.js

@@ -0,0 +1,171 @@
+import request from '@/utils/request';
+
+export default {
+  //列表
+  list: async (params) => {
+    const res = await request.get('/wms/outin/page', { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //列表
+  getAssetNum: async (data) => {
+    const res = await request.post('/wms/outin/getAssetNum', data);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //保存
+  save: async (data) => {
+    const res = await request.post('/wms/outin/save', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //新保存
+  saveNew: async (data) => {
+    const res = await request.post('/wms/outin/saveNew', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //删除
+  delete: async (data) => {
+    const res = await request.delete('/wms/outin/delete', { data });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  },
+  //出库实时库存
+  getRealTimeInventory: async (params) => {
+    const res = await request.get(`/wms/outin/getRealTimeInventory`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //出库实时库存
+  pageeLedger: async (params) => {
+    const res = await request.get(`/wms/outin/getOutStock`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //出库物品实时库存
+  getoutDetail: async (params) => {
+    const res = await request.get(`/wms/outin/getOutDetail`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //详情
+  getById: async (id) => {
+    const res = await request.get(`/wms/outin/getById/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //出入库单-新增入库单信息
+  addInOut: async (data) => {
+    const res = await request.post('/wms/inout/addInOut', data);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  //列表
+  pageWms: async (params) => {
+    const res = await request.get('/wms/inout/page', { params });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+
+  //入库详情
+  getWms: async (id) => {
+    const res = await request.get(`/wms/inout/getInfoById/${id}`);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //库存台账-基本信息
+  getBasicInformation: async (categoryId) => {
+    const res = await request.get(
+      `/wms/outin/getBasicInformation/${categoryId}`
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+
+  //库存台账-库存明细
+
+  getInventoryDetails: async (params) => {
+    const res = await request.get(`/wms/outin/getInventoryDetails`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  //库存台账-库存明细-物料维度
+
+  getMaterielDetails: async (params) => {
+    const res = await request.get(`/wms/outin/getMaterielDetails`, {
+      params
+    });
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApproveQuality: async (params) => {
+    const res = await request.post(
+      `/bpm/outinApprove/qualityInspection`,
+      params
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApprove: async (params) => {
+    const res = await request.post(`/bpm/outApprove/submit`, params);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApproves: async (params) => {
+    const res = await request.post(`/bpm/outinApprove/submit`, params);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  outApprovesInside: async (params) => {
+    const res = await request.post(`/bpm/outApprove/submitInside`, params);
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+  },
+  update: async (params) => {
+    const res = await request.put(`/wms/outin/update`, params);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  updateOutInRecord: async (params) => {
+    const res = await request.post(`/wms/outin/updateOutInRecord`, params);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  },
+  getDetailByCode: async (params) => {
+    const res = await request.post(`/wms/outin/getDetailByCode`, params);
+    if (res.data.code == 0) {
+      return res.data;
+    }
+  }
+};

+ 146 - 0
src/api/maintenance/patrol_maintenance.js

@@ -0,0 +1,146 @@
+import request from '@/utils/request';
+
+// 计划分页
+export async function getPage(data) {
+  const res = await request.get('/eam/planmaintenance/page', { params: data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 更新或保存
+export async function saveOrUpdate(data) {
+  const res = await request.post('/eam/planmaintenance/saveOrUpdate', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 详情
+export async function getById(id) {
+  const res = await request.get(`/eam/planmaintenance/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 详情(维修)
+export async function getRepairInfoById(params) {
+  const res = await request.get(`/eam/planmaintenance/getRepairInfoById`, {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 撤回
+export async function revocation(id) {
+  const res = await request.get(`/eam/planmaintenance/revocation/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 撤回(量具送检)
+export async function revocationDelivery(id) {
+  const res = await request.get(`/eam/plan/revocation/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 查询未派单设备数据
+export async function getNotSendOrderList(planId) {
+  const res = await request.get(
+    `/eam/planmaintenance/getNotSendOrderList/${planId}`
+  );
+  if (res.data.code == 0) {
+    return res.data?.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 派单
+export async function sendOrder(data) {
+  const res = await request.get(`/eam/planmaintenance/sendOrder`, {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data?.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 工单分页
+export async function getWorkOrderPage(data) {
+  const res = await request.get('/eam/workordermaintenance/page', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 详情
+export async function getWordOrderDetail(workOrderId) {
+  const res = await request.get(
+    `/eam/workordermaintenance/maintenanceDetail/${workOrderId}`
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 工单转派
+export async function workOrderRotate(data) {
+  const res = await request.get('/eam/workordermaintenance/rotate', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+export async function addAssists(data) {
+  const res = await request.get('/eam/workordermaintenance/addAssists', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 删除量具送检计划
+export async function workOrderDelete(data) {
+  const res = await request.delete('/eam/plan/delete', { data });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 负责人已收
+export async function received(data) {
+  const res = await request.post('/eam/planTool/received', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 通过工单查询备品备件
+ */
+export async function getSpareParts(params) {
+  const res = await request.get(`/eam/workorder/getSpareParts`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 114 - 0
src/api/maintenance/plan.js

@@ -0,0 +1,114 @@
+import request from '@/utils/request';
+
+// 获取规则名称下拉
+export async function getRule (data) {
+	let par = new URLSearchParams(data);
+  const res = await request.get(`/main/ruleinfo/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取类别信息列表
+export async function getCategory (data) {
+  const res = await request.post(`/main/category/getList` , data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+// 获取实体列表分页
+export async function getAssetList (data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 巡点检计划配置新增或更新 
+export async function saveOrUpdate (data) {
+  const res = await request.post('/eam/planconfig/saveOrUpdate' , data );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取巡点检分页数据
+export async function planConfigPage (data) {
+	let par = new URLSearchParams(data);
+  const res = await request.get(`/eam/planconfig/page?`+ par , {} );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取详情  
+export async function getInfoById (id) {
+  const res = await request.get(`/eam/planconfig/getById/`+ id , {} );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除事项
+ */
+export async function removeRule(data) {
+  const res = await request.delete('/eam/planconfig/delete', { data } );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+// // 更新或保存
+// export async function saveOrUpdate (data) {
+//   const res = await request.post('/main/ruleinfo/saveOrEdit', data);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// // 生成编码
+// export async function getCode (code) {
+//   const res = await request.get(`/main/codemanage/getCode/` + code, {});
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// // 获取规则列表页
+// export async function getList (data) {
+// 	let par = new URLSearchParams(data);
+//   const res = await request.get(`/main/ruleinfo/page?` + par, {});
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// // 获取规则详情
+// export async function getDetail (id) {
+//   const res = await request.get(`/main/ruleinfo/getById/` + id, {});
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+
+
+
+
+

+ 79 - 0
src/api/maintenance/repair.js

@@ -0,0 +1,79 @@
+import request from '@/utils/request';
+
+// 分页
+export async function getWorkOrderList(data) {
+  const res = await request.get('/eam/workorder/getWorkOrderList', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 通过工单查询详情
+export async function getWorkOrderDetail(code) {
+  const res = await request.get('/eam/workorder/getWorkOrderDetail/' + code);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 申请备品备件
+
+export async function applySpareParts(data) {
+  const res = await request.post(`/eam/workorder/applySpareParts`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function save(data) {
+  const res = await request.post(`/eam/spare_parts_apply/add`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// // 详情
+export async function details(id) {
+  const res = await request.get(`/eam/spare_parts_apply/details/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+export async function startExecuting(params) {
+  const data = await request.post(`/eam/PdaWorkOrder/startExecuting`, params);
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(new Error(data.message));
+}
+
+// // 保存
+// export async function save (data) {
+//   const res = await request.post('/eam/repairrequest/save', data);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+// // 修改
+// export async function update (data) {
+//   const res = await request.post('/eam/repairrequest/update', data);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+// // 详情
+// export async function getById (id) {
+//   const res = await request.get(`/eam/repairrequest/getById/${id}`);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }

+ 36 - 0
src/api/maintenance/repair_plan.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request';
+
+// 分页
+export async function planRepairPage (data) {
+  const res = await request.get('/eam/planrepair/page', {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// // 保存
+// export async function save (data) {
+//   const res = await request.post('/eam/repairrequest/save', data);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+// // 修改
+// export async function update (data) {
+//   const res = await request.post('/eam/repairrequest/update', data);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+// // 详情
+// export async function getById (id) {
+//   const res = await request.get(`/eam/repairrequest/getById/${id}`);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }

+ 122 - 0
src/api/maintenance/repair_report.js

@@ -0,0 +1,122 @@
+import request from '@/utils/request';
+
+// 分页
+export async function getPage(data) {
+  const res = await request.get('/eam/repairrequest/page', { params: data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 保存
+export async function save(data) {
+  const res = await request.post('/eam/repairrequest/save', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 修改
+export async function update(data) {
+  const res = await request.put('/eam/repairrequest/update', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 详情
+export async function getRepairById(id) {
+  const res = await request.get(`/eam/repairrequest/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 详情(新)
+export async function getRepairInfoById(id) {
+  const res = await request.get(`/eam/repairrequest/getInfoById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 撤销
+export async function removeRequest(id) {
+  const res = await request.get(`/eam/repairrequest/delete/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 委外
+export async function addOutsource(data) {
+  const res = await request.post('/eam/outsourceworkorder/addOrEdit', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 委外工单列表
+export async function outsourceList(data) {
+  const res = await request.post('/eam/outsourceworkorder/getList', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取委外工单详情
+export async function getOutsourceInfo(id) {
+  const res = await request.get(`/eam/outsourceworkorder/info/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 委外工单驳回或验收
+export async function checkOrBack(data) {
+  const res = await request.post('/eam/outsourceworkorder/checkOrBack', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 维修计划新增
+export async function savePlanRepair(data) {
+  const res = await request.post('/eam/plan/save', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 获取计划详情
+export async function getPlanById(id) {
+  const res = await request.get(`/eam/outsourceworkorder/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 获取维修计划列表数据
+export async function getPlanList(data) {
+  const res = await request.get('/eam/plan/page', { params: data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 维修计划撤销
+export async function removePlan(data) {
+  const res = await request.delete(`/eam/plan/delete`, { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 11 - 0
src/api/produce/workOrder.js

@@ -364,3 +364,14 @@ export async function fileReleaseAPI(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 获取工单内所有产品,产品编码和产品名称
+export async function getAllProductInWorkOrder(params) {
+  const res = await request.get(`/mes/workorder/getAllProductInWorkOrder`, {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 9 - 0
src/api/produceOrder/index.js

@@ -248,3 +248,12 @@ export async function fieldModel(params) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 工艺卡打印信息
+export async function queryPrintV2(data) {
+  const res = await request.post(`/mes/workorder/queryPrintV2`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 44 - 0
src/api/producetaskrecordrulesrecord/index.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request';
+
+// 一键报工,新增或修改填写表单类型的执行记录,并修改状态为已执行
+export async function saveOrUpdateAndSubmit(body) {
+  const res = await request.post(
+    '/mes/producetaskrulerecord/saveOrUpdateAndSubmit',
+    body
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 缓存,新增或修改填写表单类型的执行记录
+export async function saveOrUpdate(body) {
+  const res = await request.post(
+    '/mes/producetaskrulerecord/saveOrUpdate',
+    body
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 一键报工,新增或修改填写表单类型的执行记录,并修改状态为已执行
+export async function logicDelete(id) {
+  const res = await request.delete(
+    '/mes/producetaskrulerecord/logicDeleteById/' + id
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+export async function getById(id) {
+  const res = await request.get('/mes/producetaskrulerecord/getById/' + id);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 46 - 0
src/api/producetaskrulerecord/index.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request';
+
+// 获取记录规则 /mes/producetaskrulerecord/getLastRuleRecords
+export async function getLastRuleRecords(data) {
+  const res = await request.post(
+    '/mes/producetaskrulerecord/getLastRuleRecords',
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 保存配置事项-事项规则执行记录表信息,并向EAM派单 /mes/producetaskrulerecord/saveRuleRecord
+export async function saveRuleRecord(data) {
+  const res = await request.post(
+    '/mes/producetaskrulerecord/saveRuleRecord',
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 产前准备是否完成,工序配置事项的产前准备部分,事项里每一项都有已执行记录 /mes/producetaskrulerecord/isPreProductionResult
+export async function isPreProductionResult(body) {
+  const res = await request.post(
+    '/mes/producetaskrulerecord/isPreProductionResult',
+    body
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 分页,展示事项规则和记录规则的执行记录,无论是否临时记录 /mes/producetaskrulerecord/page
+export async function producetaskrulerecordPage(body) {
+  const res = await request.post('/mes/producetaskrulerecord/page', body);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 19 - 0
src/api/recordRules/index.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request';
+
+// 获取记录规则详情
+export async function getRecordRulesDetail(id) {
+  const res = await request.get(`/main/recordrules/getById/` + id, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 记录规则明细表
+export async function recordRulesDetailPage(body) {
+  const res = await request.post(`/main/recordrulesdetail/page`, body);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 61 - 0
src/api/ruleManagement/matter.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request';
+
+// 更新或保存
+export async function saveOrUpdate (data) {
+  const res = await request.post('/main/ruleinfo/saveOrEdit', data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 生成编码
+export async function getCode (code) {
+  const res = await request.get(`/main/codemanage/getCode/` + code, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取规则列表页
+export async function getList (data) {
+	let par = new URLSearchParams(data);
+  const res = await request.get(`/main/ruleinfo/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取规则详情
+export async function getDetail (id) {
+  const res = await request.get(`/main/ruleinfo/getById/` + id, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 删除事项
+ */
+export async function removeRule(data) {
+  const res = await request.delete('/main/ruleinfo/delete', { data } );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+// 获取仓库列表 
+export async function getWarehouseList (params) {
+  const res = await request.get('/wms/warehouse/page',  params );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+

+ 116 - 0
src/api/ruleManagement/plan.js

@@ -0,0 +1,116 @@
+import request from '@/utils/request';
+
+// 获取规则名称下拉
+export async function getRule(data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/ruleinfo/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取类别信息列表
+export async function getCategory(data) {
+  const res = await request.post(`/main/category/getList`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取实体列表分页
+export async function getAssetList(data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/main/asset/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 巡点检计划配置新增或更新
+export async function saveOrUpdate(data) {
+  const res = await request.post('/eam/planconfig/saveOrUpdate', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取巡点检分页数据
+export async function planConfigPage(data) {
+  let par = new URLSearchParams(data);
+  const res = await request.get(`/eam/planconfig/page?` + par, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 获取详情
+export async function getInfoById(id) {
+  const res = await request.get(`/eam/planconfig/getById/` + id, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除事项
+ */
+export async function removeRule(data) {
+  const res = await request.delete('/eam/planconfig/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// // 更新或保存
+// export async function saveOrUpdate (data) {
+//   const res = await request.post('/main/ruleinfo/saveOrEdit', data);
+//   if (res.data.code == 0) {
+//     return res.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// // 生成编码
+// export async function getCode (code) {
+//   const res = await request.get(`/main/codemanage/getCode/` + code, {});
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// // 获取规则列表页
+// export async function getList (data) {
+// 	let par = new URLSearchParams(data);
+//   const res = await request.get(`/main/ruleinfo/page?` + par, {});
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+// // 获取规则详情
+// export async function getDetail (id) {
+//   const res = await request.get(`/main/ruleinfo/getById/` + id, {});
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+
+export async function getWarehouseList() {
+  const res = await request.post(`/wms/warehouse/select/warehouseList`, {
+    params: { status: 1 }
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 231 - 175
src/components/common/seekPage.vue

@@ -1,199 +1,255 @@
 <template>
-    <div class="index_box">
-        <el-form label-width="90px" :inline="true">
-            <el-form-item v-for="(item, i) in seekList" :key="i">
-                <el-form-item :label="item.label" :label-width="item.labelWidth + 'px'" v-if="i <= 2">
-                    <!-- input 输入 -->
-                    <div>
-                        <div v-if="item.type == 'input'">
-
-                            <el-input clearable v-model="defaultWhere[item.value]"
-                                :placeholder="item.placeholder || '请输入内容'"
-                                :style="{ width: item.width ? item.width + 'px' : '220px' }" />
-                        </div>
-                        <div v-if="item.type == 'select'">
-                            <el-select clearable :v-model="defaultWhere[item.value]"
-                                :placeholder="item.placeholder || '请输入内容'" :multiple="item.multiple ? item.multiple : false"
-                                :filterable="item.filterable ? item.filterable : true"
-                                :style="{ width: item.width ? item.width + 'px' : '220px' }">
-                                <el-option v-for="(op, i) in item.planList" :label="op.label" :value="op.value"
-                                    :key="i"></el-option>
-                            </el-select>
-                        </div>
-                        <div v-if="item.type == 'date'">
-                            <el-date-picker v-model="defaultWhere[item.value]" @visible-change="change"
-                                :type="item.dateType || 'daterange'" range-separator="至" start-placeholder="开始日期"
-                                end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss"
-                                :style="{ width: item.width ? item.width + 'px' : '220px' }">
-
-
-                            </el-date-picker>
-                        </div>
-                    </div>
-                </el-form-item>
-
-            </el-form-item>
-
-            <el-form-item>
-                <el-dropdown ref="dropdownref" trigger="click" :hide-on-click="false" v-model="dropdownVisible">
-                    <div v-if="seekList.length > 3">
-                        <span class="el-dropdown-link">
-                            更多选项<i class="el-icon-arrow-down el-icon--right"></i>
-                        </span>
-                        <el-dropdown-menu slot="dropdown" >
-                            <div class="padding">
-                                <el-form label-position="left">
-                                    <el-form-item v-for="(item, i) in deboListRow" :key="i" :inline="true"
-                                        label-position="left">
-                                        <el-form-item :label-width="item.labelWidth ? item.labelWidth : '90' + 'px'"
-                                            :inline="true" :label="item.label">
-                                            <div v-if="item.type == 'input'">
-                                                <el-input clearable v-model="defaultWhere[item.value]"
-                                                    :placeholder="item.placeholder || '请输入内容'"
-                                                    :style="{ width: item.width ? item.width + 'px' : '220px' }" />
-                                            </div>
-                                            <div v-if="item.type == 'select'">
-                                                <el-select clearable v-model="defaultWhere[item.value]"
-                                                    :multiple="item.multiple ? item.multiple : false"
-                                                    :filterable="item.filterable ? item.filterable : true"
-                                                    :placeholder="item.placeholder || '请输入内容'"
-                                                    :style="{ width: item.width ? item.width + 'px' : '220px' }"
-                                                    @visible-change="change" @change="handerChange">
-                                                    <el-option v-for="(op, i) in item.planList" :label="op.label"
-                                                        :value="op.value" :key="i"></el-option>
-                                                </el-select>
-                                            </div>
-
-                                            <div v-if="item.type == 'date'">
-                                                <el-date-picker v-model="defaultWhere[item.value]"
-                                                    @blur="change" :type="item.dateType || 'daterange'"
-                                                    range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
-                                                    value-format="yyyy-MM-dd HH:mm:ss"
-                                                    
-                                                    :style="{ width: item.width ? item.width + 'px' : '220px' }">
-
-
-                                                </el-date-picker>
-                                            </div>
-
-                                        </el-form-item>
-                                    </el-form-item>
-                                </el-form>
-                            </div>
-
-                        </el-dropdown-menu>
-                    </div>
-                </el-dropdown>
-
-
-            </el-form-item>
-
-            <el-form-item>
-                <el-button type="primary" icon="el-icon-search" class="ele-btn-icon" @click="search">
-                    查询
-                </el-button>
-                <el-button @click="reset" icon="el-icon-refresh-left" type="primary">重置</el-button>
-            </el-form-item>
-        </el-form>
-
-
-    </div>
+  <div class="index_box">
+    <el-form label-width="90px" :inline="true">
+      <el-form-item v-for="(item, i) in seekList" :key="i">
+        <el-form-item
+          :label="item.label"
+          :label-width="item.labelWidth + 'px'"
+          v-if="i <= maxLength - 1"
+        >
+          <!-- input 输入 -->
+          <div>
+            <div v-if="item.type == 'input'">
+              <el-input
+                clearable
+                v-model="defaultWhere[item.value]"
+                :placeholder="item.placeholder || '请输入内容'"
+                :style="{ width: item.width ? item.width + 'px' : '220px' }"
+              />
+            </div>
+            <div v-if="item.type == 'select'">
+              <el-select
+                clearable
+                :v-model="defaultWhere[item.value]"
+                :placeholder="item.placeholder || '请输入内容'"
+                :multiple="item.multiple ? item.multiple : false"
+                :filterable="item.filterable ? item.filterable : true"
+                :style="{ width: item.width ? item.width + 'px' : '220px' }"
+              >
+                <el-option
+                  v-for="(op, i) in item.planList"
+                  :label="op.label"
+                  :value="op.value"
+                  :key="i"
+                ></el-option>
+              </el-select>
+            </div>
+            <div v-if="item.type == 'selectTree'">
+              <ele-tree-select
+                clearable
+                ref="processTypeRef"
+                filterable
+                :data="item.planList"
+                v-model="defaultWhere[item.value]"
+                :childrenKey="item.childrenKey || 'children'"
+                valueKey="id"
+                labelKey="name"
+                :placeholder="item.placeholder || '请选择'"
+                default-expand-all
+                :style="{ width: item.width ? item.width + 'px' : '230px' }"
+              />
+            </div>
+            <div v-if="item.type == 'date'">
+              <el-date-picker
+                v-model="defaultWhere[item.value]"
+                @visible-change="change"
+                :type="item.dateType || 'daterange'"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                :style="{ width: item.width ? item.width + 'px' : '220px' }"
+              >
+              </el-date-picker>
+            </div>
+          </div>
+        </el-form-item>
+      </el-form-item>
+
+      <el-form-item>
+        <el-dropdown
+          ref="dropdownref"
+          trigger="click"
+          :hide-on-click="false"
+          v-model="dropdownVisible"
+          v-if="seekList.length > maxLength"
+        >
+          <div>
+            <span class="el-dropdown-link">
+              更多选项<i class="el-icon-arrow-down el-icon--right"></i>
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <div class="padding">
+                <el-form label-position="left">
+                  <el-form-item
+                    v-for="(item, i) in deboListRow"
+                    :key="i"
+                    :inline="true"
+                    label-position="left"
+                  >
+                    <el-form-item
+                      :label-width="
+                        item.labelWidth ? item.labelWidth : '90' + 'px'
+                      "
+                      :inline="true"
+                      :label="item.label"
+                    >
+                      <div v-if="item.type == 'input'">
+                        <el-input
+                          clearable
+                          v-model="defaultWhere[item.value]"
+                          :placeholder="item.placeholder || '请输入内容'"
+                          :style="{
+                            width: item.width ? item.width + 'px' : '220px'
+                          }"
+                        />
+                      </div>
+                      <div v-if="item.type == 'select'">
+                        <el-select
+                          clearable
+                          v-model="defaultWhere[item.value]"
+                          :multiple="item.multiple ? item.multiple : false"
+                          :filterable="item.filterable ? item.filterable : true"
+                          :placeholder="item.placeholder || '请输入内容'"
+                          :style="{
+                            width: item.width ? item.width + 'px' : '220px'
+                          }"
+                          @visible-change="change"
+                          @change="handerChange"
+                        >
+                          <el-option
+                            v-for="(op, i) in item.planList"
+                            :label="op.label"
+                            :value="op.value"
+                            :key="i"
+                          ></el-option>
+                        </el-select>
+                      </div>
+
+                      <div v-if="item.type == 'date'">
+                        <el-date-picker
+                          v-model="defaultWhere[item.value]"
+                          @blur="change"
+                          :type="item.dateType || 'daterange'"
+                          range-separator="至"
+                          start-placeholder="开始日期"
+                          end-placeholder="结束日期"
+                          value-format="yyyy-MM-dd HH:mm:ss"
+                          :style="{
+                            width: item.width ? item.width + 'px' : '220px'
+                          }"
+                        >
+                        </el-date-picker>
+                      </div>
+                    </el-form-item>
+                  </el-form-item>
+                </el-form>
+              </div>
+            </el-dropdown-menu>
+          </div>
+        </el-dropdown>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          class="ele-btn-icon"
+          @click="search"
+        >
+          查询
+        </el-button>
+        <el-button @click="reset" icon="el-icon-refresh-left" type="primary"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+  </div>
 </template>
 
 <script>
-
-let defaultWhere = {};
-export default {
+  let defaultWhere = {};
+  export default {
     props: {
-        seekList: {
-            type: Array,
-            default: () => []
-        }
+      seekList: {
+        type: Array,
+        default: () => []
+      },
+      // 展示几个选择项,其余收起到更多
+      maxLength: {
+        type: Number,
+        default: 3
+      }
     },
 
-    components: {
-
-    },
+    components: {},
     watch: {
-        seekList: {
-            handler(val) {
-
-                val.forEach(item => {
-
-                    defaultWhere[item.value] = null;
-
-                })
-
-                this.$nextTick(() => {
-
-                    if (Array.isArray(val) && val.length <= 3) {
-                        this.seekListRow = val
-                    } else if (Array.isArray(val) && val.length >= 3) {
-                        this.seekListRow = val.slice(0, 3);
-                        this.deboListRow = val.slice(3);
-                    }
-                })
-
-            },
-            deep: true,
-            immediate: true,
-        }
+      seekList: {
+        handler(val) {
+          val.forEach((item) => {
+            defaultWhere[item.value] = null;
+          });
+
+          this.$nextTick(() => {
+            if (Array.isArray(val) && val.length <= this.maxLength) {
+              this.seekListRow = val;
+            } else if (Array.isArray(val) && val.length >= this.maxLength) {
+              this.seekListRow = val.slice(0, this.maxLength);
+              this.deboListRow = val.slice(this.maxLength);
+            }
+          });
+        },
+        deep: true,
+        immediate: true
+      }
     },
 
     data() {
+      return {
+        defaultWhere: {},
+        dropdownVisible: true,
 
-
-        return {
-            defaultWhere: {},
-            dropdownVisible: true,
-
-            deboListRow: [],
-            seekListRow: []
-        }
+        deboListRow: [],
+        seekListRow: []
+      };
     },
 
     computed: {
-        info() {
-            return this.$store.state.user.info;
-        },
-
+      info() {
+        return this.$store.state.user.info;
+      }
     },
 
-    created() {
-
-
-    },
+    created() {},
     methods: {
-
-        change(visible) {
-           
-            this.dropdownVisible = visible;
-            this.$refs.dropdownref.show()
-        },
-        handerChange() {
-            this.$refs.dropdownref.show()
-        },
-
-        search() {
-            this.$emit('search', this.defaultWhere);
-        },
-        // 重置
-        reset() {
-            this.defaultWhere = {};
-            this.search();
-        }
-
-        //  折叠悬浮中样式调整
-    },
-}
+      change(visible) {
+        this.dropdownVisible = visible;
+        this.$refs.dropdownref.show();
+      },
+      handerChange() {
+        this.$refs.dropdownref.show();
+      },
+
+      search() {
+        this.$emit('search', this.defaultWhere);
+      },
+      // 重置
+      reset() {
+        this.defaultWhere = {};
+        this.search();
+      }
+
+      //  折叠悬浮中样式调整
+    }
+  };
 </script>
 
 <style scoped>
-.index_box {
+  .index_box {
     display: flex;
-}
+  }
 
-.padding {
+  .padding {
     padding: 20px;
-}
-</style>
+  }
+</style>

+ 4 - 0
src/components/select/SelectUser/index.vue

@@ -88,6 +88,10 @@
   export default {
     name: 'SelectUser',
     components: { Organization, clearList },
+    model: {
+      prop: 'visible',
+      event: 'update:visible'
+    },
     props: {
       visible: {
         type: Boolean,

+ 2 - 2
src/components/select/organization/components/org-user-edit.vue

@@ -183,7 +183,7 @@
 <script>
   import { emailReg, phoneReg } from 'ele-admin';
   import OrgSelect from './org-select.vue';
-  import RoleSelect from '@/views/system/user/components/role-select.vue';
+  // import RoleSelect from '@/views/system/user/components/role-select.vue';
   import RegionsSelect from '@/components/RegionsSelect/index.vue';
   import { getNotBoundAccount } from '@/api/system/user';
   import {
@@ -192,7 +192,7 @@
     checkExistence
   } from '@/api/system/organization';
   export default {
-    components: { OrgSelect, RoleSelect, RegionsSelect },
+    components: { OrgSelect, RegionsSelect },
     props: {
       // 弹窗是否打开
       visible: Boolean,

+ 4 - 1
src/enum/dict.js

@@ -25,7 +25,10 @@ export default {
   退料场景: 'returnScenario',
   精度等级: 'accuracy_level',
   质检计划类型: 'inspection_plan_type',
-  处置状态: 'dispose_status'
+  处置状态: 'dispose_status',
+  紧急程度: 'urgent_type',
+  记录规则类型: 'record_sheet',
+  检查有效期单位: 'validity_unit'
 };
 export const numberList = ['date_method'];
 

+ 4 - 0
src/store/modules/user.js

@@ -36,6 +36,10 @@ const formatRouter = (list) => {
 
   menuList = fn(list);
 
+  // 收集权限的子节点(只取一层)
+  const extraChildren = authorities.flatMap((a) => a.children || []);
+  authorities = [...authorities, ...extraChildren];
+
   return { menuList, authorities };
 };
 

+ 29 - 0
src/views/batchRecord/after.vue

@@ -0,0 +1,29 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading"> 产后检查 </el-card>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+
+  export default {
+    name: 'batchRecord',
+    mixins: [dictMixins, tableColumnsMixin],
+    data() {
+      return {
+        loading: true
+      };
+    },
+    created() {},
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return pageUsers({ ...where, ...order, page, limit });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 96 - 0
src/views/batchRecord/before.vue

@@ -0,0 +1,96 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <seekPage :seekList="seekList" :maxLength="3" @search="search"></seekPage>
+
+      <ele-pro-table
+        ref="table"
+        row-key="id"
+        :columns="columns"
+        :datasource="datasource"
+      >
+      </ele-pro-table>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+
+  export default {
+    name: 'batchRecord',
+    mixins: [dictMixins, tableColumnsMixin],
+    data() {
+      return {
+        // 搜索字段
+        seekList: [
+          {
+            label: '记录编码:',
+            value: 'name',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '类型:',
+            value: 'classify',
+            type: 'select',
+            placeholder: '请选择',
+            planList: []
+          },
+          {
+            label: '产品名称:',
+            value: 'name',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '状态:',
+            value: 'classify',
+            type: 'select',
+            placeholder: '请选择',
+            planList: []
+          }
+        ],
+        // 表格字段
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center'
+          },
+          {
+            prop: 'username',
+            label: '用户账号'
+          },
+          {
+            label: '用户名',
+            prop: 'nickname'
+          },
+          {
+            label: '手机号',
+            prop: 'phone'
+          },
+          {
+            label: '创建时间',
+            prop: 'createTime'
+          }
+        ]
+      };
+    },
+    created() {},
+    methods: {
+      // 刷新表格
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return pageUsers({ ...where, ...order, page, limit });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 204 - 4
src/views/batchRecord/index.vue

@@ -1,15 +1,215 @@
 <template>
-  <div>批记录</div>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <ele-split-layout
+        width="460px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div class="left-box">
+          <div class="left-item">
+            <div class="title">产品</div>
+
+            <el-input
+              placeholder="搜索"
+              suffix-icon="el-icon-search"
+              v-model="queryParam"
+              @change="debounce(getAllProductInWorkOrder(), 500)"
+            ></el-input>
+
+            <div class="list-box">
+              <div class="list-item" v-for="i in 10" :key="i">
+                产品{{ i }}
+              </div>
+            </div>
+          </div>
+          <div class="left-item">
+            <div class="title">批次号</div>
+            <div class="list-box">
+              <div class="list-item" v-for="i in 10" :key="i">
+                产品{{ i }}
+              </div>
+            </div>
+          </div>
+          <div class="left-item">
+            <div class="title">批记录类型</div>
+            <div class="list-box">
+              <div
+                class="list-item"
+                v-for="i in types"
+                :key="i.name"
+                :class="{ active: activeType == i.name }"
+              >
+                {{ i.name }}
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <template v-slot:content>
+          <div>
+            <seek-page :seekList="seekList" @search="search"></seek-page>
+            <ele-pro-table
+              ref="table"
+              row-key="id"
+              :columns="columns"
+              :datasource="datasource"
+            >
+            </ele-pro-table>
+          </div>
+        </template>
+      </ele-split-layout>
+    </el-card>
+  </div>
 </template>
 
 <script>
   import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+  import { producetaskrulerecordPage } from '@/api/producetaskrulerecord/index';
+  import seekPage from '@/components/common/seekPage.vue';
+  import { getAllProductInWorkOrder } from '@/api/produce/workOrder';
 
   export default {
+    components: { seekPage },
     name: 'batchRecord',
-
-    mixins: [dictMixins]
+    mixins: [dictMixins, tableColumnsMixin],
+    data() {
+      return {
+        seekList: [
+          {
+            label: '单据编码:',
+            value: 'keyWord',
+            type: 'input',
+            placeholder: ''
+          },
+          {
+            label: '单据名称:',
+            value: 'name',
+            type: 'input',
+            placeholder: ''
+          }
+        ],
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center'
+          }
+          // {
+          //   prop: 'username',
+          //   label: '批记录类型'
+          // },
+          // {
+          //   prop: '',
+          //   label: '单据名称'
+          // },
+          // {
+          //   prop: '',
+          //   label: '单据编码'
+          // },
+          // {
+          //   prop: '',
+          //   label: '单据状态'
+          // },
+          // {
+          //   prop: '',
+          //   label: '审核状态'
+          // }
+        ],
+        types: [
+          {
+            name: '全部'
+          },
+          {
+            name: '生产工单'
+          },
+          {
+            name: '领料单'
+          },
+          {
+            name: '退票单'
+          },
+          {
+            name: '报工'
+          },
+          {
+            name: '质检工单'
+          },
+          {
+            name: '入库单'
+          },
+          {
+            name: '生产记录'
+          },
+          {
+            name: '设备工单'
+          },
+          {
+            name: '工艺文件'
+          }
+        ],
+        activeType: '全部',
+        // 产品搜索条件
+        queryParam: ''
+      };
+    },
+    created() {
+      // this.getAllProductInWorkOrder();
+    },
+    methods: {
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        // return pageUsers({ ...where, ...order, page, limit });
+        return [];
+      },
+      search(where) {
+        this.$refs.table.reload(where);
+      },
+      // 获取产品和批次号
+      async getAllProductInWorkOrder() {
+        const data = await getAllProductInWorkOrder({
+          queryParam: this.queryParam
+        });
+      }
+    }
   };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+  .left-box {
+    display: flex;
+
+    .left-item {
+      flex: 1;
+      border-right: 1px solid #ededed;
+      min-height: 80vh;
+      padding: 0 5px;
+
+      .title {
+        text-align: center;
+        font-size: 16px;
+        padding: 10px 0;
+        border-bottom: 1px solid #ededed;
+        margin-bottom: 15px;
+      }
+
+      .list-box {
+        margin-top: 10px;
+
+        .list-item {
+          padding: 15px 10px;
+          border-bottom: 1px solid #ededed;
+          font-size: 14px;
+          cursor: pointer;
+        }
+
+        .active {
+          background: #1890ff;
+          color: #fff;
+        }
+      }
+    }
+  }
+</style>

+ 24 - 0
src/views/batchRecord/process.vue

@@ -0,0 +1,24 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading"> 过程监测 </el-card>
+  </div>
+</template>
+
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
+
+  export default {
+    name: 'batchRecord',
+    mixins: [dictMixins, tableColumnsMixin],
+    data() {
+      return {
+        loading: true
+      };
+    },
+    created() {},
+    methods: {}
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 12 - 12
src/views/home/data.js

@@ -222,26 +222,26 @@ export const pieOptions = (data) => {
       },
       trigger: 'item'
     },
-    legend: {
-      orient: 'horizontal',
-      left: 'right',
-      right: '15%',
-      bottom: '5%',
-      itemGap: window.innerHeight * 0.018,
-      textStyle: {
-        fontSize: window.innerHeight * 0.014
-      }
-    },
+    // legend: {
+    //   orient: 'horizontal',
+    //   left: 'right',
+    //   right: '15%',
+    //   bottom: '5%',
+    //   itemGap: window.innerHeight * 0.018,
+    //   textStyle: {
+    //     fontSize: window.innerHeight * 0.014
+    //   }
+    // },
     series: [
       {
-        center: ['50%', '40%'],
+        center: ['50%', '50%'],
         label: {
           position: 'outside',
           show: true,
           formatter: (item) => {
             return item.name + ':' + item.value;
           },
-          fontSize: 16
+          fontSize: 12
           // color:"#fff"
         },
         labelLine: {

+ 118 - 59
src/views/produce/components/footBtn.vue

@@ -1,102 +1,133 @@
 <template>
   <div class="foot_box">
-    <div
-      v-for="(item, index) in btnList"
-      :key="index"
-      class="btn"
-      :style="{ background: item.bjColor }"
-      @click="footClick(item.type)"
-    >
-      <img src="../../../assets/Frame.png" class="Frame" />
-      {{ item.name }}
-    </div>
+    <template v-for="(item, index) in btnListData">
+      <div
+        v-if="$hasPermission(item.isShow)"
+        :key="index"
+        class="btn"
+        :style="{ background: item.disable ? '#858585' : item.bjColor }"
+        @click="footClick(item)"
+      >
+        <img src="../../../assets/Frame.png" class="Frame" />
+        {{ item.name }}
+      </div>
+    </template>
   </div>
 </template>
 
 <script>
   export default {
+    props: {
+      //
+      type: {
+        type: String | Number,
+        default: ''
+      },
+      singleReportInspection: {},
+      // 是否完成产前准备
+      isPreProductionResult: {
+        type: Boolean,
+        default: true
+      }
+    },
     data() {
       return {
         btnList1: [
-          // {
-          //   name: '产前准备',
-          //   type: 'prenatalExamination',
-          //   bjColor: '#770077'
-          // },
+          {
+            name: '产前准备',
+            type: 'prenatalExamination',
+            bjColor: '#770077',
+            isShow: 'mes:producetaskrulerecord:save1'
+          },
           {
             name: '领料',
             type: 'pick',
-            bjColor: '#FC1B75'
+            bjColor: '#FC1B75',
+            isShow: 'mes:workorder:save'
           },
           {
             name: '投料',
             type: 'feed',
-            bjColor: '#FBD114'
+            bjColor: '#FBD114',
+            isShow: 'mes:feed:save'
+          },
+          {
+            name: '过程监测',
+            type: 'processDetection',
+            bjColor: '#008888',
+            isShow: 'mes:producetaskrulerecord:save2'
           },
-          // {
-          //   name: '过程检测',
-          //   type: 'processDetection',
-          //   bjColor: '#008888'
-          // },
           {
             name: '报工',
             type: 'job',
-            bjColor: '#157A2C'
+            bjColor: '#157A2C',
+            isShow: 'mes:workreport:save'
           },
           {
             name: '委外请托',
             type: 'Outsourcing',
-            bjColor: '#39D9AC'
+            bjColor: '#39D9AC',
+            isShow: 'mes:applyoutsource:save'
           },
           {
             name: '暂停启动',
             type: '',
-            bjColor: '#858585'
+            bjColor: '#858585',
+            isShow: 'mes:workorder:startstop'
+          },
+          {
+            name: '产后检查',
+            type: 'postpartumExamination',
+            bjColor: '#9955FF',
+            isShow: 'mes:producetaskrulerecord:save3'
           },
-          // {
-          //   name: '产后检查',
-          //   type: 'postpartumExamination',
-          //   bjColor: '#9955FF'
-          // },
           {
             name: '工单交接',
             type: '',
-            bjColor: '#2B56C2'
+            bjColor: '#2B56C2',
+            isShow: 'mes:producetaskrulerecord:save4'
           },
           {
             name: '工艺文件',
             type: 'work',
-            bjColor: '#2f3033'
+            bjColor: '#2f3033',
+            isShow: 'mes:workorder:bomfile'
           },
           {
             name: '工步',
             type: 'workStep',
-            bjColor: '#409EFF'
+            bjColor: '#409EFF',
+            isShow: 'main:categoryparamstep:save'
           },
           {
             name: '任务',
             type: 'task',
-            bjColor: '#67c23a'
+            bjColor: '#67c23a',
+            isShow: 'aps:assign:save'
           },
           {
             name: '异常',
             type: 'error',
-            bjColor: '#cc0000'
+            bjColor: '#cc0000',
+            isShow: 'mes:anomaly:save'
           },
           {
             name: 'BOM',
             type: 'bom',
-            bjColor: '#BB5500'
+            bjColor: '#BB5500',
+            isShow: 'mes:workorder:bom'
           },
           {
             name: '设备',
             type: 'device',
-            bjColor: '#008866'
+            bjColor: '#008866',
+            isShow: 'mes:workorder:device'
           },
           {
             name: '周转车',
             type: 'turnover',
-            bjColor: '#660066'
+            bjColor: '#660066',
+            isShow: 'mes:workorder:transfer'
           }
           // {
           //   type: 'turnover',
@@ -112,48 +143,57 @@
           {
             name: '领料',
             type: 'pick',
-            bjColor: '#FC1B75'
+            bjColor: '#FC1B75',
+            isShow: 'mes:workorder:save'
           },
           {
             name: '投料',
             type: 'feed',
-            bjColor: '#FBD114'
+            bjColor: '#FBD114',
+            isShow: 'mes:feed:save'
           },
           {
             name: '报工',
             type: 'job',
-            bjColor: '#157A2C'
+            bjColor: '#157A2C',
+            isShow: 'mes:workreport:save'
           },
 
           {
             name: '委外请托',
             type: 'Outsourcing',
-            bjColor: '#39D9AC'
+            bjColor: '#39D9AC',
+            isShow: 'mes:applyoutsource:save'
           },
           {
             name: '暂停启动',
             type: '',
-            bjColor: '#858585'
+            bjColor: '#858585',
+            isShow: 'mes:workorder:startstop'
           },
           {
             name: '工艺文件',
             type: 'work',
-            bjColor: '#2B56C2'
+            bjColor: '#2B56C2',
+            isShow: 'mes:workorder:bomfile'
           },
           {
             name: '工步',
             type: 'workStep',
-            bjColor: '#409EFF'
+            bjColor: '#409EFF',
+            isShow: 'main:categoryparamstep:save'
           },
           {
             name: '任务',
             type: 'task',
-            bjColor: '#67c23a'
+            bjColor: '#67c23a',
+            isShow: 'aps:assign:save'
           },
           {
             name: '异常',
             type: 'error',
-            bjColor: '#cc0000'
+            bjColor: '#cc0000',
+            isShow: 'mes:anomaly:save'
           }
         ],
         btnList3: [
@@ -187,7 +227,8 @@
           {
             name: '报工',
             type: 'job',
-            bjColor: '#157A2C'
+            bjColor: '#157A2C',
+            isShow: 'mes:workreport:save'
           },
 
           {
@@ -221,17 +262,21 @@
             bjColor: '#cc0000'
           }
         ],
-        btnList: []
+        btnList: [],
+        // 未完成产前准备 需要禁用的按钮
+        disable: [
+          '领料',
+          '投料',
+          '过程监测',
+          '报工',
+          '委外请托',
+          '暂停启动',
+          '产后检查',
+          '工单交接',
+          '异常'
+        ]
       };
     },
-    props: {
-      type: {
-        type: String | Number,
-        default: ''
-      },
-      singleReportInspection: {}
-    },
-
     computed: {
       taskObj() {
         return this.$store.state.user.taskObj;
@@ -239,6 +284,17 @@
 
       clientEnvironmentId() {
         return this.$store.state.user.info.clientEnvironmentId;
+      },
+      btnListData() {
+        if (this.isPreProductionResult) {
+          return this.btnList;
+        }
+        return this.btnList.map((i) => {
+          return {
+            ...i,
+            disable: this.disable.includes(i.name)
+          };
+        });
       }
     },
     watch: {
@@ -308,8 +364,11 @@
       // }
     },
     methods: {
-      footClick(type) {
-        this.$emit('footBtn', type);
+      footClick(item) {
+        if (item.disable && !this.isPreProductionResult) {
+          return this.$message.warning(`请先完成产前准备!`);
+        }
+        this.$emit('footBtn', item.type);
       }
     }
   };

+ 25 - 1
src/views/produce/components/new_produceOrder.vue

@@ -93,9 +93,20 @@
     removeItem,
     updateCertificateNumber
   } from '@/api/inspectionWork';
+  import { isPreProductionResult } from '@/api/producetaskrulerecord/index.js';
+
   export default {
     components: { routings },
     mixins: [tableColumnsMixin],
+    emits: ['changeIsPreProductionResult'],
+    props: {
+      produceTaskInfo: {
+        type: Object,
+        default: () => {
+          return null;
+        }
+      }
+    },
     data() {
       return {
         loading: false,
@@ -428,7 +439,9 @@
         });
       },
 
-      handleSelectionChange(val) {
+      async handleSelectionChange(val) {
+        console.log('val 选择的工单列表', val);
+        console.log('this.produceTaskInfo', this.produceTaskInfo);
         let initReportValue = val[0] && val[0].singleReport;
         let allSame = true;
 
@@ -442,6 +455,17 @@
           return this.$message.warning('请选择报工类型相同的工单');
         }
 
+        if (this.produceTaskInfo.isPrenatalPreProduction && val.length > 0) {
+          // 判断是否要求先完成 产前准备
+          const result = await isPreProductionResult({
+            produceTaskId: this.produceTaskInfo.id,
+            workOrderIds: val.map((i) => i.id)
+          });
+          this.$emit('changeIsPreProductionResult', result);
+        } else {
+          this.$emit('changeIsPreProductionResult', true);
+        }
+
         let ids = [];
         ids = val.map((item) => {
           return item.id;

+ 296 - 0
src/views/produce/components/prenatalExamination/ProductModal.vue

@@ -0,0 +1,296 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="70%"
+    :fullscreen="fullscreen"
+    class="fullscreen"
+  >
+    <template slot="title">
+      <modalTitle
+        :title="title"
+        @setFullscreen="fullscreen = !fullscreen"
+      ></modalTitle>
+    </template>
+    <el-card shadow="never">
+      <ProductSearch @search="reload" ref="searchRef" />
+
+      <ele-split-layout
+        width="244px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div class="ele-border-lighter split-layout-right-content">
+          <el-tree
+            :data="treeList"
+            :props="defaultProps"
+            ref="treeRef"
+            :default-expanded-keys="categoryId ? [categoryId] : []"
+            :highlight-current="true"
+            node-key="id"
+            @node-click="handleNodeClick"
+          ></el-tree>
+        </div>
+
+        <!-- 数据表格 -->
+        <template v-slot:content>
+          <ele-pro-table
+            style="min-height: 400px"
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            :selection.sync="selection"
+            row-key="id"
+          >
+          </ele-pro-table>
+        </template>
+      </ele-split-layout>
+    </el-card>
+
+    <div class="rx-sc">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import modalTitle from '@/components/modalTitle.vue';
+  import ProductSearch from './product-search.vue';
+  import { getTreeByGroup } from '@/api/classifyManage';
+  import { getList } from '@/api/classifyManage/itemInformation.js';
+  export default {
+    components: {
+      ProductSearch,
+      modalTitle
+    },
+    data() {
+      return {
+        fullscreen: false,
+        visible: false,
+        title: '选择工具',
+
+        categoryLevelId: null,
+        categoryId: 1,
+        treeList: [],
+        treeLoading: false,
+
+        defaultProps: {
+          children: 'children',
+          label: 'name'
+        },
+        type: null,
+
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            selectable: (row, index) => {
+              return !this.processData.some((it) => row.id == it.categoryId);
+            },
+            reserveSelection: true,
+            fixed: 'left'
+          },
+
+          {
+            label: '物料名称',
+            prop: 'name'
+          },
+
+          {
+            label: '物料编码',
+            prop: 'code'
+          },
+          {
+            label: '牌号',
+            prop: 'brandNum'
+          },
+          {
+            label: '型号',
+            prop: 'modelType'
+          },
+
+          {
+            prop: 'availableCountBase',
+            label: '包装库存',
+            sortable: 'custom'
+          },
+          {
+            label: '单位',
+            prop: 'weightUnit'
+          },
+
+          {
+            prop: 'packingCountBase',
+            label: '计量库存',
+            sortable: 'custom'
+          },
+
+          {
+            label: '计量单位',
+            prop: 'unit'
+          },
+
+          {
+            label: '数量',
+            prop: 'count'
+          }
+        ],
+
+        // 表格选中数据
+        selection: [],
+
+        processData: [],
+        current: null
+      };
+    },
+
+    watch: {},
+    methods: {
+      /* 表格数据源 */
+      async datasource({ page, limit, where }) {
+        const res = await getList({
+          ...where,
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryLevelId
+        });
+        return res;
+      },
+
+      open(item) {
+        this.processData = item || [];
+        this.visible = true;
+
+        this.getTreeData();
+      },
+
+      async getTreeData() {
+        try {
+          this.treeLoading = true;
+
+          const res = await getTreeByGroup({ type: 4 });
+          this.treeLoading = false;
+          if (res?.code === '0') {
+            this.treeList = res.data;
+
+            this.$nextTick(() => {
+              // 默认高亮第一级树节点
+              if (this.treeList[0]) {
+                this.rootTreeId = this.treeList[0].id;
+                this.$nextTick(() => {
+                  this.$refs.treeRef.setCurrentKey(this.treeList[0].id);
+                });
+              }
+            });
+            return this.treeList;
+          }
+        } catch (error) {}
+        this.treeLoading = false;
+      },
+
+      handleNodeClick(data) {
+        this.categoryLevelId = data.id;
+        this.$refs.table.reload({ pageNum: 1, where: {} });
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
+
+      handleClose() {
+        this.visible = false;
+        this.$refs.table.setSelectedRows([]);
+        this.selection = [];
+      },
+      selected() {
+        let _arr = [];
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
+
+        _arr = this.selection.map((m) => {
+          m.categoryId = m.id;
+          delete m.id;
+          return {
+            ...m
+          };
+        });
+
+        this.$emit('chooseModal', _arr);
+        this.handleClose();
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .productModal_dialog {
+    overflow: hidden;
+    ::v-deep .el-dialog {
+      margin: 50px auto !important;
+      height: 90%;
+      overflow: hidden;
+
+      .el-dialog__body {
+        position: absolute;
+        left: 0;
+        top: 54px;
+        bottom: 0;
+        right: 0;
+        padding: 0;
+        z-index: 1;
+        overflow: hidden;
+        overflow-y: auto;
+        // 下边设置字体,我的需求是黑底白字
+        color: #ffffff;
+        line-height: 30px;
+        padding: 0 15px;
+        display: flex;
+        flex-direction: column;
+        > div {
+          flex: 1;
+          .el-card__body {
+            height: 100%;
+            display: flex;
+            flex-direction: column;
+            > div {
+              flex: 1;
+              .ele-split-panel-body {
+                > div {
+                  height: 100%;
+                  display: flex;
+                  flex-direction: column;
+                  .el-table {
+                    flex: 1 0 auto;
+                    height: 0;
+                    overflow: auto;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .rx-sc {
+    flex: 0 0 50px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .ml60 {
+    margin-left: 60px;
+  }
+</style>

+ 206 - 0
src/views/produce/components/prenatalExamination/index.vue

@@ -0,0 +1,206 @@
+<template>
+  <el-dialog
+    title="报工"
+    :visible.sync="dialogVisible"
+    width="30%"
+    :before-close="handleClose"
+  >
+    <div>
+      <!-- <el-button type="primary" plain round @click="openMaintenancePlan">
+        设备保养计划
+      </el-button> -->
+      <div
+        v-if="loading || ruleRecordsList.length > 0"
+        class="step-list"
+        v-loading="loading"
+      >
+        <div
+          class="step-item"
+          v-for="(item, index) in ruleRecordsList"
+          :key="item.id"
+          @click="openMaintenancePlan(item)"
+        >
+          <div class="circle">{{ index + 1 }}</div>
+          <div class="desc">{{ item.ruleName }}</div>
+          <el-button
+            :type="item.executeStatus == 0 ? 'primary' : 'default'"
+            class="status-btn"
+          >
+            {{ executeStatusTest(item.executeStatus) }}
+          </el-button>
+        </div>
+      </div>
+      <el-empty v-else></el-empty>
+    </div>
+    <template #footer>
+      <el-button @click="handleUpdate" type="primary" :loading="butLoad"
+        >更新</el-button
+      >
+      <el-button @click="handleConfirm" type="primary">确定</el-button>
+      <el-button @click="handleClose">取消</el-button>
+    </template>
+
+    <programRulesDialog
+      ref="programRulesDialogRef"
+      :dialogTitle="dialogTitle"
+      @reload="getData"
+    />
+
+    <releaseRulesDialog
+      v-model="showReleaseRulesDialog"
+      ref="releaseRulesDialogRef"
+      @reload="getData"
+    />
+  </el-dialog>
+</template>
+
+<script>
+  import releaseRulesDialog from './releaseRulesDialog.vue';
+  import programRulesDialog from './programRulesDialog.vue';
+  import { getLastRuleRecords } from '@/api/producetaskrulerecord/index.js';
+  import { getDate } from '@/utils/dateUtils';
+
+  export default {
+    components: { programRulesDialog, releaseRulesDialog },
+    data() {
+      return {
+        dialogVisible: false,
+        dialogTitle: '设备保养计划',
+        ruleRecordsList: [],
+        // 工艺路线
+        workOrderInfo: null,
+        // 工序信息
+        produceTaskInfo: null,
+        // 	报工类型,参考字典项:record_rules_report_work_type,1-产前准备,2-过程监测,3-产后检查
+        reportWorkType: 1,
+        butLoad: false,
+        // 记录规则
+        showReleaseRulesDialog: false,
+        loading: true
+      };
+    },
+    methods: {
+      open(workOrderInfo, produceTaskInfo, reportWorkType) {
+        console.log('workOrderInfo 工艺路线', workOrderInfo);
+        console.log('工序信息', produceTaskInfo);
+        this.workOrderInfo = workOrderInfo;
+        this.produceTaskInfo = produceTaskInfo;
+        this.reportWorkType = reportWorkType;
+
+        this.dialogVisible = true;
+        this.getData(workOrderInfo.id, produceTaskInfo.id);
+      },
+      executeStatusTest(status) {
+        switch (status) {
+          case 0:
+            return '未执行';
+          case 1:
+            return '执行中';
+          default:
+            return '已执行';
+        }
+      },
+      // 获取数据
+      async getData() {
+        this.loading = true;
+        const body = {
+          workOrderId: this.workOrderInfo.id,
+          produceTaskId: this.produceTaskInfo.id,
+          reportWorkType: this.reportWorkType,
+          isTempRecord: 0
+        };
+        const data = await getLastRuleRecords(body);
+        this.ruleRecordsList = data;
+        console.log('报工流程 事项', this.ruleRecordsList);
+        this.loading = false;
+      },
+      handleClose() {
+        this.dialogVisible = false;
+      },
+      async handleUpdate() {
+        try {
+          this.butLoad = true;
+          await this.getData();
+          // 更新逻辑
+          this.$message.success('已更新');
+          this.butLoad = false;
+        } catch (error) {
+          this.butLoad = false;
+        }
+      },
+      handleConfirm() {
+        // 确定逻辑
+        this.dialogVisible = false;
+      },
+      openMaintenancePlan(item) {
+        console.log('item', item);
+
+        if (item.executeMethod == 1) {
+          // 设备保养计划相关逻辑
+          this.dialogTitle = '新增设备保养计划';
+          this.$refs.programRulesDialogRef.init(
+            item,
+            this.workOrderInfo,
+            this.produceTaskInfo
+          );
+        } else {
+          this.$refs.releaseRulesDialogRef.open(
+            item,
+            this.workOrderInfo,
+            this.produceTaskInfo
+          );
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .step-list {
+    display: flex;
+    flex-direction: column;
+    gap: 24px;
+    padding: 24px;
+  }
+
+  .step-item {
+    display: flex;
+    align-items: center;
+    gap: 32px;
+
+    .circle {
+      width: 28px;
+      height: 28px;
+      background: #6cb300;
+      color: #fff;
+      border-radius: 50%;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-size: 16px;
+      font-weight: bold;
+    }
+
+    .desc {
+      flex: 1;
+      font-size: 14px;
+      color: #333;
+    }
+
+    .status-btn {
+      width: 100px;
+      height: 40px;
+      font-size: 16px;
+      &.el-button--default {
+        background: #e1e1e1;
+        color: #999;
+        border: none;
+      }
+      &.el-button--primary {
+        background: #17a2f8;
+        color: #fff;
+        border: none;
+      }
+    }
+  }
+</style>

+ 242 - 0
src/views/produce/components/prenatalExamination/operationGuideDialog.vue

@@ -0,0 +1,242 @@
+<!-- 操作手册弹窗 -->
+<template>
+  <el-dialog
+    title="编辑"
+    v-if="visible"
+    :append-to-body="true"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    width="1000px"
+    :fullscreen="fullscreen"
+    class="fullscreen"
+  >
+    <template slot="title">
+      <modalTitle
+        title="编辑"
+        @setFullscreen="fullscreen = !fullscreen"
+      ></modalTitle>
+    </template>
+    <headerTitle title="操作工具">
+      <el-button type="primary" size="small" @click="handleAdd">新增</el-button>
+    </headerTitle>
+
+    <el-table
+      ref="multipleTable"
+      :data="form.toolList"
+      tooltip-effect="dark"
+      style="width: 100%"
+      stripe
+      :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
+    >
+      <el-table-column label="工具名称" prop="code" min-width="120">
+        <template slot-scope="{ row }">
+          {{ row.name }}
+        </template></el-table-column
+      >
+
+      <el-table-column label="工具编码" prop="code" min-width="120">
+        <template slot-scope="{ row }">
+          {{ row.code }}
+        </template></el-table-column
+      >
+
+      <el-table-column label="牌号" prop="brandNum" min-width="120">
+        <template slot-scope="{ row }">
+          {{ row.brandNum }}
+        </template></el-table-column
+      >
+
+      <el-table-column label="型号" prop="modelType" min-width="120">
+        <template slot-scope="{ row }">
+          {{ row.modelType }}
+        </template></el-table-column
+      >
+
+      <el-table-column label="操作" fixed="right">
+        <template slot-scope="{ $index, row }">
+          <el-button type="text" @click="removeItem($index, row)"
+            >删除设备</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <headerTitle class="mt-20" title="操作指导">
+      <el-button type="primary" size="small" @click="addPostscript"
+        >新增</el-button
+      >
+    </headerTitle>
+
+    <el-table
+      ref="multipleTable"
+      :data="form.procedureList"
+      tooltip-effect="dark"
+      style="width: 100%"
+      stripe
+      :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
+    >
+      <el-table-column type="index" width="50"> </el-table-column>
+      <!-- <el-table-column label="排序" prop="" width="100">
+        <template slot-scope="{ row }">
+          <el-input
+            placeholder="请输入"
+            type="number"
+            v-model.number="row.sort"
+            clearable
+          ></el-input> </template
+      ></el-table-column> -->
+
+      <el-table-column label="操作步骤" prop="" min-width="120">
+        <template slot-scope="{ row }">
+          <el-input
+            placeholder="请输入"
+            type="textarea"
+            :rows="1"
+            v-model="row.content"
+            clearable
+          ></el-input> </template
+      ></el-table-column>
+
+      <el-table-column label="操作" fixed="right" width="100">
+        <template slot-scope="{ $index, row }">
+          <el-button type="text" @click="removePostscript($index, row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <template v-slot:footer>
+      <el-button @click="handleClose">取消</el-button>
+      <el-button type="primary" :loading="loading" @click="save">
+        保存
+      </el-button>
+    </template>
+
+    <ProductModal ref="productRefs" @chooseModal="chooseModal" />
+  </el-dialog>
+</template>
+
+<script>
+  import modalTitle from '@/components/modalTitle.vue';
+  import { deepClone } from 'ele-admin/lib/utils/core';
+  import ProductModal from './ProductModal.vue';
+  export default {
+    components: {
+      ProductModal,
+      modalTitle
+    },
+
+    data() {
+      const defaultForm = function () {
+        return {
+          toolList: [],
+          procedureList: []
+        };
+      };
+      return {
+        fullscreen: false,
+        defaultForm,
+        // 表单数据
+        form: { ...defaultForm() },
+        currentIndex: 0,
+        // 表单验证规则
+        rules: {
+          name: [{ required: true, message: '请输入', trigger: 'blur' }],
+
+          type: {
+            required: true,
+            message: '请选择',
+            trigger: 'change'
+          }
+        },
+        visible: false,
+
+        title: null,
+        loading: false
+      };
+    },
+
+    created() {},
+    methods: {
+      open(row, index) {
+        console.log(row);
+        console.log(index);
+        if (row) {
+          this.form = deepClone(row);
+        }
+        this.currentIndex = index;
+        this.visible = true;
+      },
+      /* 保存编辑 */
+      save() {
+        this.$emit('save', this.form, this.currentIndex);
+        this.visible = false;
+      },
+      restForm() {
+        this.form = { ...this.defaultForm() };
+      },
+      handleClose() {
+        this.restForm();
+        this.visible = false;
+      },
+
+      handleAdd() {
+        this.$refs.productRefs.open(this.form.toolList);
+      },
+
+      chooseModal(data) {
+        this.form.toolList = [...this.form.toolList, ...data];
+      },
+
+      removeItem(idx, row) {
+        if (this.form.toolList.length == 1) {
+          return this.$message.error('至少保留一个设备!');
+        }
+
+        this.$confirm(`是否删除这个设备?`).then(async () => {
+          this.form.toolList.splice(idx, 1);
+
+          if (row.id) {
+            this.form.toolRemoveIds.push(row.id);
+          }
+        });
+      },
+
+      addPostscript() {
+        this.form.procedureList.push({ sort: null, content: '' });
+      },
+      removePostscript(idx, row) {
+        if (this.form.procedureList.length == 1) {
+          return this.$message.error('至少保留一个事项!');
+        }
+
+        this.$confirm(`是否删除这个事项?`).then(async () => {
+          this.form.procedureList.splice(idx, 1);
+        });
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .location-warp {
+    display: flex;
+
+    .detail {
+      margin-left: 10px;
+    }
+  }
+
+  .mt-20 {
+    margin-top: 20px;
+  }
+
+  :deep(.el-dialog:not(.ele-dialog-form)
+      .el-dialog__body
+      .el-form
+      .el-form-item:last-child) {
+    margin-bottom: 22px;
+  }
+</style>

+ 114 - 0
src/views/produce/components/prenatalExamination/product-search.vue

@@ -0,0 +1,114 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="77px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="10">
+      <el-col v-bind="styleResponsive ? { md: 8 } : { span: 8 }">
+        <el-form-item label="设备名称">
+          <el-input clearable v-model="where.name" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { md: 8 } : { span: 8 }">
+        <el-form-item label="编号">
+          <el-input clearable v-model="where.codeNumber" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { md: 8 } : { span: 8 }">
+        <el-form-item label="固资编码">
+          <el-input clearable v-model="where.fixCode" placeholder="请输入" />
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-row :gutter="10">
+      <el-col v-bind="styleResponsive ? { md: 8 } : { span: 8 }">
+        <el-form-item label="结束时间">
+          <el-date-picker
+            style="width: 100%"
+            v-model="where.endTime"
+            value-format="yyyy-MM"
+            type="month"
+            placeholder="选择有效期结束"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { md: 8 } : { span: 8 }">
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+          >
+            查询
+          </el-button>
+
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh"
+            class="ele-btn-icon"
+            size="medium"
+            >重置</el-button
+          >
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  export default {
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        codeNumber: '',
+        fixCode: '',
+        endTime: ''
+      };
+      return {
+        defaultWhere,
+        // 表单数据
+        where: { ...defaultWhere },
+        treeData: []
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created() {},
+    methods: {
+      /* 搜索 */
+      search() {
+        if (this.where.appType === 0) {
+          this.where.appType = '';
+        }
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere };
+        this.search();
+      },
+      reset2() {
+        this.where = { ...this.defaultWhere };
+      }
+    }
+  };
+</script>
+
+<style>
+  .ele-form-actions {
+    display: inline-block;
+    transform: translate(0);
+    transition: all;
+  }
+</style>

+ 765 - 0
src/views/produce/components/prenatalExamination/programRulesDialog.vue

@@ -0,0 +1,765 @@
+<template>
+  <ele-modal
+    width="80%"
+    :visible="visible"
+    v-if="visible"
+    append-to-body
+    custom-class="ele-dialog-form"
+    :title="title"
+    :close-on-click-modal="false"
+    :before-close="beforeClose"
+    :maxable="true"
+  >
+    <header-title title="基本信息"></header-title>
+    <el-form
+      ref="addFormRef"
+      :model="addForm"
+      :rules="addFormRules"
+      label-width="120px"
+      v-loading="loading"
+    >
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="计划配置单号" prop="code">
+            <el-input
+              v-model="addForm.code"
+              size="small"
+              placeholder="自动带出"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="计划配置名称" prop="name">
+            <el-input
+              v-model="addForm.name"
+              size="small"
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="自动派单" prop="autoOrder">
+            <el-select
+              v-model="addForm.autoOrder"
+              size="small"
+              style="width: 100%"
+              @change="autoOrderChange"
+            >
+              <el-option :value="1" label="是"></el-option>
+              <el-option :value="0" label="否"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="计划完成时长" prop="duration">
+            <div style="display: flex">
+              <el-input
+                type="number"
+                v-model="addForm.duration"
+                size="small"
+                placeholder="请输入"
+                @input="formDataDurationTime"
+              >
+                <template #suffix>分钟</template>
+              </el-input>
+            </div>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="部门" prop="groupId">
+            <deptSelect
+              v-model="addForm.groupId"
+              @changeGroup="searchDeptNodeClick"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="负责人" prop="executorId">
+            <el-select
+              v-model="addForm.executorId"
+              size="small"
+              style="width: 100%"
+              multiple
+              filterable
+            >
+              <el-option
+                v-for="item in executorList"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="审核人" prop="approvalUserId">
+            <el-select
+              v-model="addForm.approvalUserId"
+              size="small"
+              clearable
+              style="width: 100%"
+              filterable
+            >
+              <el-option
+                v-for="item in uerList"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="紧急程度" prop="urgent">
+            <DictSelection
+              dictName="紧急程度"
+              clearable
+              v-model="addForm.urgent"
+            >
+            </DictSelection>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remark">
+            <el-input
+              type="textarea"
+              resize="none"
+              v-model="addForm.remark"
+              :rows="2"
+              placeholder="请详细说明"
+              size="small"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-tabs type="card">
+        <el-tab-pane v-if="ruleInfo" :label="ruleInfo.name">
+          <div class="el-tab_box">
+            <div class="equipmentList_box">
+              <header-title title="设备列表"> </header-title>
+              <el-table :data="deviceList" border>
+                <el-table-column label="序号" type="index" width="50">
+                </el-table-column>
+                <el-table-column label="设备名称" align="center" prop="name">
+                  <template slot-scope="{ row }">
+                    <template>
+                      {{ row.name }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="编号" align="center" prop="codeNumber">
+                  <template slot-scope="{ row }">
+                    <template>
+                      {{ row.codeNumber }}
+                    </template>
+                  </template>
+                </el-table-column>
+                <el-table-column label="固资编码" align="center" prop="fixCode">
+                  <template slot-scope="{ row }">
+                    <template>
+                      {{ row.fixCode }}
+                    </template>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <div class="ruleMatters_box">
+              <header-title title="规则事项">
+                <div>
+                  <el-button
+                    v-if="productionInfo.executeStatus == 0"
+                    size="small"
+                    icon="el-icon-plus"
+                    class="ele-btn-icon"
+                    type="primary"
+                    @click="addPostscript"
+                    >新增</el-button
+                  >
+                </div>
+              </header-title>
+              <el-table v-if="ruleInfo" :data="ruleInfo.ruleItems" border>
+                <el-table-column label="序号" width="50">
+                  <template slot-scope="scope">
+                    <span>{{ scope.$index + 1 }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  label="零部件编码"
+                  prop="categoryCode"
+                  width="150"
+                >
+                  <template slot-scope="scope">
+                    <div v-if="scope.row.isNew">
+                      <el-input
+                        v-model="scope.row.categoryCode"
+                        placeholder="请输入零部件编码"
+                      ></el-input>
+                    </div>
+                    <div v-else>
+                      <span>{{ scope.row.categoryCode }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="零部件名称" prop="categoryName">
+                  <template slot-scope="scope">
+                    <div v-if="scope.row.isNew">
+                      <el-input
+                        v-model="scope.row.categoryName"
+                        placeholder="请输入零部件名称"
+                      ></el-input>
+                    </div>
+                    <div v-else>
+                      <span>{{ scope.row.categoryName }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="事项" prop="name">
+                  <template slot-scope="scope">
+                    <div v-if="scope.row.isNew">
+                      <el-input
+                        v-model="scope.row.name"
+                        placeholder="请输入内容"
+                      ></el-input>
+                    </div>
+                    <div v-else>
+                      <span>{{ scope.row.name }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="内容" prop="content">
+                  <template slot-scope="scope">
+                    <div v-if="scope.row.isNew">
+                      <el-input
+                        v-model="scope.row.content"
+                        placeholder="请输入内容"
+                      ></el-input>
+                    </div>
+                    <div v-else>
+                      <span>{{ scope.row.content }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作指导" prop="operationGuide">
+                  <template slot-scope="scope">
+                    <div
+                      class="operationGuide_box"
+                      @click="
+                        openOperationGuideDialogDialog(
+                          scope.row.operationGuide,
+                          scope.$index
+                        )
+                      "
+                    >
+                      <div class="left_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .toolList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.name }}</div
+                          >
+                        </template>
+                      </div>
+                      <div class="right_content">
+                        <template v-if="scope.row.operationGuide">
+                          <div
+                            v-for="(item, index) in scope.row.operationGuide
+                              .procedureList"
+                            :key="item.id"
+                            >{{ index + 1 }}.{{ item.content }}</div
+                          >
+                        </template>
+                      </div>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="标准" prop="norm" width="100">
+                  <template slot-scope="scope">
+                    <div v-if="scope.row.isNew">
+                      <el-input
+                        v-model="scope.row.norm"
+                        placeholder="请输入内容"
+                      ></el-input>
+                    </div>
+                    <div v-else>
+                      <span>{{ scope.row.norm }}</span>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="操作" width="100">
+                  <template slot-scope="scope">
+                    <el-button
+                      v-if="productionInfo.executeStatus == 0"
+                      type="text"
+                      @click="deleteItem(scope.$index)"
+                      >删除</el-button
+                    >
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </el-form>
+    <template v-slot:footer>
+      <el-button :loading="butLoading" @click="beforeClose">取消</el-button>
+      <el-button
+        v-if="$hasPermission('mes:producetaskrulerecord:save')"
+        type="primary"
+        @click="submit"
+        :disabled="productionInfo.executeStatus != 0"
+        :loading="butLoading"
+      >
+        派单</el-button
+      >
+    </template>
+
+    <OperationGuideDialog
+      ref="operationGuideDialog"
+      @save="saveEdit"
+    ></OperationGuideDialog>
+  </ele-modal>
+</template>
+
+<script>
+  import { getDetail, getCode } from '@/api/ruleManagement/matter';
+  import { getUserPage } from '@/api/system/organization';
+  import OperationGuideDialog from './operationGuideDialog.vue';
+  import deptSelect from '@/components/CommomSelect/dept-select.vue';
+  import { getById } from '@/api/maintenance/patrol_maintenance';
+  import { getFile } from '@/api/system/file';
+  import { getAssetInfo } from '@/api/produce/device';
+  import { saveRuleRecord } from '@/api/producetaskrulerecord/index.js';
+
+  export default {
+    components: {
+      deptSelect,
+      OperationGuideDialog
+    },
+    emits: ['reload'],
+    props: {},
+    data() {
+      const formData = {
+        code: '', // 计划配置单号
+        name: '', // 计划配置名称
+        autoOrder: 1, // 自动派单
+        ruleId: '', // 规则id
+        ruleName: '', // 规则名称
+        duration: null, // 计划完成时长
+        categoryId: '', // 设备类别id
+        approvalUserId: '', // 审核人id
+        groupId: '', // 巡点检部门code
+        executorId: [], // 巡点检人员id
+        executorPhone: '',
+        status: 1, // 状态
+        remark: '', // 备注
+        urgent: '1', // 紧急程度
+        type: '',
+        groupName: '',
+        isTempRecord: 0
+      };
+
+      return {
+        visible: false,
+        formData,
+        addForm: JSON.parse(JSON.stringify(formData)),
+        uerList: [], // 审核人列表
+        executorList: [], // 业务人员列表
+
+        // 表单验证规则
+        addFormRules: {
+          name: [
+            { required: true, message: '请输入计划配置名称', trigger: 'blur' }
+          ],
+          autoOrder: [
+            { required: true, message: '请选择是否自动派单', trigger: 'change' }
+          ],
+          ruleId: [
+            { required: true, message: '请选择规则名称', trigger: 'change' }
+          ],
+          duration: [
+            { required: true, message: '请输入计划完成时长', trigger: 'blur' }
+          ],
+          categoryLevelId: [
+            { required: true, message: '请选择设备分类', trigger: 'change' }
+          ],
+          categoryId: [
+            { required: true, message: '请选择设备类别', trigger: 'change' }
+          ],
+          groupId: [
+            { required: true, message: '请选择巡点检部门', trigger: 'change' }
+          ],
+          executorId: [
+            { required: true, message: '请选择巡点检人员', trigger: 'change' }
+          ],
+          urgent: [
+            { required: true, message: '请选择紧急程度', trigger: 'change' }
+          ]
+        },
+
+        statusList: [
+          { label: '草稿', value: -1 },
+          { label: '失效', value: 0 },
+          { label: '生效', value: 1 }
+        ],
+
+        // 规则信息
+        ruleInfo: null,
+        // 设备信息
+        deviceList: [],
+        // 事项信息
+        productionInfo: null,
+        // 工艺路线
+        workOrderInfo: null,
+        // 工序信息
+        produceTaskInfo: null,
+        // 加载状态
+        loading: false,
+        // 提交状态
+        butLoading: false
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      },
+      title() {
+        if (this.ruleInfo) {
+          return `新增${this.ruleInfo.name}计划`;
+        }
+        return '';
+      }
+    },
+    watch: {
+      visible(val) {
+        if (val) {
+          // 获取审核人列表数据
+          this.getUserList();
+        }
+      }
+    },
+    methods: {
+      // 关闭重置数据
+      beforeClose() {
+        this.$refs.addFormRef.resetFields();
+        this.addForm = JSON.parse(JSON.stringify(this.formData));
+        this.ruleInfo = null;
+        this.deviceList = [];
+        this.visible = false;
+      },
+      // 初始化
+      async init(row, workOrderInfo, produceTaskInfo) {
+        console.log(row);
+        this.productionInfo = row;
+        this.workOrderInfo = workOrderInfo;
+        this.produceTaskInfo = produceTaskInfo;
+        this.visible = true;
+
+        if (this.productionInfo.executeStatus != 0) {
+          // 执行中 已执行 获取基本信息
+          this.getInfo();
+        } else {
+          // 获取设备信息 规则列表
+          this.getRuleInfoAndList(row);
+          this.getDeviceId(row.deviceId);
+        }
+      },
+      // 已执行获取基本信息
+      async getInfo() {
+        try {
+          this.loading = true;
+          const { data } = await getById(this.productionInfo.eamPlanId);
+          console.log('data 基本信息', data);
+          // 数据回显
+          this.$util.assignObject(this.addForm, data);
+          // 类型转换
+          this.addForm.urgent = this.addForm.urgent + '';
+          this.addForm.executorId = data.executorId.split(',');
+          // 获取部门用户列表
+          this.getUserList({ groupId: data.groupId });
+          this.ruleInfo = data.ruleInfo;
+          this.ruleInfo.ruleItems = data.planDeviceList[0]?.workItems || [];
+          this.deviceList = data.planDeviceList.map((item) => {
+            return {
+              name: item.substance.name,
+              position: item.substance.position,
+              id: item.substance.id,
+              fixCode: item.substance.fixCode,
+              codeNumber: item.substance.codeNumber
+            };
+          });
+          this.loading = false;
+        } catch (error) {
+          this.loading = false;
+        }
+      },
+      // 获取规则信息 和 规则事项列表
+      async getRuleInfoAndList(row) {
+        // 事项规则
+        const data = await getDetail(row.ruleId);
+        console.log('事项规则', data);
+        this.ruleInfo = data;
+        this.addForm.ruleId = data.id;
+        this.addForm.ruleName = data.name;
+        this.addForm.type = data.ruleType;
+        // code 生成
+        this.getOrderCode(data.ruleType);
+      },
+      // 查询设备信息
+      async getDeviceId(id) {
+        const data = await getAssetInfo(id);
+        this.deviceList = [data];
+        console.log('data -- 设备信息', data);
+        this.addForm.categoryId = data.categoryId;
+      },
+
+      //选择部门(搜索)
+      searchDeptNodeClick(info, data) {
+        if (info) {
+          // 根据部门获取人员
+          this.addForm.groupName = data.name;
+          const params = { groupId: info };
+          this.getUserList(params);
+        } else {
+          this.addForm.groupId = null;
+        }
+      },
+      // 过滤计划完成时长
+      formDataDurationTime(value) {
+        if (value > 0) {
+          this.addForm.duration = value.replace(/^[0]+/, '');
+        } else {
+          this.addForm.duration = 0;
+        }
+      },
+      // 获取审核人列表、巡点检人员
+      async getUserList(params) {
+        try {
+          let data = { pageNum: 1, size: -1 };
+          // 如果传了参数就是获取巡点检人员数据
+          if (params) {
+            data = Object.assign(data, params);
+          }
+          const res = await getUserPage(data);
+          if (params) {
+            this.executorList = res.list;
+          } else {
+            this.uerList = res.list;
+          }
+        } catch (error) {}
+      },
+      autoOrderChange(val) {
+        if (val == 0) {
+          this.addForm.executorId = '';
+          this.addForm.groupId = '';
+        }
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      // 添加事项规则
+      addPostscript() {
+        this.ruleInfo.ruleItems.push({
+          sort: null,
+          name: '',
+          content: '',
+          norm: '',
+          isNew: true,
+          operationGuide: {
+            procedureList: [],
+            toolList: []
+          }
+        });
+      },
+      /* 打开操作手册编辑款 */
+      openOperationGuideDialogDialog(row, index) {
+        this.$refs.operationGuideDialog.open(row, index);
+      },
+      // 删除事项规则
+      deleteItem(index) {
+        if (this.ruleInfo.ruleItems.length > 1) {
+          this.ruleInfo.ruleItems.splice(index, 1);
+        } else {
+          this.$message.error('至少要有一个规则事项!');
+        }
+      },
+      // 保存操作指导数据
+      saveEdit(data, index) {
+        this.$set(this.ruleInfo.ruleItems[index], 'operationGuide', data);
+      },
+      // code生成
+      async getOrderCode(type) {
+        if (type == 1) {
+          const data = await getCode('patrolconfig_code');
+          this.addForm.code = data;
+        }
+        if (type == 2) {
+          const data = await getCode('maintainconfig_code');
+          this.addForm.code = data;
+        }
+        if (type == 5) {
+          const data = await getCode('quantity_code');
+          this.addForm.code = data;
+        }
+      },
+      // 提交
+      submit() {
+        // 验证表单
+        this.$refs.addFormRef.validate(async (valid) => {
+          if (!valid) {
+            return;
+          }
+
+          // 处理数据
+          console.log('this.addForm', this.addForm);
+
+          try {
+            this.butLoading = true;
+            let deviceInfo = this.deviceList[0] || {};
+
+            // 请求参数
+            const body = {
+              planList: [
+                {
+                  ...this.addForm,
+                  executorId: this.addForm.executorId.join(','),
+                  planDeviceList: [
+                    {
+                      deviceId: deviceInfo.id,
+                      codeNumber: deviceInfo.codeNumber,
+                      workItems: this.ruleInfo.ruleItems
+                    }
+                  ]
+                }
+              ],
+              produceRoutingId: this.workOrderInfo.produceRoutingId,
+              produceRoutingName: this.workOrderInfo.produceRoutingName,
+              produceTaskConfigId: this.productionInfo.produceTaskConfigId,
+              produceTaskId: this.productionInfo.produceTaskId,
+              reportWorkType: this.productionInfo.reportWorkType,
+              ruleId: this.ruleInfo.id,
+              ruleName: this.ruleInfo.name,
+              workOrderCode: this.workOrderInfo.code,
+              workOrderId: this.workOrderInfo.id,
+              batchNo: this.workOrderInfo.batchNo,
+              executeMethod: this.productionInfo.executeMethod,
+              formingNum: this.workOrderInfo.formingNum,
+              productCode: this.workOrderInfo.productCode,
+              productModel: this.workOrderInfo.productModel,
+              productName: this.workOrderInfo.productName,
+              specification: this.workOrderInfo.specification,
+              isTempRecord: 0,
+              itemType: this.productionInfo.itemType,
+              deviceId: deviceInfo.id,
+              deviceName: deviceInfo.name
+            };
+
+            console.log('body', body);
+
+            await saveRuleRecord(body);
+            this.$message.success('派单成功!');
+            this.butLoading = false;
+            this.beforeClose();
+            this.$emit('reload');
+          } catch (error) {
+            this.$message.error('派单失败!');
+            this.butLoading = false;
+          }
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .el-row {
+    display: flex;
+    flex-wrap: wrap;
+  }
+
+  ::v-deep .el-tab_box {
+    display: flex;
+    margin-top: 10px;
+    height: 300px;
+    width: 100%;
+
+    .equipmentList_box {
+      flex: 1;
+      height: 100%;
+      margin-right: 10px;
+      display: flex;
+      flex-direction: column;
+
+      .divider {
+        flex: 0 0 50px;
+
+        .title {
+          height: 35px;
+        }
+      }
+
+      .el-table {
+        overflow: auto;
+      }
+    }
+
+    .ruleMatters_box {
+      flex: 3;
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+
+      .divider {
+        flex: 0 0 50px;
+
+        .title {
+          height: 35px;
+        }
+      }
+
+      .el-table {
+        overflow: auto;
+
+        .operationGuide_box {
+          width: 100%;
+          height: 50px;
+          display: flex;
+          overflow: hidden;
+          cursor: pointer;
+
+          .left_content {
+            flex: 0 0 200px;
+            padding: 10px;
+            box-sizing: border-box;
+            border: 1px solid #c0c4cc;
+            border-radius: 10px;
+            margin-right: 10px;
+            overflow-y: auto;
+          }
+
+          .right_content {
+            flex: 1;
+            padding: 10px;
+            box-sizing: border-box;
+            border: 1px solid #c0c4cc;
+            border-radius: 10px;
+            overflow-y: auto;
+          }
+        }
+      }
+
+      .el-table::before {
+        display: none;
+      }
+    }
+  }
+</style>

+ 559 - 0
src/views/produce/components/prenatalExamination/releaseRulesDialog.vue

@@ -0,0 +1,559 @@
+<template>
+  <ele-modal
+    width="80%"
+    :visible="visible"
+    append-to-body
+    custom-class="ele-dialog-form"
+    :title="title"
+    :close-on-click-modal="false"
+    :before-close="handleBeforeClose"
+    maxable
+  >
+    <header-title title="基本信息"></header-title>
+    <el-form
+      :model="addForm"
+      :rules="formRules"
+      ref="ruleFormRef"
+      label-width="150px"
+      v-loading="loading"
+    >
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="记录规则名称" required>
+            <el-input
+              v-model="addForm.ruleName"
+              size="small"
+              placeholder="自动带出"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="记录规则分类" required>
+            <DictSelection
+              dictName="记录规则类型"
+              clearable
+              v-model="addForm.recordRulesClassify"
+              disabled
+            >
+            </DictSelection>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item
+            v-if="ruleInfo && ruleInfo.classify == 3"
+            label="关联设备"
+          >
+            <el-input
+              v-model="addForm.deviceName"
+              size="small"
+              placeholder="自动带出"
+              disabled
+            ></el-input>
+          </el-form-item>
+          <el-form-item v-else label="车间区域" prop="workshopArea">
+            <el-input
+              v-model="addForm.workshopArea"
+              size="small"
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="检查完成时间" required prop="checkFinishTime">
+            <el-date-picker
+              v-model="addForm.checkFinishTime"
+              type="datetime"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              placeholder="选择日期"
+              style="width: 100%"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="检查有效期" required prop="checkValidity">
+            <el-input
+              placeholder="请输入"
+              v-model="addForm.checkValidity"
+              type="text"
+            >
+              <template slot="append">
+                <div style="width: 40px; box-sizing: border-box">
+                  <el-form-item required prop="checkValidityUnit">
+                    <DictSelection
+                      dictName="检查有效期单位"
+                      clearable
+                      v-model="addForm.checkValidityUnit"
+                      placeholder="单位"
+                      style="width: auto"
+                    >
+                    </DictSelection>
+                  </el-form-item>
+                </div>
+              </template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="结论" required prop="conclution">
+            <el-radio-group v-model="addForm.conclution">
+              <el-radio :label="1">合格</el-radio>
+              <el-radio :label="2">不合格</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <header-title title="检查项目"></header-title>
+
+    <!-- 表格 -->
+    <el-table v-loading="loading" :data="addForm.details" style="width: 100%">
+      <el-table-column type="index" label="序号" width="50"> </el-table-column>
+      <el-table-column label="检查内容">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.paramValue }}
+          </div>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="检查工具">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.toolNames }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="检查人">
+        <template slot-scope="scope">
+          <div
+            @click="openSelectUser(scope.row)"
+            style="display: flex; align-items: center; cursor: pointer"
+          >
+            <div>{{ showCheckUserNames(scope.row.checkUsers) }}</div
+            ><i class="el-icon-caret-bottom"></i>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="检查情况">
+        <template slot-scope="scope">
+          <div>
+            <div>
+              <el-input
+                v-if="ruleInfo && ruleInfo.classify == 3"
+                type="textarea"
+                :rows="1"
+                v-model="scope.row.checkStatusDesc"
+              ></el-input>
+              <el-radio-group v-else v-model="scope.row.checkStatus">
+                <el-radio :label="1">已检查</el-radio>
+                <el-radio :label="0">未检查</el-radio>
+              </el-radio-group>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="检查结果">
+        <template slot-scope="scope">
+          <div>
+            <el-radio-group v-model="scope.row.checkResult">
+              <el-radio :label="1">合格</el-radio>
+              <el-radio :label="0">不合格</el-radio>
+            </el-radio-group>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="异常描述">
+        <template slot-scope="scope">
+          <div>
+            <el-input
+              type="textarea"
+              :rows="1"
+              placeholder="请输入"
+              v-model="scope.row.errorMsg"
+            >
+            </el-input>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 底部按钮 -->
+    <template #footer>
+      <div class="modal-footer">
+        <el-button
+          v-if="$hasPermission('mes:producetaskrecordrulesrecord:sus')"
+          :loading="butLoading"
+          type="primary"
+          @click="submit('submit')"
+          :disabled="productionInfo && productionInfo.executeStatus == 2"
+        >
+          一键报工
+        </el-button>
+
+        <template
+          v-if="$hasPermission('mes:producetaskrecordrulesrecord:logicdelete')"
+        >
+          <el-popconfirm
+            v-if="
+              productionInfo &&
+              productionInfo.recordId != null &&
+              productionInfo.executeStatus == 1
+            "
+            title="您确定要清空缓存吗?"
+            @confirm="clearCache"
+          >
+            <el-button slot="reference" :loading="butLoading" type="primary">
+              清空缓存
+            </el-button>
+          </el-popconfirm>
+        </template>
+
+        <el-button
+          v-if="$hasPermission('mes:producetaskrecordrulesrecord:saveorupdate')"
+          :loading="butLoading"
+          type="primary"
+          @click="submit('cache')"
+          :disabled="productionInfo && productionInfo.executeStatus == 2"
+        >
+          缓存
+        </el-button>
+
+        <el-button
+          v-if="productionInfo && productionInfo.executeStatus == 2"
+          @click="handleBeforeClose"
+        >
+          关闭
+        </el-button>
+      </div>
+    </template>
+    <!-- 选择用户 -->
+    <SelectUser
+      ref="SelectUserRef"
+      v-model="showSelectUser"
+      multipleSelect
+      @selectUserFinished="selectUserFinished"
+    ></SelectUser>
+  </ele-modal>
+</template>
+
+<script>
+  import { submit } from '@/api/entrust';
+  import {
+    recordRulesDetailPage,
+    getRecordRulesDetail
+  } from '@/api/recordRules/index.js';
+  import DictSelection from '@/components/Dict/DictSelection.vue';
+  import SelectUser from '@/components/select/SelectUser/index.vue';
+  import {
+    saveOrUpdateAndSubmit,
+    saveOrUpdate,
+    logicDelete,
+    getById
+  } from '@/api/producetaskrecordrulesrecord/index';
+
+  export default {
+    components: { SelectUser },
+    emits: ['reload'],
+    props: {},
+    data() {
+      const formDate = {
+        id: null,
+        workshopArea: '',
+        checkFinishTime: '',
+        checkValidity: null,
+        checkValidityUnit: '',
+        conclution: null,
+        isTempRecord: 0,
+        details: [],
+        deviceId: 0,
+        deviceName: '',
+        batchNo: '',
+        executeMethod: 0,
+        formingNum: 0,
+        itemType: 0,
+        produceRoutingId: 0,
+        produceRoutingName: '',
+        produceTaskConfigId: 0,
+        produceTaskId: 0,
+        productCode: '',
+        productModel: '',
+        productName: '',
+        recordRulesClassify: null,
+        ruleId: 0,
+        ruleName: '',
+        reportWorkType: 0,
+        specification: '',
+        workOrderCode: '',
+        workOrderId: 0
+      };
+
+      return {
+        visible: false,
+        formDate,
+        addForm: JSON.parse(JSON.stringify(formDate)),
+        formRules: {
+          checkFinishTime: [
+            { required: true, message: '请选择检查完成时间', trigger: 'blur' },
+            { required: true, message: '请选择检查完成时间', trigger: 'change' }
+          ],
+          conclution: [
+            { required: true, message: '请选择结论', trigger: 'blur' },
+            { required: true, message: '请选择结论', trigger: 'change' }
+          ],
+          checkValidity: [
+            { required: true, message: '请输入检查有效期', trigger: 'blur' },
+            { required: true, message: '请输入检查有效期', trigger: 'change' }
+          ],
+          checkValidityUnit: [
+            {
+              required: true,
+              message: '请选择检查有效期单位',
+              trigger: 'blur'
+            },
+            {
+              required: true,
+              message: '请选择检查有效期单位',
+              trigger: 'change'
+            }
+          ]
+        },
+        productionInfo: null,
+        list: [],
+        ruleInfo: null,
+        showSelectUser: false,
+        currentRow: null,
+        butLoading: false,
+        // 工艺路线
+        workOrderInfo: null,
+        //工序信息
+        produceTaskInfo: null,
+        // 加载中 loading
+        loading: false
+      };
+    },
+    computed: {
+      title() {
+        if (this.ruleInfo) {
+          switch (this.ruleInfo.classify) {
+            case 1:
+              return '清场清洁类记录表';
+            case 2:
+              return '车间环境类记录表';
+
+            default:
+              return '设备检测类记录表';
+          }
+        }
+        return '类记录表';
+      }
+    },
+    methods: {
+      open(productionInfo, workOrderInfo, produceTaskInfo) {
+        this.visible = true;
+        this.productionInfo = productionInfo;
+        this.workOrderInfo = workOrderInfo;
+        this.produceTaskInfo = produceTaskInfo;
+
+        // 存在缓存记录
+        if (this.productionInfo.recordId != null) {
+          // 查询详情
+          this.getCacheInfo();
+        } else {
+          this.addForm.batchNo = workOrderInfo.batchNo;
+          this.addForm.executeMethod = productionInfo.executeMethod;
+          this.addForm.formingNum = workOrderInfo.formingNum;
+          this.addForm.itemType = productionInfo.itemType;
+          this.addForm.produceRoutingId = workOrderInfo.produceRoutingId;
+          this.addForm.produceRoutingName = workOrderInfo.produceRoutingName;
+          this.addForm.produceTaskConfigId = productionInfo.produceTaskConfigId;
+          this.addForm.produceTaskId = productionInfo.produceTaskId;
+          this.addForm.productCode = workOrderInfo.productCode;
+          this.addForm.productModel = workOrderInfo.model;
+          this.addForm.productName = workOrderInfo.productName;
+          this.addForm.reportWorkType = productionInfo.reportWorkType;
+          this.addForm.specification = workOrderInfo.specification;
+          this.addForm.workOrderCode = workOrderInfo.code;
+          this.addForm.workOrderId = workOrderInfo.id;
+
+          this.getRuleList();
+        }
+
+        console.log('this.productionInfo', this.productionInfo);
+        console.log('this.addForm', this.addForm);
+        this.getRuleInfo();
+      },
+      // 获取详情
+      async getCacheInfo() {
+        this.loading = true;
+        try {
+          const data = await getById(this.productionInfo.recordId);
+          console.log('dat 缓存', data);
+          this.$util.assignObject(this.addForm, data);
+          this.addForm.recordRulesClassify += '';
+          this.loading = false;
+        } catch (error) {
+          this.loading = false;
+        }
+      },
+      // 规则信息
+      async getRuleInfo() {
+        const data = await getRecordRulesDetail(this.productionInfo.ruleId);
+        this.ruleInfo = data;
+        console.log('this.ruleInfo', this.ruleInfo);
+        if (this.productionInfo.recordId == null) {
+          // 赋值表单信息
+          this.addForm.recordRulesClassify = this.ruleInfo.classify + '';
+          this.addForm.ruleId = this.ruleInfo.id;
+          this.addForm.ruleName = this.ruleInfo.name;
+          this.addForm.deviceId = this.ruleInfo.deviceId;
+          this.addForm.deviceName = this.ruleInfo.deviceName;
+        }
+      },
+      // 查询记录规则 事项列表
+      async getRuleList() {
+        const { list } = await recordRulesDetailPage({
+          rulesId: this.productionInfo.ruleId,
+          pageNum: 1,
+          size: 9999
+        });
+        // 添加必要参数
+        this.addForm.details = list.map((i) => {
+          return {
+            checkResult: null,
+            checkStatus: null,
+            checkStatusDesc: '',
+            errorMsg: '',
+            checkUsers: [],
+            paramValue: i.paramValue,
+            toolNames: i.tools.map((i) => i.toolName).join(','),
+            recordId: i.recordId
+          };
+        });
+        console.log('this.addForm 添加规则', this.addForm);
+      },
+      openSelectUser(row) {
+        this.currentRow = row;
+        console.log('row', row);
+        this.showSelectUser = true;
+        console.log('this.showSelectUser', this.showSelectUser);
+      },
+      handleBeforeClose() {
+        this.addForm = JSON.parse(JSON.stringify(this.formDate));
+        console.log('this.$refs.ruleFormRef', this.addForm);
+        this.$refs.ruleFormRef?.clearValidate();
+        this.$nextTick(() => {
+          this.visible = false;
+        });
+      },
+
+      selectUserFinished(userInfo) {
+        console.log('userInfo', userInfo);
+        this.currentRow.checkUsers = userInfo.map((i) => {
+          // 构建参数和接口的对应上
+          return { ...i, userName: i.name, userId: i.id };
+        });
+      },
+      showCheckUserNames(userList) {
+        if (userList.length == 0) return '请选择部门-选择员工';
+
+        return userList
+          .map((i) => {
+            return i.groupName + '-' + i.userName;
+          })
+          .join(',');
+      },
+      // 提交
+      submit(type) {
+        // 验证表单
+        this.$refs.ruleFormRef.validate(async (valid) => {
+          if (!valid) {
+            return;
+          }
+
+          // 报工需要验证 缓存不验证
+          if (type == 'submit') {
+            // 验证检查项目
+            const detailRequired = this.addForm.details.some((i) => {
+              let qk = false;
+              if (this.ruleInfo.classify == 3) {
+                qk = Boolean(i.checkStatusDesc);
+              } else {
+                qk = i.checkStatus != null;
+              }
+
+              return i.checkResult == null || !qk || i.checkUsers?.length == 0;
+            });
+
+            if (detailRequired) {
+              return this.$message.warning(
+                '请先完善 检查人、检查情况、检查结果 内容!'
+              );
+            }
+          }
+
+          console.log('this.addForm', this.addForm);
+
+          // 提交
+          this.butLoading = true;
+          try {
+            if (type == 'submit') {
+              await saveOrUpdateAndSubmit(this.addForm);
+              this.$message.success('报工成功!');
+            } else {
+              const id = await saveOrUpdate(this.addForm);
+              this.addForm.id = id;
+              this.$message.success('缓存成功!');
+            }
+
+            this.butLoading = false;
+
+            // 返回
+            this.$emit('reload');
+
+            this.handleBeforeClose();
+          } catch (error) {
+            this.butLoading = false;
+          }
+        });
+      },
+      async clearCache() {
+        try {
+          this.butLoading = true;
+          await logicDelete(this.productionInfo.recordId);
+          this.butLoading = false;
+          this.productionInfo.recordId == null;
+          this.addForm.workshopArea = '';
+          this.addForm.checkFinishTime = null;
+          this.addForm.checkValidity = null;
+          this.addForm.checkValidityUnit = null;
+          this.addForm.conclution = null;
+          this.addForm.id = null;
+
+          this.getRuleList();
+          this.$message.success('缓存清空成功!');
+          this.productionInfo.executeStatus = 0;
+          this.$emit('reload');
+        } catch (error) {
+          this.butLoading = false;
+        }
+      }
+    }
+  };
+</script>
+
+<style scoped>
+  .modal-body {
+    padding: 16px;
+    min-height: 100px;
+  }
+  .modal-footer {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    justify-content: flex-end;
+  }
+</style>

+ 69 - 2
src/views/produce/index.vue

@@ -149,6 +149,8 @@
                 @rowClick="rowClick"
                 ref="produceOrder"
                 @getTaskName="getTaskName"
+                :produceTaskInfo="produceTaskInfo"
+                @changeIsPreProductionResult="changeIsPreProductionResult"
               >
               </produceOrder>
             </div>
@@ -278,6 +280,7 @@
           :type="type"
           :singleReportInspection="singleReportInspection"
           style="background: rgba(223, 250, 222, 0.6); padding: 10px"
+          :isPreProductionResult="isPreProductionResult"
         ></footBtn>
 
         <!-- <div class="box"> -->
@@ -316,6 +319,9 @@
 
     <!-- BOM详情 -->
     <BomDetailsPop ref="bomDrawer"></BomDetailsPop>
+
+    <!-- 产前准备 、 过程监测 、产后检测 -->
+    <prenatalExamination ref="prenatalExaminationRef" />
   </div>
 </template>
 
@@ -358,6 +364,7 @@
     nextTask,
     singleListTask
   } from '@/api/produce/index';
+  import prenatalExamination from './components/prenatalExamination/index.vue';
 
   export default {
     components: {
@@ -382,7 +389,8 @@
       device,
       turnover,
       outsourcingDetails,
-      BomDetailsPop
+      BomDetailsPop,
+      prenatalExamination
     },
     data() {
       return {
@@ -401,6 +409,7 @@
         arr: [],
         arrTow: [],
         produceTaskList: [],
+        produceTaskInfo: null,
         isType: '',
         isStep: false,
         outsourceForm: {},
@@ -445,7 +454,8 @@
           { label: '产前准备', action: 'Delete' },
           { label: '过程检测', action: 'Edit' },
           { label: '产后检查', action: 'Favorite' }
-        ]
+        ],
+        isPreProductionResult: true
       };
     },
 
@@ -568,6 +578,12 @@
       handleNodeClick(data) {
         this.feedNeedEquipment = data.feedNeedEquipment;
         this.reportNeedFeed = data.reportNeedFeed;
+        this.produceTaskInfo = data;
+
+        // 重置按钮 禁用
+        if (this.produceTaskInfo && this.produceTaskInfo.id != data.id) {
+          this.isPreProductionResult = true;
+        }
 
         console.log(data, 'handleNodeClick');
 
@@ -904,6 +920,52 @@
             this.handOutsource(this.workListIds[0]);
           }
         }
+
+        // 产前准备 过程监测 产后检查
+        if (
+          t == 'prenatalExamination' ||
+          t == 'processDetection' ||
+          t == 'postpartumExamination'
+        ) {
+          if (this.workListIds.length > 1) {
+            if (t == 'prenatalExamination') {
+              return this.$message.warning('产前准备只能选择一个工单!');
+            }
+            if (t == 'processDetection') {
+              return this.$message.warning('过程监测只能选择一个工单!');
+            }
+            return this.$message.warning('产后检查只能选择一个工单!');
+          }
+
+          if (this.workListIds.length < 1) {
+            return this.$message.warning('请选择工单!');
+          }
+
+          let reportWorkType = 1;
+
+          console.log('this.workListIds', this.workListIds, t);
+
+          switch (t) {
+            case 'prenatalExamination':
+              reportWorkType = 1;
+              break;
+            case 'processDetection':
+              reportWorkType = 2;
+              break;
+            default:
+              reportWorkType = 3;
+              break;
+          }
+
+          // 产前准备
+          console.log('this.produceTaskInfo', this.produceTaskInfo);
+          this.$refs.prenatalExaminationRef.open(
+            this.workData.list[0],
+            this.produceTaskInfo,
+            // 	报工类型,参考字典项:record_rules_report_work_type,1-产前准备,2-过程监测,3-产后检查
+            reportWorkType
+          );
+        }
       },
 
       outsourcingAdd() {
@@ -996,6 +1058,11 @@
             this.$forceUpdate();
           });
         }
+      },
+      // 是否完成 产前准备 限制按钮
+      changeIsPreProductionResult(isPreProductionResult) {
+        console.log('isPreProductionResult', isPreProductionResult);
+        this.isPreProductionResult = isPreProductionResult;
       }
     },
 

+ 15 - 0
src/views/produceOrder/index.vue

@@ -47,6 +47,10 @@
           <el-button type="success" @click="allPrinting()"
             >批量打印二维码</el-button
           >
+
+          <el-button :disabled="selection.length > 1" type="success" @click="cardPrinting()"
+            >工艺卡打印</el-button
+          >
         </template>
 
         <template v-slot:code="{ row }">
@@ -186,6 +190,7 @@
     <print ref="printRef"></print>
     <printSr ref="printSrRef"></printSr>
     <printTg ref="printTgRef"></printTg>
+    <printCard ref="printCardRef"></printCard>
 
     <createDialog ref="createRef" @success="createSuccess" />
     <unpackDialog ref="unpackRef" @success="createSuccess" />
@@ -228,6 +233,7 @@
   import print from './components/print.vue';
   import printSr from './components/printSr';
   import printTg from './components/printTg';
+  import printCard from './print.vue';
   import EquipmentDialog from './components/EquipmentDialog.vue';
   import detailsPop from './components/details/index.vue';
 
@@ -245,6 +251,7 @@
       print,
       printSr,
       printTg,
+      printCard,
       detailsPop,
       EquipmentDialog,
       xlhView,
@@ -1077,6 +1084,14 @@
           this.$refs.printRef.open(ids);
         }
       },
+      // 工艺卡打印
+      cardPrinting() {
+        if (this.selection.length !== 1) {
+          return this.$message.warning('请选择一条工单!');
+        }
+        let ids = this.findAllIds(this.selection);
+        this.$refs.printCardRef.open(ids);
+      },
 
       findAllIds(nodes) {
         let ids = [];

+ 143 - 195
src/views/produceOrder/print.vue

@@ -1,138 +1,169 @@
 <template>
-  <div class="print-root">
-    <div class="card-title">工艺流程卡</div>
-    <table class="info-table">
-      <tr>
-        <td rowspan="3" class="qr-cell">
-          <img :src="card.qrLeft" alt="二维码" />
-        </td>
-        <td>单号</td>
-        <td>{{ card.orderNo }}</td>
-        <td>单据日期</td>
-        <td>{{ card.date }}</td>
-        <td rowspan="3" class="qr-cell">
-          <img :src="card.qrRight" alt="二维码" />
-        </td>
-      </tr>
-      <tr>
-        <td>编号</td>
-        <td>{{ card.code }}</td>
-        <td>存货名称</td>
-        <td>{{ card.name }}</td>
-      </tr>
-      <tr>
-        <td>图号</td>
-        <td>{{ card.drawingNo }}</td>
-        <td colspan="2"></td>
-      </tr>
-    </table>
-
-    <table class="process-table">
-      <thead>
+  <ele-modal
+    title="工艺流程卡"
+    :visible.sync="QRvisible"
+    v-if="QRvisible"
+    width="70%"
+  >
+    <div id="printSection" style="font-family: 'Microsoft Yahei', Arial, sans-serif; font-size: 12px; background: #fff; padding: 10px; margin: 40px;">
+      <div style="text-align: center; font-size: 16px; font-weight: bold; margin: 5px 0;">工艺流程卡</div>
+      <table style="width: 100%; border-collapse: collapse; margin-bottom: 6px;">
         <tr>
-          <th rowspan="2">工序</th>
-          <th colspan="4">数量</th>
-          <th rowspan="2">品质验收</th>
-          <th rowspan="2">交接签字</th>
-          <th rowspan="2">备注</th>
+          <td rowspan="4" style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle; text-align: center; width: 90px; height: 120px;">
+            <img :src="card.qrLeft" alt="二维码" style="width: 80px; height: 80px;" />
+          </td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">单号</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">{{ card.code }}</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">单据日期</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">{{ card.createDate }}</td>
+          <td rowspan="4" style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle; text-align: center; width: 90px; height: 120px;">
+            <img :src="card.qrRight" alt="二维码" style="width: 80px; height: 80px;" />
+          </td>
         </tr>
         <tr>
-          <th>加工</th>
-          <th>发料</th>
-          <th>合格</th>
-          <th>报废</th>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">编号</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">{{ card.productCode }}</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">存货名称</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">{{ card.productName }}</td>
         </tr>
-      </thead>
-      <tbody>
-        <tr v-for="(row, idx) in card.process" :key="idx">
-          <td>{{ row.name }}</td>
-          <td>{{ row.make }}</td>
-          <td>{{ row.send }}</td>
-          <td>{{ row.pass }}</td>
-          <td>{{ row.scrap }}</td>
-          <td>{{ row.qc }}</td>
-          <td>{{ row.sign }}</td>
-          <td>{{ row.remark }}</td>
+        <tr>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">图号</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">{{ card.imgCode }}</td>
+           <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">计划开始时间</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">{{ card.planStartTime }}</td>
         </tr>
-      </tbody>
-    </table>
-
-    <div class="footer-info">
-      <div>制单人:{{ card.creator }}</div>
-      <div>审核人:{{ card.auditor }}</div>
-      <!-- <div style="flex: 1; text-align: right">
-          第{{ card.page }}页 共{{ card.totalPages }}页
-        </div> -->
+        <tr>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">计划结束时间</td>
+          <td style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;">{{ card.planCompleteTime }}</td>
+          <td colspan="2" style="border: 1px solid #000; padding: 3px 5px; vertical-align: middle;"></td>
+        </tr>
+      </table>
+
+      <table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
+        <thead>
+          <tr>
+            <th rowspan="2" style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">工序</th>
+            <th colspan="4" style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">数量</th>
+            <th rowspan="2" style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">品质验收</th>
+            <th rowspan="2" style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">交接签字</th>
+            <th rowspan="2" style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">备注</th>
+          </tr>
+          <tr>
+            <th style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">加工</th>
+            <th style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">发料</th>
+            <th style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">合格</th>
+            <th style="border: 1px solid #000; padding: 3px; text-align: center; font-weight: bold;">报废</th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr v-for="(row, idx) in card.printTaskCarDetail" :key="idx">
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;">{{ row.taskName }}</td>
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;">{{ row.formingNum }}</td>
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;">{{ row.formedNum }}</td>
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;">{{ row.qualified }}</td>
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;">{{ row.noQualifiedSum }}</td>
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;"></td>
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;"></td>
+            <td style="border: 1px solid #000; padding: 3px; text-align: center;"></td>
+          </tr>
+        </tbody>
+      </table>
+
+      <el-row :gutter="16">
+        <el-col :span="12"><div>制单人:{{ card.createUserName }}</div></el-col>
+        <el-col :span="12"><div>审核人:</div></el-col>
+      </el-row>
+
+      <!-- 打印按钮 -->
+      <!-- <div style="margin-top: 10px; display: block;">
+        <button @click="doPrint">打印</button>
+      </div> -->
     </div>
-
-    <!-- 打印按钮 -->
-    <!-- <div class="no-print" style="margin-top: 10px">
-      <button @click="doPrint">打印</button>
-    </div> -->
-  </div>
+    <div slot="footer">
+      <el-button @click="print">打印预览</el-button>
+      <el-button @click="close">关闭</el-button>
+    </div>
+  </ele-modal>
 </template>
 
 <script>
+import { queryPrintV2 } from '@/api/produceOrder';
+import QRCode from 'qrcode';
   export default {
     name: 'print-dialog',
 
     data() {
       return {
         card: {
-          qrLeft:
-            'https://api.qrserver.com/v1/create-qr-code/?size=80x80&data=左二维码',
-          qrRight:
-            'https://api.qrserver.com/v1/create-qr-code/?size=80x80&data=右二维码',
-          orderNo: 'ZHD2025076835',
-          date: '2025/07/21',
-          code: '13650042',
-          name: '射灯安装座 HZS120GT.3',
-          drawingNo: '516',
-          process: [
-            {
-              name: '抛丸',
-              make: 30,
-              send: '',
-              pass: '',
-              scrap: '',
-              qc: '',
-              sign: '',
-              remark: ''
-            },
-            {
-              name: '三维光割',
-              make: 30,
-              send: '',
-              pass: 30,
-              scrap: '',
-              qc: '',
-              sign: '',
-              remark: ''
-            },
-            {
-              name: '喷粉',
-              make: 30,
-              send: '',
-              pass: '',
-              scrap: '',
-              qc: '',
-              sign: '签名',
-              remark: '深灰色(RAL7011)'
-            }
-          ],
-          creator: '李敦',
-          auditor: '李敦',
+          qrLeft: '',
+          qrRight: '',
+          productCode: '',
+          createDate: '',
+          code: '',
+          productName: '',
+          imgCode: '',
+          planStartTime: '',
+          planCompleteTime: '',
+          printTaskCarDetail: [],
+          createUserName: '',
+          auditor: '',
           page: 6,
-          totalPages: 14
-        }
+          totalPages: 14,
+        },
+        printId: '',
+        QRvisible: false
       };
     },
 
     mounted() {
-      this.doPrint();
+      // this.doPrint();
     },
-
     methods: {
+      open(ids) {
+        console.log('ids~~~', ids);
+        this.printId = ids[0]
+        this.getData()
+        this.QRvisible = true;
+      },
+      close() {
+        this.QRvisible = false;
+      },
+      getData() {
+        queryPrintV2({id: this.printId}).then(res => {
+          console.log('queryPrintV2', res)
+          if(res.length) {
+            this.card = res[0]
+            QRCode.toDataURL(this.printId)
+            .then((url) => {
+              this.card.qrLeft = url;
+              this.card.qrRight = url;
+              this.$forceUpdate();
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+          }
+        }).catch(err => {
+          console.log('err', err) 
+        })
+      },
+      print() {
+        const printSection = document.getElementById('printSection');
+        // 创建打印任务
+        const printWindow = window.open('', '_blank');
+        printWindow.document.open();
+        printWindow.document.write('<html><head><title>打印预览</title>');
+        printWindow.document.write(
+          '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
+        );
+        printWindow.document.write('</head><body>');
+        printWindow.document.write(printSection.innerHTML);
+        printWindow.document.write('</body></html>');
+        printWindow.document.close();
+        printWindow.onload = function () {
+          printWindow.print();
+        };
+      },
       doPrint() {
         this.$nextTick(() => {
           window.print();
@@ -141,86 +172,3 @@
     }
   };
 </script>
-
-<style scoped>
-  .print-root {
-    font-family: 'Microsoft Yahei', Arial, sans-serif;
-    font-size: 12px;
-    background: #fff;
-    padding: 10px;
-    margin: 40px;
-  }
-
-  .card-title {
-    text-align: center;
-    font-size: 16px;
-    font-weight: bold;
-    margin: 5px 0;
-  }
-
-  .info-table {
-    width: 100%;
-    border-collapse: collapse;
-    margin-bottom: 6px;
-  }
-
-  .info-table td {
-    border: 1px solid #000;
-    padding: 3px 5px;
-    vertical-align: middle;
-  }
-
-  .qr-cell {
-    text-align: center;
-    width: 90px;
-    height: 120px;
-  }
-  .qr-cell img {
-    width: 80px;
-    height: 80px;
-  }
-
-  .process-table {
-    width: 100%;
-    border-collapse: collapse;
-    margin-bottom: 8px;
-  }
-  .process-table th,
-  .process-table td {
-    border: 1px solid #000;
-    padding: 3px;
-    text-align: center;
-  }
-  .process-table thead th {
-    font-weight: bold;
-  }
-
-  .footer-info {
-    display: flex;
-    justify-content: space-between;
-    font-size: 12px;
-  }
-
-  .no-print {
-    display: block;
-  }
-
-  /* 打印优化 */
-  @page {
-    size: A4;
-    margin: 12mm;
-  }
-
-  @media print {
-    .no-print {
-      display: none !important;
-    }
-    * {
-      -webkit-print-color-adjust: exact;
-      print-color-adjust: exact;
-    }
-    .print-root {
-      padding: 0;
-    }
-  }
-</style>

+ 2 - 1
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
@@ -43,6 +43,7 @@ module.exports = {
         // target: 'http://192.168.1.33:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
+        target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''