Bläddra i källkod

Merge remote-tracking branch 'remotes/origin/xf_dev' into js_dev

# Conflicts:
#	.env.development
#	package.json
#	pnpm-lock.yaml
qinhb 2 månader sedan
förälder
incheckning
c7f741078d

+ 1 - 1
.env.development

@@ -11,7 +11,7 @@ VITE_APP_BASE_API = '/dev-api'
 VITE_APP_UPLOAD_URL = 'http://192.168.101.4:9000'
 
 # 开发接口地址
-VITE_APP_API_URL = 'http://192.168.1.111:8079'
+VITE_APP_API_URL = 'http://127.0.0.1:8079'
 # Websocket地址
 VITE_WEBSOCKET_URL = 'ws://192.168.101.4:8079'
 ``

+ 1 - 1
.env.production

@@ -12,4 +12,4 @@ VITE_APP_API_URL = ''
 
 
 # Websocket地址
-VITE_WEBSOCKET_URL = 'ws://192.168.142.120:8079'
+VITE_WEBSOCKET_URL = 'ws://192.168.2.100:8079'

+ 0 - 3
package.json

@@ -53,7 +53,6 @@
     "axios": "^1.7.9",
     "codemirror": "^5.65.18",
     "codemirror-editor-vue3": "^2.8.0",
-    "dayjs": "^1.11.13",
     "dhtmlx-gantt": "^9.0.3",
     "echarts": "^5.5.1",
     "element-plus": "^2.9.1",
@@ -63,7 +62,6 @@
     "jspdf": "^2.5.2",
     "lodash-es": "^4.17.21",
     "luckyexcel": "^1.0.1",
-    "mitt": "^3.0.1",
     "moment": "^2.30.1",
     "net": "^1.0.2",
     "nprogress": "^0.2.0",
@@ -71,7 +69,6 @@
     "path-to-regexp": "^6.3.0",
     "pinia": "^2.3.0",
     "pinia-plugin-persist": "^1.0.0",
-    "pinia-plugin-persistedstate": "^4.2.0",
     "print-js": "^1.6.0",
     "qs": "^6.13.1",
     "sockjs-client": "^1.6.1",

+ 18 - 11
src/api/process/index.ts

@@ -59,17 +59,24 @@ export function maintenanceCheck(data: any) {
   });
 }
 
-export function querySeqInfo(workOrderCode: string,seqNo: string) {
-    return request({
-        url: "/api/v1/plan/seq/query/" + workOrderCode + "/" + seqNo,
-        method: "get",
-    });
+export function querySeqInfo(workOrderCode: string, seqNo: string) {
+  return request({
+    url: "/api/v1/plan/seq/query/" + workOrderCode + "/" + seqNo,
+    method: "get",
+  });
 }
 export function saveSeqInfo(data: any) {
-    return request({
-        url: "/api/v1/plan/seq/update",
-        method: "post",
-        data: data,
-    });
+  return request({
+    url: "/api/v1/plan/seq/update",
+    method: "post",
+    data: data,
+  });
+}
+//拉料
+export function getPull(data: any) {
+  return request({
+    url: "/api/v1/process/vehicleOperation/callSeq",
+    method: "post",
+    data: data,
+  });
 }
-

+ 1 - 0
src/store/modules/dictionary.ts

@@ -17,6 +17,7 @@ export const useDictionaryStore = defineStore("dictionaryStore", () => {
     "escalation_fault_state",
     "station_task_state",
     "device_type",
+    "out_time_reason",
   ];
   const dicts = ref<{ [key: string]: any[] }>({});
 

+ 8 - 3
src/views/material-flow/creatTask.vue

@@ -40,7 +40,12 @@
                   <div class="name">{{ item.materialName }}</div>
                   <div class="spec">{{ item.materialCode }}</div>
                   <div class="spec">{{ item.batchNo }}</div>
-                  <div class="spec">{{ item.spec }}</div>
+                  <div class="spec">
+                    {{ item.spec }}
+                  </div>
+                  <div class="spec" v-if="item.nextTask">
+                    下一工位:{{ item.nextTask }}
+                  </div>
                 </div>
                 <div class="bottom">
                   <NumberInput
@@ -137,7 +142,7 @@ const boxDetail = ref<any>({});
 let currentTimer = -1;
 
 const enterBox = () => {
-  currentBox.value = currentBox.value.trim();
+  currentBox.value = currentBox.value.replace(/_/g, "-").trim();
   boxDetail.value.rfid = currentBox.value;
   // getBoxDetailByLabel(currentBox.value).then((res: any) => {
   //   boxDetail.value = res.data;
@@ -316,7 +321,7 @@ const createTask = () => {
   grid-template-columns: 1fr 1fr 1fr;
 
   .list-box {
-    height: 240px;
+    min-height: 240px;
     background: #fff;
     border-radius: 16px 16px 16px 16px;
     display: flex;

+ 34 - 14
src/views/pro-operation/report-work/index.vue

@@ -21,21 +21,21 @@
             size="large"
           >
             <el-select
-                v-if="processStore.scanInfo.batchReport == 1"
-                v-model="selectedProcess"
-                :filterable="true"
-                multiple
-                placeholder="请选择流转卡号,可以输入或者扫码筛选"
-                style="margin-bottom: 20px"
+              v-if="processStore.scanInfo.batchReport == 1"
+              v-model="selectedProcess"
+              :filterable="true"
+              multiple
+              placeholder="请选择流转卡号,可以输入或者扫码筛选"
+              style="margin-bottom: 20px"
             >
               <template #prefix
-              ><img src="@/assets/icons/shaoma.svg"
+                ><img src="@/assets/icons/shaoma.svg"
               /></template>
               <el-option
-                  v-for="item in processList"
-                  :key="item"
-                  :label="item"
-                  :value="item"
+                v-for="item in processList"
+                :key="item"
+                :label="item"
+                :value="item"
               />
             </el-select>
             <el-row
@@ -101,6 +101,25 @@
       </el-scrollbar>
     </template>
     <template #footer>
+      <div
+        style="display: flex; margin-bottom: 10px"
+        v-if="processStore.scanInfo.outTime == true"
+      >
+        <div style="width: 120px">超期原因:</div>
+
+        <el-select
+          v-model="outTimeReason"
+          placeholder="Select"
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in dictStroe.dicts.out_time_reason"
+            :key="item.value"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </div>
       <div class="bottom-btns">
         <el-button class="cancelBtn el-button-big" @click="cancelClick"
           >取消</el-button
@@ -120,7 +139,7 @@
 <script lang="ts" setup>
 import { useProcessStore } from "@/store/modules/processView";
 import { useDictionaryStore } from "@/store/modules/dictionary";
-import { getProcessInfo,getunProcessedList } from "@/api/prosteps";
+import { getProcessInfo, getunProcessedList } from "@/api/prosteps";
 import { emitter, EventsNames } from "@/utils/common";
 import { CirclePlus, Remove } from "@element-plus/icons-vue";
 import { useUserStore } from "@/store/modules/user";
@@ -128,6 +147,7 @@ import { reportWork } from "@/api/process/reportBreak";
 
 const processStore = useProcessStore();
 const dictStroe = useDictionaryStore();
+console.log(dictStroe.dicts.out_time_reason, "2");
 const userStore = useUserStore();
 // ================= 选择工序相关
 const selectedProcess = ref<any[]>([]);
@@ -136,7 +156,7 @@ const router = useRouter();
 
 const drawerVisible = ref(false);
 const formDisabled = ref(true);
-
+const outTimeReason = ref("");
 const formRef = ref<InstanceType<typeof ElForm>>();
 
 const persons = ref<
@@ -165,7 +185,6 @@ const openReportWorkDrawer = () => {
       });
     }
   });
-
 };
 
 const cancelClick = () => {
@@ -186,6 +205,7 @@ const confirmClick = () => {
     processId: processStore.scanInfo.id,
     processUserReportList: persons.value,
     seqList: selectedProcess.value,
+    outTimeReason: outTimeReason.value,
   };
 
   reportWork(params).then((res: any) => {

+ 31 - 5
src/views/process/components/transferNum.vue

@@ -23,7 +23,7 @@
             @click="clickCardNum(index)"
           >
             <el-tooltip
-              :content="item.seqNo"
+              :content="item.currentTask"
               effect="dark"
               placement="left"
               trigger="hover"
@@ -39,10 +39,26 @@
                 >{{ item.seqNo }}</span
               >
             </el-tooltip>
-            <div :class="item.state == '2' ? 'status success' : 'status'">
-              {{
-                dictS.getLableByValue("station_task_state", String(item.state))
-              }}
+            <div
+              style="display: flex; flex-direction: column; align-items: end"
+            >
+              <div :class="item.state == '0' || item.state == '2' ? 'status success' : 'status'">
+                {{
+                  dictS.getLableByValue(
+                    "station_task_state",
+                    String(item.state)
+                  )
+                }}
+              </div>
+<!--              <el-button
+                class="btn"
+                style="margin-bottom: 5px"
+                color="#0A59F7"
+                @click="pull(item.seqNo)"
+                v-if="item.state != '2'"
+              >
+                拉料
+              </el-button>-->
             </div>
           </div>
         </div>
@@ -54,11 +70,21 @@
 <script lang="ts" setup>
 import { useDictionaryStore, useProcessStore } from "@/store";
 import { Transition } from "vue";
+import { getPull } from "@/api/process";
 const refArray = ref([]);
 const store = useProcessStore();
 const dictS = useDictionaryStore();
 const selectSeqIndex = inject("selectSeqIndex");
 const selectSeqArray = inject("selectSeqArray");
+const pull = async (seq: string) => {
+  const { data, code } = await getPull({ seqNo: seq });
+  if (code == "200") {
+    ElMessage.success("拉料成功!");
+  } else {
+    ElMessage.error("拉料失败!");
+  }
+};
+
 const fz = (index: any) => {
   const text = refArray.value[index].textContent;
   copyTextUsingTextarea(text);

+ 3 - 2
src/views/traceability/components/collect.vue

@@ -79,7 +79,6 @@ const loading = ref(false);
 const tableData = ref([]);
 const pageS = ref([]);
 const configeObj = (type) => {
-  console.log(type, "222");
   switch (type) {
     //温湿度
     case "WXDJC":
@@ -89,7 +88,7 @@ const configeObj = (type) => {
     case "GDC":
       return ["height"];
     case "WKDLT":
-      return ["temperature"];
+      return ["tipTemperature"];
     //电动螺丝刀
     case "DDLSD":
       return [
@@ -106,6 +105,8 @@ const configeObj = (type) => {
 };
 const showLable = (key) => {
   switch (key) {
+    case "tipTemperature":
+      return "温度";
     case "CH5Val":
       return "CH5";
     case "CH6Val":

+ 7 - 1
src/views/traceability/index.vue

@@ -100,7 +100,13 @@
                 </div>
                 工单出站
               </div>
-              <div class="value destext">1</div>
+              <div class="value destext">
+                {{
+                  infoData.workOrderNum
+                    ? parseInt(infoData.workOrderNum, 10)
+                    : "-"
+                }}
+              </div>
             </div>
             <div class="item" style="flex: 2">
               <div class="label">