소스 검색

change: 企业微信申请货物直发. 点击提交按钮后直接禁用. 优化出错提示逻辑.

peter 7 달 전
부모
커밋
e63efd0171
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      src/pages/wecom-approval/index.vue

+ 4 - 4
src/pages/wecom-approval/index.vue

@@ -1162,12 +1162,13 @@ const submit = function () {
   d.origin_form = form.value
   console.log(d, 'form data')
   loading.value = true
+  submited.value = true
   request
     .post('/Shipping_tracking/createShippingTracking', d)
     .then((res) => {
       const d = res.data
       console.log(d, 'create approval')
-      if (d.result.code === 200) {
+      if (d.result.code === 200 && d.code === 1) {
         ElNotification({
           duration: 0,
           type: 'success',
@@ -1177,13 +1178,12 @@ const submit = function () {
         setTimeout(() => {
           redirectToCRM()
         }, 3500)
-        submited.value = true
       } else {
         ElNotification({
           duration: 0,
           type: 'error',
-          title: '创建审核单出错!',
-          message: d.result.message.errmsg || '',
+          title: '创建审核单出错!请联系管理员',
+          message: d.result.message?.errmsg || d.msg || '',
         })
       }
     })