|
@@ -22,6 +22,7 @@
|
|
|
:footer-cell-class-name="footerCellClassName"
|
|
|
style="margin-left: 5em"
|
|
|
highlight-current-row
|
|
|
+ :edit-rules="validRules"
|
|
|
:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
|
|
|
>
|
|
|
<vxe-table-column field="programName" align="center" title="项目名称" :edit-render="{}">
|
|
@@ -39,11 +40,16 @@
|
|
|
<el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
- <vxe-table-column field="account" align="center" title="发票金额(元)" :edit-render="{}" :rules="[
|
|
|
- {required: true, message:'发票金额不能为空', trigger:'blur'}
|
|
|
- ]">
|
|
|
+ <vxe-table-column field="account" align="center" title="发票金额(元)" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
|
- <el-input placeholder="请填写发票金额" v-model="scope.row.account" />
|
|
|
+ <el-input-number
|
|
|
+ :precision="2"
|
|
|
+ :max="9999999999"
|
|
|
+ :step="0.01"
|
|
|
+ :min="0"
|
|
|
+ :controls="false"
|
|
|
+ clearable
|
|
|
+ placeholder="请填写发票金额" v-model="scope.row.account" />
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
|
<!-- <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
|
|
@@ -734,7 +740,12 @@
|
|
|
yesNoFlag: [{label: '否', value: '0'}, {label: '是', value: '1'}],
|
|
|
baseKey: '',
|
|
|
detailKey: '',
|
|
|
- receivablesKey: ''
|
|
|
+ receivablesKey: '',
|
|
|
+ validRules: {
|
|
|
+ account: [
|
|
|
+ { required: true, message: '必须输入发票金额',trigger:"change"},
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -1015,6 +1026,11 @@
|
|
|
this.$message.error('第' + (j + 1) + '行的基本信息不能为空')
|
|
|
throw new Error()
|
|
|
}
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList[j].account)) {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error('第' + (j + 1) + '行的发票金额不能为空')
|
|
|
+ throw new Error()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (this.inputForm.status === '5') {
|
|
@@ -1526,24 +1542,7 @@
|
|
|
this.inputForm.billingId = ''
|
|
|
}
|
|
|
},
|
|
|
- // 格式化 发票金额 保留两位小数
|
|
|
- fixedAccount () {
|
|
|
- if (isNaN(this.inputForm.account) && !/^-$/.test(this.inputForm.account)) {
|
|
|
- this.inputForm.account = ''
|
|
|
- }
|
|
|
- if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.inputForm.account)) {
|
|
|
- this.inputForm.account = this.inputForm.account.replace(/\.\d{2,}$/, this.inputForm.account.substr(this.inputForm.account.indexOf('.'), 3))
|
|
|
- }
|
|
|
- // 禁止录入整数部分两位以上,但首位为0
|
|
|
- var regStrs = [
|
|
|
- ['^(\\-)?0(\\d+)$', '$1']
|
|
|
- ]
|
|
|
- for (var i = 0; i < regStrs.length; i++) {
|
|
|
- var reg = new RegExp(regStrs[i][0])
|
|
|
- var result = this.inputForm.account.replace(reg, regStrs[i][1])
|
|
|
- this.inputForm.account = result
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
|
|
|
footerMethod ({ columns, data }) {
|
|
|
const footerData = [
|