浏览代码

bug 修复

lilei 3 年之前
父节点
当前提交
9494ff3070

+ 16 - 6
src/views/allocationManagement/transferReturn/basicInfoModal.vue

@@ -75,7 +75,7 @@
 import { commonMixin } from '@/utils/mixin'
 import debounce from 'lodash/debounce'
 import { VSelect } from '@/components'
-import { allocateReturnSave } from '@/api/allocateReturn'
+import { allocateReturnSave, allocateReturnQueryBySn } from '@/api/allocateReturn'
 import { dealerSubareaScopeList } from '@/api/dealer'
 import { allocateTypeAllList } from '@/api/allocateType'
 export default {
@@ -144,6 +144,20 @@ export default {
       const ind = this.dealerData.findIndex(item => item.dealerSn == value)
       this.form.targetName = this.dealerData[ind].dealerName
     },
+    // 基本信息
+    getDetail (data, flag) {
+      const _this = this
+      this.spinning = true
+      allocateReturnQueryBySn({ allocateReturnSn: data.allocateReturnSn }).then(res => {
+        if (res.status == 200) {
+          if (flag) {
+            _this.isShow = false
+            _this.$emit('ok', res.data)
+          }
+        }
+        this.spinning = false
+      })
+    },
     //  保存
     handleSave () {
       const _this = this
@@ -154,11 +168,7 @@ export default {
           allocateReturnSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              setTimeout(() => {
-                _this.isShow = false
-                _this.$emit('ok', res.data)
-                _this.spinning = false
-              }, 1000)
+              _this.getDetail(res.data, true)
             } else {
               _this.spinning = false
             }

+ 1 - 1
src/views/allocationManagement/transferReturn/edit.vue

@@ -279,7 +279,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         const dealerLevel = this.$route.params.dealerLevel == 'OTHER' ? undefined : this.$route.params.dealerLevel
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel })).then(res => {
+        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {

+ 1 - 1
src/views/allocationManagement/transferReturn/list.vue

@@ -270,7 +270,7 @@ export default {
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ name: row.grabFlag == 1 ? 'transferReturnGrpEdit' : 'transferReturnEdit', params: { sn: row.allocateReturnSn, targetType: row.targetType, dealerLevel: row.dealerLevel } })
+      this.$router.push({ name: row.grabFlag == 1 ? 'transferReturnGrpEdit' : 'transferReturnEdit', params: { sn: row.allocateReturnSn, targetType: row.targetType, dealerLevel: row.dealerLevel || '0' } })
     },
     // 品检
     handleCheck (row) {