| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item :label="`发票金额(元): 合同总额(${form.taxInclusiveTotalPrice}元)`" prop="invoiceTotal"> |
| | | <el-input-number :step="0.01" :min="0" :max="form.taxInclusiveTotalPrice" style="width: 100%" v-model="form.invoiceTotal" placeholder="请输入" clearable :precision="2"/> |
| | | <el-form-item :label="`发票金额(元): `" prop="invoiceTotal"> |
| | | <el-input-number :step="0.01" :min="0" :max="maxInvoiceAmount || form.taxInclusiveTotalPrice" style="width: 100%" v-model="form.invoiceTotal" placeholder="请输入" clearable :precision="2"/> |
| | | <div v-if="maxInvoiceAmount > 0" style="color: #909399; font-size: 12px; margin-top: 5px;"> |
| | | 可填最大金额为:¥{{ maxInvoiceAmount.toFixed(2) }}元 |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | const { form: searchForm, resetForm } = useFormData(data.searchForm); |
| | | const currentId = ref(""); |
| | | const userStore = useUserStore(); |
| | | const maxInvoiceAmount = ref(0); // 发票金额最大值 |
| | | const upload = reactive({ |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/invoiceLedger/uploadFile", |
| | |
| | | if (!form.value.invoicePerson) { |
| | | form.value.invoicePerson = userStore.nickName; |
| | | } |
| | | |
| | | // 计算发票金额最大值:noInvoiceAmount + invoiceAmount |
| | | const noInvoiceAmount = parseFloat(res.data.noInvoiceAmount || 0); |
| | | const invoiceAmount = parseFloat(res.data.invoiceAmount || 0); |
| | | maxInvoiceAmount.value = noInvoiceAmount + invoiceAmount; |
| | | }); |
| | | dialogFormVisible.value = true; |
| | | }; |