2213980799@qq.com 1 год назад
Родитель
Сommit
cd27f577a0
26 измененных файлов с 2502 добавлено и 657 удалено
  1. 150 0
      src/api/saleManage/accountstatement.js
  2. 81 0
      src/api/saleManage/businessFollow.js
  3. 112 0
      src/api/saleManage/businessOpportunity.js
  4. 250 0
      src/api/saleManage/contact.js
  5. 80 0
      src/api/saleManage/entrustedReceive.js
  6. 143 0
      src/api/saleManage/quotation.js
  7. 169 0
      src/api/saleManage/returnGoods.js
  8. 121 0
      src/api/saleManage/saleorder.js
  9. 100 0
      src/api/saleManage/saleordersendrecord.js
  10. 214 0
      src/components/processSubmitDialog/api.js
  11. 461 0
      src/components/processSubmitDialog/processSubmitDialog.vue
  12. 11 1
      src/enum/dict.js
  13. 4 46
      src/views/equipmentDisposal/components/edit.vue
  14. 0 8
      src/views/equipmentDisposal/components/search.vue
  15. 163 146
      src/views/equipmentDisposal/index.vue
  16. 0 8
      src/views/equipmentLease/components/search.vue
  17. 2 2
      src/views/ledgerAssets/equipment/components/BOM-search.vue
  18. 426 431
      src/views/ledgerAssets/equipment/edit.vue
  19. 2 2
      src/views/maintenance/delivery/plan/components/plan-search.vue
  20. 2 2
      src/views/maintenance/delivery/workOrder/components/work-search.vue
  21. 2 2
      src/views/maintenance/equipment/plan/components/plan-search.vue
  22. 2 2
      src/views/maintenance/patrol/plan/components/plan-search.vue
  23. 2 2
      src/views/maintenance/patrol/workOrder/components/work-search.vue
  24. 2 2
      src/views/maintenance/repair/outsourcingOrder/components/order-search.vue
  25. 2 2
      src/views/maintenance/repair/planRepair/components/maintenance-search.vue
  26. 1 1
      vue.config.js

+ 150 - 0
src/api/saleManage/accountstatement.js

@@ -0,0 +1,150 @@
+import request from '@/utils/request';
+import {download} from '@/utils/file';
+
+/**
+ * 获取信息列表
+ */
+export async function getAccountstatementList(params) {
+  const res = await request.post(`/eom/accountstatement/page`, params);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取信息详情
+ */
+export async function gettAccountstatementDetail(id) {
+  const res = await request.get(`/eom/accountstatement/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdatetAccountstatement(data) {
+  const res = await request.put(`/eom/accountstatement/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询待导入的账单明细
+ */
+export async function getsearchDetailListByType(params) {
+  const res = await request.get(
+    `/eom/accountstatement/searchDetailListByType`,
+    {params}
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addtAccountstatement(data) {
+  const res = await request.post(`/eom/accountstatement/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deletetAccountstatement(data) {
+  const res = await request.delete('/eom/accountstatement/delete', {data});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 提交
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/accountStatementApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 对账单 查询待导入的账单明细
+ */
+export async function getSearchMergeListByTypeAPI(data) {
+  const res = await request.post(`/eom/accountstatement/searchOrderListByTypeForImport`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 对账单 保存
+ */
+export async function saveAccountStatementAPI(data) {
+  const res = await request.post(`/eom/accountstatement/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 对账单 修改
+ */
+export async function updateAccountStatementAPI(data) {
+  const res = await request.put(`/eom/accountstatement/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 对账单 信息详情
+ */
+export async function infoAccountStatementAPI(id) {
+  const res = await request.get(`/eom/accountstatement/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 对账单 提交发起流程
+ */
+export async function submitAccountStatementApproveAPI(data) {
+  const res = await request.post(`/bpm/accountStatementApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 导出对账单
+ */
+export async function accountStatementExportAPI(id) {
+  const res = await request.get(`/eom/accountstatement/export/${id}`, {
+    responseType: 'blob'
+  })
+  if (res.data instanceof Blob) {
+    return res;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 81 - 0
src/api/saleManage/businessFollow.js

@@ -0,0 +1,81 @@
+import request from '@/utils/request';
+
+/**
+ * 获取信息列表
+ */
+export async function getTableList(params) {
+  const res = await request.get(`/eom/businessopportunityfollowup/page`, { params });
+  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(`/eom/businessopportunityfollowup/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdateInformation(data) {
+  const res = await request.put(`/eom/businessopportunityfollowup/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addInformation(data) {
+  const res = await request.post(`/eom/businessopportunityfollowup/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除事项
+ */
+export async function deleteInformation(data) {
+  const res = await request.delete('/eom/businessopportunityfollowup/delete', {data});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+
+/**
+ * 更新状态
+ */
+export async function updateStatus(id, status) {
+  const res = await request.get(`/eom/businessopportunity/updateStatus?id=` + id + '&status=' + status);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 查询客户联系人列表
+ */
+export async function getcontactlink(params) {
+  const res = await request.get(`/eom/contactlink/list/`, {params});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 112 - 0
src/api/saleManage/businessOpportunity.js

@@ -0,0 +1,112 @@
+import request from '@/utils/request';
+
+/**
+ * 获取信息列表
+ */
+export async function getTableList(params) {
+  const res = await request.get(`/eom/businessopportunity/page`, { params });
+  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(`/eom/businessopportunity/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取信息详情
+ */
+export async function getOpportunityDetail(id) {
+  const res = await request.get(`/eom/businessopportunity/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdateInformation(data) {
+  const res = await request.put(`/eom/businessopportunity/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addInformation(data) {
+  const res = await request.post(`/eom/businessopportunity/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除事项
+ */
+export async function deleteInformation(data) {
+  const res = await request.delete('/eom/businessopportunity/delete', {data});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 商机是否生成过报价单
+ */
+export async function isHasGeneratedQuoteAPI(id) {
+  const res = await request.get(`/eom/businessopportunity/hasGeneratedQuote/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.resolve(0);
+}
+/**
+ * 商机是否生成过合同
+ */
+export async function isHasGeneratedContractAPI(id) {
+  const res = await request.get(`/eom/businessopportunity/hasGeneratedContract/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return  Promise.resolve(0);
+}
+
+
+
+
+/**
+ * 更新状态
+ */
+export async function updateStatus(id, status) {
+  const res = await request.get(`/eom/businessopportunity/updateStatus?id=` + id + '&status=' + status);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 提交
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/businessOpportunityApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+

+ 250 - 0
src/api/saleManage/contact.js

@@ -0,0 +1,250 @@
+import request from '@/utils/request';
+
+/**
+ * 获取客户信息列表
+ */
+export async function contactPage(params) {
+  const res = await request.get(`/eom/contact/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取客户信息列表
+ */
+export async function contactPageUsages(params) {
+  const res = await request.get(`/eom/contact/page2Usages`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取客户信息详情
+ */
+export async function contactDetail(id) {
+  const res = await request.get(`/eom/contact/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新客户信息
+ */
+export async function contactUpdate(data) {
+  const res = await request.put(`/eom/contact/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增客户信息
+ */
+export async function contactSave(data) {
+  const res = await request.post(`/eom/contact/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 客户证书资质信息分页
+ */
+export async function contactQcPackPageAPI(params) {
+  const res = await request.get(`/main/professionCertification/selectByRelationIdAndType`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 新增客户证书资质信息
+ */
+export async function contactQcPackSaveAPI(data) {
+  const res = await request.post(`/main/professionCertification/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 修改客户证书资质信息
+ */
+export async function contactQcPackUpdateAPI(data) {
+  const res = await request.put(`/main/professionCertification/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取客户证书资质信息详情
+ */
+export async function contactQcPackDetailAPI(id) {
+  const res = await request.get(`/main/professionCertification/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 删除客户证书资质包
+ */
+export async function contactQcPackDeleteAPI(data) {
+  const res = await request.delete(`/main/professionCertification/delete`, { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 提交客户证书资质信息  开启流程
+ */
+export async function contactQcSubmit(data) {
+  const res = await request.post(`/bpm/ProfessionCertification/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+
+/**
+ * 删除事项
+ */
+export async function contactDelete(data) {
+  const res = await request.post('/eom/contact/delete', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 获取客户分类树
+ */
+export async function contactTypeTree(data) {
+  const res = await request.get(`/main/categoryLevel/getTreeByPid/${data.type}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新用户状态
+ */
+export async function updateStatus(id, status) {
+  const res = await request.get(`/eom/contact/updateStatus?id=` + id + '&status=' + status);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 指派
+ */
+export async function assign(data) {
+  const res = await request.post('/eom/contact/assign', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 释放
+ */
+export async function free(data) {
+  const res = await request.post('/eom/contact/free', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 申请
+ */
+export async function apply(data) {
+  const res = await request.post('/bpm/contactlistapply/apply', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 供应商维护供货产品
+ */
+export async function contactProductSaveAPI(data) {
+  const res = await request.post('/main/contactproduct/save', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 供应商维护供货产品
+ */
+export async function contactProductUpdateAPI(data) {
+  const res = await request.post('/main/contactproduct/update', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 通过产品查供应商
+ */
+export async function contactQueryByCategoryIdsAPI(data) {
+  const res = await request.post('/eom/contact/queryByCategoryIds', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 发布动态
+ */
+export async function updateContactDynamics(data) {
+  const res = await request.put('/eom/contact/updateContactDynamics', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 回复动态
+ */
+ export async function updateContactComment(data) {
+  const res = await request.put('/eom/contact/updateContactComment', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 摘要卡片
+ */
+ export async function queryContactIdCount(id) {
+  const res = await request.get(`eom/contact/queryContactIdCount/`+id);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 80 - 0
src/api/saleManage/entrustedReceive.js

@@ -0,0 +1,80 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+/**
+ * 获取信息列表分页
+ */
+export async function getSaleEntrustedReceivePageAPI(params) {
+  const res = await request.get(`/eom/saleentrustedreceive/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取信息详情
+ */
+export async function getPSaleEntrustedReceiveDetailAPI(id) {
+  const res = await request.get(`/eom/saleentrustedreceive/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function updateSaleEntrustedReceiveAPI(data) {
+  const res = await request.put(`/eom/saleentrustedreceive/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function saveSaleEntrustedReceiveAPI(data) {
+  const res = await request.post(`/eom/saleentrustedreceive/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteSaleEntrustedReceiveAPI(data) {
+  const res = await request.delete('/eom/saleentrustedreceive/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取受托物料的已收货数量
+ */
+export async function getReceiveCountAPI(data) {
+  const res = await request.post('/eom/saleentrustedreceive/getReceiveCount', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+/**
+ * 提交
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/saleEntrustedReceiveApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+

+ 143 - 0
src/api/saleManage/quotation.js

@@ -0,0 +1,143 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+/**
+ * 获取信息列表
+ */
+export async function getTableList(params) {
+  const res = await request.get(`/eom/quote/page`, { params });
+  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(`/eom/quote/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdateInformation(data) {
+  const res = await request.put(`/eom/quote/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addInformation(data) {
+  const res = await request.post(`/eom/quote/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteInformation(data) {
+  const res = await request.delete('/eom/quote/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 导出报价单
+ */
+export async function getExport(id) {
+  const res = await request.get(
+    `/eom/quote/export/${id}`,
+    {
+      responseType: 'blob'
+    },
+
+  );
+
+  download(res.data, '报价单.xlsx');
+}
+
+/**
+ * 产品分类
+ */
+
+export async function getProduceTreeByPid() {
+  const res = await request.get(
+    //`/main/categoryLevel/getTreeByPid/9`,
+    `/main/categoryLevel/getProduceTreeByPid?type=1`,
+    {}
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 产品分类指定code查询
+ */
+
+export async function getProduceTreeByCode(code) {
+  const res = await request.get(
+    `/main/categoryLevel/getProduceTreeByPid?code=${code}`,
+    {}
+  );
+  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));
+}
+
+/**
+ * 提交
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/quoteApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 报价是否生成过合同
+ */
+export async function isHasGeneratedContractAPI(id) {
+  const res = await request.get(`/eom/quote/hasGeneratedContract/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return  Promise.resolve(0);
+}
+/**
+ * 修改启用状态
+ */
+export async function quoteUpdateStatus(params) {
+  const res = await request.get(`/eom/quote/updateStatus`,{params});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return  Promise.resolve(0);
+}

+ 169 - 0
src/api/saleManage/returnGoods.js

@@ -0,0 +1,169 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+/**
+ * 获取信息列表
+ */
+export async function getReturnTableList(params) {
+  const res = await request.get(`/eom/saleorderreturnrecord/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取信息详情
+ */
+export async function getReturnSaleOrderrecordDetail(id) {
+  const res = await request.get(`/eom/saleorderreturnrecord/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdateReturnInformation(data) {
+  const res = await request.put(`/eom/saleorderreturnrecord/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addReturnInformation(data) {
+  const res = await request.post(`/eom/saleorderreturnrecord/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteReturnInformation(data) {
+  const res = await request.delete('/eom/saleorderreturnrecord/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 提交
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/salesOrderReturnApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+
+
+
+
+// /**
+//  * 根据退货单编码获取出库单详情
+//  */
+// export async function getOutInBySourceBizNoAPI(id) {
+//   const res = await request.get(`/wms/outin/getOutInBySourceBizNo/${id}`);
+//   if (res.data.code == 0) {
+//     return res.data.data;
+//   }
+//   return Promise.reject(new Error(res.data.message));
+// }
+/**
+ * 获取客户退货列表
+ */
+export async function saleReturnPageList(params) {
+  const res = await request.get(`/eom/salereturnhandle/page`,{ params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 客户退货处理单-保存
+ */
+export async function saleReturnSaveAPI(data) {
+  const res = await request.post(`/eom/salereturnhandle/save`,data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 客户退货处理单-修改
+ */
+export async function saleReturnUpdateAPI(data) {
+  const res = await request.post(`/eom/salereturnhandle/update`,data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 客户退货处理单-详情
+ */
+export async function saleReturnGetByIdAPI(id) {
+  const res = await request.get(`/eom/salereturnhandle/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 客户退货处理单-删除
+ */
+export async function deleteSaleReturnAPI(data) {
+  const res = await request.delete('/eom/salereturnhandle/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 客户退货处理单-提交开启流程
+ */
+export async function salesOrderReturnSubmit(data) {
+  const res = await request.post(`/bpm/salesOrderReturnHandle/submit`,data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 客户退货处理单-获取销售发货单数据
+ */
+export async function getSaleOrderSendInfoAPI(returnHandleId) {
+  const res = await request.get(`/eom/salereturnhandle/getSaleOrderSendInfo/${returnHandleId}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 客户退货处理单-更新各种单据字段
+ */
+export async function saleReturnHandleUpdateReceipt(data) {
+  const res = await request.post(`/eom/salereturnhandle/updateReceipt`,data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+

+ 121 - 0
src/api/saleManage/saleorder.js

@@ -0,0 +1,121 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+/**
+ * 获取信息列表
+ */
+export async function getTableList(params) {
+  const res = await request.get(`/eom/saleorder/page`, { params });
+  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));
+}
+/**
+ * 查询库存可用数
+ */
+export async function getWarehouseOutStock(params) {
+  const res = await request.get(`/wms/stocktwo/getWarehouseOutStock`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取信息详情
+ */
+export async function getSaleOrderDetail(id) {
+  const res = await request.get(`/eom/saleorder/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdateInformation(data) {
+  const res = await request.put(`/eom/saleorder/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addInformation(data) {
+  const res = await request.post(`/eom/saleorder/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteInformation(data) {
+  const res = await request.delete('/eom/saleorder/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 导出报价单
+ */
+export async function getExport(id) {
+  const res = await request.get(`/eom/quote/export/${id}`, {
+    responseType: 'blob'
+  });
+
+  download(res.data, '报价单.xlsx');
+}
+
+/**
+ * 销售订单变更
+ */
+export async function orderChange(data) {
+  const res = await request.post(`/eom/saleorder/change`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 提交
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/salesOrderApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 摘要卡片
+ */
+ export async function queryOrderNoCount(code) {
+  const res = await request.get(`/eom/saleorder/queryOrderNoCount/${code}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 100 - 0
src/api/saleManage/saleordersendrecord.js

@@ -0,0 +1,100 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+/**
+ * 获取信息列表
+ */
+export async function getSendTableList(params) {
+  const res = await request.get(`/eom/saleordersendrecord/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取信息详情
+ */
+export async function getSendSaleOrderrecordDetail(id) {
+  const res = await request.get(`/eom/saleordersendrecord/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取信息详情
+ */
+export async function getSendSaleOrderrecordDetailSplit(id) {
+  const res = await request.get(`/eom/saleordersendrecord/getByIdSplit/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取多发货单信息详情
+ */
+export async function getSendSaleOrderCordList(params) {
+  const res = await request.post(`/eom/saleordersendrecord/getList`, params);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdateSendInformation(data) {
+  const res = await request.put(`/eom/saleordersendrecord/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addSendInformation(data) {
+  const res = await request.post(`/eom/saleordersendrecord/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteSendInformation(data) {
+  const res = await request.delete('/eom/saleordersendrecord/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 通过销售发货获取发货清单
+ */
+export async function getProductListByRecordId(recordId) {
+  const res = await request.get(
+    `/eom/saleordersendrecord/getProductListByRecordId/${recordId}`,
+    {}
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 提交
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/salesOrderSendApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 214 - 0
src/components/processSubmitDialog/api.js

@@ -0,0 +1,214 @@
+import request from '@/utils/request';
+
+export async function getProcessDefinitionBpmnXML(id) {
+  const res = await request({
+    url: '/bpm/process-definition/get-bpmn-xml?id=' + id,
+    method: 'get'
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function getTaskAssignRuleList(query) {
+  const res = await request({
+    url: '/bpm/task-assign-rule/list',
+    method: 'get',
+    params: query
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function processInstanceCreateAPI(data) {
+  const res = await request(
+    {
+      url: '/bpm/process-instance/create',
+      method: 'post',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function getModelPage(query) {
+  const res = await request({
+    url: '/bpm/model/page',
+    method: 'get',
+    params: query
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function getProcessDefinitionInfo(params) {
+  const res = await request({
+    url: `/bpm/process-definition/get`,
+    method: 'get',
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+export async function listAllUserBind() {
+  const res = await request.get('/main/user/listAllUserBind');
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 获取用户组精简信息列表
+export async function listSimpleUserGroups() {
+  const res = await request({
+    url: '/bpm/user-group/list-all-simple',
+    method: 'get'
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+//商机
+export async function businessOpportunityUpdateStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/businessopportunity/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//报价
+export async function quoteUpdateStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/quote/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//需求管理
+export async function purchaserequirementStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/purchaserequirement/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//计划管理
+export async function purchaseplanStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/purchaseplan/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//核价管理
+export async function purchaseinquiryStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/purchaseinquiry/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//合同
+export async function contractStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/contract/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//费用
+export async function finfeeapplyStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/finfeeapply/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//发票
+export async function fininvoiceapplyStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/fininvoiceapply/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//运输-计划
+export async function logistictrakplanStatusAPI(data) {
+  const res = await request(
+    {
+      url: '/eom/logistictrakplan/updateApprovalStatus',
+      method: 'put',
+      data
+    },
+    data
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 461 - 0
src/components/processSubmitDialog/processSubmitDialog.vue

@@ -0,0 +1,461 @@
+<template>
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible="processSubmitDialogFlag"
+    title="提交审核"
+    append-to-body
+    :close-on-click-modal="false"
+    width="50%"
+    :before-close="cancel"
+  >
+    <!--    <el-steps :active="active" align-center style="transform: scale(0.8)">-->
+    <!--      <el-step title="流程发起"></el-step>-->
+    <!--      <el-step title="流程通知"></el-step>-->
+    <!--    </el-steps>-->
+
+    <el-form
+      ref="form"
+      :rules="rules"
+      class="el-form-box"
+      :model="form"
+      label-width="80px"
+    >
+      <el-row v-show="active == 0">
+        <el-col :span="12">
+          <el-form-item label="流程分类">
+            <ele-tree-select
+              @change="changeLCFL"
+              clearable
+              ref="processTypeRef"
+              filterable
+              :data="LCFLList"
+              v-model="form.LCFL"
+              childrenKey="children"
+              valueKey="id"
+              labelKey="name"
+              placeholder="请选择"
+              default-expand-all
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="发起流程">
+            <el-select
+              filterable
+              v-model="form.FQLC"
+              @change="changeFQLC"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in processList"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row v-show="active == 0">
+        <el-col :span="12">
+          <el-form-item label="流程名称">
+            <el-input v-model="form.name" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="流程标识">
+            <el-input v-model="form.key" disabled></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <headerTitle
+        v-show="active == 0"
+        title="流程执行人/流程图"
+        style="margin-top: 30px"
+      ></headerTitle>
+      <el-table
+        v-show="active == 0"
+        :data="datasource"
+        border
+        style="margin-bottom: 10px"
+      >
+        <el-table-column
+          label="任务节点"
+          align="center"
+          prop="taskDefinitionName"
+          width="140"
+          fixed
+        />
+        <el-table-column
+          label="执行人"
+          align="center"
+          prop="options"
+          min-width="140px"
+        >
+          <template v-slot="scope">
+            <div v-if="scope.row.type !== 60 && scope.row.options.length > 0">
+              <el-tag
+                size="medium"
+                :key="option"
+                v-for="option in scope.row.options"
+              >
+                {{ getAssignRuleOptionName(scope.row, option) }}
+              </el-tag>
+            </div>
+
+            <el-tag size="medium" v-if="scope.row.type === 60">
+              {{ getAssignRuleOptionName(scope.row) }}
+            </el-tag>
+          </template>
+        </el-table-column>
+      </el-table>
+      <my-process-viewer
+        v-show="active == 0"
+        style="min-width: 100%; height: 200px"
+        key="designer"
+        v-model="bpmnXML"
+      />
+      <el-table v-show="active == 1" :data="form.noticeScope" border>
+        <el-table-column
+          label="类型"
+          align="center"
+          prop="taskDefinitionName"
+          width="140"
+          fixed
+        />
+        <el-table-column
+          label="结果"
+          align="center"
+          prop="options"
+          min-width="140px"
+        >
+        </el-table-column>
+      </el-table>
+    </el-form>
+
+    <div slot="footer">
+      <!--      <el-button-->
+      <!--        type="primary"-->
+      <!--        size="small"-->
+      <!--        v-if="active == 0"-->
+      <!--        @click="() => (active = 1)"-->
+      <!--        >下一步-->
+      <!--      </el-button>-->
+      <!--      <el-button-->
+      <!--        type="primary"-->
+      <!--        size="small"-->
+      <!--        v-if="active == 1"-->
+      <!--        @click="() => (active = 0)"-->
+      <!--        >上一步-->
+      <!--      </el-button>-->
+      <el-button type="primary" size="small" @click="submit">提交</el-button>
+      <el-button
+        v-if="isNotNeedProcess"
+        type="primary"
+        size="small"
+        @click="submit1"
+        >提交并发布</el-button
+      >
+      <el-button size="small" @click="cancel">关闭</el-button>
+    </div>
+  </ele-modal>
+</template>
+<script>
+  import {
+    getModelPage,
+    getProcessDefinitionBpmnXML,
+    getProcessDefinitionInfo,
+    getTaskAssignRuleList,
+    listAllUserBind,
+    listSimpleUserGroups,
+    processInstanceCreateAPI,
+    businessOpportunityUpdateStatusAPI,
+    quoteUpdateStatusAPI,
+    purchaserequirementStatusAPI,
+    purchaseplanStatusAPI,
+    purchaseinquiryStatusAPI,
+    contractStatusAPI,
+    finfeeapplyStatusAPI,
+    fininvoiceapplyStatusAPI,
+    logistictrakplanStatusAPI
+  } from './api';
+  import { treeClassifyCodeEnum } from '@/enum/dict';
+  import { listRoles } from '@/api/system/role';
+  import { listOrganizations } from '@/api/system/organization';
+  import dictMixins from '@/mixins/dictMixins';
+  import { getByCode } from '@/api/system/dictionary-data';
+  import { getProduceTreeByCode } from '@/api/saleManage/quotation';
+
+  export default {
+    name: 'processSubmitDialog',
+    mixins: [dictMixins],
+    props: {
+      processSubmitDialogFlag: {
+        type: Boolean,
+        default: false
+      },
+      isNotNeedProcess: {
+        type: Boolean,
+        default: true
+      },
+      approvalStatus: {
+        type: Number,
+        default: 2
+      },
+      apiFunName: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: {
+          LCFL: '',
+          FQLC: '',
+          processDefinitionId: '',
+          name: '',
+          businessId: '',
+          noticeScope: [],
+          businessKey: '',
+          formCreateUserId: ''
+        },
+        businessOpportunityUpdateStatusAPI,
+        quoteUpdateStatusAPI,
+        purchaserequirementStatusAPI,
+        purchaseplanStatusAPI,
+        purchaseinquiryStatusAPI,
+        contractStatusAPI,
+        finfeeapplyStatusAPI,
+        fininvoiceapplyStatusAPI,
+        logistictrakplanStatusAPI,
+        active: 0,
+        bpmnXML: null,
+        LCFLList: [],
+        processList: [],
+        datasource: [],
+        roleOptions: [],
+        deptOptions: [],
+        deptTreeOptions: [],
+        postOptions: [],
+        userOptions: [],
+        userGroupOptions: [],
+        dictList: {},
+        rules: {}
+      };
+    },
+    async created() {
+      let typeObj = await getProduceTreeByCode(
+        treeClassifyCodeEnum['PROCESSTYPE']
+      );
+      this.LCFLList = typeObj[0].children;
+
+      // 获得角色列表
+      this.roleOptions = [];
+      listRoles({
+        current: 1,
+        size: 9999
+      }).then((data) => {
+        this.roleOptions.push(...data.list);
+      });
+      // 获得部门列表
+      this.deptOptions = [];
+      this.deptTreeOptions = [];
+      listOrganizations().then((data) => {
+        this.deptOptions.push(...data);
+        this.deptTreeOptions.push(...this.handleTree(data, 'id'));
+      });
+      // 获得岗位列表 暂无岗位概念
+      this.postOptions = [];
+      /*listSimplePosts().then(response => {
+  this.postOptions.push(...response.data);
+});*/
+      // 获得用户列表
+      this.userOptions = [];
+      listAllUserBind().then((data) => {
+        this.userOptions.push(...data);
+      });
+      // 获得用户组列表
+      this.userGroupOptions = [];
+      listSimpleUserGroups().then((response) => {
+        this.userGroupOptions.push(...response);
+      });
+
+      //this.dictEnum['工作流任务分配自定义脚本']
+      await this.getDictList(this.dictEnum['工作流任务分配自定义脚本']);
+      await this.getDictList(this.dictEnum['工种类型']);
+    },
+    methods: {
+      init(row = {}) {
+        this.form = { ...this.form, ...row };
+        // this.form.businessId = row.id;
+        // this.form.businessKey = row.businessKey;
+        // this.form.formCreateUserId = row.createUserId;
+        this.getDefaultInfo(row.businessKey);
+      },
+      async getDefaultInfo(businessKey) {
+        let info = await getProcessDefinitionInfo({ code: businessKey });
+        this.form.LCFL = info?.category;
+        this.form.FQLC = info?.modelId;
+        this.form.name = info?.name;
+        this.form.key = info?.key;
+        this.form.processDefinitionId = info?.id;
+        if (this.form.LCFL) await this.getProcessList(this.form.LCFL);
+        if (this.form.FQLC) {
+          await this.getProcessDefinitionBpmnXMLInfo(info.id);
+          await this.getTaskAssignRuleListInfo({
+            modelId: info.modelId,
+            processDefinitionId: info.id
+          });
+        }
+      },
+      async changeLCFL(val) {
+        this.bpmnXML = null;
+        this.form.processDefinitionId = null;
+        this.form.FQLC = null;
+        await this.getProcessList(val);
+      },
+      async getProcessList(val) {
+        let params = {
+          pageNo: 1,
+          pageSize: 999,
+          processTypeId: val
+        };
+        const { list } = await getModelPage(params);
+        this.processList = list.filter((item) => item.processDefinition);
+      },
+      async changeFQLC(val) {
+        if (!val) return;
+        let find = this.processList.find((item) => item.id === val) || {};
+        this.form.name = find.name;
+        this.form.key = find.key;
+        this.form.processDefinitionId = find.processDefinition.id;
+        await this.getProcessDefinitionBpmnXMLInfo(find.processDefinition.id);
+        await this.getTaskAssignRuleListInfo({
+          modelId: find.id,
+          processDefinitionId: find.processDefinition.id
+        });
+      },
+      async getProcessDefinitionBpmnXMLInfo(val) {
+        // 加载流程图
+        this.bpmnXML = await getProcessDefinitionBpmnXML(val);
+      },
+      async getTaskAssignRuleListInfo(find) {
+        this.datasource = await getTaskAssignRuleList({
+          modelId: find.modelId,
+          processDefinitionId: find.processDefinitionId
+        });
+      },
+      getAssignRuleOptionName(row, option) {
+        if (row.type == 10) {
+          for (const roleOption of this.roleOptions) {
+            if (roleOption.id === option) {
+              return roleOption.name;
+            }
+          }
+        } else if (row.type === 20 || row.type === 21) {
+          for (const deptOption of this.deptOptions) {
+            if (deptOption.id === option) {
+              return deptOption.name;
+            }
+          }
+        } else if (row.type === 22) {
+          option = option + ''; // 转换成 string
+          return this.getDictV(this.dictEnum['工种类型'], option);
+        } else if (row.type === 30 || row.type === 31 || row.type === 32) {
+          for (const userOption of this.userOptions) {
+            if (userOption.id === option) {
+              return userOption.nickname || userOption.name;
+            }
+          }
+        } else if (row.type === 40) {
+          for (const userGroupOption of this.userGroupOptions) {
+            if (userGroupOption.id === option) {
+              return userGroupOption.name;
+            }
+          }
+        } else if (row.type === 50) {
+          option = option + ''; // 转换成 string
+          return this.getDictV(
+            this.dictEnum['工作流任务分配自定义脚本'],
+            option
+          );
+        } else if (row.type === 60) {
+          return row.variableName;
+        }
+        return '未知(' + option + ')';
+      },
+      /**
+       * 构造树型结构数据
+       * @param {*} data 数据源
+       * @param {*} id id字段 默认 'id'
+       * @param {*} parentId 父节点字段 默认 'parentId'
+       * @param {*} children 孩子节点字段 默认 'children'
+       * @param {*} rootId 根Id 默认 0
+       */
+      handleTree(data, id, parentId, children, rootId) {
+        id = id || 'id';
+        parentId = parentId || 'parentId';
+        children = children || 'children';
+        rootId =
+          rootId ||
+          Math.min.apply(
+            Math,
+            data.map((item) => {
+              return item[parentId];
+            })
+          ) ||
+          0;
+        //对源数据深度克隆
+        const cloneData = JSON.parse(JSON.stringify(data));
+        //循环所有项
+        const treeData = cloneData.filter((father) => {
+          let branchArr = cloneData.filter((child) => {
+            //返回每一项的子级数组
+            return father[id] == child[parentId];
+          });
+          branchArr.length > 0 ? (father.children = branchArr) : '';
+          //返回第一层
+          return father[parentId] == rootId;
+        });
+        return treeData !== '' ? treeData : data;
+      },
+      getDictV(code, val) {
+        if (!this.dictList[code]) return '';
+        return this.dictList[code].find((item) => item.value == val)?.label;
+      },
+      async getDictList(code) {
+        let { data: res } = await getByCode(code);
+        this.dictList[code] = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: values[0],
+            label: item[values[0]]
+          };
+        });
+      },
+      async submit() {
+        await processInstanceCreateAPI(this.form);
+        this.$message('提交审核成功');
+        this.$emit('reload');
+        this.cancel();
+      },
+      async submit1() {
+        let params = {
+          id: this.form.businessId,
+          approvalStatus: this.approvalStatus,
+          ...this.form
+        };
+        await this[this.apiFunName](params);
+        //await processInstanceUpdateStatusAPI(params);
+        this.$message('提交发布成功');
+        this.$emit('reload');
+        this.cancel();
+      },
+      cancel() {
+        this.$emit('update:processSubmitDialogFlag', false);
+      }
+    }
+  };
+</script>
+<style scoped lang="scss"></style>

+ 11 - 1
src/enum/dict.js

@@ -36,7 +36,17 @@ export default {
   精度等级: 'accuracy_level',
   管理类别: 'manage_type',
   生产类型: 'productionType',
-  计量单位: 'measuring_uint'
+  计量单位: 'measuring_uint',
+  工种类型: 'work_type',
+
+  工作流任务分配规则的类型: 'bpm_task_assign_rule_type',
+  工作流任务分配自定义脚本: 'bpm_task_assign_script',
 };
 
 export const numberList = ['patrol_cycle'];
+//主数据分类关联对应常量
+export const treeClassifyCodeEnum = {
+  CHACHE: 'w10-2',
+  producerType: 'W10',
+  PROCESSTYPE: 'PROCESS001'
+};

+ 4 - 46
src/views/equipmentDisposal/components/edit.vue

@@ -71,39 +71,7 @@
             ></DictSelection>
           </el-form-item>
         </el-col>
-        <el-col
-          v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 8 }"
-          v-if="!['2', '3', '10'].includes(form.disposalType)"
-        >
-          <el-form-item
-            label="审批流程:"
-            prop="processId"
-            :rules="[
-              {
-                required: !['2', '3', '10'].includes(form.disposalType),
-                message: '请选择',
-                trigger: 'change'
-              }
-            ]"
-          >
-            <el-select
-              filterable
-              clear
-              size="small"
-              v-model="form.processId"
-              :disabled="type == 'detail'"
-              placeholder="请选择"
-              style="width: 100%"
-            >
-              <el-option
-                :key="item.id"
-                :value="item.id"
-                :label="item.name"
-                v-for="item in bpmList"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
+     
       </el-row>
 
       <headerTitle title="处置对象" style="margin-top: 15px"></headerTitle>
@@ -261,6 +229,7 @@
       v-if="activeComp === 'bpm' && form.processInstanceId"
       :id="form.processInstanceId"
     ></Detail>
+  
   </ele-modal>
 </template>
 
@@ -273,14 +242,12 @@ import Detail from '@/views/processInstance/detail.vue';
 import infoDisposalList from '@/views/equipmentDisposal/infoDisposal/index.vue';
 import { save, saveTemplate, bpmPage } from '@/api/equipmentDisposal/index.js';
 import formContent from '@/views/equipmentDisposal/infoDisposal/formContent.vue';
-
 const defForm = {
   name: '',
   id: '', //维修工单id
   disposalType: '',
   managementCategory: '',
   code: '',
-  processId: '',
   disposalTypeList: [],
   deviceList: []
 };
@@ -291,7 +258,7 @@ export default {
     infoDisposalList,
     Detail,
     templateList,
-    formContent
+    formContent,
     // workList
   },
   data() {
@@ -318,7 +285,6 @@ export default {
       disposalTypeList: [],
       columns: [],
       templateName: '',
-      bpmList: []
     };
   },
 
@@ -328,15 +294,7 @@ export default {
       return this.$store.state.theme.styleResponsive;
     }
   },
-  async created() {
-    const data = await bpmPage({
-      pageSize: 100,
-      pageNo: 1,
-      processTypeId: '1853725791034118145'
-    });
-    this.bpmList = data.list;
-    // console.log(this.bpmList)
-  },
+
   methods: {
     async columnsInit(type) {
       this.columns = [

+ 0 - 8
src/views/equipmentDisposal/components/search.vue

@@ -54,14 +54,6 @@
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="组织机构:">
-          <auth-selection
-            v-model="where.deptIds"
-            style="width: 100%"
-          ></auth-selection>
-        </el-form-item>
-      </el-col>
 
       <el-col
         style="display: flex; justify-content: flex-end"

+ 163 - 146
src/views/equipmentDisposal/index.vue

@@ -58,7 +58,7 @@
             :underline="false"
             icon="el-icon-edit"
             v-if="row.approvalStatus == 0"
-            @click="submit(row)"
+            @click="processSubmit(row)"
           >
             提交
           </el-link>
@@ -86,167 +86,184 @@
         </template>
       </ele-pro-table>
     </el-card>
-
+    <process-submit-dialog
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
     <edit ref="edit" @refresh="reload"></edit>
   </div>
 </template>
 
 <script>
-  import { getList, remove, submit } from '@/api/equipmentDisposal/index.js';
+import { getList, remove, submit } from '@/api/equipmentDisposal/index.js';
+import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
 
-  import dictMixins from '@/mixins/dictMixins';
-  import equipmentSearch from './components/search.vue';
-  import edit from './components/edit';
+import dictMixins from '@/mixins/dictMixins';
+import equipmentSearch from './components/search.vue';
+import edit from './components/edit';
 
-  export default {
-    mixins: [dictMixins],
-    components: {
-      equipmentSearch,
-      edit
-    },
+export default {
+  mixins: [dictMixins],
+  components: {
+    equipmentSearch,
+    edit,
+    processSubmitDialog
+  },
 
-    data() {
-      return {
-        loading: false,
-        // 表格列配置
-        columns: [
-          // {
-          //   width: 45,
-          //   type: 'selection',
-          //   columnKey: 'selection',
-          //   align: 'center'
-          // },
-          {
-            columnKey: 'index',
-            type: 'index',
-            label: '序号',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            prop: 'disposalType',
-            slot: 'disposalType',
-            align: 'center',
-            label: '处置方式',
-            showOverflowTooltip: true
-          },
+  data() {
+    return {
+      loading: false,
+      processSubmitDialogFlag:false,
+      // 表格列配置
+      columns: [
+        // {
+        //   width: 45,
+        //   type: 'selection',
+        //   columnKey: 'selection',
+        //   align: 'center'
+        // },
+        {
+          columnKey: 'index',
+          type: 'index',
+          label: '序号',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'disposalType',
+          slot: 'disposalType',
+          align: 'center',
+          label: '处置方式',
+          showOverflowTooltip: true
+        },
 
-          {
-            columnKey: 'code',
-            align: 'center',
-            prop: 'code',
-            slot: 'code',
-            label: '编码',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'name',
-            align: 'center',
-            label: '名称',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'fixCode',
-            align: 'center',
-            label: '固资编码',
-            showOverflowTooltip: true,
-            formatter: (row, column, cellValue) => {
-              return row.deviceList.map((item) => item.fixCode).toString();
-            }
-          },
-          {
-            align: 'center',
-            label: '物品名称',
-            showOverflowTooltip: true,
-            formatter: (row, column, cellValue) => {
-              return row.deviceList.map((item) => item.name).toString();
-            }
-          },
-          {
-            prop: 'createUserName',
-            align: 'center',
-            label: '创建人'
-          },
-          {
-            prop: 'createTime',
-            align: 'center',
-            label: '创建时间'
-          },
-          {
-            prop: 'approvalStatus',
-            align: 'center',
-            label: '状态',
-            showOverflowTooltip: true,
-            formatter: (row, column, cellValue) => {
-              return cellValue == 0
-                ? '草稿'
-                : cellValue == 1
-                ? '审核中'
-                : '审核通过';
-            }
-          },
-
-          {
-            columnKey: 'action',
-            slot: 'action',
-            align: 'center',
-            label: '操作',
-            width: 240,
-            fixed: 'right'
+        {
+          columnKey: 'code',
+          align: 'center',
+          prop: 'code',
+          slot: 'code',
+          label: '编码',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'name',
+          align: 'center',
+          label: '名称',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'fixCode',
+          align: 'center',
+          label: '固资编码',
+          showOverflowTooltip: true,
+          formatter: (row, column, cellValue) => {
+            return row.deviceList.map((item) => item.fixCode).toString();
           }
-        ],
-        networkCounts: {},
-        checkRadioData: [],
-        QRvisible: false
-      };
-    },
-    computed: {},
-    created() {
-      this.requestDict('设备处置方式');
+        },
+        {
+          align: 'center',
+          label: '物品名称',
+          showOverflowTooltip: true,
+          formatter: (row, column, cellValue) => {
+            return row.deviceList.map((item) => item.name).toString();
+          }
+        },
+        {
+          prop: 'createUserName',
+          align: 'center',
+          label: '创建人'
+        },
+        {
+          prop: 'createTime',
+          align: 'center',
+          label: '创建时间'
+        },
+        {
+          prop: 'approvalStatus',
+          align: 'center',
+          label: '状态',
+          showOverflowTooltip: true,
+          formatter: (row, column, cellValue) => {
+            return cellValue == 0
+              ? '草稿'
+              : cellValue == 1
+              ? '审核中'
+              : '审核通过';
+          }
+        },
+
+        {
+          columnKey: 'action',
+          slot: 'action',
+          align: 'center',
+          label: '操作',
+          width: 240,
+          fixed: 'right'
+        }
+      ],
+      networkCounts: {},
+      checkRadioData: [],
+      QRvisible: false
+    };
+  },
+  computed: {},
+  created() {
+    this.requestDict('设备处置方式');
+  },
+  methods: {
+    /* 表格数据源 */
+    datasource({ page, limit, where }) {
+      console.log('------reload-------');
+      // this.getNetWork(page, limit, where, order);
+      return getList({
+        ...where,
+        pageNum: page,
+        size: limit
+      });
     },
-    methods: {
-      /* 表格数据源 */
-      datasource({ page, limit, where }) {
-        console.log('------reload-------');
-        // this.getNetWork(page, limit, where, order);
-        return getList({
-          ...where,
-          pageNum: page,
-          size: limit
-        });
-      },
 
-      /* 刷新表格 */
-      reload(where) {
-        this.$refs.table.reload({ pageNum: 1, where: where });
-      },
-      open(row, type) {
-        this.$refs.edit.open(row, type);
-      },
-      submit(row) {
-        submit({ businessId: row.id }).then((res) => {
-          this.$message.success('提交成功!');
-          this.reload();
-        });
-      },
-      remove(row) {
-        remove([row.id]).then((res) => {
-          this.$message.success('删除成功!');
-          this.reload();
-        });
-      }
+    /* 刷新表格 */
+    reload(where) {
+      this.$refs.table.reload({ pageNum: 1, where: where });
+    },
+    open(row, type) {
+      this.$refs.edit.open(row, type);
+    },
+    processSubmit(row) {
+      this.processSubmitDialogFlag = true;
+      this.$nextTick(() => {
+        let params = {
+          businessId: row.id,
+          businessKey: 'device_scrap_approve',
+          formCreateUserId: row.createUserId,
+          variables: {
+            businessCode: row.code
+          },
+   
+        }
+        this.$refs.processSubmitDialogRef.init(params);
+      });
+    },
+    remove(row) {
+      remove([row.id]).then((res) => {
+        this.$message.success('删除成功!');
+        this.reload();
+      });
     }
-  };
+  }
+};
 </script>
 <style lang="scss" scoped>
-  @media print {
-    #printSection {
+@media print {
+  #printSection {
+    font-size: 34px;
+    span {
       font-size: 34px;
-      span {
-        font-size: 34px;
-      }
     }
   }
+}
 </style>

+ 0 - 8
src/views/equipmentLease/components/search.vue

@@ -54,14 +54,6 @@
         </el-form-item>
       </el-col>
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="组织机构:">
-          <auth-selection
-            v-model="where.deptIds"
-            style="width: 100%"
-          ></auth-selection>
-        </el-form-item>
-      </el-col>
 
       <el-col
         style="display: flex; justify-content: flex-end"

+ 2 - 2
src/views/ledgerAssets/equipment/components/BOM-search.vue

@@ -47,11 +47,11 @@
           </el-select>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5}">
+      <!-- <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5}">
         <el-form-item label="组织机构:">
           <auth-selection size="mini" v-model.trim="where.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
-      </el-col>
+      </el-col> -->
 
 
 

+ 426 - 431
src/views/ledgerAssets/equipment/edit.vue

@@ -118,466 +118,461 @@
 </template>
 
 <script>
-  import warehouseConfigVue from '../components/warehouseConfig.vue';
-  import productInfoVue from '../components/productInfo.vue';
-  import planVue from '../components/plan.vue';
-  import qualityConfig from '../components/qualityConfig.vue';
-  import footerVue from '../components/footer.vue';
-  import documentInformation from '../components/documentInformation.vue';
-  import equipmentTag from '../components/equipmentTag.vue';
-  import basicInfoVue from '../components/basicInfo.vue';
-  import DialogGoods from '../components/DialogGoods';
-  import assetInformation from '../components/assetInformation.vue';
-  import businessInformation from '../components/businessInformation.vue';
-  import { getDetails } from '@/api/classifyManage/itemInformation';
-  import {
-    saveOrEdit,
-    getAssetInfo,
-    getCode,
-    getAssetNum
-  } from '@/api/ledgerAssets';
-  export default {
-    components: {
-      warehouseConfigVue,
-      productInfoVue,
-      planVue,
-      qualityConfig,
-      footerVue,
-      documentInformation,
-      DialogGoods,
-      assetInformation,
-      businessInformation,
-      basicInfoVue,
-      equipmentTag
-    },
-    props: {
-      showTitle: {
-        type: Boolean,
-        default: true
-      }
-    },
-    data() {
-      return {
-        labelStyle: {
-          width: '200px'
+import warehouseConfigVue from '../components/warehouseConfig.vue';
+import productInfoVue from '../components/productInfo.vue';
+import planVue from '../components/plan.vue';
+import qualityConfig from '../components/qualityConfig.vue';
+import footerVue from '../components/footer.vue';
+import documentInformation from '../components/documentInformation.vue';
+import equipmentTag from '../components/equipmentTag.vue';
+import basicInfoVue from '../components/basicInfo.vue';
+import DialogGoods from '../components/DialogGoods';
+import assetInformation from '../components/assetInformation.vue';
+import businessInformation from '../components/businessInformation.vue';
+import { getDetails } from '@/api/classifyManage/itemInformation';
+import {
+  saveOrEdit,
+  getAssetInfo,
+  getCode,
+  getAssetNum
+} from '@/api/ledgerAssets';
+const equipmentLabelJson = [
+  {
+    LJSB: '2', //老旧设备
+    SHSB: '2', //涉火设备
+    SHLJSB: '2', //涉火老旧设备
+    GZSB: '2', //关重设备
+    GJSB: '2', //关键设备
+    TZSB: '2', //特种设备
+    HBSB: '2', //环保设备
+    ZYSCSB: '2', //主要生产设备
+    FZSCSB: '2', //辅助生产设备
+    KYSB: '2' //科研设备
+  }
+];
+export default {
+  components: {
+    warehouseConfigVue,
+    productInfoVue,
+    planVue,
+    qualityConfig,
+    footerVue,
+    documentInformation,
+    DialogGoods,
+    assetInformation,
+    businessInformation,
+    basicInfoVue,
+    equipmentTag
+  },
+  props: {
+    showTitle: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      labelStyle: {
+        width: '200px'
+      },
+      contentStyle: {
+        width: '400px'
+      },
+      isLink: true,
+      title: '新建设备信息',
+      pageType: 'add',
+      btnLoading: false,
+      // 设备主键id
+      id: '',
+      form: {
+        extInfoSelf: [],
+        // 基本信息
+        code: '',
+        name: '',
+        productTime: '',
+        // workstation: {},
+        equipmentLabelJson
+      },
+      rules: {
+        name: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
+        code: [{ required: true, message: '请输入设备编码', trigger: 'blur' }]
+      },
+      // 基本信息
+      basicInfo: {},
+      positionInfo: {
+        // 详细地址
+        deviceDetailAddress: '',
+        // 请选择产线
+        lineCode: '',
+        lineName: '',
+        // 请选择车间
+        workshopCode: '',
+        workshopName: '',
+        // 请选择工厂
+        factoryCode: '',
+        factoryName: ''
+      },
+      // 图片
+      imageUrl: null,
+      // 文档信息
+      attUrl: {
+        operatingManual: {
+          value: [],
+          sort: 1
         },
-        contentStyle: {
-          width: '400px'
+        productionLicence: {
+          value: [],
+          sort: 2
         },
-        isLink: true,
-        title: '新建设备信息',
-        pageType: 'add',
-        btnLoading: false,
-        // 设备主键id
-        id: '',
-        form: {
-          extInfoSelf: [],
-          // 基本信息
-          code: '',
-          name: '',
-          productTime: '',
-          // workstation: {},
-          equipmentLabelJson: [
-            {
-              LJSB: '2', //老旧设备
-              SHSB: '2', //涉火设备
-              SHLJSB: '2', //涉火老旧设备
-              GZSB: '2', //关重设备
-              GJSB: '2', //关键设备
-              TZSB: '2', //特种设备
-              HBSB: '2', //环保设备
-              ZYSCSB: '2', //主要生产设备
-              FZSCSB: '2', //辅助生产设备
-              KYSB: '2' //科研设备
-            }
-          ]
+        explosionProofCertificate: {
+          value: [],
+          sort: 3
         },
-        rules: {
-          name: [
-            { required: true, message: '请输入设备名称', trigger: 'blur' }
-          ],
-          code: [{ required: true, message: '请输入设备编码', trigger: 'blur' }]
+        surveyReport: {
+          value: [],
+          sort: 4
         },
-        // 基本信息
-        basicInfo: {},
-        positionInfo: {
-          // 详细地址
-          deviceDetailAddress: '',
-          // 请选择产线
-          lineCode: '',
-          lineName: '',
-          // 请选择车间
-          workshopCode: '',
-          workshopName: '',
-          // 请选择工厂
-          factoryCode: '',
-          factoryName: ''
+        inspectionCycleManual: {
+          value: [],
+          sort: 5
         },
-        // 图片
-        imageUrl: null,
-        // 文档信息
-        attUrl: {
-          operatingManual: {
-            value: [],
-            sort: 1
-          },
-          productionLicence: {
-            value: [],
-            sort: 2
-          },
-          explosionProofCertificate: {
-            value: [],
-            sort: 3
-          },
-          surveyReport: {
-            value: [],
-            sort: 4
-          },
-          inspectionCycleManual: {
-            value: [],
-            sort: 5
-          },
-          informationDrawing: {
-            value: [],
-            sort: 6
-          },
-          productCertificate: {
-            value: [],
-            sort: 7
-          }
+        informationDrawing: {
+          value: [],
+          sort: 6
         },
-        // 是否开始物联
-        isIotEnable: '1',
-        // 物联ID
-        iotId: '',
-        // 回显过保时间
-        cbexpirationTime: '',
-        // 生命周期
-        sourceDICT: '',
-        // 网络状态
-        networkStatus: '',
-        id: ''
-      };
-    },
-    watch: {},
-    computed: {
-      // 过保时间
-      expirationTime() {
-        if (this.form.productTime && this.basicInfo.expirationDate) {
-          return this.setGbTime(
-            this.form.productTime,
-            this.basicInfo.expirationDate,
-            this.basicInfo.expirationDateUnit
-          );
-        } else {
-          return '';
+        productCertificate: {
+          value: [],
+          sort: 7
         }
-      }
-    },
-    async created() {
-      if (this.$route.query.id) {
-        this.pageType = 'edit';
-        this.id = this.$route.query.id;
-        await this.getInfo();
-        this.title = '编辑设备信息';
-        // this.getgys();
-        // await this._getWarehouseChildren();
+      },
+      // 是否开始物联
+      isIotEnable: '1',
+      // 物联ID
+      iotId: '',
+      // 回显过保时间
+      cbexpirationTime: '',
+      // 生命周期
+      sourceDICT: '',
+      // 网络状态
+      networkStatus: '',
+      id: ''
+    };
+  },
+  watch: {},
+  computed: {
+    // 过保时间
+    expirationTime() {
+      if (this.form.productTime && this.basicInfo.expirationDate) {
+        return this.setGbTime(
+          this.form.productTime,
+          this.basicInfo.expirationDate,
+          this.basicInfo.expirationDateUnit
+        );
       } else {
-        this.pageType = 'add';
-        this.title = '新增设备信息';
+        return '';
       }
+    }
+  },
+  async created() {
+    if (this.$route.query.id) {
+      this.pageType = 'edit';
+      this.id = this.$route.query.id;
+      await this.getInfo();
+      this.title = '编辑设备信息';
+      // this.getgys();
+      // await this._getWarehouseChildren();
+    } else {
+      this.pageType = 'add';
+      this.title = '新增设备信息';
+    }
+  },
+  methods: {
+    handlwpbm() {
+      this.$refs.DialogGoods.open('0', true);
     },
-    methods: {
-      handlwpbm() {
-        this.$refs.DialogGoods.open('0', true);
-      },
-      async cbDialogGoods(data) {
-        let res = await getDetails(data.id);
-        if (!data.extInfoSelf) {
-          data.extInfoSelf = [];
-        }
-        // if (!data.workstation) {
-        //   data.workstation = {};
-        // }
-        if (!data.isPublic) {
-          data.isPublic = 0;
-        }
-        this.form = Object.assign({}, this.form, data);
-        console.log(this.form);
+    async cbDialogGoods(data) {
+      let res = await getDetails(data.id);
+      if (!data.extInfoSelf) {
+        data.extInfoSelf = [];
+      }
+      // if (!data.workstation) {
+      //   data.workstation = {};
+      // }
+      if (!data.isPublic) {
+        data.isPublic = 0;
+      }
+      this.form = Object.assign({}, this.form, data);
+      console.log(this.form);
 
-        this.form.category = res;
-        this.basicInfo = data;
-        this.form.rootCategoryLevelId = this.basicInfo.categoryLevelPathId
-          .split(',')[0]
-          .replace('[', '');
-        this.form.categoryId = this.basicInfo.id;
-        this.form.name = this.basicInfo.name;
-        this.form.code = data.code; //Date.now(); //res.data[0].onlyCode;
-        this.initOtherMsg();
-      },
-      // 计算过保时间
-      setGbTime(basic, value, type) {
-        basic = Date.parse(basic);
-        let time;
-        switch (type) {
-          case 'minute':
-            time = value * 1000 * 60;
-            break;
-          case 'hour':
-            time = value * 1000 * 60 * 60;
-            break;
-          case 'day':
-            time = value * 1000 * 60 * 60 * 24;
-            break;
-          case 'month':
-            time = value * 1000 * 60 * 60 * 24 * 30;
-            break;
-          case 'year':
-            time = value * 1000 * 60 * 60 * 24 * 365;
-            break;
-          default:
-            break;
-        }
+      this.form.category = res;
+      this.basicInfo = data;
+      this.form.rootCategoryLevelId = this.basicInfo.categoryLevelPathId
+        .split(',')[0]
+        .replace('[', '');
+      this.form.categoryId = this.basicInfo.id;
+      this.form.name = this.basicInfo.name;
+      this.form.code = data.code; //Date.now(); //res.data[0].onlyCode;
+      this.initOtherMsg();
+    },
+    // 计算过保时间
+    setGbTime(basic, value, type) {
+      basic = Date.parse(basic);
+      let time;
+      switch (type) {
+        case 'minute':
+          time = value * 1000 * 60;
+          break;
+        case 'hour':
+          time = value * 1000 * 60 * 60;
+          break;
+        case 'day':
+          time = value * 1000 * 60 * 60 * 24;
+          break;
+        case 'month':
+          time = value * 1000 * 60 * 60 * 24 * 30;
+          break;
+        case 'year':
+          time = value * 1000 * 60 * 60 * 24 * 365;
+          break;
+        default:
+          break;
+      }
 
-        let num = basic + time;
-        return parseTime(num);
-      },
-      // 添加自定义参数
-      addItem() {
-        if (this.form.extInfoSelf.length < 10) {
-          let item = { key: '', value: '' };
-          this.form.extInfoSelf.push(item);
-        } else {
-          this.$message.warning('自定义参数最多添加10条');
-        }
-      },
-      // 删除自定义参数
-      delt(item, index) {
-        this.form.extInfoSelf.splice(index, 1);
-      },
-      // 提交
-      submit() {
-        if (JSON.stringify(this.basicInfo) === '{}' && this.pageType == 'add') {
-          return this.$message.error('请选择物品');
-        }
-        this.$refs.form.validate(async (valid) => {
-          if (valid) {
-            let par = {
-              //基本信息
-              ...this.form,
-              assetType: 1,
-              // 资产信息
-              positionIds: '1,1,1,1',
-              position: {
-                detailPosition: this.positionInfo.deviceDetailAddress,
-                pathIds: `${
-                  this.positionInfo.factoryCode
-                    ? this.positionInfo.factoryCode + ','
-                    : ''
-                }${
-                  this.positionInfo.workshopCode
-                    ? this.positionInfo.workshopCode + ','
-                    : ''
-                }${this.positionInfo.lineCode}`,
-                pathName: `${
-                  this.positionInfo.factoryName
-                    ? this.positionInfo.factoryName + ','
-                    : ''
-                }${
-                  this.positionInfo.workshopName
-                    ? this.positionInfo.workshopName + ','
-                    : ''
-                }${this.positionInfo.lineName}`,
-                type: '1',
-                num: 1
-              },
-              // 文档信息
-              attUrl: this.setWd() || [],
-              // 设备图片
-              imageUrl: this.imageUrl || {},
-              // 是否启用物联
-              isIotEnable: this.isIotEnable
-              // 扩展字段
-              // extInfoSelf: this.setKz()
-            };
-            par.deviceLocationName = par.location
-              ? par.location.toString()
-              : '';
-            par.extInfo = { ...this.form };
-            let obj = {};
-            par.extInfoSelf.forEach((item) => {
-              obj[item.key] = item.value;
-            });
-            // console.log('sasasasa', par);
-            // return;
-            par.extInfoSelf = obj;
-            if (this.pageType == 'edit') {
-              par.id = this.id;
-            } else {
-              // const batchNo = await getCode('lot_number_code');
-              // const res = await getAssetNum({
-              //   assetCode: par.code,
-              //   batchNum: batchNo,
-              //   num: 1
-              // });
-              // console.log(res);
-              // par.code = res.data.shift().onlyCode;
-              par.id = '';
-            }
-            this.btnLoading = true;
-            saveOrEdit(par)
-              .then((res) => {
-                this.$message.success('操作成功');
-                this.$router.go(-1);
-              })
-              .finally(() => {
-                this.btnLoading = false;
-              });
+      let num = basic + time;
+      return parseTime(num);
+    },
+    // 添加自定义参数
+    addItem() {
+      if (this.form.extInfoSelf.length < 10) {
+        let item = { key: '', value: '' };
+        this.form.extInfoSelf.push(item);
+      } else {
+        this.$message.warning('自定义参数最多添加10条');
+      }
+    },
+    // 删除自定义参数
+    delt(item, index) {
+      this.form.extInfoSelf.splice(index, 1);
+    },
+    // 提交
+    submit() {
+      if (JSON.stringify(this.basicInfo) === '{}' && this.pageType == 'add') {
+        return this.$message.error('请选择物品');
+      }
+      this.$refs.form.validate(async (valid) => {
+        if (valid) {
+          let par = {
+            //基本信息
+            ...this.form,
+            assetType: 1,
+            // 资产信息
+            positionIds: '1,1,1,1',
+            position: {
+              detailPosition: this.positionInfo.deviceDetailAddress,
+              pathIds: `${
+                this.positionInfo.factoryCode
+                  ? this.positionInfo.factoryCode + ','
+                  : ''
+              }${
+                this.positionInfo.workshopCode
+                  ? this.positionInfo.workshopCode + ','
+                  : ''
+              }${this.positionInfo.lineCode}`,
+              pathName: `${
+                this.positionInfo.factoryName
+                  ? this.positionInfo.factoryName + ','
+                  : ''
+              }${
+                this.positionInfo.workshopName
+                  ? this.positionInfo.workshopName + ','
+                  : ''
+              }${this.positionInfo.lineName}`,
+              type: '1',
+              num: 1
+            },
+            // 文档信息
+            attUrl: this.setWd() || [],
+            // 设备图片
+            imageUrl: this.imageUrl || {},
+            // 是否启用物联
+            isIotEnable: this.isIotEnable
+            // 扩展字段
+            // extInfoSelf: this.setKz()
+          };
+          par.deviceLocationName = par.location ? par.location.toString() : '';
+          par.extInfo = { ...this.form };
+          let obj = {};
+          par.extInfoSelf.forEach((item) => {
+            obj[item.key] = item.value;
+          });
+          // console.log('sasasasa', par);
+          // return;
+          par.extInfoSelf = obj;
+          if (this.pageType == 'edit') {
+            par.id = this.id;
           } else {
-            console.log('error submit!!');
-            return false;
+            // const batchNo = await getCode('lot_number_code');
+            // const res = await getAssetNum({
+            //   assetCode: par.code,
+            //   batchNum: batchNo,
+            //   num: 1
+            // });
+            // console.log(res);
+            // par.code = res.data.shift().onlyCode;
+            par.id = '';
           }
-        });
-      },
-      // 处理扩展字段
-      setKz() {
-        return this.form.extInfoSelf || [];
-      },
-      // 处理文档信息
-      setWd() {
-        return Object.values(this.attUrl).map((item) => ({
-          ...(item.value[0] || {}),
-          sort: item.sort
-        }));
-      },
-      // 获取设备详情
-      async getInfo() {
-        const data = await getAssetInfo(this.id);
-        // 扩展字段
-        data.extInfoSelf = data.extInfoSelf || [];
-        // 权属人相关信息
-        // if (!data.workstation) {
-        //   data.workstation = {};
-        // }
-        // 资产信息类型默认专用
-        if (!data.isPublic) {
-          data.isPublic = 0;
-        }
-        this.form = Object.assign({}, this.form, data);
-        console.log(this.form, 'dsadasd');
-        this.form.lifeCycle = this.form.lifeCycle + '';
-        this.form.location = data.deviceLocationName.split(',');
-        this.basicInfo = data;
-        this.cbexpirationTime = data.expirationTime;
-        this.sourceDICT = data.sourceDICT;
-        this.networkStatus = data.networkStatus;
-        this.positionInfo.deviceDetailAddress = data.deviceDetailAddress;
-        this.initOtherMsg();
-        // 设备图片
-        this.imageUrl = data.imageUrl;
-        // 物联参数
-        this.isIotEnable = data.isIotEnable;
-        this.iotId = data.iotId;
-      },
-      async initOtherMsg() {
-        // 基本信息
-        this.$refs.basicInfoVueRef.getDetailInfoAugr(
-          this.form.category.category
-        );
-        // 仓储配置
-        // this.$refs.warehouseConfigRef.getDetailInfoAugr(
-        //   this.form.category.categoryWms
-        // );
-        // 生产信息
-        // this.$refs.productInfoRef.getDetailInfoAugr(
-        //   this.form.category.categoryMes
-        // );
-        // 计划配置
-        // this.$refs.planRef.getDetailInfoAugr(this.form.category.categoryAps);
-        // 质量配置
-        // this.$refs.qualityConfigRef.getDetailInfoAugr(
-        //   this.form.category.categoryQms
-        // );
-        // 其他和关联信息
-        // this.$refs.footerVueRef.getDetailInfoAugr(this.form.category.category);
-        // 文档信息
-        if (this.form.attUrl && this.form.attUrl.length > 0) {
-          Object.keys(this.attUrl).forEach((n, index) => {
-            this.attUrl[n].value =
-              (this.form.attUrl[index]?.storePath && [
-                this.form.attUrl[index]
-              ]) ||
-              [];
-          });
-          this.$refs.documentInformationRef.getDetailInfoAugr(this.attUrl);
-        }
-      },
-      // 设置标准产能
-      setbzcn(val) {
-        if (!val) {
-          return '';
+          this.btnLoading = true;
+          saveOrEdit(par)
+            .then((res) => {
+              this.$message.success('操作成功');
+              this.$router.go(-1);
+            })
+            .finally(() => {
+              this.btnLoading = false;
+            });
+        } else {
+          console.log('error submit!!');
+          return false;
         }
-        let item = JSON.parse(val);
-        return item.standardCapacity || '';
+      });
+    },
+    // 处理扩展字段
+    setKz() {
+      return this.form.extInfoSelf || [];
+    },
+    // 处理文档信息
+    setWd() {
+      console.log(this.attUrl)
+      return Object.values(this.attUrl).map((item) => ({
+        value:item.value||[],
+        sort: item.sort
+      }));
+    },
+    // 获取设备详情
+    async getInfo() {
+      const data = await getAssetInfo(this.id);
+      // 扩展字段
+      data.extInfoSelf = data.extInfoSelf || [];
+      // 权属人相关信息
+      // if (!data.workstation) {
+      //   data.workstation = {};
+      // }
+      // 资产信息类型默认专用
+      if (!data.isPublic) {
+        data.isPublic = 0;
+      }
+      this.form = Object.assign({}, this.form, data);
+      console.log(this.form, 'dsadasd');
+      this.form.lifeCycle = this.form.lifeCycle + '';
+      this.form.location = data.deviceLocationName.split(',');
+      this.basicInfo = data;
+      this.cbexpirationTime = data.expirationTime;
+      this.sourceDICT = data.sourceDICT;
+      this.networkStatus = data.networkStatus;
+      this.positionInfo.deviceDetailAddress = data.deviceDetailAddress;
+      if (this.form.equipmentLabelJson.length == 0) {
+        this.form.equipmentLabelJson = equipmentLabelJson;
       }
+      this.initOtherMsg();
+      // 设备图片
+      this.imageUrl = data.imageUrl;
+      // 物联参数
+      this.isIotEnable = data.isIotEnable;
+      this.iotId = data.iotId;
+    },
+    async initOtherMsg() {
+      // 基本信息
+      this.$refs.basicInfoVueRef.getDetailInfoAugr(this.form.category.category);
+      // 仓储配置
+      // this.$refs.warehouseConfigRef.getDetailInfoAugr(
+      //   this.form.category.categoryWms
+      // );
+      // 生产信息
+      // this.$refs.productInfoRef.getDetailInfoAugr(
+      //   this.form.category.categoryMes
+      // );
+      // 计划配置
+      // this.$refs.planRef.getDetailInfoAugr(this.form.category.categoryAps);
+      // 质量配置
+      // this.$refs.qualityConfigRef.getDetailInfoAugr(
+      //   this.form.category.categoryQms
+      // );
+      // 其他和关联信息
+      // this.$refs.footerVueRef.getDetailInfoAugr(this.form.category.category);
+      // 文档信息
+      if (this.form.attUrl && this.form.attUrl.length > 0) {
+        Object.keys(this.attUrl).forEach((n, index) => {
+          this.attUrl[n].value =this.form.attUrl[index].value||[]
+        });
+        this.$refs.documentInformationRef.getDetailInfoAugr(this.attUrl);
+      }
+    },
+    // 设置标准产能
+    setbzcn(val) {
+      if (!val) {
+        return '';
+      }
+      let item = JSON.parse(val);
+      return item.standardCapacity || '';
     }
-  };
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-  ::v-deep .descriptions {
-    margin-bottom: 10px;
-  }
-  .baseinfo-container .basic-details-title {
-    font-size: 16px;
-    margin: 15px 0;
+::v-deep .descriptions {
+  margin-bottom: 10px;
+}
+.baseinfo-container .basic-details-title {
+  font-size: 16px;
+  margin: 15px 0;
+}
+.upload-container {
+  display: flex;
+  justify-content: flex-start;
+  .file-list {
+    margin-left: 50px;
+    flex: 1;
   }
-  .upload-container {
-    display: flex;
-    justify-content: flex-start;
-    .file-list {
-      margin-left: 50px;
-      flex: 1;
+}
+.equipment-container {
+  .label-none {
+    .el-form-item__content {
+      margin-left: 0 !important;
     }
   }
-  .equipment-container {
-    .label-none {
-      .el-form-item__content {
-        margin-left: 0 !important;
-      }
-    }
+}
+.sbwz {
+  .item {
+    width: 120px !important;
   }
-  .sbwz {
-    .item {
-      width: 120px !important;
-    }
-    .item + .item {
-      margin-left: 10px;
-    }
-    .item-input {
-      width: 350px !important;
-    }
+  .item + .item {
+    margin-left: 10px;
   }
-  .input {
-    width: 100%;
+  .item-input {
+    width: 350px !important;
   }
-  .kzzd {
-    width: 500px;
-    .add-col {
-      display: flex;
-      .col-input {
-        & + .col-input {
-          margin-left: 10px;
-        }
-      }
-      .del {
+}
+.input {
+  width: 100%;
+}
+.kzzd {
+  width: 500px;
+  .add-col {
+    display: flex;
+    .col-input {
+      & + .col-input {
         margin-left: 10px;
       }
     }
-  }
-  ::v-deep .el-descriptions {
-    .el-form-item {
-      margin-bottom: 0px;
+    .del {
+      margin-left: 10px;
     }
   }
+}
+::v-deep .el-descriptions {
+  .el-form-item {
+    margin-bottom: 0px;
+  }
+}
 </style>

+ 2 - 2
src/views/maintenance/delivery/plan/components/plan-search.vue

@@ -67,9 +67,9 @@
             <el-option label="已驳回" :value="4"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="组织机构:">
+        <!-- <el-form-item label="组织机构:">
           <auth-selection v-model="where.deptIds" style="width: 100%"></auth-selection>
-        </el-form-item>
+        </el-form-item> -->
       </el-col>
     </el-row>
     <el-row :gutter="15">

+ 2 - 2
src/views/maintenance/delivery/workOrder/components/work-search.vue

@@ -72,9 +72,9 @@
         <!-- <el-form-item label="规则名称:">
           <el-input clearable v-model="where.name" placeholder="请输入" />
         </el-form-item> -->
-        <el-form-item label="组织机构:">
+        <!-- <el-form-item label="组织机构:">
           <auth-selection v-model="where.deptIds" style="width: 100%"></auth-selection>
-        </el-form-item>
+        </el-form-item> -->
       </el-col>
     </el-row>
     <el-row :gutter="15">

+ 2 - 2
src/views/maintenance/equipment/plan/components/plan-search.vue

@@ -67,9 +67,9 @@
             <el-option label="已驳回" :value="4"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="组织机构:">
+        <!-- <el-form-item label="组织机构:">
           <auth-selection v-model="where.deptIds" style="width: 100%"></auth-selection>
-        </el-form-item>
+        </el-form-item> -->
       </el-col>
     </el-row>
     <el-row :gutter="15">

+ 2 - 2
src/views/maintenance/patrol/plan/components/plan-search.vue

@@ -67,9 +67,9 @@
             <el-option label="已驳回" :value="4"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="组织机构:">
+        <!-- <el-form-item label="组织机构:">
           <auth-selection v-model="where.deptIds" style="width: 100%"></auth-selection>
-        </el-form-item>
+        </el-form-item> -->
 
       </el-col>
     </el-row>

+ 2 - 2
src/views/maintenance/patrol/workOrder/components/work-search.vue

@@ -69,9 +69,9 @@
         <!-- <el-form-item label="规则名称:">
           <el-input clearable v-model="where.name" placeholder="请输入" />
         </el-form-item> -->
-        <el-form-item label="组织机构:">
+        <!-- <el-form-item label="组织机构:">
           <auth-selection v-model="where.deptIds" style="width: 100%"></auth-selection>
-        </el-form-item>
+        </el-form-item> -->
       </el-col>
     </el-row>
     <el-row :gutter="15">

+ 2 - 2
src/views/maintenance/repair/outsourcingOrder/components/order-search.vue

@@ -43,9 +43,9 @@
     </el-row>
     <el-row :gutter="15">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="组织机构:">
+        <!-- <el-form-item label="组织机构:">
           <auth-selection data-type="Array" v-model="where.deptIds" style="width: 100%"></auth-selection>
-        </el-form-item>
+        </el-form-item> -->
       </el-col>
       <el-col style="display: flex;justify-content: flex-end" v-bind="styleResponsive ? { lg: 18, md: 18 } : { span: 18 }">
         <el-button

+ 2 - 2
src/views/maintenance/repair/planRepair/components/maintenance-search.vue

@@ -67,9 +67,9 @@
             <el-option label="已驳回" :value="4"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="组织机构:">
+        <!-- <el-form-item label="组织机构:">
           <auth-selection v-model="where.deptIds" style="width: 100%"></auth-selection>
-        </el-form-item>
+        </el-form-item> -->
 
       </el-col>
     </el-row>

+ 1 - 1
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.139:18086', // 粟
         // target: 'http://192.168.1.132:18086', // 徐
-        target: 'http://192.168.1.116:18086', //本
+        target: 'http://192.168.1.107:18086', //本
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''