zhangafei 1 сар өмнө
parent
commit
28e0641e33

+ 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.8:9999"],["/upload","http://localhost:3300/upload"]]
+VITE_PROXY = [["/jeecgboot","http://192.168.1.6: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.8:9999
+VITE_GLOB_DOMAIN_URL=http://192.168.1.6:9999
 
 
 

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

@@ -13,6 +13,8 @@ enum Api {
   exportXls = '/actualControl/billetActual/exportXls',
   // 明细
   listDetail = '/billetHotsendBase/billetHotsendBase/queryBilletInfoByBilletNo',
+  // 钢坯信息补偿
+  compensate = '/actualControl/billetActual/add',
 }
 /**
  * 导出api
@@ -66,3 +68,6 @@ export const saveOrUpdate = (params, isUpdate) => {
 
 // 明细
 export const listDetail = (params) => defHttp.get({ url: Api.listDetail, params });
+
+// 钢坯信息补偿
+export const compensate = (num, params) => defHttp.post({ url: Api.compensate + '?number=' + num, params });

+ 4 - 0
src/views/billet/billetBasicInfo/BilletBasicInfo.data.ts

@@ -361,6 +361,9 @@ export const supplementFormSchema: FormSchema[] = [
     label: '铸机号',
     field: 'ccmNo',
     component: 'InputNumber',
+    componentProps: {
+      disabled: true,
+    },
   },
   {
     label: '钢包号',
@@ -376,6 +379,7 @@ export const supplementFormSchema: FormSchema[] = [
     label: '定尺',
     field: 'length',
     component: 'InputNumber',
+    rules: [{ required: true, message: '请输入定尺' }],
   },
   {
     label: '宽度',

+ 1 - 1
src/views/billet/billetBasicInfo/BilletBasicInfoList.vue

@@ -4,7 +4,7 @@
     <BasicTable @register="registerTable">
       <!--插槽:table标题-->
       <template #tableTitle>
-        <!-- <a-button type="primary" @click="handleSupplement" preIcon="ant-design:plus-outlined"> 补钢坯</a-button> -->
+        <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> -->

+ 26 - 16
src/views/billet/billetBasicInfo/components/SupplementSteelBilletsModal.vue

@@ -2,15 +2,21 @@
   <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
     <BasicForm @register="registerForm">
       <template #heatNo="{ model }">
-        <JSearchSelect v-model:value="model.heatNo" @change="getLastBillet" :options="heatNoOptions" placeholder="请选择" />
+        <JSelectInput v-model:value="model.heatNo" @change="getLastBillet" :options="heatNoOptions" placeholder="请选择" />
       </template>
       <template #num="{ model }">
-        <a-input-number v-if="Number(ccmNo) === 5" :defaultValue="1" :step="1" v-model:value="model.num" :min="1" />
+        <a-input-number
+          v-if="Number(ccmNo) === 5 && model.belongTable !== 'roll_club_one'"
+          :defaultValue="1"
+          :step="1"
+          v-model:value="model.num"
+          :min="1"
+        />
         <a-input-number v-else :defaultValue="4" :step="4" v-model:value="model.num" :min="4" @change="handleChangeNum" />
       </template>
 
       <template #belongTable="{ model }">
-        <JSearchSelect v-model:value="model.belongTable" :options="belongTableOPtions" placeholder="请选择" />
+        <JSelectInput v-model:value="model.belongTable" :options="belongTableOPtions" allowClear placeholder="请选择" />
       </template>
     </BasicForm>
   </BasicModal>
@@ -21,11 +27,13 @@
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, useForm } from '/@/components/Form/index';
   import { supplementFormSchema } from '../BilletBasicInfo.data';
-  import { saveOrUpdate, list as billetList } from '../BilletBasicInfo.api';
+  import { compensate, list as billetList } from '../BilletBasicInfo.api';
   import { list } from '../../heatsActuals/HeatsActuals.api';
-  import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
+  import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { configAll5, configAll6 } from '../../hotDelivery/common.data';
+  import { useMessage } from '/@/hooks/web/useMessage';
 
+  const { createMessage } = useMessage();
   // Emits声明
   const emit = defineEmits(['register', 'success']);
   const isUpdate = ref(true);
@@ -33,7 +41,7 @@
   const heatNoOptions = ref([]);
   const belongTableOPtions = ref<any[]>([]);
   //表单配置
-  const [registerForm, { setProps, resetFields, setFieldsValue, validate, getFieldsValue }] = useForm({
+  const [registerForm, { setProps, resetFields, setFieldsValue, validate }] = useForm({
     //labelWidth: 150,
     schemas: supplementFormSchema,
     showActionButtonGroup: false,
@@ -67,8 +75,8 @@
     const year = now.getFullYear();
     const month = String(now.getMonth() + 1).padStart(2, '0');
     const day = String(now.getDate()).padStart(2, '0');
-    const formattedDate = `${year}-${month}-${day}`;
-    // const formattedDate = `2025-04-16`;
+    // const formattedDate = `${year}-${month}-${day}`;
+    const formattedDate = `2025-04-16`;
     await getTodayBillet(formattedDate);
     // 隐藏底部时禁用整个表单
     setProps({ disabled: !data?.showFooter });
@@ -79,14 +87,17 @@
   async function handleSubmit() {
     try {
       let values = await validate();
+      if (values.ccmNo == 5 && values.belongTable !== 'roll_club_one' && values.num % 4 !== 0) {
+        createMessage.warning('请输入4或4的倍数');
+        return;
+      }
       setModalProps({ confirmLoading: true });
       // 查询当前目的地
       const nudidi = belongTableOPtions.value.find((item) => item.value === values.belongTable);
-      values.belongTable = nudidi ? nudidi?.belongTable : undefined;
-      values.bhtcId = nudidi ? nudidi?.id : undefined;
-      console.log('111111111111111111111', values);
+      values.belongTable = nudidi ? nudidi?.belongTable : '';
+      values.bhtcId = nudidi ? nudidi?.id : '';
       //提交表单
-      // await saveOrUpdate(values, isUpdate.value);
+      await compensate(values.num, values);
       //关闭弹窗
       closeModal();
       //刷新列表
@@ -115,7 +126,7 @@
         const { heatNo, ccmNo, ladleNo, grade, length, width, thickness, spec, weight } = records[0];
         const values = {
           heatNo,
-          num: 1,
+          num: Number(ccmNo) === 5 ? 1 : 4,
           ccmNo,
           ladleNo,
           grade,
@@ -124,11 +135,10 @@
           thickness,
           spec,
           weight,
-          belongTable: Number(ccmNo) === 5 ? 'roll_club_one' : 'roll_height',
+          // belongTable: Number(ccmNo) === 5 ? 'roll_club_one' : 'roll_height',
+          belongTable: undefined,
         };
 
-        console.log('values', values);
-
         await setFieldsValue(values);
       }
     } catch (error) {

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

@@ -110,7 +110,7 @@
     },
     exportConfig: {
       name: '炉次传递单',
-      url: getExportUrl,
+      url: getExportUrl + '?ccmNo=' + machine.value,
     },
   });
 

+ 28 - 28
src/views/billet/shippingBill/shippingBill.data.ts

@@ -94,6 +94,34 @@ export const columns: BasicColumn[] = computed(() => [
     width: 80,
     dataIndex: 'shift_dictText',
   },
+  {
+    title: '车位号',
+    align: 'center',
+    width: 80,
+    dataIndex: 'positionNum',
+    // fixed: true,
+  },
+  {
+    title: '组坯号',
+    align: 'center',
+    width: 280,
+    dataIndex: 'assemblyNumber',
+    ellipsis: false,
+    customRender(opt) {
+      const ph = opt.record.assemblyNumber;
+      if (!ph) return '';
+      const phArr = groupArray(ph.split(','), 2);
+
+      return phArr.join('\n\r').replaceAll(',', '、');
+    },
+  },
+  {
+    title: '总支数',
+    align: 'center',
+    width: 100,
+    dataIndex: 'amountTotal',
+    // fixed: true
+  },
   {
     title: '牌号',
     align: 'center',
@@ -130,34 +158,6 @@ export const columns: BasicColumn[] = computed(() => [
     dataIndex: 'carAllNum',
     // fixed: true,
   },
-  {
-    title: '车位号',
-    align: 'center',
-    width: 80,
-    dataIndex: 'positionNum',
-    // fixed: true,
-  },
-  {
-    title: '组坯号',
-    align: 'center',
-    width: 280,
-    dataIndex: 'assemblyNumber',
-    ellipsis: false,
-    customRender(opt) {
-      const ph = opt.record.assemblyNumber;
-      if (!ph) return '';
-      const phArr = groupArray(ph.split(','), 2);
-
-      return phArr.join('\n\r').replaceAll(',', '、');
-    },
-  },
-  {
-    title: '总支数',
-    align: 'center',
-    width: 100,
-    dataIndex: 'amountTotal',
-    // fixed: true
-  },
   {
     title: '钢种',
     align: 'center',