ソースを参照

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

jiaxiaoqiang 11 ヶ月 前
コミット
bb4fd01eee

+ 3 - 0
.vscode/settings.json

@@ -77,4 +77,7 @@
   "i18n-ally.localesPaths": [
     "src/lang"
   ],
+  "[vue]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
 }

+ 7 - 0
src/api/prepare/index.ts

@@ -70,3 +70,10 @@ export function addOperation(data: any) {
     data,
   });
 }
+//扫盒子
+export function getVehicleInfo(id: any) {
+  return request({
+    url: "/api/v1/wms/vehicle/getVehicleInfo/" + `${id}`,
+    method: "get",
+  });
+}

+ 8 - 5
src/api/process/index.ts

@@ -33,11 +33,14 @@ export function getScan(data: any) {
 }
 // 流程叫料
 export function callItems(data: any) {
-  return request({
-    url: "/api/v1/process/vehicleOperation/callItems",
-    method: "post",
-    data: data,
-  });
+  return request(
+    {
+      url: "/api/v1/process/vehicleOperation/callItems",
+      method: "post",
+      data: data,
+    },
+    { loadingKey: "callItems" }
+  );
 }
 // 设备点检列表查询
 export function checkList() {

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

@@ -140,6 +140,7 @@ const getOpCompentData = async () => {
     operationId: store.odersData.operationId,
     workOrderCode: store.odersData.workOrderCode,
     seqNo: store.scanInfo.seqNo,
+    processId: store.scanInfo.id,
     pageNo: 1,
     pageSize: 9999,
   });

+ 31 - 18
src/views/process/components/scanCode.vue

@@ -11,7 +11,7 @@
 <script lang="ts" setup>
 import ScanCodeInput from "@/components/ScanCodeInput/index.vue";
 import { useProcessStore } from "@/store";
-
+import { getScan } from "@/api/process";
 import { emitter, EventsNames } from "@/utils/common";
 const store = useProcessStore();
 const router = useRouter();
@@ -29,30 +29,43 @@ const toProSteps = () => {
 
   if (selectOrderIndex.value == null)
     return ElMessage.error("请选择所操作工单!");
-  let status = false;
-  for (let i = 0; i < selectSeqArray.value.length; i++) {
-    if (selectSeqArray.value[i].seqNo == inputValue.value) {
-      status = true;
-      opsArray.value = selectSeqArray.value[i].ops;
-      store.odersData.qrCode = inputValue.value;
-    }
-  }
-  if (status) {
-    ElMessage.success("扫码成功!");
-    scanStatus.value = true;
-    emitFnc();
-  } else {
-    ElMessage.error("流转卡号有误!");
-    scanStatus.value = false;
+  // let status = false;
+  // for (let i = 0; i < selectSeqArray.value.length; i++) {
+  //   if (selectSeqArray.value[i].seqNo == inputValue.value) {
+  //     status = true;
+  //     opsArray.value = selectSeqArray.value[i].ops;
+  //     store.odersData.qrCode = inputValue.value;
+  //   }
+  // }
+  // if (status) {
+  //   ElMessage.success("扫码成功!");
+  //   scanStatus.value = true;
+  //   emitFnc();
+  // } else {
+  //   ElMessage.error("流转卡号有误!");
+  //   scanStatus.value = false;
+  // }
+
+  getScanData();
+};
+const getScanData = async () => {
+  const { code, data, msg } = await getScan({
+    operationId: Number(store.odersData.operationId),
+    qrCode: inputValue.value,
+    workOrderCode: store.odersData.workOrderCode,
+    //stationId暂时随便传一个
+    stationId: 1,
+  });
+  if (code == "200") {
+    store.scanInfo = data;
+    router.push({ path: "/pro-steps" });
   }
   inputValue.value = "";
-  // getScanData();
 };
 //扫码成功重置工序index
 const emitFnc = () => {
   emitter.emit(EventsNames.PROCESS_STEPINDEX, null);
 };
-
 </script>
 
 <style lang="scss" scoped>

+ 56 - 29
src/views/process/components/steps.vue

@@ -1,38 +1,59 @@
 <template>
   <div class="body">
-    <div class="steps" v-for="(item, index) in opsArray" :key="index" @click="boxClick(item, index)">
-      <div :class="item.opComplete
-          ? 'stepBox stepBoxDisabled'
-          : item.exists == true
+    <div
+      class="steps"
+      v-for="(item, index) in opsArray"
+      :key="index"
+      @click="boxClick(item, index)"
+    >
+      <div
+        :class="
+          item.exists == true
             ? selectStepIndex == index
               ? 'stepBox stepBoxHover'
               : 'stepBox'
             : 'stepBox stepExistsHover'
-        ">
+        "
+      >
         <div style="display: flex; align-items: center">
-          <div :class="selectStepIndex == index
-              ? 'stepIndex stepIndexHover'
-              : 'stepIndex'
-            ">
-            <span :class="selectStepIndex == index
-                ? 'indexText hoverTextColor'
-                : 'indexText'
-              ">{{ index + 1 }}</span>
+          <div
+            :class="
+              selectStepIndex == index
+                ? 'stepIndex stepIndexHover'
+                : 'stepIndex'
+            "
+          >
+            <span
+              :class="
+                selectStepIndex == index
+                  ? 'indexText hoverTextColor'
+                  : 'indexText'
+              "
+              >{{ index + 1 }}</span
+            >
           </div>
           <div class="midTextBox">
-            <div :class="selectStepIndex == index ? 'stepName stepNameHover' : 'stepName'
-              ">
+            <div
+              :class="
+                selectStepIndex == index ? 'stepName stepNameHover' : 'stepName'
+              "
+            >
               {{ item.operationName }}
             </div>
-            <div :class="selectStepIndex == index
-                ? 'stepStation stepStationHover'
-                : 'stepStation'
-              ">
+            <div
+              :class="
+                selectStepIndex == index
+                  ? 'stepStation stepStationHover'
+                  : 'stepStation'
+              "
+            >
               {{ item.operationCode }}
             </div>
           </div>
         </div>
-        <div :class="selectStepIndex == index ? 'timeBox timeBoxHover' : 'timeBox'">
+        <div
+          :class="selectStepIndex == index ? 'timeBox timeBoxHover' : 'timeBox'"
+        >
           {{ item.completeNum }}
         </div>
       </div>
@@ -43,7 +64,12 @@
     </div>
     <el-empty v-if="!opsArray" description="暂无数据" />
     <!-- 弹窗 -->
-    <el-dialog v-model="centerDialogVisible" width="500" align-center style="border-radius: 16px">
+    <el-dialog
+      v-model="centerDialogVisible"
+      width="500"
+      align-center
+      style="border-radius: 16px"
+    >
       <template #header>
         <div class="titleText" style="text-align: center">通知</div>
       </template>
@@ -63,21 +89,20 @@ import { useProcessStore } from "@/store";
 import { emitter, EventsNames } from "@/utils/common";
 import { getScan } from "@/api/process";
 const store = useProcessStore();
+const selectSeqArray = inject("selectSeqArray");
+const ordersDataArray = inject("ordersDataArray");
 const props = defineProps<{
   opsArray?: object;
 }>();
 //步骤显示index
 const router = useRouter();
 const selectStepIndex = ref(null);
-const scanStatus = inject("scanStatus");
+const selectedOderStatus = inject("selectedOderStatus");
+const selectOrderIndex = inject("selectOrderIndex");
 const centerDialogVisible = ref(false);
 const emitFnc = () => {
   emitter.emit(EventsNames.PROCESS_STEPOBJ, {
     index: selectStepIndex.value,
-    lastStatus:
-      selectStepIndex.value == null || selectStepIndex.value == 0
-        ? false
-        : true,
   });
 };
 emitter.on(EventsNames.PROCESS_STEPINDEX, (val: any) => {
@@ -95,13 +120,15 @@ emitter.on(EventsNames.PROCESS_REDER, () => {
 //   }
 // };
 const boxClick = (item, index) => {
-  if (item.opComplete == true || item.exists != true) return;
+  if (item.exists != true) return;
+  selectSeqArray.value =
+    ordersDataArray.value[selectOrderIndex.value].ops[index].seqs;
   store.odersData.operationId = item.operationId;
   store.processInfo.operationCode = item.operationCode;
   store.processInfo.operationName = item.operationName;
   selectStepIndex.value = index;
   emitFnc();
-  centerDialogVisible.value = true;
+  // centerDialogVisible.value = true;
 };
 const getScanData = async () => {
   try {
@@ -138,7 +165,7 @@ watch(
   }
 );
 watch(
-  () => scanStatus.value,
+  () => selectedOderStatus.value,
   () => {
     selectStepIndex.value = null;
   }

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

@@ -3,10 +3,25 @@
   <div class="body">
     <el-scrollbar class="scrollbar">
       <Empty v-if="selectSeqArray.length < 1" />
-      <div class="row" @click="clickCardNum(index)" v-for="(item, index) in selectSeqArray" :key="index">
-        <el-tooltip effect="dark" :content="item.seqNo" placement="left" trigger="hover">
-          <span :class="index == selectSeqIndex ? 'describeText active' : 'describeText'
-            " style="cursor: pointer">{{ item.seqNo }}</span>
+      <div
+        class="row"
+        @click="clickCardNum(index)"
+        v-for="(item, index) in selectSeqArray"
+        :key="index"
+      >
+        <el-tooltip
+          effect="dark"
+          :content="item.seqNo"
+          placement="left"
+          trigger="hover"
+        >
+          <span
+            :class="
+              index == selectSeqIndex ? 'describeText active' : 'describeText'
+            "
+            style="cursor: pointer"
+            >{{ item.seqNo }}</span
+          >
         </el-tooltip>
         <div class="status">
           {{

+ 5 - 2
src/views/process/main.vue

@@ -35,18 +35,21 @@ const selectSeqArray = ref([]);
 const selectSeqIndex = ref(null);
 // 扫码变量确认工序
 const scanStatus = ref(false);
+// 是否选中订单
+const selectedOderStatus = ref(false);
 //当前选择的订单对应订单的工序data
 const opsArray = ref([]);
 const setSelectOrderIndex = (value: number) => {
   selectOrderIndex.value = value;
-  selectSeqArray.value = ordersDataArray.value[value].seqs;
-  scanStatus.value = false;
+  opsArray.value = ordersDataArray.value[value].ops;
+  selectedOderStatus.value = true;
 };
 provide("selectSeqIndex", selectSeqIndex);
 provide("ordersDataArray", ordersDataArray);
 provide("selectOrderIndex", selectOrderIndex);
 provide("selectSeqArray", selectSeqArray);
 provide("scanStatus", scanStatus);
+provide("selectedOderStatus", selectedOderStatus);
 provide("opsArray", opsArray);
 </script>
 

+ 37 - 8
src/views/process/orders.vue

@@ -3,16 +3,34 @@
     <div class="commonTitle">
       {{ activeName == "ok" ? "已完成工单" : "待完成工单" }}[{{ ordersSum }}]
     </div>
-    <el-tabs v-model="activeName" class="demo-tabs" type="card" @tab-click="handleClick">
+    <el-tabs
+      v-model="activeName"
+      class="demo-tabs"
+      type="card"
+      @tab-click="handleClick"
+    >
       <el-tab-pane label="未完成" name="false" />
       <el-tab-pane label="已完成" name="ok" />
     </el-tabs>
-    <!-- <el-scrollbar class="barHeight" ref="wrapRef" @scroll="handleScroll" v-loading="map.get('getProcessOrders')"> -->
-    <el-scrollbar class="barHeight" ref="wrapRef" @scroll="handleScroll">
-      <Order v-for="(item, index) in ordersDataArray" :key="index" @click="setSlectIndex(index)"
-        :hoverStatus="index == selectIndex ? true : false" :item="item" />
+    <el-scrollbar
+      class="barHeight"
+      ref="wrapRef"
+      @scroll="handleScroll"
+      v-loading="map.get('getProcessOrders')"
+    >
+      <!-- <el-scrollbar class="barHeight" ref="wrapRef" @scroll="handleScroll"> -->
+      <Order
+        v-for="(item, index) in ordersDataArray"
+        :key="index"
+        @click="setSlectIndex(index)"
+        :hoverStatus="index == selectIndex ? true : false"
+        :item="item"
+      />
       <Empty v-if="ordersDataArray.length < 1" />
-      <div class="describeText notice" v-if="ordersQuery.pageNo == ordersQuery.totalPages">
+      <div
+        class="describeText notice"
+        v-if="ordersQuery.pageNo == ordersQuery.totalPages"
+      >
         已经到底啦~
       </div>
     </el-scrollbar>
@@ -29,12 +47,13 @@ import { useCommonStoreHook } from "@/store";
 const dictS = useDictionaryStore();
 const store = useProcessStore();
 const selectSeqIndex = inject("selectSeqIndex");
-const scanStatus = inject("scanStatus");
+const selectedOderStatus = inject("selectedOderStatus");
 const ordersSum = ref(0);
 const commonS = useCommonStoreHook();
 const map = commonS.loadingMap;
 const emit = defineEmits(["getindex"]);
 const ordersDataArray = inject("ordersDataArray");
+const selectSeqArray = inject("selectSeqArray");
 //获取未完成订单的参数
 const ordersQuery = ref({
   pageNo: 1,
@@ -61,6 +80,16 @@ const resetOrdersDataArray = async () => {
     queryComplete: 0,
     totalPages: 1,
   };
+  store.odersData.productLineId = "";
+  store.odersData.workOrderCode = "";
+  store.processInfo.materialName = "";
+  store.processInfo.materialModel = "";
+  store.odersData.operationId = "";
+  store.processInfo.operationCode = "";
+  store.processInfo.operationName = "";
+  store.useSeqNo = "";
+  selectSeqArray.value = [];
+  selectSeqIndex.value = null;
   getOrdersData();
 };
 const activeName = ref("false");
@@ -69,7 +98,7 @@ const selectIndex = ref(null);
 const setSlectIndex = (index: number) => {
   if (index == null) {
     selectIndex.value = null;
-    scanStatus.value = false;
+    selectedOderStatus.value = false;
     return;
   }
   selectIndex.value = index;

+ 24 - 10
src/views/process/popUpView/operatePop.vue

@@ -1,8 +1,16 @@
 <template>
-  <div class="midPopUp" @click="emits('update:modelValue', false)" v-if="modelValue">
+  <div
+    class="midPopUp"
+    @click="emits('update:modelValue', false)"
+    v-if="modelValue"
+  >
     <div class="container" @click.stop>
-      <div :class="lcDisabled ? 'operatorBox disableOp' : 'operatorBox'" @click="lastOpCall"
-        :style="lcRes ? 'background-color: white !important;' : ''">
+      <div
+        :class="lcDisabled ? 'operatorBox disableOp' : 'operatorBox'"
+        @click="lastOpCall"
+        v-loading="map.get('callItems')"
+        :style="lcRes ? 'background-color: white !important;' : ''"
+      >
         <transition>
           <div v-if="!lcRes">
             <div class="titleText">流程叫料</div>
@@ -19,7 +27,10 @@
         </transition>
       </div>
 
-      <div :class="gxDisabled ? 'operatorBox disableOp' : 'operatorBox'" @click="opeateCall">
+      <div
+        :class="gxDisabled ? 'operatorBox disableOp' : 'operatorBox'"
+        @click="opeateCall"
+      >
         <div>
           <div class="titleText">工序叫料</div>
           <div class="describeText">(向本工序呼叫涉及物料)</div>
@@ -33,10 +44,13 @@
 import { useProcessStore } from "@/store";
 import { emitter, EventsNames } from "@/utils/common";
 import { callItems } from "@/api/process";
+import { useCommonStoreHook } from "@/store";
+const commonS = useCommonStoreHook();
 const store = useProcessStore();
 const router = useRouter();
+const map = commonS.loadingMap;
 const lcRes = ref(false);
-const time = ref(10);
+const time = ref(3);
 const emits = defineEmits(["update:modelValue"]);
 const modelValue = defineModel<boolean>();
 const gxDisabled = ref(true);
@@ -52,7 +66,7 @@ const scanStatus = inject("scanStatus");
 const callLast = async () => {
   const { data, code } = await callItems({
     operationId: store.odersData.operationId,
-    seqNo: store.useSeqNo,
+    workOrderCode: store.odersData.workOrderCode,
   });
   if (code == "200") {
     lcRes.value = true;
@@ -64,8 +78,8 @@ const callLast = async () => {
     setTimeout(() => {
       clearInterval(intervalID);
       lcRes.value = false;
-      time.value = 10;
-    }, 10000);
+      time.value = 3;
+    }, 3000);
   }
 };
 //流程叫料
@@ -75,11 +89,11 @@ const lastOpCall = () => {
 };
 //监听工序index等
 emitter.on(EventsNames.PROCESS_STEPOBJ, (data: any) => {
-  if (data.index == null || scanStatus.value == false) {
+  if (data.index == null) {
     lcDisabled.value = true;
     gxDisabled.value = true;
   } else {
-    if (data.lastStatus == false) {
+    if (data.index == 0) {
       lcDisabled.value = true;
     } else {
       lcDisabled.value = false;

+ 2 - 2
src/views/process/processes.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="commonTitle">工序[{{ OptArrayLength }}]</div>
   <el-scrollbar class="barHeight">
-    <div class="titleText notice" v-if="!scanStatus">请先扫码获取工序</div>
+    <div class="titleText notice" v-if="!selectedOderStatus">请选择订单</div>
     <template v-else>
       <Steps :opsArray="opsArray" />
       <Empty v-if="opsArray.length < 1" />
@@ -10,7 +10,7 @@
 </template>
 <script lang="ts" setup>
 import Steps from "@/views/process/components/steps.vue";
-const scanStatus = inject("scanStatus");
+const selectedOderStatus = inject("selectedOderStatus");
 //总的订单data
 const ordersDataArray = inject("ordersDataArray");
 //当前选择的订单index

+ 107 - 13
src/views/storage-in/index.vue

@@ -3,25 +3,68 @@
     <el-row :gutter="20">
       <el-col :span="8">
         <div class="type-title">载具入库</div>
-        <ScanCodeInput v-model="boxSearch" :clearable="true" :showSuffix="true" placeholder="请扫描或输入料箱编号"
-          @keyup.enter="enterBox" />
+        <ScanCodeInput
+          v-model="boxSearch"
+          :clearable="true"
+          :showSuffix="true"
+          placeholder="请扫描或输入料箱编号"
+          @keyup.enter="enterBox"
+          :disabled="outStatus || addStatus"
+        />
         <el-scrollbar class="boxes-container base-container">
-          <div v-for="(item, index) in boxesList" :key="index" :class="{ 'box-selected': index === currentBoxIndex }"
-            class="box-item" @click="clickBox(item, index)">
+          <div
+            v-for="(item, index) in boxesList"
+            :key="index"
+            :class="{ 'box-selected': index === currentBoxIndex }"
+            class="box-item"
+            @click="clickBox(item, index)"
+          >
             <div class="box-name">{{ item.vehicleNo }}</div>
-            <div v-for="(material, index) in item.list" :key="index" class="box-info">
+            <div
+              v-for="(material, index) in item.list"
+              :key="index"
+              class="box-info"
+            >
               <div>{{ material.materialName }}</div>
               <div>{{ material.num }}</div>
             </div>
           </div>
         </el-scrollbar>
-        <el-button class="sureBtn" type="primary" @click="sureToOut">出库
+        <el-button
+          class="sureBtn"
+          type="primary"
+          :disabled="outStatus || addStatus"
+          @click="sureToOut"
+          >出库
         </el-button>
       </el-col>
       <el-col :span="8">
         <div class="type-title">盒内原有物料</div>
         <el-scrollbar class="outing-container">
-          <div v-for="(material, index) in outingMaterials" :key="index" class="outing-box">
+          <div v-if="!outStatus">
+            <div class="addbox" v-if="addSuccessStatus">
+              扫码的盒子编码:{{ addBoxInfo.code }}
+            </div>
+            <ScanCodeInput
+              v-if="addStatus && addSuccessStatus == false"
+              v-model="addBoxSearch"
+              :clearable="true"
+              :showSuffix="true"
+              placeholder="请扫描或输入料箱编号"
+              @keyup.enter="addenterBox"
+            />
+            <el-button
+              class="sureBtn"
+              :type="addStatus ? 'info' : 'primary'"
+              @click="changeAddStatus"
+              >{{ addStatus ? "取消" : "入库新载具" }}
+            </el-button>
+          </div>
+          <div
+            v-for="(material, index) in outingMaterials"
+            :key="index"
+            class="outing-box"
+          >
             <div class="material-title">
               {{ material.materialName }} | {{ material.materialNo }}
             </div>
@@ -41,15 +84,24 @@
             </div>
           </div>
         </el-scrollbar>
-        <el-button class="sureBtn" type="info" @click="backToStorage">返库
+        <el-button class="sureBtn" type="info" @click="backToStorage"
+          >出库
         </el-button>
       </el-col>
       <el-col :span="8">
         <div class="type-title">请扫码物料</div>
-        <ScanCodeInput v-model="scanCodeInput" placeholder="请扫描或输入物料编码" @keyup.enter="handleScanCodeInput" />
+        <ScanCodeInput
+          v-model="scanCodeInput"
+          placeholder="请扫描或输入物料编码"
+          @keyup.enter="handleScanCodeInput"
+        />
         <el-scrollbar class="base-container">
           <div class="list-container">
-            <div v-for="(item, index) in materialList" :key="index" class="list-box">
+            <div
+              v-for="(item, index) in materialList"
+              :key="index"
+              class="list-box"
+            >
               <div>
                 <div class="name">{{ item.materialName }}</div>
                 <div class="spec">{{ item.spec }}</div>
@@ -61,7 +113,8 @@
             </div>
           </div>
         </el-scrollbar>
-        <el-button class="sureBtn" type="primary" @click="sureToAdd">确认添加
+        <el-button class="sureBtn" type="primary" @click="sureToAdd"
+          >确认添加
         </el-button>
       </el-col>
     </el-row>
@@ -74,6 +127,7 @@ import {
   getDestinationList,
   getMaterialInfoByLabel,
 } from "@/api/process/materialFlow";
+import { getVehicleInfo } from "@/api/prepare";
 import {
   backToStorageAPI,
   getStorageBoxesList,
@@ -84,13 +138,43 @@ import {
 const boxSearch = ref("");
 //盒内原有物料data
 const boxesList = ref<any[]>([]);
+const addStatus = ref(false);
+const addSuccessStatus = ref(false);
+const addBoxInfo = ref();
 //选中的item
 const currentBox = ref<any>({});
 const currentBoxIndex = ref(-1);
+const outStatus = ref(false);
+const changeAddStatus = () => {
+  if (addStatus.value == true) {
+    addSuccessStatus.value = false;
+    addBoxInfo.value = null;
+    addBoxSearch.value = "";
+    outingBox.value = {};
+    outingRawBoxList = [];
+    outingMaterials.value = [];
+    materialList.value = [];
+  }
+  addStatus.value = !addStatus.value;
+};
+const addBoxSearch = ref("");
+//扫盒子
+const addenterBox = () => {
+  addBoxSearch.value = addBoxSearch.value.trim();
+  getVehicleInfo(addBoxSearch.value ? addBoxSearch.value : {}).then((res) => {
+    addBoxInfo.value = res.data;
+    addSuccessStatus.value = true;
+    outingBox.value.vehicleNo = addBoxInfo.value.code;
+    outingBox.value.vehicleId = addBoxInfo.value.id;
+    ElMessage.success("扫码成功!");
+  });
+};
 //出库
 const enterBox = () => {
   boxSearch.value = boxSearch.value.trim();
-  getStorageBoxesList({}).then((res) => {
+  getStorageBoxesList(
+    boxSearch.value ? { vehicleCode: boxSearch.value } : {}
+  ).then((res) => {
     boxesList.value = res.data;
   });
 };
@@ -105,6 +189,7 @@ const sureToOut = async () => {
     houseNo: currentBox.value.houseNo,
   });
   ElMessage.success("出库成功");
+  outStatus.value = true;
   outingBox.value = currentBox.value;
   if (outingBox.value.list.length > 0) {
     outingMaterials.value = outingBox.value.list;
@@ -143,6 +228,7 @@ const materialList = ref<any>([]);
 // 扫码料码
 const handleScanCodeInput = () => {
   getMaterialInfoByLabel(scanCodeInput.value).then((res) => {
+    //seq是序列号唯一的
     if (res.data.codeType == "SEQ") {
       res.data.seqNo = scanCodeInput.value;
     } else {
@@ -167,7 +253,7 @@ const sureToAdd = () => {
       } else {
         if (
           materialList.value[i].materialCode ==
-          outingMaterials.value[b].materialNo &&
+            outingMaterials.value[b].materialNo &&
           materialList.value[i].batchCode == outingMaterials.value[b].batchCode
         ) {
           outingMaterials.value[i].num =
@@ -362,4 +448,12 @@ onMounted(() => {
   width: 100%;
   margin-top: 10px;
 }
+.addbox {
+  margin-bottom: 10px;
+  border-radius: 16px;
+  background-color: white;
+  text-align: center;
+  padding: 20px 0;
+  font-size: $f24;
+}
 </style>

+ 1 - 0
src/views/traceability/components/check.vue

@@ -24,6 +24,7 @@
           </el-table>
         </el-collapse-item>
       </el-collapse>
+      <Empty v-if="materialsData.length < 1" />
     </el-scrollbar>
     <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
   </div>

+ 1 - 0
src/views/traceability/components/equit.vue

@@ -13,6 +13,7 @@
           </el-table>
         </el-collapse-item>
       </el-collapse>
+      <Empty v-if="materialsData.length < 1" />
     </el-scrollbar>
     <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
   </div>

+ 5 - 0
src/views/traceability/components/fault.vue

@@ -19,6 +19,11 @@
       </template>
     </el-table-column>
     <el-table-column prop="standard" label="备注" />
+    <template #empty>
+              <div class="empty">
+                <Empty />
+              </div>
+            </template>
   </el-table>
   <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
 </template>

+ 1 - 0
src/views/traceability/components/materials.vue

@@ -13,6 +13,7 @@
           </el-table>
         </el-collapse-item>
       </el-collapse>
+      <Empty v-if="materialsData.length < 1" />
     </el-scrollbar>
     <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
   </div>

+ 5 - 0
src/views/traceability/components/media.vue

@@ -8,6 +8,11 @@
         <span @click="handleLook(row.filePath)">查看</span>
       </template>
     </el-table-column>
+    <template #empty>
+              <div class="empty">
+                <Empty />
+              </div>
+            </template>
   </el-table>
   <el-image id="showImg" style="width: 0; height: 0" :min-scale="0.2" :src="srcList[0]" :preview-src-list="srcList"
     fit="cover" />

+ 1 - 0
src/views/traceability/components/record.vue

@@ -10,6 +10,7 @@
           </el-table>
         </el-collapse-item>
       </el-collapse>
+      <Empty v-if="materialsData.length < 1" />
     </el-scrollbar>
     <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
   </div>

+ 5 - 0
src/views/traceability/components/traceability.vue

@@ -8,6 +8,11 @@
     <el-table-column prop="creator" label="操作人" />
     <el-table-column prop="standardWorktime" label="工时" />
     <el-table-column prop="operationSort" label="工步" />
+    <template #empty>
+      <div class="empty">
+        <Empty />
+      </div>
+    </template>
   </el-table>
   <Pagination position="right" :page="page" :limit="limit" :total="total" @pagination="getPagination" />
 </template>