|
@@ -4,10 +4,9 @@
|
|
:model="queryParams"
|
|
:model="queryParams"
|
|
ref="queryForm"
|
|
ref="queryForm"
|
|
:inline="true"
|
|
:inline="true"
|
|
- v-show="showSearch"
|
|
|
|
label-width="68px"
|
|
label-width="68px"
|
|
>
|
|
>
|
|
- <el-form-item label="客户姓名" prop="consumer">
|
|
|
|
|
|
+ <el-form-item label="客户姓名" prop="likeConsumer">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.likeConsumer"
|
|
v-model="queryParams.likeConsumer"
|
|
placeholder="请输入客户姓名"
|
|
placeholder="请输入客户姓名"
|
|
@@ -16,7 +15,7 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="联系电话" prop="orderNo">
|
|
|
|
|
|
+ <el-form-item label="联系电话" prop="likeCustomerPhone">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.likeCustomerPhone"
|
|
v-model="queryParams.likeCustomerPhone"
|
|
placeholder="请输入订单号"
|
|
placeholder="请输入订单号"
|
|
@@ -34,9 +33,9 @@
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="dict in oilNameOptions"
|
|
v-for="dict in oilNameOptions"
|
|
- :key="dict.dictLabel"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictLabel"
|
|
|
|
|
|
+ :key="dict.oilName"
|
|
|
|
+ :label="dict.oilName"
|
|
|
|
+ :value="dict.oilName"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -92,105 +91,80 @@
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
- v-hasPermi="['station:order:export']"
|
|
|
|
>导出</el-button
|
|
>导出</el-button
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table v-loading="loading" :data="orderList">
|
|
|
|
- <el-table-column
|
|
|
|
|
|
+ <el-table :data="orderList">
|
|
|
|
+ <af-table-column
|
|
v-if="false"
|
|
v-if="false"
|
|
label="订单id"
|
|
label="订单id"
|
|
align="center"
|
|
align="center"
|
|
prop="orderId"
|
|
prop="orderId"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
- label="订单号"
|
|
|
|
- width="200"
|
|
|
|
- align="center"
|
|
|
|
- prop="orderNo"
|
|
|
|
- />
|
|
|
|
- <el-table-column label="油品名称" align="center" prop="oilName" />
|
|
|
|
- <el-table-column label="油品价格" align="center" prop="oilPirce" />
|
|
|
|
- <el-table-column label="加油升数" align="center" prop="orderLiters" />
|
|
|
|
- <el-table-column label="应付金额" align="center" prop="receivableAmt" />
|
|
|
|
- <el-table-column label="实付金额" align="center" prop="amt" />
|
|
|
|
- <el-table-column label="优惠金额" align="center" prop="discountAmt" />
|
|
|
|
- <el-table-column
|
|
|
|
- label="客户姓名"
|
|
|
|
- width="120"
|
|
|
|
- align="center"
|
|
|
|
- prop="consumer"
|
|
|
|
- />
|
|
|
|
- <el-table-column
|
|
|
|
- label="加油员"
|
|
|
|
- width="120"
|
|
|
|
- align="center"
|
|
|
|
- prop="oilPersonnel"
|
|
|
|
- />
|
|
|
|
- <el-table-column label="加油枪号" align="center" prop="oilGun" />
|
|
|
|
- <el-table-column
|
|
|
|
|
|
+ <af-table-column label="订单号" align="center" prop="orderNo" />
|
|
|
|
+ <af-table-column label="油品名称" align="center" prop="oilName" />
|
|
|
|
+ <af-table-column label="油品价格" align="center" prop="oilPirce" />
|
|
|
|
+ <af-table-column label="加油升数" align="center" prop="orderLiters" />
|
|
|
|
+ <af-table-column label="应付金额" align="center" prop="receivableAmt" />
|
|
|
|
+ <af-table-column label="实付金额" align="center" prop="amt" />
|
|
|
|
+ <af-table-column label="优惠金额" align="center" prop="discountAmt" />
|
|
|
|
+ <af-table-column label="客户姓名" align="center" prop="consumer" />
|
|
|
|
+ <af-table-column label="加油员" align="center" prop="oilPersonnel" />
|
|
|
|
+ <af-table-column label="加油枪号" align="center" prop="oilGun" />
|
|
|
|
+ <af-table-column
|
|
label="支付类型"
|
|
label="支付类型"
|
|
align="center"
|
|
align="center"
|
|
prop="payType"
|
|
prop="payType"
|
|
|
|
+ width="150px"
|
|
:formatter="payTypeFotmat"
|
|
:formatter="payTypeFotmat"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
|
|
+ <af-table-column
|
|
label="油站名称"
|
|
label="油站名称"
|
|
- width="120"
|
|
|
|
align="center"
|
|
align="center"
|
|
v-if="false"
|
|
v-if="false"
|
|
prop="stationName"
|
|
prop="stationName"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
|
|
+ <af-table-column
|
|
v-if="false"
|
|
v-if="false"
|
|
label="用户id(消费者)"
|
|
label="用户id(消费者)"
|
|
align="center"
|
|
align="center"
|
|
prop="consumerId"
|
|
prop="consumerId"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
|
|
+ <af-table-column
|
|
v-if="false"
|
|
v-if="false"
|
|
label="油站id"
|
|
label="油站id"
|
|
align="center"
|
|
align="center"
|
|
prop="stationId"
|
|
prop="stationId"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
|
|
+ <af-table-column
|
|
label="状态"
|
|
label="状态"
|
|
|
|
+ width="130px"
|
|
align="center"
|
|
align="center"
|
|
prop="status"
|
|
prop="status"
|
|
:formatter="statusFotmat"
|
|
:formatter="statusFotmat"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
|
|
+ <af-table-column
|
|
label="支付方式"
|
|
label="支付方式"
|
|
align="center"
|
|
align="center"
|
|
prop="payWay"
|
|
prop="payWay"
|
|
:formatter="payWayFotmat"
|
|
:formatter="payWayFotmat"
|
|
/>
|
|
/>
|
|
- <el-table-column
|
|
|
|
- label="支付时间"
|
|
|
|
- align="center"
|
|
|
|
- prop="payDate"
|
|
|
|
- width="150"
|
|
|
|
- >
|
|
|
|
|
|
+ <af-table-column label="支付时间" align="center" prop="payDate">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{
|
|
<span>{{
|
|
parseTime(scope.row.payDate, "{y}-{m}-{d} {h}:{i}:{s}")
|
|
parseTime(scope.row.payDate, "{y}-{m}-{d} {h}:{i}:{s}")
|
|
}}</span>
|
|
}}</span>
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="创建时间"
|
|
|
|
- align="center"
|
|
|
|
- prop="createdDate"
|
|
|
|
- width="150"
|
|
|
|
- >
|
|
|
|
|
|
+ </af-table-column>
|
|
|
|
+ <af-table-column label="创建时间" align="center" prop="createdDate">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{
|
|
<span>{{
|
|
parseTime(scope.row.createdDate, "{y}-{m}-{d} {h}:{i}:{s}")
|
|
parseTime(scope.row.createdDate, "{y}-{m}-{d} {h}:{i}:{s}")
|
|
}}</span>
|
|
}}</span>
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
|
|
+ </af-table-column>
|
|
|
|
+ <af-table-column
|
|
label="订单类型"
|
|
label="订单类型"
|
|
align="center"
|
|
align="center"
|
|
prop="orderType"
|
|
prop="orderType"
|
|
@@ -209,6 +183,7 @@
|
|
<script>
|
|
<script>
|
|
import { listOrder, exportOrder } from "@/api/station/order";
|
|
import { listOrder, exportOrder } from "@/api/station/order";
|
|
import { stationinfo } from "@/api/station/gun";
|
|
import { stationinfo } from "@/api/station/gun";
|
|
|
|
+import { listPrice, getPrice } from "@/api/station/price";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Order",
|
|
name: "Order",
|
|
@@ -216,25 +191,15 @@ export default {
|
|
return {
|
|
return {
|
|
//创建订单时间间隔
|
|
//创建订单时间间隔
|
|
dateRangeCreatedDate: [],
|
|
dateRangeCreatedDate: [],
|
|
- // 遮罩层
|
|
|
|
- loading: true,
|
|
|
|
- // 选中数组
|
|
|
|
- ids: [],
|
|
|
|
- // 非单个禁用
|
|
|
|
- single: true,
|
|
|
|
- // 非多个禁用
|
|
|
|
- multiple: true,
|
|
|
|
- // 显示搜索条件
|
|
|
|
- showSearch: true,
|
|
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
// 订单支付表格数据
|
|
// 订单支付表格数据
|
|
orderList: [],
|
|
orderList: [],
|
|
oilNameOptions: [],
|
|
oilNameOptions: [],
|
|
- //字典
|
|
|
|
|
|
+ // 字典
|
|
payTypeOptions: [],
|
|
payTypeOptions: [],
|
|
payWayOptions: [],
|
|
payWayOptions: [],
|
|
- //下拉油站
|
|
|
|
|
|
+ // 下拉油站
|
|
stationOptions: [],
|
|
stationOptions: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
@@ -244,32 +209,15 @@ export default {
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- orderNo: null,
|
|
|
|
oilGun: null,
|
|
oilGun: null,
|
|
oilName: null,
|
|
oilName: null,
|
|
- consumerId: null,
|
|
|
|
- consumer: null,
|
|
|
|
- amt: null,
|
|
|
|
- stationId: null,
|
|
|
|
- status: null,
|
|
|
|
- orderLiters: null,
|
|
|
|
- payType: null,
|
|
|
|
- payWay: null,
|
|
|
|
- stationName: null,
|
|
|
|
- payDate: null,
|
|
|
|
- payMaxDate: null,
|
|
|
|
- payMinDate: null,
|
|
|
|
- createdMaxDate: null,
|
|
|
|
- createdMinDate: null,
|
|
|
|
|
|
+ stationId: this.deptId,
|
|
|
|
+ orderType: 1,
|
|
oilPersonnel: null,
|
|
oilPersonnel: null,
|
|
createdDate: null,
|
|
createdDate: null,
|
|
- orderType: 1,
|
|
|
|
likeConsumer: null,
|
|
likeConsumer: null,
|
|
likeCustomerPhone: null,
|
|
likeCustomerPhone: null,
|
|
- likeCarNo: null,
|
|
|
|
},
|
|
},
|
|
- // 表单参数
|
|
|
|
- form: {},
|
|
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {},
|
|
rules: {},
|
|
};
|
|
};
|
|
@@ -289,6 +237,11 @@ export default {
|
|
this.getDicts("oil_name").then((response) => {
|
|
this.getDicts("oil_name").then((response) => {
|
|
this.oilNameOptions = response.data;
|
|
this.oilNameOptions = response.data;
|
|
});
|
|
});
|
|
|
|
+ listPrice({
|
|
|
|
+ stationId: this.deptId,
|
|
|
|
+ }).then((response) => {
|
|
|
|
+ this.oilNameOptions = response.rows;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
payTypeFotmat(row, column) {
|
|
payTypeFotmat(row, column) {
|
|
@@ -322,68 +275,15 @@ export default {
|
|
return "已支付";
|
|
return "已支付";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //orderTypeFotmat
|
|
|
|
- // orderTypeFotmat(row, column){
|
|
|
|
- // if(row.orderType === '1'){
|
|
|
|
- // return '柴油'
|
|
|
|
- // }else if(row.orderType === '2'){
|
|
|
|
- // return '汽油'
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
-
|
|
|
|
/** 查询订单支付列表 */
|
|
/** 查询订单支付列表 */
|
|
getList() {
|
|
getList() {
|
|
- this.loading = true;
|
|
|
|
- this.queryParams.stationId = this.$store.selectDeptId;
|
|
|
|
- if (
|
|
|
|
- this.queryParams.stationId == null ||
|
|
|
|
- this.queryParams.stationId == ""
|
|
|
|
- ) {
|
|
|
|
- this.queryParams.stationId = this.$store.state.user.deptId;
|
|
|
|
- }
|
|
|
|
listOrder(
|
|
listOrder(
|
|
this.addDateRange(this.queryParams, this.dateRangeCreatedDate)
|
|
this.addDateRange(this.queryParams, this.dateRangeCreatedDate)
|
|
).then((response) => {
|
|
).then((response) => {
|
|
this.orderList = response.rows;
|
|
this.orderList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
- this.loading = false;
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- onInstitutionChang(e) {
|
|
|
|
- let obj = {};
|
|
|
|
- obj = this.stationOptions.find((item) => {
|
|
|
|
- //这里的userList就是上面遍历的数据源
|
|
|
|
- return item.stationId === e; //筛选出匹配数据
|
|
|
|
- });
|
|
|
|
- this.form.stationName = obj.stationName;
|
|
|
|
- },
|
|
|
|
- // 取消按钮
|
|
|
|
- cancel() {
|
|
|
|
- this.open = false;
|
|
|
|
- this.reset();
|
|
|
|
- },
|
|
|
|
- // 表单重置
|
|
|
|
- reset() {
|
|
|
|
- this.form = {
|
|
|
|
- orderId: null,
|
|
|
|
- orderNo: null,
|
|
|
|
- oilGun: null,
|
|
|
|
- oilName: null,
|
|
|
|
- consumerId: null,
|
|
|
|
- consumer: null,
|
|
|
|
- amt: null,
|
|
|
|
- stationId: null,
|
|
|
|
- status: "0",
|
|
|
|
- orderLiters: null,
|
|
|
|
- payType: null,
|
|
|
|
- payWay: null,
|
|
|
|
- payDate: null,
|
|
|
|
- oilPersonnel: null,
|
|
|
|
- createdDate: null,
|
|
|
|
- orderType: null,
|
|
|
|
- };
|
|
|
|
- this.resetForm("form");
|
|
|
|
- },
|
|
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1;
|
|
this.queryParams.pageNum = 1;
|