提交表单信息成功

This commit is contained in:
WindowBird 2025-08-20 15:45:08 +08:00
parent d25fae6eea
commit 5c2c7c483f
2 changed files with 18 additions and 23 deletions

View File

@ -18,13 +18,16 @@ export function addBankAccount(params) {
return request({
url: '/app/account',
method: 'POST',
header: {
'Content-Type': 'application/x-www-form-urlencoded',
},
data: {
type: params.type || 'BANK',
no: params.no,
name: params.name,
idCard: params.idCard,
mobile: params.mobile
}
mobile: params.mobile,
},
})
}
@ -36,10 +39,10 @@ export function addBankAccount(params) {
export function deleteBankAccount(ids) {
// 如果传入的是数组,转换为逗号分隔的字符串
const idString = Array.isArray(ids) ? ids.join(',') : ids
return request({
url: `/app/account/${idString}`,
method: 'DELETE'
method: 'DELETE',
})
}
@ -50,7 +53,7 @@ export function deleteBankAccount(ids) {
export function getBankAccountList() {
return request({
url: '/app/account',
method: 'GET'
method: 'GET',
})
}
@ -74,7 +77,7 @@ export function updateBankAccount(params) {
no: params.no,
name: params.name,
idCard: params.idCard,
mobile: params.mobile
}
mobile: params.mobile,
},
})
}
}

View File

@ -9,12 +9,7 @@
<view class="modal-body">
<view class="form-item">
<text class="form-label">账户类型</text>
<picker
:range="typeOptions"
:value="typeIndex"
range-key="label"
@change="onTypeChange"
>
<picker :range="typeOptions" :value="typeIndex" range-key="label" @change="onTypeChange">
<view class="picker-value">{{ typeOptions[typeIndex].label }}</view>
</picker>
</view>
@ -63,9 +58,9 @@
<view class="modal-footer">
<view class="modal-btn cancel-btn" @click="handleClose">取消</view>
<view
<view
:class="{ 'loading-btn': loading }"
class="modal-btn confirm-btn"
class="modal-btn confirm-btn"
@click="handleSubmit"
>
{{ loading ? '添加中...' : '确认添加' }}
@ -83,8 +78,8 @@ export default {
props: {
visible: {
type: Boolean,
default: false
}
default: false,
},
},
data() {
return {
@ -118,7 +113,7 @@ export default {
if (newVal) {
this.resetForm()
}
}
},
},
methods: {
//
@ -256,6 +251,7 @@ export default {
}
.modal-content {
padding: 30rpx;
width: 90%;
max-width: 600rpx;
background: #fff;
@ -288,8 +284,6 @@ export default {
}
.modal-body {
padding: 30rpx;
.form-item {
margin-bottom: 30rpx;
@ -302,7 +296,6 @@ export default {
}
.form-input {
width: 100%;
height: 80rpx;
border: 1rpx solid #e0e0e0;
border-radius: 10rpx;
@ -318,7 +311,6 @@ export default {
}
.picker-value {
width: 100%;
height: 80rpx;
border: 1rpx solid #e0e0e0;
border-radius: 10rpx;