This commit is contained in:
cun-nan 2024-10-23 10:06:02 +08:00
parent 8d28b9aef5
commit 3a590eb4b3
8 changed files with 251 additions and 140 deletions

View File

@ -8,6 +8,14 @@ export function getListApi(query) {
params: query params: query
}) })
} }
// 分页查询所有的订单信息
export function getList1Api(query) {
return request({
url: 'sysLog/list',
method: 'get',
params: query
})
}
// //
export function deleteApi(ids) { export function deleteApi(ids) {

View File

@ -138,7 +138,7 @@
size="mini" size="mini"
type="text" type="text"
@click="returnRecord(scope.row.id)" @click="returnRecord(scope.row.id)"
>170px</el-button> >归还详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -96,7 +96,7 @@
"> ">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" @click="exportExcelGoodsOrder()">导出订单</el-button> <el-button type="primary" @click="exportExcelGoodsOrder()">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -131,16 +131,16 @@
</el-table-column> </el-table-column>
<el-table-column label="订单状态" align="center" prop="payType"> <el-table-column label="订单状态" align="center" prop="payType">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag> <div v-if="scope.row.status == 'unpaid'" style="color: #F44522">未支付</div>
<el-tag type="success" v-else-if="scope.row.status == 'paid'">支付成功</el-tag> <div v-else-if="scope.row.status == 'paid'" style="color: #0DC291">支付成功</div>
<el-tag type="danger" v-else-if="scope.row.status === 'refund'">退款成功</el-tag> <div v-else-if="scope.row.status === 'refund'" style="color: #F44522">退款成功</div>
<el-tag type="danger" v-else>支付失败</el-tag> <div v-else style="color: #F44522">支付失败</div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="订单类型" align="center" prop="type"/>--> <!-- <el-table-column label="订单类型" align="center" prop="type"/>-->
<el-table-column label="关联员工" align="center" prop="staffId"> <el-table-column label="关联员工" align="center" prop="staffId">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getRealName(staffList,scope.row.staffId) }}</span> <span>{{ getRealName(staffList, scope.row.staffId) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单创建时间" align="center" width="150" prop="payTime"> <el-table-column label="订单创建时间" align="center" width="150" prop="payTime">
@ -153,17 +153,17 @@
<span>{{ parseTime(scope.row.payTime) }}</span> <span>{{ parseTime(scope.row.payTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">--> <!-- <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- <el-button style="width: 60px" size="mini"--> <!-- <el-button style="width: 60px" size="mini"-->
<!-- @click="patchwork(scope.row)"--> <!-- @click="patchwork(scope.row)"-->
<!-- type="primary" plain round>补打</el-button>--> <!-- type="primary" plain round>补打</el-button>-->
<!-- <el-button style="width: 60px" size="mini"--> <!-- <el-button style="width: 60px" size="mini"-->
<!-- v-if = "scope.row.status === 'paid'"--> <!-- v-if = "scope.row.status === 'paid'"-->
<!-- @click="handleRefund(scope.row.id)"--> <!-- @click="handleRefund(scope.row.id)"-->
<!-- type="danger" plain round>退款</el-button>--> <!-- type="danger" plain round>退款</el-button>-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
</div> </div>
@ -200,9 +200,10 @@
</el-radio-group> </el-radio-group>
</div> </div>
<div> <div>
<el-input placeholder="请输入退款原因" v-model="refundRemark" ></el-input> <el-input placeholder="请输入退款原因" v-model="refundRemark"></el-input>
<br/> <br/>
<span style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span> <span
style="color: grey;font-size: 12px">退款仅支持全额退款,退款金额将按照支付信息原路退回优惠券储值卡等原路退回处理</span>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogRefund = false"> </el-button> <el-button @click="dialogRefund = false"> </el-button>
@ -226,26 +227,26 @@
</template> </template>
<script> <script>
import {getGoodsOrder, getOrderGoods, listOrder,orderStatisticsApi} from "@/api/order/goodsorder"; import {getGoodsOrder, getOrderGoods, listOrder, orderStatisticsApi} from "@/api/order/goodsorder";
import { queryStaffs } from "@/api/order/staff"; import {queryStaffs} from "@/api/order/staff";
import { getDicts } from "@/api/order/data"; import {getDicts} from "@/api/order/data";
import { exportExcelGoodsOrderApi } from "@/api/order/exportExcel"; import {exportExcelGoodsOrderApi} from "@/api/order/exportExcel";
import {getOrderInfoApi, refundApi} from "@/api/order/refund"; import {getOrderInfoApi, refundApi} from "@/api/order/refund";
export default { export default {
name: "order_Cashier", name: "order_Cashier",
data(){ data() {
return{ return {
// //
terminalList:[], terminalList: [],
// //
payStatusList:[], payStatusList: [],
// //
staffList:[], staffList: [],
// //
dateRange: [], dateRange: [],
beginTime:"", beginTime: "",
endTime:"", endTime: "",
// //
loading: false, loading: false,
loadingRes: true, loadingRes: true,
@ -259,7 +260,7 @@ export default {
total: 0, total: 0,
// //
list: [], list: [],
goodsList:[], goodsList: [],
// //
open: false, open: false,
// //
@ -269,25 +270,25 @@ export default {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
}, },
orderGoods:'', orderGoods: '',
// //
payList:[], payList: [],
dialogRefund: false, dialogRefund: false,
radio1:"油号选错", radio1: "油号选错",
goods:{}, goods: {},
refundRemark:"", refundRemark: "",
orderStatistics: { orderStatistics: {
numberOfProducts:'0', numberOfProducts: '0',
theTotalAmount:'0', theTotalAmount: '0',
theTotalNumberOfUnits:'0', theTotalNumberOfUnits: '0',
discountAmount:'0', discountAmount: '0',
wechat:'0', wechat: '0',
alipay:'0', alipay: '0',
cash:'0', cash: '0',
}, },
// //
isSysDate:false, isSysDate: false,
} }
}, },
created() { created() {
@ -296,7 +297,7 @@ export default {
start.setMinutes(0) start.setMinutes(0)
start.setSeconds(0) start.setSeconds(0)
start.setMilliseconds(0) start.setMilliseconds(0)
this.dateRange = [start,new Date()]; this.dateRange = [start, new Date()];
this.beginTime = start this.beginTime = start
this.endTime = new Date() this.endTime = new Date()
this.isSysDate = true this.isSysDate = true
@ -305,43 +306,51 @@ export default {
this.getStaffList(); this.getStaffList();
this.getPayList(); this.getPayList();
}, },
methods:{ methods: {
exportExcelGoodsOrder() { exportExcelGoodsOrder() {
this.$confirm('是否导出列表中的数据!', '提示', {
confirmButtonText: '导出',
cancelButtonText: '取消'
}).then(() => {
let dateRange = [] let dateRange = []
if (this.beginTime && this.endTime) { if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString()) dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString()) dateRange.push(this.endTime.toLocaleDateString())
} }
exportExcelGoodsOrderApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ exportExcelGoodsOrderApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
this.$download.saveAs(blob,'商品订单统计.xLsx') this.$download.saveAs(blob, '商品订单统计.xLsx')
}) })
}).catch(() => {
});
}, },
// //
getOrderStatistics (){ getOrderStatistics() {
let dateRange = [] let dateRange = []
if (this.beginTime && this.endTime) { if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString()) dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString()) dateRange.push(this.endTime.toLocaleDateString())
} }
orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{ orderStatisticsApi(this.addDateRange(this.queryParams, dateRange)).then(res => {
this.orderStatistics = res.data; this.orderStatistics = res.data;
}) })
}, },
// //
patchwork(data){ patchwork(data) {
const orderNo = data.orderNo const orderNo = data.orderNo
this.$modal.confirm('确定您要补打当前订单吗?当前订单号[' + orderNo + '],请确保云打印机正在运行中').then(function() { this.$modal.confirm('确定您要补打当前订单吗?当前订单号[' + orderNo + '],请确保云打印机正在运行中').then(function () {
// return delUser(row.id); // return delUser(row.id);
}).then(() => { }).then(() => {
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果"); this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
}).catch(() => {}); }).catch(() => {
});
}, },
// 退 // 退
async handleRefund(id){ async handleRefund(id) {
await getGoodsOrder({"id":id}).then( response => { await getGoodsOrder({"id": id}).then(response => {
this.goods = response.data this.goods = response.data
if (response.data.status === "refund") { if (response.data.status === "refund") {
this.$message({ this.$message({
@ -354,8 +363,10 @@ export default {
let title = '是否将该收银台下的订单全部退款' let title = '是否将该收银台下的订单全部退款'
await getOrderInfoApi({orderNo: this.goods.orderNo, await getOrderInfoApi({
type: 'goods'}).then(res=>{ orderNo: this.goods.orderNo,
type: 'goods'
}).then(res => {
if (res.code === 200) { if (res.code === 200) {
if (res.data.type === "1") { if (res.data.type === "1") {
title = '该订单下有其它商品订单,是否一并退款' title = '该订单下有其它商品订单,是否一并退款'
@ -364,7 +375,7 @@ export default {
} }
}); });
this.$confirm(title+', 是否继续?', '提示', { this.$confirm(title + ', 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
@ -383,14 +394,14 @@ export default {
async refundConfirmed() { async refundConfirmed() {
this.dialogRefund = false; this.dialogRefund = false;
this.loadingRes = true; this.loadingRes = true;
console.log("cashierOrder",this.goods) console.log("cashierOrder", this.goods)
let map={ let map = {
orderNo: this.goods.orderNo, orderNo: this.goods.orderNo,
storeId: this.goods.storeId, storeId: this.goods.storeId,
refundRemark:this.radio1 +"-"+ this.refundRemark, refundRemark: this.radio1 + "-" + this.refundRemark,
type: "canRefund" type: "canRefund"
} }
await refundApi(map).then(res=>{ await refundApi(map).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message({ this.$message({
type: 'info', type: 'info',
@ -403,63 +414,63 @@ export default {
}, },
// id // id
queryStaf(list,id){ queryStaf(list, id) {
let name = ""; let name = "";
list.forEach(item => { list.forEach(item => {
if (item.id == id){ if (item.id == id) {
name = `${item.realName}(${item.mobile})` name = `${item.realName}(${item.mobile})`
} }
}) })
return name; return name;
}, },
getVal(list,val){ getVal(list, val) {
let name = ""; let name = "";
list.forEach(item => { list.forEach(item => {
if (item.dictValue == val){ if (item.dictValue == val) {
name = item.dictLabel name = item.dictLabel
} }
}) })
return name; return name;
}, },
// //
getPayList(){ getPayList() {
getDicts("payment_type").then( response => { getDicts("payment_type").then(response => {
this.payList = response.data; this.payList = response.data;
}) })
getDicts("terminal").then( response => { getDicts("terminal").then(response => {
this.terminalList = response.data; this.terminalList = response.data;
}) })
getDicts("pay_status").then( response => { getDicts("pay_status").then(response => {
this.payStatusList = response.data; this.payStatusList = response.data;
}) })
}, },
// //
getGoods(id){ getGoods(id) {
getOrderGoods({orderId:id}).then( response => { getOrderGoods({orderId: id}).then(response => {
this.goodsList = response.data this.goodsList = response.data
this.open = true; this.open = true;
this.title = "商品详情" this.title = "商品详情"
}) })
}, },
// //
getRealName(list,id){ getRealName(list, id) {
var name = ""; var name = "";
list.forEach(item => { list.forEach(item => {
if (item.id == id){ if (item.id == id) {
name = item.realName; name = item.realName;
} }
}) })
return name; return name;
}, },
// //
getStaffList(){ getStaffList() {
queryStaffs().then( response => { queryStaffs().then(response => {
this.staffList = response.data; this.staffList = response.data;
}) })
}, },
// //
getList(val){ getList(val) {
if (val!=undefined){ if (val != undefined) {
this.queryParams.page = val this.queryParams.page = val
} }
@ -478,7 +489,7 @@ export default {
} }
this.loading = true; this.loading = true;
listOrder(this.addDateRange(this.queryParams, dateRange)).then( response => { listOrder(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.list = response.data.records; this.list = response.data.records;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
@ -526,34 +537,39 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.app-container{ .app-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f6f8f9; background: #f6f8f9;
} }
.app-top{
.app-top {
width: 100%; width: 100%;
height: 60px; height: 60px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; padding: 10px;
} }
.clearfix{
.clearfix {
width: 100%; width: 100%;
} }
.box-card{
.box-card {
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
} }
.box-gang{
.box-gang {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
} }
.box{
.box {
//box-sizing: border-box; //box-sizing: border-box;
padding: 5px; padding: 5px;
//background: #f9f9f9; //background: #f9f9f9;
@ -563,15 +579,17 @@ export default {
width: 211px; width: 211px;
height: 60px; height: 60px;
background: rgba(64,158,255,0.05); background: rgba(64, 158, 255, 0.05);
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
border: 1px solid #fe8c4a; border: 1px solid #fe8c4a;
} }
.el-form--inline .el-form-item { .el-form--inline .el-form-item {
margin-right: 44px; margin-right: 44px;
} }
.size-hui{
.size-hui {
display: flex; display: flex;
align-items: center; align-items: center;
//width: 200px; //width: 200px;
@ -583,11 +601,13 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
.nei { .nei {
width: 150px; width: 150px;
} }
} }
.size-bole{
.size-bole {
//font-weight: bold; //font-weight: bold;
//width: 53px; //width: 53px;
@ -601,7 +621,8 @@ export default {
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
} }
.wgang{
.wgang {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
@ -609,33 +630,40 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
} }
.table-box{
.table-box {
width: 100%; width: 100%;
height: 70vh;
overflow: auto;
} }
.pagination-box{
.pagination-box {
width: 100%; width: 100%;
margin: 10px auto; margin: 10px auto;
display: flex; display: flex;
align-items: center; align-items: end;
justify-content: center; justify-content: end;
} }
.top-app-sou{
.top-app-sou {
width: 20%; width: 20%;
} }
.icon-img{ .icon-img {
//margin-left: 110px; //margin-left: 110px;
width: 100%; width: 100%;
height: 20px; height: 20px;
margin-right: 5px; margin-right: 5px;
img{
img {
float: right; float: right;
//width: 100%; //width: 100%;
width: 20px; width: 20px;
height: 100%; height: 100%;
} }
} }
.box1{
.box1 {
//box-sizing: border-box; //box-sizing: border-box;
padding: 5px; padding: 5px;
//background: #f9f9f9; //background: #f9f9f9;
@ -645,7 +673,7 @@ export default {
width: 211px; width: 211px;
height: 60px; height: 60px;
background: rgba(255,150,85,0.05); background: rgba(255, 150, 85, 0.05);
border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px;
border: 1px solid #FF9655; border: 1px solid #FF9655;
} }

View File

@ -21,19 +21,33 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="oilGunNum">
<el-select
v-model="queryParams.oils"
filterable
clearable
placeholder="请选择油品油号"
>
<el-option v-for="item in oilTypeList"
:key="item.oilId"
:label="item.oilName"
:value="item.oilId">
<span style="float: left">{{ item.oilType }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.oilName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="oilGunNum"> <el-form-item label="" prop="oilGunNum">
<el-select <el-select
v-model="queryParams.oilGunNum" v-model="queryParams.oilGunNum"
filterable filterable
clearable clearable
placeholder="请选择油号油枪" placeholder="请选择油枪"
> >
<el-option v-for="item in oilGunList" <el-option v-for="item in oilGunList"
:key="item.id" :key="item.id"
:label="item.gunName" :label="item.gunName"
:value="item.id"> :value="item.id">
<span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -49,8 +63,6 @@
:label="item.dictLabel" :label="item.dictLabel"
:value="item.dictValue"> :value="item.dictValue">
</el-option> </el-option>
<el-option label="囤油卡" value="oilCard"/>
<el-option label="储值卡" value="balance"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="staffId"> <el-form-item label="" prop="staffId">
@ -138,17 +150,14 @@
<el-table-column prop="payType" label="付款方式" align="center"> <el-table-column prop="payType" label="付款方式" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{getType(payList,scope.row.payType)}}</span> <span>{{getType(payList,scope.row.payType)}}</span>
<span v-if="scope.row.payType=='oilCard'">囤油卡</span>
<span v-if="scope.row.payType=='balance'">储值卡</span>
<span v-if="scope.row.payType=='credit'">挂账</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="订单状态" align="center"> <el-table-column prop="orderStatus" label="订单状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.orderStatus === 'unpaid'">未支付</el-tag> <div v-if="scope.row.orderStatus === 'unpaid'" style="color: #F44522">未支付</div>
<el-tag type="success" v-else-if="scope.row.orderStatus === 'paid'">已支付</el-tag> <div v-else-if="scope.row.orderStatus === 'paid'" style="color: #0DC291">支付成功</div>
<el-tag type="danger" v-else-if="scope.row.orderStatus === 'refund'">已退款</el-tag> <div v-else-if="scope.row.orderStatus === 'refund'" style="color: #F44522">已退款</div>
<el-tag type="danger" v-else>支付失败</el-tag> <div v-else style="color: #F44522">支付失败</div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="orderType" label="订单类型" align="center" > </el-table-column>--> <!-- <el-table-column prop="orderType" label="订单类型" align="center" > </el-table-column>-->
@ -270,7 +279,7 @@
<script> <script>
import {queryStaffs} from "@/api/order/staff"; import {queryStaffs} from "@/api/order/staff";
import {getDicts} from "@/api/order/data"; import {getDicts} from "@/api/order/data";
import {getOilNameList, getOilNumGun, oilNumbers} from "@/api/order/oilnumgun"; import {getOilNameList, getOilNumGun, oilNumberList1, oilNumbers} from "@/api/order/oilnumgun";
import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/order/oilorder"; import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/order/oilorder";
import {getUser, queryUsers} from "@/api/order/user"; import {getUser, queryUsers} from "@/api/order/user";
import {exportExcelOilOrderApi} from "@/api/order/exportExcel"; import {exportExcelOilOrderApi} from "@/api/order/exportExcel";
@ -314,6 +323,8 @@
pageSize: 10, pageSize: 10,
}, },
total:0, total:0,
//
oilTypeList:[],
// //
oilGunList:[], oilGunList:[],
// //
@ -432,6 +443,10 @@
}, },
exportExcelOilOrder() { exportExcelOilOrder() {
this.$confirm('是否导出列表中的数据!', '提示', {
confirmButtonText: '导出',
cancelButtonText: '取消'
}).then(() => {
let dateRange = [] let dateRange = []
if (this.beginTime && this.endTime) { if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString()) dateRange.push(this.beginTime.toLocaleDateString())
@ -441,6 +456,10 @@
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
this.$download.saveAs(blob,'油品订单统计.xLsx') this.$download.saveAs(blob,'油品订单统计.xLsx')
}) })
}).catch(() => {
});
}, },
@ -462,6 +481,10 @@
} }
}) })
}) })
//
oilNumberList1().then(res => {
this.oilTypeList = res.data.records
})
}, },
getPayType(){ getPayType(){
getDicts("payment_type").then(res => { getDicts("payment_type").then(res => {
@ -758,13 +781,15 @@
} }
.table-box{ .table-box{
width: 100%; width: 100%;
height: 70vh;
overflow: auto;
} }
.pagination-box{ .pagination-box{
width: 100%; width: 100%;
margin: 10px auto; margin: 10px auto;
display: flex; display: flex;
align-items: center; align-items: end;
justify-content: center; justify-content: end;
} }
.top-app-sou{ .top-app-sou{
width: 20%; width: 20%;

View File

@ -44,6 +44,7 @@
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['setting:banner:add']"
>新增banner图</el-button> >新增banner图</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -32,12 +32,13 @@
<el-form-item label="" prop="systemName"> <el-form-item label="" prop="systemName">
<el-select <el-select
v-model="queryParams.systemName" v-model="systemName"
placeholder="请选择系统终端" placeholder="请选择系统终端"
clearable clearable
@change="chooseSystemName"
style="width: 240px" style="width: 240px"
> >
<el-option label="中台端" value="1"></el-option> <!-- <el-option label=" " value="1"></el-option>-->
<el-option label="油站端" value="2"></el-option> <el-option label="油站端" value="2"></el-option>
<el-option label="收银端" value="3"></el-option> <el-option label="收银端" value="3"></el-option>
</el-select> </el-select>
@ -153,7 +154,7 @@
<script> <script>
import {deleteApi, getListApi, saveApi, updateApi} from "../../api/sys/sysLog"; import {deleteApi, getList1Api, getListApi, saveApi, updateApi} from "../../api/sys/sysLog";
import {getToken} from '../../utils/auth' import {getToken} from '../../utils/auth'
import {selectChildByDeptId} from "../../api/system/Site/site"; import {selectChildByDeptId} from "../../api/system/Site/site";
@ -194,7 +195,9 @@ export default {
bannerName: '', bannerName: '',
systemPosition: '', systemPosition: '',
bannerStatus: '', bannerStatus: '',
systemName: '1'
}, },
systemName:"",
// //
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload', uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
@ -234,6 +237,9 @@ export default {
this.selectChildByDeptIdApi() this.selectChildByDeptIdApi()
}, },
methods: { methods: {
chooseSystemName(){
this.queryParams.systemName = this.systemName
},
selectChildByDeptIdApi() { selectChildByDeptIdApi() {
selectChildByDeptId().then(res => { selectChildByDeptId().then(res => {
this.deptListSelect = res.data this.deptListSelect = res.data
@ -270,7 +276,7 @@ export default {
}, },
getList() { getList() {
this.queryParams.current = this.queryParams.page this.queryParams.current = this.queryParams.page
getListApi(this.queryParams).then(res => { getList1Api(this.queryParams).then(res => {
this.tableData = res.data.records; this.tableData = res.data.records;
this.total = res.data.total this.total = res.data.total
}) })
@ -331,7 +337,9 @@ export default {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
deviceName: '', deviceName: '',
}, systemName: "1"
}
this.systemName = ""
this.getList() this.getList()
}, },
handleAdd(e) { handleAdd(e) {

View File

@ -18,6 +18,9 @@
<if test="order.terminal != null and order.terminal != ''"> <if test="order.terminal != null and order.terminal != ''">
and terminal = #{order.terminal} and terminal = #{order.terminal}
</if> </if>
<if test="order.oils != null and order.oils != ''">
and oils = #{order.oils}
</if>
<if test="order.oilGunNum != null and order.oilGunNum != ''"> <if test="order.oilGunNum != null and order.oilGunNum != ''">
and oil_gun_num = #{order.oilGunNum} and oil_gun_num = #{order.oilGunNum}
</if> </if>

View File

@ -68,6 +68,44 @@ public class SysLogController extends BaseController {
return getSuccessResult(this.sysLogService.page(page, sysLogLambdaQueryWrapper)); return getSuccessResult(this.sysLogService.page(page, sysLogLambdaQueryWrapper));
} }
/**
* 分页查询所有数据油站端
*
* @param page 分页对象
* @param sysLog 查询实体
* @return 所有数据
*/
@GetMapping("list")
public ResponseObject selectAll1(@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, SysLog sysLog) {
LambdaQueryWrapper<SysLog> sysLogLambdaQueryWrapper = new LambdaQueryWrapper();
Page page =new Page(pageNo,pageSize);
if (!StringUtils.isEmpty(sysLog.getCreateName())){
sysLogLambdaQueryWrapper.like(SysLog::getCreateName,sysLog.getCreateName());
}
if (!StringUtils.isEmpty(sysLog.getDeptId())){
sysLogLambdaQueryWrapper.eq(SysLog::getDeptId,sysLog.getDeptId());
}
if (!StringUtils.isEmpty(sysLog.getMoudle())){
sysLogLambdaQueryWrapper.like(SysLog::getMoudle,sysLog.getMoudle());
}
if (!StringUtils.isEmpty(sysLog.getSystemName())){
if (sysLog.getSystemName().equals("1")){
sysLogLambdaQueryWrapper.ne(SysLog::getSystemName,sysLog.getSystemName());
}else {
sysLogLambdaQueryWrapper.eq(SysLog::getSystemName,sysLog.getSystemName());
}
}
if (!ObjectUtils.isEmpty(sysLog.getStartTime())){
sysLogLambdaQueryWrapper.ge(SysLog::getCreateTime,sysLog.getStartTime());
}
if (!ObjectUtils.isEmpty(sysLog.getEndTime())){
sysLogLambdaQueryWrapper.le(SysLog::getCreateTime, DateUtil.format(sysLog.getEndTime(),"yyyy-MM-dd")+" 23:59:59");
}
sysLogLambdaQueryWrapper.orderByDesc(SysLog::getCreateTime);
return getSuccessResult(this.sysLogService.page(page, sysLogLambdaQueryWrapper));
}
/** /**
* 通过主键查询单条数据 * 通过主键查询单条数据
* *