Browse Source

修改bug

zhangafei 1 week ago
parent
commit
6e17ede104

+ 4 - 4
.env.development

@@ -5,15 +5,15 @@ VITE_USE_MOCK = false
 VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
-# VITE_PROXY = [["/jeecgboot","http://192.168.1.53:9999"],["/upload","http://localhost:3300/upload"]]
-VITE_PROXY = [["/jeecgboot","http://192.168.1.6:9999"],["/upload","http://localhost:3300/upload"]]
+VITE_PROXY = [["/jeecgboot","http://192.168.1.53:9999"],["/upload","http://localhost:3300/upload"]]
+# VITE_PROXY = [["/jeecgboot","http://192.168.1.6:9999"],["/upload","http://localhost:3300/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://192.168.0.119:9999"],["/upload","http://localhost:3300/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://123.57.213.14:9898"],["/upload","http://localhost:3300/upload"]]
 
 #后台接口全路径地址(必填)
 # VITE_GLOB_DOMAIN_URL=http://localhost:9999
-VITE_GLOB_DOMAIN_URL=http://192.168.1.6:9999
-# VITE_GLOB_DOMAIN_URL=http://192.168.1.53:9999
+# VITE_GLOB_DOMAIN_URL=http://192.168.1.6:9999
+VITE_GLOB_DOMAIN_URL=http://192.168.1.53:9999
 # VITE_GLOB_DOMAIN_URL=http://192.168.0.119:9999
 # VITE_GLOB_DOMAIN_URL=http://123.57.213.14:9898
 

+ 15 - 5
src/views/billet/Dashboard/rollingThree.vue

@@ -249,6 +249,16 @@
   const threeList = ref<any[]>([]);
   const machineNum = getMachineNum(true) || '3';
 
+  // 判断是不是5 6 账号
+  const getCcmNo = computed(() => {
+    const userInfo = userStore.userInfo;
+    let ccmNo = '5';
+    if (userInfo && ['5', '6'].includes(userInfo.username)) {
+      ccmNo = userInfo.username == '5' ? '5' : '6';
+    }
+    return ccmNo;
+  });
+
   const getZjOptions = computed(() => {
     // { label: '5#机', value: '5' },
     // { label: '6#机', value: '6' },
@@ -430,7 +440,7 @@
       const values = getFieldsValue();
       let params: any = Object.assign({}, values, { destination: destinationTxt[machineNum] });
       if (!values.ccmNo) {
-        values.ccmNo = '5';
+        values.ccmNo = getCcmNo.value;
       }
       loading.value = true;
 
@@ -583,7 +593,7 @@
    **/
   const getStatistics = async () => {
     const values = getFieldsValue();
-    const ccmNo = values.ccmNo || '5';
+    const ccmNo = values.ccmNo || getCcmNo.value;
     let dtlItems: any = cloneDeep(defaultDtl);
     try {
       let params: any = Object.assign({}, values, { destination: destinationTxt[machineNum], queryType: machineNum, ccmNo });
@@ -659,7 +669,7 @@
       const createTime_begin = date ? date.subtract(1, 'day').format('YYYY-MM-DD 23:55:00') : undefined;
       const createTime_end = date ? date.add(1, 'day').format('YYYY-MM-DD 00:05:00') : undefined;
       const res = await list({
-        ccmNo: formVals.ccmNo || '5',
+        ccmNo: formVals.ccmNo || getCcmNo.value,
         pageNo: 1,
         pageSize: pageSize,
         column: 'createTime',
@@ -693,12 +703,12 @@
   // 导出
   const onExportXls = () => {
     const values = getFieldsValue();
-    let params = Object.assign({}, values, { ccmNo: values.ccmNo || '5' });
+    let params = Object.assign({}, values, { ccmNo: values.ccmNo || getCcmNo.value });
     if (currentShift.value >= 0) {
       params = {
         changeShiftId: shiftPerformanceColumns.value[currentShift.value].id,
         queryDate: values.queryDate,
-        ccmNo: values.ccmNo || '5',
+        ccmNo: values.ccmNo || getCcmNo.value,
       };
     }
 

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

@@ -79,6 +79,7 @@ export const configAll5 = [
     sysOrgCode: null,
     castMachine: '5',
     typeName: '棒一',
+    aliasName: '棒一',
     belongType: 0,
     isTrucking: 0,
     remark: null,
@@ -93,6 +94,7 @@ export const configAll5 = [
     sysOrgCode: null,
     castMachine: '5',
     typeName: '501堆垛',
+    aliasName: '501',
     belongType: 1,
     isTrucking: 0,
     remark: null,
@@ -107,6 +109,7 @@ export const configAll5 = [
     sysOrgCode: null,
     castMachine: '5',
     typeName: '棒二',
+    aliasName: '棒二',
     belongType: 0,
     isTrucking: 1,
     remark: null,
@@ -121,6 +124,7 @@ export const configAll5 = [
     sysOrgCode: null,
     castMachine: '5',
     typeName: '棒三',
+    aliasName: '棒三',
     belongType: 0,
     isTrucking: 1,
     remark: null,
@@ -135,6 +139,7 @@ export const configAll5 = [
     sysOrgCode: null,
     castMachine: '5',
     typeName: '上若',
+    aliasName: '上若',
     belongType: 0,
     isTrucking: 1,
     remark: null,
@@ -149,6 +154,7 @@ export const configAll5 = [
     sysOrgCode: null,
     castMachine: '5',
     typeName: '付跨',
+    aliasName: '付跨',
     belongType: 0,
     isTrucking: 1,
     remark: null,
@@ -166,6 +172,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '棒二',
+    aliasName: '棒二',
     belongType: 0,
     isTrucking: 1,
     remark: null,
@@ -180,6 +187,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '棒三',
+    aliasName: '棒三',
     belongType: 0,
     isTrucking: 1,
     remark: null,
@@ -194,6 +202,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '高线',
+    aliasName: '高线',
     belongType: 0,
     isTrucking: 0,
     remark: null,
@@ -208,6 +217,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '上若',
+    aliasName: '上若',
     belongType: 0,
     isTrucking: 1,
     remark: null,
@@ -222,6 +232,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '601堆垛',
+    aliasName: '601',
     belongType: 1,
     isTrucking: 0,
     remark: null,
@@ -236,6 +247,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '602堆垛',
+    aliasName: '602',
     belongType: 1,
     isTrucking: 0,
     remark: null,
@@ -250,6 +262,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '604堆垛',
+    aliasName: '604',
     belongType: 1,
     isTrucking: 0,
     remark: null,
@@ -264,6 +277,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '步进冷床',
+    aliasName: '步进冷床',
     belongType: 1,
     isTrucking: 0,
     remark: null,
@@ -278,6 +292,7 @@ export const configAll6 = [
     sysOrgCode: null,
     castMachine: '6',
     typeName: '付跨',
+    aliasName: '付跨',
     belongType: 0,
     isTrucking: 1,
     remark: null,

+ 1 - 1
src/views/billet/operator/components/car.vue

@@ -674,7 +674,7 @@
 
     .selected-divider-row {
       width: 158px;
-      height: 120px;
+      min-height: 120px;
       background: #08184d;
       border-radius: 2px;
       border: 1px solid #001966;

+ 4 - 4
src/views/billet/operator/components/headTop.vue

@@ -19,12 +19,12 @@
     <a-col :span="2" class="flex items-center justify-center">
       <a-statistic title="总重量/t" :value="curAllWeight ? curAllWeight.toFixed(3) : 0" />
     </a-col>
-    <a-col :span="3" class="flex flex-col" v-for="item of typeList">
+    <a-col :span="3" class="flex flex-col" v-for="item of typeList" :key="item.title">
       <div class="type-item">
         <span class="type-title" :style="{ color: item.titleColor }">{{ item.title }}:</span> {{ item.amount }} 支 /
         {{ item.weight ? item.weight.toFixed(3) : 0 }} t
       </div>
-      <div class="type-item" v-for="ele of item.dtlList">
+      <div class="type-item" v-for="ele of item.dtlList" :key="`${ele.size}-${ele.nums}`">
         <div class="type-item-dtl">
           <span class="type-title">{{ ele.size }}:</span> {{ ele.nums }} 支 / {{ ele.weight ? ele.weight.toFixed(3) : 0 }} t
         </div>
@@ -121,7 +121,7 @@
 
   // typeList
   const typeList = ref<any>([
-    { title: '棒一', titleColor: '#f50', amount: 0, weight: 0, dtlList: [] },
+    { title: props.ccmNo == '5' ? '棒一' : '高线', titleColor: '#f50', amount: 0, weight: 0, dtlList: [] },
     { title: '冷装', titleColor: '#108ee9', amount: 0, weight: 0, dtlList: [] },
     { title: '热装', titleColor: '#f50', amount: 0, weight: 0, dtlList: [] },
     { title: '堆垛', titleColor: '#b8ceff', amount: 0, weight: 0, dtlList: [] },
@@ -354,7 +354,7 @@
       const { dtlList, allNums, allWeight } = data;
       curAllNums.value = allNums;
       curAllWeight.value = allWeight;
-      typeList.value = dtlList;
+      typeList.value = { ...typeList.value, ...dtlList };
     },
   });
 </script>

+ 35 - 30
src/views/billet/operator/components/orgData.vue

@@ -169,6 +169,7 @@
   import { initDictOptions } from '/@/utils/dict';
   import { useTimeoutFn } from '/@/hooks/core/useTimeout';
   import { getMachineConfig, MachineConfigType } from '../../hotDelivery/common.data';
+  import { steelPlateFormula } from '../operator.data';
 
   const emits = defineEmits(['statistics']);
 
@@ -487,7 +488,7 @@
           return {
             title: () => {
               return h('div', { style: { position: 'relative' } }, [
-                h('span', {}, stack.typeName),
+                h('span', {}, stack.aliasName),
                 h(
                   'div',
                   {
@@ -689,11 +690,11 @@
                   rollOneSize[key] = {
                     size: Number(column) / 1000 + 'm',
                     amount: lengthGroupCount[key],
-                    weight: lengthGroupCount[key] * (Number(column) / 1000) * 0.2265,
+                    weight: steelPlateFormula(column, lengthGroupCount[key]),
                   };
                 } else {
                   rollOneSize[key].amount += lengthGroupCount[key];
-                  rollOneSize[key].weight += lengthGroupCount[key] * (Number(column) / 1000) * 0.2265;
+                  rollOneSize[key].weight += steelPlateFormula(column, lengthGroupCount[key]);
                 }
               });
             }
@@ -720,11 +721,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollTwoSize[k.hotChargeLength].amount += k.totalCount;
-                    rollTwoSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollTwoSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 } else {
                   if (!rollTwoColdSize[k.hotChargeLength]) {
@@ -732,11 +733,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollTwoColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollTwoColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollTwoColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 }
               }
@@ -751,11 +752,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollThreeSize[k.hotChargeLength].amount += k.totalCount;
-                    rollThreeSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollThreeSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 } else {
                   if (!rollThreeColdSize[k.hotChargeLength]) {
@@ -763,11 +764,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollThreeColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollThreeColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollThreeColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 }
               }
@@ -782,11 +783,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollShippSize[k.hotChargeLength].amount += k.totalCount;
-                    rollShippSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollShippSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 } else {
                   if (!rollShippColdSize[k.hotChargeLength]) {
@@ -794,11 +795,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollShippColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollShippColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollShippColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 }
               }
@@ -808,11 +809,11 @@
                 rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength] = {
                   size: sizeFormat + 'm',
                   amount: k.totalCount,
-                  weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                  weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                 };
               } else {
                 rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].amount += k.totalCount;
-                rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
               }
             });
           }
@@ -857,7 +858,11 @@
                         },
                         ''
                       ),
-                      h('div', { class: 'noprint', onClick: () => deleteStackColumn(sSize) }, h(Icon, { icon: 'ant-design:delete-outlined' }, '')),
+                      h(
+                        'div',
+                        { class: 'noprint', onClick: () => deleteStackColumn(sSize, v.stackingBhtcId) },
+                        h(Icon, { icon: 'ant-design:delete-outlined' }, '')
+                      ),
                     ]);
                   },
                   dataIndex: stackKey,
@@ -889,11 +894,11 @@
                 stackingSize[sSize] = {
                   size: Number(sSize) / 1000 + 'm',
                   amount: v.stackingCount,
-                  weight: v.stackingCount * (Number(sSize) / 1000) * 0.2265,
+                  weight: steelPlateFormula(sSize, v.stackingCount),
                 };
               } else {
                 stackingSize[sSize].amount += v.stackingCount;
-                stackingSize[sSize].weight += v.stackingCount * (Number(sSize) / 1000) * 0.2265;
+                stackingSize[sSize].weight += steelPlateFormula(sSize, v.stackingCount);
               }
             });
           }
@@ -1233,27 +1238,27 @@
         createMessage.error('补数量必须是4的倍数');
         return;
       }
-      stackInfo = val + '-' + size + '-10';
+      stackInfo = val + '-' + size + '-' + stackingId;
     } else {
-      stackInfo = null;
+      stackInfo = '0-' + size + '-' + stackingId;
     }
 
     if (lengthGroupCount === -1) {
       obj.push({
         stackingCount: val,
         stackingLength: size,
-        stackingWeight: val * (Number(size) / 1000) * 0.2265,
+        stackingWeight: steelPlateFormula(size, val),
         stackingBhtcId: stackingId,
       });
     } else {
       if (obj[lengthGroupCount].stackingCount === val) return;
       obj[lengthGroupCount].stackingCount = val;
-      obj[lengthGroupCount].stackingWeight = val * (Number(size) / 1000) * 0.2265;
+      obj[lengthGroupCount].stackingWeight = steelPlateFormula(size, val);
     }
 
     const params = {
       ...orgData,
-      stackLength: JSON.stringify(obj),
+      stackLength: JSON.stringify(obj.filter((v) => v.stackingCount > 0)),
       stackInfo,
     };
     const amount = handleTotalSum(params);
@@ -1414,7 +1419,7 @@
   };
 
   // 删除堆垛定尺
-  const deleteStackColumn = async (size) => {
+  const deleteStackColumn = async (size, stackingId) => {
     try {
       changeLoading(true);
       const fetchArr: any[] = [];
@@ -1423,14 +1428,14 @@
           const { stackLength } = item.orgData;
           if (stackLength) {
             const obj = JSON.parse(stackLength);
-            const hasStackItem = obj.findIndex((n) => n.stackingLength == size);
+            const hasStackItem = obj.findIndex((n) => n.stackingLength == size && n.stackingBhtcId == stackingId);
             if (hasStackItem > -1) {
-              const lengthGroupCount = obj.filter((m) => m.stackingLength != size);
-
+              const lengthGroupCount = obj.filter((m) => m.stackingLength != size || m.stackingBhtcId != stackingId);
               // 请求push了
               const params = {
                 ...item.orgData,
                 stackLength: JSON.stringify(lengthGroupCount),
+                stackInfo: '0-' + size + '-' + stackingId,
               };
 
               const amount = handleTotalSum(params);
@@ -1478,7 +1483,7 @@
         .map((k) => {
           return {
             ...k,
-            totalWeight: (k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265).toFixed(4),
+            totalWeight: steelPlateFormula(k.hotChargeLength, k.totalCount).toFixed(4),
           };
         });
 

+ 33 - 27
src/views/billet/operator/components/printOriginalRecords.vue

@@ -257,6 +257,7 @@
   import printBilletSampleCard from './printBilletSampleCard.vue';
   import { useModal } from '/@/components/Modal';
   import { getMachineConfig, MachineConfigType } from '../../hotDelivery/common.data';
+  import { steelPlateFormula } from '../operator.data';
 
   // 注册打印送样卡modal
   const [registerPrintModal, { openModal }] = useModal();
@@ -621,7 +622,7 @@
           return {
             title: () => {
               return h('div', { style: { position: 'relative' } }, [
-                h('span', {}, stack.typeName),
+                h('span', {}, stack.aliasName),
                 h(
                   'div',
                   {
@@ -820,11 +821,11 @@
                   rollOneSize[key] = {
                     size: Number(column) / 1000 + 'm',
                     amount: lengthGroupCount[key],
-                    weight: lengthGroupCount[key] * (Number(column) / 1000) * 0.2265,
+                    weight: steelPlateFormula(column, lengthGroupCount[key]),
                   };
                 } else {
                   rollOneSize[key].amount += lengthGroupCount[key];
-                  rollOneSize[key].weight += lengthGroupCount[key] * (Number(column) / 1000) * 0.2265;
+                  rollOneSize[key].weight += steelPlateFormula(column, lengthGroupCount[key]);
                 }
               });
             }
@@ -850,11 +851,11 @@
                     rollTwoSize[k.hotChargeLength] = {
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollTwoSize[k.hotChargeLength].amount += k.totalCount;
-                    rollTwoSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollTwoSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 } else {
                   if (!rollTwoColdSize[k.hotChargeLength]) {
@@ -862,11 +863,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollTwoColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollTwoColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollTwoColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 }
               }
@@ -880,11 +881,11 @@
                     rollThreeSize[k.hotChargeLength] = {
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollThreeSize[k.hotChargeLength].amount += k.totalCount;
-                    rollThreeSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollThreeSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 } else {
                   if (!rollThreeColdSize[k.hotChargeLength]) {
@@ -892,11 +893,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollThreeColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollThreeColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollThreeColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 }
               }
@@ -910,11 +911,11 @@
                     rollShippSize[k.hotChargeLength] = {
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollShippSize[k.hotChargeLength].amount += k.totalCount;
-                    rollShippSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollShippSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 } else {
                   if (!rollShippColdSize[k.hotChargeLength]) {
@@ -922,11 +923,11 @@
                       type: k.hotChargeBtype,
                       size: Number(k.hotChargeLength) / 1000 + 'm',
                       amount: k.totalCount,
-                      weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
+                      weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
                     };
                   } else {
                     rollShippColdSize[k.hotChargeLength].amount += k.totalCount;
-                    rollShippColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
+                    rollShippColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
                   }
                 }
               }
@@ -973,7 +974,11 @@
                         },
                         ''
                       ),
-                      h('div', { class: 'noprint', onClick: () => deleteStackColumn(sSize) }, h(Icon, { icon: 'ant-design:delete-outlined' }, '')),
+                      h(
+                        'div',
+                        { class: 'noprint', onClick: () => deleteStackColumn(sSize, v.stackingBhtcId) },
+                        h(Icon, { icon: 'ant-design:delete-outlined' }, '')
+                      ),
                     ]);
                   },
                   dataIndex: stackKey,
@@ -1005,11 +1010,11 @@
                 stackingSize[sSize] = {
                   size: Number(sSize) / 1000 + 'm',
                   amount: v.stackingCount,
-                  weight: v.stackingCount * (Number(sSize) / 1000) * 0.2265,
+                  weight: steelPlateFormula(sSize, v.stackingCount),
                 };
               } else {
                 stackingSize[sSize].amount += v.stackingCount;
-                stackingSize[sSize].weight += v.stackingCount * (Number(sSize) / 1000) * 0.2265;
+                stackingSize[sSize].weight += steelPlateFormula(sSize, v.stackingCount);
               }
             });
           }
@@ -1349,27 +1354,27 @@
         createMessage.error('补数量必须是4的倍数');
         return;
       }
-      stackInfo = val + '-' + size + '-10';
+      stackInfo = val + '-' + size + '-' + stackingId;
     } else {
-      stackInfo = null;
+      stackInfo = '0-' + size + '-' + stackingId;
     }
 
     if (lengthGroupCount === -1) {
       obj.push({
         stackingCount: val,
         stackingLength: size,
-        stackingWeight: val * (Number(size) / 1000) * 0.2265,
+        stackingWeight: steelPlateFormula(size, val),
         stackingBhtcId: stackingId,
       });
     } else {
       if (obj[lengthGroupCount].stackingCount === val) return;
       obj[lengthGroupCount].stackingCount = val;
-      obj[lengthGroupCount].stackingWeight = val * (Number(size) / 1000) * 0.2265;
+      obj[lengthGroupCount].stackingWeight = steelPlateFormula(size, val);
     }
 
     const params = {
       ...orgData,
-      stackLength: JSON.stringify(obj),
+      stackLength: JSON.stringify(obj.filter((v) => v.stackingCount > 0)),
       stackInfo,
     };
 
@@ -1530,7 +1535,7 @@
   };
 
   // 删除堆垛定尺
-  const deleteStackColumn = async (size) => {
+  const deleteStackColumn = async (size, stackingId) => {
     try {
       changeLoading(true);
       const fetchArr: any[] = [];
@@ -1539,14 +1544,15 @@
           const { stackLength } = item.orgData;
           if (stackLength) {
             const obj = JSON.parse(stackLength);
-            const hasStackItem = obj.findIndex((n) => n.stackingLength == size);
+            const hasStackItem = obj.findIndex((n) => n.stackingLength == size && n.stackingBhtcId == stackingId);
             if (hasStackItem > -1) {
-              const lengthGroupCount = obj.filter((m) => m.stackingLength != size);
+              const lengthGroupCount = obj.filter((m) => m.stackingLength != size || m.stackingBhtcId != stackingId);
 
               // 请求push了
               const params = {
                 ...item.orgData,
                 stackLength: JSON.stringify(lengthGroupCount),
+                stackInfo: '0-' + size + '-' + stackingId,
               };
 
               const amount = handleTotalSum(params);
@@ -1594,7 +1600,7 @@
         .map((k) => {
           return {
             ...k,
-            totalWeight: (k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265).toFixed(4),
+            totalWeight: steelPlateFormula(k.hotChargeLength, k.totalCount).toFixed(4),
           };
         });
 

+ 1 - 1
src/views/billet/operator/index.vue

@@ -184,7 +184,7 @@
   };
 
   let defaultDtlList: any = [
-    { title: '棒一', titleColor: '#f50', amount: 0, weight: 0, dtlList: [] },
+    { title: ccmNo == '5' ? '棒一' : '高线', titleColor: '#f50', amount: 0, weight: 0, dtlList: [] },
     { title: '冷装', titleColor: '#108ee9', amount: 0, weight: 0, dtlList: [] },
     { title: '热装', titleColor: '#f50', amount: 0, weight: 0, dtlList: [] },
     { title: '堆垛', titleColor: '#b8ceff', amount: 0, weight: 0, dtlList: [] },

+ 7 - 4
src/views/billet/operator/operator.data.ts

@@ -274,10 +274,7 @@ export const getColumns = ({ clickCb, openCompensateModal, heatNoClick }): Basic
               //   h('span', {}, [h('span', {}, obj.totalCount), h('span', { style: { color: '#999' } }, '/' + (obj.totalCount - quXiaongGen))]),
               //   obj.totalWeight
               // )
-              renderNum(
-                h('span', {}, [h('span', {}, obj.totalCount)]),
-                obj.totalWeight
-              )
+              renderNum(h('span', {}, [h('span', {}, obj.totalCount)]), obj.totalWeight)
             );
           }
         } catch (error) {}
@@ -297,3 +294,9 @@ export const getColumns = ({ clickCb, openCompensateModal, heatNoClick }): Basic
     },
   ];
 };
+
+// 钢坯计算公式
+export const steelPlateFormula = (size, nums, diameter = 0.2265) => {
+  const weight = parseFloat(((Number(size) / 1000) * diameter).toFixed(3));
+  return nums * weight;
+};

+ 18 - 9
src/views/billet/quality/index.vue

@@ -131,17 +131,26 @@
             </a-descriptions-item>
           </a-descriptions>
           <a-descriptions size="small" bordered class="produce" :labelStyle="labelStyle">
-            <a-descriptions-item label="本班冶炼:"> {{ statisticsInfo.classHeatNum }} 炉</a-descriptions-item>
-            <a-descriptions-item label="止上班日累计:">{{ statisticsInfo.dayStartHeatCount }} 炉</a-descriptions-item>
-            <a-descriptions-item label="止本班日累计:"> {{ statisticsInfo.dayEndHeatCount }} 炉</a-descriptions-item>
-
-            <a-descriptions-item label="本班冶炼:"> {{ statisticsInfo.classTotalWeight }} 吨</a-descriptions-item>
-            <a-descriptions-item label="止上班日累计:">{{ statisticsInfo.dayStartWeight }} 吨</a-descriptions-item>
-            <a-descriptions-item label="止本班日累计:">{{ statisticsInfo.dayEndWeight }} 吨</a-descriptions-item>
+            <a-descriptions-item label="本班冶炼:">
+              {{ statisticsInfo.classHeatNum }} 炉 / {{ statisticsInfo.classTotalWeight }} 吨
+            </a-descriptions-item>
+            <a-descriptions-item label="止上班日累计:">
+              {{ statisticsInfo.dayStartHeatCount }} 炉 / {{ statisticsInfo.dayStartWeight }} 吨
+            </a-descriptions-item>
+            <a-descriptions-item label="止本班日累计:">
+              {{ statisticsInfo.dayEndHeatCount }} 炉 / {{ statisticsInfo.dayEndWeight }} 吨
+            </a-descriptions-item>
+            <a-descriptions-item> </a-descriptions-item>
+            <a-descriptions-item label="止上班月累计:">
+              {{ statisticsInfo.dayStartHeatCount }} 炉 / {{ statisticsInfo.dayStartWeight }} 吨
+            </a-descriptions-item>
+            <a-descriptions-item label="止本班月累计:">
+              {{ statisticsInfo.dayEndHeatCount }} 炉 / {{ statisticsInfo.dayEndWeight }} 吨
+            </a-descriptions-item>
 
-            <a-descriptions-item label="日冶炼:">{{ statisticsInfo.dayHeatCount }} 炉</a-descriptions-item>
-            <a-descriptions-item label="日产:">{{ statisticsInfo.dayEndWeight }} 吨</a-descriptions-item>
             <a-descriptions-item> </a-descriptions-item>
+            <a-descriptions-item label="日产:">{{ statisticsInfo.dayHeatCount }} 炉 / {{ statisticsInfo.dayEndWeight }} 吨</a-descriptions-item>
+            <a-descriptions-item label="月产:">{{ statisticsInfo.monthEndCount }} 炉 / {{ statisticsInfo.monthEndWeight }} 吨</a-descriptions-item>
           </a-descriptions>
         </div>
       </template>

+ 1 - 1
src/views/billet/shippingBill/components/printModal.vue

@@ -200,7 +200,7 @@
       default: listShippingBill,
     },
   });
-  const emits = defineEmits(['success']);
+  const emits = defineEmits(['success', 'register']);
 
   const info = ref<any>({});
   const headDtl = ref<any[]>([]);