fix: 增加账户状态功能优化完善。
This commit is contained in:
@@ -23,6 +23,11 @@
|
||||
<u--input v-model="form.creditLimit" placeholder="请填写信用卡额度"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="账户状态" required prop="statusName" @click="handleShowStatus">
|
||||
<u--input v-model="form.statusName" disabled disabledColor="#ffffff" placeholder="请选择账户状态"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="账单日" required prop="billDate" >
|
||||
<u--input v-model="form.billDate" placeholder="请填写账单日"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
@@ -89,6 +94,8 @@
|
||||
@confirm="handleConfirm"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showIsZeroBill" :columns="isZeroBillList" keyName="dictLabel" @cancel="handleIsZeroBillCancel"
|
||||
@confirm="handleIsZeroBillConfirm"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showStatus" :columns="statusList" keyName="dictLabel" @cancel="handleStatusCancel"
|
||||
@confirm="handleStatusConfirm"></u-picker>
|
||||
<u-datetime-picker
|
||||
:show="datePickShow"
|
||||
mode="date"
|
||||
@@ -114,6 +121,8 @@ const showIsZeroBill = ref(false)
|
||||
const title = ref("信用卡管理")
|
||||
const isNextBillDateList = ref([])
|
||||
const isZeroBillList = ref([])
|
||||
const showStatus = ref(false)
|
||||
const statusList = ref([])
|
||||
const dateType = ref(1)
|
||||
const data = reactive({
|
||||
form: {
|
||||
@@ -140,7 +149,9 @@ const data = reactive({
|
||||
debitType: null,
|
||||
isNextBillDate: null,
|
||||
nextBillDateTime: null,
|
||||
isZeroBill: null
|
||||
isZeroBill: null,
|
||||
status: '1',
|
||||
statusName: '正常使用'
|
||||
},
|
||||
// dateType:'1',
|
||||
rules: {
|
||||
@@ -148,6 +159,7 @@ const data = reactive({
|
||||
code: [{ type: 'string', required: true, message: '信用卡卡号不能为空', trigger: ['change', 'blur'] }],
|
||||
billDate: [{ type: 'number', required: true, message: '账单日不能为空', trigger: ['change', 'blur'] }],
|
||||
payDate: [{ type: 'number', required: true, message: '还款日不能为空', trigger: ['change', 'blur'] }],
|
||||
statusName: [{ type: 'string', required: true, message: '账户状态不能为空', trigger: ['change', 'blur'] }],
|
||||
creditLimit: [{ type: 'number', required: true, message: '信用卡额度不能为空', trigger: ['change', 'blur'] }],
|
||||
balance: [{ type: 'number', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
|
||||
availableLimit: [{ type: 'number', required: true, message: '可用额度不能为空', trigger: ['change', 'blur'] }],
|
||||
@@ -176,6 +188,10 @@ onLoad((option) => {
|
||||
// 类型
|
||||
getDicts('is_zero_bill').then(res => {
|
||||
isZeroBillList.value =[res.data]
|
||||
})
|
||||
// 类型
|
||||
getDicts('account_status').then(res => {
|
||||
statusList.value =[res.data]
|
||||
})
|
||||
if(form.value.id!=null){
|
||||
getBankcardLend(form.value.id).then(res => {
|
||||
@@ -188,6 +204,11 @@ onLoad((option) => {
|
||||
getDicts('is_zero_bill').then(result => {
|
||||
form.value.isZeroBillName=dictStr(form.value.isZeroBill, result.data)
|
||||
})
|
||||
|
||||
// 类型
|
||||
getDicts('account_status').then(result => {
|
||||
form.value.statusName=dictStr(form.value.status, result.data)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
@@ -236,6 +257,25 @@ onLoad((option) => {
|
||||
function handleIsZeroBillCancel() {
|
||||
showIsZeroBill.value = false
|
||||
}
|
||||
|
||||
function handleShowStatus() {
|
||||
if (statusList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '账户状态操作为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showStatus.value = true
|
||||
}
|
||||
}
|
||||
function handleStatusConfirm(e) {
|
||||
form.value.statusName = e.value[0].dictLabel
|
||||
form.value.status = e.value[0].dictValue
|
||||
showStatus.value = false
|
||||
}
|
||||
function handleStatusCancel() {
|
||||
showStatus.value = false
|
||||
}
|
||||
|
||||
function selectDate(type) {
|
||||
dateType.value=type
|
||||
datePickShow.value = true
|
||||
|
||||
Reference in New Issue
Block a user