|
|
@@ -5,7 +5,7 @@
|
|
|
<div class="container-fluid d-none" id="container">
|
|
|
<div id="form"></div>
|
|
|
<div class="mt-1">
|
|
|
- <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
|
|
|
+ <button type="button" class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
|
|
|
data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">
|
|
|
导出Excel
|
|
|
</button>
|
|
|
@@ -15,8 +15,8 @@
|
|
|
</div>
|
|
|
@can("入库管理-入库预约-质检")<button type="button" class="btn btn-outline-primary" @click="qualityInspectionMark()">质检</button>@endcan
|
|
|
</div>
|
|
|
- <table class="table table-striped table-hover text-nowrap td-min-width-80" id="table">
|
|
|
- <tr class="text-center">
|
|
|
+ <table class="table table-striped table-bordered table-hover text-nowrap td-min-width-80" id="table">
|
|
|
+<!-- <tr class="text-center">
|
|
|
<th>
|
|
|
<label for="all" id="cloneCheckAll">
|
|
|
<input id="all" type="checkbox" @click="checkAll($event)">全选
|
|
|
@@ -25,9 +25,19 @@
|
|
|
<th>序号</th>
|
|
|
<th>操作</th>
|
|
|
<th>状态</th>
|
|
|
- <th>货主</th>
|
|
|
+ <th>预约号</th>
|
|
|
+ <th>ASN单号</th>
|
|
|
<th>预约时间</th>
|
|
|
- <th>仓库</th>
|
|
|
+ <th>创建时间</th>
|
|
|
+ <th>操作/送达时间</th>
|
|
|
+ <th>货主</th>
|
|
|
+ <th>重量/吨</th>
|
|
|
+ <th>体积/立方</th>
|
|
|
+ <th>箱数</th>
|
|
|
+ <th>备注</th>
|
|
|
+ <th>车号/快递公司</th>
|
|
|
+ <th>车型/快递单号</th>-->
|
|
|
+<!-- <th>仓库</th>
|
|
|
<th>
|
|
|
<div class="row" style="min-width: 800px">
|
|
|
<div class="col-12">车辆信息</div>
|
|
|
@@ -41,13 +51,9 @@
|
|
|
<div class="col-3">操作/送达时间</div>
|
|
|
</div>
|
|
|
</th>
|
|
|
- <th>吨</th>
|
|
|
- <th>立方</th>
|
|
|
- <th>箱数</th>
|
|
|
<th>快递公司</th>
|
|
|
<th>快递单号</th>
|
|
|
<th>采购单号</th>
|
|
|
- <th>ASN单号</th>
|
|
|
<th>
|
|
|
<div class="row">
|
|
|
<div class="col-12 text-center">明细单</div>
|
|
|
@@ -57,49 +63,71 @@
|
|
|
<div class="col-4 text-center">条码</div>
|
|
|
<div class="col-2 text-center">数量</div>
|
|
|
</div>
|
|
|
- </th>
|
|
|
- <th>预约备注</th>
|
|
|
- <th>创建时间</th>
|
|
|
- </tr>
|
|
|
- <tr v-for="(info,i) in list">
|
|
|
- <td>
|
|
|
- <label>
|
|
|
- <input class="checkItem" type="checkbox" :value="info.id" v-model="checkData">
|
|
|
- </label>
|
|
|
- </td>
|
|
|
+ </th>-->
|
|
|
+<!-- </tr>-->
|
|
|
+ <tr v-for="(info,i) in list" :id="'info-'+i">
|
|
|
+ <td><input class="checkItem" type="checkbox" :value="list.id"></td>
|
|
|
<td>@{{ i+1 }}</td>
|
|
|
<td>
|
|
|
- @can("入库管理-入库预约-预约管理-签到")<span v-if="(info.status==0 || info.appointment_date==today) && info.cars[0].status==0"><button class="btn btn-sm btn-outline-success" @click="signIn(i,0)">签到</button><br></span>@endcan
|
|
|
- <span v-if="info.status==0">
|
|
|
- <button type="button" @click="cancel(info.id,i)" class="btn btn-sm btn-outline-danger">取消预约</button><br>
|
|
|
- <button type="button" @click="updateDeliveryDate(info,i)" class="btn btn-sm btn-outline-primary">修改预约</button>
|
|
|
- </span>
|
|
|
- <span v-if="info.status==2">
|
|
|
- <button type="button" @click="printReceipt(info)" class="btn btn-sm btn-outline-success"><i class="fa fa-print"></i> 打印</button>
|
|
|
+ <span>
|
|
|
+ @can("入库管理-入库预约-预约管理-签到")<span v-if="(info.status==0 || info.appointment_date==today) && info.cars[0].status==0"><button class="btn btn-sm btn-outline-success" @click="signIn(i,0)">签到</button><br></span>@endcan
|
|
|
+ <span v-if="info.status==0">
|
|
|
+ <button type="button" @click="cancel(info.id,i)" class="btn btn-sm btn-outline-danger">取消预约</button><br>
|
|
|
+ <button type="button" @click="updateDeliveryDate(info,i)" class="btn btn-sm btn-outline-primary">修改预约</button>
|
|
|
+ </span>
|
|
|
+ <span v-if="info.status==2">
|
|
|
+ <button type="button" @click="printReceipt(info)" class="btn btn-sm btn-outline-success"><i class="fa fa-print"></i> 打印</button>
|
|
|
+ </span>
|
|
|
+ <span v-if="info.details.length>0">
|
|
|
+ <br>
|
|
|
+ <button class="btn btn-sm btn-dark" v-if="currentIndex===i" @click="openDetails(i,true);">关闭明细</button>
|
|
|
+ <button class="btn btn-sm btn-outline-info" v-else @click="openDetails(i);">查看明细</button>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <span v-if="info.status==0 && info.cars.length>0 && info.cars[0].status==1">
|
|
|
+ <span>
|
|
|
+ <span v-if="info.status==0 && info.cars.length>0 && info.cars[0].status==1">
|
|
|
<span class="fa fa-circle text-primary">作业中</span>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <label v-if="!poolMapping.status">
|
|
|
+ <span class="fa fa-circle text-secondary">未知</span>
|
|
|
+ </label>
|
|
|
+ <label v-else>
|
|
|
+ <small><span class="fa fa-circle" :class="info.status==0 ? 'text-info' : (info.status==2 ? 'text-success' : 'text-danger')"></span></small>
|
|
|
+ @{{ poolMapping.status[info.status] }}
|
|
|
+ <span v-if="info.type_mark==0" class="badge badge-primary">质检单</span>
|
|
|
+ </label>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
- <span v-else>
|
|
|
- <label v-if="!poolMapping.status">
|
|
|
- <span class="fa fa-circle text-secondary">未知</span>
|
|
|
- </label>
|
|
|
- <label v-else>
|
|
|
- <small><span class="fa fa-circle" :class="info.status==0 ? 'text-info' : (info.status==2 ? 'text-success' : 'text-danger')"></span></small>
|
|
|
- @{{ poolMapping.status[info.status] }}
|
|
|
- <span v-if="info.type_mark==0" class="badge badge-primary">质检单</span>
|
|
|
- </label>
|
|
|
- </span>
|
|
|
-
|
|
|
</td>
|
|
|
- <td>
|
|
|
- <label v-if="!poolMapping.owners"></label>
|
|
|
- <label v-else>@{{ poolMapping.owners[info.owner_id] }}</label>
|
|
|
+ <td class="font-weight-bold">
|
|
|
+ @{{ info.cars[0].appointment_number }}
|
|
|
</td>
|
|
|
+ <td><span v-html="warpText(info.asn_number)"></span></td>
|
|
|
<td class="text-primary">@{{ info.appointment_date }} @{{ info.period }}</td>
|
|
|
+ <td>@{{ info.created_at }}</td>
|
|
|
+ <td>
|
|
|
+ <div>
|
|
|
+ @can("入库管理-入库预约-预约管理-卸货完成")<button class="btn btn-sm btn-outline-success" @click="unloading(i,0)" v-if="info.cars[0].status==1">卸货完成</button>@endcan
|
|
|
+ <div v-if="info.cars[0].status==2">@{{ info.cars[0].delivery_time }}</div>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
<td>
|
|
|
+ <div>
|
|
|
+ <label v-if="!poolMapping.owners"></label>
|
|
|
+ <label v-else>@{{ poolMapping.owners[info.owner_id] }}</label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <td>@{{ info.tonne>0 ? info.tonne : '-' }}</td>
|
|
|
+ <td>@{{ info.cubic_meter>0 ? info.cubic_meter : '-' }}</td>
|
|
|
+ <td>@{{ info.box_amount>0 ? info.box_amount : '-' }}</td>
|
|
|
+ <td><div class="text-overflow-replace-200">@{{ info.remark }}</div></td>
|
|
|
+ <td>@{{ info.logistic ? info.logistic.name : info.cars[0].license_plate_number }}</td>
|
|
|
+ <td>@{{ info.logistic ? info.logistic_number : (info.cars[0].car ? info.cars[0].car.name : '') }}</td>
|
|
|
+
|
|
|
+<!-- <td>
|
|
|
<label v-if="!poolMapping.warehouses"></label>
|
|
|
<label v-else>@{{ poolMapping.warehouses[info.warehouse_id] }}</label>
|
|
|
</td>
|
|
|
@@ -136,13 +164,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
- <td>@{{ info.tonne>0 ? info.tonne : '-' }}</td>
|
|
|
- <td>@{{ info.cubic_meter>0 ? info.cubic_meter : '-' }}</td>
|
|
|
- <td>@{{ info.box_amount>0 ? info.box_amount : '-' }}</td>
|
|
|
<td>@{{ info.logistic ? info.logistic.name : '' }}</td>
|
|
|
<td>@{{ info.logistic_number }}</td>
|
|
|
<td><span v-html="warpText(info.procurement_number)"></span></td>
|
|
|
- <td><span v-html="warpText(info.asn_number)"></span></td>
|
|
|
<td>
|
|
|
<div v-if="info.details.length>0">
|
|
|
<div class="row">
|
|
|
@@ -163,9 +187,24 @@
|
|
|
<span v-else>展开其余@{{ info.details.length-1 }}条</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </td>-->
|
|
|
+ </tr>
|
|
|
+ <tr v-if="currentIndex!==undefined" id="await">
|
|
|
+ <td colspan="2"></td>
|
|
|
+ <td colspan="13">
|
|
|
+ <table class="table table-sm table-bordered table-condensed">
|
|
|
+ <tr>
|
|
|
+ <th>商品名称</th>
|
|
|
+ <th>条码</th>
|
|
|
+ <th>数量</th>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(detail,i) in list[currentIndex].details">
|
|
|
+ <td>@{{ detail.commodity_id ? (detail.commodity ? detail.commodity.name : '') : detail.name }}</td>
|
|
|
+ <td>@{{ detail | getCommodity }}</td>
|
|
|
+ <td>@{{ detail.amount }}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
</td>
|
|
|
- <td>@{{ info.remark }}</td>
|
|
|
- <td>@{{ info.created_at }}</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
{{$list->appends($params)->links()}}
|
|
|
@@ -178,6 +217,7 @@
|
|
|
@section("lastScript")
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
|
|
|
+ <script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>{{--新版2--}}
|
|
|
<script>
|
|
|
new Vue({
|
|
|
el:"#container",
|
|
|
@@ -186,7 +226,7 @@
|
|
|
status:[],
|
|
|
warehouses:[],
|
|
|
owners:[@foreach($owners as $owner){name:"{{$owner->id}}",value:"{{$owner->name}}"},@endforeach],
|
|
|
- checkData:[],
|
|
|
+ /* checkData:[],*/
|
|
|
poolMapping:{},
|
|
|
upList:{},
|
|
|
upListDetail:{},
|
|
|
@@ -199,6 +239,8 @@
|
|
|
infoShow:false,
|
|
|
printInfo:{},
|
|
|
today:"",
|
|
|
+ currentIndex:undefined,
|
|
|
+ isShowAwait:false,
|
|
|
},
|
|
|
mounted(){
|
|
|
let status = [];
|
|
|
@@ -239,15 +281,27 @@
|
|
|
let dd = now.getDate();
|
|
|
this.today = yy+'-'+(mm<10 ? '0'+mm : mm)+'-'+(dd<10 ? '0'+dd : dd);
|
|
|
},
|
|
|
- watch:{
|
|
|
+ /*watch:{
|
|
|
checkData:{
|
|
|
handler(){
|
|
|
document.querySelector('#all').checked = this.checkData.length === this.list.length;
|
|
|
},
|
|
|
deep:true
|
|
|
},
|
|
|
- },
|
|
|
+ },*/
|
|
|
methods: {
|
|
|
+ openDetails(index,isClose = false){
|
|
|
+ if (isClose){
|
|
|
+ this.currentIndex=undefined;
|
|
|
+ this.isShowAwait = false;
|
|
|
+ }else{
|
|
|
+ this.currentIndex = index;
|
|
|
+ setTimeout(function (){
|
|
|
+ $("#info-"+index).after($("#await"));
|
|
|
+ this.isShowAwait = true;
|
|
|
+ },100);
|
|
|
+ }
|
|
|
+ },
|
|
|
exePrint(){
|
|
|
if (!this.printInfo.signer){
|
|
|
window.tempTip.setIndex(1099);
|
|
|
@@ -298,6 +352,36 @@
|
|
|
condition:data,
|
|
|
});
|
|
|
form.init();
|
|
|
+ let column = [
|
|
|
+ {name:'index',value: '序号', neglect: true, class:"td-warm"},
|
|
|
+ {name:'operation',value: '操作', neglect: true, class:"td-warm"},
|
|
|
+ {name:'status',value: '状态', class:"td-warm"},
|
|
|
+ {name:'appointment_number',value: '预约号', neglect: true, class:"td-warm"},
|
|
|
+ {name:'asn_number',value: 'ASN单号', class:"td-warm"},
|
|
|
+ {name:'appointment_date',value: '预约时间', class:"td-warm"},
|
|
|
+ {name:'created_at',value: '创建时间', class:"td-warm"},
|
|
|
+ {name:'delivery_time',value: '操作/送达时间', neglect: true, class:"td-warm"},
|
|
|
+ {name:'owner_id',value: '货主', class:"td-warm"},
|
|
|
+ {name:'tonne',value: '重量/吨', class:"td-warm"},
|
|
|
+ {name:'cubic_meter',value: '体积/立方', class:"td-warm"},
|
|
|
+ {name:'box_amount',value: '箱数', class:"td-warm"},
|
|
|
+ {name:'remark',value: '备注', class:"td-warm"},
|
|
|
+ {name:'logistic_id',value: '车号/快递公司', class:"bg-info"},
|
|
|
+ {name:'logistic_number',value: '车型/快递单号', class:"bg-info"},
|
|
|
+ ];
|
|
|
+ new Header({
|
|
|
+ el: "table",
|
|
|
+ name: "deliveryAppointment",
|
|
|
+ column: column,
|
|
|
+ data: this.list,
|
|
|
+ restorationColumn: 'id',
|
|
|
+ fixedTop:($('#form').height())+2,
|
|
|
+ before : [
|
|
|
+ {colspan:'1',value: ''},
|
|
|
+ {colspan:'13',value: '订单信息', class:"td-warm"},
|
|
|
+ {colspan:'14',value: '物流信息', class:"bg-info"},
|
|
|
+ ],
|
|
|
+ }).init();
|
|
|
},
|
|
|
upAll(id){
|
|
|
let dom = "#item-"+id;
|
|
|
@@ -339,18 +423,18 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- checkAll(e){
|
|
|
+ /*checkAll(e){
|
|
|
if (e.target.checked){
|
|
|
this.checkData = [];
|
|
|
this.list.forEach((el)=>{
|
|
|
this.checkData.push(el.id);
|
|
|
});
|
|
|
}else this.checkData = [];
|
|
|
- },
|
|
|
+ },*/
|
|
|
executeExport(isAll){
|
|
|
let url = '{{url('store/deliveryAppointment/export')}}';
|
|
|
let token='{{ csrf_token() }}';
|
|
|
- excelExport(isAll,this.checkData,url,this.sum,token);
|
|
|
+ excelExport(isAll,checkData,url,this.sum,token);
|
|
|
},
|
|
|
updateDeliveryDate(info,index){
|
|
|
for (let i=0;i<info.cars.length;i++){
|
|
|
@@ -410,15 +494,15 @@
|
|
|
if (isSelect) this.selectDate = {date:date,time:time};
|
|
|
},
|
|
|
qualityInspectionMark(){
|
|
|
- if (this.checkData.length<1){
|
|
|
+ if (checkData.length<1){
|
|
|
window.tempTip.setDuration("3000");
|
|
|
window.tempTip.show("未勾选记录");
|
|
|
return;
|
|
|
}
|
|
|
let url = "{{url('store/deliveryAppointment/qualityInspectionMark')}}";
|
|
|
- window.tempTip.postBasicRequest(url,{ids:this.checkData},()=>{
|
|
|
+ window.tempTip.postBasicRequest(url,{ids:checkData},()=>{
|
|
|
this.list.forEach(data=>{
|
|
|
- if (this.checkData.indexOf(data.id)!==-1){
|
|
|
+ if (checkData.indexOf(data.id)!==-1){
|
|
|
data.type_mark = 0;
|
|
|
}
|
|
|
});
|