zhangafei 1 miesiąc temu
rodzic
commit
f5f1efaf0a

+ 2 - 2
.env.development

@@ -6,13 +6,13 @@ VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
 # VITE_PROXY = [["/jeecgboot","http://192.168.0.105: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.32:9999"],["/upload","http://localhost:3300/upload"]]
 
 #后台接口全路径地址(必填)
 # VITE_GLOB_DOMAIN_URL=http://localhost:9999
 # VITE_GLOB_DOMAIN_URL=http://192.168.0.105:8080/jeecg-boot
 # VITE_GLOB_DOMAIN_URL=http://192.168.6.24:8080/jeecg-boot
-VITE_GLOB_DOMAIN_URL=http://192.168.1.6:9999
+VITE_GLOB_DOMAIN_URL=http://192.168.1.32:9999
 
 
 

+ 8 - 4
src/views/billet/Dashboard/components/WorkbenchHeader.vue

@@ -25,14 +25,17 @@
         <a-col :span="12">
           <a-row>
             <a-col :span="3" class="casting-title">当班统计</a-col>
-            <a-col :span="7">
+            <a-col :span="5">
               <a-statistic title="总支数" :value="info.billetHotsendChangeShift.shiftSum" @click="goToDetial('/billetBasicInfo')" />
             </a-col>
-            <a-col :span="7">
+            <a-col :span="6">
               <a-statistic title="总重量/t" :value="info.billetHotsendChangeShift.shiftProduct" @click="goToDetial('/heatList')" />
             </a-col>
-            <a-col :span="7">
-              <a-statistic title="判废支数" :value="info.billetHotsendChangeShift.wasteAmount" />
+            <a-col :span="5">
+              <a-statistic title="判废支数" :value="info.billetHotsendChangeShift.wasteAmount || 0" />
+            </a-col>
+            <a-col :span="5">
+              <a-statistic title="判废重量/t" :value="info.billetHotsendChangeShift.wasteBlankOutput || 0" />
             </a-col>
           </a-row>
         </a-col>
@@ -71,6 +74,7 @@
       wasteAmount: 0,
       shiftProduct: 0,
       shiftSum: 0,
+      wasteBlankOutput: 0,
     },
     currentCastingFurnaceAmount: null,
     currentCastingFurnace: null,

+ 22 - 8
src/views/billet/ShiftPerformance/index.vue

@@ -28,7 +28,11 @@
                     <a-card v-for="item in statisticColums" :bodyStyle="{ padding: '0 10px' }">
                       <a-statistic
                         :title="item.title"
-                        :value="shiftPerformanceColumns[currentShift] ? shiftPerformanceColumns[currentShift][item.dataIndex] : 0"
+                        :value="
+                          shiftPerformanceColumns[currentShift] && shiftPerformanceColumns[currentShift][item.dataIndex]
+                            ? shiftPerformanceColumns[currentShift][item.dataIndex]
+                            : 0
+                        "
                       />
                     </a-card>
                   </div>
@@ -241,6 +245,14 @@
       title: '起垛重量',
       dataIndex: 'shiftStackWeight',
     },
+    {
+      title: '判废支数',
+      dataIndex: 'wasteAmount',
+    },
+    {
+      title: '判废重量',
+      dataIndex: 'wasteBlankOutput',
+    },
   ];
 
   const hotSendCols = [
@@ -373,13 +385,15 @@
   const getShiftInfo = async (pageSize: number = 3, date?: Dayjs) => {
     try {
       loading.value = true;
+      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: machine,
         pageNo: 1,
         pageSize: pageSize,
         column: 'createTime',
-        order: 'desc',
-        ...(date ? { queryDate: date.format('YYYY-MM-DD') } : {}),
+        order: 'asc',
+        ...(date ? { createTime_begin, createTime_end } : {}),
       });
       const { records } = res;
 
@@ -401,12 +415,12 @@
 
         return item;
       });
-      if (pageSize === 4) {
-        arr.splice(0, 1);
-      }
+      // if (pageSize === 4) {
+      //   arr.splice(0, 1);
+      // }
 
       shiftPerformanceColumns.value = arr
-        .filter((item) => item.createTime) // 过滤掉 createTime 为空的数据
+        .filter((item) => item.createTime && item.changeShiftTime) // 过滤掉 createTime 为空的数据
         .sort((a, b) => {
           const dateA = new Date(a.createTime).getTime(); // 转换为时间戳
           const dateB = new Date(b.createTime).getTime(); // 转换为时间戳
@@ -428,7 +442,7 @@
   const [registerTable, { getColumns, setColumns }] = tableContext;
 
   onMounted(() => {
-    getShiftInfo(4);
+    getShiftInfo(4, dayjs());
   });
 </script>
 <style lang="less" scoped>

+ 21 - 0
src/views/billet/billetBasicInfo/BilletBasicInfo.api.ts

@@ -15,6 +15,8 @@ enum Api {
   listDetail = '/billetHotsendBase/billetHotsendBase/queryBilletInfoByBilletNo',
   // 钢坯信息补偿
   compensate = '/actualControl/billetActual/add',
+  // 批量判废
+  abandonsBatch = '/billetHotsend/billetHotsendAbandons/abandonsBatch',
 }
 /**
  * 导出api
@@ -57,6 +59,25 @@ export const batchDelete = (params, handleSuccess) => {
     },
   });
 };
+
+/**
+ * 批量判废
+ * @param params
+ */
+export const batchWastes = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认判废',
+    content: '是否判废选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.delete({ url: Api.abandonsBatch, data: params }, { joinParamsToUrl: true }).then(() => {
+        handleSuccess();
+      });
+    },
+  });
+};
 /**
  * 保存或者更新
  * @param params

+ 10 - 10
src/views/billet/billetBasicInfo/BilletBasicInfo.data.ts

@@ -63,6 +63,16 @@ export const columns: BasicColumn[] = [
     align: 'center',
     dataIndex: 'assemblyNumber',
   },
+  {
+    title: '堆垛或棒线',
+    align: 'center',
+    dataIndex: 'bhtcId',
+  },
+  {
+    title: '定尺',
+    align: 'center',
+    dataIndex: 'length',
+  },
   {
     title: '流号',
     align: 'center',
@@ -73,11 +83,6 @@ export const columns: BasicColumn[] = [
     align: 'center',
     dataIndex: 'ladleNo',
   },
-  {
-    title: '定尺',
-    align: 'center',
-    dataIndex: 'length',
-  },
   {
     title: '钢种',
     align: 'center',
@@ -128,11 +133,6 @@ export const columns: BasicColumn[] = [
     align: 'center',
     dataIndex: 'thickness',
   },
-  {
-    title: '堆垛或棒线',
-    align: 'center',
-    dataIndex: 'bhtcId',
-  },
   {
     title: '创建时间',
     align: 'center',

+ 55 - 6
src/views/billet/billetBasicInfo/BilletBasicInfoList.vue

@@ -1,19 +1,23 @@
 <template>
   <div>
     <!--引用表格-->
-    <BasicTable @register="registerTable">
+    <BasicTable @register="registerTable" :rowSelection="rowSelection" class="base-bill-talbe">
       <!--插槽:table标题-->
       <template #tableTitle>
         <a-button type="primary" @click="handleSupplement" preIcon="ant-design:plus-outlined"> 补录钢坯</a-button>
         <!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
         <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
         <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
-        <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-dropdown v-if="selectedRowKeys.length > 0">
           <template #overlay>
             <a-menu>
-              <a-menu-item key="1" @click="batchHandleDelete">
+              <!-- <a-menu-item key="1" @click="batchHandleDelete">
                 <Icon icon="ant-design:delete-outlined"></Icon>
                 删除
+              </a-menu-item> -->
+              <a-menu-item key="2" @click="batchHandleWastes">
+                <Icon icon="ant-design:node-collapse-outlined"></Icon>
+                批量判废
               </a-menu-item>
             </a-menu>
           </template>
@@ -21,7 +25,7 @@
             >批量操作
             <Icon icon="mdi:chevron-down"></Icon>
           </a-button>
-        </a-dropdown> -->
+        </a-dropdown>
       </template>
       <!-- <template #billetImg>
         <div class="billet-info-img">
@@ -50,7 +54,7 @@
   import { useListPage } from '/@/hooks/system/useListPage';
   import BilletBasicInfoModal from './components/BilletBasicInfoModal.vue';
   import { columns, searchFormSchema } from './BilletBasicInfo.data';
-  import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './BilletBasicInfo.api';
+  import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, batchWastes } from './BilletBasicInfo.api';
   // import { downloadFile } from '/@/utils/common/renderUtils';
   import { useTimeoutFn } from '/@/hooks/core/useTimeout';
   import detailsModal from './components/detailsModal.vue';
@@ -73,6 +77,9 @@
       },
       columns,
       canResize: false,
+      rowClassName: (record: any) => {
+        return record.bhtcId === '1025' ? 'base-error-500' : '';
+      },
       formConfig: {
         //labelWidth: 120,
         schemas: searchFormSchema,
@@ -95,6 +102,14 @@
         title: '操作',
         fixed: 'right',
       },
+      rowSelection: {
+        type: 'checkbox',
+        getCheckboxProps(record) {
+          return {
+            disabled: record.bhtcId === '1025',
+          };
+        },
+      },
     },
     exportConfig: {
       name: '铸坯实绩',
@@ -172,6 +187,11 @@
   async function batchHandleDelete() {
     await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
   }
+
+  //  批量判废
+  async function batchHandleWastes(values) {
+    await batchWastes({ ids: selectedRowKeys.value }, handleSuccess);
+  }
   /**
    * 成功回调
    */
@@ -213,10 +233,39 @@
   }
 </script>
 
-<style scoped>
+<style lang="less" scoped>
   .billet-info-img {
     display: inline-block;
     width: 60px;
     height: 60px;
   }
+  .base-bill-talbe {
+    :deep(.base-error-500) {
+      td {
+        background-color: #f56c6c61;
+      }
+
+      td:first-child {
+        position: relative;
+        z-index: 8;
+        // border-bottom: 1px solid var(--vxe-danger-color, #f56c6c) !important;
+
+        &::after {
+          content: '';
+          position: absolute;
+          top: 0;
+          inset-inline-start: 0;
+          width: 100%;
+          height: 100%;
+          box-shadow: inset 5px 0 0 var(--vxe-danger-color, #f56c6c);
+        }
+      }
+
+      td:last-child {
+        z-index: 8;
+        background-color: #fff;
+        // border-bottom: 1px solid var(--vxe-danger-color, #f56c6c) !important;
+      }
+    }
+  }
 </style>

+ 2 - 2
src/views/billet/hotDelivery/components/basicInfo/index.vue

@@ -22,9 +22,9 @@
             </a-form-item>
           </a-col>
           <a-col :span="4">
-            <a-popconfirm title="确认交班?" placement="bottom" ok-text="是" cancel-text="否" @confirm="handleClear">
+            <!-- <a-popconfirm title="确认交班?" placement="bottom" ok-text="是" cancel-text="否" @confirm="handleClear">
               <a-button class="hot-line-info-btn" type="primary"> 交班 </a-button>
-            </a-popconfirm>
+            </a-popconfirm> -->
           </a-col>
         </a-row>
         <a-row :gutter="24">

+ 6 - 0
src/views/billet/hotDelivery/hotDelivery.data.ts

@@ -107,6 +107,12 @@ export const columns: BasicColumn[] = [
     width: 100,
     dataIndex: 'blankOutput',
   },
+  {
+    title: '判废重量',
+    align: 'center',
+    width: 100,
+    dataIndex: 'wasteBlankOutput',
+  },
   // {
   //   title: '操作',
   //   dataIndex: 'action',

+ 67 - 3
src/views/billet/shippingBill/components/detailsModal.vue

@@ -10,6 +10,10 @@
             <span v-else>{{ text }}</span>
           </div>
         </template> -->
+        <!--操作栏-->
+        <template #action="{ record }">
+          <TableAction :actions="getTableAction(record)" />
+        </template>
       </BasicTable>
     </div>
   </BasicModal>
@@ -17,10 +21,13 @@
 <script setup lang="ts">
   import { ref, nextTick } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
-  import { BasicTable } from '/@/components/Table';
+  import { BasicTable, TableAction } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
-  import { listShippingBill } from '../shippingBill.api';
+  import { listShippingBill, removeBillets } from '../shippingBill.api';
   import { detailColumns, detailFormSchema } from '../shippingBill.data';
+  import { useMessage } from '/@/hooks/web/useMessage';
+
+  const { createConfirm } = useMessage();
 
   const recordInfo = ref<any>({});
   // 表格数据
@@ -28,10 +35,18 @@
   const modalTitle = ref('装运明细');
 
   const props = defineProps({
+    info: {
+      type: Object,
+      default: () => ({}),
+    },
     api: {
       type: Function as PropType<(params: any) => Promise<any>>,
       default: listShippingBill,
     },
+    showActionColumn: {
+      type: Boolean,
+      default: false,
+    },
   });
 
   // Emits声明
@@ -57,17 +72,66 @@
         schemas: detailFormSchema,
       },
       striped: true,
-      showActionColumn: false,
+      showActionColumn: props.showActionColumn,
       pagination: {
         defaultPageSize: 50,
         pageSize: 50,
       },
+      actionColumn: {
+        width: 80,
+        title: '操作',
+        dataIndex: 'action',
+        fixed: 'right',
+      },
     },
   });
 
   // BasicTable绑定注册
   const [registerTable, { setLoading }, {}] = tableContext;
 
+  /**
+   * 操作栏
+   */
+  function getTableAction(record) {
+    return [
+      {
+        label: '移除',
+        onClick: () => {
+          createConfirm({
+            iconType: 'warning',
+            title: '确认移除',
+            content: '是否移除选中数据',
+            okText: '确认',
+            cancelText: '取消',
+            onOk: () => {
+              const { storageBillId, ccmNo, heatNo, billetNos, shiftGroup, shift, assemblyNumber, stackStorey, stackNum, stackAddr } = record;
+
+              const params = {
+                id: storageBillId,
+                ccmNo,
+                heatNo,
+                billNos: billetNos.join(','),
+                shiftGroup,
+                shift,
+                assemblyNumber,
+                stackStorey,
+                stackNum,
+                stackAddr,
+                typeConfigId: recordInfo.value.typeConfigId,
+                destination: recordInfo.value.destination,
+              };
+
+              return removeBillets(params).then(() => {
+                getTableList();
+                emit('success');
+              });
+            },
+          });
+        },
+      },
+    ];
+  }
+
   const getTableList = async () => {
     try {
       setLoading(true);

+ 16 - 12
src/views/billet/shippingBill/components/printModal.vue

@@ -1,26 +1,29 @@
 <template>
   <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose title="装运单打印" :height="400" :width="800" ok-text="打印" @ok="onPrint">
     <section ref="print" style="padding: 20px 10px; position: relative; border: 1px solid #c5c5c5; background: beige" id="printContent">
-      <span style="position: absolute; right: 20px; top: 10px; font-size: 16px; font-weight: bold">{{ info.ccmNo }}#机</span>
+      <span style="position: absolute; right: 20px; top: 10px; font-size: 16px; font-weight: bold"
+        >{{ info.ccmNo }}#机 / {{ info.btype == 1 ? '冷' : '热' }}</span
+      >
       <div class="ticket next-ticket">
         <div style="text-align: center">
           <p style="font-size: 24px; font-weight: 800; display: inline-block; border-bottom: 2px solid #000; margin-bottom: 16px; line-height: 30px">
             龙钢公司钢坯装运单
           </p>
         </div>
-        <a-descriptions size="small" :column="4">
-          <a-descriptions-item label="库名"> {{ info.destination }} </a-descriptions-item>
-          <a-descriptions-item :span="2"> {{ dayjs(info.arrivalTime).format('YYYY 年 MM 月 DD 日 HH 时 mm 分') }} </a-descriptions-item>
-          <a-descriptions-item>
-            <div style="width: 100%; text-align: right">
-              <a-tag v-if="info.btype == 1" style="font-size: 14px; color: #000; font-weight: 600">冷</a-tag>
-              <a-tag color="#f50" v-else style="font-size: 14px; color: #000; font-weight: 600">热</a-tag>
-            </div>
-          </a-descriptions-item>
-        </a-descriptions>
+        <div class="flex" style="line-height: 24px;">
+          <div class="flex-1">库名:{{ info.destination }}</div>
+          <div class="flex-1" style="text-align: center;">{{ dayjs(info.arrivalTime).format('YYYY 年 MM 月 DD 日 HH 时 mm 分') }}</div>
+          <div class="flex-1" style="text-align: right;font-size: 12px;">
+            {{ dayjs(info.arrivalTime).format('YYYYMMDDHHmmss') }}/{{ info.carNum }}/{{ info.carAllNum }}/{{ info.shift_dictText }}/{{
+              info.shiftGroup_dictText
+            }}
+          </div>
+        </div>
         <a-descriptions style="margin-top: 10px; margin-bottom: 10px" layout="vertical" bordered :column="8" size="small">
           <a-descriptions-item style="border: 1px solid #bfbfbf; font-size: 12px; padding: 4px; text-align: center" label="序号">
-            {{ info.carAllNum }}
+            <div style="min-height: 80px; display: flex; align-items: center; justify-content: center"
+              ><span>{{ info.carAllNum }}</span></div
+            >
           </a-descriptions-item>
           <a-descriptions-item style="border: 1px solid #bfbfbf; font-size: 12px; padding: 4px; text-align: center" label="车号">
             {{ info.licensePlate }}
@@ -75,6 +78,7 @@
   //表单赋值
   const [registerModal, { changeLoading, changeOkLoading }] = useModalInner(async (data) => {
     const { record } = data;
+    console.log(record);
     if (record) {
       info.value = record;
       getTableList();

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

@@ -110,7 +110,7 @@
     <!-- 日志 -->
     <logModel ref="logRef" @ok="handleSuccess"></logModel>
     <!-- 详情  -->
-    <detailsModal @register="registerDetailModal" />
+    <detailsModal @register="registerDetailModal" showActionColumn @success="handleSuccess" />
     <!-- 热装 -->
     <rod-line
       @register="registerRodLineModal"

+ 5 - 0
src/views/billet/shippingBill/shippingBill.api.ts

@@ -34,6 +34,8 @@ enum Api {
 
   // 装运单,以车次为主
   listShippingBillDetails = '/storageBill/queryOnDutyStorageBillStatistics',
+  // 移除钢坯
+  removeBillets = '/storageBill/deleteByAssemblyNumber',
 }
 
 /**
@@ -110,3 +112,6 @@ export const heightDtlList = (params) => defHttp.get({ url: Api.heightDtlList, p
 
 // 装运单,以车次为主
 export const listShippingBillDetails = (params) => defHttp.get({ url: Api.listShippingBillDetails, params });
+
+// 移除钢坯
+export const removeBillets = (params) => defHttp.delete({ url: Api.removeBillets, params }, { joinParamsToUrl: true });