Browse Source

HL-5880SCP正式环境,供应商发票申请,输入的发票号限制为20位数字。

hella_online_20240911
yufei_wang 3 months ago
parent
commit
b084a08467
  1. 13
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -1611,6 +1611,16 @@ function validateTaxRate(rule, value, callback) {
} }
} }
const validateGoldenTaxInvoiceNumber = (rule, value, callback) => {
const reg = /^[1-9][0-9]*$/
if (reg.test(value)) {
callback()
}else{
callback(new Error('只能是数字'))
}
}
//表单校验 //表单校验
export const SupplierinvoiceRequestMainRules = reactive({ export const SupplierinvoiceRequestMainRules = reactive({
taxRate: [ taxRate: [
@ -1624,7 +1634,8 @@ export const SupplierinvoiceRequestMainRules = reactive({
{ required: false, message: '请选择发票日期', trigger: 'blur' } { required: false, message: '请选择发票日期', trigger: 'blur' }
], ],
goldenTaxInvoiceNumber:[ goldenTaxInvoiceNumber:[
{ required: false, message: '请输入金税票号', trigger: 'blur' } { required: false, message: '请输入金税票号', trigger: 'blur' },
{ validator:validateGoldenTaxInvoiceNumber, message: '金税票号只能是数字', trigger: 'blur'}
], ],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }

Loading…
Cancel
Save