Compare commits
No commits in common. '1633d9a105504cb4f54943eb80ab30184c194d71' and 'f154b33bad400002fb64a22b9caf220eae292680' have entirely different histories.
1633d9a105
...
f154b33bad
@ -1,364 +0,0 @@ |
||||
<template> |
||||
<view> |
||||
<view class="headsearch width94 mart15 paddtop15 paddbotm10 fotct"> |
||||
<view class="font15 height40 fcorfff width94">总加油金额</view> |
||||
<view class="font28 fcorfff width94">¥<text class="margle font40">{{GasOrder.refuelPrice}}</text></view> |
||||
<view class="alijus marb20 mart10"> |
||||
<view class="width50 fcorfff font16"> |
||||
<view class="width100">总笔数</view> |
||||
<view class="width100 mart10 font22">{{GasOrder.refuelNum}} 笔</view> |
||||
</view> |
||||
<view class="width50 fcorfff font16"> |
||||
<view class="width100">总升数</view> |
||||
<view class="width100 mart10 font22">{{GasOrder.refuelLiters}} 升</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="headsearch width94 mart15 paddtop5 paddbotm10 fotct"> |
||||
|
||||
<view class="mart10 width90 alijusstart"> |
||||
<view class="fcorfff font14 margleri10 width60 fotlt">开始时间 :</view> |
||||
<picker mode="date" :value="startdate" :start="startDate" :end="endDate" @change="bindDateChange"> |
||||
<view class="uni-input datetim fcorfff">{{startdate}}<i class="down"></i></view> |
||||
</picker> |
||||
</view> |
||||
<view class="mart10 width90 alijusstart"> |
||||
<view class="fcorfff font14 margleri10 width60 fotlt">结束时间 :</view> |
||||
<picker mode="date" :value="enddate" :start="startDate" :end="endDate" @change="bindDateChange1"> |
||||
<view class="uni-input datetim fcorfff">{{enddate}}<i class="down"></i></view> |
||||
</picker> |
||||
</view> |
||||
<view class="mart10 width90 alijusstart"> |
||||
<view class="fcorfff font14 margleri10 width60 fotlt">油品 :</view> |
||||
<picker mode="selector" :range="oilList" range-key="codeName" @change="changeUserCard"> |
||||
<view class="uni-input datetim fcorfff font14">{{typeName}}<i class="down"></i></view> |
||||
</picker> |
||||
</view> |
||||
<view class="mart10 width90 alijusstart"> |
||||
<view class="fcorfff font14 margleri10 width60 fotlt">状态 :</view> |
||||
<picker mode="selector" :range="statulist" range-key="codeName" @change="changeUserstu"> |
||||
<view class="uni-input datetim fcorfff font14">{{statusname}}<i class="down"></i></view> |
||||
</picker> |
||||
</view> |
||||
<view class="input-box fotlt alijusstart mart15 marb10"> |
||||
<input placeholder="订单号搜索" v-model="orderNo" placeholder-style="color:#c0c0c0;" |
||||
@input="searchOrder()" /> |
||||
<view class="icon search"></view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view v-if="orderDetailsList == ''" class="mart40 fotct font14 fcor666"> |
||||
<image mode="widthFix" style="width: 70vw;" src="../../../static/img/noorder.png"></image> |
||||
</view> |
||||
<view class="width94 backcorfff headcont mart10" v-for="(item,index) in orderDetailsList" :key="index" |
||||
@click="jumpDetails(item.orderNo)"> |
||||
<view class="alijusstart width94 height30 fcor333 paddtop5"> |
||||
<view class="width70 font14 text1">{{item.orderNo}}</view> |
||||
<image class="iconw alicntend" mode="widthFix" src="../../../static/img/jtg.png"></image> |
||||
<text class="width20 font14 fotrt" v-if="item.status == 1">待支付</text> |
||||
<text class="width20 font14 fotrt" v-if="item.status == 2">已支付</text> |
||||
<text class="width20 font14 fotrt" v-if="item.status == 3">已完成</text> |
||||
<text class="width20 font14 fotrt" v-if="item.status == 4">已退款</text> |
||||
<text class="width20 font14 fotrt" v-if="item.status == 5">已取消</text> |
||||
<text class="width20 font14 fotrt" v-if="item.status == 6">已退款</text> |
||||
<text class="width20 font14 fotrt" v-if="item.status == 7">拒绝退款</text> |
||||
</view> |
||||
<view class="line1 width94"></view> |
||||
<view class="width94 mart5"> |
||||
<image :src="item.gasLogo" mode="widthFix" class="counimgs flleft"></image> |
||||
<view class="counscou paddtop10"> |
||||
<view class="width94 height25 font14 fcor666"> |
||||
油品: <text class="margle marglerig">{{item.gasOilNo}}</text> 升数: <text |
||||
class="margle">{{item.gasOilLiters}}L</text> |
||||
</view> |
||||
<view class="width94 height25 alijusstart "> |
||||
<view class="width50 font14 fcor666">加油金额: ¥{{item.totalPrice}}</view> |
||||
<view class="width50 font14 fcor333 fotrt">实付: |
||||
<text class="font18" v-if="item.payRealPrice">¥{{item.payRealPrice}}</text> |
||||
<text class="font18" v-else>¥0</text> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="line1 width94 mart5"></view> |
||||
<view class="height30 width94 mart5 font14 fcor666">下单时间: |
||||
{{item.createTime | timeFormat('yyyy-mm-dd hh:mm:ss')}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
getDictionaryByCodeType, |
||||
getGasOrderList, |
||||
countGasOrder |
||||
} from '../../../Utils/Api.js'; |
||||
export default { |
||||
data() { |
||||
const currentDate = this.getDate({ |
||||
format: true |
||||
}) |
||||
return { |
||||
startdate: currentDate, |
||||
enddate: currentDate, |
||||
pageNum: 1, |
||||
pagesize: 10, |
||||
isLoadMore: false, //是否加载中 |
||||
orderNo: '', //搜索内容 |
||||
oilList: [{ |
||||
codeValue: '', |
||||
codeName: '全部' |
||||
}], //数据字典 |
||||
typeName: '全部', // 名称 |
||||
typeId: '', //区分类型 |
||||
statulist: [{ |
||||
codeValue: '', |
||||
codeName: '全部' |
||||
}, { |
||||
codeValue: 3, |
||||
codeName: '已完成' |
||||
}, { |
||||
codeValue: 4, |
||||
codeName: '已退款' |
||||
}, { |
||||
codeValue: 6, |
||||
codeName: '退款中' |
||||
}, ], //状态 |
||||
statuid: '', |
||||
statusname: '全部', |
||||
orderDetailsList: [], //列表数据 |
||||
GasOrder: '' //统计 |
||||
} |
||||
}, |
||||
onLoad() { |
||||
this.getDictionaryByCodeType(); |
||||
this.getGasOrderList(); |
||||
this.countGasOrder(); |
||||
}, |
||||
computed: { |
||||
startDate() { |
||||
return this.getDate('start'); |
||||
}, |
||||
endDate() { |
||||
return this.getDate('end'); |
||||
} |
||||
}, |
||||
onReachBottom() { //上拉触底函数 |
||||
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求 |
||||
this.isLoadMore = true |
||||
this.pageNum += 1 |
||||
this.getGasOrderList() |
||||
} |
||||
}, |
||||
methods: { |
||||
bindDateChange: function(e) { |
||||
this.startdate = e.target.value; |
||||
this.pageNum = 1; |
||||
this.orderDetailsList = []; |
||||
this.GasOrder = ''; |
||||
this.isLoadMore = true; |
||||
this.countGasOrder(); |
||||
this.getGasOrderList(); |
||||
}, |
||||
bindDateChange1: function(e) { |
||||
this.enddate = e.target.value; |
||||
this.pageNum = 1; |
||||
this.orderDetailsList = []; |
||||
this.GasOrder = ''; |
||||
this.isLoadMore = true; |
||||
this.countGasOrder(); |
||||
this.getGasOrderList(); |
||||
}, |
||||
getDate(type) { |
||||
const date = new Date(); |
||||
let year = date.getFullYear(); |
||||
let month = date.getMonth() + 1; |
||||
let day = date.getDate(); |
||||
|
||||
if (type === 'start') { |
||||
year = year - 60; |
||||
} else if (type === 'end') { |
||||
year = year + 2; |
||||
} |
||||
month = month > 9 ? month : '0' + month;; |
||||
day = day > 9 ? day : '0' + day; |
||||
return `${year}-${month}-${day}`; |
||||
}, |
||||
//查询数据字典油品 |
||||
getDictionaryByCodeType() { |
||||
let datas = { |
||||
codeType: 'GAS_OIL_TYPE' |
||||
} |
||||
getDictionaryByCodeType(datas).then(res => { |
||||
if (res.return_code == '000000') { |
||||
let List = res.return_data; |
||||
for (var i = 0; i < List.length; i++) { |
||||
this.oilList.push(List[i]); |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
//选择油品 |
||||
changeUserCard(e) { |
||||
this.typeId = this.oilList[e.target.value].codeValue; |
||||
this.typeName = this.oilList[e.target.value].codeName; |
||||
this.pageNum = 1; |
||||
this.orderDetailsList = []; |
||||
this.GasOrder = ''; |
||||
this.isLoadMore = true; |
||||
this.countGasOrder(); |
||||
this.getGasOrderList(); |
||||
}, |
||||
//选择状态 |
||||
changeUserstu(e) { |
||||
this.statuid = this.statulist[e.target.value].codeValue; |
||||
this.statusname = this.statulist[e.target.value].codeName; |
||||
this.pageNum = 1; |
||||
this.orderDetailsList = []; |
||||
this.GasOrder = ''; |
||||
this.isLoadMore = true; |
||||
this.countGasOrder(); |
||||
this.getGasOrderList(); |
||||
}, |
||||
//订单统计 |
||||
countGasOrder() { |
||||
uni.showLoading({ |
||||
title: '加载中' |
||||
}) |
||||
let a = new Date(this.startdate).getTime(); |
||||
let b = new Date(this.enddate).getTime(); |
||||
let startTime = a - 28800000; |
||||
let endTime = b + 57599000; |
||||
let datas = { |
||||
orderNo: this.orderNo, |
||||
oilNo: this.typeId, |
||||
status: this.statuid, |
||||
pageNum: this.pageNum, |
||||
pageSize: this.pagesize, |
||||
payTimeS: startTime, |
||||
payTimeE: endTime |
||||
} |
||||
countGasOrder(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.GasOrder = res.return_data; |
||||
} |
||||
}) |
||||
}, |
||||
//查询列表 |
||||
getGasOrderList() { |
||||
uni.showLoading({ |
||||
title: '加载中' |
||||
}) |
||||
let a = new Date(this.startdate).getTime(); |
||||
let b = new Date(this.enddate).getTime(); |
||||
let startTime = a - 28800000; |
||||
let endTime = b + 57599000; |
||||
let datas = { |
||||
orderNo: this.orderNo, |
||||
oilNo: this.typeId, |
||||
status: this.statuid, |
||||
pageNum: this.pageNum, |
||||
pageSize: this.pagesize, |
||||
payTimeS: startTime, |
||||
payTimeE: endTime |
||||
} |
||||
getGasOrderList(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000' && res.return_data.list !='') { |
||||
this.orderDetailsList = this.orderDetailsList.concat(res.return_data.list); |
||||
if (res.return_data.pages == this.pageNum) { |
||||
this.isLoadMore = true; |
||||
} else { |
||||
this.isLoadMore = false |
||||
} |
||||
} else { |
||||
this.orderDetailsList = []; |
||||
this.isLoadMore = true |
||||
} |
||||
}); |
||||
}, |
||||
//搜索条件 |
||||
searchOrder() { |
||||
this.orderDetailsList = []; |
||||
this.pageNum = 1; |
||||
this.getGasOrderList(); |
||||
}, |
||||
//跳转详情 |
||||
jumpDetails(item) { |
||||
uni.navigateTo({ |
||||
url: '../../home/oderDetails/oderDetails?ordesid=' + item |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
page { |
||||
background-color: #f3f4f8; |
||||
} |
||||
|
||||
.datetim { |
||||
width: 130px; |
||||
height: 30px; |
||||
line-height: 30px; |
||||
text-align: right; |
||||
border-radius: 15px; |
||||
} |
||||
|
||||
i { |
||||
border: solid #ffffff; |
||||
border-width: 0 2px 2px 0; |
||||
display: inline-block; |
||||
padding: 4px; |
||||
margin-left: 10px; |
||||
vertical-align: 3px; |
||||
} |
||||
|
||||
.down { |
||||
-webkit-transform: rotate(45deg); |
||||
} |
||||
|
||||
.headsearch { |
||||
border-radius: 8px; |
||||
background-color: #4c7fe6; |
||||
} |
||||
|
||||
.input-box { |
||||
width: 90%; |
||||
margin-left: 5%; |
||||
background-color: #f5f5f5; |
||||
border-radius: 10rpx; |
||||
height: 35px; |
||||
|
||||
.icon { |
||||
align-items: center; |
||||
width: 60upx; |
||||
font-size: 40upx; |
||||
color: #c0c0c0; |
||||
} |
||||
|
||||
input { |
||||
padding-left: 28upx; |
||||
height: 28upx; |
||||
font-size: 28upx; |
||||
width: 100%; |
||||
} |
||||
} |
||||
|
||||
.headcont { |
||||
height: 150px; |
||||
border-radius: 8px; |
||||
} |
||||
|
||||
.counimgs { |
||||
width: 60px; |
||||
max-height: 60px; |
||||
} |
||||
|
||||
.counscou { |
||||
margin-left: 70px; |
||||
} |
||||
</style> |
@ -1,202 +0,0 @@ |
||||
<template> |
||||
<view> |
||||
<view class="username paddtop10"> |
||||
<view class="namecont">班组选择</view> |
||||
<picker mode="selector" style="width: 90%;" :range="classGroupList" range-key="name" @change="changeclass"> |
||||
<view class="date text1" style="padding: 0 50rpx;">{{className}}</view> |
||||
</picker> |
||||
<image class="flright" style="width: 15px;height: 15px;" src="../../../static/img/downj.png"></image> |
||||
</view> |
||||
|
||||
<view class="width80 height40 backcor008 border-r font14 fotct fcorfff" v-if="typeid == 1" |
||||
style="position: fixed;bottom: 40px;" @click="swapGroupTask()"> |
||||
交接班次 |
||||
</view> |
||||
<view class="width80 height40 backcor008 border-r font14 fotct fcorfff" v-if="typeid == 2" |
||||
style="position: fixed;bottom: 40px;" @click="startGroupTask()"> |
||||
开始班次 |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
startGroupTask, |
||||
getClassGroupList, |
||||
swapGroupTask |
||||
} from '../../../Utils/Api.js'; |
||||
let app = getApp(); |
||||
export default { |
||||
data() { |
||||
return { |
||||
typeid: '', //入口类型 |
||||
classGroupList: '', //班组列表 |
||||
className: '', // 班组名称 |
||||
classId: '' ,//id |
||||
userinfo: '', //用户信息 |
||||
} |
||||
}, |
||||
onLoad(options) { |
||||
this.typeid = options.typeid; |
||||
this.userinfo = app.globalData.userInfo; |
||||
if (options.typeid == 1) { |
||||
uni.setNavigationBarTitle({ |
||||
title: '交换班次' |
||||
}) |
||||
} |
||||
if (options.typeid == 2) { |
||||
uni.setNavigationBarTitle({ |
||||
title: '开始班次' |
||||
}) |
||||
} |
||||
this.getClassGroupList(); |
||||
}, |
||||
methods: { |
||||
//查询班组 |
||||
getClassGroupList() { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
let datas = { |
||||
pageNum: 1, |
||||
pageSize: 9999 |
||||
} |
||||
getClassGroupList(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.classGroupList = res.return_data.list; |
||||
this.classId = res.return_data.list[0].id; |
||||
this.className = res.return_data.list[0].name; |
||||
} |
||||
}) |
||||
}, |
||||
//选择班组 |
||||
changeclass(e) { |
||||
this.classId = this.classGroupList[e.target.value].id; |
||||
this.className = this.classGroupList[e.target.value].name; |
||||
}, |
||||
//开始班次 |
||||
startGroupTask() { |
||||
let that = this; |
||||
uni.showModal({ |
||||
title: '开始班次', |
||||
content: '是否开始当前班次?', |
||||
success: function(res) { |
||||
if (res.confirm) { |
||||
uni.showLoading({ |
||||
title: '操作中' |
||||
}) |
||||
let datas = { |
||||
gasId: that.userinfo.merchantStore.id, |
||||
gasClassGroupId: that.classId |
||||
} |
||||
startGroupTask(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
uni.showToast({ |
||||
title: '操作成功', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
uni.navigateBack({}) |
||||
} else { |
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} |
||||
}) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
//交换班次 |
||||
swapGroupTask() { |
||||
let that = this; |
||||
uni.showModal({ |
||||
title: '交换班次', |
||||
content: '是否交换当前班次?', |
||||
success: function(res) { |
||||
if (res.confirm) { |
||||
uni.showLoading({ |
||||
title: '操作中' |
||||
}) |
||||
let datas = { |
||||
gasId: that.userinfo.merchantStore.id, |
||||
gasClassGroupId: that.classId |
||||
} |
||||
swapGroupTask(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
uni.showToast({ |
||||
title: '操作成功', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
uni.navigateBack({}) |
||||
} else { |
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} |
||||
}) |
||||
} |
||||
} |
||||
}) |
||||
} |
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
.username { |
||||
width: calc(100% - 90upx); |
||||
height: 100upx; |
||||
display: flex; |
||||
align-items: center; |
||||
background-color: rgba($color: #ffffff, $alpha: 0.1); |
||||
border-bottom: 1px solid #f6f6f6; |
||||
padding: 8upx 45upx; |
||||
|
||||
input { |
||||
width: 50%; |
||||
height: 50upx; |
||||
font-size: 16px; |
||||
color: #333333; |
||||
font-weight: blod; |
||||
} |
||||
|
||||
.get-code { |
||||
position: absolute; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
right: 7px; |
||||
z-index: 3; |
||||
border: 1px solid #bfbfbf; |
||||
width: 25%; |
||||
padding: 3px 5px; |
||||
border-radius: 22px; |
||||
|
||||
&:after { |
||||
content: " "; |
||||
width: 1upx; |
||||
height: 50upx; |
||||
position: absolute; |
||||
z-index: 3; |
||||
margin-right: 100%; |
||||
left: 0; |
||||
top: 20upx; |
||||
} |
||||
} |
||||
|
||||
.namecont { |
||||
color: #666666; |
||||
width: 28%; |
||||
} |
||||
} |
||||
</style> |
@ -1,227 +0,0 @@ |
||||
<template> |
||||
<view> |
||||
<view class="width94 mart20 height80"> |
||||
<view class="width46 fcor333 font16 flleft backcor9 fotct paddtop10 paddbotm10"> |
||||
<view class="width100 fcor666">当前班次</view> |
||||
<view class="width100 mart15 font14"> |
||||
<text class="font24" v-if="currentClassGroup.classNum">{{currentClassGroup.classNum}}</text> |
||||
<text class="font24" v-else>无</text>班次 |
||||
</view> |
||||
</view> |
||||
<view class="width46 fcor333 font16 flright backcor9 fotct paddtop10 paddbotm10"> |
||||
<view class="width100 fcor666">加油总金额</view> |
||||
<view class="width100 mart15 font14"><text class="font24">{{currentClassGroup.refuelPrice}}</text>元 |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="width94 mart20 height80"> |
||||
<view class="width46 fcor333 font16 flleft backcor9 fotct paddtop10 paddbotm10"> |
||||
<view class="width100 fcor666">加油总笔数</view> |
||||
<view class="width100 mart15 font14"><text class="font24">{{currentClassGroup.refuelNum}}</text>笔</view> |
||||
</view> |
||||
<view class="width46 fcor333 font16 flright backcor9 fotct paddtop10 paddbotm10"> |
||||
<view class="width100 fcor666">加油总升数</view> |
||||
<view class="width100 mart15 font14"><text class="font24">{{currentClassGroup.refuelLiters}}</text>升 |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="width94 mart20 height80"> |
||||
<view class="width46 fcor333 font16 flleft backcor9 fotct paddtop10 paddbotm10"> |
||||
<view class="width100 fcor666">退款总金额</view> |
||||
<view class="width100 mart15 font14"><text class="font24">{{currentClassGroup.refundPrice}}</text>元 |
||||
</view> |
||||
</view> |
||||
<view class="width46 fcor333 font16 flright backcor9 fotct paddtop10 paddbotm10"> |
||||
<view class="width100 fcor666">退款总笔数</view> |
||||
<view class="width100 mart15 font14"><text class="font24">{{currentClassGroup.refundNum}}</text>笔</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="width94 mart40 alijusstart marb20"> |
||||
<view class="width40 height40 backcor008 border-r font14 fotct fcorfff" style="margin-left: 5%;" |
||||
@click="startGroupTask(1)"> |
||||
交接班组 |
||||
</view> |
||||
<view class="width40 height40 backcor008 border-r font14 fotct fcorfff" v-if="currentClassGroup.status == 0" |
||||
style="margin-left: 10%;" @click="startGroupTask(2)"> |
||||
开始班次 |
||||
</view> |
||||
<view class="width40 height40 backcolor72 border-r font14 fotct fcorfff" |
||||
v-if="currentClassGroup.status == 1" style="margin-left: 10%;" @click="endGroupTask()"> |
||||
结束班次 |
||||
</view> |
||||
</view> |
||||
<!-- //历史班次 --> |
||||
<view class="fcor333 width94 fontwig6 font15 mart20">历史班次、共计{{listcount}}条数据</view> |
||||
|
||||
<view v-if="classGroupTaskList == '' " class="mart20 fotct font14 fcor666"> |
||||
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> |
||||
</view> |
||||
<view class="width94 backcorfff headcont mart20 border-r" style="box-shadow: 0px 0px 6px #999999;" |
||||
v-for="(item,index) in classGroupTaskList" :key="index"> |
||||
<view class="alijusstart width94 height30 fcor333 paddtop5"> |
||||
<view class="width50 font14 fcor666 ">班次: <text class="font16 fcor333">{{item.classNum}}</text>班</view> |
||||
<view class="width50 font14 fcor666 fotrt">状态: |
||||
<text class="font16 fcor089" v-if="item.status == 1"> 进行中</text> |
||||
<text class="font16 fcoreb5" v-if="item.status == 2"> 已结束</text> |
||||
</view> |
||||
</view> |
||||
<view class="line1 width94"></view> |
||||
<view class="width94 mart5"> |
||||
<view class="width100 height25 font14 fcor666"> |
||||
班组名称: {{item.gasClassGroupName}} |
||||
</view> |
||||
<view class="width100 height25 font14 fcor666 "> |
||||
开始时间: {{item.startTime | timeFormat('yyyy-mm-dd hh:mm:ss')}} |
||||
</view> |
||||
<view class="width100 height25 font14 fcor666 " v-if="item.endTime"> |
||||
结束时间: {{item.endTime | timeFormat('yyyy-mm-dd hh:mm:ss')}} |
||||
</view> |
||||
<view class="width100 height25 font14 fcor666 " v-else> |
||||
结束时间: 未结束 |
||||
</view> |
||||
</view> |
||||
<view class="line1 width94 mart5"></view> |
||||
<view class="height30 backcor008 margle10 border-r font14 fotct fcorfff mart10 paddleft10 paddtright10" |
||||
style="width: 60px;" v-if="item.status == 2" @click="jumpSummary(item.id)"> |
||||
班次汇总 |
||||
</view> |
||||
<view class="height10" v-if="item.status == 2"></view> |
||||
</view> |
||||
<view class="height40p"></view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
getCurrentClassGroupTask, |
||||
endGroupTask, |
||||
getClassGroupTaskList |
||||
} from '../../../Utils/Api.js'; |
||||
let app = getApp(); |
||||
export default { |
||||
data() { |
||||
return { |
||||
userinfo: '', //用户信息 |
||||
currentClassGroup: '', //当前班次 |
||||
pageNum: 1, |
||||
pagesize: 10, |
||||
isLoadMore: false, //是否加载中 |
||||
classGroupTaskList: [], //历史数据 |
||||
listcount: '' ,//总条数 |
||||
imgadres: 'noorder.png', |
||||
imagewxUrl: app.globalData.imageWxImg, |
||||
} |
||||
}, |
||||
onLoad() { |
||||
this.userinfo = app.globalData.userInfo; |
||||
|
||||
}, |
||||
onShow() { |
||||
this.isLoadMore = true; |
||||
this.classGroupTaskList = []; |
||||
this.pageNum = 1; |
||||
this.getCurrentClassGroupTask(); |
||||
this.getClassGroupTaskList(); |
||||
}, |
||||
onReachBottom() { //上拉触底函数 |
||||
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求 |
||||
this.isLoadMore = true |
||||
this.pageNum += 1 |
||||
this.getClassGroupTaskList() |
||||
} |
||||
}, |
||||
methods: { |
||||
//查询当前班次 |
||||
getCurrentClassGroupTask() { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
let datas = { |
||||
gasId: this.userinfo.merchantStore.id |
||||
} |
||||
getCurrentClassGroupTask(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.currentClassGroup = res.return_data; |
||||
} |
||||
}) |
||||
}, |
||||
//开启班次 |
||||
startGroupTask(item) { |
||||
uni.navigateTo({ |
||||
url: '../select-team/select-team?typeid=' + item |
||||
}) |
||||
}, |
||||
//结束班次 |
||||
endGroupTask() { |
||||
let that = this; |
||||
uni.showModal({ |
||||
title: '结束班次', |
||||
content: '是否结束当前班次?', |
||||
success: function(res) { |
||||
if (res.confirm) { |
||||
uni.showLoading({ |
||||
title: '操作中' |
||||
}) |
||||
let datas = { |
||||
gasId: that.userinfo.merchantStore.id |
||||
} |
||||
endGroupTask(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
uni.showToast({ |
||||
title: '操作成功', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
that.pageNum = 1; |
||||
that.isLoadMore = true |
||||
that.classGroupTaskList = []; |
||||
that.getCurrentClassGroupTask(); |
||||
that.getClassGroupTaskList(); |
||||
} |
||||
}) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
//历史班次 |
||||
getClassGroupTaskList() { |
||||
uni.showLoading({ |
||||
title: '加载中' |
||||
}) |
||||
let datas = { |
||||
pageNum: this.pageNum, |
||||
pageSize: this.pagesize, |
||||
} |
||||
getClassGroupTaskList(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000' && res.return_data.list != '') { |
||||
this.listcount = res.return_data.total; |
||||
this.classGroupTaskList = this.classGroupTaskList.concat(res.return_data.list); |
||||
if (res.return_data.pages == this.pageNum) { |
||||
this.isLoadMore = true; |
||||
} else { |
||||
this.isLoadMore = false |
||||
} |
||||
} else { |
||||
this.listcount = 0; |
||||
this.classGroupTaskList = []; |
||||
this.isLoadMore = true |
||||
} |
||||
}); |
||||
}, |
||||
//跳转到汇总 |
||||
jumpSummary(item) { |
||||
uni.navigateTo({ |
||||
url: '../shift-summary/shift-summary?id=' + item |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
|
||||
</style> |
@ -1,128 +0,0 @@ |
||||
<template> |
||||
<view> |
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">开始时间:</view> |
||||
<view class="width50">{{classGroupTaskDetails.startTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view> |
||||
</view> |
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">结束时间:</view> |
||||
<view class="width50">{{classGroupTaskDetails.endTime | timeFormat('yyyy-mm-dd hh:mm:ss')}}</view> |
||||
</view> |
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">加油金额汇总:</view> |
||||
<view class="width50">{{classGroupTaskDetails.refuelPrice}} 元</view> |
||||
</view> |
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">加油笔数汇总:</view> |
||||
<view class="width50">{{classGroupTaskDetails.refuelNum}} 笔</view> |
||||
</view> |
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">加油升数汇总:</view> |
||||
<view class="width50">{{classGroupTaskDetails.refuelLiters}} 升</view> |
||||
</view> |
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">退款金额汇总:</view> |
||||
<view class="width50">{{classGroupTaskDetails.refundPrice }} 元</view> |
||||
</view> |
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">退款笔数汇总:</view> |
||||
<view class="width50">{{classGroupTaskDetails.refundNum }} 笔</view> |
||||
</view> |
||||
|
||||
<view class="width92 fcor666 font14 mart20 alijusstart"> |
||||
<view class="width30 fcor333">退款升数汇总:</view> |
||||
<view class="width50">{{classGroupTaskDetails.refundLiters}} 升</view> |
||||
</view> |
||||
|
||||
<view class="alijusstart fotct font14 height40p backcor9 mart30 fcor333"> |
||||
<view class="width25">油号</view> |
||||
<view class="width25">金额</view> |
||||
<view class="width25">升数</view> |
||||
<view class="width25">笔数</view> |
||||
</view> |
||||
|
||||
<view v-if="classGroupTaskDetails.groupTaskOilCountList == '' " class="mart60 fotct font14 fcor666"> |
||||
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> |
||||
</view> |
||||
<view class="width100 alijusstart fotct font14 height45 fcor666 mart5 bor-botm1 marb5" :key="index" |
||||
v-for="(item,index) in classGroupTaskDetails.groupTaskOilCountList"> |
||||
<view class="width25">{{item.oilNo}}#</view> |
||||
<view class="width25">{{item.refuelPrice}}元</view> |
||||
<view class="width25">{{item.refuelLiters}}升</view> |
||||
<view class="width25">{{item.refuelNum}}笔</view> |
||||
</view> |
||||
<view class="height80"></view> |
||||
<view class="width40w height40 backcor008 border-r font14 fotct fcorfff" style="position: fixed;bottom: 15px;" |
||||
@click="print()"> |
||||
打印小票 |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
getClassGroupTaskById, |
||||
print |
||||
} from '../../../Utils/Api.js'; |
||||
let app = getApp(); |
||||
export default { |
||||
data() { |
||||
return { |
||||
taskId: '', //班次id |
||||
classGroupTaskDetails: '', //详情 |
||||
imgadres: 'noorder.png', |
||||
imagewxUrl: app.globalData.imageWxImg, |
||||
} |
||||
}, |
||||
onLoad(options) { |
||||
this.taskId = options.id; |
||||
this.getClassGroupTaskById(); |
||||
}, |
||||
methods: { |
||||
//查询详情 |
||||
getClassGroupTaskById() { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
let datas = { |
||||
gasClassGroupTaskId: this.taskId |
||||
} |
||||
getClassGroupTaskById(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.classGroupTaskDetails = JSON.parse(res.return_data.dataCount); |
||||
} |
||||
}) |
||||
}, |
||||
//打印小票 |
||||
print() { |
||||
uni.showLoading({ |
||||
title: '打印小票' |
||||
}) |
||||
let datas = { |
||||
gasClassGroupTaskId: this.taskId |
||||
} |
||||
print(datas).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
uni.showToast({ |
||||
title: '打印成功', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} else { |
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
|
||||
</style> |
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Loading…
Reference in new issue