init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
220
Public/Retail/js/order/uu-order.js
可执行文件
220
Public/Retail/js/order/uu-order.js
可执行文件
@@ -0,0 +1,220 @@
|
||||
/**
|
||||
* 查看uu订单
|
||||
*/
|
||||
Vue.component('manager-uu-order', {
|
||||
template: `<div>
|
||||
<el-form :inline="true" size="small">
|
||||
<el-form-item>
|
||||
<date-picker-range :date-time.sync="searchForm.time"></date-picker-range>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input placeholder="门店订单号" style="width: 200px"
|
||||
v-model="searchForm.order_id"
|
||||
@keydown.enter.exact.native.prevent="searchData"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="userType==1">
|
||||
<select-store :store-id.sync="searchForm.store_id"
|
||||
:show-status="true"
|
||||
@change="searchData"></select-store>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.status" clearable
|
||||
@change="searchData"
|
||||
placeholder="订单状态" style="width: 200px;">
|
||||
<el-option label="未完成订单" value="1"></el-option>
|
||||
<el-option label="完成订单" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.order_type" clearable
|
||||
@change="searchData"
|
||||
placeholder="订单类型" style="width: 200px;">
|
||||
<el-option label="商城订单" value="1"></el-option>
|
||||
<el-option label="拼团订单" value="2"></el-option>
|
||||
<el-option label="秒杀订单" value="3"></el-option>
|
||||
<el-option label="预售订单" value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="searchData">查询</el-button>
|
||||
<el-button v-if="operate.export" @click="exportExcel">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="table-top-card-box">
|
||||
<div class="table-top-card">
|
||||
<div class="table-top-card-header">订单总数</div>
|
||||
<div class="table-top-card-body">{{ sumData.order_count }}</div>
|
||||
</div>
|
||||
<div class="table-top-card">
|
||||
<div class="table-top-card-header">完成订单总数</div>
|
||||
<div class="table-top-card-body">{{ sumData.complete }}</div>
|
||||
</div>
|
||||
<div class="table-top-card">
|
||||
<div class="table-top-card-header">使用总费用</div>
|
||||
<div class="table-top-card-body">{{ sumData.cost_total }}</div>
|
||||
</div>
|
||||
<div class="table-top-card">
|
||||
<div class="table-top-card-header">总优惠金额</div>
|
||||
<div class="table-top-card-body">{{ sumData.coupon_money }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="orderList" border size="small" :header-cell-style="{background:'#F5F7FA',color:'#606266'}">
|
||||
<el-table-column align="center" type="index" label="序号" width="50" fixed="left"></el-table-column>
|
||||
<el-table-column align="center" prop="order_id" label="门店订单号" min-width="146px" fixed="left" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="ordercode" label="UU订单号" min-width="140px" fixed="left" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="store_name" label="门店名称" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="add_time" label="添加时间" min-width="140px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="driver_name" label="配送员姓名" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="driver_jobnum" label="配送员工号" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="driver_mobile" label="配送员手机号" min-width="120px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="distance" label="配送距离(米)" min-width="110px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="total_money" label="配送费" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="total_priceoff" label="总优惠金额" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="need_paymoney" label="实际配送费" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="order_status" label="状态" min-width="120px"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="order_type" label="订单类型" min-width="80px" :show-overflow-tooltip="true"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="sizeChange"
|
||||
@current-change="currentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:current-page="searchForm.page"
|
||||
:pager-count="5"
|
||||
:page-sizes="[10,20,30,40,50,60,70,80,90]"
|
||||
:page-size="10"
|
||||
:total="count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>`,
|
||||
props: {
|
||||
'userType': {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},//1商户 2门店
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: {},
|
||||
orderList: [],
|
||||
count: 0,
|
||||
searchForm: {
|
||||
order_type: '',
|
||||
order_id: '',
|
||||
store_id: '',
|
||||
status: '',
|
||||
time: [],
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
sumData: {
|
||||
order_count: 0,
|
||||
complete: 0,
|
||||
cost_total: 0,
|
||||
coupon_money: 0,
|
||||
},
|
||||
requestUrl: {
|
||||
sumData: {
|
||||
1: '/index.php/Retail/Uuerrands/getMerDeliveryTotal',
|
||||
2: '/index.php/Retail/Uuerrands/getStoreDeliveryTotal',
|
||||
},
|
||||
dataList: {
|
||||
1: '/index.php/Retail/Uuerrands/getMerDeliveryList',
|
||||
2: '/index.php/Retail/Uuerrands/getStoreDeliveryList',
|
||||
},
|
||||
export: {
|
||||
1: '/index.php/Retail/Uuerrands/merExport',
|
||||
2: '/index.php/Retail/Uuerrands/storeExport',
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//获取统计数据
|
||||
getSumData() {
|
||||
this.sendRequest(this.requestUrl.sumData[this.userType], {
|
||||
data: this.searchForm,
|
||||
success: (res) => {
|
||||
if (res.status == 1) {
|
||||
this.sumData = {
|
||||
order_count: res.data.order_count,
|
||||
complete: res.data.complete,
|
||||
cost_total: res.data.cost_total,
|
||||
coupon_money: res.data.coupon_money,
|
||||
};
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//查询
|
||||
searchData() {
|
||||
this.getSumData();
|
||||
this.currentChange(1);
|
||||
},
|
||||
//获取数据列表
|
||||
getOrderData() {
|
||||
this.sendRequest(this.requestUrl.dataList[this.userType], {
|
||||
data: this.searchForm,
|
||||
success: (res) => {
|
||||
if (res.status == 1) {
|
||||
this.orderList = res.data.list;
|
||||
this.count = res.data.count;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 分页
|
||||
* @param int val 当前选择的页数
|
||||
*/
|
||||
currentChange(val) {
|
||||
this.searchForm.page = val;
|
||||
this.getOrderData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 每页显示数量
|
||||
* @param int val 数量
|
||||
*/
|
||||
sizeChange(val) {
|
||||
this.searchForm.limit = val;
|
||||
this.searchForm.page = 1;
|
||||
this.getOrderData();
|
||||
},
|
||||
//导出
|
||||
exportExcel() {
|
||||
let order_id = this.searchForm.order_id;
|
||||
let store_id = this.searchForm.store_id;
|
||||
let status = this.searchForm.status;
|
||||
let order_type = this.searchForm.order_type;
|
||||
let time = this.searchForm.time;
|
||||
if(!this.searchForm.time.length){
|
||||
this.$confirm('不选择时间则默认导出当日记录', '确定导出数据吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
window.location.href = this.requestUrl.export[this.userType] + "?order_id=" + order_id + "&store_id=" + store_id + "&status=" + status + "&order_type=" + order_type + "&time=" + time;
|
||||
}).catch(() => {
|
||||
})
|
||||
}else{
|
||||
window.location.href = this.requestUrl.export[this.userType] + "?order_id=" + order_id + "&store_id=" + store_id + "&status=" + status + "&order_type=" + order_type + "&time=" + time;
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getSumData();
|
||||
this.getOrderData();
|
||||
this.checkOperateAuth({
|
||||
export: this.requestUrl.export[this.userType]
|
||||
}, (data) => {
|
||||
this.operate = data;
|
||||
})
|
||||
}
|
||||
});
|
||||
在新工单中引用
屏蔽一个用户