|
|
@@ -124,7 +124,6 @@
|
|
|
<a class="dropdown-item" @click="waybillExport(2)" href="javascript:">导出所有页</a>
|
|
|
</div>
|
|
|
</span>
|
|
|
- @can('运输管理-图片删除')<button type="button" @click="deleteImg()" class="btn btn-sm btn-outline-danger ml-2">删除所选图片</button>@endcan
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
@@ -238,13 +237,13 @@
|
|
|
@endcan
|
|
|
<td :class="[waybill.status=='已审核'?'text-success':'']">@{{waybill.status}}</td>
|
|
|
<td class="td-bill text-muted toptd" >
|
|
|
- <div v-if="waybill.remark" class="bg-light-yellow text-danger top" data-toggle="tooltip" style="opacity: 0.1;position: absolute"
|
|
|
+ <div v-if="waybill.remark" class="bg-light-yellow text-danger top" data-toggle="tooltip" style="opacity: 0.1;position: absolute;z-index: 1"
|
|
|
>置顶备注:@{{ waybill.remark }}</div>
|
|
|
@{{waybill.id}}</td>
|
|
|
<td class="td-bill text-muted">@{{waybill.created_at}}</td>
|
|
|
<td class="td-bill">@{{waybill.type}} <span class="badge badge-sm bg-warning" v-if="waybill.collect_fee">到付</span></td>
|
|
|
<td class="td-bill">@{{waybill.owner}}</td>
|
|
|
- <td class="td-bill toptd" :title="'置顶备注:'+waybill.remark">@{{waybill.source_bill}}</td>
|
|
|
+ <td class="td-bill toptd" :title="waybill.remark? '置顶备注:'+waybill.remark :''">@{{waybill.source_bill}}</td>
|
|
|
<td class="td-bill" >@{{waybill.wms_bill_number}}</td>
|
|
|
<td class="td-bill">@{{waybill.waybill_number}}</td>
|
|
|
<td class="td-bill">
|
|
|
@@ -397,9 +396,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@endsection
|
|
|
|
|
|
|
|
|
@@ -448,6 +444,9 @@
|
|
|
-webkit-animation-direction: alternate;
|
|
|
-webkit-animation-play-state: running;
|
|
|
}
|
|
|
+ .imgBtn{
|
|
|
+ }
|
|
|
+
|
|
|
</style>
|
|
|
<script>
|
|
|
let vueList=new Vue({
|
|
|
@@ -866,14 +865,29 @@
|
|
|
})
|
|
|
},
|
|
|
commonImg(id,url,suffix){
|
|
|
- $('#'+id).after("<div id=\"common_"+id+"\" style=\"position: relative;margin-top: 2px\">" +
|
|
|
- " <a target='_blank' href='"+url+'-bulky.'+suffix+"'><img src=\""+url+'-common.'+suffix+"\" style=\"position: absolute;left:-50px; \" ></a>" +
|
|
|
- " <p class='title text-center'><button class='btn btn-outline-light btn-sm'>删除</button></p>" +
|
|
|
- " </div>");
|
|
|
+ $('#'+id).after(
|
|
|
+ "<div id=\"common_"+id+"\" style='position: absolute;padding-top: 2px;z-index: 99'>" +
|
|
|
+ "<div style='position:absolute'>"+
|
|
|
+ "<div >"+
|
|
|
+ "<a target='_blank' href='"+url+'-bulky.'+suffix+"'>" +
|
|
|
+ "<img src=\""+url+'-common.'+suffix+"\" style='position: relative;left:-50px;' >" +
|
|
|
+ "</a>" +
|
|
|
+ "</div>"+
|
|
|
+ @can('运输管理-图片删除')"<button type='button' class='btn btn-sm btn-danger' onclick='vueList.btnDeleteImg(this)' value='"+id+"' style='position: relative;float: right;margin-right: 51px;margin-top: -30px;' >删除</button>" +@endcan
|
|
|
+ "</div>"+
|
|
|
+ "</div>");
|
|
|
},
|
|
|
removeCommonImg(id){
|
|
|
$('#'+id).remove();
|
|
|
},
|
|
|
+ btnDeleteImg(e){
|
|
|
+ let idstr = $(e).val();
|
|
|
+ let id = idstr.substr( idstr.indexOf('_')+1);
|
|
|
+ if (!confirm('确定要删除所选图片吗?'))return;
|
|
|
+ this.destroyImg([id]);
|
|
|
+ this.$forceUpdate();
|
|
|
+
|
|
|
+ },
|
|
|
deleteImg(){
|
|
|
if (this.checkData.length <= 0) {
|
|
|
tempTip.setDuration(2000);
|
|
|
@@ -881,15 +895,26 @@
|
|
|
return;
|
|
|
}
|
|
|
if (!confirm('确定要删除所选图片吗?'))return;
|
|
|
- let _this=this;
|
|
|
- axios.post('{{url('waybill/deleteImg')}}',{ids:_this.checkData})
|
|
|
+ this.destroyImg(this.checkData);
|
|
|
+ },
|
|
|
+ destroyImg(id){
|
|
|
+ let _this = this;
|
|
|
+ axios.post('{{url('waybill/deleteImg')}}',{'ids':id})
|
|
|
.then(function (response) {
|
|
|
if (!response.data.success){
|
|
|
tempTip.setDuration(4000);
|
|
|
tempTip.show("删除失败");
|
|
|
return;
|
|
|
}
|
|
|
- _this.checkData.forEach(function (id) {
|
|
|
+ // _this.checkData.forEach(function (id) {
|
|
|
+ // _this.waybills.some(function (waybill) {
|
|
|
+ // if (waybill.id===id){
|
|
|
+ // waybill.url='';
|
|
|
+ // return true;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ id.forEach(function (id) {
|
|
|
_this.waybills.some(function (waybill) {
|
|
|
if (waybill.id===id){
|
|
|
waybill.url='';
|
|
|
@@ -897,12 +922,13 @@
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
tempTip.setDuration(3000);
|
|
|
tempTip.showSuccess("删除成功!");
|
|
|
}).catch(function (err) {
|
|
|
- tempTip.setDuration(4000);
|
|
|
- tempTip.show("网络错误:"+err);
|
|
|
- });
|
|
|
+ tempTip.setDuration(4000);
|
|
|
+ tempTip.show("网络错误:"+err);
|
|
|
+ });
|
|
|
},
|
|
|
// 运费修改
|
|
|
waybillFeeCheck:function (e) {
|