Commit 60358df6 by lixiaomin

修改订单

parent f68a1470
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号" clearable @keyup.enter.native="handleQuery" />
<el-form :model="queryParams" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="订单编号" >
<el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery" style="width:230px"/>
</el-form-item>
<el-form-item label="冗余" prop="userName">
<el-input v-model="queryParams.userName" placeholder="请输入冗余" clearable @keyup.enter.native="handleQuery" />
<el-form-item label="顺序号" >
<el-input v-model="queryParams.orderNum" placeholder="请输入顺序号" clearable @keyup.enter.native="handleQuery" style="width:230px"/>
</el-form-item>
<el-form-item label="冗余" prop="userPhone">
<el-input v-model="queryParams.userPhone" placeholder="请输入冗余" clearable @keyup.enter.native="handleQuery" />
<el-form-item label="用户昵称">
<el-input v-model="queryParams.userName" placeholder="请输入用户昵称" clearable @keyup.enter.native="handleQuery" style="width:230px"/>
</el-form-item>
<el-form-item label="支付时间" prop="payTime">
<el-date-picker clearable v-model="queryParams.payTime" type="date" value-format="yyyy-MM-dd"
placeholder="请选择支付时间">
</el-date-picker>
<el-form-item label="店铺" >
<el-select v-model="queryParams.shopId" placeholder="请选择店铺" clearable style="width:230px">
<el-option
v-for="item in shopList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="完成时间" prop="finishTime">
<el-date-picker clearable v-model="queryParams.finishTime" type="date" value-format="yyyy-MM-dd"
placeholder="请选择完成时间">
</el-date-picker>
<el-form-item label="创建时间" >
<el-date-picker v-model="createdTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" style="width:230px"></el-date-picker>
</el-form-item>
<el-form-item label="订单金额" prop="amount">
<el-input v-model="queryParams.amount" placeholder="请输入订单金额" clearable @keyup.enter.native="handleQuery" />
<el-form-item label="付款时间">
<el-date-picker v-model="payTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" style="width:230px"></el-date-picker>
</el-form-item>
<el-form-item label="取餐码" prop="pickCode">
<el-input v-model="queryParams.pickCode" placeholder="请输入取餐码" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="创建时间" prop="createdAt">
<el-date-picker clearable v-model="queryParams.createdAt" type="date" value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updatedAt">
<el-date-picker clearable v-model="queryParams.updatedAt" type="date" value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
</el-date-picker>
<el-form-item label="订单状态">
<el-select v-model="queryParams.state" placeholder="请选择订单状态" clearable style="width:230px">
<el-option v-for="item in stateList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
......@@ -190,11 +185,35 @@
<script>
import { listOrder, getOrder,getLogList } from "@/api/system/order";
import { listShop} from "@/api/system/shop";
import piovince from '@/utils/piovince';
export default {
name: "Order",
data() {
return {
return {
createdTime:[],
payTime:[],
shopList:[
{value: '',label: '全部'},
],
stateList:[
{value:"",label:"创建未校验"},
{value:"0",label:"全部"},
{value:"1",label:"未支付"},
{value:"2",label:"已支付"},
{value:"3",label:"支付制作中"},
{value:"4",label:"制作完成未取"},
{value:"5",label:"取餐中"},
{value:"6",label:"正常完成"},
{value:"7",label:"未支付取消"},
{value:"8",label:"支付后制作前取消"},
{value:"9",label:"制作中取消"},
{value:"10",label:"制作完成取消"},
{value:"11",label:"已退款"},
{value:"12",label:"部分退款"},
{value:"13",label:"待取超时"},
{value:"50",label:"其他人工干预状态"},
],
piovince,
// 遮罩层
loading: true,
......@@ -220,20 +239,13 @@ export default {
pageSize: 10,
orderNo: null,
orderNum: null,
userId: null,
userName: null,
userPhone: null,
payTime: null,
finishTime: null,
amount: null,
goodsNum: null,
pickCode: null,
shopId: null,
machineId: null,
source: null,
state: null,
createdAt: null,
updatedAt: null
createAtStart: null,
createAtEnd:null,
payAtStart:null,
payAtEnd: null,
state: null
},
// 表单参数
form: {},
......@@ -248,6 +260,7 @@ export default {
},
created() {
this.getList();
this.getShopList();
},
methods: {
getProvince(province){
......@@ -314,11 +327,11 @@ export default {
},
/** 查询订单列表 */
getList() {
this.loading = true;
listOrder(this.queryParams).then(response => {
this.orderList = response.rows;
this.total = response.total;
this.loading = false;
if(response.code=="200"){
this.orderList = response.rows;
this.total = response.total;
}
});
},
/** 查询订单日志列表 */
......@@ -326,8 +339,7 @@ export default {
this.loading = true;
getLogList({orderId:this.orderId}).then(response => {
if(response.code=="200"){
this.logList = response.data;
this.loading = false;
this.logList = response.data;
}
});
},
......@@ -343,12 +355,26 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
if(this.createdTime.length>0){
this.queryParams.createAtStart=this.createdTime[0];
this.queryParams.createAtEnd=this.createdTime[1];
}
if(this.payTime.length>0){
this.queryParams.payAtStart=this.payTime[0];
this.queryParams.payAtEnd=this.payTime[1];
}
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.pageNum = 1;
this.queryParams.orderNo=null;
this.queryParams.orderNum=null;
this.queryParams.userName=null;
this.queryParams.shopId=null;
this.createdTime=[];
this.payTime=[];
this.queryParams.state=null;
this.handleQuery();
},
/** 详情按钮操作 */
......@@ -376,6 +402,18 @@ export default {
}
});
},
/** 店铺列表 */
getShopList() {
listShop({pageNum:1,pageSize:10000}).then(response => {
if(response.code=="200"){
if(response.rows.length>0){
for(let i=0;i<response.rows.length;i++){
this.shopList.push({value:response.rows[i].id,label: response.rows[i].name},)
}
}
}
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/order/export', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment