diff --git a/src/views/mes/wm/wmsInTask/index.vue b/src/views/mes/wm/wmsInTask/index.vue
index 8f17161..234acd9 100644
--- a/src/views/mes/wm/wmsInTask/index.vue
+++ b/src/views/mes/wm/wmsInTask/index.vue
@@ -18,52 +18,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -90,29 +44,37 @@
-
-
-
-
-
-
-
+
+ 推出库位
+
+ 推入库位
+
+
+
+ 下发
+
+
下发
+ @click="manualIssue(scope.row)"
+ >手动入库
-
-
-
-
-
-
-
-
@@ -169,7 +131,7 @@ import {
delWmsInTask,
addWmsInTask,
updateWmsInTask,
- issueBatchWmsInTask, issueWmsInTaskToWcs
+ issueBatchWmsInTask, issueInTaskWcsLTK, issueInTaskWcsDJ
} from "@/api/mes/wm/wmsInTask";
import {listTYPE} from "@/api/md/TYPE";
import {listWmsInPlanDetailsEntity} from "@/api/mes/wm/wmsInPlanDetailsEntity";
@@ -218,7 +180,7 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
- isActivy: null,
+ isActive: null,
isDelete: null,
batch: null,
materialId: null,
@@ -272,13 +234,12 @@ export default {
}
return id
},
- // 下发任务至 WCS
- handleIssue(task) {
- let warehouseTypeCode = ""
- // 刀片入库 则入 立体库
- if (task.planTypeId === "8") {
- warehouseTypeCode = "LTK"
- }
+ /**
+ * 下发任务至 WCS
+ * @param task
+ * @param type 出库或入库
+ */
+ handleIssueWcs(task, type = "RK") {
const param = {
// 计划ID
planId: task.planInId,
@@ -287,25 +248,48 @@ export default {
// 库位 信息
cellCode: task.cellCode,
// 库房类型编码
- warehouseTypeCode,
+ warehouseTypeCode: "",
// 物料信息
materialId: task.materialId,
materialCode: task.materialCode,
materialName: task.materialName,
materialCount: task.actualInQuantity,
- rfid: "",
+ rfid: "123456789AAA",
// 出库OR入库
- type: "RK",
+ type,
}
- console.log(task)
- issueWmsInTaskToWcs(param).then(res => {
- console.log(res)
- this.$modal.msgSuccess("下发成功");
- })
- // issueBatchWmsInTask([task.id.toString()]).then(response => {
- // this.$modal.msgSuccess("执行成功");
- // this.getList();
- // });
+ /** 刀片入库|刀柄入库|拆刀回库 入 立体库 */
+ if (["DPRK", "DBRK", "CDHK"].includes(task.planTypeCode)) {
+ param.warehouseTypeCode = "LTK"
+ issueInTaskWcsLTK(param).then(res => {
+ if (type === "RK") {
+ task.planInStatus = "YTR"
+ this.$modal.msgSuccess("推入库位");
+ } else if (type === "CK") {
+ task.planInStatus = "YTC"
+ this.$modal.msgSuccess("推出库位");
+ }
+ // 更新 当前任务状态
+ updateWmsInTask(task).then(res => {
+ this.getList();
+ })
+ })
+ } else if (["ZDHK", "ZDRK"].includes(task.planTypeCode)) {
+ /** 整刀回库|组刀入库 入 刀具库 */
+ param.warehouseTypeCode = "DJ"
+ issueInTaskWcsDJ(param).then(res => {
+ this.$modal.msgSuccess("下发成功");
+ })
+ }
+ },
+ /**
+ * 手动执行入库任务
+ */
+ manualIssue(task) {
+ issueBatchWmsInTask([task.id.toString()]).then(response => {
+ this.$modal.msgSuccess("执行成功");
+ this.getList();
+ });
},
// 取消按钮
cancel() {