Browse Source

feature/入库流程优化&&首页bug修复

dy 1 year ago
parent
commit
add3bbc1dd

+ 8 - 12
src/styles/index.scss

@@ -29,10 +29,9 @@
 
 .mainContentBox {
   width: 100%;
-  height: calc(100vh - 80px);
+  height: calc(100vh - 130px);
   padding: 0 24px 24px 24px;
   overflow: hidden;
-  //background: white;
 }
 
 .commonTitle {
@@ -67,10 +66,10 @@
 }
 .stepsViewScrollH {
   width: calc((100vw / 6 * 5) - 50px);
-  height: calc(100vh - 204px);
+  height: calc(100vh - 254px);
 }
 //search框样式
-.searchInput{
+.searchInput {
   height: 50px;
   border-radius: 76px;
   overflow: hidden;
@@ -86,8 +85,6 @@
     box-shadow: none;
     box-sizing: border-box;
   }
-  
- 
 }
 
 //字体样式
@@ -103,7 +100,6 @@
   line-height: 25px;
 }
 
-
 //公共弹框样式
 
 .midPopUp {
@@ -122,7 +118,7 @@
   .container {
     width: 50vw;
     height: 80vh;
-    background-color: #F1F3F5;
+    background-color: #f1f3f5;
     border-radius: 16px;
     padding: 10px;
     display: flex;
@@ -175,7 +171,7 @@
   .container {
     width: 50vw;
     height: 100vh;
-    background-color: #F1F3F5;
+    background-color: #f1f3f5;
     border-radius: 16px;
     padding: 10px;
     display: flex;
@@ -218,7 +214,7 @@
 .container {
   width: 50vw;
   height: 100vh;
-  background-color: #F1F3F5;
+  background-color: #f1f3f5;
   border-radius: 16px;
   display: flex;
   flex-direction: column;
@@ -251,7 +247,7 @@
 
 //全局表格样式
 //控制字体
-.el-table__cell{
+.el-table__cell {
   font-size: $p20;
   color: black;
-}
+}

+ 17 - 8
src/views/pro-steps/components/ESOP.vue

@@ -9,8 +9,12 @@
         <el-scrollbar ref="scrollbarRef" class="pdmView">
           <!-- <PDFView :need-to-show-pdf="true" :show-pdf-number="3" :is-link="true"
             pdf-source="http://192.168.101.4:9000/jgfile/2024/04/20/%E7%AC%AC08%E7%AB%A0_%E8%81%9A%E5%90%88%E5%87%BD%E6%95%B0.pdf" /> -->
-          <PDFView :need-to-show-pdf="true" :pageNumber="srcList[selectImgIndex]?.showAppointPageNum" :is-link="true"
-            :pdf-source="baseUrl + srcList[selectImgIndex]?.filePath" />
+          <PDFView
+            :need-to-show-pdf="true"
+            :pageNumber="srcList[selectImgIndex]?.showAppointPageNum"
+            :is-link="true"
+            :pdf-source="baseUrl + srcList[selectImgIndex]?.filePath"
+          />
           <Empty v-if="srcList.length < 1" />
         </el-scrollbar>
       </div>
@@ -27,10 +31,15 @@
     <div class="footer">
       <el-scrollbar>
         <div class="scrollbar-flex-content">
-          <div :class="selectImgIndex == index
-              ? 'scrollbar-demo-item '
-              : 'scrollbar-demo-item unScrollbarItemBorder'
-            " v-for="(item, index) in srcList" @click="setImgIndex(index)">
+          <div
+            :class="
+              selectImgIndex == index
+                ? 'scrollbar-demo-item '
+                : 'scrollbar-demo-item unScrollbarItemBorder'
+            "
+            v-for="(item, index) in srcList"
+            @click="setImgIndex(index)"
+          >
             <span>{{ item.title }}</span>
           </div>
         </div>
@@ -82,7 +91,7 @@ onMounted(async () => {
 <style lang="scss" scoped>
 .espoViewStyle {
   display: flex;
-  max-height: calc(100vh - 184px);
+  max-height: calc(100vh - 234px);
   width: calc(100vw / 6 * 5 - 50px);
   flex-direction: column;
 }
@@ -94,7 +103,7 @@ onMounted(async () => {
 
   .imgView {
     flex: 1;
-    height: calc(100vh - 318px);
+    height: calc(100vh - 368px);
     @include flex;
     justify-content: center;
     padding: $p10 0;

+ 2 - 2
src/views/pro-steps/components/jiluxiang.vue

@@ -300,12 +300,12 @@ onMounted(() => {
 
 .operateBody {
   width: 100%;
-  height: calc(100% - 80px);
+  height: calc(100% - 130px);
 }
 
 .recordBody {
   width: 100%;
-  height: calc(100% - 80px);
+  height: calc(100% - 130px);
   display: flex;
 
   .left {

+ 13 - 1
src/views/pro-steps/components/operates.vue

@@ -83,6 +83,18 @@ const stepComponents = ref([
     compentName: "报工",
     compentType: "baogong",
   },
+  {
+    compentName: "报工",
+    compentType: "baogong",
+  },
+  {
+    compentName: "报工",
+    compentType: "baogong",
+  },
+  {
+    compentName: "报工",
+    compentType: "baogong",
+  },
 ]);
 </script>
 
@@ -96,7 +108,7 @@ const stepComponents = ref([
     height: 88px;
     border-radius: 16px;
     background-color: white;
-    margin-top: 20px;
+    margin-bottom: 20px;
     display: flex;
     padding: 20px;
     justify-content: space-between;

+ 17 - 6
src/views/pro-steps/components/shebeijilu.vue

@@ -10,8 +10,13 @@
       </div>
       <!-- 变量控制样式 -->
       <div class="footerBtn">
-        <el-button v-if="!item.equitCode" class="bottomBtn" style="background-color: #0a59f7"
-          @click="openScanCode(index)">点击扫描设备</el-button>
+        <el-button
+          v-if="!item.equitCode"
+          class="bottomBtn"
+          style="background-color: #0a59f7"
+          @click="openScanCode(index)"
+          >点击扫描设备</el-button
+        >
         <div v-else class="infoBox">
           <div class="info">
             <div>
@@ -37,8 +42,12 @@
         </div>
       </div>
     </div>
-    <PopScanCode v-model:inputValue="inputValueVal" v-model:showStatus="showStatusVal" @submit="scanCode"
-      title="请扫描设备" />
+    <PopScanCode
+      v-model:inputValue="inputValueVal"
+      v-model:showStatus="showStatusVal"
+      @submit="scanCode"
+      title="请扫描设备"
+    />
   </div>
 </template>
 
@@ -96,9 +105,11 @@ onMounted(() => {
   flex-direction: column;
   justify-content: space-between;
 
-  .headerText {}
+  .headerText {
+  }
 
-  .describeBox {}
+  .describeBox {
+  }
 
   //按钮样式
   .footerBtn {

+ 4 - 1
src/views/pro-steps/components/wuliaocaiji.vue

@@ -135,7 +135,6 @@ const submit = () => {
 
 //获取tag列表数据
 const getOpCompentData = async () => {
-  console.log("store.scanInfo", store.scanInfo.seqNo);
   const { data } = await recordList({
     operationId: store.odersData.operationId,
     workOrderCode: store.odersData.workOrderCode,
@@ -145,6 +144,10 @@ const getOpCompentData = async () => {
     pageSize: 9999,
   });
   opCompentDataList.value = data;
+  opCompentDataList.value.push(data);
+  opCompentDataList.value.push(data);
+  opCompentDataList.value.push(data);
+  opCompentDataList.value.push(data);
 };
 const input = ref("");
 onMounted(() => {

+ 55 - 4
src/views/pro-steps/index.vue

@@ -1,5 +1,30 @@
 `
 <template>
+  <div class="headerInfo">
+    <div class="titleText">
+      {{ store.processInfo.materialName }} -
+      {{ store.processInfo.materialModel }}
+    </div>
+    <div class="info">
+      <div class="item">
+        当前工序:
+        {{ store.scanInfo.operationName ? store.scanInfo.operationName : "-" }}
+      </div>
+      <div class="item">
+        下一工位:{{
+          store.scanInfo.nextStation ? store.scanInfo.nextStation : "-"
+        }}
+      </div>
+      <div class="item">
+        流转卡号:{{ store.scanInfo.seqNo ? store.scanInfo.seqNo : "-" }}
+      </div>
+      <div class="item">
+        产品编码:{{
+          store.scanInfo.materialCode ? store.scanInfo.materialCode : "-"
+        }}
+      </div>
+    </div>
+  </div>
   <div class="mainContentBox">
     <el-row :gutter="20">
       <el-col :span="4" class="boxStyle">
@@ -32,7 +57,7 @@
           </el-scrollbar>
         </div>
         <Empty v-if="stepComponents.length == 0" />
-        <div class="routerView">
+        <div class="routerView" :key="key">
           <el-scrollbar style="width: 100%">
             <router-view v-slot="{ Component, route }">
               <keep-alive
@@ -54,6 +79,7 @@ import { useProcessStore } from "@/store";
 import { getOpCompent } from "@/api/prosteps";
 
 const store = useProcessStore();
+const key = ref(false);
 defineOptions({ name: "ProSteps" });
 const route = useRoute();
 const router = useRouter();
@@ -142,7 +168,7 @@ const getOpCompentArray = async () => {
     "/" + `${store.odersData.operationId}` + "/" + `${store.scanInfo.id}`
   );
   recondOPId.value = store.odersData.operationId;
-  qrCode.value = store.odersData.qrCode;
+  qrCode.value = store.scanInfo.seqNo;
   stepComponents.value = setStepComponents(data);
   router.replace({ name: stepComponents.value[selectIndex.value].name });
 };
@@ -167,11 +193,13 @@ onActivated(async () => {
   } else {
     if (
       recondOPId.value != store.odersData.operationId ||
-      qrCode.value != store.odersData.qrCode
+      qrCode.value != store.scanInfo.seqNo
     ) {
       //当发生改变时
       setSelectIndex(0);
       await getOpCompentArray();
+
+      key.value = !key.value;
     } else {
       await getOpCompentArray();
     }
@@ -183,6 +211,29 @@ onActivated(async () => {
 .boxStyle {
   height: calc(100vh - 80px);
 }
+.headerInfo {
+  height: 40px;
+  width: calc(100vw - 40px);
+  padding: 10px;
+  margin: 0 20px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  border-radius: 16px;
+  border-right: 0px;
+  border-left: 0px;
+  box-sizing: border-box;
+  margin-bottom: 10px;
+  background-color: white;
+  .info {
+    display: flex;
+    .item {
+      margin: 0 5px;
+      font-size: $f20;
+      font-weight: 300;
+    }
+  }
+}
 
 .scrollbar-demo-item {
   flex-shrink: 0;
@@ -210,7 +261,7 @@ onActivated(async () => {
   flex: 1;
   overflow-y: auto;
   width: 100%;
-  height: calc(100vh - 184px);
+  height: calc(100vh - 234px);
   padding-top: $p20;
 }
 

+ 6 - 3
src/views/pro-steps/operationBar.vue

@@ -1,6 +1,5 @@
 <template>
-  <el-scrollbar style="padding-bottom: 24px">
-    <LeftBarInfo />
+  <el-scrollbar class="scrollbarSty">
     <Operates />
   </el-scrollbar>
 </template>
@@ -10,4 +9,8 @@ import LeftBarInfo from "./components/leftBarInfo.vue";
 import Operates from "./components/operates.vue";
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.scrollbarSty {
+  height: calc(100vh - 154px);
+}
+</style>

+ 10 - 3
src/views/process/components/scanCode.vue

@@ -25,10 +25,17 @@ const selectSeqArray = inject("selectSeqArray");
 //工序data
 const opsArray = inject("opsArray");
 const toProSteps = () => {
-  if (inputValue.value == "") return ElMessage.error("流转卡号不能为空值!");
+  if (inputValue.value == "") {
+    ElMessage.error("流转卡号不能为空值!");
+    inputValue.value == "";
+    return;
+  }
 
-  if (selectOrderIndex.value == null)
-    return ElMessage.error("请选择所操作工单!");
+  if (selectOrderIndex.value == null) {
+    inputValue.value == "";
+    ElMessage.error("请选择所操作工单!");
+    return;
+  }
   // let status = false;
   // for (let i = 0; i < selectSeqArray.value.length; i++) {
   //   if (selectSeqArray.value[i].seqNo == inputValue.value) {

+ 2 - 0
src/views/process/orders.vue

@@ -96,6 +96,7 @@ const activeName = ref("false");
 //这里是存放控制当前选择工序的index
 const selectIndex = ref(null);
 const setSlectIndex = (index: number) => {
+  if (selectIndex.value == index) return;
   if (index == null) {
     selectIndex.value = null;
     selectedOderStatus.value = false;
@@ -114,6 +115,7 @@ const setSlectIndex = (index: number) => {
   store.processInfo.operationCode = "";
   store.processInfo.operationName = "";
   store.useSeqNo = "";
+  selectSeqArray.value = [];
   selectSeqIndex.value = null;
   emit("getindex", selectIndex.value);
 };

+ 28 - 19
src/views/storage-in/index.vue

@@ -69,7 +69,7 @@
               {{ material.materialName }} | {{ material.materialNo }}
             </div>
             <div class="material-info">
-              <div>批次号</div>
+              <div>批次号/序列号</div>
               <el-tooltip :content="material.batchCode" placement="top">
                 <div class="batchCode">{{ material.batchCode }}</div>
               </el-tooltip>
@@ -79,13 +79,13 @@
               <div>{{ material.locationNo }}</div>
             </div>
             <div class="material-info">
-              <div>量</div>
+              <div>量</div>
               <div>{{ material.num }}</div>
             </div>
           </div>
         </el-scrollbar>
         <el-button class="sureBtn" type="info" @click="backToStorage"
-          >
+          >
         </el-button>
       </el-col>
       <el-col :span="8">
@@ -145,17 +145,26 @@ const addBoxInfo = ref();
 const currentBox = ref<any>({});
 const currentBoxIndex = ref(-1);
 const outStatus = ref(false);
+const resetData = () => {
+  addSuccessStatus.value = false;
+  addBoxInfo.value = null;
+  addBoxSearch.value = "";
+  outingBox.value = {};
+  outingRawBoxList = [];
+  outingMaterials.value = [];
+  materialList.value = [];
+  currentBox.value = {};
+  currentBoxIndex.value = -1;
+  boxSearch.value = "";
+  addStatus.value = false;
+  outStatus.value = false;
+};
 const changeAddStatus = () => {
   if (addStatus.value == true) {
-    addSuccessStatus.value = false;
-    addBoxInfo.value = null;
-    addBoxSearch.value = "";
-    outingBox.value = {};
-    outingRawBoxList = [];
-    outingMaterials.value = [];
-    materialList.value = [];
+    resetData();
+  } else {
+    addStatus.value = !addStatus.value;
   }
-  addStatus.value = !addStatus.value;
 };
 const addBoxSearch = ref("");
 //扫盒子
@@ -204,7 +213,6 @@ let outingRawBoxList: any[] = []; //确认添加的时候会对比捡料位和
 const outingBox = ref<any>({});
 const outingMaterials = ref<any[]>([]);
 const backToStorage = async () => {
-  console.log("back to storage");
   await backToStorageAPI({
     vehicleCode: outingBox.value.vehicleNo,
     houseNo: outingBox.value.houseNo,
@@ -213,9 +221,7 @@ const backToStorage = async () => {
   outingBox.value = {};
   outingMaterials.value = [];
   ElMessage.success("返库成功");
-  currentBox.value = {};
-  currentBoxIndex.value = -1;
-  boxSearch.value = "";
+  resetData();
   getStorageBoxesList({}).then((res) => {
     boxesList.value = res.data;
   });
@@ -236,11 +242,11 @@ const handleScanCodeInput = () => {
     }
     materialList.value.push({ ...res.data });
     scanCodeInput.value = "";
+    ElMessage.success("扫码成功!");
   });
 };
 //确认添加:只是页面静态添加 不做接口发送
 const sureToAdd = () => {
-  outingMaterials.value = JSON.parse(JSON.stringify(outingRawBoxList));
   for (let i = 0; i < materialList.value.length; i++) {
     let status = false;
     for (let b = 0; b < outingMaterials.value.length; b++) {
@@ -250,14 +256,16 @@ const sureToAdd = () => {
           materialNo: materialList.value[i].materialCode,
           unit: materialList.value[i].unitDictValue,
         });
+        status = true;
       } else {
         if (
           materialList.value[i].materialCode ==
             outingMaterials.value[b].materialNo &&
-          materialList.value[i].batchCode == outingMaterials.value[b].batchCode
+          materialList.value[i].materialName ==
+            outingMaterials.value[b].materialName
         ) {
-          outingMaterials.value[i].num =
-            outingMaterials.value[i].num + materialList.value[i].num;
+          outingMaterials.value[b].num =
+            outingMaterials.value[b].num + materialList.value[i].num;
           status = true;
         }
       }
@@ -270,6 +278,7 @@ const sureToAdd = () => {
       });
     }
   }
+  materialList.value = [];
   ElMessage.success("添加成功!");
 };
 // 流转终点