changjiaming 7 місяців тому
батько
коміт
3db7ef71f9

+ 13 - 13
src/views/myTrade/settlementDocumentManagement/add.vue

@@ -318,7 +318,7 @@ export default {
   },
   components: { chooseGoodsVue },
   mounted() {
-    if(this.$route.params.key) {
+    if(this.$route.query.key) {
       this.getDetail()
     } else {
       // this.getCenterComList()
@@ -330,7 +330,7 @@ export default {
       request({
         url: '/bill/getDetail',
         method: 'get',
-        params: { taskId: this.$route.params.taskId, businessKey: this.$route.params.key,
+        params: { taskId: this.$route.query.taskId, businessKey: this.$route.query.key,
           Loading: true }
       }).then(({ data }) => {
         Object.keys(this.ruleForm).forEach(key => {
@@ -569,12 +569,12 @@ export default {
       }
       // this.isLoading = true
       let data = new FormData()
-      if(this.$route.params.key) {
-        data.append('businessKey', this.$route.params.key)
-        data.append('id', this.$route.params.key)
+      if(this.$route.query.key) {
+        data.append('businessKey', this.$route.query.key)
+        data.append('id', this.$route.query.key)
       }
-      if(this.$route.params.taskId) {
-        data.append('taskId', this.$route.params.taskId)
+      if(this.$route.query.taskId) {
+        data.append('taskId', this.$route.query.taskId)
       }
       data.append('supplierId', this.businessInfo.supplierId)
       data.append('businessNumber', this.ruleForm.businessNumber)
@@ -621,7 +621,7 @@ export default {
       });
       data.append('submit', flag == 2)
       request({
-        url: this.$route.params.key ? '/bill/updateBill' : '/bill/addBillBasicInformation',
+        url: this.$route.query.key ? '/bill/updateBill' : '/bill/addBillBasicInformation',
         method: 'post',
         data
       }).then(() => {
@@ -652,12 +652,12 @@ export default {
       }
       this.loading = true
       let data = new FormData()
-      if(this.$route.params.key) {
-        data.append('businessKey', this.$route.params.key)
-        data.append('id', this.$route.params.key)
+      if(this.$route.query.key) {
+        data.append('businessKey', this.$route.query.key)
+        data.append('id', this.$route.query.key)
       }
-      if(this.$route.params.taskId) {
-        data.append('taskId', this.$route.params.taskId)
+      if(this.$route.query.taskId) {
+        data.append('taskId', this.$route.query.taskId)
       }
       data.append('supplierId', this.businessInfo.supplierId)
       data.append('businessNumber', this.ruleForm.businessNumber)

+ 1 - 1
src/views/myTrade/settlementDocumentManagement/detail.vue

@@ -54,7 +54,7 @@ export default {
       request({
         url: '/bill/doBusinessHistoryView',
         method: 'get',
-        params: { businessKey: this.$route.params.key, businessType: 'BillBasicInformation' }
+        params: { businessKey: this.$route.query.key, businessType: 'BillBasicInformation' }
       }).then(({ data }) => {
         data.forEach(item => {
           if(item.obj) {

+ 3 - 3
src/views/myTrade/settlementDocumentManagement/editPrice.vue

@@ -191,7 +191,7 @@ export default {
       request({
         url: '/bill/getDetail',
         method: 'get',
-        params: { taskId: this.$route.params.taskId, businessKey: this.$route.params.key }
+        params: { taskId: this.$route.query.taskId, businessKey: this.$route.query.key }
       }).then(({ data }) => {
         Object.keys(this.ruleForm).forEach(key => {
           if(data.billBasicInformation[key] && !(this.ruleForm[key] instanceof Array)) {
@@ -245,8 +245,8 @@ export default {
     submit() {
       // this.isLoading = true
       let data = {
-        businessKey: this.$route.params.key,
-        id: this.$route.params.key,
+        businessKey: this.$route.query.key,
+        id: this.$route.query.key,
         settlementGoodsInfos: this.ruleForm.goodsList.map(item => {
           item.acceptanceGoodsInfoId = item.id
           return item

+ 4 - 1
src/views/myTrade/settlementDocumentManagement/index.vue

@@ -109,7 +109,10 @@ export default {
       } else if(type == 'see') {
         this.$router.push({
           name: 'SettlementDetail',
-          params: { id: 'child', taskId: info.taskId, key: info.id }
+          params: { id: 'child', taskId: info.taskId, key: info.id },
+          query: {
+            taskId: info.taskId, key: info.id
+          }
         })
       } else if(type == 'changePrice') {
         this.$router.push({