|
|
@@ -232,29 +232,43 @@ const closeDia = () => {
|
|
|
|
|
|
const confirmDia = async () => {
|
|
|
// 确认按钮点击事件
|
|
|
- const loginConfig = []
|
|
|
- Object.keys(commissionAccountTypeSettings.value).forEach((key) => {
|
|
|
- const setting = commissionAccountTypeSettings.value[key]
|
|
|
- if (setting.selectedItem) {
|
|
|
- loginConfig.push(setting.selectedItem)
|
|
|
- }
|
|
|
- })
|
|
|
- let res = await ibApi.customCommissionPoint({
|
|
|
- id: dialogForm.value.id,
|
|
|
- loginConfig,
|
|
|
- })
|
|
|
- if (res.code == Code.StatusOK) {
|
|
|
- uni.showToast({
|
|
|
- title: t('Msg.ModifySuccess'),
|
|
|
+ try {
|
|
|
+ uni.showLoading({
|
|
|
+ mask: true
|
|
|
})
|
|
|
- closeDia()
|
|
|
- } else {
|
|
|
+ const loginConfig = []
|
|
|
+ Object.keys(commissionAccountTypeSettings.value).forEach((key) => {
|
|
|
+ const setting = commissionAccountTypeSettings.value[key]
|
|
|
+ if (setting.selectedItem) {
|
|
|
+ loginConfig.push(setting.selectedItem)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let res = await ibApi.customCommissionPoint({
|
|
|
+ id: dialogForm.value.id,
|
|
|
+ loginConfig,
|
|
|
+ })
|
|
|
+ if (res.code == Code.StatusOK) {
|
|
|
+ uni.showToast({
|
|
|
+ title: t('Msg.ModifySuccess'),
|
|
|
+ })
|
|
|
+ closeDia()
|
|
|
+ emit('confirm')
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }catch (e){
|
|
|
+ // console.log('error',e)
|
|
|
uni.showToast({
|
|
|
- title: res.msg,
|
|
|
+ title: e.msg,
|
|
|
icon: 'none',
|
|
|
})
|
|
|
+ }finally {
|
|
|
+ uni.hideLoading()
|
|
|
}
|
|
|
- emit('confirm')
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|