From 81d52484e0dae33660bd047329dbc8384bfa0baf Mon Sep 17 00:00:00 2001
From: mkm <727897186@qq.com>
Date: Thu, 15 Aug 2024 17:51:53 +0800
Subject: [PATCH] =?UTF-8?q?(=E4=BF=AE=E6=94=B9=E4=BA=86=E4=BB=A5=E4=B8=8B?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=9Asrc/views/finance/store=5Fcash=5Ffin?=
=?UTF-8?q?ance=5Fflow/index.vue=EF=BC=8Csrc/views/order/purchase=5Forder/?=
=?UTF-8?q?component/goodsOffer.vue=EF=BC=8Csrc/views/store/store=5Fproduc?=
=?UTF-8?q?t/edit.vue=EF=BC=8Csrc/views/warehouse=5Fproduct/edit.vue?=
=?UTF-8?q?=EF=BC=8Csrc/views/warehouse=5Fproduct/index.vue=E3=80=82?=
=?UTF-8?q?=E5=9C=A8=E7=9B=B8=E5=BA=94=E7=9A=84Vue=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0=E4=BA=86=E6=96=B0=E7=9A=84=E8=A1=A8?=
=?UTF-8?q?=E6=A0=BC=E5=88=97=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BA=86=E9=83=A8?=
=?UTF-8?q?=E5=88=86=E7=BB=84=E4=BB=B6=E7=9A=84=E5=B1=9E=E6=80=A7=E5=92=8C?=
=?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E5=B9=B6=E5=BC=95=E5=85=A5=E4=BA=86?=
=?UTF-8?q?=E6=96=B0=E7=9A=84API=E6=8E=A5=E5=8F=A3=E3=80=82)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/supplier.ts | 26 ++
.../finance/store_cash_finance_flow/index.vue | 1 +
.../purchase_order/component/goodsOffer.vue | 73 ++++-
.../component/warehouseEdit.vue | 310 ++++++++++++++++++
src/views/store/store_product/edit.vue | 21 +-
src/views/supplier/details.vue | 111 +++++++
src/views/supplier/edit.vue | 186 +++++++++++
src/views/supplier/index.vue | 145 ++++++++
src/views/warehouse_product/edit.vue | 40 ++-
src/views/warehouse_product/index.vue | 43 ++-
10 files changed, 936 insertions(+), 20 deletions(-)
create mode 100644 src/api/supplier.ts
create mode 100644 src/views/order/purchase_order/component/warehouseEdit.vue
create mode 100644 src/views/supplier/details.vue
create mode 100644 src/views/supplier/edit.vue
create mode 100644 src/views/supplier/index.vue
diff --git a/src/api/supplier.ts b/src/api/supplier.ts
new file mode 100644
index 000000000..01c7448bf
--- /dev/null
+++ b/src/api/supplier.ts
@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 供应商户表列表
+export function apiSupplierLists(params: any) {
+ return request.get({ url: '/supplier/supplier/lists', params })
+}
+
+// 添加供应商户表
+export function apiSupplierAdd(params: any) {
+ return request.post({ url: '/supplier/supplier/add', params })
+}
+
+// 编辑供应商户表
+export function apiSupplierEdit(params: any) {
+ return request.post({ url: '/supplier/supplier/edit', params })
+}
+
+// 删除供应商户表
+export function apiSupplierDelete(params: any) {
+ return request.post({ url: '/supplier/supplier/delete', params })
+}
+
+// 供应商户表详情
+export function apiSupplierDetail(params: any) {
+ return request.get({ url: '/supplier/supplier/detail', params })
+}
\ No newline at end of file
diff --git a/src/views/finance/store_cash_finance_flow/index.vue b/src/views/finance/store_cash_finance_flow/index.vue
index 59f298c66..25a626ff9 100644
--- a/src/views/finance/store_cash_finance_flow/index.vue
+++ b/src/views/finance/store_cash_finance_flow/index.vue
@@ -58,6 +58,7 @@
+
diff --git a/src/views/order/purchase_order/component/goodsOffer.vue b/src/views/order/purchase_order/component/goodsOffer.vue
index 1b753440c..d0a8af9d1 100644
--- a/src/views/order/purchase_order/component/goodsOffer.vue
+++ b/src/views/order/purchase_order/component/goodsOffer.vue
@@ -22,20 +22,20 @@
-
+ width="100"
+ />
- 否
- 是
@@ -44,15 +44,35 @@
-
+
+
+ {{ row.buyer_name }}
+
+ {{ row.buyer_name }}
+
+
+
+
-
+
+ 入库
+
@@ -74,6 +94,14 @@
/>
+
+
+
+
@@ -93,6 +127,8 @@ import {
} from '@/api/purchase_product_offer'
import { useRoute } from 'vue-router'
import { apiDeliveryServiceLists } from '@/api/delivery_service'
+import warehouseEditPopup from './warehouseEdit.vue'
+const warehouseRef = shallowRef>()
const route = useRoute()
@@ -115,15 +151,25 @@ const changeType = (e: any) => {
getLists()
}
-const dialogVisible = ref(false)
+const dialogWarehousing = ref(false)
const dialogBuyer = ref(false)
const updateInfo = ref({
id: '',
type: '',
is_buyer: '',
- buyer_id: ''
+ buyer_id: '',
+ buyer_nums: ''
})
+const handleWarehouse = async (row) => {
+ console.log(row)
+ dialogWarehousing.value = true
+ await nextTick()
+ warehouseRef.value?.open('edit')
+ row.nums = row.buyer_nums
+ row.purchase = row.price
+ warehouseRef.value?.setFormData(row)
+}
const goodsOfferUpdate = () => {
apiPurchaseProductOfferEdit(updateInfo.value).then((res) => {
getLists()
@@ -132,7 +178,7 @@ const goodsOfferUpdate = () => {
}
const delivery_list = ref([])
const DeliveryService = () => {
- apiDeliveryServiceLists({}).then((res) => {
+ apiDeliveryServiceLists({ type: 3 }).then((res) => {
delivery_list.value = res.lists
})
}
@@ -141,16 +187,17 @@ const DeliveryService = () => {
* 是否需采购
* @param e
*/
-const handleBuyer = (e, id) => {
+const handleBuyer = (e, row) => {
if (e == 1) {
- updateInfo.value.id = id
+ updateInfo.value.id = row.id
+ updateInfo.value.buyer_nums = row.need_num
updateInfo.value.is_buyer = '1'
updateInfo.value.type = 'buyer'
DeliveryService()
dialogBuyer.value = true
} else {
apiPurchaseProductOfferEdit({
- id: id,
+ id: row.id,
type: 'buyer',
is_buyer: -1
}).then((res) => {
diff --git a/src/views/order/purchase_order/component/warehouseEdit.vue b/src/views/order/purchase_order/component/warehouseEdit.vue
new file mode 100644
index 000000000..1731cf92f
--- /dev/null
+++ b/src/views/order/purchase_order/component/warehouseEdit.vue
@@ -0,0 +1,310 @@
+
+
+
+
+
diff --git a/src/views/store/store_product/edit.vue b/src/views/store/store_product/edit.vue
index 3a522a65a..3da0a9795 100644
--- a/src/views/store/store_product/edit.vue
+++ b/src/views/store/store_product/edit.vue
@@ -68,7 +68,7 @@
placeholder="请选择商品单位"
/>
-
+
@@ -121,13 +121,23 @@
:readonly="false"
/>
-
+
+
+
+
@@ -269,7 +279,8 @@ const formData = reactive({
swap: '',
cost: '',
purchase: '',
- batch: '',
+ batch: 1,
+ store_batch: 1,
manufacturer_information: '',
rose: '0',
is_return: 1, // 1支持退货,2不支持退货
diff --git a/src/views/supplier/details.vue b/src/views/supplier/details.vue
new file mode 100644
index 000000000..84db9d9a5
--- /dev/null
+++ b/src/views/supplier/details.vue
@@ -0,0 +1,111 @@
+
+
+
+
+
diff --git a/src/views/supplier/edit.vue b/src/views/supplier/edit.vue
new file mode 100644
index 000000000..148ca700c
--- /dev/null
+++ b/src/views/supplier/edit.vue
@@ -0,0 +1,186 @@
+
+
+
+
+
diff --git a/src/views/supplier/index.vue b/src/views/supplier/index.vue
new file mode 100644
index 000000000..3c1e19f57
--- /dev/null
+++ b/src/views/supplier/index.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+ 新增
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/warehouse_product/edit.vue b/src/views/warehouse_product/edit.vue
index 3d2309b5f..c74d530cb 100644
--- a/src/views/warehouse_product/edit.vue
+++ b/src/views/warehouse_product/edit.vue
@@ -27,6 +27,26 @@
@click="showProduct = true"
/>
+
+
+
+
+
@@ -138,6 +158,7 @@ import {
apiWarehouseProductEdit,
apiWarehouseProductDetail
} from '@/api/warehouse_product'
+import { apiSupplierLists } from '@/api/supplier'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
defineProps({
@@ -182,6 +203,7 @@ const formData = reactive({
id: '',
warehouse_id: '',
product_id: '',
+ supplier_id: '',
financial_pm: '',
batch: '',
nums: '',
@@ -311,7 +333,23 @@ const open = (type = 'add') => {
const handleClose = () => {
emit('close')
}
-
+const userloading = ref(false)
+const userList = ref([])
+const remoteMethodUser = (e = '') => {
+ userloading.value = true
+ apiSupplierLists({})
+ .then((res) => {
+ userList.value = res.lists
+ setTimeout(() => {
+ userloading.value = false
+ }, 300)
+ })
+ .catch((err) => {
+ setTimeout(() => {
+ userloading.value = false
+ }, 300)
+ })
+}
defineExpose({
open,
setFormData,
diff --git a/src/views/warehouse_product/index.vue b/src/views/warehouse_product/index.vue
index daaa48de0..4906facb6 100644
--- a/src/views/warehouse_product/index.vue
+++ b/src/views/warehouse_product/index.vue
@@ -33,6 +33,26 @@
placeholder="请输入仓库"
/>
+
+
+
+
+
+
@@ -185,6 +206,7 @@ import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import { apiSystemStoreLists } from '@/api/system_store'
import moment from 'moment'
+import { apiSupplierLists } from '@/api/supplier'
const editRef = shallowRef>()
// 是否显示编辑框
@@ -198,7 +220,8 @@ const queryParams = reactive({
store_id: '',
bar_code: '',
start_time: '',
- end_time: ''
+ end_time: '',
+ supplier_id: ''
})
// 选中数据
@@ -276,6 +299,24 @@ const remoteMethod = (e = '') => {
}, 300)
})
}
+
+const userloading = ref(false)
+const userList = ref([])
+const remoteMethodUser = (e = '') => {
+ userloading.value = true
+ apiSupplierLists({})
+ .then((res) => {
+ userList.value = res.lists
+ setTimeout(() => {
+ userloading.value = false
+ }, 300)
+ })
+ .catch((err) => {
+ setTimeout(() => {
+ userloading.value = false
+ }, 300)
+ })
+}
onMounted(() => {
getLists()
})