Browse Source

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/BomWeb into develop

ZhaoJun 1 năm trước cách đây
mục cha
commit
280436284c

+ 4 - 2
src/pages/Detail/CommitAuditModal.js

@@ -116,7 +116,7 @@ function CommitAuditModal(props) {
    * @param {*} type 下一个节点的类型  custom-circle: 审批节点   custom-rect: 业务节点
    * @returns
    */
-  const getNextNodes = (currentId, type) => {
+  const getNextNodes = (currentId, type, flag) => {
     const { edges, nodes } = flowDetail;
     if (!currentId) return [];
     // 删除虚线通向的节点
@@ -136,6 +136,8 @@ function CommitAuditModal(props) {
 
     edges.filter(edge => edge.source.cell === currentId);
     const auditNodes = nodes.filter(node => {
+      // ========为旧清单提供生成PSR的能力,后期舍弃=========
+      if (flag && (node.node_type_psr == 3 || node.node_type_psr == 4)) return true;
       if (type && node.name !== type) {
         return false;
       }
@@ -455,7 +457,7 @@ function CommitAuditModal(props) {
 
   const nextNodesList = useMemo(() => {
     if (!auditId && !currentNodeId) return [];
-    return getNextNodes(auditId || currentNodeId, 'custom-rect');
+    return getNextNodes(auditId || currentNodeId, 'custom-rect', true);
   }, [auditId, currentNodeId, flowDetail]);
 
   const getReComputeAudit = (items, changedValues) => {

+ 1 - 1
src/pages/Detail/LuckySheet.js

@@ -762,7 +762,7 @@ function fn(C10, data, type) {
 
   function SUM(x, [y1, y2]) {
     let total = 0;
-    for (let i = y1; i < y2; i++) {
+    for (let i = y1; i <= y2; i++) {
       const item = data[i][x];
       if (!isNaN(item.v)) {
         total += item.v;

+ 2 - 2
src/utils/uploadExcelByUrl.js

@@ -94,7 +94,7 @@ function getCategoryData(bom) {
     let v = getCellValue(item.v);
     if (item.r == 0) {
       // 设置表头
-      bomTitle[item.c] = v;
+      bomTitle[item.c] = v.trim();
     } else {
       let key = bomTitle[item.c];
       if (!bomData[item.r - 1]) {
@@ -124,7 +124,7 @@ function getCategoryData(bom) {
   };
   bomData.forEach(item => {
     if (category.hasOwnProperty(item['类别'])) {
-      let price = parseFloat(item['总价(元)']);
+      let price = parseFloat(item['总价'] || item['总价(元)']);
       if (isNaN(price)) return;
       category[item['类别']] += price;
     }