From 7d0a0a1469c5365bbafe1d2f59f84c12828451da Mon Sep 17 00:00:00 2001
From: lewis <604446095@qq.com>
Date: Wed, 22 Jan 2025 16:15:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=95=E9=87=87=E8=B4=AD?=
=?UTF-8?q?=E5=95=86=E5=93=81=E5=85=A5=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/beforehand_order_cart_info.ts | 5 ++
.../beforehand_order/component/goodsOffer.vue | 80 ++++++++++++-------
2 files changed, 57 insertions(+), 28 deletions(-)
diff --git a/src/api/beforehand_order_cart_info.ts b/src/api/beforehand_order_cart_info.ts
index be96260fb..b94ee86b7 100644
--- a/src/api/beforehand_order_cart_info.ts
+++ b/src/api/beforehand_order_cart_info.ts
@@ -67,4 +67,9 @@ export function apiBeforehandOrderCartInfoSyncPrice(params: any) {
// 设置门店出货
export function apiBeforehandOrderCartInfoSetStoreSale(params: any) {
return request.post({ url: '/beforehand_order_cart_info/beforehandordercartinfo/setStoreSale', params })
+}
+
+// 单个商品入库
+export function apiBeforehandOrderCartInfoPutInStorage(params: any) {
+ return request.post({ url: '/beforehand_order_cart_info/beforehandordercartinfo/putInStorage', params })
}
\ No newline at end of file
diff --git a/src/views/order/beforehand_order/component/goodsOffer.vue b/src/views/order/beforehand_order/component/goodsOffer.vue
index 39966db20..a01b1679a 100644
--- a/src/views/order/beforehand_order/component/goodsOffer.vue
+++ b/src/views/order/beforehand_order/component/goodsOffer.vue
@@ -19,14 +19,14 @@
/>
-
一键入库
-
+ -->
@@ -86,7 +86,7 @@
-
+
@@ -218,37 +218,43 @@
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
@@ -281,7 +287,7 @@ import {
apiPurchaseProductOffersetStoreroomInfoTwo,
apiPurchaseProductOfferDelete
} from '@/api/purchase_product_offer'
-import { apiBeforehandOrderCartInfoOneClickStorage } from '@/api/beforehand_order_cart_info'
+import { apiBeforehandOrderCartInfoOneClickStorage, apiBeforehandOrderCartInfoPutInStorage } from '@/api/beforehand_order_cart_info'
import { apiWarehouseLists } from '@/api/warehouse'
import { apiSupplierLists } from '@/api/supplier'
import { useDictData } from '@/hooks/useDictOptions'
@@ -323,9 +329,9 @@ const storeroom = ref({
id: '',
bhoid: order_id.value.id,
product_id: '',
- accept_num: '',
- gross_weight: '',
- net_weight: ''
+ buyer_nums: '',
+ warehouse_id: '',
+ mark: ''
})
const productOfferData = ref({
id: '',
@@ -374,6 +380,21 @@ const setProcureInfo = () => {
getLists()
})
}
+
+const putInStorage = () => {
+ try {
+ apiBeforehandOrderCartInfoPutInStorage(storeroom.value).then((res => {
+ storeroomShow.value = false
+ disableClick.value = false
+ getLists()
+ }))
+ } catch (error) {
+ setTimeout(() => {
+ disableClick.value = false
+ }, 2000)
+ }
+}
+
/**
* 库房信息设置
*/
@@ -424,6 +445,9 @@ const storeroomClick = (data: any) => {
storeroom.value.product_id = data.product_id
storeroom.value.accept_num = data.buyer_nums
storeroomShow.value = true
+ apiWarehouseLists({}).then((res) => {
+ warehouse_list.value = res.lists
+ })
}
const productOfferClick = (data: any) => {
productOfferData.value.id = data.id