From ee27e58d53acdef176e762896dae1d1b828e9050 Mon Sep 17 00:00:00 2001
From: mkm <727897186@qq.com>
Date: Mon, 30 Sep 2024 16:44:59 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=EF=BC=8C=E5=8C=85=E6=8B=AC=E5=9F=BA=E7=A1=80URL?=
=?UTF-8?q?=E6=9B=B4=E6=8D=A2=E3=80=81API=E6=8E=A5=E5=8F=A3=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=E3=80=81=E8=A1=A8=E5=8D=95=E8=BE=93=E5=85=A5=E9=A1=B9?=
=?UTF-8?q?=E6=9B=B4=E6=94=B9=E3=80=81=E8=A1=A8=E6=A0=BC=E5=88=97=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9=E3=80=81=E5=BC=B9=E7=AA=97=E7=BB=84=E4=BB=B6=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9=E7=AD=89=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
src/api/beforehand_order.ts | 26 ++
src/api/beforehand_order_cart_info.ts | 38 ++
src/views/order/beforehand_order/add.vue | 13 +-
src/views/order/beforehand_order/details.vue | 363 ++++++++++++++++++
.../order/beforehand_order/editProduct.vue | 139 +++++++
src/views/order/beforehand_order/index.vue | 60 +--
7 files changed, 584 insertions(+), 57 deletions(-)
create mode 100644 src/api/beforehand_order.ts
create mode 100644 src/api/beforehand_order_cart_info.ts
create mode 100644 src/views/order/beforehand_order/details.vue
create mode 100644 src/views/order/beforehand_order/editProduct.vue
diff --git a/.env.development b/.env.development
index 2eb6f394..522e48fc 100644
--- a/.env.development
+++ b/.env.development
@@ -6,6 +6,6 @@ VITE_NOW_TYPE = 'dist'
# VITE_APP_BASE_URL='http://192.168.1.10:8546'
# VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn'
# VITE_APP_BASE_URL='https://multi-store.lihaink.cn'
-VITE_APP_BASE_URL='http://192.168.1.6:8545'
+VITE_APP_BASE_URL='http://192.168.1.22:8545'
# VITE_APP_BASE_URL='https://ceshi-multi-store.lihaink.cn'
diff --git a/src/api/beforehand_order.ts b/src/api/beforehand_order.ts
new file mode 100644
index 00000000..78104d0f
--- /dev/null
+++ b/src/api/beforehand_order.ts
@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 预订单表列表
+export function apiBeforehandOrderLists(params: any) {
+ return request.get({ url: '/beforehand_order/beforehandorder/lists', params })
+}
+
+// 添加预订单表
+export function apiBeforehandOrderAdd(params: any) {
+ return request.post({ url: '/beforehand_order/beforehandorder/add', params })
+}
+
+// 编辑预订单表
+export function apiBeforehandOrderEdit(params: any) {
+ return request.post({ url: '/beforehand_order/beforehandorder/edit', params })
+}
+
+// 删除预订单表
+export function apiBeforehandOrderDelete(params: any) {
+ return request.post({ url: '/beforehand_order/beforehandorder/delete', params })
+}
+
+// 预订单表详情
+export function apiBeforehandOrderDetail(params: any) {
+ return request.get({ url: '/beforehand_order/beforehandorder/detail', params })
+}
diff --git a/src/api/beforehand_order_cart_info.ts b/src/api/beforehand_order_cart_info.ts
new file mode 100644
index 00000000..fd7218e3
--- /dev/null
+++ b/src/api/beforehand_order_cart_info.ts
@@ -0,0 +1,38 @@
+import request from '@/utils/request'
+
+// 预订单购物详情表列表
+export function apiBeforehandOrderCartInfoLists(params: any) {
+ return request.get({ url: '/beforehand_order_cart_info/beforehandordercartinfo/lists', params })
+}
+
+// 添加预订单购物详情表
+export function apiBeforehandOrderCartInfoAdd(params: any) {
+ return request.post({ url: '/beforehand_order_cart_info/beforehandordercartinfo/add', params })
+}
+
+// 编辑预订单购物详情表
+export function apiBeforehandOrderCartInfoEdit(params: any) {
+ return request.post({ url: '/beforehand_order_cart_info/beforehandordercartinfo/edit', params })
+}
+export function apiBeforehandOrderCartInfoAppendAdd(params: any) {
+ return request.post({
+ url: '/beforehand_order_cart_info/beforehandordercartinfo/append_add',
+ params
+ })
+}
+
+// 删除预订单购物详情表
+export function apiBeforehandOrderCartInfoDelete(params: any) {
+ return request.post({
+ url: '/beforehand_order_cart_info/beforehandordercartinfo/delete',
+ params
+ })
+}
+
+// 预订单购物详情表详情
+export function apiBeforehandOrderCartInfoDetail(params: any) {
+ return request.get({
+ url: '/beforehand_order_cart_info/beforehandordercartinfo/detail',
+ params
+ })
+}
diff --git a/src/views/order/beforehand_order/add.vue b/src/views/order/beforehand_order/add.vue
index 8cb14467..06141d57 100644
--- a/src/views/order/beforehand_order/add.vue
+++ b/src/views/order/beforehand_order/add.vue
@@ -93,7 +93,7 @@ import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import { onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
-import { apiWarehouseOrderAdd } from '@/api/warehouse_order'
+import { apiBeforehandOrderAdd } from '@/api/beforehand_order'
import { apiWarehouseLists } from '@/api/warehouse'
import { apiSupplierLists } from '@/api/supplier'
@@ -122,12 +122,6 @@ const formData = reactive({
completed_amount: 0
})
-const warehouse = () => {
- apiWarehouseLists({}).then((res) => {
- warehouseList.value = res.lists
- })
-}
-
const showProduct = ref(false) // 选择商品列表是否显示
// 商品列表
const productList = ref([])
@@ -183,7 +177,7 @@ const handleSubmit = async () => {
expiration_date: item.expiration_date
}
})
- apiWarehouseOrderAdd({
+ apiBeforehandOrderAdd({
product_arr,
...formData
}).then((res) => {
@@ -192,7 +186,7 @@ const handleSubmit = async () => {
// ElMessage.success(res.msg)
setTimeout(() => {
router.push({
- path: '/warehouse/warehouse_order'
+ path: '/order/beforehand_order'
})
}, 2000)
// } else {
@@ -200,5 +194,4 @@ const handleSubmit = async () => {
// }
})
}
-warehouse()
diff --git a/src/views/order/beforehand_order/details.vue b/src/views/order/beforehand_order/details.vue
new file mode 100644
index 00000000..bac14559
--- /dev/null
+++ b/src/views/order/beforehand_order/details.vue
@@ -0,0 +1,363 @@
+
+