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

@ -7,49 +7,44 @@ export function getGiftApi(data) {
method: 'get',
params: data
})
}
// 新增有关信息
export function insertGiftApi(data) {
}
// 新增有关信息
export function insertGiftApi(data) {
return request({
url: 'business/integral/integralGift',
method: 'post',
data: data
})
}
// 修改有关信息
export function updateGiftApi(data) {
}
// 修改有关信息
export function updateGiftApi(data) {
return request({
url: 'business/integral/integralGift',
method: 'put',
data: data
})
}
}
// 修改库存
export function updateGiftInventoryApi(data) {
// 修改库存
export function updateGiftInventoryApi(data) {
return request({
url: 'business/integral/integralGift/updateInventory',
method: 'get',
params: 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,14 +1,14 @@
<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";
export default {
name: "in-add",
dicts: ['zhzt','lplx','redemptionMethod','expressShippingCosts','shippingMethod'],
props:['giftDataF','type'],
dicts: ['zhzt', 'lplx', 'redemptionMethod', 'expressShippingCosts', 'shippingMethod'],
props: ['giftDataF'],
data() {
var valiNumberPass = (rule, value, callback) => {//
let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
@ -21,41 +21,50 @@ props:['giftDataF','type'],
}
};
return {
title:'添加礼品',
openCommodity:false,
giftTypeOption: [
{
value: '1',
label: '电子券'
},
{
value: '2',
label: '实物商品'
}
],
title: '添加礼品',
openCommodity: false,
getGiftTypeShow: '',
stock: '',
stock: null,
//
cardFavorableList:[],
cardFavorableList: [],
//
cardExchangeApiList:[],
dataForm:{
cardExchangeApiList: [],
dataForm: {
id: null,
giftName: '', //
categoryId:'', // id
goodsId:'', // Id
goodsName:'', // Id
voucherId:'', // id
coverImage:'', //
categoryId: '', // id
goodsId: '', // Id
goodsName: '', // Id
coverImage: '', //
giftImages: [], //
giftType:"优惠券", //
couponId:'',//
giftType: '电子券', //
couponId: '',//
giftQuantity: 1, //
totalInventory:'', //
exchangeMethod:'积分', //
exchangePoints:'', //
exchangeTimes:'', //
moneyRatio:'', //
expressShippingFee:'', //
shippingFeeAmount:'', //
exchangeamount:'', //
totalInventory: '', //
exchangeMethod: '积分', //
exchangePoints: '', //
exchangeTimes: '', //
moneyRatio: '', //
expressShippingFee: '', //
shippingFeeAmount: '', //
exchangeamount: '', //
// deliveryMethod:[''], //
deliveryMethod:[], //
detailedDescription:'', //
deliveryMethod: [], //
detailedDescription: '', //
categoryName: 1,
sort: null,
status: '启用',
market:null
market: 0
},
showList: {
//
@ -63,12 +72,12 @@ props:['giftDataF','type'],
voucher: false,
goods: false,
//
jf:true,
je:false,
jfje:false,
jfjq:false,
jf: true,
je: false,
jfje: false,
jfjq: false,
//
delivery:false,
delivery: false,
express: false,
shippingFee: false
},
@ -79,13 +88,15 @@ props:['giftDataF','type'],
giftImages: [],
//
uploadAction: process.env.VUE_APP_BASE_API + 'backendApi/file/upload',
uploadHeader: { 'Access-Token' : getToken() },
uploadHeader: {'Access-Token': getToken()},
//
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,
@ -95,65 +106,62 @@ props:['giftDataF','type'],
rulesInventory: {},
rules: {
deliveryMethod: [
{ type: 'array', required: true, message: '请至少选择一个配送方式', trigger: 'change' }
{type: 'array', required: true, message: '请至少选择一个配送方式', trigger: 'change'}
],
giftName: [
{ required: true, message: "礼品名称不能为空", trigger: "blur" },
{required: true, message: "礼品名称不能为空", trigger: "blur"},
],
coverImage: [
{ required: true, message: "封面不能为空", trigger: "blur" },
{required: true, message: "封面不能为空", trigger: "blur"},
],
giftType: [
{ required: true, message: "礼品类型不能为空", trigger: "change" },
{required: true, message: "礼品类型不能为空", trigger: "change"},
],
couponId: [
{ required: true, message: "请选择优惠券", trigger: "blur" },
],
voucherId: [
{ required: true, message: "请选择兑换券", trigger: "blur" },
{required: true, message: "请选择优惠券", trigger: "blur"},
],
goodsId: [
{ required: true, message: "请选择关联商品", trigger: "change" },
{required: true, message: "请选择关联商品", trigger: "change"},
],
giftQuantity: [
{ required: true, message: "礼品数量不能为空", trigger: "blur" },
{required: true, message: "礼品数量不能为空", trigger: "blur"},
],
totalInventory: [
{ required: true, message: "礼品库存不能为空", trigger: "blur" },
{required: true, message: "礼品库存不能为空", trigger: "blur"},
],
exchangeMethod: [
{ required: true, message: "兑换方式不能为空", trigger: "blur" },
{required: true, message: "兑换方式不能为空", trigger: "blur"},
],
exchangePoints: [
{ required: true, validator:valiNumberPass, trigger: "blur" },
{required: true, validator: valiNumberPass, trigger: "blur"},
],
exchangeAmount: [
{ required: true, validator:valiNumberPass, trigger: "blur" },
{required: true, validator: valiNumberPass, trigger: "blur"},
],
moneyRatio: [
{ required: true, validator:valiNumberPass, trigger: "blur" },
{required: true, validator: valiNumberPass, trigger: "blur"},
],
expressShippingFee: [
{ required: true, message: "快递运费不能为空", trigger: "change" },
{required: true, message: "快递运费不能为空", trigger: "change"},
],
shippingFeeAmount: [
{ required: true, validator:valiNumberPass, trigger: "blur" },
{required: true, validator: valiNumberPass, trigger: "blur"},
],
market: [
{ required: true, validator:valiNumberPass, trigger: "blur" },
{required: true, validator: valiNumberPass, trigger: "blur"},
],
exchangeTimes: [
{ required: true, message: "兑换次数不能为空", trigger: "change" },
{required: true, message: "兑换次数不能为空", trigger: "change"},
],
sort: [
{ required: true, message: "礼品排序不能为空", trigger: "blur" },
{required: true, message: "礼品排序不能为空", trigger: "blur"},
],
status: [
{ required: true, message: "请选择礼品状态", trigger: "change" },
{required: true, message: "请选择礼品状态", trigger: "change"},
],
},
commodityForm:{
commodityForm: {
cvsGoodId: "",
cvsGood: "",
supplierId: "",
@ -162,72 +170,71 @@ props:['giftDataF','type'],
remark: "",
page: 1,
pageSize: 1000,
isRecovery:0,
status:"qy"
isRecovery: 0,
status: "qy"
},
cvsGoodList:[],
cvsGoodList: [],
//
supplierList:[],
supplierList: [],
}
},
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=> {
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()
},
initadd() {
this.changeGiftType("优惠券")
this.selectGiftCategory1();
this.cardFavorableApi();
this.cardExchangeApi();
this.$forceUpdate();
},
cancel() {
this.$router.back();
},
submitForm: function() {
submitForm: function () {
let this_ = this
// if (this.dataForm.deliveryMethod.length === 0) {
// this.$message.warning('');
@ -260,36 +267,26 @@ props:['giftDataF','type'],
})
}
}})
},
cardExchangeApi () {
getCardExchangeApi().then(res=>{
this.cardExchangeApiList =res.data.records
}
})
},
//
selectGiftCategory1() {
let queryParams = {pageSize : 1000}
let queryParams = {pageSize: 1000}
getGiftCategoryApi(queryParams).then(response => {
this.giftCategoryList = response.data.records;
})
},
//
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 == '兑换券') {
} 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
}
@ -311,7 +308,7 @@ props:['giftDataF','type'],
this.dataForm.giftImages.push(file.data.fileName);
console.log("this.giftImage",this.giftImages)
console.log("this.giftImage", this.giftImages)
console.log(" this.dataForm.giftImages", this.dataForm.giftImages)
},
@ -333,8 +330,9 @@ props:['giftDataF','type'],
this.dataForm.giftImages.splice(index, 1);
}
})
console.log("this.giftImage",this.giftImages)
console.log(" this.dataForm.giftImages", this.dataForm.giftImages) },
console.log("this.giftImage", this.giftImages)
console.log(" this.dataForm.giftImages", this.dataForm.giftImages)
},
handlePictureCardPreview(file) {
console.log(file);
this.dialogImageUrl = file.url;
@ -342,20 +340,19 @@ props:['giftDataF','type'],
},
handleChildValue(value) {
this.dataForm.detailedDescription = value
},
//
changeExpress(data,flag){
changeExpress(data, flag) {
let this_ = this
// express: false,
// shippingFee: false
if(flag === 1) {
if (flag === 1) {
if (!this.dataForm.deliveryMethod) {
this.dataForm.deliveryMethod = [];
this.showList.express= false
this.showList.express = false
}
if (!Array.isArray(this.dataForm.deliveryMethod)) {
this.dataForm.deliveryMethod = JSON.parse(this.dataForm.deliveryMethod);
@ -370,8 +367,8 @@ props:['giftDataF','type'],
// jsonArray.push(data)
// this.dataForm.deliveryMethod = jsonArray
if(data == '物流配送') {
this.showList.express= true
if (data == '物流配送') {
this.showList.express = true
}
} else {
this.dataForm.deliveryMethod.splice(index, 1)
@ -379,43 +376,43 @@ props:['giftDataF','type'],
// jsonArray.splice(index, 1);
// this.dataForm.deliveryMethod = JSON.stringify(jsonArray)
if(data == '物流配送') {
this.showList.express= false
if (data == '物流配送') {
this.showList.express = false
}
}
} else {
if (data == '包邮') {
this.showList.shippingFee= false
this.showList.shippingFee = false
} else if (data == '统一运费') {
this.showList.shippingFee= true
this.showList.shippingFee = true
}
}
},
//
changeExpressEDIT(){
changeExpressEDIT() {
if (!this.dataForm.deliveryMethod) {
this.dataForm.deliveryMethod = [];
this.showList.express= false
this.showList.express = false
}
if(!this.dataForm.expressShippingFee) {
this.dataForm.expressShippingFee= ''
this.showList.shippingFee= false
if (!this.dataForm.expressShippingFee) {
this.dataForm.expressShippingFee = ''
this.showList.shippingFee = false
}
let this_ = this
if (!Array.isArray(this_.dataForm.deliveryMethod)) {
this_.dataForm.deliveryMethod = JSON.parse(this_.dataForm.deliveryMethod);
}
if (this_.dataForm.deliveryMethod && this_.dataForm.deliveryMethod.includes("物流配送")) {
this.showList.express= true
this.showList.express = true
}
if (this_.dataForm.expressShippingFee == "统一运费") {
this.showList.shippingFee= true
this.showList.shippingFee = true
}
},
//
changeExchange(newVal){
changeExchange(newVal) {
let this_ = this
if (newVal == '积分') {
this_.showList.jf = true
@ -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,17 +449,22 @@ props:['giftDataF','type'],
},
//
getCommodityList() {
getCommodityList(data) {
let this_ = this
listLJGoods(this_.commodityForm).then(res=>{
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
}
})
},
//
getQueryList(){
getQueryList() {
selectTree().then(response => {
this.cvsGoodList = response.data.records
});
@ -473,7 +481,7 @@ props:['giftDataF','type'],
this.$refs.tables.clearSelection(); //
this.$refs.tables.toggleRowSelection(row); //
//
console.log("row",row)
console.log("row", row)
// stock
this.dataForm.totalInventory = row.stock
this.stock = row.stock
@ -487,7 +495,7 @@ props:['giftDataF','type'],
</script>
<template>
<div class="container1">
<div class="container1">
<div class="card-change" style="margin-top: 10px;">
@ -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,35 +565,39 @@ 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>
<!-- <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>-->
<!-- </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-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <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>-->
<!-- </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-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<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">
@ -614,8 +617,9 @@ 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-form-item label="礼品排序" prop="sort">
<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">
@ -633,7 +637,7 @@ props:['giftDataF','type'],
</el-form-item>
</el-col>
<el-col v-if="showList.jfjq" :span="7">
<el-form-item label="加钱比例" prop="moneyRatio" >
<el-form-item label="加钱比例" prop="moneyRatio">
<el-input v-model="dataForm.moneyRatio" placeholder="" maxlength="30" style="width:100%">
<template slot="prepend">1积分=</template>
<template slot="append"></template>
@ -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
@ -683,7 +687,7 @@ props:['giftDataF','type'],
</el-upload>
</el-form-item>
<el-form-item label="礼品图片" >
<el-form-item label="礼品图片">
<el-upload
:action="uploadAction"
list-type="picture-card"
@ -702,23 +706,26 @@ 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)">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.expressShippingCosts"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- @change="handleIsopenSelect"-->
<!-- :value="dict.value"/>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="运费金额" prop="shippingFeeAmount">-->
<!-- <el-input v-model="dataForm.shippingFeeAmount" placeholder="" maxlength="30" style="width: 202px;" >-->
<!-- <template slot="append"></template>-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="快递运费" prop="expressShippingFee">-->
<!-- <el-radio-group v-model="dataForm.expressShippingFee" @change="changeExpress($event,2)">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.expressShippingCosts"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- @change="handleIsopenSelect"-->
<!-- :value="dict.value"/>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="运费金额" prop="shippingFeeAmount">-->
<!-- <el-input v-model="dataForm.shippingFeeAmount" placeholder="" maxlength="30" style="width: 202px;" >-->
<!-- <template slot="append"></template>-->
<!-- </el-input>-->
<!-- </el-form-item>-->
<el-form-item label="礼品状态" prop="status">
<el-radio-group v-model="dataForm.status">
<el-radio
@ -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>
@ -780,7 +788,7 @@ props:['giftDataF','type'],
</el-col>
<el-col :span="8">
<el-form-item label="详细信息">
<el-input v-model="commodityForm.remark" placeholder="商品名称,拼音码,条形码等信息" ></el-input>
<el-input v-model="commodityForm.remark" placeholder="商品名称,拼音码,条形码等信息"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
@ -825,7 +833,7 @@ props:['giftDataF','type'],
</div> -->
</el-dialog>
</div>
</div>
</template>
<style scoped lang="scss">
@ -834,28 +842,30 @@ props:['giftDataF','type'],
box-sizing: border-box;
padding: 20px;
}
.app-container{
.app-container {
width: 100%;
height: 100%;
background: #f6f8f9;
}
.d-dialog >>> .el-upload--picture-card {
.d-dialog > > > .el-upload--picture-card {
width: 100px;
height: 100px;
line-height: 100px;
}
.d-dialog >>> .avatar-uploader .el-upload {
width: 100px;
height: 100px;
}
.d-dialog >>> .el-upload-list--picture-card .el-upload-list__item {
.d-dialog > > > .avatar-uploader .el-upload {
width: 100px;
height: 100px;
}
.list-img{
.d-dialog > > > .el-upload-list--picture-card .el-upload-list__item {
width: 100px;
height: 100px;
}
.list-img {
width: 98px;
height: 98px;
}

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">
{{item}}
<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>
@ -40,35 +52,35 @@
</div>
<div class="d-s-b">
<div>油站名称</div>
<div>{{baseInfo.storeName}}</div>
<div>{{ baseInfo.storeName }}</div>
</div>
<div class="d-s-b">
<div>油站站长</div>
<div>{{baseInfo.realName}}</div>
<div>{{ baseInfo.realName }}</div>
</div>
<div class="d-s-b">
<div>交班方式</div>
<div>{{baseInfo.handoverType}}</div>
<div>{{ baseInfo.handoverType }}</div>
</div>
<div class="d-s-b">
<div>开始时间</div>
<div>{{baseInfo.startTime}}</div>
<div>{{ baseInfo.startTime }}</div>
</div>
<div class="d-s-b">
<div>结束时间</div>
<div>{{baseInfo.endTime}}</div>
<div>{{ baseInfo.endTime }}</div>
</div>
<div class="d-s-b">
<div>订单金额</div>
<div>{{orderSummary.oilOrder}}</div>
<div>{{ orderSummary.oilOrder }}</div>
</div>
<div class="d-s-b">
<div>优惠金额</div>
<div>{{orderSummary.allDis}}</div>
<div>{{ orderSummary.allDis }}</div>
</div>
<div class="d-s-b">
<div>退款金额</div>
<div>{{orderSummary.oilRefund}}</div>
<div>{{ orderSummary.oilRefund }}</div>
</div>
<div class="d-s-b">
<div>挂账金额</div>
@ -76,27 +88,27 @@
</div>
<div class="d-s-b">
<div>会员消费</div>
<div>{{orderSummary.allBalanceP}}</div>
<div>{{ orderSummary.allBalanceP }}</div>
</div>
<div class="d-s-b">
<div>实收金额</div>
<div>{{orderSummary.allMoney}}</div>
<div>{{ orderSummary.allMoney }}</div>
</div>
<div class="d-s-b">
<div>充值金额</div>
<div>{{orderSummary.cardPaid}}</div>
<div>{{ orderSummary.cardPaid }}</div>
</div>
<div class="d-s-b">
<div>充值赠送</div>
<div>{{orderSummary.cardGiftPaid}}</div>
<div>{{ orderSummary.cardGiftPaid }}</div>
</div>
<div class="d-s-b">
<div>会员总余额</div>
<div>{{orderSummary.points}}</div>
<div>{{ orderSummary.points }}</div>
</div>
<div class="d-s-b">
<div>会员总积分</div>
<div>{{orderSummary.sumnum}}</div>
<div>{{ orderSummary.sumnum }}</div>
</div>
<div class="xxing"></div>
<div style="overflow: auto; height: 32vh;scrollbar-width: none; ">
@ -113,18 +125,18 @@
</div>
<div class="d-s-b">
<div class="l-size">营业总额</div>
<div class="s-size">{{orderSummary.allyingye1}}</div>
<div class="r-size">{{orderSummary.allyingye}}</div>
<div class="s-size">{{ orderSummary.allyingye1 }}</div>
<div class="r-size">{{ orderSummary.allyingye }}</div>
</div>
<div class="d-s-b">
<div class="l-size">充值总额</div>
<div class="s-size">{{orderSummary.allchuzhika1}}</div>
<div class="r-size">{{orderSummary.allchuzhika}}</div>
<div class="s-size">{{ orderSummary.allchuzhika1 }}</div>
<div class="r-size">{{ orderSummary.allchuzhika }}</div>
</div>
<div class="d-s-b">
<div class="l-size">合计</div>
<div class="s-size">{{orderSummary.allyingye1 + orderSummary.allchuzhika1}}</div>
<div class="r-size">{{orderSummary.allyingye + orderSummary.allchuzhika}}</div>
<div class="s-size">{{ orderSummary.allyingye1 + orderSummary.allchuzhika1 }}</div>
<div class="r-size">{{ orderSummary.allyingye + orderSummary.allchuzhika }}</div>
</div>
</div>
@ -141,9 +153,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'all'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
</div>
</div>
@ -159,9 +171,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{item.oilName}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
<div class="l-size">{{ item.oilName }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
</div>
</div>
@ -177,9 +189,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{item.oilName}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
<div class="l-size">{{ item.oilName }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
</div>
</div>
@ -195,9 +207,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in oilNumberStatistics">
<div class="l-size">{{item.oilName}}</div>
<div class="s-size">{{item.numberOfDeals}}</div>
<div class="r-size">{{item.paidAmount}}</div>
<div class="l-size">{{ item.oilName }}</div>
<div class="s-size">{{ item.numberOfDeals }}</div>
<div class="r-size">{{ item.paidAmount }}</div>
</div>
</div>
@ -213,10 +225,12 @@
<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="l-size">{{item.name}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
<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>
</div>
</div>
@ -232,9 +246,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'allbalance'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
</div>
</div>
@ -249,10 +263,12 @@
<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>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
</div>
</div>
@ -268,9 +284,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'goods'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
</div>
</div>
@ -287,9 +303,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in paymentAggregation" v-if="item.flag == 'point'">
<div class="l-size">{{calculateThePaymentMethod(item.payType)}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
<div class="l-size">{{ calculateThePaymentMethod(item.payType) }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
</div>
</div>
@ -303,7 +319,7 @@
<div class="d-s-b" style="font-weight: 600">
<div class="l-size">新增会员数</div>
<!-- <div class="f-size">笔数</div>-->
<div class="r-size">{{orderSummary.sumnum}}</div>
<div class="r-size">{{ orderSummary.sumnum }}</div>
</div>
</div>
@ -321,9 +337,9 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in returnedToTheAccount">
<div class="l-size">{{item.name?item.name:'--'}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
<div class="l-size">{{ item.name ? item.name : '--' }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
</div>
</div>
@ -339,14 +355,16 @@
<div class="r-size">实收金额</div>
</div>
<div class="d-s-b" v-for="item in employeeStatistics">
<div class="l-size">{{item.name?item.name:'--'}}</div>
<div class="s-size">{{item.numberOfDeals?item.numberOfDeals:'--'}}</div>
<div class="r-size">{{item.paidAmount?item.paidAmount:'--'}}</div>
<div class="l-size">{{ item.name ? item.name : '--' }}</div>
<div class="s-size">{{ item.numberOfDeals ? item.numberOfDeals : '--' }}</div>
<div class="r-size">{{ item.paidAmount ? item.paidAmount : '--' }}</div>
</div>
</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>
@ -355,7 +373,7 @@
</div>
<el-dialog title="订单详情" :visible.sync="openDetail" width="600px" append-to-body :close-on-click-modal="false">
<!-- <detail :dataForm = "recordData"></detail>-->
<HandoverOnly :recordData = "recordData"></HandoverOnly>
<HandoverOnly :recordData="recordData"></HandoverOnly>
</el-dialog>
</div>
</template>
@ -368,42 +386,42 @@ 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",
components: {HandoverRecord, HandoverOnly},
name: 'pointsCashier',
components: { HandoverRecord, HandoverOnly },
// dicts: ['zhzt'],
data() {
return {
tabs:[
"交接班",
"交班记录"
tabs: [
'交接班',
'交班记录'
],
value:'',
tabindex:0,
openDetail:false,
dataForm:{},
dataList:[],
recordData:'',
zhztList:'',
shiftHandoverList:'',
handoverList : {},
handoverData:{},
baseInfo:{},
billingDetails:[],
employeeStatistics:[],
greaseGunStatistics:[],
oilNumberStatistics:[],
orderSummary:{},
paymentAggregation:[],
returnedToTheAccount:[],
value: '',
tabindex: 0,
openDetail: false,
dataForm: {},
dataList: [],
recordData: '',
zhztList: '',
shiftHandoverList: '',
handoverList: {},
handoverData: {},
baseInfo: {},
billingDetails: [],
employeeStatistics: [],
greaseGunStatistics: [],
oilNumberStatistics: [],
orderSummary: {},
paymentAggregation: [],
returnedToTheAccount: [],
// base
queryParams: {
@ -411,37 +429,51 @@ export default {
status: '统一交班',
type: '',
page:null,
pageSize:null
page: null,
pageSize: null
},
loading: false,
dateRange: [new Date(),new Date()],
beginTime:new Date(),
endTime:new Date(),
defaultSort: {prop: 'createTime', order: 'descending'},
dateRange: [new Date(), new Date()],
beginTime: new Date(),
endTime: new Date(),
defaultSort: { prop: 'createTime', order: 'descending' },
total: 0,
staffList:[],
staffList: [],
statisticsForm: {
num:0,
exchangeQuantity:0,
integral:0,
amount:0
num: 0,
exchangeQuantity: 0,
integral: 0,
amount: 0
}
}
},
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=>{
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,43 +482,49 @@ 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){
getindex(index) {
this.tabindex = index
},
getList(){
}
,
getList() {
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
this.dataList = res.data.records
this.total = res.data.total
})
},
}
,
getStatistics() {
getStatisticsApi().then(res=>{
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,87 +556,100 @@ export default {
// location.href = '/';
// })
}
this.getHandover();
this.getHandover()
})
})
},
handleUpdate(){},
handleQuery(){
this.getList();
this.getHandover();
},
}
,
handleUpdate() {
}
,
handleQuery() {
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(){
)
}
,
resetQuery() {
this.queryParams = {
giftName: '',
status: '统一交班',
mobile: '',
orderNumber: '',
page:1,
pageSize:10
page: 1,
pageSize: 10
},
this.dateRange = []
this.beginTime = "";
this.endTime = ""
this.getList();
},
this.beginTime = ''
this.endTime = ''
this.getList()
}
,
printLocally(data) {
printLocallyApi(data).then(res=>{
printLocallyApi(data).then(res => {
})
},
handleDetail(data){
}
,
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
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,7 +664,8 @@ export default {
display: flex;
flex-direction: column;
}
.tab-box{
.tab-box {
width: 100%;
background: #fff;
display: flex;
@ -622,10 +674,12 @@ export default {
padding-bottom: 0px;
border-top: 1px solid #eceff1;
}
.box_{
.box_ {
height: 100%;
border-bottom: 2px solid #fe9554;
}
.box {
padding: 10px;
height: 80px;
@ -639,25 +693,29 @@ export default {
align-items: left;
text-align: left;
}
.box-card{
.box-card {
width: 640px;
margin: 0 auto;
margin-bottom: 15px;
}
.font-chinese {
font-size: 15px;
font-family:Microsoft YaHei;
font-family: Microsoft YaHei;
font-weight: bold;
line-height:1.5
line-height: 1.5
}
.font-number {
font-size: 20px;
font-family: PingFang SC,sans-serif;
font-family: PingFang SC, sans-serif;
font-weight: bold;
line-height:1.3
line-height: 1.3
}
.table-box{
.table-box {
width: 100%;
}
@ -668,11 +726,12 @@ export default {
flex-wrap: nowrap; /* 确保不换行 */
width: 100%; /* 让父容器占满可用宽度 */
}
.el-form--inline .el-form-item {
}
.tab_{
.tab_ {
width: 75px;
height: 40px;
//border-bottom: 2px solid #FF770F;
@ -685,17 +744,20 @@ export default {
margin-left: 50px;
cursor: pointer;
}
.active{
.active {
border-bottom: 2px solid #FF770F !important;
color: #FF770F !important;
}
.title_{
.title_ {
text-align: center;
font-weight: 600;
font-size: 16px;
color: #333333;
}
.d-s-b{
.d-s-b {
width: 100%;
display: flex;
align-items: center;
@ -705,15 +767,18 @@ export default {
color: #333333;
margin: 5px auto;
}
.xxing{
.xxing {
width: 100%;
border-bottom: 1px solid #EEEEEE;
}
.for-box{
.for-box {
width: 100%;
margin: 20px auto;
}
.for-title{
.for-title {
display: flex;
align-items: center;
justify-content: center;
@ -722,34 +787,41 @@ export default {
color: #333333;
}
.x-{
.x- {
width: 100px;
border-bottom: 1px solid #EEEEEE;
margin: 0 15px;
}
.f-size{
.f-size {
width: 33%;
text-align: center;
font-size: 14px;
color: #333333;
}
.s-size{
.s-size {
width: 33%;
text-align: center;
}
.l-size{
.l-size {
width: 33%;
text-align: left;
}
.r-size{
.r-size {
width: 33%;
text-align: right;
}
.bottom-{
.bottom- {
width: 98%;
}
.table-boxs{
.table-boxs {
border-radius: 8px;
width: 98%;
background: #fff;

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){