|
@@ -11,8 +11,8 @@
|
|
|
导出Excel
|
|
导出Excel
|
|
|
</button>
|
|
</button>
|
|
|
<div class="dropdown-menu">
|
|
<div class="dropdown-menu">
|
|
|
- <a class="dropdown-item" @click="excelExport(false)" href="javascript:">导出勾选内容</a>
|
|
|
|
|
- <a class="dropdown-item" @click="excelExport(true)" href="javascript:">导出所有页</a>
|
|
|
|
|
|
|
+ <a class="dropdown-item" @click="billExport(false)" href="javascript:">导出勾选内容</a>
|
|
|
|
|
+ <a class="dropdown-item" @click="billExport(true)" href="javascript:">导出所有页</a>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
@@ -23,12 +23,38 @@
|
|
|
<table class="table table-sm text-nowrap table-striped table-hover" id="headerParent">
|
|
<table class="table table-sm text-nowrap table-striped table-hover" id="headerParent">
|
|
|
<tr class="text-center">
|
|
<tr class="text-center">
|
|
|
<td colspan="2"></td>
|
|
<td colspan="2"></td>
|
|
|
- <td colspan="8" class="bg-light-info">单据信息</td>
|
|
|
|
|
|
|
+ <td colspan="9" class="bg-light-info">单据信息</td>
|
|
|
<td colspan="4" class="bg-light-khaki">物流作业信息</td>
|
|
<td colspan="4" class="bg-light-khaki">物流作业信息</td>
|
|
|
<td colspan="4" class="bg-light-cyanogen">费用信息</td>
|
|
<td colspan="4" class="bg-light-cyanogen">费用信息</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr id="header"></tr>
|
|
<tr id="header"></tr>
|
|
|
|
|
+ <tr v-for="(bill,i) in bills">
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label><input type="checkbox" :value="bill.id" v-model="checkData"></label>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>@{{ i+1 }}</td>
|
|
|
|
|
+ <td>@{{ bill.customerName }}</td>
|
|
|
|
|
+ <td>@{{ bill.ownerName }}</td>
|
|
|
|
|
+ <td>@{{ bill.workedAt }}</td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <label v-if="bill.type == '增值服务'">服务<span class="badge badge-primary">@{{ bill.methodName }}</span></label>
|
|
|
|
|
+ <label v-else>@{{ bill.type }}</label>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>@{{ bill.shopName }}</td>
|
|
|
|
|
+ <td>@{{ bill.operationBill }}</td>
|
|
|
|
|
+ <td>@{{ bill.consigneeName }}</td>
|
|
|
|
|
+ <td>@{{ bill.consigneePhone }}</td>
|
|
|
|
|
+ <td>@{{ bill.commodityAmount }}</td>
|
|
|
|
|
+ <td>@{{ bill.logisticBill }}</td>
|
|
|
|
|
+ <td>@{{ bill.volume }}</td>
|
|
|
|
|
+ <td>@{{ bill.weight }}</td>
|
|
|
|
|
+ <td>@{{ bill.logisticName }}</td>
|
|
|
|
|
+ <td>@{{ bill.workFee }}</td>
|
|
|
|
|
+ <td>@{{ bill.logisticFee }}</td>
|
|
|
|
|
+ <td>@{{ bill.total }}</td>
|
|
|
|
|
+ </tr>
|
|
|
</table>
|
|
</table>
|
|
|
|
|
+ {{$details->appends($params)->links()}}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
@stop
|
|
@stop
|
|
@@ -36,27 +62,69 @@
|
|
|
@section("lastScript")
|
|
@section("lastScript")
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
|
|
<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
|
|
<script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
|
|
|
|
|
+ <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
|
|
|
<script>
|
|
<script>
|
|
|
let vue = new Vue({
|
|
let vue = new Vue({
|
|
|
el:"#container",
|
|
el:"#container",
|
|
|
data:{
|
|
data:{
|
|
|
checkData:[],
|
|
checkData:[],
|
|
|
- bills : [],
|
|
|
|
|
|
|
+ bills : [
|
|
|
|
|
+ @foreach($details as $detail)
|
|
|
|
|
+ { id : "{{$detail->id}}",
|
|
|
|
|
+ ownerName : "{{$detail->owner ? $detail->owner->name : ''}}",
|
|
|
|
|
+ customerName : "{{$detail->owner ? ($detail->owner->customer ? $detail->owner->customer->name : '') : ''}}",
|
|
|
|
|
+ workedAt : "{{$detail->worked_at}}",
|
|
|
|
|
+ type : "{{$detail->type}}",
|
|
|
|
|
+ shopName : "{{$detail->shop ? $detail->shop->name : ''}}",
|
|
|
|
|
+ operationBill : "{{$detail->operation_bill}}",
|
|
|
|
|
+ consigneeName : "{{$detail->consignee_name}}",
|
|
|
|
|
+ consigneePhone : "{{$detail->consignee_phone}}",
|
|
|
|
|
+ commodityAmount : "{{$detail->commodity_amount}}",
|
|
|
|
|
+ logisticBill : "{{$detail->logistic_bill}}",
|
|
|
|
|
+ volume : "{{$detail->volume}}",
|
|
|
|
|
+ weight : "{{$detail->weight}}",
|
|
|
|
|
+ logisticName : "{{$detail->logistic ? $detail->logistic->name : ''}}",
|
|
|
|
|
+ methodName : "{{$detail->processMethod ? $detail->processMethod->name : ''}}",
|
|
|
|
|
+ workFee : "{{$detail->work_fee}}",
|
|
|
|
|
+ logisticFee : "{{$detail->logistic_fee}}",
|
|
|
|
|
+ createdAt : "{{$detail->created_at}}",
|
|
|
|
|
+ total : "{{$detail->work_fee + $detail->logistic_fee}}",
|
|
|
|
|
+ },
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ ],
|
|
|
|
|
+ owners : [
|
|
|
|
|
+ @foreach($owners as $owner)
|
|
|
|
|
+ {name:"{{$owner->id}}",value:"{{$owner->name}}"},
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ ],
|
|
|
|
|
+ customers : [
|
|
|
|
|
+ @foreach($customers as $customer)
|
|
|
|
|
+ {name:"{{$customer->id}}",value:"{{$customer->name}}"},
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ ],
|
|
|
|
|
+ shops : [
|
|
|
|
|
+ @foreach($shops as $shop)
|
|
|
|
|
+ {name:"{{$shop->id}}",value:"{{$shop->name}}"},
|
|
|
|
|
+ @endforeach
|
|
|
|
|
+ ],
|
|
|
|
|
+ types : [
|
|
|
|
|
+ {name:"发货",value:"发货"},{name:"收货",value:"收货"},{name:"增值服务",value:"增值服务"},
|
|
|
|
|
+ ],
|
|
|
|
|
+ sum : Number("{{ $details->total() }}"),
|
|
|
},
|
|
},
|
|
|
mounted(){
|
|
mounted(){
|
|
|
let data=[
|
|
let data=[
|
|
|
[
|
|
[
|
|
|
- {name:'shop_name',type:'select',tip:'店铺',placeholder: '店铺',data:[]},
|
|
|
|
|
- {name:'counting_month_start',type:'dateMonth',tip:'起始结算月'},
|
|
|
|
|
|
|
+ {name:'shop_id',type:'select',tip:'店铺',placeholder: '店铺',data:this.shops},
|
|
|
|
|
+ {name:'worked_at_start',type:'dateTime',tip:'起始作业日期'},
|
|
|
{name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的项目'],
|
|
{name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的项目'],
|
|
|
- placeholder:['项目','定位或多选项目'],data:[]},
|
|
|
|
|
|
|
+ placeholder:['项目','定位或多选项目'],data:this.owners},
|
|
|
{name: 'operation_bill', type: 'input', tip: '发/收/退/提货单号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '单据号'},
|
|
{name: 'operation_bill', type: 'input', tip: '发/收/退/提货单号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '单据号'},
|
|
|
- {name:'type',type:'select',tip:'类型',placeholder: '类型',data:[]},
|
|
|
|
|
],[
|
|
],[
|
|
|
- {name:'customer_id',type:'select',tip:'客户',placeholder: '客户',data:[]},
|
|
|
|
|
- {name:'counting_month_end',type:'dateMonth',tip:'结束结算月'},
|
|
|
|
|
- {name:'status',type:'select',placeholder:'状态',data:[]},
|
|
|
|
|
|
|
+ {name:'customer_id',type:'select',tip:'客户',placeholder: '客户',data:this.customers},
|
|
|
|
|
+ {name:'worked_at_end',type:'dateTime',tip:'结束作业日期'},
|
|
|
{name:'logistic_bill', type: 'input', tip: '物流/快递单号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '快递单号'},
|
|
{name:'logistic_bill', type: 'input', tip: '物流/快递单号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '快递单号'},
|
|
|
|
|
+ {name:'type',type:'select',tip:'类型',placeholder: '类型',data:this.types},
|
|
|
],
|
|
],
|
|
|
];
|
|
];
|
|
|
this.form = new query({
|
|
this.form = new query({
|
|
@@ -68,21 +136,22 @@
|
|
|
{name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
|
|
{name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
|
|
|
dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
|
|
dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
|
|
|
{name:'index',value: '序号', neglect: true},
|
|
{name:'index',value: '序号', neglect: true},
|
|
|
- {name:'owner_name',value: '项目', class: "bg-info"},
|
|
|
|
|
- {name:'worked_at',value: '作业时间', class: "bg-info"},
|
|
|
|
|
|
|
+ {name:'customerName',value: '客户', class: "bg-info"},
|
|
|
|
|
+ {name:'ownerName',value: '项目', class: "bg-info"},
|
|
|
|
|
+ {name:'workedAt',value: '作业时间', class: "bg-info"},
|
|
|
{name:'type',value: '类型', class: "bg-info"},
|
|
{name:'type',value: '类型', class: "bg-info"},
|
|
|
- {name:'shop_name',value: '店铺', class: "bg-info"},
|
|
|
|
|
- {name:'operation_bill',value: '单号(发/收/退/提)', class: "bg-info"},
|
|
|
|
|
- {name:'consignee_name',value: '收件人', class: "bg-info"},
|
|
|
|
|
- {name:'consignee_phone',value: '收件人电话', class: "bg-info"},
|
|
|
|
|
- {name:'commodity_amount',value: '商品数量', class: "bg-info", neglect: true},
|
|
|
|
|
- {name:'logistic_bill',value: '物流/快递单号', class: "bg-khaki"},
|
|
|
|
|
|
|
+ {name:'shopName',value: '店铺', class: "bg-info"},
|
|
|
|
|
+ {name:'operationBill',value: '单号(发/收/退/提)', class: "bg-info"},
|
|
|
|
|
+ {name:'consigneeName',value: '收件人', class: "bg-info"},
|
|
|
|
|
+ {name:'consigneePhone',value: '收件人电话', class: "bg-info"},
|
|
|
|
|
+ {name:'commodityAmount',value: '商品数量', class: "bg-info", neglect: true},
|
|
|
|
|
+ {name:'logisticBill',value: '物流/快递单号', class: "bg-khaki"},
|
|
|
{name:'volume',value: '体积', class: "bg-khaki", neglect: true},
|
|
{name:'volume',value: '体积', class: "bg-khaki", neglect: true},
|
|
|
{name:'weight',value: '重量', class: "bg-khaki", neglect: true},
|
|
{name:'weight',value: '重量', class: "bg-khaki", neglect: true},
|
|
|
- {name:'logistic_name',value: '承运商', class: "bg-khaki"},
|
|
|
|
|
- {name:'work_fee',value: '操作费', class: "bg-cyanogen"},
|
|
|
|
|
- {name:'logistic_fee',value: '物流费', class: "bg-cyanogen"},
|
|
|
|
|
- {name:'total_fee',value: '合计', class: "bg-cyanogen"},
|
|
|
|
|
|
|
+ {name:'logisticName',value: '承运商', class: "bg-khaki"},
|
|
|
|
|
+ {name:'workFee',value: '操作费', class: "bg-cyanogen", neglect: true},
|
|
|
|
|
+ {name:'logisticFee',value: '物流费', class: "bg-cyanogen", neglect: true},
|
|
|
|
|
+ {name:'total',value: '合计', class: "bg-cyanogen", neglect: true},
|
|
|
];
|
|
];
|
|
|
let _this=this;
|
|
let _this=this;
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
@@ -98,17 +167,33 @@
|
|
|
header.init();
|
|
header.init();
|
|
|
},0);
|
|
},0);
|
|
|
},
|
|
},
|
|
|
|
|
+ watch:{
|
|
|
|
|
+ checkData:{
|
|
|
|
|
+ handler(){
|
|
|
|
|
+ if (this.checkData.length === this.bills.length){
|
|
|
|
|
+ document.querySelector('#all').checked = true;
|
|
|
|
|
+ document.querySelector('#all_temp').checked = true;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ document.querySelector('#all').checked = false;
|
|
|
|
|
+ document.querySelector('#all_temp').checked = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ deep:true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
methods:{
|
|
methods:{
|
|
|
- excelExport(isAll){
|
|
|
|
|
-
|
|
|
|
|
|
|
+ billExport(isAll){
|
|
|
|
|
+ let url = '{{url('customer/finance/instantBill/export')}}';
|
|
|
|
|
+ let token='{{ csrf_token() }}';
|
|
|
|
|
+ //excelExport 定义在 js/queryForm/export.js
|
|
|
|
|
+ excelExport(isAll,this.checkData,url,this.sum,token);
|
|
|
},
|
|
},
|
|
|
//全选事件
|
|
//全选事件
|
|
|
checkAll(e){
|
|
checkAll(e){
|
|
|
if (e.target.checked){
|
|
if (e.target.checked){
|
|
|
- this.owners.forEach((el)=>{
|
|
|
|
|
- if (this.checkData.indexOf(el.id) === '-1'){
|
|
|
|
|
- this.checkData.push(el.id);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.checkData = [];
|
|
|
|
|
+ this.bills.forEach((el)=>{
|
|
|
|
|
+ this.checkData.push(el.id);
|
|
|
});
|
|
});
|
|
|
}else {
|
|
}else {
|
|
|
this.checkData = [];
|
|
this.checkData = [];
|