no message
This commit is contained in:
parent
ad7f7356c7
commit
e5a24d3c83
@ -47,3 +47,12 @@ export function saveStore(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
export function getCountdownApi(param) {
|
||||||
|
return request({
|
||||||
|
url: 'system/dept/getCountdown',
|
||||||
|
method: 'get',
|
||||||
|
params: param
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -7,11 +7,13 @@
|
|||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<template v-if="device!=='mobile'">
|
<template v-if="device!=='mobile'">
|
||||||
|
<span v-if="day>=0" class="right-menu-item hover-effect" style="color: #ff1f1f; margin-right: 10px">油站有效期还剩{{day}}天</span>
|
||||||
|
|
||||||
<search id="header-search" class="right-menu-item" />
|
<search id="header-search" class="right-menu-item" />
|
||||||
<ScreenData class="right-menu-item hover-effect" style="font-size: 24px"></ScreenData>
|
<ScreenData class="right-menu-item hover-effect" style="font-size: 24px"></ScreenData>
|
||||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||||
|
|
||||||
<div title="收银台" class="right-menu-item hover-effect " style="font-size: 23px">
|
<div title="收银台" class="right-menu-item hover-effect " style="font-size: 24px">
|
||||||
<i class="el-icon-s-shop" @click="goToCashier()"></i>
|
<i class="el-icon-s-shop" @click="goToCashier()"></i>
|
||||||
</div>
|
</div>
|
||||||
<FuintDoc id="fuint-doc" class="right-menu-item hover-effect" />
|
<FuintDoc id="fuint-doc" class="right-menu-item hover-effect" />
|
||||||
@ -55,8 +57,15 @@ import SizeSelect from '@/components/SizeSelect'
|
|||||||
import Search from '@/components/HeaderSearch'
|
import Search from '@/components/HeaderSearch'
|
||||||
import FuintDoc from '@/components/Fuint/Doc'
|
import FuintDoc from '@/components/Fuint/Doc'
|
||||||
import ScreenData from '@/components/ScreenData'
|
import ScreenData from '@/components/ScreenData'
|
||||||
|
import {getCountdownApi} from "@/api/store";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
day: -1,
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
TopNav,
|
TopNav,
|
||||||
@ -91,6 +100,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getCountdown()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
@ -108,6 +120,14 @@ export default {
|
|||||||
},
|
},
|
||||||
goToCashier() {
|
goToCashier() {
|
||||||
window.open(this.pcUrl+'#/homeindex?id=0')
|
window.open(this.pcUrl+'#/homeindex?id=0')
|
||||||
|
},
|
||||||
|
// 查询到期时间
|
||||||
|
getCountdown() {
|
||||||
|
getCountdownApi().then(res=> {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.day = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -145,4 +145,14 @@ public class SysDeptController extends BaseController
|
|||||||
{
|
{
|
||||||
return getSuccessResult(deptService.selectDeptTreeList(dept));
|
return getSuccessResult(deptService.selectDeptTreeList(dept));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询店铺的到期时间
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getCountdown")
|
||||||
|
public ResponseObject getCountdown() {
|
||||||
|
return getSuccessResult(deptService.getCountdown());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,4 +123,6 @@ public interface ISysDeptService extends IService<SysDept>
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDeptById(Long deptId);
|
public int deleteDeptById(Long deptId);
|
||||||
|
|
||||||
|
long getCountdown();
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,9 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -445,4 +448,20 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
|||||||
{
|
{
|
||||||
return getChildList(list, t).size() > 0;
|
return getChildList(list, t).size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getCountdown() {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
SysDept sysDept = baseMapper.selectDeptById(nowAccountInfo.getDeptId());
|
||||||
|
if (ObjectUtil.isNotEmpty(sysDept) && ObjectUtil.isNotEmpty(sysDept.getTurnoverEndTime())) {
|
||||||
|
LocalDate endLocalDate = sysDept.getTurnoverEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||||
|
LocalDate startLocalDate = LocalDate.now();
|
||||||
|
|
||||||
|
// 计算两个日期之间的天数差
|
||||||
|
return ChronoUnit.DAYS.between(startLocalDate, endLocalDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
return -999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@
|
|||||||
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"
|
||||||
@click="handleRefund(scope.row.id)"
|
@click="handleRefund(scope.row.id)"
|
||||||
v-if = "scope.row.orderStatus === 'paid'"
|
v-if = "scope.row.orderStatus === 'paid' && scope.row.terminal=='applet'"
|
||||||
type="danger" plain round>退款</el-button>
|
type="danger" plain round>退款</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -588,6 +588,8 @@
|
|||||||
type: "canRefund",
|
type: "canRefund",
|
||||||
refundAmt: this.payAmount,
|
refundAmt: this.payAmount,
|
||||||
refType: "oilOrder",
|
refType: "oilOrder",
|
||||||
|
isOil: true,
|
||||||
|
|
||||||
}
|
}
|
||||||
await refundApi(map).then(res=>{
|
await refundApi(map).then(res=>{
|
||||||
this.$message({
|
this.$message({
|
||||||
|
Loading…
Reference in New Issue
Block a user