bug修改

This commit is contained in:
zhaohengkun 2024-10-22 11:16:59 +08:00
parent e7b2df5001
commit 75f2c2b3ad
13 changed files with 2767 additions and 2620 deletions

View File

@ -8,6 +8,7 @@ export function getGiftApi(data) {
params: data
})
}
// 新增有关信息
export function insertGiftApi(data) {
return request({
@ -16,6 +17,7 @@ export function getGiftApi(data) {
data: data
})
}
// 修改有关信息
export function updateGiftApi(data) {
return request({
@ -36,20 +38,13 @@ export function getGiftApi(data) {
}
//兑换
export function getCardFavorableApi(data) {
//获取全部 剩余数量 >0 的优惠
export function getCardCoupon(data) {
return request({
url: 'business/marketingActivity/cardFavorable?pageNo=1&pageSize=10',
url: 'cardCoupon/queryByNum',
method: 'get',
params: data
})
}
//优惠券
export function getCardExchangeApi(data) {
return request({
url: 'business/marketingActivity/cardExchange?pageNo=1&pageSize=10',
method: 'get',
params: data
})
}

View File

@ -1,6 +1,6 @@
<script>
import {getToken} from "@/utils/auth";
import {getCardExchangeApi, getCardFavorableApi, insertGiftApi, updateGiftApi} from "@/api/integral/gift";
import {getCardCoupon, insertGiftApi, updateGiftApi} from "@/api/integral/gift";
import {listLJGoods} from "@/api/convenienceStore/ljgoods";
import {selectTree} from "@/api/convenienceStore/goods";
import {getGiftCategoryApi} from "@/api/integral/category";
@ -8,7 +8,7 @@ import {getGiftCategoryApi} from "@/api/integral/category";
export default {
name: "in-add",
dicts: ['zhzt', 'lplx', 'redemptionMethod', 'expressShippingCosts', 'shippingMethod'],
props:['giftDataF','type'],
props: ['giftDataF'],
data() {
var valiNumberPass = (rule, value, callback) => {//
let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
@ -21,10 +21,20 @@ props:['giftDataF','type'],
}
};
return {
giftTypeOption: [
{
value: '1',
label: '电子券'
},
{
value: '2',
label: '实物商品'
}
],
title: '添加礼品',
openCommodity: false,
getGiftTypeShow: '',
stock: '',
stock: null,
//
cardFavorableList: [],
//
@ -35,10 +45,9 @@ props:['giftDataF','type'],
categoryId: '', // id
goodsId: '', // Id
goodsName: '', // Id
voucherId:'', // id
coverImage: '', //
giftImages: [], //
giftType:"优惠券", //
giftType: '电子券', //
couponId: '',//
giftQuantity: 1, //
totalInventory: '', //
@ -55,7 +64,7 @@ props:['giftDataF','type'],
categoryName: 1,
sort: null,
status: '启用',
market:null
market: 0
},
showList: {
//
@ -84,8 +93,10 @@ props:['giftDataF','type'],
hideUpload: false,
//
uploadFiles: [
{name:"nihao",
url:'http://localhost:8008/static/uploadImages/20231103/ffbbe7d3ee1441fdaf706802fa0f176a.png'}
{
name: "nihao",
url: 'http://localhost:8008/static/uploadImages/20231103/ffbbe7d3ee1441fdaf706802fa0f176a.png'
}
],
//
imagePath: process.env.VUE_APP_BASE_API,
@ -109,9 +120,6 @@ props:['giftDataF','type'],
couponId: [
{required: true, message: "请选择优惠券", trigger: "blur"},
],
voucherId: [
{ required: true, message: "请选择兑换券", trigger: "blur" },
],
goodsId: [
{required: true, message: "请选择关联商品", trigger: "change"},
],
@ -173,27 +181,40 @@ props:['giftDataF','type'],
}
},
computed: {
selectedCoupon() {
return this.cardFavorableList.find(option => option.id === this.dataForm.couponId);
}
},
created() {
console.log(33333333333333,this.giftDataF)
this.cardFavorableApi()
if (this.giftDataF) {
this.init(this.giftDataF)
console.log("参数", this.$route.params.giftDataF)
if (this.$route.params.giftDataF) {
//
this.dataForm = this.$route.params.giftDataF
this.init(this.dataForm)
} else {
this.initadd()
//
this.cardFavorableApi()
}
},
methods: { //
methods: {
handleCouponChange(newVal) {
console.log('新选择的优惠券对象:', this.selectedCoupon);
//
this.stock = this.selectedCoupon.tfTotal - this.selectedCoupon.tfGetNum;
//
this.dataForm.totalInventory = 1
},
//
async init(data) {
await this.cardFavorableApi();
await this.cardExchangeApi();
//
await this.cardFavorableApi(data);
await this.selectGiftCategory1();
//
this.getCommodityList(data);
this.giftImages = []
data.giftImages = JSON.parse(data.giftImages);
data.giftImages.forEach(res => {
@ -203,26 +224,12 @@ props:['giftDataF','type'],
}
this.giftImages.push(newImage);
}),
// data.deliveryMethod = JSON.parse(data.deliveryMethod);
console.log("data",data)
this.dataForm = data;
this.changeGiftType(this.dataForm.giftType)
this.changeExchange(this.dataForm.exchangeMethod)
this.changeExpressEDIT()
},
initadd() {
this.changeGiftType("优惠券")
this.selectGiftCategory1();
this.cardFavorableApi();
this.cardExchangeApi();
this.$forceUpdate();
},
cancel() {
this.$router.back();
@ -260,11 +267,7 @@ props:['giftDataF','type'],
})
}
}})
},
cardExchangeApi () {
getCardExchangeApi().then(res=>{
this.cardExchangeApiList =res.data.records
}
})
},
//
@ -276,20 +279,14 @@ props:['giftDataF','type'],
},
//
changeGiftType(newVal) {
console.log('新值', newVal)
let this_ = this
if (newVal == '优惠券') {
if (newVal == '电子券') {
this_.showList.coupon = true
this_.showList.voucher = false
this_.showList.goods = false
this_.showList.delivery = false
} else if (newVal == '兑换券') {
this_.showList.coupon = false
this_.showList.voucher = true
this_.showList.goods = false
this_.showList.delivery = true
} else if (newVal == '实物商品') {
this_.showList.coupon = false
this_.showList.voucher = false
this_.showList.goods = true
this_.showList.delivery = true
}
@ -334,7 +331,8 @@ props:['giftDataF','type'],
}
})
console.log("this.giftImage", this.giftImages)
console.log(" this.dataForm.giftImages", this.dataForm.giftImages) },
console.log(" this.dataForm.giftImages", this.dataForm.giftImages)
},
handlePictureCardPreview(file) {
console.log(file);
this.dialogImageUrl = file.url;
@ -342,7 +340,6 @@ props:['giftDataF','type'],
},
handleChildValue(value) {
this.dataForm.detailedDescription = value
},
@ -435,10 +432,16 @@ props:['giftDataF','type'],
this_.showList.jfjq = true
}
},
cardFavorableApi () {
getCardFavorableApi().then(res=>{
this.cardFavorableList = res.data.records
cardFavorableApi(val) {
getCardCoupon().then(res => {
this.cardFavorableList = res.data
if (val.couponId) {
let obj = this.cardFavorableList.find(option => option.id == val.couponId)
this.stock = obj.tfTotal - obj.tfGetNum
console.log('当前库存', this.stock)
}
})
},
getCommodity() {
this.getQueryList()
@ -446,13 +449,18 @@ props:['giftDataF','type'],
},
//
getCommodityList() {
getCommodityList(data) {
let this_ = this
listLJGoods(this_.commodityForm).then(res => {
this_.commodityList = res.data.records;
// this_.sumMethod(res.data.records);
// this.total = response.data.total;
if (data.goodsId){
let row = this.commodityList.find(option => option.id == data.goodsId)
this.dataForm.totalInventory = row.stock
this.stock = row.stock
this.dataForm.market = row.retailPrice
this.dataForm.goodsName = row.name
this.dataForm.goodsId = row.id
}
})
},
//
@ -524,40 +532,31 @@ props:['giftDataF','type'],
<el-form-item label="礼品类型" prop="giftType">
<el-radio-group v-model="dataForm.giftType" @change="changeGiftType($event)">
<el-radio
v-for="dict in dict.type.lplx"
v-for="dict in giftTypeOption"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@change="handleIsopenSelect,changeGiftType"
/>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="showList.coupon" label="优惠券" prop="couponId">
<el-select v-model="dataForm.couponId" placeholder="请选择" style="width:100%">
<el-select v-model="dataForm.couponId" placeholder="请选择" style="width:100%"
@change="handleCouponChange">
<el-option
v-for="option in cardFavorableList"
:key="option.id"
:label="(option.type==0?'油品券-':option.type==1?'商品券-':'优惠券-')+ option.name"
:label="option.name"
:value="option.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="showList.voucher" label="兑换券" prop="voucherId">
<el-select v-model="dataForm.voucherId" placeholder="请选择" style="width:100%">
<el-option
v-for="option in cardExchangeApiList"
:key="option.id"
:label="(option.type==0?'兑换券-':option.type==1?'洗车券-':'洗车卡-')+ option.name"
:value="option.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="showList.goods" label="关联商品" prop="goodsId">
<el-input v-model="dataForm.goodsName" placeholder="" maxlength="30" style="width:100%" @focus="getCommodity"/>
<el-input v-model="dataForm.goodsName" placeholder="" maxlength="30" style="width:100%"
@focus="getCommodity"/>
<!-- </el-select> -->
</el-form-item>
</el-col>
@ -566,13 +565,16 @@ props:['giftDataF','type'],
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="商品库存" prop="">
<el-input v-model="stock" controls-position="right" :min="1" :max="10" label="" style="width:100%" :disabled="true"></el-input>
<el-form-item label="当前库存" prop="">
<el-input v-model="stock" controls-position="right" :min="1" :max="10" label="" style="width:100%"
:disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="礼品库存" prop="totalInventory">
<el-input :disabled="title === '修改礼品'" v-model.number="dataForm.totalInventory" placeholder="礼品库存" maxlength="30" style="width:100%"/>
<el-input-number v-model.number="dataForm.totalInventory" :disabled="title === '修改礼品'"
controls-position="right" :min="0" :max="stock"></el-input-number>
<!-- <el-input :disabled="title === '修改礼品'" v-model.number="dataForm.totalInventory" placeholder="礼品库存" :min="1" :max="stock" maxlength="30" style="width:100%"/>-->
</el-form-item>
</el-col>
</el-row>
@ -592,9 +594,10 @@ props:['giftDataF','type'],
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="市场价格" prop="market">
<el-input v-model="dataForm.market" placeholder="请输入市场价格" maxlength="30" style="width:100%">
<template slot="append"></template></el-input>
<el-form-item label="成本价" prop="market">
<el-input v-model="dataForm.market" disabled maxlength="30" style="width:100%">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@ -615,7 +618,8 @@ props:['giftDataF','type'],
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="礼品排序" prop="sort">
<el-input-number v-model="dataForm.sort" :min="1" :max="10" label="" style="width:100%"></el-input-number>
<el-input-number v-model="dataForm.sort" :min="1" :max="10" label=""
style="width:100%"></el-input-number>
</el-form-item>
</el-col>
<el-col v-if="showList.jf" :span="12">
@ -662,7 +666,7 @@ props:['giftDataF','type'],
</div>
<div style="width: 35%;height: 550px;">
<el-form ref="form" :model="dataForm" :rules="rules" label-width="80px">
<el-form :model="dataForm" :rules="rules" label-width="80px">
<el-form-item label="封面图" prop="coverImage">
<el-upload
@ -702,7 +706,10 @@ props:['giftDataF','type'],
</el-form-item>
<el-form-item label="配送方式" style="margin-top: 50px" prop="deliveryMethod">
<el-checkbox v-for="item in dict.type.shippingMethod" :key="item.value" :label="item.label" :checked="dataForm.deliveryMethod != null?dataForm.deliveryMethod.includes(item.label):null" @change="changeExpress(item.label,1)">{{ item.label }}</el-checkbox>
<el-checkbox v-for="item in dict.type.shippingMethod" :key="item.value" :label="item.label"
:checked="dataForm.deliveryMethod != null?dataForm.deliveryMethod.includes(item.label):null"
@change="changeExpress(item.label,1)">{{ item.label }}
</el-checkbox>
</el-form-item>
<!-- <el-form-item label="快递运费" prop="expressShippingFee">-->
<!-- <el-radio-group v-model="dataForm.expressShippingFee" @change="changeExpress($event,2)">-->
@ -734,12 +741,13 @@ props:['giftDataF','type'],
</div>
<el-form ref="form" :model="dataForm" :rules="rules" label-width="80px">
<el-form :model="dataForm" :rules="rules" label-width="80px">
<el-row :gutter="24">
<el-col :span="23">
<el-form-item label="图文详情" prop="detailedDescription">
<editor @input="handleChildValue" :value.default="dataForm.detailedDescription" :height.default="150"></editor>
<editor @input="handleChildValue" :value.default="dataForm.detailedDescription"
:height.default="150"></editor>
</el-form-item>
</el-col>
</el-row>
@ -834,6 +842,7 @@ props:['giftDataF','type'],
box-sizing: border-box;
padding: 20px;
}
.app-container {
width: 100%;
height: 100%;
@ -850,6 +859,7 @@ props:['giftDataF','type'],
width: 100px;
height: 100px;
}
.d-dialog > > > .el-upload-list--picture-card .el-upload-list__item {
width: 100px;
height: 100px;

View File

@ -142,10 +142,11 @@
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
@ -652,8 +653,8 @@ export default {
queryParams: {
giftName: '',
status: '',
page:null,
pageSize:null
pageNo:1,
pageSize:10
},
dateRange:{},
//
@ -905,7 +906,7 @@ export default {
},
//
handleQuery() {
this.queryParams.page = 1;
this.queryParams.pageNo = 1;
this.getList();
},
//
@ -919,48 +920,6 @@ export default {
}
});
//
// await this.cardFavorableApi();
// await this.cardExchangeApi();
// await this.selectGiftCategory();
//
// this.giftImages = []
// data.giftImages = JSON.parse(data.giftImages);
// data.giftImages.forEach(res=> {
// let newImage = {
// url: this.imagePath + res,
// fileName: res
// }
// this.giftImages.push(newImage);
// }),
//
// // data.deliveryMethod = JSON.parse(data.deliveryMethod);
//
// console.log("data",data)
// this.dataForm = data;
// this.changeGiftType(this.dataForm.giftType)
// this.changeExchange(this.dataForm.exchangeMethod)
// this.changeExpressEDIT()
//
//
// console.log(" this.dataForm", this.dataForm)
// this.title = ''
//
// this.open = true;
// this.getList();
},
cardFavorableApi () {
getCardFavorableApi().then(res=>{
this.cardFavorableList = res.data.records
})
},
cardExchangeApi () {
getCardExchangeApi().then(res=>{
this.cardExchangeApiList =res.data.records
})
},
resetQuery() {

View File

@ -68,7 +68,8 @@ public class IntegralGiftServiceImpl implements IntegralGiftService {
public IPage<IntegralGiftVO> queryByPage(@Param("page") Page page, @Param("integralGiftCategory") IntegralGift integralGift) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
integralGift.setStoreId(nowAccountInfo.getStoreId());
return integralGiftDao.queryAllByLimit(page, integralGift);
IPage<IntegralGiftVO> integralGiftVOIPage = integralGiftDao.queryAllByLimit(page, integralGift);
return integralGiftVOIPage;
}

View File

@ -65,6 +65,7 @@ public class CardCouponUserController extends BaseController {
*/
@PostMapping
public ResponseObject insert(@RequestBody CardCouponUser cardCouponUser) {
return getSuccessResult(this.cardCouponUserService.save(cardCouponUser));
}
@ -97,5 +98,18 @@ public class CardCouponUserController extends BaseController {
Page page =new Page(pageNo,pageSize);
return getSuccessResult(cardCouponUserService.queryPage(page, cardCouponUserVo));
}
/**
* 根据 手机号 核销码 当前店铺id 以及 优惠券类型 兑换券 商品兑换券 来查询用户领取 并且 未核销的
* @param str 手机号 / 核销码
*/
@GetMapping ("selectUserCardVerification")
public ResponseObject selectUserCardVerification(String str,@RequestParam (name = "couponType", required = false, defaultValue = "1,2") Integer[] couponType) {
List<CardCouponUser> list = cardCouponUserService.selectUserCardVerification(str, couponType);
return getSuccessResult(list);
}
}

View File

@ -59,5 +59,9 @@ public interface CardCouponUserService extends IService<CardCouponUser> {
* @return java.util.List<com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser>
**/
List<CardCouponUser> selectListByUsed(Integer userId,List<Integer> couponIdList);
List<CardCouponUser> selectUserCardVerification(String str, Integer[] couponType);
}

View File

@ -171,5 +171,10 @@ public class CardCouponUserServiceImpl extends ServiceImpl<CardCouponUserMapper,
.eq(CardCouponUser::getStatus,"1");
return this.list(queryWrapper);
}
@Override
public List<CardCouponUser> selectUserCardVerification(String str, Integer[] couponType) {
return null;
}
}

View File

@ -44,7 +44,7 @@ public class CardExchangeRecordServiceImpl extends ServiceImpl<CardExchangeRecor
*/
@Override
public IPage select(Page page, CardExchangeRecord cardExchangeRecord) {
//获取当前店铺的id和连锁店id
// 根据 手机号 核销码 当前店铺id 以及 优惠券类型 兑换券 商品兑换券 来查询用户领取 并且 未核销的
if (ObjectUtils.isNotEmpty(TokenUtil.getNowAccountInfo().getStoreId())) {
cardExchangeRecord.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
cardExchangeRecord.setChainStorId(storeService.getById(TokenUtil.getNowAccountInfo().getStoreId()).getChainStoreId());

View File

@ -29,10 +29,10 @@ public class CardGiftActive extends Model<CardGiftActive> {
//礼品卡金额
private Double cardAmount;
//有效期开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
private Date effectiveTimeStart;
//有效期结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
private Date effectiveTimeEnd;
//卡类型比如纸卡 使用数据字典 card_gift_type
private String cardType;

View File

@ -122,9 +122,9 @@ public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditU
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
creditUnit.setStoreId(store.getId());
creditUnit.setChainStoreId(store.getChainStoreId());
if (creditUnit.getStaffId()==null){
creditUnit.setStaffId(nowAccountInfo.getId());
}
// if (creditUnit.getStaffId()==null){
// creditUnit.setStaffId(nowAccountInfo.getId());
// }
// 查询挂账单位是否存在
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("unit_name",creditUnit.getUnitName());

View File

@ -3,12 +3,16 @@
<div class="app-containerss">
<div class="tab-box">
<div class="tab_" :class="{active:index== tabindex }" @click="getindex(index)" v-for="(item,index) in tabs" :key="index">
<div class="tab_" :class="{active:index== tabindex }" @click="getindex(index)" v-for="(item,index) in tabs"
:key="index"
>
{{ item }}
</div>
</div>
<div v-if="tabindex == 0">
<div class="card-box" style="width: 98%;margin: 10px auto;background: #fff;box-sizing: border-box;padding-top: 15px" >
<div class="card-box"
style="width: 98%;margin: 10px auto;background: #fff;box-sizing: border-box;padding-top: 15px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item label="" prop="status">
<el-select v-model="queryParams.status" style="width: 230px" placeholder="交班方式" clearable>
@ -17,7 +21,9 @@
</el-select>
</el-form-item>
<el-form-item label="" prop="staffId">
<el-select v-model="queryParams.staffId" style="width: 230px" placeholder="交班员工" clearable :disabled="queryParams.status== '统一交班'" >
<el-select v-model="queryParams.staffId" style="width: 230px" placeholder="交班员工" clearable
:disabled="queryParams.status== '统一交班'"
>
<el-option
v-for="option in staffList"
:key="option.id"
@ -27,12 +33,18 @@
</el-select>
</el-form-item>
<el-form-item class="flex-container" style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery" :disabled="queryParams.staffId == null" >搜索</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
:disabled="queryParams.staffId == null"
>搜索
</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div style="width: 25%; margin: 0 auto; margin-top: 10px; margin-bottom: 10px; background: #FFFFFF;box-sizing: border-box;padding: 15px; height: 78vh;" class="b-c-ad">
<div
style="width: 25%; margin: 0 auto; margin-top: 10px; margin-bottom: 10px; background: #FFFFFF;box-sizing: border-box;padding: 15px; height: 78vh;"
class="b-c-ad"
>
<div class="title_" style="display: flex;justify-content: space-between">
<div style="width: 10%;"></div>
<div>门店交接单</div>
@ -213,7 +225,9 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'all' && item.payType == 'balance'">
<div class="d-s-b" v-for="item in paymentAggregation"
v-if="item.flag == 'all' && item.payType == 'balance'"
>
<div class="l-size">{{ item.name }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
@ -249,7 +263,9 @@
<div class="f-size">笔数</div>
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'all' && item.payType == 'balance'">
<div class="d-s-b" v-for="item in paymentAggregation"
v-if="item.flag == 'all' && item.payType == 'balance'"
>
<div class="l-size">合计</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
@ -346,7 +362,9 @@
</div>
</div>
</div>
<div style="width: 98%; margin: 10px auto;display: flex;align-items: center;justify-content: center; background: #fff;box-sizing: border-box;padding: 15px " >
<div
style="width: 98%; margin: 10px auto;display: flex;align-items: center;justify-content: center; background: #fff;box-sizing: border-box;padding: 15px "
>
<el-button type="primary" @click="shift()">交班</el-button>
</div>
</div>
@ -368,13 +386,13 @@ import {
getStatisticsApi,
getDicts,
listStaff
} from "@/api/handover/handover";
} from '@/api/handover/handover'
import HandoverOnly from "@/views/cashier/NewComponents/HandoverOnly.vue";
import HandoverRecord from "@/views/cashier/NewComponents/HandoverRecord.vue";
import HandoverOnly from '@/views/cashier/NewComponents/HandoverOnly.vue'
import HandoverRecord from '@/views/cashier/NewComponents/HandoverRecord.vue'
export default {
name: "pointsCashier",
name: 'pointsCashier',
components: { HandoverRecord, HandoverOnly },
// dicts: ['zhzt'],
@ -383,8 +401,8 @@ export default {
return {
tabs: [
"交接班",
"交班记录"
'交接班',
'交班记录'
],
value: '',
tabindex: 0,
@ -431,17 +449,31 @@ export default {
}
},
created() {
this.getList();
this.getHandover();
this.getStatistics();
this.getStatus();
this.getStaffList();
this.getList()
this.getHandover()
this.getStatistics()
this.getStatus()
this.getStaffList()
},
watch: {
'queryParams.status': {
handler(newVal, oldVal) {
if (newVal == '统一交班') {
this.queryParams.staffId = null
this.getList()
this.getHandover()
}
},
immediate: false, //
deep: false //
}
},
methods: {
getHandover() {
getHandoverApi2(this.queryParams).then(res => {
// this.handoverList = res.data;
this.handoverData = res.data;
this.handoverData = res.data
this.baseInfo = this.handoverData.baseInfo,
this.billingDetails = this.handoverData.billingDetails,
this.employeeStatistics = this.handoverData.employeeStatistics,
@ -450,13 +482,15 @@ export default {
this.orderSummary = this.handoverData.orderSummary,
this.paymentAggregation = this.handoverData.paymentAggregation,
this.returnedToTheAccount = this.handoverData.returnedToTheAccount,
console.log("this.handoverList",this.handoverList)
console.log('this.handoverList', this.handoverList)
})
},
}
,
getindex(index) {
this.tabindex = index
},
}
,
getList() {
this.dateRange = []
if (this.beginTime && this.endTime) {
@ -468,25 +502,29 @@ export default {
this.total = res.data.total
})
},
}
,
getStatistics() {
getStatisticsApi().then(res => {
this.statisticsForm = res.data
})
console.log("123123123",this.statisticsForm)
},
console.log('123123123', this.statisticsForm)
}
,
//
getZhzt() {
getDicts("zhzt").then(response => {
this.zhztList = response.data;
getDicts('zhzt').then(response => {
this.zhztList = response.data
})
},
}
,
getStatus() {
getDicts("handover").then(response => {
this.shiftHandoverList = response.data;
getDicts('handover').then(response => {
this.shiftHandoverList = response.data
})
},
}
,
//
async shift() {
let msg = '交班, 是否继续?'
@ -518,23 +556,30 @@ export default {
// location.href = '/';
// })
}
this.getHandover();
this.getHandover()
})
})
},
handleUpdate(){},
}
,
handleUpdate() {
}
,
handleQuery() {
this.getList();
this.getHandover();
},
this.getList()
this.getHandover()
}
,
getStaffList() {
listStaff(this.addDateRange({ page: 1,
pageSize: 10000})).then(response => {
this.staffList = response.data.records;
listStaff(this.addDateRange({
page: 1,
pageSize: 10000
})).then(response => {
this.staffList = response.data.records
}
);
},
)
}
,
resetQuery() {
this.queryParams = {
giftName: '',
@ -545,60 +590,66 @@ export default {
pageSize: 10
},
this.dateRange = []
this.beginTime = "";
this.endTime = ""
this.getList();
},
this.beginTime = ''
this.endTime = ''
this.getList()
}
,
printLocally(data) {
printLocallyApi(data).then(res => {
})
},
}
,
handleDetail(data) {
this.openDetail = true
this.recordData = data.recordData;
this.recordData = data.recordData
// JSON.parse(this.recordData )
console.log("data.recordData;",this.recordData)
console.log('data.recordData;', this.recordData)
},
}
,
goToAbout() {
this.$router.push({
path: '/Handover',
query: {
id: 9
}
});
},
})
}
,
billingDetails1() {
let count = [];
let count = []
if (this.billingDetails) {
return this.billingDetails
}
return count;
},
return count
}
,
calculateThePaymentMethod(payType) {
switch (payType) {
case 'ALIPAY':
return '支付宝'
break;
break
case 'WECHAT':
return '微信'
break;
break
case 'UNIONPAY':
return '银联二维码'
break;
break
case 'CASH':
return '现金'
break;
break
case 'balance':
return '余额'
break;
break
case 'oilCard':
return '油卡'
break;
break
}
return '未知'
},
}
}
}
</script>
@ -613,6 +664,7 @@ export default {
display: flex;
flex-direction: column;
}
.tab-box {
width: 100%;
background: #fff;
@ -622,10 +674,12 @@ export default {
padding-bottom: 0px;
border-top: 1px solid #eceff1;
}
.box_ {
height: 100%;
border-bottom: 2px solid #fe9554;
}
.box {
padding: 10px;
height: 80px;
@ -639,24 +693,28 @@ export default {
align-items: left;
text-align: left;
}
.box-card {
width: 640px;
margin: 0 auto;
margin-bottom: 15px;
}
.font-chinese {
font-size: 15px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 1.5
}
.font-number {
font-size: 20px;
font-family: PingFang SC, sans-serif;
font-weight: bold;
line-height: 1.3
}
.table-box {
width: 100%;
}
@ -668,6 +726,7 @@ export default {
flex-wrap: nowrap; /* 确保不换行 */
width: 100%; /* 让父容器占满可用宽度 */
}
.el-form--inline .el-form-item {
}
@ -685,16 +744,19 @@ export default {
margin-left: 50px;
cursor: pointer;
}
.active {
border-bottom: 2px solid #FF770F !important;
color: #FF770F !important;
}
.title_ {
text-align: center;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.d-s-b {
width: 100%;
display: flex;
@ -705,14 +767,17 @@ export default {
color: #333333;
margin: 5px auto;
}
.xxing {
width: 100%;
border-bottom: 1px solid #EEEEEE;
}
.for-box {
width: 100%;
margin: 20px auto;
}
.for-title {
display: flex;
align-items: center;
@ -722,11 +787,13 @@ export default {
color: #333333;
}
.x- {
width: 100px;
border-bottom: 1px solid #EEEEEE;
margin: 0 15px;
}
.f-size {
width: 33%;
text-align: center;
@ -734,21 +801,26 @@ export default {
font-size: 14px;
color: #333333;
}
.s-size {
width: 33%;
text-align: center;
}
.l-size {
width: 33%;
text-align: left;
}
.r-size {
width: 33%;
text-align: right;
}
.bottom- {
width: 98%;
}
.table-boxs {
border-radius: 8px;
width: 98%;

File diff suppressed because it is too large Load Diff

View File

@ -1040,6 +1040,7 @@ import {getLodop} from "@/api/LodopFuncs";
this.open1 = true
},
handleUpdate(data){
console.log("修改数据", data)
creditUnitInfo(data.id).then(res => {
this.form1 = res.data
this.title = "修改挂账单位"
@ -1068,7 +1069,7 @@ import {getLodop} from "@/api/LodopFuncs";
this.total3 = res.data.total;
})
this.getUnitStatistic(val)
this.getUnitStatistic(undefined)
},
getUnitStatistic(val){
if (val!=undefined){