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" + /> - + + + + - +
@@ -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() })