From 3a0c9a768487b1b296a829724615c4f7bf9f1016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Sat, 19 Jul 2025 15:19:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E9=87=87=E8=B4=AD=E5=8D=95?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=85=A5=E5=BA=93=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- klp-ui/src/api/wms/stockIo.js | 9 + .../KLPService/WarehouseSelect/index.vue | 119 +++++++ klp-ui/src/utils/enums.js | 24 ++ klp-ui/src/views/wms/order/index.vue | 13 +- klp-ui/src/views/wms/purchasePlan/index.vue | 11 +- .../views/wms/purchasePlan/panels/clac.vue | 18 +- .../views/wms/purchasePlan/panels/detail.vue | 113 +++++- .../views/wms/purchasePlan/panels/stockin.vue | 328 ++++++++++++++++++ 8 files changed, 621 insertions(+), 14 deletions(-) create mode 100644 klp-ui/src/components/KLPService/WarehouseSelect/index.vue create mode 100644 klp-ui/src/utils/enums.js create mode 100644 klp-ui/src/views/wms/purchasePlan/panels/stockin.vue diff --git a/klp-ui/src/api/wms/stockIo.js b/klp-ui/src/api/wms/stockIo.js index f0d4092f..1eeee2ed 100644 --- a/klp-ui/src/api/wms/stockIo.js +++ b/klp-ui/src/api/wms/stockIo.js @@ -81,3 +81,12 @@ export function updateStockIoStatus(stockIoId, status) { } }) } + + +export function addStockIoWithDetail(data) { + return request({ + url: '/wms/stockIo/withDetail', + method: 'post', + data: data + }) +} diff --git a/klp-ui/src/components/KLPService/WarehouseSelect/index.vue b/klp-ui/src/components/KLPService/WarehouseSelect/index.vue new file mode 100644 index 00000000..00de50e2 --- /dev/null +++ b/klp-ui/src/components/KLPService/WarehouseSelect/index.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/klp-ui/src/utils/enums.js b/klp-ui/src/utils/enums.js new file mode 100644 index 00000000..b88e0a2d --- /dev/null +++ b/klp-ui/src/utils/enums.js @@ -0,0 +1,24 @@ +// 订单状态 +export const EOrderStatus = { + NEW: 0, + PRODUCTIONING: 1, + FINISH: 2, + CANCEL: 3 +} + +// 采购计划状态 +export const EPurchasePlanStatus = { + NEW: 0, + PRUCHASEING: 1, + FINISH: 2, + CANCEL: 3 +} + +// 采购明细状态 +export const EPurchaseDetailStatus = { + NEW: 0, + ONWAY: 1, + ARRIVAL: 2, + REVIEW: 3, + FINISH: 4 +} \ No newline at end of file diff --git a/klp-ui/src/views/wms/order/index.vue b/klp-ui/src/views/wms/order/index.vue index 64bb0c02..33daca4f 100644 --- a/klp-ui/src/views/wms/order/index.vue +++ b/klp-ui/src/views/wms/order/index.vue @@ -116,6 +116,7 @@ type="text" icon="el-icon-s-operation" @click="showClac(scope.row)" + v-if="scope.row.orderStatus === EOrderStatus.NEW" >智能采购单 @@ -158,7 +159,7 @@ - + @@ -167,6 +168,7 @@ import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/wms/order"; import OrderDetailPanel from './panels/detail.vue'; import ClacPanel from '../purchasePlan/panels/clac.vue'; +import { EOrderStatus } from "@/utils/enums"; export default { name: "Order", @@ -174,6 +176,8 @@ export default { dicts: ['order_status'], data() { return { + // 订单状态枚举 + EOrderStatus, // 按钮loading buttonLoading: false, // 遮罩层 @@ -227,6 +231,13 @@ export default { this.loading = false; }); }, + /** 推荐采购计划确认 */ + handleRecommendConfirm(data) { + console.log('推荐采购计划数据:', data); + this.$modal.msgSuccess("推荐采购计划已生成"); + this.clacDialogVisible = false; + this.getList(); // 刷新列表 + }, // 取消按钮 cancel() { this.open = false; diff --git a/klp-ui/src/views/wms/purchasePlan/index.vue b/klp-ui/src/views/wms/purchasePlan/index.vue index 233c8ae7..f92f69cb 100644 --- a/klp-ui/src/views/wms/purchasePlan/index.vue +++ b/klp-ui/src/views/wms/purchasePlan/index.vue @@ -191,11 +191,6 @@ - - - @@ -253,6 +248,7 @@ import { listPurchasePlan, getPurchasePlan, delPurchasePlan, addPurchasePlan, up import { listOrder } from "@/api/wms/order"; import PurchasePlanClac from "./panels/clac.vue"; import PurchasePlanDetail from "./panels/detail.vue"; +import { EOrderStatus } from "../../../utils/enums"; export default { name: "PurchasePlan", @@ -315,7 +311,6 @@ export default { orderCode: undefined, customerName: undefined, salesManager: undefined, - orderStatus: undefined, }, // 表单参数 form: {}, @@ -336,7 +331,7 @@ export default { } }; }, - created() { + mounted() { this.getList(); }, methods: { @@ -459,7 +454,7 @@ export default { /** 获取订单列表 */ getOrderList() { this.orderLoading = true; - listOrder(this.orderQueryParams).then(response => { + listOrder({...this.orderQueryParams, orderStatus: EOrderStatus.NEW}).then(response => { this.orderList = response.rows; this.orderTotal = response.total; this.orderLoading = false; diff --git a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue index 047ecc1b..44ed7d89 100644 --- a/klp-ui/src/views/wms/purchasePlan/panels/clac.vue +++ b/klp-ui/src/views/wms/purchasePlan/panels/clac.vue @@ -72,6 +72,14 @@ + + \ No newline at end of file