This commit is contained in:
cun-nan 2024-01-15 18:17:40 +08:00
parent 8ca3554f0c
commit 298977bb25
14 changed files with 306 additions and 42 deletions

View File

@ -41,3 +41,20 @@ export function delGunApi(data) {
params: data
})
}
// 查询油罐信息
export function getOilNumberGun() {
return request({
url: '/business/petrolStationManagement/oilGun/selectByNumberTGUn',
method: 'get',
})
}
// 查询所有油号
export function oilNumbers() {
return request({
url: '/business/petrolStationManagement/oilNumber/getOilNumber',
method: 'get',
// data: data
})
}

View File

@ -19,7 +19,11 @@
</el-table-column>
<el-table-column align="center" prop="fullDeduction" label="满减金额"/>
<el-table-column align="center" prop="discountAmount" label="券面额"/>
<el-table-column align="center" prop="oilType" label="适用油品"/>
<el-table-column align="center" prop="oilType" label="适用油品">
<template slot-scope="scope">
<span>{{ getOilNames(oilNameList,scope.row.oilType) }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="status" label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 0">未使用</el-tag>
@ -52,6 +56,7 @@
<script>
import { getCardFavorableList } from "@/api/userInfoOrder.js";
import {oilNumbers} from "@/api/oilConfig/oilGuns";
export default {
props:["pUserId"],
@ -66,7 +71,8 @@ export default {
status: 0,
page:1,
pageSize:10,
}
},
oilNameList:[],
}
},
created() {
@ -74,9 +80,35 @@ export default {
this.userId = this.$route.query.id;
this.getList()
this.getOilName()
},
methods:{
getOilNames(list,oilIds){
let name = "";
let oilNames = []
let oilId = oilIds.split(",")
list.forEach(item => {
oilId.forEach(i => {
if (item.oilName == i){
oilNames.push(item.oilNames)
}
})
})
let arr = []
for (let i = 0;i<oilNames.length;i++){
if (arr.indexOf(oilNames[i])==-1){
arr.push(oilNames[i])
name += oilNames[i]+","
}
}
return name;
},
getOilName(){
oilNumbers().then(res => {
console.log(res)
this.oilNameList = res.data
})
},
getList(){
this.loading = true

View File

@ -1,7 +1,11 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="storeName" align="center"/>
<el-table-column label="所属油站" prop="storeName" align="center">
<template slot-scope="scope">
<span>{{store.name}}</span>
</template>
</el-table-column>
<el-table-column label="订单时间" prop="createTime" align="center"/>
<el-table-column label="订单金额" align="center" prop="amount"/>
<el-table-column label="商品数量" align="center" prop="goodsNum" />
@ -31,6 +35,8 @@
<script>
import { getMtOrderList } from "@/api/userInfoOrder.js";
import {listOrder} from "@/api/order/order";
import {ljStoreInfo} from "@/api/staff/store";
export default {
props:["pUserId"],
@ -43,7 +49,9 @@ export default {
queryParams:{
page:1,
pageSize:10,
}
userId:this.pUserId,
},
store:{},
}
},
created() {
@ -51,12 +59,19 @@ export default {
this.userId = this.$route.query.id;
this.getList()
this.getStoreInfo()
},
methods:{
//
getStoreInfo(){
ljStoreInfo().then(res => {
this.store = res.data
})
},
getList(){
this.loading = true
this.queryParams.userId = this.userId
getMtOrderList(this.queryParams).then(res=>{
listOrder(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total

View File

@ -7,12 +7,12 @@
<template slot-scope="scope">
<span v-if="scope.row.terminal == 'applet'">小程序</span>
<span v-else>{{ scope.row.terminal }}</span>
</template>
</el-table-column>
<el-table-column label="油品/油枪" align="center" prop="name" >
<template slot-scope="scope">
{{ scope.row.oilGunNum }}/{{ scope.row.oilName }}
{{ scope.row.oilName }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}
</template>
</el-table-column>
@ -21,11 +21,11 @@
<el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope">
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
<span v-else>{{ scope.row.payType }}</span>
<!-- <span v-if="scope.row.payType == 'CASH'">现金支付</span>-->
<!-- <span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>-->
<!-- <span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>-->
<!-- <span v-else>{{ scope.row.payType }}</span>-->
<dict-tag :options="dict.type.payment_type" :value="scope.row.payType"/>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
@ -43,9 +43,11 @@
<script>
import { getOilOrderList } from "@/api/userInfoOrder.js";
import {getOilNumberGun} from "@/api/oilConfig/oilGuns";
export default {
props:["pUserId"],
dicts: ['payment_type'],
data(){
return {
userId:"",
@ -55,7 +57,9 @@ export default {
queryParams:{
page:1,
pageSize:10,
}
},
//
oilGunList:[],
}
},
created() {
@ -63,8 +67,34 @@ export default {
this.userId = this.$route.query.id;
this.getList()
this.getOilGunList();
},
methods:{
//
getOilGunList(){
getOilNumberGun().then(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 = ""
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.gunName;
}
})
}
return name;
},
getList(){
this.loading = true
this.queryParams.userId = this.userId

View File

@ -48,7 +48,7 @@
<if test="cardFavorableRecord.mtUserId != null">
and cfr.mt_user_id = #{cardFavorableRecord.mtUserId}
</if>
<if test="cardFavorableRecord.status != null">
<if test="cardFavorableRecord.status != null and cardFavorableRecord.status != ''">
and cfr.status = #{cardFavorableRecord.status}
</if>
</where>

View File

@ -12,6 +12,9 @@
<if test="order.staffId != null and order.staffId != ''">
and staff_id = #{order.staffId}
</if>
<if test="order.userId != null and order.userId != ''">
and user_id = #{order.userId}
</if>
<if test="order.payType != null and order.payType != ''">
and pay_type = #{order.payType}
</if>

View File

@ -105,6 +105,7 @@
<if test="order.storeId != null">
and store_id = #{order.storeId}
</if>
order by pay_time desc
</where>
</select>

View File

@ -62,7 +62,7 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
// 经度
Double lon = Double.valueOf(map.get("lon"));
Double lat = Double.valueOf(map.get("lat"));
Integer storeId = Integer.valueOf(map.get("storeId"));
String storeId = map.get("storeId");
LJStore ljStore = new LJStore();
Double distance = 0.0;
double earthRadius = 6371; // 地球半径单位为公里
@ -104,7 +104,7 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
}
distance = min;
}else {
LJStore store = this.selectStoreByStoreId(storeId);
LJStore store = this.selectStoreByStoreId(Integer.valueOf(storeId));
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);

View File

@ -196,13 +196,13 @@
<div class="wrap-box" v-for="item in payList"
:key="item.dictValue"
:value="item.dictValue"
:class="{ 'wrap-box2': item.dictValue == typeIdex }"
:class="{ 'wrap-box2': item.dictValue == payType }"
@click="payMethod(item.dictValue)">
<span>{{ item.dictLabel }}</span>
</div>
<div class="wrap-box" value="credit"
:class="{ 'wrap-box2': '798' == typeIdex }" >
<span @click="addCredits('798')">挂账</span>
:class="{ 'wrap-box2': 'credit' == payType }" >
<span @click="addCredits('credit')">挂账</span>
</div>
</div>
<div class="center-left-bottom">
@ -925,6 +925,7 @@
couponIds:[],
// 使id
useCouponIds:"",
payType:"WECHAT",
map:{
allAmount:0,
//
@ -1083,6 +1084,7 @@
addCredits(type){
this.typeIdex = type
this.map.payType = "credit"
this.payType = "credit"
this.dialogVisibleCredit = true
this.form1.amount = this.oilAmount + this.goodsAmount
},
@ -2736,7 +2738,49 @@
},500)
},
handClose(){
this.resetting1()
// this.resetting1()
this.authCode = "";
this.userNo = ""
this.map = {
allAmount:0,
//
authCode:'',
//
oilOrder:"",
//
goodsOrder:"",
//
payType:"WECHAT",
//
oilAmount:0,
//
goodsAmount:0,
//
oilActualPay:0,
//
goodsActualPay:0,
//
payUser:"",
//
oilDiscount:0,
//
goodsDiscount:0,
// id
couponId:"",
//
commissionAmount:0,
// 使
usePoint:0,
//
pointAmount:0,
//
terminal:"PC",
//
goodsNum:0,
//
consumeAmount:0,
typeIdex:'',
};
this.member = {};
this.isPaySuccess = false;
this.isPay = false;

View File

@ -19,7 +19,11 @@
</el-table-column>
<el-table-column align="center" prop="fullDeduction" label="满减金额"/>
<el-table-column align="center" prop="discountAmount" label="券面额"/>
<el-table-column align="center" prop="oilType" label="适用油品"/>
<el-table-column align="center" prop="oilType" label="适用油品">
<template slot-scope="scope">
<span>{{ getOilNames(oilNameList,scope.row.oilType) }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="status" label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.status == 0">未使用</el-tag>
@ -52,6 +56,7 @@
<script>
import { getCardFavorableList } from "@/api/cashier/userInfoOrder";
import {oilNumbers} from "@/api/cashier/oilnumber";
export default {
props:["pUserId"],
@ -66,7 +71,8 @@ export default {
status: 0,
page:1,
pageSize:10,
}
},
oilNameList:[]
}
},
created() {
@ -74,9 +80,35 @@ export default {
this.userId = this.$route.query.id;
this.getList()
this.getOilName()
},
methods:{
getOilNames(list,oilIds){
let name = "";
let oilNames = []
let oilId = oilIds.split(",")
list.forEach(item => {
oilId.forEach(i => {
if (item.oilName == i){
oilNames.push(item.oilNames)
}
})
})
let arr = []
for (let i = 0;i<oilNames.length;i++){
if (arr.indexOf(oilNames[i])==-1){
arr.push(oilNames[i])
name += oilNames[i]+","
}
}
return name;
},
getOilName(){
oilNumbers().then(res => {
console.log(res)
this.oilNameList = res.data
})
},
getList(){
this.loading = true

View File

@ -1,7 +1,11 @@
<template>
<div>
<el-table ref="tables" v-loading="loading" :data="list">
<el-table-column label="所属油站" prop="storeName" align="center"/>
<el-table-column label="所属油站" prop="storeName" align="center">
<template slot-scope="scope">
<span>{{store.name}}</span>
</template>
</el-table-column>
<el-table-column label="订单时间" prop="createTime" align="center"/>
<el-table-column label="订单金额" align="center" prop="amount"/>
<el-table-column label="商品数量" align="center" prop="goodsNum" />
@ -31,6 +35,8 @@
<script>
import { getMtOrderList } from "@/api/cashier/userInfoOrder.js";
import {ljStoreInfo} from "@/api/cashier/user/store";
import {listOrder} from "@/api/cashier/goodsorder";
export default {
props:["pUserId"],
@ -43,7 +49,8 @@ export default {
queryParams:{
page:1,
pageSize:10,
}
},
store:{},
}
},
created() {
@ -51,12 +58,19 @@ export default {
this.userId = this.$route.query.id;
this.getList()
this.getStoreInfo()
},
methods:{
//
getStoreInfo(){
ljStoreInfo().then(res => {
this.store = res.data
})
},
getList(){
this.loading = true
this.queryParams.userId = this.userId
getMtOrderList(this.queryParams).then(res=>{
listOrder(this.queryParams).then(res=>{
if (res.code == 200) {
this.list = res.data.records
this.total = res.data.total

View File

@ -12,7 +12,7 @@
</el-table-column>
<el-table-column label="油品/油枪" align="center" prop="name" >
<template slot-scope="scope">
{{ scope.row.oilGunNum }}/{{ scope.row.oilName }}
{{ scope.row.oilName }}/{{ getName1(oilGunList,scope.row.oilGunNum) }}
</template>
</el-table-column>
@ -21,11 +21,11 @@
<el-table-column label="实付金额" align="center" prop="payAmount"/>
<el-table-column label="付款类型" align="center" prop="payType">
<template slot-scope="scope">
<span v-if="scope.row.payType == 'CASH'">现金支付</span>
<span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>
<span v-else>{{ scope.row.payType }}</span>
<!-- <span v-if="scope.row.payType == 'CASH'">现金支付</span>-->
<!-- <span v-else-if="scope.row.payType == 'WECHAT'">微信支付</span>-->
<!-- <span v-else-if="scope.row.payType == 'ALIPAY'">支付宝支付</span>-->
<!-- <span v-else>{{ scope.row.payType }}</span>-->
<span>{{getName(payTypeList,scope.row.payType)}}</span>
</template>
</el-table-column>
<el-table-column label="订单号" align="center" prop="orderNo" width="220px"/>
@ -43,6 +43,8 @@
<script>
import { getOilOrderList } from "@/api/cashier/userInfoOrder.js";
import {getOilNumberGun} from "@/api/cashier/oilGuns";
import {getDicts} from "@/api/dict/data";
export default {
props:["pUserId"],
@ -55,7 +57,10 @@ export default {
queryParams:{
page:1,
pageSize:10,
}
},
//
oilGunList:[],
payTypeList:[],
}
},
created() {
@ -63,8 +68,50 @@ export default {
this.userId = this.$route.query.id;
this.getList()
this.getOilGunList();
this.getPayType();
},
methods:{
getName(list,id){
let name = ""
list.forEach(item => {
if (item.dictValue = id){
name = item.dictLabel
}
})
return name
},
getPayType(){
getDicts("payment_type").then(res => {
this.payTypeList = res.data
console.log(res)
})
},
//
getOilGunList(){
getOilNumberGun().then(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 = ""
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.gunName;
}
})
}
return name;
},
getList(){
this.loading = true
this.queryParams.userId = this.userId

View File

@ -158,6 +158,13 @@
"navigationBarTitleText": "支付完成页",
"navigationStyle": "custom"
}
},
{
"path": "pagesAddress/index",
"style": {
"navigationBarTitleText": "搜索地址页",
"navigationStyle": "custom"
}
}
]
},

View File

@ -81,8 +81,11 @@
<view class="station">
<view class="station-box">
<view class="station-title">
<view class="station-title" style="display: flex;justify-content: space-between;">
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
</view>
</view><!--顺通石化加油站(工业南路站)-->
<view style="display: flex;">
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
@ -388,16 +391,19 @@
// 使wgs84 使gcj02
type: 'gcj02', // 使
success: function(res) {
_this.longitude = res.longitude;
_this.latitude = res.latitude
// console.log(': ' + res.longitude);
// console.log(': ' + res.latitude);
if (_this.longitude=="" && _this.latitude =="") {
_this.longitude = res.longitude;
_this.latitude = res.latitude
}
console.log('经度: ' + _this.longitude);
console.log('纬度: ' + _this.latitude);
request({
url: 'business/storeInformation/store/recentlyStore',
method: 'post',
data: {
"lon": res.longitude,
"lat": res.latitude,
"lon": _this.longitude,
"lat": _this.latitude,
"storeId":storeId
},
}).then((response) => {
@ -446,7 +452,7 @@
}).then((res) => {
if (res.code == 200) {
this.oilTypeList = res.data.records
console.log("aaabbb", this.oilTypeList)
// console.log("aaabbb", this.oilTypeList)
if (this.oilTypeList.length > 0) {
this.oilInfo.oilName = this.oilTypeList[0].oilName,
this.oilInfo.oilPrice = this.oilTypeList[0].oilPrice,
@ -502,6 +508,22 @@
url: '/pages/refuel/refuel'
})
},
goChooseAddress() {
uni.chooseLocation({
success: ({
name,
address,
latitude,
longitude
}) => { //
// this.addressName = address;
console.log(name,address,latitude,longitude);
this.longitude = longitude;
this.latitude = latitude;
this.getAddress()
},
});
},
goMall() {
uni.navigateTo({
url: '/pagesHome/PointsMall/PointsMall'