Browse Source

1.去掉工位叫料。2.零星叫料。

jiaxiaoqiang 11 months ago
parent
commit
1437eb537f

+ 10 - 0
src/api/process/callMateriel.ts

@@ -25,6 +25,7 @@ export function accessoriesList(data: any) {
     data: data,
   });
 }
+
 // 未齐套叫料
 export function callNotFullSuit(p: object) {
   return request({
@@ -42,3 +43,12 @@ export function outSuitBox(p: object) {
     data: p,
   });
 }
+
+//零星叫料
+export function sporadicCallItem(p: object) {
+  return request({
+    url: `/api/v1/process/vehicleOperation/sporadicCallItem`,
+    method: "post",
+    data: p,
+  });
+}

+ 2 - 2
src/components/CommonDialogs/ChangeCount.vue

@@ -8,7 +8,7 @@
       close-icon="null"
     >
       <div class="top-title">{{ title }}</div>
-      <div class="desc-title">{{ description }}</div>
+      <!--      <div class="desc-title">{{ description }}</div>-->
       <div class="center-content">
         <NumberInput v-model="countValue" />
       </div>
@@ -37,7 +37,7 @@ const props = defineProps({
   },
   sureText: {
     type: String,
-    default: "确认取出",
+    default: "叫料",
   },
 });
 

+ 33 - 7
src/views/pro-operation/call-materiel/desperse.vue

@@ -18,7 +18,7 @@
             v-for="(box, index) in merterielBoxes"
             :key="index"
             class="suit-box"
-            @click="testClick"
+            @click="clickItem(box)"
           >
             <div>
               <div class="suit-title">{{ box?.materialName }}</div>
@@ -35,13 +35,21 @@
         </div>
       </el-scrollbar>
     </div>
+    <ChangeCount
+      ref="changeCountRef"
+      description="双面胶黑色"
+      title="叫料数量"
+    />
   </div>
 </template>
 
 <script lang="ts" setup>
-import { accessoriesList } from "@/api/process/callMateriel";
+import { accessoriesList, sporadicCallItem } from "@/api/process/callMateriel";
 import { useDictionaryStore } from "@/store/modules/dictionary";
+import ChangeCount from "@/components/CommonDialogs/ChangeCount.vue";
+import { useProcessStore } from "@/store/modules/processView";
 
+const processStore = useProcessStore();
 const dictStore = useDictionaryStore();
 const leftTrees = ref<any[]>([]);
 const leftTreeIndex = ref(0);
@@ -51,13 +59,11 @@ const changeRightEl = (row: any, index: number) => {
   leftTreeIndex.value = index;
   accessoriesDataList(index);
 };
-const testClick = () => {
-  console.log("here---in");
-};
+
 const cacheDataMap = ref(new Map());
-const accessoriesDataList = (index: number) => {
+const accessoriesDataList = (index: number, cache: boolean = true) => {
   //对结果进行缓存 不频繁请求接口
-  if (cacheDataMap.value.has(index)) {
+  if (cacheDataMap.value.has(index) && cache) {
     merterielBoxes.value = cacheDataMap.value.get(index);
     return;
   }
@@ -87,6 +93,26 @@ onMounted(() => {
     accessoriesDataList(0);
   }
 });
+
+// =========叫料数量
+const changeCountRef = ref<InstanceType<typeof ChangeCount>>();
+const clickItem = (box: any) => {
+  changeCountRef.value?.showDialog(box.totalNum, (value: number) => {
+    sporadicCallItem({
+      materials: [
+        {
+          materialName: box.materialName,
+          num: value,
+        },
+      ],
+      processId: processStore.scanInfo.id,
+      workOrderCode: processStore.odersData.workOrderCode,
+    }).then(() => {
+      ElMessage.success("叫料成功");
+      accessoriesDataList(leftTreeIndex.value, false);
+    });
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 0 - 4
src/views/pro-steps/components/operates.vue

@@ -64,10 +64,6 @@ const stepComponents = ref([
     compentType: "jiaoliao",
   },
   {
-    compentName: "工位上料",
-    compentType: "gongweishangliao",
-  },
-  {
     compentName: "物料流转",
     compentType: "liuzhuan",
   },

+ 6 - 6
src/views/repair/operation/components/operates.vue

@@ -1,7 +1,11 @@
 <template>
   <div class="containerBox">
-    <div v-for="(item, index) in stepComponents" :key="index"
-      :class="selectIndex == index ? 'operator active' : 'operator'" @click="setIndex(index)">
+    <div
+      v-for="(item, index) in stepComponents"
+      :key="index"
+      :class="selectIndex == index ? 'operator active' : 'operator'"
+      @click="setIndex(index)"
+    >
       <div class="operatorText">{{ item.compentName }}</div>
       <div class="operatorIcon">
         <svg-icon :icon-class="item.compentType" size="45" />
@@ -57,10 +61,6 @@ const stepComponents = ref([
     compentType: "jiaoliao",
   },
   {
-    compentName: "工位上料",
-    compentType: "gongweishangliao",
-  },
-  {
     compentName: "物料流转",
     compentType: "liuzhuan",
   },

+ 8 - 1
src/views/storage-out/index.vue

@@ -18,7 +18,7 @@
             class="box-item"
             @click="clickBox(item, index)"
           >
-            <div class="box-name">{{ item.vehicleNo }}</div>
+            <div class="box-name">{{ item.vehicleName }}</div>
             <div
               v-for="(material, index) in item.list"
               :key="index"
@@ -139,9 +139,16 @@ const enterBox = () => {
     boxesList.value = res.data;
   });
 };
+
 const clickBox = (box: any, index: number) => {
   currentBox.value = box;
   currentBoxIndex.value = index;
+  box.vehicleName = "改变了";
+
+  let testObj: any = reactive(currentBox.value);
+
+  console.log(testObj);
+  testObj.vehicleName = "ddddd";
 };
 const sureToOut = async () => {
   await toOutBox({