|
|
@@ -314,15 +314,15 @@
|
|
|
<button class="btn btn-sm btn-primary" @click="joinRejectedBill(orderIssue,$event)">添加</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="form-inline" v-for="rejected_bill in orderIssue.rejected_bills">
|
|
|
+ <div class="form-inline" v-for="orderIssueRejectedBill in orderIssue.order_issue_rejected_bills">
|
|
|
{{--修改--}}
|
|
|
- <input type="text" class="form-control form-control-sm mt-1 mr-1" :value="rejected_bill.logistic_number_return" @change="reviseJoinRejectedBill(orderIssue,rejected_bill.logistic_number_return,$event)" @focus="displayDelBtn(true,$event)" @blur="displayDelBtn(false,$event)">
|
|
|
+ <input type="text" class="form-control form-control-sm mt-1 mr-1" :value="orderIssueRejectedBill.logistic_number_return" @change="reviseJoinRejectedBill(orderIssue,orderIssueRejectedBill.logistic_number_return,$event)" @focus="displayDelBtn(true,$event)" @blur="displayDelBtn(false,$event)">
|
|
|
{{--删除--}}
|
|
|
- <button type="button" class="btn btn-sm btn-outline-danger mt-1 d-none" @click="unJoinRejectedBill(orderIssue,rejected_bill.logistic_number_return)">删</button>
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-danger mt-1 d-none" @click="unJoinRejectedBill(orderIssue,orderIssueRejectedBill.logistic_number_return)">删</button>
|
|
|
</div>
|
|
|
@else
|
|
|
- <span v-for="rejected_bill in orderIssue.rejected_bills">
|
|
|
- <span class="d-inline-block w-100">@{{ rejected_bill.logistic_number_return }}</span>
|
|
|
+ <span v-for="order_issue_rejected_bill in orderIssue.order_issue_rejected_bills">
|
|
|
+ <span class="d-inline-block w-100" >@{{ order_issue_rejected_bill.logistic_number_return }}</span>
|
|
|
</span>
|
|
|
@endcan
|
|
|
</td>
|
|
|
@@ -332,21 +332,35 @@
|
|
|
</td>
|
|
|
|
|
|
<td class="p-0 child-layer-3-hide align-center" :id="orderIssue.id+'rejectedBill'" colspan="5" v-if="isShowRejectedBill">
|
|
|
- <div v-if="orderIssue.rejected_bill" class="m-0 p-0">
|
|
|
- <table v-if="orderIssue.rejected_bill.items" class="table table-sm m-0" :class="orderIssue.rejected_bill.items.length > 1 ? 'collapse' : '' " :id="'rejectedBill'+orderIssue.id">
|
|
|
- <tr class="align-center" v-for="item in orderIssue.rejected_bill.items" @click="removeFocusing($event)" v-show="isShowRejectedBill">
|
|
|
- <td style="min-width: 75px">@{{ item.barcode_goods }}</td>
|
|
|
- <td style="min-width: 100px" >
|
|
|
- <div class="text-truncate text-primary tooltipTarget" style="width: 100px;cursor:pointer;text-decoration: underline" title="双击展开" @dblclick="nowrapText($event)">@{{ item.name_goods }}</div>
|
|
|
- <div class="text-nowrap m-0 p-0 tooltipTarget" style="display: none;cursor:pointer" @dblclick="truncateText($event)" title="双击收起">@{{ item.name_goods }}</div>
|
|
|
- </td>
|
|
|
- <td style="min-width: 50px">@{{ item.amount }}</td>
|
|
|
- <td style="min-width: 50px">@{{ item.quality_label }}</td>
|
|
|
- <td style="min-width: 100px">@{{ item.remark }}</td>
|
|
|
- </tr>
|
|
|
+ <div v-if="orderIssue.order_issue_rejected_bills" class="m-0 p-0">
|
|
|
+ <table class="table table-sm m-0" :class="orderIssue.rejected_bill_type_numbers > 2 ? 'collapse' : '' " :id="'rejectedBill'+orderIssue.id">
|
|
|
+ <template v-for="order_issue_rejected_bill in orderIssue.order_issue_rejected_bills">
|
|
|
+ <template v-if="order_issue_rejected_bill.rejected_bill">
|
|
|
+ <tr v-for="item in order_issue_rejected_bill.rejected_bill.items" @click="removeFocusing($event)" v-show="isShowRejectedBill">
|
|
|
+ <td class="w-50">@{{ item.barcode_goods }}</td>
|
|
|
+ <td>
|
|
|
+ <div class="text-truncate text-primary tooltipTarget w-100" style="cursor:pointer;text-decoration: underline" title="双击展开" @dblclick="nowrapText($event)">@{{ item.name_goods }}</div>
|
|
|
+ <div class="text-nowrap m-0 p-0 tooltipTarget" style="display: none;cursor:pointer" @dblclick="truncateText($event)" title="双击收起">@{{ item.name_goods }}</div>
|
|
|
+ </td>
|
|
|
+ <td class="w-25">@{{ item.amount }}</td>
|
|
|
+ <td class="w-25">@{{ item.quality_label }}</td>
|
|
|
+ <td class="w-auto">@{{ item.remark }}</td>
|
|
|
+ </tr>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+{{-- <tr class="align-center" v-for="item in orderIssue.rejected_bill.items" @click="removeFocusing($event)" v-show="isShowRejectedBill">--}}
|
|
|
+{{-- <td style="min-width: 75px">@{{ item.barcode_goods }}</td>--}}
|
|
|
+{{-- <td style="min-width: 100px">--}}
|
|
|
+{{-- <div class="text-truncate text-primary tooltipTarget" style="width: 100px;cursor:pointer;text-decoration: underline" title="双击展开" @dblclick="nowrapText($event)">@{{ item.name_goods }}</div>--}}
|
|
|
+{{-- <div class="text-nowrap m-0 p-0 tooltipTarget" style="display: none;cursor:pointer" @dblclick="truncateText($event)" title="双击收起">@{{ item.name_goods }}</div>--}}
|
|
|
+{{-- </td>--}}
|
|
|
+{{-- <td style="min-width: 50px">@{{ item.amount }}</td>--}}
|
|
|
+{{-- <td style="min-width: 50px">@{{ item.quality_label }}</td>--}}
|
|
|
+{{-- <td style="min-width: 100px">@{{ item.remark }}</td>--}}
|
|
|
+{{-- </tr>--}}
|
|
|
</table>
|
|
|
- <button v-if="orderIssue.rejected_bill_type_numbers>1" type="button" class="btn btn-sm btn-outline-primary align-middle mt-1" :id="'rejectedBillBtn'+orderIssue.id"
|
|
|
- data-toggle="collapse" :data-target="'#rejectedBill'+orderIssue.id" @click="toggleRejectedBill(orderIssue.id,orderIssue.rejectedCount)">
|
|
|
+ <button v-if="orderIssue.rejected_bill_type_numbers > 1" type="button" class="btn btn-sm btn-outline-primary align-middle mt-1" :id="'rejectedBillBtn'+orderIssue.id"
|
|
|
+ data-toggle="collapse" :data-target="'#rejectedBill'+orderIssue.id" @click="toggleRejectedBill(orderIssue.id,orderIssue.rejected_bill_amounts)">
|
|
|
商品@{{ orderIssue.rejected_bill_amounts }}件,点击展开
|
|
|
</button>
|
|
|
</div>
|
|
|
@@ -390,15 +404,16 @@
|
|
|
@endcan
|
|
|
<template v-if="orderIssue.logs && orderIssue.logs.length > 0" class="p-0 m-0 ">
|
|
|
<table class="table table-sm p-0 m-0 " :id="'logs'+orderIssue.id">
|
|
|
- <tr class="align-center position-static" v-for="(log,index) in orderIssue.logs" v-show="index > 1 && orderIssue.logShow" @click="removeFocusing($event)"
|
|
|
+ <tr class="align-center position-static" v-for="(log,index) in orderIssue.logs" v-show="(index > 1 || orderIssue.logs.length < 2) && orderIssue.logShow"
|
|
|
+ @click="removeFocusing($event)"
|
|
|
v-on:mouseover="showDelBtn($event)" v-on:mouseleave="hideDelBtn($event)" >
|
|
|
<td style="min-width: 200px">@{{ log.content }}</td>
|
|
|
<td class="text-muted" style="min-width: 120px">@{{ log.user.name }}</td>
|
|
|
<td class="text-muted" style="min-width: 170px">@{{ log.created_at }}</td>
|
|
|
@can('订单管理-问题件-处理结果删除')
|
|
|
- <td style="" class="m-0 p-0 border-0">
|
|
|
- <button type="button" class="btn btn-sm btn-outline-danger m-0 del-btn invisible" @click="deleteOrderIssueLog(log.id,orderIssue.id)">删</button>
|
|
|
- </td>
|
|
|
+ <td style="" class="m-0 p-0 border-0">
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-danger m-0 del-btn invisible" @click="deleteOrderIssueLog(log.id,orderIssue.id)">删</button>
|
|
|
+ </td>
|
|
|
@endcan
|
|
|
</tr>
|
|
|
</table>
|
|
|
@@ -406,7 +421,7 @@
|
|
|
记录共@{{ orderIssue.logs.length }}条,点击展开
|
|
|
</button>
|
|
|
</template>
|
|
|
- <div v-else class="w-auto" style="height: 55px">
|
|
|
+ <div v-else class="w-auto h-50">
|
|
|
|
|
|
</div>
|
|
|
</td>
|
|
|
@@ -858,14 +873,16 @@
|
|
|
},
|
|
|
regroupRejectedBill(orderIssue){
|
|
|
if(!orderIssue)return;
|
|
|
- if(!orderIssue.rejectedBills)return;
|
|
|
+ if(!orderIssue.order_issue_rejected_bills)return;
|
|
|
let amounts = 0;// 商品总数
|
|
|
let type_numbers = 0; // 商品类型数量
|
|
|
- $.each(orderIssue.rejectedBills,function(i,rejectedBill){
|
|
|
- $.each(rejectedBill.items,function (i,item) {
|
|
|
- type_numbers++;
|
|
|
- amounts+=item.amount;
|
|
|
- });
|
|
|
+ $.each(orderIssue.order_issue_rejected_bills,function(i,order_issue_rejected_bill){
|
|
|
+ if(order_issue_rejected_bill.rejected_bill){
|
|
|
+ $.each(order_issue_rejected_bill.rejected_bill.items,function (i,item) {
|
|
|
+ type_numbers++;
|
|
|
+ amounts+=item.amount;
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
orderIssue.rejected_bill_amounts = amounts;
|
|
|
orderIssue.rejected_bill_type_numbers = type_numbers;
|
|
|
@@ -873,10 +890,16 @@
|
|
|
regroupLogs(orderIssue){
|
|
|
if(orderIssue.logs && orderIssue.logs.length > 2) orderIssue.logShow = true;
|
|
|
else orderIssue.logShow = false;
|
|
|
+
|
|
|
+ orderIssue.logCount = orderIssue.logs.length;
|
|
|
},
|
|
|
displayDelBtn(bool,e){
|
|
|
if(bool)$(e.target).next().removeClass('d-none');
|
|
|
- else $(e.target).next().addClass('d-none');
|
|
|
+ else {
|
|
|
+ setTimeout(function(){
|
|
|
+ $(e.target).next().addClass('d-none');
|
|
|
+ },100);
|
|
|
+ }
|
|
|
},
|
|
|
selectedColor(orderno,e) {
|
|
|
$('.table-body').removeClass('focusing')
|
|
|
@@ -1068,9 +1091,6 @@
|
|
|
tempTip.setDuration(3000)
|
|
|
tempTip.showSuccess('订单已处理')
|
|
|
let logs = response.data.logs;
|
|
|
- $.each(response.data.logs,function(i,log){
|
|
|
-
|
|
|
- });
|
|
|
for (let i = 0; i < logs.length; i++) {
|
|
|
let log = logs[i]
|
|
|
let orderIssue = orderIssues[log['order_issue_id']]
|
|
|
@@ -1192,7 +1212,7 @@
|
|
|
},
|
|
|
toggleLogs(orderIssue, e) {
|
|
|
if ( orderIssue.logShow === false) {
|
|
|
- $(e.target).text("记录共" + $(e.target).attr('data-value') + "条,点击展开");
|
|
|
+ $(e.target).text("记录共" + orderIssue.logs.length + "条,点击展开");
|
|
|
} else {
|
|
|
$(e.target).text('点击收起');
|
|
|
}
|
|
|
@@ -1395,7 +1415,7 @@
|
|
|
orderIssue.second_order = response.data.order
|
|
|
orderIssue.second_client_no = response.data.order.client_code
|
|
|
}
|
|
|
- if(response.data.second_logistic_number != null){
|
|
|
+ if(response.data.second_logistic_number != null ){
|
|
|
orderIssue.second_logistic_number = response.data.second_logistic_number
|
|
|
}
|
|
|
_this.edit.orderIssue.id = ''
|
|
|
@@ -1502,52 +1522,54 @@
|
|
|
});
|
|
|
},
|
|
|
joinRejectedBill(orderIssue,e){
|
|
|
- let logistic_number = $(e.target).val();
|
|
|
+ let logistic_number = $(e.target).prev().val();this
|
|
|
+ let is_return = false;
|
|
|
if(logistic_number===null){
|
|
|
tempTip.show('请输入需要关联的退回单号');
|
|
|
- return;
|
|
|
+ is_return= true;
|
|
|
}
|
|
|
+ orderIssue.order_issue_rejected_bills.forEach(function(order_issue_rejected_bill){
|
|
|
+ if(order_issue_rejected_bill.logistic_number_return === logistic_number){
|
|
|
+ tempTip.show('已有对应的退回单号');
|
|
|
+ is_return= true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(is_return)return;
|
|
|
let _this = this;
|
|
|
- axios.post('{{url('apiLocal/order/issue/rejectedBill/join')}}', {id:orderIssue.id,logistic_number_return})
|
|
|
+ axios.post('{{url('apiLocal/order/issue/rejectedBill/join')}}', {id:orderIssue.id,logistic_number_return:logistic_number})
|
|
|
.then(function(response){
|
|
|
if(response.data.success){
|
|
|
tempTip.setDuration(2000);
|
|
|
tempTip.showSuccess('关联成功');
|
|
|
- if(response.data.data){
|
|
|
- if(orderIssue.rejected_bills===null)orderIssue.rejected_bills=[];
|
|
|
- orderIssue.rejected_bills.push(response.data.data);
|
|
|
- _this.regroupRejectedBill(orderIssue);
|
|
|
- }
|
|
|
+ if(orderIssue.order_issue_rejected_bills===null)orderIssue.order_issue_rejected_bills=[];
|
|
|
+ orderIssue.order_issue_rejected_bills.push(response.data.data.orderIssueRejectedBill);
|
|
|
+ $(e.target).prev().val('');
|
|
|
+ _this.regroupRejectedBill(orderIssue);
|
|
|
return;
|
|
|
}
|
|
|
tempTip.setDuration(2000);
|
|
|
tempTip.show(response.data.error);
|
|
|
})
|
|
|
.catch(function(error){
|
|
|
- tempTip.cancelWaitingTip();
|
|
|
tempTip.setDuration(2000);
|
|
|
tempTip.show(error);
|
|
|
});
|
|
|
},
|
|
|
unJoinRejectedBill(orderIssue,logistic_number){
|
|
|
- console.log(orderIssue,logistic_number);
|
|
|
if(logistic_number===null)return;
|
|
|
let _this = this;
|
|
|
- axios.post('{{url('apiLocal/order/issue/rejectedBill/unJoin')}}', {id:orderIssue.id,logistic_number_return})
|
|
|
+ axios.post('{{url('apiLocal/order/issue/rejectedBill/unJoin')}}', {id:orderIssue.id,logistic_number_return:logistic_number})
|
|
|
.then(function(response){
|
|
|
if(response.data.success){
|
|
|
tempTip.setDuration(2000);
|
|
|
- tempTip.showSuccess('取消');
|
|
|
- if(response.data.data){
|
|
|
- if(orderIssue.rejected_bills===null)return;
|
|
|
- $.each(orderIssue.rejected_bills,function(i,rejecetd_bill){
|
|
|
- if(rejecetd_bill.logistic_number_return === logistic_number){
|
|
|
- orderIssue.rejected_bills.splice(i,1);
|
|
|
- _this.regroupRejectedBill(orderIssue);
|
|
|
- return;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ tempTip.showSuccess('退回单号取消关联成功');
|
|
|
+ if(orderIssue.rejected_bills===null)return;
|
|
|
+ $.each(orderIssue.order_issue_rejected_bills,function(i,order_issue_rejected_bills){
|
|
|
+ if(order_issue_rejected_bills.rejected_bill.logistic_number_return === logistic_number){
|
|
|
+ orderIssue.order_issue_rejected_bills.splice(i,1);
|
|
|
+ _this.regroupRejectedBill(orderIssue);
|
|
|
+ }
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
tempTip.setDuration(2000);
|
|
|
@@ -1578,7 +1600,6 @@
|
|
|
orderIssue.rejected_bills.splice(i,1);
|
|
|
orderIssue.rejected_bills.push(response.data.data);
|
|
|
_this.regroupRejectedBill(orderIssue);
|
|
|
- return;
|
|
|
}
|
|
|
});
|
|
|
}
|