chenrui 2 سال پیش
والد
کامیت
14eef3f77f

+ 1 - 1
src/config/router.config.js

@@ -187,7 +187,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'waitDispatch/:salesBillSn/:dispatchBillSn',
+                path: 'waitDispatch/:salesBillSn',
                 name: 'waitDispatch',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/waitDispatch/edit.vue'),
                 meta: {

+ 9 - 6
src/views/salesManagement/salesQuery/detail.vue

@@ -429,12 +429,15 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.spinningAudit = false
-          if (billStatus == 'AUDIT_PASS' && !this.auditText && res.data.dispatchBillSn) {
-            this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.bizSn || this.$route.params.sn, dispatchBillSn: res.data.dispatchBillSn } })
-          } else {
-            //  关闭详情跳列表
-            this.handleBack()
-          }
+          const _this = this
+          this.$nextTick(() => {
+            if (billStatus == 'AUDIT_PASS' && !_this.auditText) {
+              _this.$router.push({ name: 'waitDispatch', params: { salesBillSn: _this.bizSn || _this.$route.params.sn } })
+            } else {
+              //  关闭详情跳列表
+              _this.handleBack()
+            }
+          })
         } else {
           this.visibleAudit = false
           this.spinningAudit = false

+ 1 - 1
src/views/salesManagement/salesQuery/list.vue

@@ -453,7 +453,7 @@ export default {
       findBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
         this.spinning = false
         if (res.status == 200) {
-          this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn, dispatchBillSn: res.data.dispatchBillSn } })
+          this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn } })
         }
       })
     },

+ 10 - 7
src/views/salesManagement/waitDispatch/edit.vue

@@ -144,9 +144,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        this.productForm.dispatchBillSn = this.$route.params.dispatchBillSn
         // 查询统计
-        this.getTotalData()
         return waitDispatchDetailAllList(Object.assign(parameter, this.productForm)).then(res => {
           let data
           if (res.status == 200) {
@@ -176,6 +174,11 @@ export default {
       findBySalesBillSn({ salesBillSn: this.$route.params.salesBillSn }).then(res => {
         if (res.status == 200) {
           this.totalData = res.data || null
+          this.productForm.dispatchBillSn = res.data.dispatchBillSn
+          const _this = this
+          this.$nextTick(() => {
+            _this.$refs.table.refresh()
+          })
         } else {
           this.totalData = null
         }
@@ -195,7 +198,7 @@ export default {
             _this.$refs.partQuery.resetCurForm()
             _this.$message.success(res.message)
             _this.spinning = false
-            _this.resetSearchForm(true)
+            _this.resetSearchForm()
           } else {
             _this.spinning = false
           }
@@ -205,8 +208,8 @@ export default {
       }
     },
     //  重置
-    resetSearchForm (flag) {
-      this.$refs.table.refresh(!!flag)
+    resetSearchForm () {
+      this.getTotalData()
       this.getOrderDetail()
     },
     //  返回
@@ -256,7 +259,7 @@ export default {
       _this.spinning = true
       deleteBatch(type == 0 ? [row.dispatchBillDetailSn] : row).then(res => {
         if (res.status == 200) {
-          _this.resetSearchForm(true)
+          _this.resetSearchForm()
           _this.$refs.partQuery.resetCurForm()
           if (type == 1) { //  批量操作
             _this.$refs.table.clearSelected() // 清空表格选中项
@@ -372,7 +375,7 @@ export default {
       this.$refs.partQuery.clearTable()
       this.salesBillSn = this.$route.params.salesBillSn
       this.getOrderDetail()
-      this.$refs.table.refresh(true)
+      this.getTotalData()
     }
   },
   mounted () {