ERP:初始化其它入库的表单 50%

This commit is contained in:
YunaiV 2024-02-06 15:58:25 +08:00
parent 53c94af027
commit 9cbdfe0ecb
7 changed files with 19 additions and 26 deletions

View File

@ -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 })
} }

View File

@ -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` })
}, },

View File

@ -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[]>([]) //

View File

@ -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

View File

@ -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

View File

@ -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