Handy_Cao hace 1 año
padre
commit
4c879e25ae

+ 9 - 3
src/packages/pc/views/footer/pricing/order/cancel/index.vue

@@ -14,7 +14,7 @@ import { ref, PropType } from 'vue'
 import { ElMessage } from 'element-plus'
 import { useCancelOrder } from '@/business/trade'
 import { handleRequestBigNumber } from '@/filters'
-import { i18n } from '@/stores'
+import { i18n, useSettingStore } from '@/stores'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const props = defineProps({
@@ -24,6 +24,8 @@ const props = defineProps({
     }
 })
 
+const settingStore = useSettingStore()
+
 const { cancelSubmit, formData, loading } = useCancelOrder()
 const { t } = i18n.global
 const show = ref(true)
@@ -40,10 +42,14 @@ const onCancelSumit = () => {
     formData.OldOrderId = handleRequestBigNumber(props.selectedRow.orderid)
     /// 提交
     cancelSubmit().then(() => {
-        ElMessage.success(t('common.submitsuccess'))
+        if (settingStore.getSettingValue('showOrderSuccessMessage')) {
+            ElMessage.success(t('common.submitsuccess'))
+        }
         onCancel(true)
     }).catch((err) => {
-        ElMessage.error(t('common.submitfailure') + err)
+        if (settingStore.getSettingValue('showOrderSuccessMessage')) {
+            ElMessage.error(t('common.submitfailure') + err)
+        }
     })
 }
 </script>

+ 6 - 2
src/packages/pc/views/footer/pricing/position/components/transfer/index.vue

@@ -171,10 +171,14 @@ const onCloseSumit = () => {
             formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
 
             formSubmit().then(() => {
-                ElMessage.success(t('position.transfer.tips2'))
+                if (settingStore.getSettingValue('showOrderSuccessMessage')) {
+                    ElMessage.success(t('position.transfer.tips2'))
+                }
                 onCancel(true)
             }).catch((err) => {
-                ElMessage.error(t('common.submitfailure') + err)
+                if (settingStore.getSettingValue('showOrderFailMessage')) {
+                    ElMessage.error(t('common.submitfailure') + err)
+                }
             })
         }
     })