|
|
@@ -8,7 +8,7 @@
|
|
|
</div>
|
|
|
<div class="container-fluid">
|
|
|
<div>
|
|
|
-{{-- <div style="min-width: 2070px;">--}}
|
|
|
+ {{-- <div style="min-width: 2070px;">--}}
|
|
|
<div class="d-none" id="list">
|
|
|
@if(Session::has('successTip'))
|
|
|
<div class="alert alert-success h1">{{Session::get('successTip')}}</div>
|
|
|
@@ -117,14 +117,13 @@
|
|
|
</tr>
|
|
|
</table>
|
|
|
</td>
|
|
|
-{{-- <td class="text-muted" style="max-width: 190px">@{{rejectedBill.remark}}</td>--}}
|
|
|
+ {{-- <td class="text-muted" style="max-width: 190px">@{{rejectedBill.remark}}</td>--}}
|
|
|
<td style="min-width:150px;">
|
|
|
@can('退货管理-编辑备注')
|
|
|
- <textarea v-if="rejectedBill.remark&&rejectedBill.remark.length>=8" :rows="Math.ceil(rejectedBill.remark.length/8)" cols=8 class="form-control form-control-sm" @click="rejectedBillRemarkCheck($event)" :data_id="rejectedBill.id" style="width:200px;">@{{rejectedBill.remark}}</textarea>
|
|
|
- <textarea v-else class="form-control form-control-sm" @blur="addRejectedBillRemark($event)" onfocus="$(this).css('width','150px')" :value="rejectedBill.remark" :data_id="rejectedBill.id" ></textarea>
|
|
|
- <textarea type="text" class="form-control form-control-sm" @blur="updateRejectedBillRemark($event)" :value="rejectedBill.remark" :data_id="rejectedBill.id" style="min-width:150px;display: none"></textarea>
|
|
|
+ <textarea class="form-control form-control-sm" :rows="rejectedBill.remark?Math.ceil(rejectedBill.remark.length/8):2" cols=8
|
|
|
+ @change="updateRejectedBillRemark($event)" :value="rejectedBill.remark" :data_id="rejectedBill.id">@{{ rejectedBill.remark }}</textarea>
|
|
|
@else
|
|
|
- <span v-if="rejectedBill.remark">@{{rejectedBill.remark}}</span>
|
|
|
+ <span>@{{rejectedBill.remark}}</span>
|
|
|
@endcan
|
|
|
</td>
|
|
|
<td class="text-muted">@{{rejectedBill.operator_name}}</td>
|
|
|
@@ -158,7 +157,7 @@
|
|
|
rejectedBill.detailFolding=true;
|
|
|
})
|
|
|
let owners=[
|
|
|
- @foreach($owners as $owner)
|
|
|
+ @foreach($owners as $owner)
|
|
|
{id:'{{$owner->id}}',name:'{{$owner->name}}'},
|
|
|
@endforeach
|
|
|
];
|
|
|
@@ -194,18 +193,18 @@
|
|
|
rejectedBills:rejectedBills,
|
|
|
rejectedBills_checkBoxes:[],
|
|
|
owners:[
|
|
|
- @foreach($owners as $owner)
|
|
|
+ @foreach($owners as $owner)
|
|
|
{name:'{{$owner->id}}',value:'{{$owner->name}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
issueIds:{!! $issueIds !!},
|
|
|
logistics:[
|
|
|
- @foreach($logistics as $logistic)
|
|
|
+ @foreach($logistics as $logistic)
|
|
|
{name:'{{$logistic->id}}',value:'{{$logistic->name}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
qualityLabels:[
|
|
|
- @foreach($qualityLabels as $qualityLabel)
|
|
|
+ @foreach($qualityLabels as $qualityLabel)
|
|
|
{name:'{{$qualityLabel->id}}',value:'{{$qualityLabel->name}}'},
|
|
|
@endforeach
|
|
|
],
|
|
|
@@ -231,7 +230,7 @@
|
|
|
{name:'mobile_sender',type:'input',tip:'寄件人手机:输入完成敲回车提交',placeholder:'寄件人手机'},
|
|
|
{name:'checked_numbers',type:'input',tip:'审核批次号:支持右位留空的模糊搜索',placeholder:'审核批次号'},
|
|
|
{name:'is_loaded',type:'select',placeholder: '是否入库',data:[{name:1,value:'是'},{name:0,value:'否'},
|
|
|
- {name:'null',value:'无需入库'},{name:2,value:'待推单'},{name:4,value:'待确认'},{name:3,value:'交互异常'}]},
|
|
|
+ {name:'null',value:'无需入库'},{name:2,value:'待推单'},{name:4,value:'待确认'},{name:3,value:'交互异常'}]},
|
|
|
{name:'is_issue',type:'select',data:[{name:'true',value:'有'},{name:'false',value:'无'}],tip:'问题件',placeholder:'问题件'}
|
|
|
]
|
|
|
];
|
|
|
@@ -301,77 +300,31 @@
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- //备注修改
|
|
|
- rejectedBillRemarkCheck:function (e) {
|
|
|
- let target = $(e.target);
|
|
|
- target.hide();
|
|
|
- let textarea = target.next();
|
|
|
- textarea.show();
|
|
|
- textarea.focus();
|
|
|
- },
|
|
|
- // 失焦事件
|
|
|
updateRejectedBillRemark:function (e) {
|
|
|
let target = $(e.target);
|
|
|
let _this = this;
|
|
|
- let span = target.prev();
|
|
|
- let id = target.attr('data_id');
|
|
|
- let oldRemark = span.text();
|
|
|
- let remark = target.val();
|
|
|
- if(remark !== span.text()){
|
|
|
- let ajaxUrl= '{{url("rejected/changeRejectedBillRemark")}}';
|
|
|
- axios.post(ajaxUrl,{'id':id,'remark':remark}).then(function (response) {
|
|
|
- if(response.data.success){
|
|
|
- _this.updateRejectedBills(id,remark);
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.showSuccess('备注修改成功');
|
|
|
- }else{
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('备注修改失败!'+response.data.fail_info);
|
|
|
- _this.updateRejectedBills(id,oldRemark);
|
|
|
- }
|
|
|
- }).catch(function (err) {
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('备注修改失败!网络异常:'+err);
|
|
|
- _this.updateRejectedBills(id,oldRemark);
|
|
|
- });
|
|
|
- }
|
|
|
- span.show();
|
|
|
- target.hide();
|
|
|
- },
|
|
|
- addRejectedBillRemark(e){
|
|
|
- let target = $(e.target);
|
|
|
- target.css('width','150px');
|
|
|
- let _this = this;
|
|
|
let id = target.attr('data_id');
|
|
|
- console.log(id)
|
|
|
let remark = target.val();
|
|
|
let ajaxUrl= '{{url("rejected/changeRejectedBillRemark")}}';
|
|
|
- if(remark === ''|| remark === null){
|
|
|
- target.css('width','150px');
|
|
|
- return;
|
|
|
- }else{
|
|
|
- axios.post(ajaxUrl,{'id':id,'remark':remark}).then(function (response) {
|
|
|
- if(response.data.success){
|
|
|
- console.log(response,remark)
|
|
|
- _this.updateRejectedBills(id,remark);
|
|
|
- tempTip.setDuration(2000);
|
|
|
- tempTip.showSuccess('备注添加成功');
|
|
|
- }else{
|
|
|
- tempTip.setDuration(3000);
|
|
|
- tempTip.show('备注添加失败!'+response.data.fail_info);
|
|
|
- }
|
|
|
- }).catch(function (err) {
|
|
|
+ axios.post(ajaxUrl,{'id':id,'remark':remark}).then(function (response) {
|
|
|
+ if(response.data.success){
|
|
|
+ _this.updateRejectedBills(id,remark);
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('备注修改成功');
|
|
|
+ }else{
|
|
|
tempTip.setDuration(3000);
|
|
|
- tempTip.show('备注添加失败!网络异常:'+err);
|
|
|
- });
|
|
|
- target.css('width','75px');
|
|
|
- }
|
|
|
+ tempTip.show('备注修改失败!'+response.data.fail_info);
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('备注修改失败!网络异常:'+err);
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
// 更新表格数据
|
|
|
updateRejectedBills(id,remark){
|
|
|
this.rejectedBills.some(function(rejectedBill){
|
|
|
if(parseInt(rejectedBill.id) === parseInt(id)){
|
|
|
- console.log(remark)
|
|
|
rejectedBill.remark = remark;
|
|
|
return true;
|
|
|
}
|