152 行
6.7 KiB
HTML
可执行文件
152 行
6.7 KiB
HTML
可执行文件
<div id="app">
|
|
<!-- 搜索 -->
|
|
<div class="seek-div" style="margin-bottom: 10px;">
|
|
<date-picker-range :date-time.sync="add_time"></date-picker-range>
|
|
|
|
<el-input v-model="order_number" clearable placeholder="门店订单号" size="small"
|
|
style="width:180px;"></el-input>
|
|
<el-select v-model="status" placeholder="状态" size="small" clearable>
|
|
<el-option value="" label="所有状态"></el-option>
|
|
<el-option value="1" label="待接单"></el-option>
|
|
<el-option value="2" label="待取件"></el-option>
|
|
<el-option value="3" label="待收件"></el-option>
|
|
<el-option value="4" label="已完成"></el-option>
|
|
<el-option value="5" label="已取消"></el-option>
|
|
</el-select>
|
|
<if condition="$authArr['search'] eq true">
|
|
<el-button type="primary" @click="search" size="small">查询</el-button>
|
|
</if>
|
|
<if condition="$authArr['orderExport'] eq true">
|
|
<el-button type="primary" @click="orderExport()" size="small">导出</el-button>
|
|
</if>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<div style="border: 1px solid #e6e6e6;max-width: calc(100vw - 10px);">
|
|
<el-table border :data="makeList" style="width: calc(100vw - 10px);border: none;"
|
|
size="mini"
|
|
max-height="500"
|
|
v-loading="loading"
|
|
element-loading-text="数据获取中"
|
|
element-loading-spinner="el-icon-loading">
|
|
<el-table-column prop="index" label="序号" show-overflow-tooltip width="50"></el-table-column>
|
|
<el-table-column prop="bill_order_number" label="门店订单" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="order_number" label="码科订单" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="storetag" label="门店名称" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="rider_name" label="骑手姓名" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="rider_mobile" label="骑手手机号" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="distance" label="配送距离" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="total_price" label="配送费" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="accept_time" label="接单时间" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="complete_time" label="送达时间" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="status_name" label="状态" show-overflow-tooltip></el-table-column>
|
|
</el-table>
|
|
<el-pagination
|
|
@size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page="currentPage"
|
|
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50]"
|
|
:page-size="100"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:total="currentLen">
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript" src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
|
<script type="text/javascript">
|
|
var app = new Vue({
|
|
el: '#app',
|
|
data: function () {
|
|
return {
|
|
loading: true,
|
|
add_time: '',
|
|
order_number: '',
|
|
store_id: '',
|
|
status: '',
|
|
currentPage: 1,
|
|
currentLimit: 10,
|
|
currentLen: 0,
|
|
makeList: [],
|
|
}
|
|
},
|
|
methods: {
|
|
//导出
|
|
orderExport: function (page = 1, type = 1, directory_name = '') {
|
|
var that = this;
|
|
that.loading = true;
|
|
that.loadingText = '文件生成中,请耐心等待';
|
|
if (type == 1) {
|
|
$.ajax({
|
|
url: "{:U('export')}",
|
|
type: 'POST',
|
|
data: {
|
|
page: page,
|
|
limit: 500,
|
|
add_time: that.add_time,
|
|
order_number: that.order_number,
|
|
store_id: that.store_id,
|
|
status: that.status,
|
|
type: type,
|
|
directory_name: directory_name
|
|
},
|
|
success: (res) => {
|
|
if (res.status == 1) {
|
|
that.orderExport(++page, res.data.type, res.data.directory_name);
|
|
} else {
|
|
that.loading = false;
|
|
that.$confirm(res.msg, '提示', {
|
|
confirmButtonText: '确定',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
|
|
}).catch(() => {
|
|
});
|
|
}
|
|
},
|
|
error: (res) => {
|
|
that.loading = false;
|
|
}
|
|
});
|
|
} else {
|
|
that.loading = false;
|
|
window.open(`{:U('export')}?directory_name=${directory_name}`);
|
|
}
|
|
},
|
|
search: function () {
|
|
this.getMakeList();
|
|
},
|
|
handleSizeChange: function (val) {
|
|
this.currentLimit = val;//切换每页数量
|
|
this.currentPage = 1;
|
|
this.getMakeList();
|
|
},
|
|
handleCurrentChange: function (val) {
|
|
this.currentPage = val;
|
|
this.getMakeList();//切换页数
|
|
},
|
|
getMakeList: function () {
|
|
var that = this;
|
|
$.ajax({
|
|
url: "{:U('makeOrder')}",
|
|
type: "post",
|
|
data: {
|
|
add_time: that.add_time,
|
|
order_number: that.order_number,
|
|
status: that.status,
|
|
page: that.currentPage,
|
|
limit: that.currentLimit
|
|
},
|
|
success: function (res) {
|
|
that.loading = false;
|
|
that.makeList = res.data.list;
|
|
that.$nextTick(function () {
|
|
that.currentLen = parseInt(res.data.count);
|
|
})
|
|
}
|
|
})
|
|
},
|
|
},
|
|
created: function () {
|
|
this.getMakeList();
|
|
}
|
|
})
|
|
</script> |