fix: 处理细节问题
This commit is contained in:
parent
5b0ee16f72
commit
bda471b8c0
|
@ -602,10 +602,37 @@ export default {
|
|||
this.businessHours[1].getHours() * 60 +
|
||||
this.businessHours[1].getMinutes()
|
||||
}
|
||||
debugger
|
||||
shopBaseConfig({ shopId }, shopData).then(() => {
|
||||
this.$message.success('商户创建成功,权限及店铺信息已设置')
|
||||
this.$refs.ruleFormRef.resetFields()
|
||||
// 保留操作类型,只重置其他字段
|
||||
const operationType = this.form.operationType;
|
||||
this.form.mobile = '';
|
||||
this.form.password = '';
|
||||
this.form.permissionCodes = [];
|
||||
this.form.merchantId = null;
|
||||
this.form.enable = true;
|
||||
this.form.name = '';
|
||||
this.form.categoryId = '';
|
||||
this.form.background = '';
|
||||
this.form.isAutoBusiness = true;
|
||||
this.form.contactPhone = '';
|
||||
this.form.fileList = [];
|
||||
this.form.address = '';
|
||||
this.form.permits = [];
|
||||
this.form.lng = '';
|
||||
this.form.lat = '';
|
||||
this.form.detailAddress = '';
|
||||
this.form.pickName = '';
|
||||
this.form.pickLng = '';
|
||||
this.form.pickAddress = '';
|
||||
this.form.pickLat = '';
|
||||
this.form.pickImg = '';
|
||||
this.form.promisePickDeliveryTime = '';
|
||||
this.form.operationType = operationType; // 保留操作类型
|
||||
// 重置权限树的勾选状态
|
||||
if (this.$refs.permissionTree) {
|
||||
this.$refs.permissionTree.setCheckedKeys([]);
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -628,7 +655,12 @@ export default {
|
|||
}
|
||||
setMerchantPermissions(permissionsData).then(() => {
|
||||
this.$message.success('商户信息更新成功')
|
||||
this.$refs.ruleFormRef.resetFields()
|
||||
// 只重置部分字段,保留merchantId和operationType
|
||||
this.form.permissionCodes = [];
|
||||
// 重置权限树的勾选状态
|
||||
if (this.$refs.permissionTree) {
|
||||
this.$refs.permissionTree.setCheckedKeys([]);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -316,7 +316,21 @@ export default {
|
|||
}
|
||||
createSubAccount(createData).then(() => {
|
||||
this.$message.success('创建成功');
|
||||
this.$refs.ruleFormRef.resetFields();
|
||||
// 保留操作类型,只重置其他字段
|
||||
const operationType = this.form.operationType;
|
||||
this.form.username = '';
|
||||
this.form.password = '';
|
||||
this.form.name = '';
|
||||
this.form.mobile = '';
|
||||
this.form.remark = '';
|
||||
this.form.permissionCodes = [];
|
||||
this.form.accountId = null;
|
||||
this.form.enable = true;
|
||||
this.form.operationType = operationType; // 保留操作类型
|
||||
// 重置权限树的勾选状态
|
||||
if (this.$refs.permissionTree) {
|
||||
this.$refs.permissionTree.setCheckedKeys([]);
|
||||
}
|
||||
});
|
||||
} else if (this.form.operationType === 'update') {
|
||||
if (!this.form.accountId) {
|
||||
|
@ -334,7 +348,16 @@ export default {
|
|||
};
|
||||
updateSubAccount(updateData).then(() => {
|
||||
this.$message.success('更新成功');
|
||||
this.$refs.ruleFormRef.resetFields();
|
||||
// 只重置部分字段,保留accountId和operationType
|
||||
this.form.name = '';
|
||||
this.form.mobile = '';
|
||||
this.form.remark = '';
|
||||
this.form.permissionCodes = [];
|
||||
this.form.enable = true;
|
||||
// 重置权限树的勾选状态
|
||||
if (this.$refs.permissionTree) {
|
||||
this.$refs.permissionTree.setCheckedKeys([]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue