|
@@ -351,10 +351,12 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 获取单据详细
|
|
// 获取单据详细
|
|
- getOrderDetail () {
|
|
|
|
|
|
+ getOrderDetail (flag) {
|
|
salesReturnDetail({ sn: this.orderSn }).then(res => {
|
|
salesReturnDetail({ sn: this.orderSn }).then(res => {
|
|
this.ordeDetail = res.data || null
|
|
this.ordeDetail = res.data || null
|
|
- this.$refs.queryPart.pageInit(this.buyerSn, this.ordeDetail && this.ordeDetail.priceType || '')
|
|
|
|
|
|
+ if (!flag) {
|
|
|
|
+ this.$refs.queryPart.pageInit(this.buyerSn, this.ordeDetail && this.ordeDetail.priceType || '')
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 打折
|
|
// 打折
|
|
@@ -369,7 +371,7 @@ export default {
|
|
id: this.ordeDetail.id
|
|
id: this.ordeDetail.id
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.resetSearchForm()
|
|
|
|
|
|
+ this.getOrderDetail(true)
|
|
this.spinning = false
|
|
this.spinning = false
|
|
} else {
|
|
} else {
|
|
this.spinning = false
|
|
this.spinning = false
|
|
@@ -389,7 +391,7 @@ export default {
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
salesReturnDelAll({ sn: _this.ordeDetail.salesReturnSn }).then(res => {
|
|
salesReturnDelAll({ sn: _this.ordeDetail.salesReturnSn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- _this.resetSearchForm()
|
|
|
|
|
|
+ _this.resetSearchForm(true)
|
|
_this.$refs.queryPart.resetSearchForm()
|
|
_this.$refs.queryPart.resetSearchForm()
|
|
}
|
|
}
|
|
_this.$message.info(res.message)
|
|
_this.$message.info(res.message)
|
|
@@ -423,8 +425,10 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm (flag) {
|
|
resetSearchForm (flag) {
|
|
- this.$refs.table.refresh(!!flag)
|
|
|
|
- // this.getOrderDetail()
|
|
|
|
|
|
+ this.$refs.table.refresh(flag)
|
|
|
|
+ if (flag) {
|
|
|
|
+ this.getOrderDetail()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 添加或修改产品
|
|
// 添加或修改产品
|
|
saveProduct (row, type) {
|
|
saveProduct (row, type) {
|
|
@@ -458,7 +462,7 @@ export default {
|
|
}
|
|
}
|
|
this.spinning = true
|
|
this.spinning = true
|
|
salesReturnSaveProduct(params).then(res => {
|
|
salesReturnSaveProduct(params).then(res => {
|
|
- this.resetSearchForm(type != 'edit')
|
|
|
|
|
|
+ this.resetSearchForm(type == 'edit')
|
|
this.isInster = false
|
|
this.isInster = false
|
|
this.spinning = false
|
|
this.spinning = false
|
|
})
|
|
})
|