Browse Source

5号机增加车位4

zhangafei 1 week ago
parent
commit
81ae90aea1

+ 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
 

+ 8 - 5
src/store/modules/app.ts

@@ -20,7 +20,7 @@ interface AppState {
   // When the window shrinks, remember some states, and restore these states when the window is restored
   beforeMiniInfo: BeforeMiniState;
   // 页面跳转临时参数存储
-  messageHrefParams: any
+  messageHrefParams: any;
 }
 let timeId: TimeoutHandle;
 export const useAppStore = defineStore({
@@ -30,7 +30,7 @@ export const useAppStore = defineStore({
     pageLoading: false,
     projectConfig: Persistent.getLocal(PROJ_CFG_KEY),
     beforeMiniInfo: {},
-    messageHrefParams: {}
+    messageHrefParams: {},
   }),
   getters: {
     getPageLoading(): boolean {
@@ -60,9 +60,13 @@ export const useAppStore = defineStore({
     getMultiTabsSetting(): MultiTabsSetting {
       return this.getProjectConfig.multiTabsSetting;
     },
-    getMessageHrefParams():any{
+    getMessageHrefParams(): any {
       return this.messageHrefParams;
-    }
+    },
+    // 关闭定时任务
+    closeTimingTask(): boolean {
+      return import.meta.env.DEV === true;
+    },
   },
   actions: {
     setPageLoading(loading: boolean): void {
@@ -104,7 +108,6 @@ export const useAppStore = defineStore({
     setMessageHrefParams(params: any): void {
       this.messageHrefParams = params;
     },
-    
   },
 });
 

+ 7 - 5
src/views/billet/operator/components/car.vue

@@ -128,7 +128,7 @@
       }
     "
   >
-    <div class="flex justify-center items-center" v-if="createChargeBillPositionNum == 2" style="margin: 20px 0">
+    <div class="flex justify-center items-center" v-if="commonCarPosition.includes(String(createChargeBillPositionNum))" style="margin: 20px 0">
       <div>选择铸机:</div>
       <JSearchSelect type="list" style="width: 277px" v-model:value="createChargeBillCcmNo" dict="lg_zj" placeholder="请选择" allowClear />
     </div>
@@ -151,6 +151,7 @@
   import { render } from '/@/utils/common/renderUtils';
   import { getStackInfoByCcmNo, quickCreateStorageBill } from '../operator.api';
   import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
+  import { useAppStore } from '/@/store/modules/app';
 
   // 注册打印modal
   const [registerPrintModal, { openModal: openPrintModal }] = useModal();
@@ -168,9 +169,10 @@
 
   const activeKey = ref(1);
   const carPosition = {
-    '5': [1, 2],
+    '5': [1, 2, 4],
     '6': [2, 3, 4],
   };
+  const commonCarPosition = ['2', '4'];
   // 车辆信息
   const infoRef1 = ref();
   const infoRef2 = ref();
@@ -265,7 +267,7 @@
     }
   };
 
-  const { start, stop } = useTimeoutFn(getInfo, 10000);
+  const { start, stop } = useTimeoutFn(getInfo, 10000, useAppStore().closeTimingTask);
 
   // 获取堆垛机堆垛信息
   // 获取当前堆垛信息
@@ -486,7 +488,7 @@
   // 创建装车单
   const openCreateChargeBill = ref(false);
   const createChargeBillCcmNo = ref(props.ccmNo);
-  const createChargeBillPositionNum = ref(1);
+  const createChargeBillPositionNum = ref<string | number>(1);
   const createChargeBillCar = ref(undefined);
   const okLoading = ref(false);
   const createChargeBill = async (pn) => {
@@ -497,7 +499,7 @@
   };
   const confirmCreateChargeBill = async () => {
     try {
-      if (createChargeBillPositionNum.value == 2 && !createChargeBillCcmNo.value) {
+      if (commonCarPosition.includes(String(createChargeBillPositionNum.value)) && !createChargeBillCcmNo.value) {
         createMessage.error('请选择铸机号!');
         return;
       }

+ 2 - 1
src/views/billet/operator/components/headTop.vue

@@ -86,6 +86,7 @@
   import { render } from '/@/utils/common/renderUtils';
   import changeHeatModal from './changeHeatModal.vue';
   import { useModal } from '/@/components/Modal';
+  import { useAppStore } from '/@/store/modules/app';
 
   const { createMessage } = useMessage();
 
@@ -289,7 +290,7 @@
     }
   };
 
-  const { start, stop } = useTimeoutFn(getInfo, 5000);
+  const { start, stop } = useTimeoutFn(getInfo, 5000, useAppStore().closeTimingTask);
 
   // 换炉
   const changeHeatLoading = ref(false);

+ 3 - 1
src/views/billet/operator/components/printCarInfo.vue

@@ -27,7 +27,7 @@
           </a-button>
           <a-button
             style="margin-left: 10px"
-            v-if="carPositon == 2 && !info.outTime && info.id"
+            v-if="commonPositon.includes(String(carPositon)) && !info.outTime && info.id"
             type="primary"
             :loading="btnLoading"
             @click="updateCcmNo"
@@ -159,6 +159,8 @@
   // const headDtl = ref<any[]>([]);
   const weight = ref<number>(0);
   const sizeInfo = ref<string[]>([]);
+  // 共用的车位
+  const commonPositon = ['2', '4'];
   // 渲染字典标签
   const renderDictTag = (value: string, dictCode: string) => {
     return render.renderDict(value, dictCode);

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

@@ -82,7 +82,7 @@
           <a-radio-button value="1" v-if="Number(machine) === 5">1号车位</a-radio-button>
           <a-radio-button value="2">2号车位</a-radio-button>
           <a-radio-button value="3" v-if="Number(machine) === 6">3号车位</a-radio-button>
-          <a-radio-button value="4" v-if="Number(machine) === 6">4号车位</a-radio-button>
+          <a-radio-button value="4">4号车位</a-radio-button>
         </a-radio-group>
       </template>
 

+ 1 - 0
src/views/billet/shippingBill/shippingBill.data.ts

@@ -548,6 +548,7 @@ export const carPosition6 = ref([
 export const carPosition5 = ref([
   { label: '1', value: '1' },
   { label: '2', value: '2' },
+  { label: '4', value: '4' },
 ]);
 
 //列表数据