ERP:增加金额计算的四舍五入

This commit is contained in:
YunaiV 2024-02-07 12:29:34 +08:00
parent 3308a494c7
commit 318d5261ad
5 changed files with 54 additions and 9 deletions

View File

@ -61,9 +61,24 @@
<el-table-column label="规格" align="center" prop="standard" /> <el-table-column label="规格" align="center" prop="standard" />
<el-table-column label="分类" align="center" prop="categoryName" /> <el-table-column label="分类" align="center" prop="categoryName" />
<el-table-column label="单位" align="center" prop="unitName" /> <el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="采购价格" align="center" prop="purchasePrice" /> <el-table-column
<el-table-column label="销售价格" align="center" prop="salePrice" /> label="采购价格"
<el-table-column label="最低价格" align="center" prop="minPrice" /> align="center"
prop="purchasePrice"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column
label="销售价格"
align="center"
prop="salePrice"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column
label="最低价格"
align="center"
prop="minPrice"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
@ -118,6 +133,7 @@ import { ProductCategoryApi, ProductCategoryVO } from '@/api/erp/product/categor
import ProductForm from './ProductForm.vue' import ProductForm from './ProductForm.vue'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { defaultProps, handleTree } from '@/utils/tree' import { defaultProps, handleTree } from '@/utils/tree'
import { erpPriceTableColumnFormatter } from '@/utils'
/** ERP 产品列表 */ /** ERP 产品列表 */
defineOptions({ name: 'ErpProduct' }) defineOptions({ name: 'ErpProduct' })

View File

@ -71,6 +71,7 @@
<el-input-number <el-input-number
v-model="formData.taxPercent" v-model="formData.taxPercent"
:min="0" :min="0"
:precision="2"
placeholder="请输入税率" placeholder="请输入税率"
class="!w-1/1" class="!w-1/1"
/> />

View File

@ -110,7 +110,7 @@
<dict-tag :type="DICT_TYPE.ERP_STOCK_RECORD_BIZ_TYPE" :value="scope.row.bizType" /> <dict-tag :type="DICT_TYPE.ERP_STOCK_RECORD_BIZ_TYPE" :value="scope.row.bizType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="出入库单号" align="center" prop="bizNo" /> <el-table-column label="出入库单号" align="center" prop="bizNo" width="200" />
<el-table-column <el-table-column
label="出入库日期" label="出入库日期"
align="center" align="center"
@ -118,8 +118,18 @@
:formatter="dateFormatter" :formatter="dateFormatter"
width="180px" width="180px"
/> />
<el-table-column label="出入库数量" align="center" prop="count" /> <el-table-column
<el-table-column label="库存量" align="center" prop="totalCount" /> label="出入库数量"
align="center"
prop="count"
:formatter="erpCountTableColumnFormatter"
/>
<el-table-column
label="库存量"
align="center"
prop="totalCount"
:formatter="erpCountTableColumnFormatter"
/>
<el-table-column label="操作人" align="center" prop="creatorName" /> <el-table-column label="操作人" align="center" prop="creatorName" />
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
@ -139,6 +149,7 @@ import download from '@/utils/download'
import { StockRecordApi, StockRecordVO } from '@/api/erp/stock/record' 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'
import { erpCountTableColumnFormatter } from '@/utils'
/** ERP 产品库存明细列表 */ /** ERP 产品库存明细列表 */
defineOptions({ name: 'ErpStockRecord' }) defineOptions({ name: 'ErpStockRecord' })

View File

@ -69,7 +69,12 @@
<el-table-column label="产品名称" align="center" prop="productName" /> <el-table-column label="产品名称" align="center" prop="productName" />
<el-table-column label="产品单位" align="center" prop="unitName" /> <el-table-column label="产品单位" align="center" prop="unitName" />
<el-table-column label="产品分类" align="center" prop="categoryName" /> <el-table-column label="产品分类" align="center" prop="categoryName" />
<el-table-column label="库存量" align="center" prop="count" /> <el-table-column
label="库存量"
align="center"
prop="count"
:formatter="erpCountTableColumnFormatter"
/>
<el-table-column label="仓库" align="center" prop="warehouseName" /> <el-table-column label="仓库" align="center" prop="warehouseName" />
</el-table> </el-table>
<!-- 分页 --> <!-- 分页 -->
@ -87,6 +92,7 @@ import download from '@/utils/download'
import { StockApi, StockVO } from '@/api/erp/stock/stock' import { StockApi, StockVO } from '@/api/erp/stock/stock'
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'
import { erpCountTableColumnFormatter } from '@/utils'
/** ERP 产品库存列表 */ /** ERP 产品库存列表 */
defineOptions({ name: 'ErpStock' }) defineOptions({ name: 'ErpStock' })

View File

@ -62,8 +62,18 @@
<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="name" /> <el-table-column label="仓库名称" align="center" prop="name" />
<el-table-column label="仓库地址" align="center" prop="address" /> <el-table-column label="仓库地址" align="center" prop="address" />
<el-table-column label="仓储费" align="center" prop="warehousePrice" /> <el-table-column
<el-table-column label="搬运费" align="center" prop="truckagePrice" /> label="仓储费"
align="center"
prop="warehousePrice"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column
label="搬运费"
align="center"
prop="truckagePrice"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column label="负责人" align="center" prop="principal" /> <el-table-column label="负责人" align="center" prop="principal" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="排序" align="center" prop="sort" /> <el-table-column label="排序" align="center" prop="sort" />
@ -129,6 +139,7 @@ import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse' import { WarehouseApi, WarehouseVO } from '@/api/erp/stock/warehouse'
import WarehouseForm from './WarehouseForm.vue' import WarehouseForm from './WarehouseForm.vue'
import { erpPriceTableColumnFormatter } from '@/utils'
/** ERP 仓库列表 */ /** ERP 仓库列表 */
defineOptions({ name: 'ErpWarehouse' }) defineOptions({ name: 'ErpWarehouse' })