收银台打印小票

This commit is contained in:
齐天大圣 2024-10-30 14:28:13 +08:00
parent a5fc7fbe9a
commit 4e3d502ae5
9 changed files with 86 additions and 9 deletions

View File

@ -79,4 +79,12 @@ export function cardValueRecordList(data) {
params: data
})
}
// 订单查询
export function cardValueRecordLists(data) {
return request({
url: 'business/marketingActivity/cardValueRecord/getCardValueByCardValueId',
method: 'post',
params: data
})
}

View File

@ -112,7 +112,10 @@
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
<el-button type="primary" icon="el-icon-search" @click="RecordList()" >搜索</el-button>
@ -128,7 +131,7 @@
>
</el-table-column>
<el-table-column
prop="orderNo"
prop="paymentNo"
label="订单号"
>
</el-table-column>
@ -159,7 +162,7 @@
label="订单状态">
</el-table-column>
<el-table-column
prop="payTime"
prop="updateTime"
label="订单完成时间">
</el-table-column>
</el-table>
@ -837,12 +840,17 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
},
viewOrder(id){
this.orderShow =! this.orderShow
this.order.storeId = id
this.order.cardValueId = id
this.RecordList()
},
RecordList(){
cardValueRecordList(this.addDateRange(this.order,this.dataRange)).then(res=>{
this.orderData = res.data.records
console.log(this.dataRange)
cardValueRecordLists({
cardValueId: this.order.cardValueId,
dataRange: this.dataRange,
orderNo:this.order.orderNo
}).then(res=>{
this.orderData = res.data
this.order.total = res.data.total
})
},
@ -1000,7 +1008,6 @@ import {delLJGoods, listLJGoods} from "@/api/convenienceStore/ljgoods";
// this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2')
submitForm(ruleForm){
this.$refs[ruleForm].validate((valid) => {
console.log(11111)
if (valid) {
this.form.cardValueChildList = this.youhuiquanlist.concat(this.duihuanquanlist);

View File

@ -55,10 +55,10 @@ Vue.prototype.handleTree = handleTree
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
// Vue.prototype.pcUrl = 'http://192.168.31.178:81/'
// Vue.prototype.bkUrl = 'http://192.168.31.178:81/' //跳转油站
Vue.prototype.bkUrl = 'https://www.youkerr.com/' //跳转油站
Vue.prototype.bkUrl = 'http://127.0.0.1:8080/' //跳转油站
Vue.prototype.pcUrl = 'https://www.youkerr.com/' // 收银台
Vue.prototype.bkUrl = 'http://127.0.0.1:8080/' // 收银台
// 全局组件挂载
Vue.component('DictTag', DictTag)
Vue.component('Pagination', Pagination)

View File

@ -0,0 +1,20 @@
package com.fuint.business.marketingActivity.cardFule.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class CardValueConditionVo implements Serializable {
private static final long serialVersionUID = 1L;
//活动名称
private String name;
//活动id
private String cardValueId;
//活动的时间
private String[] dataRange;
//订单号
private String orderNo;
}

View File

@ -4,6 +4,7 @@ package com.fuint.business.marketingActivity.cardValue.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
@ -224,5 +225,11 @@ public class CardValueRecordController extends BaseController {
public ResponseObject orderStatistics( @Param("cardValueRecord") CardValueRecordDTO cardValueRecord){
return getSuccessResult(cardValueRecordService.orderStatistics(cardValueRecord));
}
// 订单统计
@PostMapping("/getCardValueByCardValueId")
public ResponseObject getCardValueByCardValueId(@Param("cardValueConditionVo") CardValueConditionVo cardValueConditionVo){
return getSuccessResult(cardValueRecordService.getCardValueByCardValueId(cardValueConditionVo));
}
}

View File

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.integral.entity.IntegralDetail;
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
import com.fuint.business.marketingActivity.cardValue.vo.Excel.CardValueRecordExcel;
@ -44,5 +45,8 @@ public interface CardValueRecordMapper extends BaseMapper<CardValueRecord> {
IPage<CardValueRecord> selectCardValueRecordList(Page page, @Param("cardValueRecord") CardValueRecord cardValueRecord);
Map<String, Object> getAmountAndConsume(UserBalanceVo record);
List getCardValueByCardValueId(@Param("cardValueConditionVo") CardValueConditionVo cardValueConditionVo,
@Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@ -338,6 +338,21 @@
<!-- where store_id = #{storeId} and mt_user_id = #{userId}-->
<!-- group by chain_store_id
-->
<select id="getCardValueByCardValueId" resultType="com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO">
select
*
from card_value_record
where
card_value_id = #{cardValueConditionVo.cardValueId}
<if test="cardValueConditionVo.orderNo != null and cardValueConditionVo.orderNo != ''">
and payment_no like concat('%', #{cardValueConditionVo.orderNo}, '%')
</if>
<if test="cardValueConditionVo.dataRange != null and cardValueConditionVo.dataRange != ''">
and <![CDATA[update_time>=#{startTime} and pdate_time<=#{endTime}]]>
</if>
</select>
</mapper>

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.api.fuyou.entity.ReturnParameter;
import com.fuint.business.integral.entity.IntegralDetail;
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
@ -106,4 +107,10 @@ public interface CardValueRecordService extends IService<CardValueRecord> {
* @return
*/
List<CardValueRecord> selectRecord();
/**
* 查询充值记录
* @return
*/
List<CardValueRecord> getCardValueByCardValueId(CardValueConditionVo cardValueConditionVo);
}

View File

@ -36,6 +36,7 @@ import com.fuint.business.marketingActivity.cardFule.dto.CardFuelRecordDTO;
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel;
import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService;
import com.fuint.business.marketingActivity.cardFule.service.CardFuelRecordService;
import com.fuint.business.marketingActivity.cardFule.vo.CardValueConditionVo;
import com.fuint.business.marketingActivity.cardValue.dto.CardValueRecordDTO;
import com.fuint.business.marketingActivity.cardValue.dto.SelectCard;
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
@ -80,6 +81,7 @@ import com.fuint.repository.mapper.MtStaffMapper;
import com.fuint.repository.model.MtStaff;
import io.lettuce.core.dynamic.annotation.Param;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.redisson.api.RLock;
@ -1386,5 +1388,12 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
queryWrapper.eq("status","1");
return baseMapper.selectList(queryWrapper);
}
@Override
public List<CardValueRecord> getCardValueByCardValueId(CardValueConditionVo cardValueConditionVo) {
List list=cardValueRecordMapper.getCardValueByCardValueId(cardValueConditionVo,cardValueConditionVo.getDataRange()[0]
,cardValueConditionVo.getDataRange()[1]);
return list;
}
}