diff --git a/src/pages/work/bill/onlineLendHistory/addEdit.vue b/src/pages/work/bill/onlineLendHistory/addEdit.vue
index ebf2c40..fb87edd 100644
--- a/src/pages/work/bill/onlineLendHistory/addEdit.vue
+++ b/src/pages/work/bill/onlineLendHistory/addEdit.vue
@@ -23,6 +23,11 @@
+
+
+
+
+
@@ -108,6 +115,8 @@ const showTeam = ref(false)
const showOnlineLend = ref(false)
const title = ref("贷款账单")
const bankCardLendList = ref([])
+const showDebitCard = ref(false)
+const debitCardList = ref([])
const settleStateList = ref([])
const data = reactive({
form: {
@@ -125,7 +134,7 @@ const data = reactive({
interestRate: null,
dueDate: null,
closeDate: null,
- state: null,
+ state: '0',
createBy: null,
createTime: null,
updateBy: null,
@@ -140,6 +149,13 @@ const data = reactive({
lendType: '1',
pageSize: 1000
},
+ queryDebitCardParams: {
+ pageNum: 1,
+ type: '1',
+ status: '1',
+ // lendType: '1',
+ pageSize: 1000
+ },
rules: {
onlineLendName: [{ type: 'string', required: true, message: '贷款机构不能为空', trigger: ['change', 'blur'] }],
billDate: [{ type: 'string', required: true, message: '借款日期不能为空', trigger: ['change', 'blur'] }],
@@ -151,7 +167,7 @@ const data = reactive({
balance: [{ type: 'number', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
}
})
-const { form, queryBankCardLendParams, rules} = toRefs(data)
+const { form, queryBankCardLendParams, queryDebitCardParams, rules} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
@@ -172,11 +188,15 @@ onLoad((option) => {
})
listAccounts(queryBankCardLendParams.value).then((response) => {
bankCardLendList.value = [response.rows]
+ })
+ listAccounts(queryDebitCardParams.value).then((response) => {
+ debitCardList.value = [response.rows]
})
if(form.value.id!=null){
getInstallmentHistory(form.value.id).then(res => {
form.value = res.data
form.value.onlineLendName = res.data.bankName
+ form.value.debitCardName = res.data.receivingAccountNameCode
// 类型
getDicts('settle_state').then(result => {
form.value.settleStateName=dictStr(form.value.state, result.data)
@@ -230,6 +250,24 @@ onLoad((option) => {
showOnlineLend.value = false
}
+ function handleDebitCard() {
+ if (debitCardList.value[0].length === 0) {
+ proxy.$refs['uToast'].show({
+ message: '收款账户为空 ', type: 'warning'
+ })
+ } else {
+ showDebitCard.value = true
+ }
+ }
+ function handleDebitCardConfirm(e) {
+ form.value.debitCardName = e.value[0].nameCode
+ form.value.receivingAccountId= e.value[0].id
+ showDebitCard.value = false
+ }
+ function handleDebitCardCancel() {
+ showDebitCard.value = false
+ }
+
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
diff --git a/src/pages/work/bill/onlineLendHistory/details.vue b/src/pages/work/bill/onlineLendHistory/details.vue
index 9828911..9c3bc13 100644
--- a/src/pages/work/bill/onlineLendHistory/details.vue
+++ b/src/pages/work/bill/onlineLendHistory/details.vue
@@ -13,12 +13,16 @@
+
+ 还款账户:
+ {{ item.repaymentAccountName }}
+
还款日期:
{{ item.repaymentDate }}
- 入账状态:
+ 还款状态:
{{ dictStr(item.postingState, postingStateList) }}
@@ -38,8 +42,9 @@
{{ item.interest }}
- 修改
- 删除
+ 修改
+ 查看
+ 删除
@@ -123,7 +128,7 @@ function getList() {
}
function getDict() {
// 交易类型
- getDicts('posting_state').then(res => {
+ getDicts('repayment_state').then(res => {
postingStateList.value = res.data
})
@@ -170,6 +175,10 @@ function handleUpdateInterest() {
uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}` })
isShow.value = true
}
+ function handleView(item) {
+ uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/detailsAddEdit?id=${item.id}&installmentHistoryId=${queryParams.value.installmentHistoryId}&name=${queryParams.value.name}&viewOnly=1` })
+ isShow.value = true
+ }
// function handleAdd() {
// uni.navigateTo({ url: `/pages/work/bill/onlineLendHistory/addEdit` })
// isShow.value = true
diff --git a/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue b/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue
index fabf8b6..1dbe27e 100644
--- a/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue
+++ b/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue
@@ -11,38 +11,43 @@
-
+
+
+
+
+
-
+
-
-
-
-
-
+
-
+
-
-
+
@@ -59,6 +64,8 @@
@confirm="datePickConfirm"
itemHeight="88"
>
+
@@ -69,6 +76,7 @@ import {
updateInstallmentDetail
} from '@/api/invest/installmentDetail'
import { getDicts } from '@/api/system/dict/data.js'
+ import { listAccounts } from '@/api/invest/accounts'
const { proxy } = getCurrentInstance()
import dayjs from 'dayjs'
import {onLoad,onReady} from "@dcloudio/uni-app";
@@ -77,25 +85,36 @@ import {reactive ,toRefs,ref,computed ,getCurrentInstance }from "vue";
const datePickShow = ref(false)
const showTeam = ref(false)
const title = ref("贷款账单还款明细")
+const showDebitCard = ref(false)
+const debitCardList = ref([])
const postingStateList = ref([])
+const viewOnly = ref(false)
const data = reactive({
form: {},
+ queryDebitCardParams: {
+ pageNum: 1,
+ type: '1',
+ status: '1',
+ // lendType: '1',
+ pageSize: 1000
+ },
rules: {
repaymentDate: [{ type: 'string', required: true, message: '还款日期不能为空', trigger: ['change', 'blur'] }],
periods: [{ type: 'number', required: true, message: '还款期数不能为空', trigger: ['change', 'blur'] }],
interest: [{ type: 'number', required: true, message: '利息不能为空', trigger: ['change', 'blur'] }],
principal: [{ type: 'number', required: true, message: '应还本金不能为空', trigger: ['change', 'blur'] }],
- postingStateName: [{ type: 'string', required: true, message: '入账状态不能为空', trigger: ['change', 'blur'] }],
+ postingStateName: [{ type: 'string', required: true, message: '还款状态不能为空', trigger: ['change', 'blur'] }],
}
})
-const { form, rules} = toRefs(data)
+const { form, rules, queryDebitCardParams} = toRefs(data)
onLoad((option) => {
form.value.id = option.id
form.value.installmentHistoryId = option.installmentHistoryId
form.value.name = option.name
+ viewOnly.value = option.viewOnly === '1'
if(form.value.id!=null){
- title.value="贷款账单还款明细-修改"
+ title.value = viewOnly.value ? "贷款账单还款明细-查看" : "贷款账单还款明细-修改"
}else{
title.value="贷款账单还款明细-新增"
}
@@ -106,14 +125,18 @@ onLoad((option) => {
})
function getDict() {
// 类型
- getDicts('posting_state').then(res => {
+ getDicts('repayment_state').then(res => {
postingStateList.value =[res.data]
+ })
+ listAccounts(queryDebitCardParams.value).then((response) => {
+ debitCardList.value = [response.rows]
})
if(form.value.id!=null){
getInstallmentDetail(form.value.id).then(res => {
form.value = res.data
+ form.value.debitCardName = res.data.repaymentAccountName
// 类型
- getDicts('posting_state').then(result => {
+ getDicts('repayment_state').then(result => {
form.value.postingStateName=dictStr(form.value.postingState, result.data)
})
@@ -147,6 +170,24 @@ onLoad((option) => {
function handleCancel() {
showTeam.value = false
}
+ function handleDebitCard() {
+ if (debitCardList.value[0].length === 0) {
+ proxy.$refs['uToast'].show({
+ message: '收款账户为空 ', type: 'warning'
+ })
+ } else {
+ showDebitCard.value = true
+ }
+ }
+ function handleDebitCardConfirm(e) {
+ form.value.debitCardName = e.value[0].nameCode
+ form.value.repaymentAccountId= e.value[0].id
+ showDebitCard.value = false
+ }
+ function handleDebitCardCancel() {
+ showDebitCard.value = false
+ }
+
function selectDate() {
datePickShow.value = true
proxy.$refs['createTimeRef'].innerValue = new Date().getTime()
diff --git a/src/pages/work/bill/onlineLendHistory/list.vue b/src/pages/work/bill/onlineLendHistory/list.vue
index b5b0f8e..c2d11fd 100644
--- a/src/pages/work/bill/onlineLendHistory/list.vue
+++ b/src/pages/work/bill/onlineLendHistory/list.vue
@@ -45,10 +45,10 @@
借款日期:
{{ item.installmentDate }}
-
+
+ 收款账户:
+ {{ item.receivingAccountNameCode }}
+
已还期数:
{{ item.repaidPeriod }}