lilei пре 1 година
родитељ
комит
fd800d6917

+ 2 - 0
src/views/expenseManagement/expenseReimbursement/baseDataModal.vue

@@ -164,6 +164,7 @@ export default {
   },
   methods: {
     cancel () {
+      this.spinning = false
       this.$emit('close')
     },
     pageInit () {
@@ -233,6 +234,7 @@ export default {
     // 设置数据
     setDetail(data, from){
       console.log(data)
+      this.spinning = false
       this.fromPage = from
       this.form = Object.assign(this.form, data)
       // 获取附件列表

+ 11 - 9
src/views/salesManagement/waitDispatchNew/edit.vue

@@ -120,8 +120,7 @@ export default {
         salesBillSn: this.salesBillSn
       }).then(res => {
         if (res.status == 200) {
-          this.getTotalData()
-          this.$refs.partQuery.resetSearchForm()
+          this.refashTable(true)
           this.$refs.partQuery.clearSelectTable()
           this.$message.success('添加成功', 2.5)
           this.spinning = false
@@ -151,8 +150,7 @@ export default {
         salesBillSn: this.salesBillSn
       }).then(res => {
         if (res.status == 200) {
-          this.getTotalData()
-          this.$refs.partQuery.resetSearchForm()
+          this.getOrderDetail()
           this.$message.success(res.message, 2.5)
           this.spinning = false
         } else {
@@ -164,16 +162,19 @@ export default {
     refashTable(flag){
       this.getTotalData()
       if(flag){
-        this.$refs.partQuery.resetSearchForm()
+        this.getOrderDetail(false)
       }
     },
     //  销售单详情
-    getOrderDetail () {
+    getOrderDetail (flag) {
       salesDetailBySn({ salesBillSn: this.salesBillSn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
-          this.getTotalData(true)
-          this.$refs.partQuery.pageInit(this.salesBillSn, this.detailData)
+          if(flag){
+            this.$refs.partQuery.pageInit(this.salesBillSn, this.detailData)
+          }else{
+            this.$refs.partQuery.resetSearchForm(this.detailData)
+          }
         }
       })
     },
@@ -211,7 +212,8 @@ export default {
     pageInit () {
       this.$refs.partQuery.clearSelectTable()
       this.salesBillSn = this.$route.params.salesBillSn
-      this.getOrderDetail()
+      this.getOrderDetail(true)
+      this.getTotalData(true)
     }
   },
   mounted () {

+ 5 - 1
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -486,7 +486,7 @@ export default {
         this.disabled = false
     },
     //  重置
-    resetSearchForm () {
+    resetSearchForm (detailData) {
       this.queryParam.pushProductType = ''
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
@@ -502,6 +502,10 @@ export default {
       this.dataSource = []
       this.clearSelectTable()
       this.searchTable()
+
+      if(detailData){
+        this.detailData = detailData
+      }
     },
     pageInit (salesBillSn, detailData) {
       this.salesBillSn = salesBillSn