ソースを参照

演示出入库

dengrui 1 ヶ月 前
コミット
188291a2a0
2 ファイル変更33 行追加1 行削除
  1. 14 0
      src/api/process/index.ts
  2. 19 1
      src/views/pro-steps/index.vue

+ 14 - 0
src/api/process/index.ts

@@ -31,6 +31,20 @@ export function getScan(data: any) {
     data: data,
   });
 }
+export function carCall(data: any) {
+  return request({
+    url: "/api/v1/wms/common/callMaterial",
+    method: "post",
+    data: data,
+  });
+}
+export function carBack(data: any) {
+  return request({
+    url: "/api/v1/wms/common/stockIn",
+    method: "post",
+    data: data,
+  });
+}
 // 流程叫料
 export function callItems(data: any) {
   return request(

+ 19 - 1
src/views/pro-steps/index.vue

@@ -90,7 +90,16 @@
             </template>
           </div>
           <!-- 侧边栏盒子 -->
-          <div class="commonTitle">工序</div>
+          <div
+            class="commonTitle"
+            style="display: flex; justify-content: space-between"
+          >
+            工序
+            <div v-if="selectStepIndex !== null">
+              <el-button type="primary" @click="toCall" link>叫料</el-button>
+              <el-button type="warning" @click="toBack" link>回库</el-button>
+            </div>
+          </div>
           <el-scrollbar
             style="height: calc(100vh - 220px); padding-bottom: 60px"
           >
@@ -238,10 +247,19 @@ import { useProcessStore } from "@/store";
 import { getOpCompent } from "@/api/prosteps";
 import { getOrders } from "@/api/process";
 import { getScan } from "@/api/process";
+import { carCall, carBack } from "@/api/process";
 
 defineOptions({
   name: "ProSteps",
 });
+const toCall = async () => {
+  await carCall();
+  ElMessage.success("呼叫成功,请等待");
+};
+const toBack = async () => {
+  await carBack();
+  ElMessage.success("操作成功,请等待");
+};
 const popStatus = ref(null);
 const openPop = async () => {
   await getTaskArray();