✨ ERP:初始化其它入库的表单 50%
This commit is contained in:
parent
53c94af027
commit
9cbdfe0ecb
@ -1,6 +1,6 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// ERP 商品分类 VO
|
// ERP 产品分类 VO
|
||||||
export interface ProductCategoryVO {
|
export interface ProductCategoryVO {
|
||||||
id: number // 分类编号
|
id: number // 分类编号
|
||||||
parentId: number // 父分类编号
|
parentId: number // 父分类编号
|
||||||
@ -10,39 +10,39 @@ export interface ProductCategoryVO {
|
|||||||
status: number // 开启状态
|
status: number // 开启状态
|
||||||
}
|
}
|
||||||
|
|
||||||
// ERP 商品分类 API
|
// ERP 产品分类 API
|
||||||
export const ProductCategoryApi = {
|
export const ProductCategoryApi = {
|
||||||
// 查询商品分类列表
|
// 查询产品分类列表
|
||||||
getProductCategoryList: async (params) => {
|
getProductCategoryList: async (params) => {
|
||||||
return await request.get({ url: `/erp/product-category/list`, params })
|
return await request.get({ url: `/erp/product-category/list`, params })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询商品分类精简列表
|
// 查询产品分类精简列表
|
||||||
getProductCategorySimpleList: async () => {
|
getProductCategorySimpleList: async () => {
|
||||||
return await request.get({ url: `/erp/product-category/simple-list` })
|
return await request.get({ url: `/erp/product-category/simple-list` })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询商品分类详情
|
// 查询产品分类详情
|
||||||
getProductCategory: async (id: number) => {
|
getProductCategory: async (id: number) => {
|
||||||
return await request.get({ url: `/erp/product-category/get?id=` + id })
|
return await request.get({ url: `/erp/product-category/get?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增商品分类
|
// 新增产品分类
|
||||||
createProductCategory: async (data: ProductCategoryVO) => {
|
createProductCategory: async (data: ProductCategoryVO) => {
|
||||||
return await request.post({ url: `/erp/product-category/create`, data })
|
return await request.post({ url: `/erp/product-category/create`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 修改商品分类
|
// 修改产品分类
|
||||||
updateProductCategory: async (data: ProductCategoryVO) => {
|
updateProductCategory: async (data: ProductCategoryVO) => {
|
||||||
return await request.put({ url: `/erp/product-category/update`, data })
|
return await request.put({ url: `/erp/product-category/update`, data })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除商品分类
|
// 删除产品分类
|
||||||
deleteProductCategory: async (id: number) => {
|
deleteProductCategory: async (id: number) => {
|
||||||
return await request.delete({ url: `/erp/product-category/delete?id=` + id })
|
return await request.delete({ url: `/erp/product-category/delete?id=` + id })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导出商品分类 Excel
|
// 导出产品分类 Excel
|
||||||
exportProductCategory: async (params) => {
|
exportProductCategory: async (params) => {
|
||||||
return await request.download({ url: `/erp/product-category/export-excel`, params })
|
return await request.download({ url: `/erp/product-category/export-excel`, params })
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ export const ProductUnitApi = {
|
|||||||
return await request.get({ url: `/erp/product-unit/page`, params })
|
return await request.get({ url: `/erp/product-unit/page`, params })
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询商品单位精简列表
|
// 查询产品单位精简列表
|
||||||
getProductUnitSimpleList: async () => {
|
getProductUnitSimpleList: async () => {
|
||||||
return await request.get({ url: `/erp/product-unit/simple-list` })
|
return await request.get({ url: `/erp/product-unit/simple-list` })
|
||||||
},
|
},
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品单价" fixed="right" min-width="120">
|
<el-table-column label="产品单价" fixed="right" min-width="120">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:prop="`${$index}.productPrice`"
|
:prop="`${$index}.productPrice`"
|
||||||
@ -139,7 +139,7 @@ const formRules = reactive({
|
|||||||
inId: [{ required: true, message: '入库编号不能为空', trigger: 'blur' }],
|
inId: [{ required: true, message: '入库编号不能为空', trigger: 'blur' }],
|
||||||
warehouseId: [{ required: true, message: '仓库不能为空', trigger: 'blur' }],
|
warehouseId: [{ required: true, message: '仓库不能为空', trigger: 'blur' }],
|
||||||
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }],
|
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }],
|
||||||
count: [{ required: true, message: '商品数量不能为空', trigger: 'blur' }]
|
count: [{ required: true, message: '产品数量不能为空', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
const formRef = ref([]) // 表单 Ref
|
const formRef = ref([]) // 表单 Ref
|
||||||
const productList = ref<ProductVO[]>([]) // 产品列表
|
const productList = ref<ProductVO[]>([]) // 产品列表
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- TODO 芋艿:商品信息 -->
|
<!-- TODO 芋艿:产品信息 -->
|
||||||
<el-form-item label="入库时间" prop="inTime">
|
<el-form-item label="入库时间" prop="inTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.inTime"
|
v-model="queryParams.inTime"
|
||||||
@ -95,8 +95,8 @@
|
|||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="入库单号" align="center" prop="no" />
|
<el-table-column label="入库单号" align="center" prop="no" />
|
||||||
|
<el-table-column label="产品信息" align="center" prop="productNames" min-width="200" />
|
||||||
<el-table-column label="供应商" align="center" prop="supplierId" />
|
<el-table-column label="供应商" align="center" prop="supplierId" />
|
||||||
<!-- TODO 商品信息 -->
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="入库时间"
|
label="入库时间"
|
||||||
align="center"
|
align="center"
|
||||||
@ -104,14 +104,7 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column label="创建人" align="center" prop="creatorName" />
|
||||||
label="入库时间"
|
|
||||||
align="center"
|
|
||||||
prop="inTime"
|
|
||||||
:formatter="dateFormatter"
|
|
||||||
width="180px"
|
|
||||||
/>
|
|
||||||
<!-- TODO 芋艿:创建人 -->
|
|
||||||
<el-table-column label="数量" align="center" prop="totalCount" />
|
<el-table-column label="数量" align="center" prop="totalCount" />
|
||||||
<el-table-column label="金额合计" align="center" prop="totalPrice" />
|
<el-table-column label="金额合计" align="center" prop="totalPrice" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
@ -233,7 +226,7 @@ const handleExport = async () => {
|
|||||||
// 发起导出
|
// 发起导出
|
||||||
exportLoading.value = true
|
exportLoading.value = true
|
||||||
const data = await StockInApi.exportStockIn(queryParams)
|
const data = await StockInApi.exportStockIn(queryParams)
|
||||||
download.excel(data, 'ERP 其它入库单.xls')
|
download.excel(data, '其它入库单.xls')
|
||||||
} catch {
|
} catch {
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false
|
exportLoading.value = false
|
||||||
|
@ -136,7 +136,7 @@
|
|||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import { StockRecordApi, StockRecordVO } from '@/api/erp/stock/stockRecord'
|
import { StockRecordApi, StockRecordVO } from '@/api/erp/stock/record'
|
||||||
import { ProductApi, ProductVO } from '@/api/erp/product/product'
|
import { ProductApi, ProductVO } from '@/api/erp/product/product'
|
||||||
import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse'
|
import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse'
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ const handleExport = async () => {
|
|||||||
// 发起导出
|
// 发起导出
|
||||||
exportLoading.value = true
|
exportLoading.value = true
|
||||||
const data = await StockRecordApi.exportStockRecord(queryParams)
|
const data = await StockRecordApi.exportStockRecord(queryParams)
|
||||||
download.excel(data, 'ERP 产品库存明细.xls')
|
download.excel(data, '产品库存明细.xls')
|
||||||
} catch {
|
} catch {
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false
|
exportLoading.value = false
|
@ -215,7 +215,7 @@ const handleExport = async () => {
|
|||||||
// 发起导出
|
// 发起导出
|
||||||
exportLoading.value = true
|
exportLoading.value = true
|
||||||
const data = await WarehouseApi.exportWarehouse(queryParams)
|
const data = await WarehouseApi.exportWarehouse(queryParams)
|
||||||
download.excel(data, 'ERP 仓库.xls')
|
download.excel(data, '仓库.xls')
|
||||||
} catch {
|
} catch {
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false
|
exportLoading.value = false
|
||||||
|
Loading…
Reference in New Issue
Block a user