fix(huifu-onboard): 修复汇付进件表单草稿回显及省市区解析异常
- 后端优先读取模型原始字段,避免 toArray 导致 payload 丢失 - 前端优化草稿应用逻辑,增加 nextTick 兜底防止组件未挂载时赋值失败 - 修复 account_type 等字段值为 '0' 时被错误过滤的问题 - 重构省市区文本解析逻辑,确保地址数据加载后正确回显名称而非 ID
这个提交包含在:
@@ -101,6 +101,14 @@ export default {
|
||||
this.canModifyCard = !!data.can_modify_card_bind || !!(this.huifuStatus && this.huifuStatus.can_modify_card);
|
||||
this.roleType = data.role_type || (this.huifuStatus.role_type || '');
|
||||
this.roleRefId = parseInt(data.role_ref_id || this.huifuStatus.role_ref_id || 0, 10) || 0;
|
||||
this.$nextTick(() => this.fillFormFromStatus());
|
||||
},
|
||||
fillFormFromStatus() {
|
||||
const draft = this.huifuStatus && (this.huifuStatus.draft || this.huifuStatus.form);
|
||||
if (!draft || !this.$refs.huifuForm || typeof this.$refs.huifuForm.applyDraft !== 'function') {
|
||||
return;
|
||||
}
|
||||
this.$refs.huifuForm.applyDraft(draft);
|
||||
},
|
||||
loadOnboardBind() {
|
||||
this.$http('money.walletOnboard', {}, '', false).then(res => {
|
||||
@@ -115,8 +123,11 @@ export default {
|
||||
setTimeout(() => this.$Router.back(), 1500);
|
||||
return;
|
||||
}
|
||||
this.applyOnboardData(data);
|
||||
// 先挂载表单,再写入状态并回显,避免 draft 赋值时组件尚未创建
|
||||
this.loaded = true;
|
||||
this.$nextTick(() => {
|
||||
this.applyOnboardData(data);
|
||||
});
|
||||
});
|
||||
},
|
||||
submitOnboardBind() {
|
||||
|
||||
在新工单中引用
屏蔽一个用户