no message
This commit is contained in:
parent
8a6a373981
commit
e8ab427cdc
@ -42,6 +42,15 @@ public class AllOrderInfoController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
@GetMapping("getPageListByPos")
|
||||
public ResponseObject getPageListByPos(AllOrderInfo allOrderInfo,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<AllOrderInfoVo> list = allOrderInfoService.getPageListByPos(page, allOrderInfo);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("sumPayMoney")
|
||||
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.order.entity.HandoverRecord;
|
||||
import com.fuint.business.order.service.HandoverRecordService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@ -111,6 +113,12 @@ public class HandoverRecordController extends BaseController {
|
||||
return getSuccessResult(handoverRecordService.handover(staffId));
|
||||
}
|
||||
|
||||
@GetMapping("handoverByPos")
|
||||
public ResponseObject handoverByPos() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
return getSuccessResult(handoverRecordService.handover(nowAccountInfo.getStaffId()));
|
||||
}
|
||||
|
||||
@GetMapping("handoverByAllOrder")
|
||||
public ResponseObject handoverByAllOrder() {
|
||||
return getSuccessResult(handoverRecordService.handoverByAllOrder());
|
||||
|
@ -174,6 +174,7 @@
|
||||
aoi.create_by AS createBy,
|
||||
aoi.update_time AS updateTime,
|
||||
aoi.update_by AS updateBy,
|
||||
aoi.content AS content,
|
||||
mu.name userName,
|
||||
mu.mobile userMobile
|
||||
from all_order_info aoi
|
||||
@ -185,6 +186,9 @@
|
||||
<if test="allOrderInfo.orderNo != null and allOrderInfo.orderNo != ''">
|
||||
and aoi.order_no = #{allOrderInfo.orderNo}
|
||||
</if>
|
||||
<if test="allOrderInfo.status != null and allOrderInfo.status != ''">
|
||||
and aoi.status = #{allOrderInfo.status}
|
||||
</if>
|
||||
<if test="allOrderInfo.payChannel != null and allOrderInfo.payChannel != ''">
|
||||
and aoi.pay_channel = #{allOrderInfo.payChannel}
|
||||
</if>
|
||||
|
@ -23,6 +23,7 @@ public interface AllOrderInfoService {
|
||||
* @return
|
||||
*/
|
||||
IPage<AllOrderInfoVo> getPageList(Page page, AllOrderInfo allOrderInfo);
|
||||
IPage<AllOrderInfoVo> getPageListByPos(Page page, AllOrderInfo allOrderInfo);
|
||||
|
||||
/**
|
||||
* 统计总的金额
|
||||
|
@ -60,6 +60,7 @@ public interface HandoverRecordService {
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
public Map<String, Object> handover(Integer staffId);
|
||||
public Map<String, Object> handoverByPos(Integer staffId);
|
||||
|
||||
public Map<String, Object> handoverByAllOrder();
|
||||
|
||||
|
@ -28,8 +28,10 @@ import com.fuint.business.order.vo.Excel.OilDepotExcel;
|
||||
import com.fuint.business.order.vo.Excel.TradingExcel;
|
||||
import com.fuint.business.order.vo.OrderGoodsVo;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilGun;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilTracking;
|
||||
import com.fuint.business.petrolStationManagement.service.OilGunService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilTankService;
|
||||
import com.fuint.business.petrolStationManagement.service.OilTrackingService;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
@ -84,6 +86,27 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Resource
|
||||
OilOrderService oilOrderService;
|
||||
@Resource
|
||||
OilNameService oilNameService;
|
||||
@Override
|
||||
public IPage<AllOrderInfoVo> getPageListByPos(Page page, AllOrderInfo allOrderInfo) {
|
||||
AccountInfo accountInfoByToken = TokenUtil.getNowAccountInfo();
|
||||
allOrderInfo.setPayChannel("POS");
|
||||
allOrderInfo.setStoreId(accountInfoByToken.getStoreId());
|
||||
IPage<AllOrderInfoVo> pageList = allOrderInfoMapper.getPageList(page, allOrderInfo);
|
||||
for (AllOrderInfoVo record : pageList.getRecords()) {
|
||||
if ("油品订单".equals(record.getContent())) {
|
||||
OilOrder oilOrder = oilOrderService.selectOilOrderByOrderNo(record.getOrderNo());
|
||||
OilName oilName = oilNameService.selectOilNameById(Integer.parseInt(oilOrder.getOils()));
|
||||
record.setOilName(oilName.getOilName());
|
||||
record.setShengshu(oilOrder.getOilNum());
|
||||
}
|
||||
}
|
||||
return pageList;
|
||||
}
|
||||
|
||||
public String sumPayMoney(AllOrderInfo allOrderInfo){
|
||||
String sumPayMoney = allOrderInfoMapper.sumPayMoney(allOrderInfo);
|
||||
|
||||
@ -160,8 +183,8 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
OrderGoodsService orderGoodsService;
|
||||
@Resource
|
||||
OilTankService oilTankService;
|
||||
@Resource
|
||||
OilOrderService oilOrderService;
|
||||
// @Resource
|
||||
// OilOrderService oilOrderService;
|
||||
@Resource
|
||||
OilTrackingService oilTrackingService;
|
||||
@Resource
|
||||
@ -438,12 +461,16 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
if (ObjectUtil.isEmpty(allOrderInfo.getDeptId())) {
|
||||
IPage<SysDeptVo> sysDepts = sysDeptMapper.selectChildrenDeptById2(new Page(1,10000),nowAccountInfo.getDeptId(),allOrderInfo.getDeptId(),allOrderInfo.getDeptType());
|
||||
|
||||
if (ObjectUtil.isEmpty(sysDepts.getRecords())) throw new RuntimeException("组织下没有油站!");
|
||||
if (ObjectUtil.isEmpty(sysDepts.getRecords())) {
|
||||
throw new RuntimeException("组织下没有油站!");
|
||||
}
|
||||
|
||||
allOrderInfo.setStoreIds(sysDepts.getRecords().stream().map(SysDeptVo::getDeptId).collect(Collectors.toList()));
|
||||
|
||||
List<MtStore> mtStores = mtStoreMapper.queryStoresByDeptIds(allOrderInfo.getStoreIds());
|
||||
if (ObjectUtil.isEmpty(mtStores)) throw new RuntimeException("组织下没有油站");
|
||||
if (ObjectUtil.isEmpty(mtStores)) {
|
||||
throw new RuntimeException("组织下没有油站");
|
||||
}
|
||||
allOrderInfo.setStoreIds(mtStores.stream().map(MtStore::getId).map(Long::valueOf).collect(Collectors.toList()));
|
||||
} else {
|
||||
List<Long> depts = new ArrayList<>();
|
||||
@ -464,12 +491,16 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
if (ObjectUtil.isEmpty(allOrderInfo.getDeptId())) {
|
||||
IPage<SysDeptVo> sysDepts = sysDeptMapper.selectChildrenDeptById2( new Page(1,10000),nowAccountInfo.getDeptId(),allOrderInfo.getDeptId(),allOrderInfo.getDeptType());
|
||||
|
||||
if (ObjectUtil.isEmpty(sysDepts.getRecords())) throw new RuntimeException("组织下没有油站!");
|
||||
if (ObjectUtil.isEmpty(sysDepts.getRecords())) {
|
||||
throw new RuntimeException("组织下没有油站!");
|
||||
}
|
||||
|
||||
allOrderInfo.setStoreIds(sysDepts.getRecords().stream().map(SysDeptVo::getDeptId).collect(Collectors.toList()));
|
||||
|
||||
List<MtStore> mtStores = mtStoreMapper.queryStoresByDeptIds(allOrderInfo.getStoreIds());
|
||||
if (ObjectUtil.isEmpty(mtStores)) throw new RuntimeException("组织下没有油站");
|
||||
if (ObjectUtil.isEmpty(mtStores)) {
|
||||
throw new RuntimeException("组织下没有油站");
|
||||
}
|
||||
allOrderInfo.setStoreIds(mtStores.stream().map(MtStore::getId).map(Long::valueOf).collect(Collectors.toList()));
|
||||
} else {
|
||||
List<Long> depts = new ArrayList<>();
|
||||
|
@ -124,7 +124,49 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
|
||||
return this.handoverRecordMapper.deleteById(id) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public Map<String, Object> handoverByPos(Integer staffId) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
MtStore mtStore = new MtStore();
|
||||
try {
|
||||
mtStore = storeService.queryStoreById2(nowAccountInfo.getStoreId());
|
||||
} catch (BusinessCheckException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 获取当前日期
|
||||
LocalDate today = LocalDate.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
// 格式化当前时间
|
||||
String formattedEndTime = LocalDateTime.now().format(formatter);
|
||||
|
||||
Map<String, Object> handoverMap = new HashMap<>();
|
||||
|
||||
String startTime = "2023-01-01 12:12:12";
|
||||
|
||||
HandoverRecord handoverRecord = selectByTime(staffId);
|
||||
if (!ObjectUtil.isEmpty(handoverRecord) && !ObjectUtil.isEmpty(handoverRecord.getEndTime())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
startTime = sdf.format(handoverRecord.getEndTime());
|
||||
}
|
||||
String handoverType = "POS机交班";
|
||||
Integer staff = nowAccountInfo.getStaffId();
|
||||
LJStaff ljStaff = iljStaffService.selectStaffById(staff);
|
||||
|
||||
// 填充 baseInfo
|
||||
Map<String, Object> baseInfo = new HashMap<>();
|
||||
baseInfo.put("storeName", mtStore.getName());
|
||||
baseInfo.put("realName", ljStaff.getRealName());
|
||||
baseInfo.put("handoverType", handoverType);
|
||||
baseInfo.put("startTime", startTime);
|
||||
baseInfo.put("endTime", formattedEndTime);
|
||||
|
||||
// 订单查询
|
||||
// 订单金额,优惠金额,会员充值,退款金额,实收金额
|
||||
return baseInfo;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> handover(Integer staffId) {
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
@ -9,6 +9,7 @@ public class AllOrderInfoVo extends AllOrderInfo {
|
||||
private String userMobile;
|
||||
private String storeName;
|
||||
private String mchntCd;
|
||||
private String orderStatus;
|
||||
private Double sumPayMoney;
|
||||
|
||||
//交易金额
|
||||
@ -26,6 +27,11 @@ public class AllOrderInfoVo extends AllOrderInfo {
|
||||
|
||||
|
||||
|
||||
private String oilName;
|
||||
private Double shengshu;
|
||||
|
||||
|
||||
|
||||
private String CASH;
|
||||
private String WECHAT;
|
||||
private String ALIPAY;
|
||||
|
@ -12,7 +12,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-datetime-picker :show="true" v-model="startTime" mode="datetime"></u-datetime-picker>
|
||||
<u-datetime-picker :show="showStartTime" v-model="startTimeValue" mode="datetime" @confirm="clickStart"
|
||||
@close="showStartTime = false" @close="showStartTime = false"></u-datetime-picker>
|
||||
<u-datetime-picker :show="showEndTime" v-model="endTimeValue" mode="datetime" @confirm="clickEnd"
|
||||
@close="showEndTime = false"></u-datetime-picker>
|
||||
|
||||
<view class="hm-box">
|
||||
<view class="hm-top">营业收入</view>
|
||||
@ -104,14 +107,30 @@
|
||||
titles: "经营数据",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
startTimeValue: "",
|
||||
endTimeValue: "",
|
||||
showStartTime: false,
|
||||
showEndTime: false,
|
||||
dataForm: {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.actList = ["1", "1", "1", "1", "1", ]
|
||||
// this.status = "nomore" 底部刷新结束
|
||||
let start = new Date();
|
||||
start.setHours(0)
|
||||
start.setMinutes(0)
|
||||
start.setSeconds(0)
|
||||
start.setMilliseconds(0)
|
||||
// formatDateToYYMMDDHHMM(start);
|
||||
// formatDateToYYMMDDHHMM(new Date());
|
||||
this.startTime = this.formatDateToYYMMDDHHMM(start);
|
||||
this.endTime = this.formatDateToYYMMDDHHMM(new Date());
|
||||
// this.startTime = start
|
||||
// this.endTime = new Date()
|
||||
this.getIndexData()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@ -131,6 +150,26 @@
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
clickStartTime(e) {
|
||||
this.showStartTime = true
|
||||
console.log(123, e)
|
||||
// const date = new Date(timestamp);
|
||||
|
||||
},
|
||||
clickEndTime(e) {
|
||||
this.showEndTime = true
|
||||
|
||||
},
|
||||
clickStart(e) {
|
||||
console.log('123123', e)
|
||||
this.showStartTime = false
|
||||
this.startTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
|
||||
},
|
||||
clickEnd(e) {
|
||||
this.showEndTime = false
|
||||
this.startTime = this.formatDateToYYMMDDHHMM(new Date(e.value));
|
||||
|
||||
},
|
||||
// 获取销售数据
|
||||
getIndexData() {
|
||||
request({
|
||||
@ -147,8 +186,38 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
formatTimestamp(timestamp) {
|
||||
// const date = new Date(Number(timestamp));
|
||||
// const year = date.getFullYear();
|
||||
// const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
// const day = String(date.getDate()).padStart(2, '0');
|
||||
// const hours = String(date.getHours()).padStart(2, '0');
|
||||
// const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
// const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
|
||||
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
},
|
||||
formatDateToYYMMDDHHMM(date) {
|
||||
const year = String(date.getFullYear()); // 获取两位数的年份
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 获取月份,并确保是两位数
|
||||
const day = String(date.getDate()).padStart(2, '0'); // 获取日期,并确保是两位数
|
||||
const hours = String(date.getHours()).padStart(2, '0'); // 获取小时,并确保是两位数
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0'); // 获取分钟,并确保是两位数
|
||||
|
||||
// return `${year}/${month}/${day} ${hours}:${minutes}`;
|
||||
return `${year}/${month}/${day}`;
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
watch: {
|
||||
// startTime(newVal) {
|
||||
// this.startTime = this.formatTimestamp(newVal);
|
||||
// },
|
||||
// endTime(newVal) {
|
||||
// this.endTime = this.formatTimestamp(newVal);
|
||||
// }
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -3,9 +3,10 @@
|
||||
<view class="container">
|
||||
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
|
||||
<view class="lan-box">
|
||||
<view class="">收银员:李莎</view>
|
||||
<view class="">收银员:{{ handoverList && handoverList.baseInfo ? handoverList.baseInfo.realName : '未知姓名' }}
|
||||
</view>
|
||||
<view class="b-ss">
|
||||
<view class="">今日累计:¥400.00</view>
|
||||
<view class="">今日累计:¥{{indexData.totalPayMoney}}</view>
|
||||
<view class="d-s">
|
||||
<view class="">交班记录</view>
|
||||
<u-icon name="arrow-right" color="#fff" size="18"></u-icon>
|
||||
@ -18,16 +19,28 @@
|
||||
<view class="top-box">
|
||||
员工交接单
|
||||
</view>
|
||||
<view class="h-box">门店:京博加油站璃月分站</view>
|
||||
<view class="h-box">上班时间:2024-05-13 08:30</view>
|
||||
<view class="h-box">下班时间:2024-05-13 17:30</view>
|
||||
<view class="h-box">交班模式:门店统一交班</view>
|
||||
<view class="h-box">门店:{{handoverList && handoverList.baseInfo ? handoverList.baseInfo.storeName : '-'}}
|
||||
</view>
|
||||
<view class="h-box">
|
||||
上班时间:{{ handoverList && handoverList.baseInfo ? handoverList.baseInfo.startTime : '-' }}</view>
|
||||
<view class="h-box">
|
||||
下班时间:{{ handoverList && handoverList.baseInfo ? handoverList.baseInfo.endTime : '-' }}</view>
|
||||
|
||||
<view class="h-box">订单金额:100.00</view>
|
||||
<view class="h-box">优惠金额:0.00</view>
|
||||
<view class="h-box">会员充值:300.00</view>
|
||||
<view class="h-box">退款金额:0.00</view>
|
||||
<view class="h-box">实收金额:400.00</view>
|
||||
<view class="h-box">
|
||||
订单金额:{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilOrder : 0+ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardOrder : 0 }}
|
||||
</view>
|
||||
<view class="h-box">
|
||||
优惠金额:{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilDiacount : 0 }}
|
||||
</view>
|
||||
<view class="h-box">
|
||||
会员充值:{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardPaid : 0 }}
|
||||
</view>
|
||||
<view class="h-box">
|
||||
退款金额:{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilRefund : 0 + handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardRefund : 0 }}
|
||||
</view>
|
||||
<view class="h-box">
|
||||
实收金额:{{ (Number)(handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilPaid : 0) + (Number)(handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardPaid : 0) }}
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%; height: 78px; "></view>
|
||||
<view class="bottom-d">
|
||||
@ -41,18 +54,27 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
|
||||
import headers from '../../components/header/headers.vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
titles: "交接班",
|
||||
handoverList: "",
|
||||
indexData: {
|
||||
totalPayMoney: '0',
|
||||
totalCount: '0',
|
||||
totalRefund: '0',
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.actList = ["1", "1", "1", "1", "1", ]
|
||||
// this.status = "nomore" 底部刷新结束
|
||||
this.handoverByPos()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
@ -70,6 +92,41 @@
|
||||
methods: {
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
//交班信息
|
||||
handoverByPos() {
|
||||
request({
|
||||
url: 'business/handoverRecord/handoverByPos',
|
||||
method: 'get',
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.handoverList = res.data;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取销售数据
|
||||
getIndexData() {
|
||||
request({
|
||||
url: 'business/allOrderInfo/getIndexData4Pos',
|
||||
method: 'get',
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.indexData = res.data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,25 +9,27 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="box_" v-for="item in 7" :key="index">
|
||||
<view class="box_" v-for="item,index in orderList" :key="index">
|
||||
<view class="b-bx">
|
||||
<view class="title_">京博加油站</view>
|
||||
<view class="zt-size">待支付</view>
|
||||
<!-- <view class="title_">京博加油站</view> -->
|
||||
<view class="zt-size" v-if="item.orderStatus == 'paid'">已支付</view>
|
||||
<view class="zt-size" v-if="item.orderStatus == 'refund'">已退款</view>
|
||||
<view class="zt-size" v-if="item.orderStatus == 'unpaid'">未支付</view>
|
||||
</view>
|
||||
<view class="centne">
|
||||
<view class="touxiang"></view>
|
||||
<view class="right-centne">
|
||||
<view class="h_">订单号:0000000000</view>
|
||||
<view class="h_">油号:95#</view>
|
||||
<view class="h_">升数:50L</view>
|
||||
<view class="h_">下单时间:2024-05-11 14:50</view>
|
||||
<view class="h_">订单号:{{item.orderNo}}</view>
|
||||
<view class="h_">油号:{{item.oilName}}</view>
|
||||
<view class="h_">升数:{{item.shengshu}}L</view>
|
||||
<view class="h_">下单时间:{{item.payTime}}</view>
|
||||
<view class="b-bx">
|
||||
<view class="">应付:¥400.00</view>
|
||||
<view class="">应付:¥{{item.goodsMoney}}</view>
|
||||
<view class="">优惠:¥0.00</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="end-box">实付:¥400.00</view>
|
||||
<view class="end-box">实付:¥{{item.payMoney}}</view>
|
||||
</view>
|
||||
<view style="width: 100%; height: 20px; "></view>
|
||||
|
||||
@ -36,6 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../utils/request";
|
||||
import headers from '../../components/header/headers.vue'
|
||||
|
||||
export default {
|
||||
@ -45,16 +48,23 @@
|
||||
tabindex: 0,
|
||||
tablist: [
|
||||
"全部",
|
||||
"待支付",
|
||||
"已完成",
|
||||
"已取消",
|
||||
]
|
||||
"已退款",
|
||||
"支付失败",
|
||||
],
|
||||
orderList: [],
|
||||
|
||||
form: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// this.actList = ["1", "1", "1", "1", "1", ]
|
||||
// this.status = "nomore" 底部刷新结束
|
||||
this.getPageListByPos();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
@ -69,13 +79,45 @@
|
||||
components: {
|
||||
headers
|
||||
},
|
||||
|
||||
methods: {
|
||||
getindex(index) {
|
||||
this.tabindex == index
|
||||
this.orderList = []
|
||||
this.tabindex = index
|
||||
|
||||
if (index == 0) {
|
||||
this.form.status = ''
|
||||
} else if (index == 1) {
|
||||
this.form.status = 'paid'
|
||||
} else if (index == 2) {
|
||||
this.form.status = 'refund'
|
||||
} else if (index == 3) {
|
||||
this.form.status = 'unpaid'
|
||||
}
|
||||
|
||||
this.getPageListByPos()
|
||||
|
||||
|
||||
},
|
||||
goback() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
getPageListByPos() {
|
||||
request({
|
||||
url: 'business/allOrderInfo/getPageListByPos',
|
||||
method: 'get',
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.orderList = res.data.records;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user