打印处理

This commit is contained in:
wangh 2024-01-23 14:19:35 +08:00
parent 63ec546d5c
commit 5aa43002fd
24 changed files with 285 additions and 94 deletions

View File

@ -139,19 +139,6 @@ public class IntegralOrdersController extends BaseController {
/**
*
* 礼品订单
*
* 判断积分是否足够
*
* 增加订单之前首先判断是否还存在 库存
*
* 增加积分订单
*
* 减去积分商城库存
*
* 减去商品库存
*
* 减去用户积分
*
*/
@PostMapping("integralOrdersProcessing")

View File

@ -443,7 +443,7 @@
</update>
<update id="updatePaymentType">
update integral_orders set status = '1' where order_number = #{orderNumber}
update integral_orders set processing_status = '1' where order_number = #{orderNumber}
</update>
<select id="queryIntegralOrdersByOrderNo">

View File

@ -177,13 +177,6 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
integralOrdersList.setStoreId(nowAccountInfo.getStoreId());
// 首先判断是否足够积分
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(integralOrdersList.getIntegralOrdersList().get(0).getUserId(), nowAccountInfo.getChainStoreId());
if (ObjectUtil.isEmpty(ljUserVos)) {
// 个人信息为空时初始化
// return
// userBalanceService.initBalance(integralOrdersList.getIntegralOrdersList().get(0).getUserId(), nowAccountInfo.getChainStoreId());
// ljUserVos = ljUserMapper.selectAllInfoById2(integralOrdersList.getIntegralOrdersList().get(0).getUserId(), nowAccountInfo.getChainStoreId());
}
if (ljUserVos.getPoints() < integralOrdersList.getAllPoints()) {
integralOrdersList.getIntegralOrdersList().get(0).setStatus("un");
return integralOrdersList.getIntegralOrdersList().get(0);
@ -456,7 +449,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService {
// 首先判断是否足够积分
LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(nowAccountInfo.getId(), integralOrdersList.getChainStoreId());
if (ljUserVos.getPoints() < integralOrdersList.getAllPoints()) {
if (ljUserVos.getPoints() <= integralOrdersList.getAllPoints()) {
integralOrdersList.getIntegralOrdersList().get(0).setStatus("un");
applet.put("code", "error");
applet.put("msg", "积分不足");

View File

@ -43,8 +43,10 @@ import com.fuint.business.member.service.ILJStaffService;
import com.fuint.business.order.entity.AllOrderInfo;
import com.fuint.business.order.entity.CardBalanceChange;
import com.fuint.business.order.entity.CashierOrder;
import com.fuint.business.order.entity.GrowthValueChange;
import com.fuint.business.order.service.AllOrderInfoService;
import com.fuint.business.order.service.CardBalanceChangeService;
import com.fuint.business.order.service.GrowthValueChangeService;
import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.userManager.entity.UserBalance;
@ -415,6 +417,9 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
CardValueChildMapper cardValueChildMapper;
@Resource
GrowthValueChangeService growthValueChangeService;
/**
* 查询支付状态 修改相关关联表
* @param id
@ -470,7 +475,18 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
integralDetailService.insert2(integralDetail);
}
// 成长值变动明细
if (!ObjectUtil.isEmpty(cardValueRecord.getGrowthValue()) && cardValueRecord.getGrowthValue() != 0) {
GrowthValueChange growthValueChange = new GrowthValueChange();
growthValueChange.setUserId(cardValueRecord.getMtUserId());
growthValueChange.setChainStoreId(cardValueRecord.getChainStoreId());
growthValueChange.setStoreId(cardValueRecord.getStoreId());
growthValueChange.setFromType("余额充值赠送");
growthValueChange.setGrowthValue(cardValueRecord.getGrowthValue());
growthValueChange.setOrderNo(cardValueRecord.getPaymentNo());
growthValueChange.setAfterTheChange(userBalance.getGrowthValue());
growthValueChangeService.insertGrowthValueChange(growthValueChange);
}
// 员工提成
if (ObjectUtil.isNotEmpty(cardValueRecord.getMtStaffId()) && !ObjectUtil.isEmpty(cardValueRecord.getRoyaltyType()) && !"1".equals(cardValueRecord.getRoyaltyType())) {
CommissionRecord commissionRecord = employeeCommissions(cardValueRecord);

View File

@ -6,7 +6,7 @@
select sum(pay_money)
from all_order_info
<where>
dept_id IN
store_id IN
<foreach collection="list" item="list" separator="," open="(" close=")">
#{list.storeId}
</foreach>

View File

@ -454,11 +454,15 @@ public class HandoverRecordServiceImpl implements HandoverRecordService {
}
private static final String LOAD_LIBRARY = "TSCLIB";
@Override
public void printLocally(Map<String, Object> handover) {
}
//打印机
// private static final String print_model = "58130IVC";
@Override
public void printLocally(Map<String, Object> handover) {
// @Override
public void printLocally2(Map<String, Object> handover) {
Map<String, Object> baseInfo = (Map<String, Object>)handover.get("baseInfo");
Map<String, Object> orderSummary = (Map<String, Object>)handover.get("orderSummary");

View File

@ -4,6 +4,7 @@ import com.fuint.repository.bean.StoreDistanceBean;
import com.fuint.business.store.entity.MtStore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.system.dept.entity.SysDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -14,6 +15,7 @@ import java.util.List;
* Created by FSQ
* CopyRight https://www.fuint.cn
*/
@Mapper
public interface MtStoreMapper extends BaseMapper<MtStore> {
MtStore queryStoreByName(@Param("name") String name);

View File

@ -47,21 +47,10 @@
</where>
</update>
<update id="editStatusBydeptIdList">
update mt_store
set status = 'jy'
<where>
contract_dept_id IN
<foreach collection="list" item="list" separator="," open="(" close=")">
#{list.deptId}
</foreach>
</where>
</update>
<update id="editStatusByExpirationTime">
update mt_store
set status = 'jy'
where expiration_time > NOW() and status = 'qy'
</update>
<update id="ifDeleteByDeptId" parameterType="java.lang.Long">
update mt_store
set if_delete = '1'

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.store.mapper.MtStoreMapper">
<update id="editStatusBydeptIdList" parameterType="java.util.List">
update mt_store
set status = 'jy'
where contract_dept_id IN
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item.deptId}
</foreach>
</update>
<update id="editStatusByExpirationTime">
update mt_store
set status = 'jy'
where expiration_time &lt; NOW() and status = 'qy' and expiration_time is not null
</update>
</mapper>

View File

@ -488,6 +488,7 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
AllOrderInfoMapper allOrderInfoMapper;
// 将流水上限和时间上限的部门全部设置为不可用
@Override
@Transactional
public void flowflowConfiguration() {
// 查询第三方 的所有部门
LambdaQueryWrapper<SysDept> sysDeptWrapper = Wrappers.lambdaQuery();
@ -503,8 +504,11 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
LambdaQueryWrapper<MtStore> storeWrapper = Wrappers.lambdaQuery();
storeWrapper.eq(MtStore::getContractDeptId,sysDeptsList);
List<MtStore> mtStores = mtStoreMapper.selectList(storeWrapper);
BigDecimal bigDecimal = new BigDecimal("0");
// 计算总流水
BigDecimal bigDecimal = allOrderInfoMapper.allStream(mtStores);
if (ObjectUtil.isNotEmpty(mtStores)) {
bigDecimal = allOrderInfoMapper.allStream(mtStores);
}
if (bigDecimal.compareTo(sysDept.getTurnoverLimit()) >= 0) {
// 设置当前部门为禁用
@ -527,14 +531,13 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
// 将有油站设置为未启用
mtStoreMapper.editStatusBydeptIdList(sysDeptsList);
}
}
}
}
// 将过期油站设置为不可用
@Override
@Transactional
public void petrolStationsAreExpired() {
// 直接修改
mtStoreMapper.editStatusByExpirationTime();

View File

@ -45,7 +45,8 @@ public class QuartzConfig {
// .withIdentity("jyTrigger", "jyTriggerGroup")
// //.withSchedule(SimpleScheduleBuilder.simpleSchedule())
// .startAt(statTime) //默认当前时间启动 ,也可以写为.startNow();
// .withSchedule(CronScheduleBuilder.cronSchedule("0/2 * * * * ?")) //两秒执行一次
// .withSchedule(CronScheduleBuilder.cronSchedule("0 0 0 * * *")) //0点执行执行一次
//// .withSchedule(CronScheduleBuilder.cronSchedule("0/2 * * * * ?")) //两秒执行一次
// .build();
//5.注册任务和定时器
@ -56,11 +57,11 @@ public class QuartzConfig {
// }
//6.启动 调度器
try {
scheduler.start();
} catch (SchedulerException e) {
e.printStackTrace();
}
// try {
// scheduler.start();
// } catch (SchedulerException e) {
// e.printStackTrace();
// }
log.info("启动时间 " + new Date());
}

View File

@ -0,0 +1,30 @@
package com.fuint.business.store.task;
import com.fuint.business.store.service.StoreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component
@Slf4j
public class storeConfigTask {
@Resource
StoreService storeService;
// @Scheduled(cron="0/5 * * * * ? ") // 一秒钟执行一次
// @Scheduled(cron="0 * * * * ?") // 一分钟执行一次
@Scheduled(cron="0 0 0 * * *")
public void storeTask(){
log.info("24点定时任务执行中...(店铺设置禁用)");
// 将流水上限和时间上限的部门全部设置为不可用
storeService.flowflowConfiguration();
// // 将过期油站设置为不可用
storeService.petrolStationsAreExpired();
}
}

View File

@ -4,6 +4,7 @@ import com.fuint.business.store.controller.BackendStoreController;
import com.fuint.business.store.service.StoreService;
import org.quartz.*;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.Scheduled;
import javax.annotation.Resource;
@ -19,11 +20,13 @@ public class streamTask implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
// 执行任务的逻辑
System.out.println("24点定时任务执行中...");
// 将流水上限和时间上限的部门全部设置为不可用
storeService.flowflowConfiguration();
// 将过期油站设置为不可用
storeService.petrolStationsAreExpired();
// // 执行任务的逻辑
// System.out.println("24点定时任务执行中...");
// // 将流水上限和时间上限的部门全部设置为不可用
// storeService.flowflowConfiguration();
// // 将过期油站设置为不可用
// storeService.petrolStationsAreExpired();
}
}

View File

@ -2,7 +2,9 @@ package com.fuint.business.userManager.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.vo.UserBalanceVo;
public interface UserBalanceMapper extends BaseMapper<UserBalance> {
int subtractUserBalanceByLock(UserBalanceVo balance);
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.userManager.mapper.UserBalanceMapper">
<update id="subtractUserBalanceByLock">
update mt_user_balance
<set>
<if test="changeCardBalance != null ">
card_balance = card_balance - #{changeCardBalance}
</if>
<if test="changePoints != null ">
points = points- #{changePoints}
</if>
<if test="changeGrowthValue != null ">
growth_value = growth_value - #{changeGrowthValue}
</if>
</set>
where id = #{id}
</update>
</mapper>

View File

@ -10,13 +10,16 @@ import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.UserBalanceMapper;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.vo.UserBalanceVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.RedisLock;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* 会员储值卡信息 业务层
@ -52,6 +55,48 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
return row;
}
public int addUserBalanceByLock(UserBalanceVo balance) {
int row = baseMapper.updateById(balance);
return row;
}
@Resource
RedisLock redisLock;
public int subtractUserBalanceByLock(UserBalanceVo balance) {
String lockKey = "userChangeBalance"+balance.getMtUserId()+balance.getChainStoreId();
Boolean flag = redisLock.tryLock(lockKey, 5001, 5000, TimeUnit.MILLISECONDS);
if (flag) {
UserBalance userBalance = selectUserBalance(balance.getMtUserId(), balance.getChainStoreId());
if (ObjectUtil.isEmpty(userBalance)) throw new RuntimeException("暂无用户信息!");
if (ObjectUtil.isNotEmpty(balance.getChangeCardBalance())) {
if (balance.getChangeCardBalance().compareTo(userBalance.getCardBalance())>0) {
throw new RuntimeException("用户余额不足!");
}
}
if (ObjectUtil.isNotEmpty(balance.getChangePoints())) {
if (balance.getChangeCardBalance().compareTo(userBalance.getCardBalance())>0) {
throw new RuntimeException("用户积分不足!");
}
}
if (ObjectUtil.isNotEmpty(balance.getChangeGrowthValue())) {
if (balance.getChangeGrowthValue().compareTo(userBalance.getGrowthValue())>0) {
throw new RuntimeException("用户成长值不足!");
}
}
balance.setId(userBalance.getId());
int row = baseMapper.subtractUserBalanceByLock(balance);
redisLock.unlock(lockKey);
return row;
}
return 0;
}
@Override
public List<UserBalance> selectUserBalance(int userId) {
QueryWrapper queryWrapper = new QueryWrapper<>();

View File

@ -0,0 +1,21 @@
package com.fuint.business.userManager.vo;
import com.fuint.business.userManager.entity.UserBalance;
import lombok.Data;
@Data
public class UserBalanceVo extends UserBalance {
/**
* 余额变化
*/
private Double changeCardBalance;
/**
* 积分变化
*/
private Integer changePoints;
/**
* 成长值变化
*/
private Integer changeGrowthValue;
}

View File

@ -101,15 +101,15 @@ public interface SysDeptMapper extends BaseMapper<SysDept>
/**
* 查询所有过期
*/
SysDept selectStatusByTurnoverTime(Long deptId);
SysDept selectStatusByTurnoverTime(@Param("deptId") Long deptId);
/**
* 查询是否过期 直接将过期的部门设置为未启用
*/
int updateStatusByTurnoverTime();
int updateStatusById(Long deptId);
int updateStatusById(@Param("deptId") Long deptId);
int updateStatusByList(@Param("sysDeptsList") List<SysDept> sysDeptsList);
int updateStatusByList(@Param("list") List<SysDept> sysDeptsList);
}

View File

@ -96,9 +96,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<select id="selectStatusByTurnoverTime" resultType="com.fuint.system.dept.entity.SysDept">
select * from sys_dept where turnover_time > NOW() and turnoverType = 2 and status = 'qy'
select * from sys_dept where turnover_time > NOW() and turnover_type = 2 and status = 'qy'
<if test="deptId != null">
dept_id = #{deptId}
and dept_id = #{deptId}
</if>
</select>
@ -108,12 +108,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_dept set status = 'jy' where turnover_time > NOW() and turnoverType = 2
</update>
<update id="updateStatusById">
update sys_dept set status = 'jy' where deptId = #{deptId}
update sys_dept set status = 'jy' where dept_id = #{deptId}
</update>
<!-- where deptId = #{deptId}-->
<update id="updateStatusByList">
update sys_dept set status = 'jy' where deptId = #{deptId}
update sys_dept set status = 'jy'
<where>
dept_id IN
<foreach collection="list" item="list" separator="," open="(" close=")">

View File

@ -1,7 +1,7 @@
<!--发票-->
<template>
<div class="app-center">
<div class="box-center">
<div id="report" ref="report" class="box-center">
<div class="box-title">交班统计</div>
<div class="box-ge">
<div class="input-box">
@ -378,7 +378,6 @@
</div>
</el-card>
</div>
</div>
</template>
@ -496,11 +495,18 @@ import {removeUserId} from "@/utils/auth";
}
});
},
printLocally() {
printLocallyApi(this.handoverList).then(res=>{
async printLocally() {
const printHTML = document.querySelector('#report').innerHTML
//
window.document.body.innerHTML = printHTML
window.print() // window
window.location.reload() //
})
},
//
async shift() {
let msg = '交班并退出系统, 是否继续?'
@ -699,6 +705,37 @@ import {removeUserId} from "@/utils/auth";
</script>
<style scoped lang="scss">
#report {
/* 打印时缩放,防止页面溢出 */
//zoom: 0.6;
}
@media print {
@page {
margin: 1000px;
/* size: A4 landscape; size: landscape横向size: portrait;纵向,如果不设置,则页面有横向和纵向的选择框 */
}
//.box-center{
// margin: 20cm;
// zoom: 0.1;
//}
//#report {
// //margin: 20cm;
// margin: 0 auto;
// /* */
// zoom: 0.5;
//
//}
.cover{
display: block;
}
//
}
.app-center{
width: 100%;

View File

@ -20,7 +20,7 @@
<view class="t-b-box">
<view class="goodsimg">
<image :src="baseUrl+form.coverImage" mode="aspectFit"></image>
<image :src="baseUrl+form.coverImage" mode="aspectFit"></image>
</view>
<view class="right-r-box">
<view class="-title">{{form.giftName}}</view>
@ -51,7 +51,7 @@
<view class="right-size" v-if="form.shippingType == '物流配送'">
<span>{{form.courierCompanies}}:{{form.theTrackingNumber}}</span>
<span>{{form.courierCompanies?form.courierCompanies:'暂无物流信息'}}:{{form.theTrackingNumber?form.theTrackingNumber:''}}</span>
</view>
<view v-else class="right-size">门店自提</view>
</view>
@ -75,7 +75,7 @@
</u-steps-item>
<u-steps-item title="已发货" :desc="form.shippingTime?form.shippingTime:'--'">
</u-steps-item>
<u-steps-item title="运输中"></u-steps-item>
<u-steps-item :title="this.form.orderStatus"></u-steps-item>
</u-steps>
</view>
@ -106,7 +106,8 @@
shippingType: '',
amount: '',
courierCompanies: '',
theTrackingNumber: ''
theTrackingNumber: '',
orderStatus: ''
}
}
@ -118,6 +119,8 @@
onShow() {
uni.$on('pointsGoodsDetails', (data) => {
this.pointsGoodsDetails = data
console.log("this.pointsGoodsDetails", this.pointsGoodsDetails)
if (this.pointsGoodsDetails != null) {
// this.dataProcessing()
this.form.orderNumber = this.pointsGoodsDetails.orderNumber
@ -132,6 +135,7 @@
this.form.shippingType = this.pointsGoodsDetails.shippingType
this.form.courierCompanies = this.pointsGoodsDetails.courierCompanies
this.form.theTrackingNumber = this.pointsGoodsDetails.theTrackingNumber
this.form.orderStatus = this.pointsGoodsDetails.orderStatus
//
if (this.pointsGoodsDetails.orderStatus) {

View File

@ -19,7 +19,7 @@
</view>
</view>
<view class="tp">
<image src="../../static/imgs/hby.png" mode="aspectFit"></image>
<image src="../../static/imgs/hby.png" mode="aspectFit"></image>
</view>
</view>
@ -70,15 +70,18 @@
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
@click="godetails(item)">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode="aspectFit"></image>
<image :src="baseUrl+item.coverImage" mode="aspectFit"></image>
</view>
<view class="goods-title">
{{item.giftName}}
</view>
<view class="hui-time">
库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}}
</view>
<view class="good-red">
<view style="display: flex;align-items: center;">
<view class="bi" v-if="item.exchangeMethod != '金额'">
<image src="../../static/imgs/jb.png" mode="aspectFit"></image>
<image src="../../static/imgs/jb.png" mode="aspectFit"></image>
</view>
<view style="color: #FC1708;font-weight: bold;">
<span
@ -88,9 +91,7 @@
v-if="item.exchangeMethod == '金额' || item.exchangeMethod == '积分+金额'">{{item.exchangeAmount}}</span>
</view>
</view>
<view class="hui-time">
库存:{{item.remainingInventory === -1?"不限":item.remainingInventory}}
</view>
</view>
<view class="anniux">
<text v-if="!item.remainingInventory || item.remainingInventory==0"

View File

@ -22,11 +22,11 @@
<view class="goods-box" v-for="(item,index) in orderList" :key="item.id" @click="orderDetails(item)">
<view class="goods-top">
<view class="goods-img">
<image :src="baseUrl+item.coverImage" mode="aspectFit"></image>
<image :src="baseUrl+item.coverImage" mode="aspectFit"></image>
</view>
<view class="nr-tip">
<view class="title-s">{{item.giftName}}</view>
<view class="hui-s">{{item.createTime}}</view>
<view class="hui-s">{{item.createTime}} {{item.orderType==0?"(商城兑换)":"(积分兑换)"}}</view>
<view class="right-size">
<view class="jg">
{{item.amount?"¥"+item.amount:''}}

View File

@ -17,7 +17,7 @@
<view class="dis">
<!-- <uni-icons type="location-filled" size="20"></uni-icons> -->
<view class="boximg">
<image :src="logo?baseUrl+logo:'../../static/logo.png'" mode="aspectFit"></image>
<image :src="logo?baseUrl+logo:'../../static/logo.png'" mode="aspectFit"></image>
</view>
<view class="">
<view class="">{{storeName}}</view>
@ -35,14 +35,20 @@
<view class="dis">
<uni-icons type="location-filled" color="#666666" size="30" style="margin-right: 5px;"></uni-icons>
<view class="">
<view class="">家庭住址</view>
<view v-if="addrInfo" class="">
<view class="">{{addrInfo.name}}--{{addrInfo.mobile}}</view>
<view class="hui-time">
<!-- 山东省济南市槐荫区兴福路 -->
{{addrInfo.address}}
</view>
</view>
<view v-else class="">
<view class="">请选择家庭住址</view>
<!-- <view class="hui-time">
</view> -->
</view>
</view>
<view class="">
<uni-icons type="right" size="20"></uni-icons>
@ -52,7 +58,7 @@
<view class="box-bait">
<view class="dis-box">
<view class="goodsimg">
<image :src='baseUrl+goodsInfo.coverImage' mode="aspectFit"></image>
<image :src='baseUrl+goodsInfo.coverImage' mode="aspectFit"></image>
</view>
<view class="">
<view class="">{{goodsInfo.giftName}}</view>
@ -215,6 +221,12 @@
return
}
if (_this.appltType == "WECHAT") {
_this.paymentType = "WECHAT"
} else {
_this.paymentType = "ALIPAY"
}
let integralOrders = {
giftId: this.goodsInfo.id,
amount: _this.allAmout,
@ -228,8 +240,8 @@
}
if (this.shippingType == "物流配送") {
if (addrInfo) {
integralOrders.addressId = addrInfo.id
if (this.addrInfo) {
integralOrders.addressId = this.addrInfo.id
} else {
uni.showToast({
title: "请填写配送信息!",
@ -360,7 +372,6 @@
// let flag = await this.checkTheRedemptionLimit(this.goodsInfo.id)
let flag = await this.enquiryForCollection(this.goodsInfo.id)
let num = e.value + Number(flag)
console.log("123123", num);
//
if (num > this.goodsInfo.exchangeTimes) {
uni.showToast({
@ -368,9 +379,6 @@
icon: "none"
})
console.log("exchangeTimes", this.goodsInfo.exchangeTimes)
console.log("flag", flag)
e.value = this.goodsInfo.exchangeTimes - flag
this.value = this.goodsInfo.exchangeTimes - flag
@ -394,17 +402,23 @@
this.flag = true
this.allData()
} else {
this.flag = false
this.value = e.value
this.allData()
}
},
transferIndex(index) {
// this.qhindex = index
const deliveryData = JSON.parse(this.goodsInfo.deliveryMethod);
console.log("deliveryData", deliveryData)
if (deliveryData.length >= 2) {
deliveryData[0] = '门店自提'
deliveryData[1] = '物流配送'
this.shippingType = deliveryData[index]
this.qhindex = index
} else if (deliveryData[0] == '门店自提') {
@ -454,8 +468,6 @@
) {
console.log("11111111")
this.allAmout = this.goodsInfo.shippingFeeAmount
}
console.log("allAmout", this.allAmout)
@ -514,8 +526,8 @@
getAddr() {
request({
async getAddr() {
await request({
url: 'business/userManager/mtUserExpressAddress/getList',
method: 'get',
}).then((res) => {