This commit is contained in:
cun-nan 2024-01-24 17:10:37 +08:00
parent bd95204bb0
commit 803e28bdcd
15 changed files with 170 additions and 22 deletions

View File

@ -274,4 +274,14 @@ public class OilOrderController extends BaseController {
public ResponseObject getOilOrderInfo(@PathVariable Integer id){
return getSuccessResult(orderService.selectOilOrderDescByOrderId(id));
}
/**
* 根据订单id修改订单评价
* @param order
* @return
*/
@PutMapping("editOilOrder")
public ResponseObject editOilOrderRemark(@RequestBody OilOrder order){
return getSuccessResult(orderService.editOilOrder(order));
}
}

View File

@ -3,6 +3,7 @@ package com.fuint.business.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -53,6 +54,7 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date payTime;
/**
* 付款方式数据字典

View File

@ -3,6 +3,7 @@ package com.fuint.business.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -65,6 +66,7 @@ public class CardValueChildOrder extends BaseEntity implements Serializable {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date payTime;
/**
* 用户备注

View File

@ -3,6 +3,7 @@ package com.fuint.business.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -93,6 +94,7 @@ public class CashierOrder extends BaseEntity implements Serializable {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date payTime;
/**
* 退款备注

View File

@ -3,6 +3,7 @@ package com.fuint.business.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -92,6 +93,7 @@ public class LJOrder extends BaseEntity implements Serializable {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date payTime;
/**
* 操作员工

View File

@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.io.Serializable;
@ -105,6 +107,7 @@ public class OilOrder extends BaseEntity implements Serializable {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date payTime;
/**
* 富友订单号

View File

@ -3,6 +3,7 @@ package com.fuint.business.order.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -77,6 +78,7 @@ public class ReturnRecord extends BaseEntity implements Serializable {
/**
* 支付时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date payTime;
}

View File

@ -74,7 +74,7 @@
and order_status = #{order.orderStatus}
</if>
<if test="order.remark != null and order.remark != ''">
and remark = #{order.remark}
and order_status = 'paid' and remark is null or remark = '' and order_status = 'paid'
</if>
<if test="order.payType != null and order.payType != ''">
and pay_type = #{order.payType}

View File

@ -157,4 +157,11 @@ public interface OilOrderService extends IService<OilOrder> {
* @return
*/
OilOrderVo selectOilOrderDescByOrderId(Integer orderId);
/**
* 小程序添加订单评论信息
* @param oilOrder
* @return
*/
int editOilOrder(OilOrder oilOrder);
}

View File

@ -1616,4 +1616,11 @@ return stringDoubleMap;
public OilOrderVo selectOilOrderDescByOrderId(Integer orderId) {
return baseMapper.selectOilOrderDescByOrderId(orderId);
}
@Override
public int editOilOrder(OilOrder oilOrder) {
OilOrder oilOrder1 = this.selectOilOrderById(oilOrder.getId());
oilOrder1.setRemark(oilOrder.getRemark());
return baseMapper.updateById(oilOrder1);
}
}

View File

@ -308,7 +308,7 @@
<div v-else>{{ item.memberPrice }}</div>
<div>
<el-input-number v-model="item.num" size="small" controls-position="right"
@change="handleChange" :min="1" :max="10"></el-input-number>
@change="handleChange" :min="1" :max="10000"></el-input-number>
</div>
<div @click="delGoods(index)"><i class="el-icon-circle-close" style="font-size: 22px"></i></div>
</div>
@ -802,6 +802,7 @@
import {addCreditUnit, listCreditUnit} from "@/api/cashier/creditunit";
import {getSysConfig} from "@/api/staff/user/sysconfig";
import {cashierOrderByOrderNo} from "@/api/cashier/cashierorder";
import {getLodop} from "@/api/LodopFuncs";
const cityOptions = ['上海', '北京'];
export default {
@ -1120,11 +1121,80 @@
},
methods:{
async printLocally() {
const printHTML = document.querySelector('#reportSuccess').innerHTML
//
window.document.body.innerHTML = printHTML
window.print() // window
window.location.reload() //
//
let LODOP = getLodop(); //
LODOP.PRINT_INIT();
var bodyStyle = `<style>
.input-box{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.box-ge{
border-bottom: 1px solid #000000 ;
box-sizing: border-box;
padding: 10px;
}
.box-title{
font-size: 18px;
text-align: center;
align-items: center;
margin-top: 15px;
}
.input-hui{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
}
.input-hui-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 15px 0px;
background: #b2b2b2;
box-sizing: border-box;
padding: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
.input-box-frou{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
div{
width: 25%;
text-align: left;
}
}
</style>
`
var fromHtml = bodyStyle+this.$refs.report.innerHTML
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
// let preview = LODOP.PREVIEW();
// console.log("preview",preview);
LODOP.PRINT();
},
clear(){
@ -2433,6 +2503,7 @@
_this.loading = false;
_this.isPay = true;
_this.isPaySuccess = true;
_this.printLocally()
_this.resetting1();
},3000)
}else {
@ -2449,15 +2520,18 @@
return;
}
let isPaySuccess = false;
await addLJGoods(_this.map).then( response => {
_this.orderNo = response.data.orderNo;
if (response.data.oilOrder!=null){
console.log(123,response.data.oilOrder)
if (response.data.oilOrder.orderStatus == "paid"){
_this.isPaySuccess = true;
isPaySuccess = true
_this.isPay = true;
_this.seekZero = 0
_this.amount = 0
_this.resetting1()
for (let i =0;i<_this.oilPreferentialData.length;i++){
_this.oilPreferentialData[i].oilPreferential.storeId = response.data.oilOrder.storeId
_this.oilPreferentialData[i].oilPreferential.userId = response.data.oilOrder.userId
@ -2465,17 +2539,19 @@
usePaymentActive(_this.oilPreferentialData[i].oilPreferential).then(res => {})
}
_this.printLocally()
_this.resetting1()
return;
}
}
if (response.data.goodsOrder!=null){
if (response.data.goodsOrder.status == "paid"){
_this.isPaySuccess = true;
isPaySuccess = true
_this.isPay = true;
_this.seekZero = 0
_this.amount = 0
_this.resetting1()
_this.printLocally()
_this.resetting1()
return;
}
}
@ -2493,9 +2569,11 @@
}
})
this.loading = true;
_this.queryPayStatus();
if ( !isPaySuccess ){
await _this.queryPayStatus();
_this.resetting1();
}
},
resetting1(){
let _this = this;

View File

@ -83,7 +83,7 @@
</view>
<view class="but-box">
<view class="huis">订单时间</view>
<view class="" v-if="item.orderStatus=='paid'">{{parseTime(item.payTime)}}</view>
<view class="" v-if="item.orderStatus=='paid'">{{item.payTime}}</view>
<view class="" v-else>{{item.createTime}}</view>
</view>
<view class="but-box">

View File

@ -30,7 +30,7 @@
</view> -->
<u--textarea v-model="value1" placeholder="请输入内容"></u--textarea>
</view>
<view class="anniu">
<view class="anniu" @click="editOilOrder">
<text>提交</text>
</view>
@ -75,6 +75,9 @@
baseUrl: this.$baseUrl,
}
},
onLoad(e){
this.orderId = e.orderId
},
onShow() {
this.getUser()
},
@ -82,6 +85,21 @@
},
methods: {
editOilOrder(){
let remark = "评分:"+this.value+"分,"+this.value1
request({
url: 'business/oilOrder/editOilOrder',
method: 'put',
data: {"id":this.orderId,"remark":remark},
}).then(res => {
if (res.data==1) {
uni.showToast({
title:"评论成功"
})
this.goback()
}
})
},
//
getUser(){
request({

View File

@ -48,15 +48,19 @@
<view class="hui-size">储值卡或囤油卡消费金额</view>
<view class="">{{oilOrder.orderAmount - oilOrder.discountAmount - oilOrder.payAmount}}</view>
</view>
<view class="dis-fx">
<view class="hui-size">加油数量</view>
<view class="">{{oilOrder.oilNum}}</view>
</view>
<!-- <view class="box-title">优惠信息</view> -->
<view class="dis-fx" v-if="oilOrder.discountAmount>0">
<view class="hui-size">优惠金额</view>
<view class="">{{oilOrder.discountAmount}}</view>
</view>
<view class="dis-fx">
<view class="hui-size">加油数量</view>
<view class="">{{oilOrder.oilNum}}</view>
</view>
<view class="dis-fx" v-if="oilOrder.payTime">
<view class="hui-size">交易时间</view>
<view class="">{{oilOrder.payTime}}</view>
</view>
</view>
<view class="anniu" v-if="oilOrder.orderStatus=='paid' && oilOrder.remark" @click="gocomment()">
@ -115,7 +119,7 @@
},
gocomment() {
uni.navigateTo({
url: '/pagesMy/comment/comment'
url: '/pagesMy/comment/comment?orderId=' + this.orderId
})
},
goback() {

View File

@ -52,10 +52,15 @@
</view>
<view class="but-box" @click="goOrderInfo(item.id)">
<view class="huis">订单时间</view>
<view class="" v-if="item.orderStatus=='paid'">{{parseTime(item.payTime)}}</view>
<view class="" v-if="item.orderStatus=='paid'">{{item.payTime}}</view>
<view class="" v-else>{{item.createTime}}</view>
</view>
<view v-if="item.orderStatus=='paid' && item.remark" class="end-box" @click="goComment()">
<view v-if="item.orderStatus=='paid' && item.remark==null" class="end-box" @click="goComment(item.id)">
<view class="anniu">
<text>去评价</text>
</view>
</view>
<view v-if="item.orderStatus=='paid' && item.remark==''" class="end-box" @click="goComment(item.id)">
<view class="anniu">
<text>去评价</text>
</view>
@ -171,6 +176,9 @@
this.getStores()
// this.getPayList()
},
onShow() {
this.getTapIndex(0)
},
components: {
},
@ -336,6 +344,9 @@
})
},
getTapIndex(index) {
this.orderList = []
this.list = []
this.total = 0
this.tapindex = index
if (this.tapindex == 0) {
this.map = {
@ -413,9 +424,9 @@
url: '/pagesMy/details/details?orderId=' + orderId,
})
},
goComment() {
goComment(orderId) {
uni.navigateTo({
url: "/pagesMy/comment/comment"
url: "/pagesMy/comment/comment?orderId=" + orderId,
})
},
goBack() {