|
@@ -56,18 +56,11 @@
|
|
</template>
|
|
</template>
|
|
<!-- 退货原因 -->
|
|
<!-- 退货原因 -->
|
|
<template slot="returnReason" slot-scope="text, record">
|
|
<template slot="returnReason" slot-scope="text, record">
|
|
- <a-select
|
|
|
|
- style="width:100%;"
|
|
|
|
|
|
+ <returnReason
|
|
v-model="record.returnReason"
|
|
v-model="record.returnReason"
|
|
v-if="record.addFlag == '1'&&record.addType == 'WAREHOUSE_RECEIVE'"
|
|
v-if="record.addFlag == '1'&&record.addType == 'WAREHOUSE_RECEIVE'"
|
|
- @change="e => onCellBlurReturnReason(e, record)"
|
|
|
|
- placeholder="请选择退货原因"
|
|
|
|
- >
|
|
|
|
- <a-select-option v-for="item in returnReasonList" :value="item.code">
|
|
|
|
- {{ item.dispName }}
|
|
|
|
- </a-select-option>
|
|
|
|
- </a-select>
|
|
|
|
- <span v-else>{{ record.returnReasonDictValue }}</span>
|
|
|
|
|
|
+ @blur="e => onCellBlurReturnReason(e, record)"></returnReason>
|
|
|
|
+ <span v-else>{{ record.returnReason }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -109,6 +102,7 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import chooseProductsModal from './chooseProductsModal.vue'
|
|
import chooseProductsModal from './chooseProductsModal.vue'
|
|
|
|
+import returnReason from '@/views/common/returnReason'
|
|
import { salesReturnDetail, salesReturnReceive } from '@/api/salesReturn'
|
|
import { salesReturnDetail, salesReturnReceive } from '@/api/salesReturn'
|
|
import {
|
|
import {
|
|
salesReturnDetailList, salesReturnDetailReceiveBatch, salesReturnDetailUpdateReceiveQty, salesReturnDetailUpdateReason, insertByReceive, deleteByReceiver
|
|
salesReturnDetailList, salesReturnDetailReceiveBatch, salesReturnDetailUpdateReceiveQty, salesReturnDetailUpdateReason, insertByReceive, deleteByReceiver
|
|
@@ -119,7 +113,8 @@ export default {
|
|
components: {
|
|
components: {
|
|
STable,
|
|
STable,
|
|
VSelect,
|
|
VSelect,
|
|
- chooseProductsModal
|
|
|
|
|
|
+ chooseProductsModal,
|
|
|
|
+ returnReason
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -161,8 +156,7 @@ export default {
|
|
queryParam: {
|
|
queryParam: {
|
|
productCode: '',
|
|
productCode: '',
|
|
productName: ''
|
|
productName: ''
|
|
- },
|
|
|
|
- returnReasonList: [] // 申请退货列表
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -282,6 +276,11 @@ export default {
|
|
},
|
|
},
|
|
// 修改退货原因
|
|
// 修改退货原因
|
|
onCellBlurReturnReason (e, record) {
|
|
onCellBlurReturnReason (e, record) {
|
|
|
|
+ // 空或没有改变时不保存数据
|
|
|
|
+ if (!record.returnReason || record.returnReason == record.returnReasonBackups) {
|
|
|
|
+ record.returnReason = record.returnReasonBackups
|
|
|
|
+ return
|
|
|
|
+ }
|
|
this.loading = true
|
|
this.loading = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
salesReturnDetailUpdateReason({
|
|
salesReturnDetailUpdateReason({
|
|
@@ -346,7 +345,6 @@ export default {
|
|
_this.setTableH()
|
|
_this.setTableH()
|
|
})
|
|
})
|
|
this.orderSn = this.$route.params.sn
|
|
this.orderSn = this.$route.params.sn
|
|
- this.returnReasonList = this.$store.state.app.returnReason
|
|
|
|
this.getOrderDetail()
|
|
this.getOrderDetail()
|
|
},
|
|
},
|
|
setTableH () {
|
|
setTableH () {
|