fix: 增加账户状态功能优化完善。
This commit is contained in:
@@ -24,6 +24,11 @@
|
||||
inputAlign="right" border="none"></u--input>
|
||||
<u-icon slot="right" name="arrow-down"></u-icon>
|
||||
</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="balance" >
|
||||
<u--input v-model="form.balance" placeholder="请填写余额"
|
||||
inputAlign="right" border="none"></u--input>
|
||||
@@ -45,6 +50,8 @@
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<u-picker itemHeight="88" :show="showTeam" :columns="lendTypeList" keyName="dictLabel" @cancel="handleCancel"
|
||||
@confirm="handleConfirm"></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"
|
||||
@@ -69,6 +76,8 @@ const showTeam = ref(false)
|
||||
const title = ref("借贷账户管理")
|
||||
const lendTypeList = ref([])
|
||||
const dateType = ref(1)
|
||||
const showStatus = ref(false)
|
||||
const statusList = ref([])
|
||||
const data = reactive({
|
||||
form: {
|
||||
id: null,
|
||||
@@ -91,12 +100,15 @@ const data = reactive({
|
||||
updateTime: null,
|
||||
delFlag: null,
|
||||
remark: null,
|
||||
debitType: null
|
||||
debitType: null,
|
||||
status: '1',
|
||||
statusName: '正常使用'
|
||||
},
|
||||
// dateType:'1',
|
||||
rules: {
|
||||
name: [{ type: 'string', required: true, message: '借贷名称不能为空', trigger: ['change', 'blur'] }],
|
||||
code: [{ type: 'string', required: true, message: '账号不能为空', trigger: ['change', 'blur'] }],
|
||||
statusName: [{ type: 'string', required: true, message: '账户状态不能为空', trigger: ['change', 'blur'] }],
|
||||
balance: [{ type: 'number', required: true, message: '余额不能为空', trigger: ['change', 'blur'] }],
|
||||
lendTypeName: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
|
||||
}
|
||||
@@ -120,6 +132,10 @@ onLoad((option) => {
|
||||
// 类型
|
||||
getDicts('lend_type').then(res => {
|
||||
lendTypeList.value =[res.data]
|
||||
})
|
||||
// 类型
|
||||
getDicts('account_status').then(res => {
|
||||
statusList.value =[res.data]
|
||||
})
|
||||
if(form.value.id!=null){
|
||||
getBankcardLend(form.value.id).then(res => {
|
||||
@@ -128,7 +144,10 @@ onLoad((option) => {
|
||||
getDicts('lend_type').then(result => {
|
||||
form.value.lendTypeName=dictStr(form.value.lendType, result.data)
|
||||
})
|
||||
|
||||
// 类型
|
||||
getDicts('account_status').then(result => {
|
||||
form.value.statusName=dictStr(form.value.status, result.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -159,6 +178,23 @@ onLoad((option) => {
|
||||
function handleCancel() {
|
||||
showTeam.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
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<u-cell title="借贷名称:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
|
||||
<u-cell title="账号:" titleStyle="font-weight:bolder" :value="detailInfo.code"></u-cell>
|
||||
<u-cell title="类型:" titleStyle="font-weight:bolder" :value="detailInfo.lendType"></u-cell>
|
||||
<u-cell title="账户状态:" titleStyle="font-weight:bolder" :value="detailInfo.status"></u-cell>
|
||||
<u-cell title="备注:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
@@ -38,6 +39,10 @@ onLoad((option) => {
|
||||
// 类型
|
||||
getDicts('lend_type').then(result => {
|
||||
detailInfo.value.lendType=dictStr(detailInfo.value.lendType, result.data)
|
||||
})
|
||||
// 类型
|
||||
getDicts('account_status').then(result => {
|
||||
detailInfo.value.status=dictStr(detailInfo.value.status, result.data)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
<text class="row-label">类型:</text>
|
||||
<text class="row-value">{{ dictStr(item.lendType, lendTypeList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">账户状态:</text>
|
||||
<text class="row-value">{{ dictStr(item.status, statusList) }}</text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">备注:</text>
|
||||
<text class="row-value">{{ item.remark }}</text>
|
||||
@@ -70,6 +74,7 @@ const status = ref('loadmore')
|
||||
const lendTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const statusList = ref([])
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryParams: {
|
||||
@@ -113,6 +118,10 @@ function getList() {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
// 账户状态
|
||||
getDicts('account_status').then(res => {
|
||||
statusList.value = res.data
|
||||
})
|
||||
// 类型
|
||||
getDicts('lend_type').then(res => {
|
||||
lendTypeList.value = res.data
|
||||
|
||||
Reference in New Issue
Block a user