|
@@ -246,17 +246,25 @@
|
|
|
:rules="[
|
|
|
{required: true, message:'发票金额不能为空', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-input-number
|
|
|
- v-model="inputForm.account"
|
|
|
- controls-position="right"
|
|
|
- :controls="false"
|
|
|
- style="width:100%;"
|
|
|
- :max="999999999999999"
|
|
|
- :precision="2"
|
|
|
+ <el-input
|
|
|
+ @blur="fixedAccount"
|
|
|
+ oninput ="value=value.match(/\d+\.?\d{0,2}/,'')"
|
|
|
placeholder="请填写发票金额"
|
|
|
- :step="0.01"
|
|
|
- clearable>
|
|
|
- </el-input-number>
|
|
|
+ maxlength="15"
|
|
|
+ v-model="inputForm.account"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+<!-- <el-input-number-->
|
|
|
+<!-- v-model="inputForm.account"-->
|
|
|
+<!-- controls-position="right"-->
|
|
|
+<!-- :controls="false"-->
|
|
|
+<!-- style="width:100%;"-->
|
|
|
+<!-- :max="999999999999999"-->
|
|
|
+<!-- :precision="2"-->
|
|
|
+<!-- placeholder="请填写发票金额"-->
|
|
|
+<!-- :step="0.01"-->
|
|
|
+<!-- clearable>-->
|
|
|
+<!-- </el-input-number>-->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
@@ -1475,6 +1483,14 @@
|
|
|
this.inputForm.telPhone = ''
|
|
|
this.inputForm.billingId = ''
|
|
|
}
|
|
|
+ },
|
|
|
+ // 格式化 发票金额 保留两位小数
|
|
|
+ fixedAccount () {
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.account)) {
|
|
|
+ this.inputForm.account = parseFloat(this.inputForm.account).toFixed(2)
|
|
|
+ } else {
|
|
|
+ this.inputForm.account = ''
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|