Browse Source

合同价格格式化

master_hella_20240701
yufei0306 6 months ago
parent
commit
b4dcb8355b
  1. 16
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

16
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -731,6 +731,20 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}
]))
const singlePriceFormart = (row, column, cellValue) => {
cellValue= Number(cellValue).toFixed(5)
cellValue = cellValue + '' || ''
let x = cellValue.split('.')
let x1 = x[0]
let x2 = x.length > 1 ? '.' + x[1] : ''
const reg = /(\d+)(\d{3})/
while(reg.test(x1)){
x1 = x1.replace(reg, '$1,$2')
}
return x1+x2
}
function validateTaxRate(rule, value, callback) {
if (value>0) {
callback()
@ -913,7 +927,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
{
label: '合同价格',
field: 'singlePrice',
formatter: accountantFormart,
formatter: singlePriceFormart,
table: {
width: 150
},

Loading…
Cancel
Save