This commit is contained in:
cun-nan 2024-01-12 17:03:22 +08:00
parent 66585d6d2c
commit db6d7f9c85
11 changed files with 172 additions and 78 deletions

View File

@ -115,5 +115,14 @@ public class OilGunController extends BaseController {
public ResponseObject queryGunList(@PathVariable Integer numberId){ public ResponseObject queryGunList(@PathVariable Integer numberId){
return getSuccessResult(oilGunService.selectOilGunByNumberId(numberId)); return getSuccessResult(oilGunService.selectOilGunByNumberId(numberId));
} }
/**
* 查询当前店铺所有油枪列表信息
* @return
*/
@GetMapping("/queryOilGunList")
public ResponseObject selectGunList(){
return getSuccessResult(oilGunService.selectOilGuns());
}
} }

View File

@ -129,6 +129,15 @@ public class OilNumberController extends BaseController {
return getSuccessResult(oilPresetPricesService.selectOilNumberNameByStoreId(storeId)); return getSuccessResult(oilPresetPricesService.selectOilNumberNameByStoreId(storeId));
} }
/**
* 根据店铺id查询油号信息
* @return
*/
@GetMapping("/getOilNumber")
public ResponseObject queryOilNumbers(){
return getSuccessResult(oilPresetPricesService.selectOilNumberNameByStoreId(null));
}
} }

View File

@ -67,4 +67,10 @@ public interface OilGunService {
* @return * @return
*/ */
List<OilGun> selectOilGunByNumberId(Integer numberId); List<OilGun> selectOilGunByNumberId(Integer numberId);
/**
* 根据油号id查询油枪列表信息
* @return
*/
List<OilGun> selectOilGuns();
} }

View File

@ -140,7 +140,17 @@ public class OilGunServiceImpl implements OilGunService {
public List<OilGun> selectOilGunByNumberId(Integer numberId) { public List<OilGun> selectOilGunByNumberId(Integer numberId) {
QueryWrapper queryWrapper = new QueryWrapper(); QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("number_id",numberId); queryWrapper.eq("number_id",numberId);
queryWrapper.eq("status","启用");
List<OilGun> list = oilGunDao.selectList(queryWrapper); List<OilGun> list = oilGunDao.selectList(queryWrapper);
return list; return list;
} }
@Override
public List<OilGun> selectOilGuns() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
queryWrapper.eq("status","启用");
return oilGunDao.selectList(queryWrapper);
}
} }

View File

@ -96,6 +96,10 @@ public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber
@Override @Override
public List<OilNumberNameVo> selectOilNumberNameByStoreId(Integer storeId) { public List<OilNumberNameVo> selectOilNumberNameByStoreId(Integer storeId) {
if (storeId==null){
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
storeId = nowAccountInfo.getStoreId();
}
return baseMapper.selectOilNumberNameByStoreId(storeId); return baseMapper.selectOilNumberNameByStoreId(storeId);
} }

View File

@ -16,3 +16,27 @@ export function getOilTank(id) {
method: 'get', method: 'get',
}) })
} }
// 查询油罐信息
export function getOilGunInfo(numberId) {
return request({
url: '/business/petrolStationManagement/oilGun/queryGunList/'+numberId,
method: 'get',
})
}
// 查询油罐信息
export function getOilGuns() {
return request({
url: '/business/petrolStationManagement/oilGun/queryOilGunList',
method: 'get',
})
}
// 查询油罐信息
export function getOilNumberGun() {
return request({
url: '/business/petrolStationManagement/oilGun/selectByNumberTGUn',
method: 'get',
})
}

View File

@ -17,3 +17,13 @@ export function oilNumberList() {
// data: data // data: data
}) })
} }
// 查询所有油号
export function oilNumbers() {
return request({
url: '/business/petrolStationManagement/oilNumber/getOilNumber',
method: 'get',
// data: data
})
}

View File

@ -2557,7 +2557,7 @@
this.gunList.forEach(item => { this.gunList.forEach(item => {
if (item.id==data.id){ if (item.id==data.id){
this.form.id = item.id this.form.id = item.id
this.form.gunName = item.gunName this.form.gunName = item.id
} }
}) })
}) })

View File

@ -94,28 +94,22 @@
</el-table-column> </el-table-column>
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column> <el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
<el-table-column prop="amount" label="订单金额"> </el-table-column> <el-table-column prop="amount" label="订单金额"> </el-table-column>
<el-table-column <el-table-column prop="payAmount" label="实付金额"> </el-table-column>
prop="payAmount"
label="实付金额">
</el-table-column>
<el-table-column label="订单金额组成"> <el-table-column label="订单金额组成">
<el-table-column <el-table-column prop="oilOrderAmount" label="油品金额">
prop="oilOrderAmount" <template slot-scope="scope">
label="油品金额"> <span>{{scope.row.oilOrderAmount ? scope.row.oilOrderAmount : '0'}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="goodsOrderAmount" label="商品金额">
prop="goodsOrderAmount" <template slot-scope="scope">
label="商品金额"> <span>{{scope.row.goodsOrderAmount ? scope.row.goodsOrderAmount : '0'}}</span>
</template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="payUser" label="付款用户"> </el-table-column>
prop="payUser" <el-table-column prop="status" label="状态">
label="付款用户">
</el-table-column>
<el-table-column
prop="status"
label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag> <el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag> <el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>

View File

@ -45,7 +45,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input v-model="queryParams.payUser" placeholder="请输入手机号"></el-input> <el-input v-model="queryParams.payUser" clearable placeholder="请输入手机号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="油枪号" prop="oilGunNum"> <el-form-item label="油枪号" prop="oilGunNum">
<el-select <el-select
@ -54,17 +54,17 @@
clearable clearable
placeholder="全部" placeholder="全部"
> >
<el-option v-for="item in oilNumList" <el-option v-for="item in oilGunList"
:key="item.id" :key="item.id"
:label="item.oilGunNum" :label="item.gunName"
:value="item.id"> :value="item.id">
<span style="float: left">{{ getName(oilNameList,item.oilName) }}</span> <span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.oilGunNum }}号枪</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>
<el-form-item label="订单号"> <el-form-item label="订单号">
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input> <el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="交易时间"> <el-form-item label="交易时间">
<el-date-picker <el-date-picker
@ -166,55 +166,26 @@
<span>{{ getVal(terminalList,props.row.terminal) }}</span> <span>{{ getVal(terminalList,props.row.terminal) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
prop="orderNo"
label="订单号"
width="200">
</el-table-column>
<el-table-column label="订单信息" align="center"> <el-table-column label="订单信息" align="center">
<el-table-column <el-table-column prop="oilGunNum" label="油品/油枪" align="center" width="120">
prop="oilGunNum"
label="油品/油枪" align="center"
width="120">
<template slot-scope="props"> <template slot-scope="props">
<span>{{ getName(oilNameList,props.row.oils) }}/{{ props.row.oilGunNum }}</span> <span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="orderAmount" label="订单金额" align="center" width="120"> </el-table-column>
prop="orderAmount" <el-table-column prop="discountAmount" label="优惠金额" align="center" width="120"> </el-table-column>
label="订单金额" align="center"
width="120">
</el-table-column>
<el-table-column
prop="discountAmount"
label="优惠金额" align="center"
width="120">
</el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="付款信息" align="center"> <el-table-column label="付款信息" align="center">
<el-table-column <el-table-column prop="payAmount" label="实付金额" align="center" width="120"> </el-table-column>
prop="payAmount" <el-table-column prop="payUser" label="付款用户" align="center" > </el-table-column>
label="实付金额" align="center" <el-table-column prop="payType" label="付款方式" align="center" width="120">
width="120">
</el-table-column>
<el-table-column
prop="payUser"
label="付款用户" align="center"
width="120">
</el-table-column>
<el-table-column
prop="payType"
label="付款方式" align="center"
width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{getType(payList,scope.row.payType)}}</span> <span>{{getType(payList,scope.row.payType)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
prop="orderStatus"
label="付款状态" align="center"
width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag> <el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.orderStatus == 'paid'">已支付</el-tag> <el-tag type="success" v-else-if="scope.row.orderStatus == 'paid'">已支付</el-tag>
@ -222,11 +193,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
prop="invoicing"
label="开票标识" align="center"
width="220">
</el-table-column>
<el-table-column label="交易时间" align="center" width="160" prop="payTime"> <el-table-column label="交易时间" align="center" width="160" prop="payTime">
<template slot-scope="scope"> <template slot-scope="scope">
@ -296,6 +263,8 @@
import {getOilNameList, getOilNumGun } from "@/api/cashier/oilnumgun"; import {getOilNameList, getOilNumGun } from "@/api/cashier/oilnumgun";
import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/cashier/oilorder"; import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/cashier/oilorder";
import {getUser} from "@/api/cashier/user/user"; import {getUser} from "@/api/cashier/user/user";
import {oilNumberList, oilNumbers} from "@/api/cashier/oilnumber";
import {getOilGuns, getOilNumberGun} from "@/api/cashier/oilGuns";
export default { export default {
name: "order_Cashier", name: "order_Cashier",
@ -327,6 +296,8 @@
pageSize: 10, pageSize: 10,
}, },
total:0, total:0,
//
oilGunList:[],
orderStatistics: { orderStatistics: {
numberOfOilPens:'0', numberOfOilPens:'0',
@ -345,13 +316,27 @@
this.getOrderStatistics(); this.getOrderStatistics();
this.getList(); this.getList();
this.getPayType(); this.getPayType();
this.getOilGunList();
}, },
methods:{ methods:{
//
getOilGunList(){
getOilNumberGun().then(res => {
console.log(res)
res.data.forEach(item => {
if (item.oilGunList.length>0){
item.oilGunList.forEach(i => {
i.oilName = item.oilName
this.oilGunList.push(i)
})
}
})
})
},
getPayType(){ getPayType(){
getDicts("payment_type").then(res => { getDicts("payment_type").then(res => {
this.payTypeList = res.data this.payTypeList = res.data
}) })
}, },
// //
getOrderStatistics() { getOrderStatistics() {
@ -452,8 +437,8 @@
getOilNameList().then( response => { getOilNameList().then( response => {
this.oilNameList = response.data; this.oilNameList = response.data;
}) })
getOilNumGun({oilNum : "全部"}).then( response => { oilNumbers().then(response => {
this.oilNumList = response.data this.oilNumList = response.data;
}) })
}, },
// //
@ -470,6 +455,19 @@
} }
return name; return name;
}, },
//
getName1(oilNameList,id){
let name = ""
let _this = this;
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.gunName;
}
})
}
return name;
},
} }
} }
</script> </script>

View File

@ -41,7 +41,7 @@
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input v-model="queryParams.payUser" placeholder="请输入手机号"></el-input> <el-input v-model="queryParams.payUser" clearable placeholder="请输入手机号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="油枪号" prop="oilGunNum"> <el-form-item label="油枪号" prop="oilGunNum">
<el-select <el-select
@ -50,17 +50,17 @@
clearable clearable
placeholder="全部" placeholder="全部"
> >
<el-option v-for="item in oilNumList" <el-option v-for="item in oilGunList"
:key="item.id" :key="item.id"
:label="item.oilGunNum" :label="item.gunName"
:value="item.id"> :value="item.id">
<span style="float: left">{{ getName(oilNameList,item.oilName) }}</span> <span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.oilGunNum }}号枪</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>
<el-form-item label="订单号"> <el-form-item label="订单号">
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input> <el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="交易时间">--> <!-- <el-form-item label="交易时间">-->
<!-- <el-date-picker--> <!-- <el-date-picker-->
@ -148,7 +148,7 @@
<el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column> <el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column>
<el-table-column prop="oils" label="油品/油枪" align="center"> <el-table-column prop="oils" label="油品/油枪" align="center">
<template slot-scope="props"> <template slot-scope="props">
<span>{{ getName(oilNameList,props.row.oils) }}/{{ props.row.oilGunNum }}号枪</span> <span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单信息" align="center"> <el-table-column label="订单信息" align="center">
@ -209,6 +209,7 @@
import {getDicts} from "@/api/dict/data"; import {getDicts} from "@/api/dict/data";
import {getOilNameList, getOilNumGun} from "@/api/cashier/oilnumgun"; import {getOilNameList, getOilNumGun} from "@/api/cashier/oilnumgun";
import {queryStaffs} from "@/api/cashier/staff"; import {queryStaffs} from "@/api/cashier/staff";
import {getOilNumberGun} from "@/api/cashier/oilGuns";
export default { export default {
name: "order_Cashier", name: "order_Cashier",
@ -249,15 +250,44 @@
wechat:'0', wechat:'0',
alipay:'0', alipay:'0',
cash:'0', cash:'0',
} },
oilGunList:[],
} }
}, },
created() { created() {
this.getList(); this.getList();
this.getOrderStatistics(); this.getOrderStatistics();
this.getPayList(); this.getPayList();
this.getOilGunList();
}, },
methods:{ methods:{
//
getOilGunList(){
getOilNumberGun().then(res => {
console.log(res)
res.data.forEach(item => {
if (item.oilGunList.length>0){
item.oilGunList.forEach(i => {
i.oilName = item.oilName
this.oilGunList.push(i)
})
}
})
})
},
//
getName1(oilNameList,id){
let name = ""
let _this = this;
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.gunName;
}
})
}
return name;
},
// //
getOrderStatistics() { getOrderStatistics() {