|
@@ -81,7 +81,8 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<span style="margin-right: 10px;" v-if="selNums">已选{{ selNums }}项</span>
|
|
|
- <a-button type="default" class="button-info" @click="openPlSetReason">批量设置退货原因</a-button>
|
|
|
+ <a-button type="default" class="button-info" @click="openPlSetReason(1)">整单设置退货原因</a-button>
|
|
|
+ <a-button type="default" class="button-info" style="margin-left: 5px;" @click="openPlSetReason(0)">批量设置退货原因</a-button>
|
|
|
<a-button type="primary" class="button-info" id="salesReturnEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -371,38 +372,48 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 批量设置退货原因
|
|
|
- openPlSetReason () {
|
|
|
- if (this.selNums) {
|
|
|
+ openPlSetReason (type) {
|
|
|
+ // 整单设置
|
|
|
+ if(type==1){
|
|
|
this.showPlModal = true
|
|
|
- } else {
|
|
|
- this.$message.warning('请先选择产品!')
|
|
|
+ }else{
|
|
|
+ if (this.selNums) {
|
|
|
+ this.showPlModal = true
|
|
|
+ } else {
|
|
|
+ this.$message.warning('请先选择产品!')
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
setPlReturnReason () {
|
|
|
if (!this.plReturnReason) {
|
|
|
this.$message.warning('请选择退货原因!')
|
|
|
} else {
|
|
|
- this.spinning = true
|
|
|
- const snList = []
|
|
|
- const arr = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
|
|
|
- const rows = this.returnReasonlist.find(item => item.code == this.plReturnReason)
|
|
|
- arr.map(item => {
|
|
|
- snList.push(item.salesReturnDetailSn)
|
|
|
- })
|
|
|
- salesReturnDetailSetReason({
|
|
|
- salesReturnBillDetailSnList: snList,
|
|
|
- salesReturnBillSn: this.orderSn,
|
|
|
- returnReason: rows ? rows.dispName : '',
|
|
|
- returnReasonCode: this.plReturnReason,
|
|
|
- returnReasonRemarks: this.showEditRemarks ? this.plReturnRemark || '' : undefined
|
|
|
- }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.showPlModal = false
|
|
|
- this.$refs.table.clearSelected()
|
|
|
- this.resetTable(false)
|
|
|
- }
|
|
|
- this.spinning = false
|
|
|
- })
|
|
|
+ // 批量设置
|
|
|
+ if(this.selNums){
|
|
|
+ this.spinning = true
|
|
|
+ const snList = []
|
|
|
+ const arr = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
|
|
|
+ const rows = this.returnReasonlist.find(item => item.code == this.plReturnReason)
|
|
|
+ arr.map(item => {
|
|
|
+ snList.push(item.salesReturnDetailSn)
|
|
|
+ })
|
|
|
+ salesReturnDetailSetReason({
|
|
|
+ salesReturnBillDetailSnList: snList,
|
|
|
+ salesReturnBillSn: this.orderSn,
|
|
|
+ returnReason: rows ? rows.dispName : '',
|
|
|
+ returnReasonCode: this.plReturnReason,
|
|
|
+ returnReasonRemarks: this.showEditRemarks ? this.plReturnRemark || '' : undefined
|
|
|
+ }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.showPlModal = false
|
|
|
+ this.$refs.table.clearSelected()
|
|
|
+ this.resetTable(false)
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ // 整单设置
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 获取单据详细
|