From 4530c68ea3f172b9e01f3f4eec794955b086dcba Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sun, 29 Sep 2024 22:00:26 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E7=9A=84URL=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/views/order/beforehand_order/add.vue | 204 +++++++++++++++++ src/views/order/beforehand_order/index.vue | 254 +++++++++++++++++++++ 3 files changed, 459 insertions(+), 1 deletion(-) create mode 100644 src/views/order/beforehand_order/add.vue create mode 100644 src/views/order/beforehand_order/index.vue diff --git a/.env.development b/.env.development index 522e48fce..2eb6f3946 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.22:8545' +VITE_APP_BASE_URL='http://192.168.1.6:8545' # VITE_APP_BASE_URL='https://ceshi-multi-store.lihaink.cn' diff --git a/src/views/order/beforehand_order/add.vue b/src/views/order/beforehand_order/add.vue new file mode 100644 index 000000000..8cb144673 --- /dev/null +++ b/src/views/order/beforehand_order/add.vue @@ -0,0 +1,204 @@ + + + diff --git a/src/views/order/beforehand_order/index.vue b/src/views/order/beforehand_order/index.vue new file mode 100644 index 000000000..6cbf3b049 --- /dev/null +++ b/src/views/order/beforehand_order/index.vue @@ -0,0 +1,254 @@ + + + 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 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=8C=85=E6=8B=AC=E5=9F=BA=E7=A1=80?= =?UTF-8?q?URL=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 2eb6f3946..522e48fce 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 000000000..78104d0ff --- /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 000000000..fd7218e37 --- /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 8cb144673..06141d57f 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 000000000..bac145594 --- /dev/null +++ b/src/views/order/beforehand_order/details.vue @@ -0,0 +1,363 @@ + + + diff --git a/src/views/order/beforehand_order/editProduct.vue b/src/views/order/beforehand_order/editProduct.vue new file mode 100644 index 000000000..e844d9667 --- /dev/null +++ b/src/views/order/beforehand_order/editProduct.vue @@ -0,0 +1,139 @@ + + + diff --git a/src/views/order/beforehand_order/index.vue b/src/views/order/beforehand_order/index.vue index 6cbf3b049..e7075c83e 100644 --- a/src/views/order/beforehand_order/index.vue +++ b/src/views/order/beforehand_order/index.vue @@ -2,34 +2,14 @@
- + - - - - - 重置 @@ -60,21 +40,17 @@ }" class="ml-4" > - 入库 + 添加
- - - + - - @@ -83,14 +59,6 @@ 详情 - - 编辑 - + /> --> --> + />
@@ -131,12 +99,12 @@ import { apiWarehouseOrderLists, apiWarehouseOrderDelete } from '@/api/warehouse import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' // import EditPopup from './edit.vue' -// import DetailsPopup from './details.vue' +import DetailsPopup from './details.vue' import { apiSystemStoreLists } from '@/api/system_store' import moment from 'moment' -import { apiSupplierLists } from '@/api/supplier' +import { apiBeforehandOrderLists } from '@/api/beforehand_order' // const editRef = shallowRef>() -// const detailsRef = shallowRef>() +const detailsRef = shallowRef>() // 是否显示编辑框 const showEdit = ref(false) @@ -144,7 +112,7 @@ const showDetails = ref(false) // 查询条件 const queryParams = reactive({ - warehouse_id: '', + order_id: '', product_name: '', financial_pm: 1, store_id: '', @@ -166,7 +134,7 @@ const { dictData } = useDictData('') // 分页相关 const { pager, getLists, resetParams, resetPage } = usePaging({ - fetchFun: apiWarehouseOrderLists, + fetchFun: apiBeforehandOrderLists, params: queryParams }) @@ -235,7 +203,7 @@ const userloading = ref(false) const userList = ref([]) const remoteMethodUser = (e = '') => { userloading.value = true - apiSupplierLists({ mer_name: e }) + apiBeforehandOrderLists({ mer_name: e }) .then((res) => { userList.value = res.lists setTimeout(() => { From 6af668c2b7589b3ff68fcb3e35087dc3cccfae09 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 30 Sep 2024 18:01:12 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=96=B0=E6=8F=90=E4=BA=A4=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=9C=A8=E2=80=9C=E8=AE=A2=E5=8D=95=E2=80=9D?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=AD=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E6=96=B0=E7=9A=84=E6=A0=87=E7=AD=BE=E9=A1=B5=EF=BC=9A?= =?UTF-8?q?=E2=80=9C=E9=87=87=E8=B4=AD=E2=80=9D=E3=80=81=E2=80=9C=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E2=80=9D=E5=92=8C=E2=80=9C=E5=87=BA=E5=BA=93=E2=80=9D?= =?UTF-8?q?=E3=80=82=E8=BF=99=E6=9C=89=E5=8A=A9=E4=BA=8E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=9B=B4=E5=85=A8=E9=9D=A2=E5=9C=B0=E4=BA=86=E8=A7=A3=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF=E3=80=82?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E5=B0=86=E6=8F=90=E4=BA=A4=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=BA=E2=80=9C=E6=B7=BB=E5=8A=A0'?= =?UTF-8?q?=E9=87=87=E8=B4=AD'=E3=80=81'=E5=85=A5=E5=BA=93'=E3=80=81'?= =?UTF-8?q?=E5=87=BA=E5=BA=93'=E6=A0=87=E7=AD=BE=E9=A1=B5=E2=80=9D?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/beforehand_order/details.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/order/beforehand_order/details.vue b/src/views/order/beforehand_order/details.vue index bac145594..631f552af 100644 --- a/src/views/order/beforehand_order/details.vue +++ b/src/views/order/beforehand_order/details.vue @@ -74,6 +74,9 @@
+ + + From 3812ab5074f13caae4dfe8e8e940e10939b21610 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 5 Oct 2024 16:21:26 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=BC=80=E5=8F=91=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=A2=84=E8=AE=A2=E5=8D=95=E5=8A=9F=E8=83=BD=E5=8F=8A=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增预订单购物车详情相关接口 - 新增采购信息设置和一键入库功能 - 修改预订单列表和详情页面,增加采购和出入库相关功能 - 优化预订单商品表格,增加是否需采购列 - 新增采购人员选择功能 --- .env.development | 2 +- src/api/beforehand_order.ts | 13 + src/api/beforehand_order_cart_info.ts | 14 + src/api/purchase_product_offer.ts | 7 + src/views/order/beforehand_order/add.vue | 2 +- .../beforehand_order/component/goodsOffer.vue | 252 ++++++++++++++++++ .../beforehand_order/component/outbound.vue | 143 ++++++++++ .../component/warehousing.vue | 51 ++++ src/views/order/beforehand_order/details.vue | 183 ++++++++++--- 9 files changed, 632 insertions(+), 35 deletions(-) create mode 100644 src/views/order/beforehand_order/component/goodsOffer.vue create mode 100644 src/views/order/beforehand_order/component/outbound.vue create mode 100644 src/views/order/beforehand_order/component/warehousing.vue diff --git a/.env.development b/.env.development index 522e48fce..1c94c0ca7 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.22:8545' +VITE_APP_BASE_URL='http://192.168.1.7: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 index 78104d0ff..dd9074d25 100644 --- a/src/api/beforehand_order.ts +++ b/src/api/beforehand_order.ts @@ -14,6 +14,10 @@ export function apiBeforehandOrderAdd(params: any) { export function apiBeforehandOrderEdit(params: any) { return request.post({ url: '/beforehand_order/beforehandorder/edit', params }) } +// 一键入库 +export function apiBeforehandOrderCreateOutboundOrder(params: any) { + return request.post({ url: '/beforehand_order/beforehandorder/createOutboundOrder', params }) +} // 删除预订单表 export function apiBeforehandOrderDelete(params: any) { @@ -24,3 +28,12 @@ export function apiBeforehandOrderDelete(params: any) { export function apiBeforehandOrderDetail(params: any) { return request.get({ url: '/beforehand_order/beforehandorder/detail', params }) } + +// 入库列表 +export function apiBeforehandOrderWarehousingLists(params: any) { + return request.get({ url: '/beforehand_order/beforehandorder/warehousing_lists', params }) +} +// 出库列表 +export function apiBeforehandOrderOutboundLists(params: any) { + return request.get({ url: '/beforehand_order/beforehandorder/outbound_lists', params }) +} diff --git a/src/api/beforehand_order_cart_info.ts b/src/api/beforehand_order_cart_info.ts index fd7218e37..ff717903d 100644 --- a/src/api/beforehand_order_cart_info.ts +++ b/src/api/beforehand_order_cart_info.ts @@ -28,6 +28,20 @@ export function apiBeforehandOrderCartInfoDelete(params: any) { params }) } +// 编辑预订单购物详情无需采购 +export function apiBeforehandOrderCartInfoProcurementStatus(params: any) { + return request.post({ + url: '/beforehand_order_cart_info/beforehandordercartinfo/procurement_status', + params + }) +} +// 一键入库 +export function apiBeforehandOrderCartInfoOneClickStorage(params: any) { + return request.post({ + url: '/beforehand_order_cart_info/beforehandordercartinfo/one_click_storage', + params + }) +} // 预订单购物详情表详情 export function apiBeforehandOrderCartInfoDetail(params: any) { diff --git a/src/api/purchase_product_offer.ts b/src/api/purchase_product_offer.ts index 9e33a0a9c..3c91a882f 100644 --- a/src/api/purchase_product_offer.ts +++ b/src/api/purchase_product_offer.ts @@ -19,6 +19,13 @@ export function apiPurchaseProductOfferEdit(params: any) { export function apiPurchaseProductOfferDelete(params: any) { return request.post({ url: '/purchase_product_offer/purchaseproductoffer/delete', params }) } +// 设置采购信息 +export function apiPurchaseProductOfferSetProcureInfo(params: any) { + return request.post({ + url: '/purchase_product_offer/purchaseproductoffer/setProcureInfo', + params + }) +} // 采购供应链商品详情 export function apiPurchaseProductOfferDetail(params: any) { diff --git a/src/views/order/beforehand_order/add.vue b/src/views/order/beforehand_order/add.vue index 06141d57f..f9765c721 100644 --- a/src/views/order/beforehand_order/add.vue +++ b/src/views/order/beforehand_order/add.vue @@ -1,6 +1,6 @@ - + + + + + + - - + + - - + + - + - + - - - - + + + + diff --git a/src/views/order/beforehand_order/component/goodsOffer.vue b/src/views/order/beforehand_order/component/goodsOffer.vue index b3c49de4f..84d6a043b 100644 --- a/src/views/order/beforehand_order/component/goodsOffer.vue +++ b/src/views/order/beforehand_order/component/goodsOffer.vue @@ -75,6 +75,14 @@ /> + + + - + + + + { + formData.value = { + id: '', + bhoid: props.order_id, + supplier_id: '', + purchase: 0, + price: 0, + total_price: 0, + buyer_nums: 0 + } +} const oneClickStorage = () => { apiBeforehandOrderCartInfoOneClickStorage(one_click_storage.value).then((res) => { dialogBuyer.value = false @@ -205,13 +238,18 @@ const oneClickStorage = () => { const setProcureInfo = () => { apiPurchaseProductOfferSetProcureInfo(formData.value).then((res) => { procureShow.value = false + resetFormData() getLists() }) } const procureClick = (data: any) => { formData.value.id = data.id + formData.value.buyer_nums = data.need_num procureShow.value = true } +const compute = () => { + formData.value.total_price = formData.value.buyer_nums * formData.value.purchase +} const OclickDialogBuyer = () => { dialogBuyer.value = true apiWarehouseLists({}).then((res) => { diff --git a/src/views/order/beforehand_order/component/outbound.vue b/src/views/order/beforehand_order/component/outbound.vue index 4717963e6..7d19d2eea 100644 --- a/src/views/order/beforehand_order/component/outbound.vue +++ b/src/views/order/beforehand_order/component/outbound.vue @@ -3,12 +3,6 @@ 一键出库 - @@ -440,7 +440,7 @@ const handleBuyer = (e, row) => { purchase_product_offer.value.order_id = row.bhoid purchase_product_offer.value.product_id = row.product_id purchase_product_offer.value.unit = row.unit - purchase_product_offer.value.need_num = row.need_num + purchase_product_offer.value.need_num = row.cart_num purchase_product_offer.value.is_buyer = '1' DeliveryService() dialogBuyer.value = true diff --git a/src/views/order/beforehand_order/editProduct.vue b/src/views/order/beforehand_order/editProduct.vue index e844d9667..33852648b 100644 --- a/src/views/order/beforehand_order/editProduct.vue +++ b/src/views/order/beforehand_order/editProduct.vue @@ -20,22 +20,6 @@ :readonly="false" /> - - - - - - @@ -77,22 +61,7 @@ const formData = reactive({ }) // 表单验证 -const formRules = reactive({ - warehouse_id: [ - { - required: true, - message: '请输入仓库', - trigger: ['blur'] - } - ], - total_price: [ - { - required: true, - message: '请输入总价格', - trigger: ['blur'] - } - ] -}) +const formRules = reactive({}) // 获取详情 const setFormData = async (data: Record) => { @@ -102,6 +71,7 @@ const setFormData = async (data: Record) => { formData[key] = data[key] } } + formData.nums = data.cart_num } const getDetail = async (row: Record) => {