bug
This commit is contained in:
parent
58e5f81d8b
commit
d7d8256135
@ -277,6 +277,14 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<br/>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
placement="bottom">
|
||||
<div slot="content">可设置当前员工是否有油品/商品入库、盘点、审核废止等权限</div>
|
||||
<span>可设置当前员工是否有...</span>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -141,7 +141,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="角色组" prop="role">
|
||||
<el-form-item label="角色组" prop="roleId">
|
||||
<el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px">
|
||||
<el-option label="油站站长" :value="12+''" ></el-option>
|
||||
<el-option label="加油员" :value="15+''" ></el-option>
|
||||
@ -320,7 +320,7 @@
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
||||
{ min: 11, max: 20, message: '手机号长度必须11', trigger: 'blur' }
|
||||
],
|
||||
role: [
|
||||
roleId: [
|
||||
{ required: true, message: "请选择员工角色", trigger: "blur" }
|
||||
],
|
||||
isRefuel: [
|
||||
|
@ -49,8 +49,8 @@ public class Const {
|
||||
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
|
||||
|
||||
//异步通知(回调地址)
|
||||
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
|
||||
//下单
|
||||
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";
|
||||
|
@ -110,6 +110,10 @@ public class LJGoods extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("是否在回收站:0不在回收站,1在回收站")
|
||||
private String isRecovery;
|
||||
/**
|
||||
* 是否删除:0未删除,1已删除
|
||||
*/
|
||||
private String ifDelete;
|
||||
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,10 @@ public class StockStatistic extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("成本金额")
|
||||
private Double costAmount;
|
||||
/**
|
||||
* 是否删除:0未删除,1已删除
|
||||
*/
|
||||
private String ifDelete;
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<select id="selectLJGoodsList" resultType="com.fuint.business.convenienceSore.entity.LJGoods">
|
||||
<include refid="selectLJGoods"></include>
|
||||
<where>
|
||||
store_id = #{goods.storeId} and is_recovery = #{goods.isRecovery}
|
||||
store_id = #{goods.storeId} and is_recovery = #{goods.isRecovery} and if_delete = '0'
|
||||
<if test="goods.cvsGoodId != null and goods.cvsGoodId != ''">
|
||||
and cvs_good_id = #{goods.cvsGoodId}
|
||||
</if>
|
||||
@ -44,7 +44,7 @@
|
||||
<update id="subtractGoodesStockByLock">
|
||||
update mt_goods set
|
||||
stock = stock - #{stock}
|
||||
where id = #{id}
|
||||
where id = #{id} and if_delete = '0'
|
||||
|
||||
</update>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<select id="selectStockList" resultType="com.fuint.business.convenienceSore.vo.StockStatisticVo">
|
||||
<include refid="selectStock"></include>
|
||||
<where>
|
||||
st.store_id = #{stock.storeId}
|
||||
st.store_id = #{stock.storeId} and if_delete = '0'
|
||||
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
|
||||
and st.cvs_good_id = #{stock.cvsGoodId}
|
||||
</if>
|
||||
@ -39,14 +39,14 @@
|
||||
parameterType="java.lang.Integer">
|
||||
<include refid="selectStock"></include>
|
||||
<where>
|
||||
st.id = #{id}
|
||||
st.id = #{id} and if_delete = '0'
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectStocks" resultType="com.fuint.business.convenienceSore.vo.StockStatisticVo"
|
||||
parameterType="java.lang.Integer">
|
||||
<include refid="selectStock"></include>
|
||||
<where>
|
||||
st.store_id = #{stock.storeId}
|
||||
st.store_id = #{stock.storeId} and if_delete = '0'
|
||||
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
|
||||
and st.cvs_good_id = #{stock.cvsGoodId}
|
||||
</if>
|
||||
|
@ -66,6 +66,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("is_recovery",0);
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
@ -77,7 +78,10 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
*/
|
||||
@Override
|
||||
public LJGoods selectLJGoodsById(int id) {
|
||||
return baseMapper.selectById(id);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("id",id);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,6 +96,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("goods_no",goodsNo);
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
LJGoods ljGoods = baseMapper.selectOne(queryWrapper);
|
||||
return ljGoods;
|
||||
}
|
||||
@ -142,8 +147,12 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
*/
|
||||
@Override
|
||||
public void deleteLJGoodsById(Integer id) {
|
||||
baseMapper.deleteById(id);
|
||||
stockService.deleteStock(id);
|
||||
LJGoods ljGoods = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(ljGoods)){
|
||||
ljGoods.setIfDelete("1");
|
||||
baseMapper.updateById(ljGoods);
|
||||
stockService.deleteStock(id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -153,6 +162,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
*/
|
||||
@Override
|
||||
public int insertLJGoods(LJGoods goods) {
|
||||
goods.setIfDelete("0");
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
Integer storeId = nowAccountInfo.getStoreId();
|
||||
goods.setStoreId(storeId);
|
||||
@ -165,6 +175,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
stock.setSupplierId(goods.getSupplierId());
|
||||
Double costAmount = goods.getBuyingPrice()*goods.getStock();
|
||||
stock.setCostAmount(costAmount);
|
||||
stock.setIfDelete("0");
|
||||
stockService.insertStock(stock);
|
||||
// 查询插入的库存统计信息
|
||||
StockStatistic stockStatistic = stockService.selectStockByGoodsId(goods.getId());
|
||||
@ -267,7 +278,7 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
|
||||
RedisLock redisLock;
|
||||
/**
|
||||
* 减少商品库存
|
||||
* @param goods
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.convenienceSore.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -66,6 +67,7 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
public StockStatistic selectStockByGoodsId(int goodsId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("goods_id",goodsId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
StockStatistic stockStatistic = baseMapper.selectOne(queryWrapper);
|
||||
return stockStatistic;
|
||||
}
|
||||
@ -77,6 +79,7 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
*/
|
||||
@Override
|
||||
public int insertStock(StockStatistic stock) {
|
||||
stock.setIfDelete("0");
|
||||
int row = baseMapper.insert(stock);
|
||||
return row;
|
||||
}
|
||||
@ -90,7 +93,11 @@ public class StockStatisticServiceImpl extends ServiceImpl<StockStatisticMapper,
|
||||
public void deleteStock(Integer goodsId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("goods_id",goodsId);
|
||||
baseMapper.delete(queryWrapper);
|
||||
StockStatistic stockStatistic = baseMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(stockStatistic)){
|
||||
stockStatistic.setIfDelete("1");
|
||||
baseMapper.updateById(stockStatistic);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -143,7 +143,7 @@
|
||||
储值卡
|
||||
<span>(账户余额:{{ balance }}元)</span>
|
||||
</div>
|
||||
<div>-¥{{ consumeAmount }}</div>
|
||||
<div>-¥{{ consumeAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && couponDiscount.length>0">
|
||||
<div>
|
||||
@ -783,7 +783,7 @@
|
||||
</div>
|
||||
<div class="input-box" v-if="isMember">
|
||||
<div>储值卡或囤油卡付款</div>
|
||||
<div>¥{{ consumeAmount }}</div>
|
||||
<div>¥{{ consumeAmount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
@ -1134,6 +1134,15 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
dialogVisiblej(newValue) {
|
||||
if (!newValue) {
|
||||
this.handClose()
|
||||
this.resetting1()
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async printLocally() {
|
||||
//初始化打印函数
|
||||
@ -1840,7 +1849,6 @@
|
||||
|
||||
getPaymentActive(_this.paymentActive).then(res => {
|
||||
item.activeId = res.data.activeId
|
||||
item.cardFavorableId = res.data.cardFavorableId
|
||||
item.type = res.data.type
|
||||
let discount = {type:"",discount:0,oilName:item.oilName,gunName:item.gunName}
|
||||
let oilData = {oilName:item.oilName,oilPreferential: {}}
|
||||
@ -2529,6 +2537,7 @@
|
||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||
this.map.couponId = this.useCouponIds
|
||||
this.map.staffId = this.staff.id
|
||||
this.map.cardFavorableId = this.cardFavorableId
|
||||
|
||||
let _this = this;
|
||||
if (this.payType=="APPLET_CODE"){
|
||||
@ -2541,8 +2550,8 @@
|
||||
this.loading = true;
|
||||
setTimeout(function (){
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
_this.isPaySuccess = true;
|
||||
_this.isPay = true;
|
||||
_this.printLocally()
|
||||
_this.resetting1();
|
||||
},3000)
|
||||
@ -2550,8 +2559,8 @@
|
||||
this.loading = true;
|
||||
setTimeout(function (){
|
||||
_this.loading = false;
|
||||
_this.isPay = true;
|
||||
_this.isPaySuccess = false;
|
||||
_this.isPay = true;
|
||||
_this.resetting1();
|
||||
this.$modal.msgError(resp.data.error)
|
||||
},3000)
|
||||
@ -2565,7 +2574,6 @@
|
||||
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
|
||||
@ -2710,7 +2718,6 @@
|
||||
cashierOrderByOrderNo({orderNo:_this.orderNo}).then( response => {
|
||||
if (response.data){
|
||||
if (response.data.status == "paid"){
|
||||
this.$modal.msgError(418)
|
||||
_this.isPay = true;
|
||||
_this.isPaySuccess = true;
|
||||
_this.isQuery = false;
|
||||
@ -2742,18 +2749,18 @@
|
||||
}
|
||||
if (response.data.status == "unpaid"){
|
||||
_this.isQuery = true;
|
||||
_this.dialogVisiblejLoading = true
|
||||
}
|
||||
}
|
||||
_this.resetting1();
|
||||
// _this.resetting1();
|
||||
})
|
||||
},500)
|
||||
},1000)
|
||||
|
||||
// 如果是为支付状态15后打开去订单页查询的接口
|
||||
if (_this.isQuery){
|
||||
setTimeout(function () {
|
||||
_this.dialogVisiblejLoading = true
|
||||
},15000)
|
||||
}
|
||||
// if (_this.isQuery){
|
||||
// setTimeout(function () {
|
||||
// },10000)
|
||||
// }
|
||||
|
||||
let timer2 = setInterval(function () {
|
||||
if (!_this.isQuery || !_this.dialogVisiblej) {
|
||||
@ -2764,7 +2771,7 @@
|
||||
clearTimeout(timer3);
|
||||
|
||||
}
|
||||
}, 500)
|
||||
}, 1000)
|
||||
|
||||
var timer3 = setTimeout(function () {
|
||||
clearInterval(timer2);
|
||||
|
@ -135,6 +135,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="会员名称"> </el-table-column>
|
||||
<el-table-column prop="bidBalance" label="储值卡面值"> </el-table-column>
|
||||
<el-table-column prop="amount" label="自定义充值金额"> </el-table-column>
|
||||
<el-table-column prop="rechargeBalance" label="储值卡实售金额"> </el-table-column>
|
||||
<el-table-column prop="giftBalance" label="储值卡赠送金额"></el-table-column>
|
||||
<el-table-column prop="paymentType" label="支付方式">
|
||||
@ -221,6 +222,36 @@
|
||||
<el-button type="primary" @click="refundConfirmed()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 支付成功后小票打印内容-->
|
||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||
<div class="box-title">订单统计</div>
|
||||
<div class="box-ge">
|
||||
<div class="input-box">
|
||||
<div>充值金额</div>
|
||||
<div>¥{{ oilOrder.amount ? oilOrder.amount : oilOrder.rechargeBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>支付方式</div>
|
||||
<div v-if="oilOrder.paymentType == 'CASH'">现金</div>
|
||||
<div v-else-if="oilOrder.paymentType == 'WECHAT'">微信</div>
|
||||
<div v-else-if="oilOrder.paymentType == 'ALIPAY'">支付宝</div>
|
||||
<div v-else-if="oilOrder.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>赠送金额</div>
|
||||
<div>¥{{ oilOrder.giftBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>到账金额</div>
|
||||
<div>¥{{ oilOrder.amount ? oilOrder.giftBalance + oilOrder.amount : oilOrder.giftBalance + oilOrder.rechargeBalance }}</div>
|
||||
</div>
|
||||
<div class="input-box">
|
||||
<div>实付款</div>
|
||||
<div>¥{{ oilOrder.amount ? oilOrder.amount : oilOrder.rechargeBalance }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -230,6 +261,7 @@ import {getDicts} from "@/api/dict/data";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
import {refundApi} from "@/api/cashier/refund";
|
||||
import {exportExcelVipApi} from "@/api/order/exportExcel";
|
||||
import {getLodop} from "@/api/LodopFuncs";
|
||||
|
||||
export default {
|
||||
name: "order_Cashier",
|
||||
@ -291,12 +323,96 @@ export default {
|
||||
|
||||
},
|
||||
|
||||
async printLocally() {
|
||||
//初始化打印函数
|
||||
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;
|
||||
}
|
||||
}
|
||||
.box-center{
|
||||
height: 500px;
|
||||
}
|
||||
</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();
|
||||
|
||||
},
|
||||
// 补打
|
||||
patchwork(data){
|
||||
const orderNo = data.name
|
||||
this.$modal.confirm('确定您要补打当前订单吗?当前会员[' + orderNo + '],请确保云打印机正在运行中').then(function() {
|
||||
// return delUser(row.id);
|
||||
}).then(() => {
|
||||
}).then(async () => {
|
||||
await cardValueRecordInfo(data.id).then( response => {
|
||||
this.oilOrder = response.data
|
||||
})
|
||||
this.printLocally()
|
||||
this.$modal.msgSuccess("打印指令已发送打印机,请查看打印结果");
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
@ -86,9 +86,9 @@
|
||||
|
||||
<view class="station-title" style="display: flex;justify-content: space-between;">
|
||||
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view><!--顺通石化加油站(工业南路站)-->
|
||||
<view style="display: flex;">
|
||||
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
|
||||
|
Loading…
Reference in New Issue
Block a user