Просмотр исходного кода

Merge branch 'master' of http://192.168.101.4:3000/jiaxiaoqiang/JG-CLIENT-TEMP

jiaxiaoqiang 1 год назад
Родитель
Сommit
bf0e99e82b

+ 7 - 11
src/styles/index.scss

@@ -32,7 +32,6 @@
   height: calc(100vh - 80px);
   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 {

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

@@ -96,7 +96,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 {

+ 0 - 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,

+ 104 - 47
src/views/pro-steps/index.vue

@@ -1,50 +1,79 @@
 `
 <template>
-  <div class="mainContentBox">
-    <el-row :gutter="20">
-      <el-col :span="4" class="boxStyle">
-        <!-- 侧边栏盒子 -->
-        <OperationBar />
-      </el-col>
-      <el-col :span="20">
-        <div class="typeContainer">
-          <el-scrollbar>
-            <div style="display: flex">
-              <div
-                v-for="(item, index) in stepComponents"
-                :key="index"
-                class="scrollbar-demo-item"
-              >
-                <router-link :to="{ name: item.name }" replace>
-                  <div
-                    :class="getNameClass(index)"
-                    class="typeBox"
-                    @click="setSelectIndex(index)"
-                  >
-                    <div class="svgIcon">
-                      <svg-icon :icon-class="item.iconName" size="30" />
-                    </div>
-                    <div class="name">{{ item.compentName }}</div>
-                  </div>
-                </router-link>
-              </div>
-            </div>
-          </el-scrollbar>
+  <div>
+    <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>
-        <Empty v-if="stepComponents.length == 0" />
-        <div class="routerView">
-          <el-scrollbar style="width: 100%">
-            <router-view v-slot="{ Component, route }">
-              <keep-alive
-                include="Dianjian,Jiluxiang,Duomeiticaiji,Esop,Jingu,Mingpaibangding,Shebeijilu,Tiaoshipipei,Wuliaocaiji"
-              >
-                <component :is="Component" :key="route.fullPath" />
-              </keep-alive>
-            </router-view>
-          </el-scrollbar>
+        <div class="item">
+          产品编码:{{
+            store.scanInfo.materialCode ? store.scanInfo.materialCode : "-"
+          }}
         </div>
-      </el-col>
-    </el-row>
+      </div>
+    </div>
+    <div class="mainContentBox">
+      <el-row :gutter="20">
+        <el-col :span="4" class="boxStyle">
+          <!-- 侧边栏盒子 -->
+          <OperationBar />
+        </el-col>
+        <el-col :span="20">
+          <div class="typeContainer">
+            <el-scrollbar>
+              <div style="display: flex">
+                <div
+                  v-for="(item, index) in stepComponents"
+                  :key="index"
+                  class="scrollbar-demo-item"
+                >
+                  <router-link :to="{ name: item.name }" replace>
+                    <div
+                      :class="getNameClass(index)"
+                      class="typeBox"
+                      @click="setSelectIndex(index)"
+                    >
+                      <div class="svgIcon">
+                        <svg-icon :icon-class="item.iconName" size="30" />
+                      </div>
+                      <div class="name">{{ item.compentName }}</div>
+                    </div>
+                  </router-link>
+                </div>
+              </div>
+            </el-scrollbar>
+          </div>
+          <Empty v-if="stepComponents.length == 0" />
+          <div class="routerView" :key="key">
+            <el-scrollbar style="width: 100%">
+              <router-view v-slot="{ Component, route }">
+                <keep-alive
+                  include="Dianjian,Jiluxiang,Duomeiticaiji,Esop,Jingu,Mingpaibangding,Shebeijilu,Tiaoshipipei,Wuliaocaiji"
+                >
+                  <component :is="Component" :key="route.fullPath" />
+                </keep-alive>
+              </router-view>
+            </el-scrollbar>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
   </div>
 </template>
 
@@ -54,6 +83,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 +172,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 +197,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 +215,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;
@@ -204,13 +259,15 @@ onActivated(async () => {
     @include flex;
   }
 }
-
+.mainContentBox {
+  height: calc(100vh - 130px);
+}
 .routerView {
   display: flex;
   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) {

+ 24 - 4
src/views/process/components/transferNum.vue

@@ -2,7 +2,18 @@
   <div class="commonTitle">流转卡号</div>
   <div class="body">
     <el-scrollbar class="scrollbar">
-      <Empty v-if="selectSeqArray.length < 1" />
+      <div
+        v-if="selectSeqArray.length < 1"
+        class="titleText"
+        style="
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          min-height: calc(100vh - 216px);
+        "
+      >
+        请选择工序
+      </div>
       <div
         class="row"
         @click="clickCardNum(index)"
@@ -23,7 +34,14 @@
             >{{ item.seqNo }}</span
           >
         </el-tooltip>
-        <div class="status">
+        <div
+          :class="
+            dictS.getLableByValue('work_order_seq_state', String(item.state)) ==
+            '完成'
+              ? 'status success'
+              : 'status'
+          "
+        >
           {{
             dictS.getLableByValue("work_order_seq_state", String(item.state))
           }}
@@ -50,9 +68,11 @@ onMounted(() => {
 </script>
 
 <style lang="scss" scoped>
+.success {
+  color: #64BB5C;
+}
 .body {
   width: 100%;
-  max-height: calc(100% - 44px);
   background-color: white;
   border-radius: 16px;
   padding: 20px;
@@ -88,6 +108,6 @@ onMounted(() => {
 }
 
 .scrollbar {
-  min-height: calc(50vh - 85px);
+  height: calc(100vh - 210px);
 }
 </style>

+ 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);
 };

+ 94 - 30
src/views/storage-in/index.vue

@@ -19,7 +19,13 @@
             class="box-item"
             @click="clickBox(item, index)"
           >
-            <div class="box-name">{{ item.vehicleNo }}</div>
+            <div class="box-header">
+              <div class="box-name">{{ item.vehicleNo }}</div>
+              <div class="box-name">
+                {{ item.locationNo ? item.locationNo : "-" }}
+              </div>
+            </div>
+
             <div
               v-for="(material, index) in item.list"
               :key="index"
@@ -65,11 +71,19 @@
             :key="index"
             class="outing-box"
           >
-            <div class="material-title">
-              {{ material.materialName }} | {{ material.materialNo }}
+            <div class="outing-box-header">
+              <div class="material-title">
+                {{ material.materialName }} | {{ material.materialNo }}
+              </div>
+              <div
+                @click="deleteIndexOld(index)"
+                class="material-title deleteSty"
+              >
+                删除
+              </div>
             </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 +93,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">
@@ -102,13 +116,23 @@
               :key="index"
               class="list-box"
             >
-              <div>
-                <div class="name">{{ item.materialName }}</div>
-                <div class="spec">{{ item.spec }}</div>
-              </div>
-              <div class="bottom">
-                <NumberInput v-model="item.num" />
-                <span class="unit">{{ item.unitDictLabel }}</span>
+              <div class="list-box-header">
+                <div>
+                  <div>
+                    <div class="name">{{ item.materialName }}</div>
+                    <div class="spec">{{ item.spec }}</div>
+                  </div>
+                  <div class="bottom">
+                    <NumberInput v-model="item.num" />
+                    <span class="unit">{{ item.unitDictLabel }}</span>
+                  </div>
+                </div>
+                <div
+                  @click="deleteIndexScanAdd(index)"
+                  class="list-box-delete deleteSty"
+                >
+                  删除
+                </div>
               </div>
             </div>
           </div>
@@ -136,6 +160,16 @@ import {
 } from "@/api/storage/in";
 
 const boxSearch = ref("");
+const deleteIndexOld = (index: any) => {
+  outingMaterials.value.splice(index, 1);
+  ElMessage.success("操作成功!");
+};
+
+const deleteIndexScanAdd = (index: any) => {
+  materialList.value.splice(index, 1);
+  ElMessage.success("操作成功!");
+};
+
 //盒内原有物料data
 const boxesList = ref<any[]>([]);
 const addStatus = ref(false);
@@ -145,17 +179,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("");
 //扫盒子
@@ -166,6 +209,7 @@ const addenterBox = () => {
     addSuccessStatus.value = true;
     outingBox.value.vehicleNo = addBoxInfo.value.code;
     outingBox.value.vehicleId = addBoxInfo.value.id;
+    outingBox.value.houseNo = "1";
     ElMessage.success("扫码成功!");
   });
 };
@@ -204,7 +248,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 +256,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 +277,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 +291,17 @@ 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].materialName ==
+            outingMaterials.value[b].materialName &&
           materialList.value[i].batchCode == outingMaterials.value[b].batchCode
         ) {
-          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 +314,7 @@ const sureToAdd = () => {
       });
     }
   }
+  materialList.value = [];
   ElMessage.success("添加成功!");
 };
 // 流转终点
@@ -310,7 +355,10 @@ onMounted(() => {
   .box-selected {
     border: 2px solid #0a59f7;
   }
-
+  .box-header {
+    display: flex;
+    justify-content: space-between;
+  }
   .box-name {
     font-size: 20px;
     line-height: 40px;
@@ -324,7 +372,9 @@ onMounted(() => {
     font-size: 24px;
   }
 }
-
+.deleteSty {
+  color: #0a59f7;
+}
 .outing-container {
   height: calc(100vh - 354px);
 
@@ -334,6 +384,10 @@ onMounted(() => {
     margin-bottom: 15px;
     padding: 10px 8px;
   }
+  .outing-box-header {
+    display: flex;
+    justify-content: space-between;
+  }
 
   .material-title {
     font-weight: bolder;
@@ -376,6 +430,16 @@ onMounted(() => {
     align-items: start;
     padding: 30px 30px;
 
+    .list-box-header {
+      width: 100%;
+      display: flex;
+      justify-content: space-between;
+    }
+    .list-box-delete {
+      text-align: right;
+      font-weight: bolder;
+      font-size: 24px;
+    }
     .name {
       font-weight: 500;
       font-size: 24px;