| xqd
@@ -104,7 +104,9 @@
|
|
|
v-model="item.expectDiscountDate"
|
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
|
- @change="change(index, 4)"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ @change="inputMoney(index, 4)"
|
|
|
+ @input="inputMoney(index)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<!-- 出票日期 -->
|
| xqd
@@ -124,7 +126,9 @@
|
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
|
default-value
|
|
|
- @change="change(index, 1)"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ @change="inputMoney(index, 1)"
|
|
|
+ @input="inputMoney(index)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<!-- 到期日期 -->
|
| xqd
@@ -156,6 +160,7 @@
|
|
|
placeholder="请填写金额"
|
|
|
style="width: 220px"
|
|
|
@blur="getMoney(index)"
|
|
|
+ @input="inputMoney(index)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<!-- 服务费 -->
|
| xqd
@@ -178,14 +183,14 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- <el-form-item label="金额">
|
|
|
- <el-input
|
|
|
- v-model="item.money"
|
|
|
- class="ipwidth"
|
|
|
- placeholder="请填写金额"
|
|
|
- style="width: 220px"
|
|
|
- @change="computed"
|
|
|
- />
|
|
|
- </el-form-item> -->
|
|
|
+ <el-input
|
|
|
+ v-model="item.money"
|
|
|
+ class="ipwidth"
|
|
|
+ placeholder="请填写金额"
|
|
|
+ style="width: 220px"
|
|
|
+ @change="computed"
|
|
|
+ />
|
|
|
+ </el-form-item> -->
|
|
|
|
|
|
<el-form-item label="利息">
|
|
|
<el-input
|
| xqd
@@ -242,6 +247,7 @@
|
|
|
class="ipwidth"
|
|
|
placeholder="服务费率"
|
|
|
style="width: 220px"
|
|
|
+ @input="inputMoney(index)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<!-- 利率 -->
|
| xqd
@@ -251,6 +257,7 @@
|
|
|
class="ipwidth"
|
|
|
placeholder="利率"
|
|
|
style="width: 220px"
|
|
|
+ @input="inputMoney(index)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
| xqd
@@ -310,6 +317,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { maxLoanAmount, serviceCharge, interest } from '@/utils/calc'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
| xqd
@@ -389,7 +397,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
mounted() {
|
|
|
this.$request({
|
|
|
url: '/api/Contract/search',
|
| xqd
@@ -440,6 +447,10 @@ export default {
|
|
|
this.loadTime()
|
|
|
},
|
|
|
methods: {
|
|
|
+ inputMoney(index) {
|
|
|
+ const { money, serviceRate, interestRate, expectDiscountDate, issueDate } = this.form.contractDrafts[index]
|
|
|
+ this.form.contractDrafts[index].loanLimit = maxLoanAmount(money, serviceRate, interestRate, expectDiscountDate, issueDate)
|
|
|
+ },
|
|
|
/* 确实上传按钮 */
|
|
|
onSubmit() {
|
|
|
this.$request({
|