Browse Source

1.齐套叫料。2.委外

jiaxiaoqiang 1 năm trước cách đây
mục cha
commit
21d0f26c1d

+ 9 - 8
src/api/process/callMateriel.ts

@@ -1,18 +1,19 @@
 import request from "@/utils/request";
 
-// 通过物料编码获取库存信息
-export function stockMaterialList(materialCode: string) {
+// 载具绑定工序物料详情列表查询(齐套叫料箱子列表)
+export function boxSuitList(p: object) {
   return request({
-    url: `/api/v1/wms/stock/stockMaterial/${materialCode}`,
-    method: "get",
+    url: `/api/v1/process/vehicleOperation/list`,
+    method: "post",
+    data: p,
   });
 }
 
-// 不合格品分布情况及工序(通过序列号获取关联工序)
-export function operationListByIds11(ids: string[]) {
+// 载具绑定工序物料详情列表查询(根据绑定在工序中的料箱id 获取详情)
+export function boxSuitDetailByBoxId(p: object) {
   return request({
-    url: `/api/v1/process/escalationFault/operation/list`,
+    url: `/api/v1/process/vehicleMaterial/list`,
     method: "post",
-    data: { seqNoList: ids },
+    data: p,
   });
 }

+ 1 - 0
src/views/material-flow/creatTask.vue

@@ -112,6 +112,7 @@ const materialList = ref<any>([]);
 
 const handleScanCodeInput = () => {
   getMaterialInfoByLabel(scanCodeInput.value).then((res) => {
+    res.data.batchCode = scanCodeInput.value;
     materialList.value.push(res.data);
     scanCodeInput.value = "";
   });

+ 16 - 3
src/views/pro-operation/appoint-out/record.vue

@@ -37,6 +37,7 @@
     :total="page.total"
     @pagination="paginationChange"
   />
+  <ConfirmMessage ref="confirmMessageRef" />
 </template>
 
 <script lang="ts" setup>
@@ -47,6 +48,7 @@ import {
   reveiveRecord,
 } from "@/api/process/appointOut";
 import { useDictionaryStore } from "@/store";
+import ConfirmMessage from "@/components/CommonDialogs/ConfirmMessage.vue";
 
 const dictS = useDictionaryStore();
 
@@ -59,14 +61,24 @@ const page = reactive({
 const tableData = ref<any>([]);
 
 const handleClick = (row: any) => {
-  reveiveRecord([{ seqNo: row.details.seqNo, outsourceId: row.id }]).then(
+  confirmMessageRef.value?.showDialog(
+    "工位上料提示",
+    "料箱:LX1321312已到达缓存位,是否立即工位上料?",
+    "工位上料",
     () => {
-      ElMessage.success("接收成功");
-      getData();
+      reveiveRecord([{ seqNo: row.details.seqNo, outsourceId: row.id }]).then(
+        () => {
+          ElMessage.success("接收成功");
+          getData();
+        }
+      );
     }
   );
 };
 
+// =========确认弹窗
+const confirmMessageRef = ref<InstanceType<typeof ConfirmMessage>>();
+
 const deleteRecord = (row: any) => {
   deleteRecordById(row.id).then(() => {
     ElMessage.success("删除成功");
@@ -89,6 +101,7 @@ const getData = () => {
 };
 
 onMounted(() => {
+  console.log("onMounted");
   getData();
   emitter.on(EventsNames.APPOINT_OUT, () => {
     getData();

+ 60 - 50
src/views/pro-operation/call-materiel/complete-suit.vue

@@ -1,73 +1,74 @@
 <template>
-  <el-scrollbar>
+  <el-scrollbar v-loading="isLoading">
     <div class="grid-container">
       <div
         v-for="(box, index) in merterielBoxes"
         :key="index"
         class="suit-box"
-        @click="testClick(index)"
+        @click="getSuitDetail(box)"
       >
-        <div class="suit-title">{{ box.title }}短发的</div>
-        <div class="suit-desc">{{ box.desc }}对待</div>
+        <div class="suit-title">{{ box.vehicleName }}</div>
+        <div class="suit-desc">{{ box.vehicleCode }}</div>
+        <div class="suit-desc">{{ box.updated }}</div>
         <svg-icon class="svgStyle" icon-class="jiaobiao" size="25" />
       </div>
     </div>
   </el-scrollbar>
-  <CallHistory ref="callHistoryRef" />
+  <el-button class="call-btn" round type="primary" @click="toCall"
+    >叫料
+  </el-button>
+
   <MarterielBoxDetail ref="materielBoxDetailRef" />
-  <ChangeCount ref="changeCountRef" description="双面胶黑色" title="叫料数量" />
-  <ConfirmMessage ref="confirmMessageRef" />
 </template>
 
 <script lang="ts" setup>
-import CallHistory from "@/views/pro-operation/call-materiel/components/call-history.vue";
 import MarterielBoxDetail from "@/views/pro-operation/call-materiel/components/materiel-box-detail.vue";
-import ChangeCount from "@/components/CommonDialogs/ChangeCount.vue";
-import ConfirmMessage from "@/components/CommonDialogs/ConfirmMessage.vue";
-
-const merterielBoxes = ref<any>([
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-  {},
-]);
-
-// =========叫料历史
-const callHistoryRef = ref<InstanceType<typeof CallHistory>>();
+
+import { boxSuitDetailByBoxId, boxSuitList } from "@/api/process/callMateriel";
+import { useProcessStore } from "@/store/modules/processView";
+
+const processStore = useProcessStore();
+const merterielBoxes = ref<any[]>([]);
+
+const isLoading = ref(false);
+
+const getList = () => {
+  isLoading.value = true;
+  boxSuitList({
+    operationId: processStore.odersData.operationId,
+    workOrderCode: processStore.odersData.workOrderCode,
+    isFull: true,
+  })
+    .then((res) => {
+      merterielBoxes.value = res.data;
+      merterielBoxes.value = res.data;
+      merterielBoxes.value = res.data;
+    })
+    .finally(() => {
+      isLoading.value = false;
+    });
+};
+
+onMounted(() => {
+  getList();
+});
 
 // =========料箱详情
+const detailList = ref<any[]>([]);
 const materielBoxDetailRef = ref<InstanceType<typeof MarterielBoxDetail>>();
-// =========叫料数量
-const changeCountRef = ref<InstanceType<typeof ChangeCount>>();
-
-// =========确认弹窗
-const confirmMessageRef = ref<InstanceType<typeof ConfirmMessage>>();
-
-const testClick = (index: number) => {
-  callHistoryRef.value?.showDrawer(index);
-  materielBoxDetailRef.value?.showDialog("", () => {});
-  changeCountRef.value?.showDialog(12, (value: number) => {
-    console.log(value);
-  });
-  confirmMessageRef.value?.showDialog(
-    "工位上料提示",
-    "料箱:LX1321312已到达缓存位,是否立即工位上料?",
-    "工位上料",
-    () => {}
-  );
+const getSuitDetail = (box: any) => {
+  isLoading.value = true;
+  boxSuitDetailByBoxId({ vehicleOperationId: box.id })
+    .then((res) => {
+      detailList.value = res.data;
+      materielBoxDetailRef.value?.showDialog(box, detailList.value, () => {});
+    })
+    .finally(() => {
+      isLoading.value = false;
+    });
 };
+
+const toCall = () => {};
 </script>
 
 <style lang="scss" scoped>
@@ -113,4 +114,13 @@ const testClick = (index: number) => {
     }
   }
 }
+
+.call-btn {
+  position: fixed;
+  top: 80px;
+  left: 650px;
+  height: 80px;
+  width: 200px;
+  font-size: 24px;
+}
 </style>

+ 15 - 7
src/views/pro-operation/call-materiel/components/materiel-box-detail.vue

@@ -7,8 +7,8 @@
       :title="null"
       close-icon="null"
     >
-      <div class="top-title">料箱详情</div>
-      <div class="desc-title">LX22112233221122</div>
+      <div class="top-title">{{ boxObj?.vehicleName }}</div>
+      <div class="desc-title">{{ boxObj?.vehicleCode }}</div>
       <div class="center-content">
         <el-scrollbar>
           <div
@@ -17,11 +17,11 @@
             class="item-container"
           >
             <div>
-              <div class="item-header">{{ item?.header }}header</div>
-              <div class="item-describe">{{ item?.describe1 }}header</div>
+              <div class="item-header">{{ item?.materialName }}</div>
+              <div class="item-describe">{{ item?.spec }}</div>
             </div>
             <div>
-              <span class="item-count">{{ item?.count }}50</span>
+              <span class="item-count">{{ item?.num }}</span>
               <span class="item-unit">{{ item?.unit }}个</span>
             </div>
           </div>
@@ -43,10 +43,18 @@ const visible = ref(false);
 
 let callBack: Function | null = null;
 
-const materielListData = ref<any>([{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]);
+const materielListData = ref<any[]>([]);
 
-const showDialog = (id: string, callback: Function | null) => {
+const boxObj = ref<any>({});
+
+const showDialog = (
+  box: object,
+  listData: any[],
+  callback: Function | null
+) => {
+  boxObj.value = box;
   visible.value = true;
+  materielListData.value = listData;
   callBack = callback;
 };
 

+ 5 - 6
src/views/pro-operation/call-materiel/index.vue

@@ -11,11 +11,11 @@
           <CompleteSuit />
         </div>
       </el-tab-pane>
-      <el-tab-pane label="未齐套叫料" name="second">
-        <div class="contentBox">
-          <InCompleteSuit />
-        </div>
-      </el-tab-pane>
+      <!--      <el-tab-pane label="未齐套叫料" name="second">-->
+      <!--        <div class="contentBox">-->
+      <!--          <InCompleteSuit />-->
+      <!--        </div>-->
+      <!--      </el-tab-pane>-->
       <el-tab-pane label="零星叫料" name="third">
         <div class="contentBox" style="border: 2px solid blueviolet">
           <Desperse />
@@ -29,7 +29,6 @@
 import { ref } from "vue";
 import type { TabsPaneContext } from "element-plus";
 import CompleteSuit from "@/views/pro-operation/call-materiel/complete-suit.vue";
-import InCompleteSuit from "@/views/pro-operation/call-materiel/in-complete-suit.vue";
 import Desperse from "@/views/pro-operation/call-materiel/desperse.vue";
 
 const activeName = ref("first");