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