xiaohaizhao 4 месяцев назад
Родитель
Сommit
5d92b1fd23
4 измененных файлов с 9 добавлено и 10 удалено
  1. 1 0
      pages/workOrder/changeMsg.vue
  2. 4 2
      pages/workOrder/detail.vue
  3. 3 7
      pages/workOrder/work.vue
  4. 1 1
      utils/Http.js

+ 1 - 0
pages/workOrder/changeMsg.vue

@@ -200,6 +200,7 @@ function save() {
                                     }
                                     }
                                 })
                                 })
                                 console.log("开始工单", start)
                                 console.log("开始工单", start)
+                                $Http.getDetail && $Http.getDetail()
                                 uni.hideLoading();
                                 uni.hideLoading();
                             }
                             }
                             let pages = getCurrentPages();
                             let pages = getCurrentPages();

+ 4 - 2
pages/workOrder/detail.vue

@@ -185,7 +185,10 @@ let sa_workorderid = 0;
 onLoad((options) => {
 onLoad((options) => {
     sa_workorderid = options.id;
     sa_workorderid = options.id;
     getDetail()
     getDetail()
-    $Http.getDetail = getDetail;
+    $Http.getDetail = function () {
+        uni.showToast({ title: "保存成功", icon: 'none' });
+        getDetail()
+    }
 });
 });
 
 
 onUnload(() => {
 onUnload(() => {
@@ -287,7 +290,6 @@ function submit() {
     })
     })
 }
 }
 
 
-
 // 接单
 // 接单
 const takeOrderShow = ref(false);
 const takeOrderShow = ref(false);
 
 

+ 3 - 7
pages/workOrder/work.vue

@@ -490,7 +490,7 @@ async function save() {
         }
         }
     }).then(res => {
     }).then(res => {
         loading.value = false;
         loading.value = false;
-        console.log("保存工", res);
+        console.log("保存工", res);
         if (res.code != 1) return wx.showModal({
         if (res.code != 1) return wx.showModal({
             title: '保存失败',
             title: '保存失败',
             content: res.msg,
             content: res.msg,
@@ -501,12 +501,8 @@ async function save() {
             loading.value = false;
             loading.value = false;
         })
         })
         formModified.value = false;
         formModified.value = false;
-        uni.navigateBack({
-            success: () => {
-                $Http.getDetail && $Http.getDetail()
-                uni.showToast({ title: res.code !== 1 ? res.msg : "保存成功", icon: 'none' });
-            }
-        })
+        uni.navigateBack()
+        $Http.getDetail && $Http.getDetail()
     })
     })
 }
 }
 
 

+ 1 - 1
utils/Http.js

@@ -44,7 +44,7 @@ class HTTP {
         }
         }
 
 
         if (process.env.NODE_ENV === 'development') {
         if (process.env.NODE_ENV === 'development') {
-            this.baseUrl = this.urls[1].url;
+            this.baseUrl = this.urls[0].url;
         } else {
         } else {
             this.baseUrl = this.urls[0].url;
             this.baseUrl = this.urls[0].url;
         }
         }