Browse Source

增加老区

zhangafei 1 week ago
parent
commit
f98bf35ab5

+ 30 - 0
src/views/billet/hotDelivery/common.data.ts

@@ -160,6 +160,21 @@ export const configAll5 = [
     remark: null,
     belongTable: 'roll_deputy_cross',
   },
+  {
+    id: '19',
+    createBy: 'admin',
+    createTime: '2025-07-16 09:50:00',
+    updateBy: null,
+    updateTime: null,
+    sysOrgCode: null,
+    castMachine: '5',
+    typeName: '老区',
+    aliasName: '老区',
+    belongType: 0,
+    isTrucking: 1,
+    remark: null,
+    belongTable: 'roll_old_areas',
+  },
 ];
 // 六号机所有目的地、堆垛配置信息
 export const configAll6 = [
@@ -298,6 +313,21 @@ export const configAll6 = [
     remark: null,
     belongTable: 'roll_deputy_cross',
   },
+  {
+    id: '20',
+    createBy: 'admin',
+    createTime: '2025-07-16 09:50:00',
+    updateBy: null,
+    updateTime: null,
+    sysOrgCode: null,
+    castMachine: '6',
+    typeName: '老区',
+    aliasName: '老区',
+    belongType: 0,
+    isTrucking: 1,
+    remark: null,
+    belongTable: 'roll_old_areas',
+  },
 ];
 
 // 根据铸机号获取配置信息

+ 11 - 0
src/views/billet/operator/components/orgData.vue

@@ -489,6 +489,7 @@
     roll_club_three: '棒三',
     roll_out_shipp: '上若',
     roll_deputy_cross: '付跨',
+    roll_old_areas: '老区',
   };
   const changeLoading = (b) => {
     isSpinning.value = b;
@@ -616,12 +617,14 @@
             roll_club_three: {},
             roll_out_shipp: {},
             roll_deputy_cross: {},
+            roll_old_areas: {},
           },
           '0': {
             roll_club_two: {},
             roll_club_three: {},
             roll_out_shipp: {},
             roll_deputy_cross: {},
+            roll_old_areas: {},
           },
         };
         // 装车按热装和冷装分组
@@ -1116,6 +1119,10 @@
           hotSendList.value['付'] = Object.values(rollOneHotAndColdSize['0'].roll_deputy_cross);
           hotSendList.value['付'].forEach((ele) => (allWeight += ele.weight));
         }
+        if (Object.values(rollOneHotAndColdSize['0'].roll_old_areas).length) {
+          hotSendList.value['老'] = Object.values(rollOneHotAndColdSize['0'].roll_old_areas);
+          hotSendList.value['老'].forEach((ele) => (allWeight += ele.weight));
+        }
 
         if (Object.values(stackingSize)) {
           stackingList.value = Object.values(stackingSize);
@@ -1139,6 +1146,10 @@
           coldSendList.value['付'] = Object.values(rollOneHotAndColdSize['1'].roll_deputy_cross);
           coldSendList.value['付'].forEach((ele) => (allWeight += ele.weight));
         }
+        if (Object.values(rollOneHotAndColdSize['1'].roll_old_areas).length) {
+          coldSendList.value['老'] = Object.values(rollOneHotAndColdSize['1'].roll_old_areas);
+          coldSendList.value['老'].forEach((ele) => (allWeight += ele.weight));
+        }
 
         // 查看所有的定尺
         mainSize.value = sizeInfo || [...new Set(allSizeArr)].join(',');

+ 81 - 147
src/views/billet/operator/components/printOriginalRecords.vue

@@ -69,7 +69,7 @@
             <a-table-summary-row class="summary-row-no-border">
               <a-table-summary-cell :row-span="2" :col-span="remakeColSpan">
                 <div class="summary-cell-remark">
-                  <a-textarea v-model:value="mainRemark" @blur="handleRemarkBlur" style="min-height: 160px; padding-top: 0;" :bordered="false" />
+                  <a-textarea v-model:value="mainRemark" @blur="handleRemarkBlur" style="min-height: 160px; padding-top: 0" :bordered="false" />
                   <div style="text-align: left; padding: 0 11px">{{ totalWeight }}</div>
                 </div>
               </a-table-summary-cell>
@@ -275,7 +275,7 @@
   import printBilletSampleCard from './printBilletSampleCard.vue';
   import { useModal } from '/@/components/Modal';
   import { getMachineConfig, MachineConfigType } from '../../hotDelivery/common.data';
-  import { steelPlateFormula } from '../operator.data';
+  import { steelPlateFormula, getHotColumns, getBandBaseData } from '../operator.data';
   import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
 
   // 注册打印送样卡modal
@@ -743,6 +743,8 @@
     roll_club_two: '棒二',
     roll_club_three: '棒三',
     roll_out_shipp: '上若',
+    roll_deputy_cross: '付跨',
+    roll_old_areas: '老区',
   };
 
   // 备注
@@ -787,16 +789,28 @@
         // 棒一
         const rollOneColumns: TableColumnsType = [];
         const rollOneSize = {};
-        // 棒二
-        const rollTwoSize = {};
-        // 棒三
-        const rollThreeSize = {};
-        // 上若
-        const rollShippSize = {};
-        // 冷装
-        const rollTwoColdSize = {};
-        const rollThreeColdSize = {};
-        const rollShippColdSize = {};
+        // 棒线热装和冷装
+        const rollOneHotAndColdSize = {
+          '1': {
+            roll_club_two: {},
+            roll_club_three: {},
+            roll_out_shipp: {},
+            roll_deputy_cross: {},
+            roll_old_areas: {},
+          },
+          '0': {
+            roll_club_two: {},
+            roll_club_three: {},
+            roll_out_shipp: {},
+            roll_deputy_cross: {},
+            roll_old_areas: {},
+          },
+        };
+        // 装车按热装和冷装分组
+        const rollChargeSizeType = {
+          '0': {},
+          '1': {},
+        };
         // 堆垛
         const stackingSize = {};
 
@@ -889,40 +903,9 @@
           };
         });
 
-        const hotChargeColumns: any = {
-          // 棒二字段
-          roll_club_two: {
-            title: '棒二',
-            dataIndex: 'roll_club_two',
-            key: 'roll_club_two',
-            // width: 100,
-            children: [],
-          },
-          // 棒三字段
-          roll_club_three: {
-            title: '棒三',
-            dataIndex: 'roll_club_three',
-            key: 'roll_club_three',
-            // width: 100,
-            children: [],
-          },
-          // 上若字段
-          roll_out_shipp: {
-            title: '上若',
-            dataIndex: 'roll_out_shipp',
-            key: 'roll_out_shipp',
-            // width: 100,
-            children: [],
-          },
-        };
-
+        const hotChargeColumns: any = getBandBaseData();
         // 热装字段
-        let columnsHotCharge: any = {
-          roll_club_two: [],
-          roll_club_three: [],
-          roll_out_shipp: [],
-        };
-
+        let columnsHotCharge: any = getHotColumns();
         const allSizeArr: any[] = [];
 
         const totalRows = getTotalRows();
@@ -1034,95 +1017,34 @@
               const dataKey = sizeFormat + k.hotChargeDestination + k.hotChargeBtype;
               sizeArr[dataKey] = k.totalCount;
               // 热送统计
-              // 棒二
-              if (k.hotChargeDestination === 'roll_club_two' && k.totalCount > 0) {
-                // 添加定尺
-                columnsHotCharge.roll_club_two.push(sizeFormat);
-
-                if (k.hotChargeBtype === '0') {
-                  if (!rollTwoSize[k.hotChargeLength]) {
-                    rollTwoSize[k.hotChargeLength] = {
-                      size: Number(k.hotChargeLength) / 1000 + 'm',
-                      amount: k.totalCount,
-                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
-                    };
-                  } else {
-                    rollTwoSize[k.hotChargeLength].amount += k.totalCount;
-                    rollTwoSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
-                  }
-                } else {
-                  if (!rollTwoColdSize[k.hotChargeLength]) {
-                    rollTwoColdSize[k.hotChargeLength] = {
-                      type: k.hotChargeBtype,
-                      size: Number(k.hotChargeLength) / 1000 + 'm',
-                      amount: k.totalCount,
-                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
-                    };
-                  } else {
-                    rollTwoColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollTwoColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
-                  }
-                }
-              }
-              // 棒三
-              if (k.hotChargeDestination === 'roll_club_three' && k.totalCount > 0) {
-                // 添加定尺
-                columnsHotCharge.roll_club_three.push(sizeFormat);
-
-                if (k.hotChargeBtype === '0') {
-                  if (!rollThreeSize[k.hotChargeLength]) {
-                    rollThreeSize[k.hotChargeLength] = {
-                      size: Number(k.hotChargeLength) / 1000 + 'm',
-                      amount: k.totalCount,
-                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
-                    };
-                  } else {
-                    rollThreeSize[k.hotChargeLength].amount += k.totalCount;
-                    rollThreeSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
-                  }
-                } else {
-                  if (!rollThreeColdSize[k.hotChargeLength]) {
-                    rollThreeColdSize[k.hotChargeLength] = {
-                      type: k.hotChargeBtype,
-                      size: Number(k.hotChargeLength) / 1000 + 'm',
-                      amount: k.totalCount,
-                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
-                    };
-                  } else {
-                    rollThreeColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollThreeColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
-                  }
+              if (k.totalCount > 0) {
+                if (!rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength]) {
+                  rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength] = {
+                    type: k.hotChargeBtype,
+                    size: Number(k.hotChargeLength) / 1000 + 'm',
+                    amount: 0,
+                    weight: 0,
+                  };
                 }
+
+                rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength].amount += k.totalCount;
+                rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength].weight += steelPlateFormula(
+                  k.hotChargeLength,
+                  k.totalCount
+                );
               }
-              // 上若
-              if (k.hotChargeDestination === 'roll_out_shipp' && k.totalCount > 0) {
-                // 添加定尺
-                columnsHotCharge.roll_out_shipp.push(sizeFormat);
-
-                if (k.hotChargeBtype === '0') {
-                  if (!rollShippSize[k.hotChargeLength]) {
-                    rollShippSize[k.hotChargeLength] = {
-                      size: Number(k.hotChargeLength) / 1000 + 'm',
-                      amount: k.totalCount,
-                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
-                    };
-                  } else {
-                    rollShippSize[k.hotChargeLength].amount += k.totalCount;
-                    rollShippSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
-                  }
-                } else {
-                  if (!rollShippColdSize[k.hotChargeLength]) {
-                    rollShippColdSize[k.hotChargeLength] = {
-                      type: k.hotChargeBtype,
-                      size: Number(k.hotChargeLength) / 1000 + 'm',
-                      amount: k.totalCount,
-                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
-                    };
-                  } else {
-                    rollShippColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollShippColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
-                  }
-                }
+              columnsHotCharge[k.hotChargeDestination].push(sizeFormat);
+
+              // 热装按类型分组,分热装和冷装
+              if (!rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength]) {
+                rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength] = {
+                  size: sizeFormat + 'm',
+                  amount: k.totalCount,
+                  weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
+                };
+              } else {
+                rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].amount += k.totalCount;
+                rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
               }
             });
           }
@@ -1367,36 +1289,48 @@
           hotSendList.value[sendKey] = Object.values(rollOneSize);
           hotSendList.value[sendKey].forEach((ele) => (allWeight += ele.weight));
         }
-        if (Object.values(rollTwoSize).length) {
-          hotSendList.value['二'] = Object.values(rollTwoSize);
+        if (Object.values(rollOneHotAndColdSize['0']['roll_club_two']).length) {
+          hotSendList.value['二'] = Object.values(rollOneHotAndColdSize['0']['roll_club_two']);
           hotSendList.value['二'].forEach((ele) => (allWeight += ele.weight));
         }
-        if (Object.values(rollThreeSize).length) {
-          hotSendList.value['三'] = Object.values(rollThreeSize);
+        if (Object.values(rollOneHotAndColdSize['0'].roll_club_three).length) {
+          hotSendList.value['三'] = Object.values(rollOneHotAndColdSize['0'].roll_club_three);
           hotSendList.value['三'].forEach((ele) => (allWeight += ele.weight));
         }
-        if (Object.values(rollShippSize).length) {
-          hotSendList.value['上'] = Object.values(rollShippSize);
+        if (Object.values(rollOneHotAndColdSize['0'].roll_out_shipp).length) {
+          hotSendList.value['上'] = Object.values(rollOneHotAndColdSize['0'].roll_out_shipp);
           hotSendList.value['上'].forEach((ele) => (allWeight += ele.weight));
         }
-        if (Object.values(stackingSize)) {
-          stackingList.value = Object.values(stackingSize);
-          stackingList.value.forEach((ele) => (allWeight += ele.weight));
+        if (Object.values(rollOneHotAndColdSize['0'].roll_deputy_cross).length) {
+          hotSendList.value['付'] = Object.values(rollOneHotAndColdSize['0'].roll_deputy_cross);
+          hotSendList.value['付'].forEach((ele) => (allWeight += ele.weight));
+        }
+        if (Object.values(rollOneHotAndColdSize['0'].roll_old_areas).length) {
+          hotSendList.value['老'] = Object.values(rollOneHotAndColdSize['0'].roll_old_areas);
+          hotSendList.value['老'].forEach((ele) => (allWeight += ele.weight));
         }
 
         // 冷装统计
-        if (Object.values(rollTwoColdSize).length) {
-          coldSendList.value['二'] = Object.values(rollTwoColdSize);
+        if (Object.values(rollOneHotAndColdSize['1'].roll_club_two).length) {
+          coldSendList.value['二'] = Object.values(rollOneHotAndColdSize['1'].roll_club_two);
           coldSendList.value['二'].forEach((ele) => (allWeight += ele.weight));
         }
-        if (Object.values(rollThreeColdSize).length) {
-          coldSendList.value['三'] = Object.values(rollThreeColdSize);
+        if (Object.values(rollOneHotAndColdSize['1'].roll_club_three).length) {
+          coldSendList.value['三'] = Object.values(rollOneHotAndColdSize['1'].roll_club_three);
           coldSendList.value['三'].forEach((ele) => (allWeight += ele.weight));
         }
-        if (Object.values(rollShippColdSize).length) {
-          coldSendList.value['上'] = Object.values(rollShippColdSize);
+        if (Object.values(rollOneHotAndColdSize['1'].roll_out_shipp).length) {
+          coldSendList.value['上'] = Object.values(rollOneHotAndColdSize['1'].roll_out_shipp);
           coldSendList.value['上'].forEach((ele) => (allWeight += ele.weight));
         }
+        if (Object.values(rollOneHotAndColdSize['1'].roll_deputy_cross).length) {
+          coldSendList.value['付'] = Object.values(rollOneHotAndColdSize['1'].roll_deputy_cross);
+          coldSendList.value['付'].forEach((ele) => (allWeight += ele.weight));
+        }
+        if (Object.values(rollOneHotAndColdSize['1'].roll_old_areas).length) {
+          coldSendList.value['老'] = Object.values(rollOneHotAndColdSize['1'].roll_old_areas);
+          coldSendList.value['老'].forEach((ele) => (allWeight += ele.weight));
+        }
 
         totalWeight.value = `合计:${allWeight.toFixed(3)} t`;
         // 查看所有的定尺

+ 9 - 0
src/views/billet/operator/operator.data.ts

@@ -336,6 +336,14 @@ export const getBandBaseData = () => {
       // width: 100,
       children: [],
     },
+    // 付跨字段
+    roll_old_areas: {
+      title: '老区',
+      dataIndex: 'roll_old_areas',
+      key: 'roll_old_areas',
+      // width: 100,
+      children: [],
+    },
   };
 };
 
@@ -346,5 +354,6 @@ export const getHotColumns = () => {
     roll_club_three: [],
     roll_out_shipp: [],
     roll_deputy_cross: [],
+    roll_old_areas: [],
   };
 };