diff --git a/src/api/warehouse_product.ts b/src/api/warehouse_product.ts
index ad05bdcc1..302a90e84 100644
--- a/src/api/warehouse_product.ts
+++ b/src/api/warehouse_product.ts
@@ -23,4 +23,8 @@ export function apiWarehouseProductDelete(params: any) {
// 商品仓储信息详情
export function apiWarehouseProductDetail(params: any) {
return request.get({ url: '/warehouse_product/warehouseproduct/detail', params })
-}
\ No newline at end of file
+}
+// 商品仓储信息确认
+export function apiWarehouseProductEnter(params: any) {
+ return request.post({ url: '/warehouse_product/warehouseproduct/enter', params })
+}
diff --git a/src/api/warehouse_product_storege.ts b/src/api/warehouse_product_storege.ts
new file mode 100644
index 000000000..3538f13df
--- /dev/null
+++ b/src/api/warehouse_product_storege.ts
@@ -0,0 +1,29 @@
+import request from '@/utils/request'
+
+// 仓库商品存储列表
+export function apiWarehouseProductStoregeLists(params: any) {
+ return request.get({ url: '/warehouse_product_storege/warehouseproductstorege/lists', params })
+}
+
+// 添加仓库商品存储
+export function apiWarehouseProductStoregeAdd(params: any) {
+ return request.post({ url: '/warehouse_product_storege/warehouseproductstorege/add', params })
+}
+
+// 编辑仓库商品存储
+export function apiWarehouseProductStoregeEdit(params: any) {
+ return request.post({ url: '/warehouse_product_storege/warehouseproductstorege/edit', params })
+}
+
+// 删除仓库商品存储
+export function apiWarehouseProductStoregeDelete(params: any) {
+ return request.post({
+ url: '/warehouse_product_storege/warehouseproductstorege/delete',
+ params
+ })
+}
+
+// 仓库商品存储详情
+export function apiWarehouseProductStoregeDetail(params: any) {
+ return request.get({ url: '/warehouse_product_storege/warehouseproductstorege/detail', params })
+}
diff --git a/src/components/productPop/index.vue b/src/components/productPop/index.vue
index ea3cf2c7c..a118d276b 100644
--- a/src/components/productPop/index.vue
+++ b/src/components/productPop/index.vue
@@ -2,7 +2,13 @@
-
+
查询
@@ -15,18 +21,64 @@
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
@@ -40,18 +92,23 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiStoreProductLists } from '@/api/store_product'
+import { apiWarehouseProductStoregeLists } from '@/api/warehouse_product_storege'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import { ElMessage } from 'element-plus'
-
+const props = defineProps<{
+ is_warehouse: number
+ code: any[]
+}>()
// 查询条件
const queryParams = reactive({
- store_name: '',
+ store_name: ''
})
// 选中数据
const selectData = ref
([])
+const datas = ref()
// 表格选择后回调事件
const handleSelectionChange = (val: any[]) => {
@@ -62,18 +119,26 @@ const handleSelectionChange = (val: any[]) => {
const { dictData } = useDictData('')
// 分页相关
-const { pager, getLists, resetParams, resetPage } = usePaging({
- fetchFun: apiStoreProductLists,
- params: queryParams
-})
+if (props.is_warehouse == 1) {
+ datas.value = {
+ fetchFun: apiWarehouseProductStoregeLists,
+ params: queryParams
+ }
+} else {
+ datas.value = {
+ fetchFun: apiStoreProductLists,
+ params: queryParams
+ }
+}
+const { pager, getLists, resetParams, resetPage } = usePaging(datas.value)
-getLists();
+getLists()
-const emits = defineEmits(["onBindStore"]);
+const emits = defineEmits(['onBindStore'])
// 绑定用户
const bindStore = () => {
- let list = pager.lists.filter(item => selectData.value.includes(item.id));
- if (!list.length) return ElMessage.error('请先选择门店');
+ const list = pager.lists.filter((item) => selectData.value.includes(item.id))
+ if (!list.length) return ElMessage.error('请先选择门店')
emits('onBindStore', list)
-};
+}
diff --git a/src/components/warehousePop/index.vue b/src/components/warehousePop/index.vue
new file mode 100644
index 000000000..d141d1bc4
--- /dev/null
+++ b/src/components/warehousePop/index.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
添加仓库
+
+
+
+
diff --git a/src/views/warehouse/import.vue b/src/views/warehouse/import.vue
new file mode 100644
index 000000000..02a015586
--- /dev/null
+++ b/src/views/warehouse/import.vue
@@ -0,0 +1,229 @@
+
+
+ 导入商品到门店
+
+
+
+
+
+ 添加门店
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.is_show ? '营业' : '打烊' }}
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+ 添加商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+ 分配售卖库存
+ 分配兑换库存
+
+ 默认为分配售卖库存, 如需分配兑换库存请选择分配兑换库存
+
+
+ 提交
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/warehouse/index.vue b/src/views/warehouse/index.vue
index b61b4186a..879badb87 100644
--- a/src/views/warehouse/index.vue
+++ b/src/views/warehouse/index.vue
@@ -1,19 +1,30 @@
-
+
-
+
-
+
-
+
查询
@@ -39,7 +50,19 @@
-
+
+
+
+ {{ row.name }}
+
+
+
@@ -48,7 +71,7 @@
-
-
+
@@ -88,7 +117,6 @@ const editRef = shallowRef>()
// 是否显示编辑框
const showEdit = ref(false)
-
// 查询条件
const queryParams = reactive({
name: '',
@@ -137,4 +165,3 @@ const handleDelete = async (id: number | any[]) => {
getLists()
-
diff --git a/src/views/warehouse/product_import.vue b/src/views/warehouse/product_import.vue
new file mode 100644
index 000000000..6f5a0a4c0
--- /dev/null
+++ b/src/views/warehouse/product_import.vue
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+ 出库
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/warehouse_product/edit.vue b/src/views/warehouse_product/edit.vue
index 3b75eddc3..369237746 100644
--- a/src/views/warehouse_product/edit.vue
+++ b/src/views/warehouse_product/edit.vue
@@ -13,17 +13,18 @@
-
+
@@ -45,6 +46,39 @@
:readonly="false"
/>
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
@@ -98,16 +135,24 @@ const formRef = shallowRef()
const popupRef = shallowRef>()
const mode = ref('add')
const showWarehouse = ref(false) // 选择仓库列表是否显示
-const productList = ref([])
+const showProduct = ref(false) // 选择商品列表是否显示
+// const productList = ref([])
-const onBindProduct = (e: any[]) => {
- e.forEach((item: any) => {
- if (!productList.value.find((t: any) => t.id == item.id)) {
- productList.value.push(item)
- }
- })
+const onBindWarehouse = (e: any[]) => {
+ formData.warehouse_name = e.name
+ formData.warehouse_id = e.id
+ // e.forEach((item: any) => {
+ // if (!productList.value.find((t: any) => t.id == item.id)) {
+ // productList.value.push(item)
+ // }
+ // })
showWarehouse.value = false
}
+const onBindStore = (e: any[]) => {
+ formData.product_name = e[0].store_name
+ formData.product_id = e[0].id
+ showProduct.value = false
+}
// 弹窗标题
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑商品仓储信息' : '新增商品仓储信息'
@@ -124,7 +169,11 @@ const formData = reactive({
price: '',
total_price: '',
status: '',
- warehouse_name: ''
+ warehouse_name: '',
+ product_name: '',
+ manufacture: '',
+ expiration_date: '',
+ code: ''
})
// 表单验证
diff --git a/src/views/warehouse_product/index.vue b/src/views/warehouse_product/index.vue
index 3c7b56f61..60883f8fd 100644
--- a/src/views/warehouse_product/index.vue
+++ b/src/views/warehouse_product/index.vue
@@ -62,8 +62,9 @@
+
-
+
+
+
-
+
编辑
@@ -89,9 +93,19 @@
type="danger"
link
@click="handleDelete(row.id)"
+ v-if="row.status == 0"
>
删除
+
+ 确认
+
@@ -113,7 +127,11 @@