|
|
@@ -182,7 +182,7 @@
|
|
|
|
|
|
<div class="modal fade " id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
|
|
aria-hidden="true">
|
|
|
- <div class="modal-dialog modal-dialog-centered">
|
|
|
+ <div class="modal-dialog modal-dialog-centered modal-xl">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
<h5 class="modal-title" id="exampleModalLabel">输入问题件信息</h5>
|
|
|
@@ -192,18 +192,35 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
- <div class="form-group row">
|
|
|
- <label class="col-2 text-right">问题类别</label>
|
|
|
- <select name="order_issues_type_id" v-model="typeId" class="form-control col-8" id="orderIssueType" @focus="focusOnModal($event)" >
|
|
|
+ <div class="form-group row m-0 p-0">
|
|
|
+ <label class="col-md-1 col-sm-2 text-right">问题类别</label>
|
|
|
+ <select name="order_issues_type_id" v-model="typeId" class="form-control col-4" id="orderIssueType" @focus="focusOnModal($event)" >
|
|
|
<option value></option>
|
|
|
<option v-for="type in orderIssueType" :value="type.id">@{{ type.name }}</option>
|
|
|
</select>
|
|
|
+ <label class="col-md-1 col-sm-2 text-right">
|
|
|
+ 快递
|
|
|
+ </label>
|
|
|
+ <div class="col-4">
|
|
|
+ <textarea class="form-control m-0">@{{ tagOrder.logisticInfo }}</textarea>
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-primary" @click="copyLogisticInfo">复制</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="form-group row">
|
|
|
- <label class="col-2 text-right ">情况说明</label>
|
|
|
- <textarea name="result_explain" v-model="result_explain" class="form-control col-8" id="result_explain"></textarea>
|
|
|
+ <div class="form-group row m-0">
|
|
|
+ <label class="col-md-1 col-sm-2 text-right">情况说明</label>
|
|
|
+ <label for="result_explain"></label>
|
|
|
+ <textarea name="result_explain" v-model="result_explain" class="form-control col-4" id="result_explain" ></textarea>
|
|
|
+ <label class="col-md-1 col-sm-2 text-right">
|
|
|
+ 商家
|
|
|
+ </label>
|
|
|
+ <div class="col-4">
|
|
|
+ <textarea class="form-control m-0 row">@{{ tagOrder.merchantInfo }}</textarea>
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-primary" @click="copyMerchantInfo">复制</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
+
|
|
|
<div class="modal-footer">
|
|
|
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal"
|
|
|
@click="changeRemark">关闭
|
|
|
@@ -213,6 +230,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <textarea id="clipboardDiv" style="opacity:0"></textarea>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
@@ -246,7 +264,6 @@
|
|
|
{name:'{{$code->code}}',value:'{{$code->codename_c}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
- orderIssueNos:{!! $orderIssueNos!!},
|
|
|
selectedStyle:'',
|
|
|
picktotraceidMap:{!! $picktotraceids !!},
|
|
|
pagePlaceholder:"",
|
|
|
@@ -256,7 +273,13 @@
|
|
|
is_merge : false,
|
|
|
message:{
|
|
|
checkOrderIssueMessage:'',
|
|
|
- }
|
|
|
+ },
|
|
|
+ orderIssueNos:{!! $orderIssueNos!!},
|
|
|
+ tagOrders:[],
|
|
|
+ tagOrder:{
|
|
|
+ logisticInfo:'',
|
|
|
+ merchantInfo:'',
|
|
|
+ },
|
|
|
},
|
|
|
mounted:function () {
|
|
|
$(".tooltipTarget").tooltip({'trigger':'hover'});
|
|
|
@@ -375,6 +398,10 @@
|
|
|
}
|
|
|
},
|
|
|
deep:true
|
|
|
+ },
|
|
|
+ result_explain:function(){
|
|
|
+ this.setLogisticInfo()
|
|
|
+ this.setMerchantInfo()
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
@@ -738,6 +765,7 @@
|
|
|
let _this = this;
|
|
|
axios.post("{{url('apiLocal/order/issue/isExistByOrderNo')}}",data).then(function(res){
|
|
|
if(res.data.success){
|
|
|
+ _this.getTagOrder(orderNos);
|
|
|
$("#exampleModal").modal('show')
|
|
|
}else{
|
|
|
_this.message.checkOrderIssueMessage = res.data.fail_info
|
|
|
@@ -753,10 +781,74 @@
|
|
|
nowrapSpan.hide();
|
|
|
nowrapSpan.siblings('.text-truncate').show();
|
|
|
},
|
|
|
- nowrapText(e){
|
|
|
+ nowrapText(e) {
|
|
|
let truncateSpan = $(e.target);
|
|
|
truncateSpan.hide();
|
|
|
truncateSpan.siblings('.text-nowrap').show();
|
|
|
+ },
|
|
|
+ getTagOrder(orderNos){
|
|
|
+ this.tagOrders = []
|
|
|
+ if(orderNos.length === 0 ){this.tagOrders =[];return ;}
|
|
|
+ if(this.orders.length === 0 ){this.tagOrders =[];return ;}
|
|
|
+ for (let i = 0; i < this.orders.length; i++) {
|
|
|
+ let order = this.orders[i];
|
|
|
+ let orderno =order.orderno;
|
|
|
+ if(orderNos.includes(orderno)){
|
|
|
+ this.tagOrders.push(this.orders[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.setLogisticInfo();
|
|
|
+ this.setMerchantInfo();
|
|
|
+ },
|
|
|
+ setLogisticInfo(){
|
|
|
+ let content = ''
|
|
|
+ let _this = this
|
|
|
+ this.tagOrders.forEach(function(order){
|
|
|
+ let picktotraceids = _this.picktotraceidMap[order.orderno];
|
|
|
+ if($.type(picktotraceids) ==='array'){
|
|
|
+ picktotraceids.forEach(function(picktotraceid,index,array){
|
|
|
+ if(array.length ===index+1)content+=picktotraceid;
|
|
|
+ else content+=picktotraceid+','
|
|
|
+ });
|
|
|
+ }else{content+=order.soreference5}
|
|
|
+ content+=' '+order.c_contact+order.c_tel2+order.c_province+order.c_city+' '+order.c_district+order.c_address1+'/'+_this.result_explain+"\n"
|
|
|
+ })
|
|
|
+ this.tagOrder.logisticInfo = content
|
|
|
+ },
|
|
|
+ setMerchantInfo(){
|
|
|
+ let content = ''
|
|
|
+ let _this = this
|
|
|
+ this.tagOrders.forEach(function(order){
|
|
|
+ content+=order.customer_descr_c+' '+order.soreference1+' '
|
|
|
+ let picktotraceids = _this.picktotraceidMap[order.orderno];
|
|
|
+ if($.type(picktotraceids) ==='array'){
|
|
|
+ picktotraceids.forEach(function(picktotraceid,index,array){
|
|
|
+ if(array.length ===index+1)content+=picktotraceid;
|
|
|
+ else content+=picktotraceid+','
|
|
|
+ });
|
|
|
+ }else {content+=order.soreference5}
|
|
|
+ content += '/'+_this.result_explain+ "\n";
|
|
|
+ })
|
|
|
+ this.tagOrder.merchantInfo = content
|
|
|
+ },
|
|
|
+ copyLogisticInfo(){
|
|
|
+ this.copyText(this.tagOrder.logisticInfo)
|
|
|
+ },
|
|
|
+ copyMerchantInfo(){
|
|
|
+ this.copyText(this.tagOrder.merchantInfo)
|
|
|
+ },
|
|
|
+ copyText(text){
|
|
|
+ try {
|
|
|
+ $('#clipboardDiv').text(text).select().focus();
|
|
|
+ document.execCommand("Copy");
|
|
|
+ tempTip.setIndex(1052)
|
|
|
+ tempTip.setDuration(2000)
|
|
|
+ tempTip.showSuccess('复制成功')
|
|
|
+ } catch (e) {
|
|
|
+ tempTip.setIndex(1052)
|
|
|
+ tempTip.setDuration(2000)
|
|
|
+ tempTip.showSuccess('复制失败:'+e)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
});
|