bug修改

This commit is contained in:
wangh 2024-02-01 11:31:55 +08:00
parent 79c152ca76
commit d789b8b85a
18 changed files with 552 additions and 185 deletions

View File

@ -383,7 +383,7 @@
</el-tag> --> </el-tag> -->
</div> </div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> --> <!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div v-if="cardValueForm.paymentType != 'CASH'"> <div v-if="(cardValueForm.paymentType !== 'CASH' && flag === 1) || (cardFuelDieselForm.paymentType !== 'CASH' && flag ===2) ">
<div> <div>
<el-input v-model="authCode" <el-input v-model="authCode"
v-focus ref="getFocus" v-focus ref="getFocus"
@ -1025,7 +1025,11 @@ export default {
methods: { methods: {
// //
changeSeekZero(){ changeSeekZero(){
this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2) if (this.flag === 1) {
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
} else if (this.flag === 2) {
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
}
}, },
handleQuery(){ handleQuery(){
this.subCardList.page = 1; this.subCardList.page = 1;
@ -1329,6 +1333,7 @@ export default {
confirm(flag) { confirm(flag) {
this.flag = flag this.flag = flag
if (flag === 1) { if (flag === 1) {
if (this.cardValueForm.paymentType === '') { if (this.cardValueForm.paymentType === '') {
this.$message.error('请选择支付方式'); this.$message.error('请选择支付方式');
@ -1431,7 +1436,7 @@ export default {
let file = {} let file = {}
// //
file = this.cardValueList[index] file = this.cardValueList[index]
console.log("file",file)
this.realyPayBills = file.rechargeBalance this.realyPayBills = file.rechargeBalance
this.cardValueForm.rechargeBalance = file.rechargeBalance this.cardValueForm.rechargeBalance = file.rechargeBalance
this.cardValueForm.bidBalance = file.bidBalance this.cardValueForm.bidBalance = file.bidBalance
@ -1481,7 +1486,16 @@ export default {
// //
async collection() { async collection() {
if (this.cardValueForm.paymentType=="CASH"){ let actualPayment = 0
let makeChange = 0
let userForm = this.form
if (this.flag === 1) {
if (!this.authCode && this.cardValueForm.paymentType !== "CASH") {
this.$message.error('请先扫码');
return
}else {
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){ if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
this.$modal.msgError("请输入正确的金额"); this.$modal.msgError("请输入正确的金额");
return; return;
@ -1490,14 +1504,8 @@ export default {
this.$modal.msgError("请输入正确的金额"); this.$modal.msgError("请输入正确的金额");
return; return;
} }
} actualPayment = this.authCode
makeChange = this.seekZero
let userForm = this.form
if (this.flag === 1) {
if (!this.authCode && this.cardValueForm.paymentType !== "CASH") {
this.$message.error('请先扫码');
return
} }
// id // id
this.cardValueForm.mtUserId = userForm.id this.cardValueForm.mtUserId = userForm.id
@ -1506,6 +1514,8 @@ export default {
// //
this.cardValueForm.authCode = this.authCode this.cardValueForm.authCode = this.authCode
this.cardValueForm.realyPayBills = this.realyPayBills this.cardValueForm.realyPayBills = this.realyPayBills
this.cardValueForm.actualPayment = actualPayment
this.cardValueForm.makeChange = makeChange
let id; let id;
@ -1541,7 +1551,7 @@ export default {
this_.isPay = false; this_.isPay = false;
clearInterval(timer); clearInterval(timer);
clearTimeout(timer3); clearTimeout(timer3);
console.log("t2")
} }
}, 500) }, 500)
@ -1559,12 +1569,26 @@ export default {
if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") { if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") {
this.$message.error('请先扫码'); this.$message.error('请先扫码');
return return
}else {
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
this.$modal.msgError("请输入正确的金额");
return;
}
if (!this.authCode){
this.$modal.msgError("请输入正确的金额");
return;
}
actualPayment = this.authCode
makeChange = this.seekZero
} }
// console.log("cardFuelDieselForm",this.cardFuelDieselForm) // console.log("cardFuelDieselForm",this.cardFuelDieselForm)
this.cardFuelDieselForm.mtUserId = userForm.id this.cardFuelDieselForm.mtUserId = userForm.id
this.cardFuelDieselForm.name = userForm.name this.cardFuelDieselForm.name = userForm.name
this.cardFuelDieselForm.mobile = userForm.mobile this.cardFuelDieselForm.mobile = userForm.mobile
this.cardFuelDieselForm.authCode = this.authCode this.cardFuelDieselForm.authCode = this.authCode
this.cardFuelDieselForm.actualPayment = actualPayment
this.cardFuelDieselForm.makeChange = makeChange
// console.log("this.cardFuelDieselForm",this.cardFuelDieselForm) // console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
@ -1746,8 +1770,29 @@ export default {
this.$router.back(-1); this.$router.back(-1);
} }
// //
},
watch: {
openConfirm(newValue) {
if (!newValue) {
this.openRecharge = false;
this.isPay = true;
this.openConfirm = false
this.openRecharge = false
this.seekZero = 0
this.isPaySuccess = false;
this.authCode = null
this.activeRecharge = 'balance',
this.cardValueForm = {}
this.cardFuelDieselForm = {}
this.iniz()
} }
}
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -56,7 +56,7 @@
</el-select> </el-select>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="油机号" prop="name"> <el-form-item label="油机号" prop="name">
<el-input v-model="gunForm.oilMachineGunNumber"></el-input> <el-input v-model="gunForm.oilMachineGunNumber"></el-input>
<div style="font-size: 12px;color: #999999">油机连接模式下 绑定油机系统中的枪号信息与当前枪号绑定</div> <div style="font-size: 12px;color: #999999">油机连接模式下 绑定油机系统中的枪号信息与当前枪号绑定</div>
</el-form-item> </el-form-item>

View File

@ -133,7 +133,7 @@
<el-dialog title="添加" :visible.sync="dialogFormVisible" :close-on-click-modal="false"> <el-dialog title="添加" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form ref="oilNumberF" :model="oilNumber" :rules="rules"> <el-form ref="oilNumberF" :model="oilNumber" :rules="rules">
<el-form-item label="油品类型" prop="oilType"> <el-form-item label="油品类型" prop="oilType" label-width="130px">
<el-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber),oilTypeClick2()"> <el-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber),oilTypeClick2()">
<el-radio <el-radio
v-for="dict in dict.type.oil_type" v-for="dict in dict.type.oil_type"
@ -149,7 +149,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="油品名称" prop="oilName"> <el-form-item label="油品名称" prop="oilName" label-width="130px">
<el-select v-model="oilNumber.oilName" style="width: 217px" placeholder="请选择油品名称" @change="getSecondName()"> <el-select v-model="oilNumber.oilName" style="width: 217px" placeholder="请选择油品名称" @change="getSecondName()">
<el-option <el-option
v-for="option in oilNameList" v-for="option in oilNameList"
@ -161,7 +161,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="计价单位" prop="unit"> <el-form-item label="计价单位" prop="unit" label-width="130px">
<el-select v-model="oilNumber.unit" style="width: 217px" <el-select v-model="oilNumber.unit" style="width: 217px"
placeholder="请选择计价单位"> placeholder="请选择计价单位">
<el-option <el-option
@ -177,28 +177,28 @@
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="油品单价" prop="oilPrice"> <el-form-item label="当前油品售出价" prop="oilPrice" label-width="130px">
<el-input v-model="oilNumber.oilPrice" pattern="^\d+(\.\d+)?$" style="width: 217px"> <el-input v-model="oilNumber.oilPrice" pattern="^\d+(\.\d+)?$" style="width: 217px">
<template slot="append"></template> <template slot="append">{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="国标价格" prop="gbPrice"> <el-form-item label="当前国标价格" prop="gbPrice" label-width="130px">
<el-input v-model="oilNumber.gbPrice" pattern="^\d+(\.\d+)?$" style="width: 217px"> <el-input v-model="oilNumber.gbPrice" pattern="^\d+(\.\d+)?$" style="width: 217px">
<template slot="append"></template> <template slot="append">{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="收款单位" prop="receivingUnits"> <!-- <el-form-item label="收款单位" prop="receivingUnits">-->
<el-radio-group v-model="oilNumber.receivingUnits"> <!-- <el-radio-group v-model="oilNumber.receivingUnits">-->
<el-radio label="元" ></el-radio> <!-- <el-radio label="元" ></el-radio>-->
<el-radio label="计价单位"></el-radio> <!-- <el-radio label="计价单位"></el-radio>-->
</el-radio-group> <!-- </el-radio-group>-->
</el-form-item> <!-- </el-form-item>-->
<div class="hui-seiz">点击油品输入的计算单位可默认元或计价单位(L//kg),页面也可自行切换</div> <!-- <div class="hui-seiz">点击油品输入的计算单位可默认元或计价单位(L//kg),页面也可自行切换</div>-->
<el-form-item label="状态" prop="state"> <el-form-item label="状态" prop="state" label-width="130px">
<el-radio-group v-model="oilNumber.state"> <el-radio-group v-model="oilNumber.state">
<el-radio <el-radio
v-for="dict in dict.type.zhzt" v-for="dict in dict.type.zhzt"
@ -208,10 +208,10 @@
/> />
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序" label-width="130px">
<el-input-number v-model="oilNumber.sort" controls-position="right" @change="handleChange" :min="1" :max="10"></el-input-number> <el-input-number v-model="oilNumber.sort" controls-position="right" @change="handleChange" :min="1" :max="10"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注" label-width="130px">
<el-input type="textarea" v-model="oilNumber.remark"></el-input> <el-input type="textarea" v-model="oilNumber.remark"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -263,27 +263,31 @@
<!-- --> <!-- -->
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="油品单价" prop="oilPrice"> <el-form-item label="当前油品售出价" prop="oilPrice">
<el-input v-model="oilNumber.oilPrice" pattern="^\d+(\.\d+)?$" style="width: 217px"> <el-input v-model="oilNumber.oilPrice" pattern="^\d+(\.\d+)?$" style="width: 217px">
<template slot="append"></template> <template slot="append">{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="国标价" prop="gbPrice"> <el-form-item label="当前国标价" prop="gbPrice">
<el-input v-model="oilNumber.gbPrice" pattern="^\d+(\.\d+)?$" style="width: 217px"> <el-input v-model="oilNumber.gbPrice" pattern="^\d+(\.\d+)?$" style="width: 217px">
<template slot="append"></template> <template slot="append">{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="收款单位" prop="receivingUnits"> <!-- <el-form-item label="收款单位" prop="receivingUnits">-->
<el-radio-group v-model="oilNumber.receivingUnits"> <!-- <el-radio-group v-model="oilNumber.receivingUnits">-->
<el-radio label="元"></el-radio> <!-- <el-radio label="元"></el-radio>-->
<el-radio label="计价单位"></el-radio> <!-- <el-radio label="计价单位"></el-radio>-->
</el-radio-group> <!-- </el-radio-group>-->
</el-form-item> <!-- </el-form-item>-->
<div class="hui-seiz">点击油品输入的计算单位可默认元或计价单位(L//kg),页面也可自行切换</div> <!-- <div class="hui-seiz">点击油品输入的计算单位可默认元或计价单位(L//kg),页面也可自行切换</div>-->
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="状态" prop="state"> <el-form-item label="状态" prop="state">
<el-radio-group v-model="oilNumber.state"> <el-radio-group v-model="oilNumber.state">
<el-radio <el-radio
@ -292,13 +296,21 @@
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
/> />
<!-- <el-radio label="启用"></el-radio>--> <!-- <el-radio label="启用"></el-radio>-->
<!-- <el-radio label="禁用"></el-radio>--> <!-- <el-radio label="禁用"></el-radio>-->
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="排序"> <el-form-item label="排序">
<el-input-number v-model="oilNumber.sort" controls-position="right" @change="handleChange" :min="1" :max="10"></el-input-number> <el-input-number v-model="oilNumber.sort" controls-position="right" @change="handleChange" :min="1" :max="10" style="width: 217px"></el-input-number>
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input type="textarea" v-model="oilNumber.remark" ></el-input> <el-input type="textarea" v-model="oilNumber.remark" ></el-input>
</el-form-item> </el-form-item>
@ -312,7 +324,7 @@
<el-dialog title="添加预设" :visible.sync="dialogFormPricesAdd" width="450px" :close-on-click-modal="false"> <el-dialog title="添加预设" :visible.sync="dialogFormPricesAdd" width="450px" :close-on-click-modal="false">
<el-form ref="priForm" :model="oilPresetPrices" label-width="100px" :rules="oilPresetPricesRules"> <el-form ref="priForm" :model="oilPresetPrices" label-width="100px" :rules="oilPresetPricesRules">
<el-form-item label="预设油号" prop="numberId"> <el-form-item label="预设油号" prop="numberId" label-width="120px">
<el-select v-model="oilPresetPrices.numberId" placeholder="请选择油号" @change="oilTypeClickByPrice()"> <el-select v-model="oilPresetPrices.numberId" placeholder="请选择油号" @change="oilTypeClickByPrice()">
<el-option <el-option
v-for="option in selectOilTypeByPrice" v-for="option in selectOilTypeByPrice"
@ -322,27 +334,27 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="当前油站价"> <el-form-item label="当前油品售出价" label-width="120px">
<el-input v-model="oilPresetPrices.currentPetrolPrices " style="width: 217px" readonly disabled> <el-input v-model="oilPresetPrices.currentPetrolPrices " style="width: 217px" readonly disabled>
<template slot="append"></template> <template slot="append">{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="预设油站价" prop="presetOilPrices"> <el-form-item label="预设油站售出价" prop="presetOilPrices" label-width="120px">
<el-input v-model="oilPresetPrices.presetOilPrices" pattern="^\d+(\.\d+)?$" style="width: 217px"> <el-input v-model="oilPresetPrices.presetOilPrices" pattern="^\d+(\.\d+)?$" style="width: 217px">
<template slot="append"></template> <template slot="append">{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="当前国标价"> <el-form-item label="当前国标价" label-width="120px">
<el-input v-model="oilPresetPrices.currentGbPrice" style="width: 217px" readonly disabled> <el-input v-model="oilPresetPrices.currentGbPrice" style="width: 217px" readonly disabled>
<template slot="append"></template> <template slot="append">{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="预设国标价" prop="presetGbPrice"> <el-form-item label="预设国标价" prop="presetGbPrice" label-width="120px">
<el-input v-model="oilPresetPrices.presetGbPrice" pattern="^\d+(\.\d+)?$" style="width: 217px"> <el-input v-model="oilPresetPrices.presetGbPrice" pattern="^\d+(\.\d+)?$" style="width: 217px">
<template slot="append"></template> <template slot="append">{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动时间" prop="effectiveTime"> <el-form-item label="活动时间" prop="effectiveTime" label-width="120px">
<el-date-picker <el-date-picker
v-model="oilPresetPrices.effectiveTime" v-model="oilPresetPrices.effectiveTime"
type="datetime" type="datetime"
@ -353,7 +365,7 @@
value-format="yyyy-MM-dd HH:mm:ss"> value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<div class="hui-seiz">如生效时间与当前时间间隔小于1分钟,当前油价将立即生效</div> <!-- <div class="hui-seiz">如生效时间与当前时间间隔小于1分钟,当前油价将立即生效</div>-->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormPricesAdd = false"> </el-button> <el-button @click="dialogFormPricesAdd = false"> </el-button>
@ -435,9 +447,9 @@ import {
gbPrice: [ gbPrice: [
{ required: true, validator:valiNumberPass, trigger: "blur" } { required: true, validator:valiNumberPass, trigger: "blur" }
], ],
receivingUnits: [ // receivingUnits: [
{ required: true, message: '请选择', trigger: 'change' } // { required: true, message: '', trigger: 'change' }
], // ],
state: [ state: [
{ required: true, message: '请选择状态', trigger: 'change' } { required: true, message: '请选择状态', trigger: 'change' }
] ]
@ -609,16 +621,16 @@ import {
await Promise.all([ await Promise.all([
this.getOilTypeList("oil_type"), this.getOilTypeList("oil_type"),
this.getOilTypeList("pricingUnitCN"), this.getOilTypeList("pricingUnitCN"),
this.getOilTypeList("pricingUnitEN"), // this.getOilTypeList("pricingUnitEN"),
]); ]);
this.receivingUnitList = []; this.receivingUnitList = [];
var cla1 = { // var cla1 = {
label: "英文简称", // label: "",
value: -1, // value: -1,
dis: true // dis: true
} // }
this.receivingUnitList.push(cla1); // this.receivingUnitList.push(cla1);
// this.receivingUnitCN receivingUnitList // this.receivingUnitCN receivingUnitList
for (const argumentsKey in this.receivingUnitCN) { for (const argumentsKey in this.receivingUnitCN) {
const value = this.receivingUnitCN[argumentsKey]; const value = this.receivingUnitCN[argumentsKey];
@ -629,27 +641,28 @@ import {
} }
this.receivingUnitList.push(cla); this.receivingUnitList.push(cla);
} }
var cla2 = { // var cla2 = {
label: "中文简称", // label: "",
value: -2, // value: -2,
dis: true // dis: true
} // }
cla2 = { // cla2 = {
label: "中文简称", // label: "",
value: -3, // value: -3,
dis: true // dis: true
} // }
this.receivingUnitList.push(cla2); // this.receivingUnitList.push(cla2);
//
for (const argumentsKey in this.receivingUnitEN) { // for (const argumentsKey in this.receivingUnitEN) {
const value = this.receivingUnitEN[argumentsKey]; // console.log("argumentsKey",argumentsKey)
var cla = { // const value = this.receivingUnitEN[argumentsKey];
label: value.dictLabel, // var cla = {
value: value.dictValue, // label: value.dictLabel,
dis: false // value: value.dictValue,
} // dis: false
this.receivingUnitList.push(cla); // }
} // this.receivingUnitList.push(cla);
// }
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }
@ -744,8 +757,10 @@ import {
this_.oilTypeList = list; this_.oilTypeList = list;
} else if (data == "pricingUnitCN") { // } else if (data == "pricingUnitCN") { //
this_.receivingUnitCN = list; this_.receivingUnitCN = list;
console.log("receivingUnitCN1",list)
} else if (data == "pricingUnitEN") { // } else if (data == "pricingUnitEN") { //
this_.receivingUnitEN = list; this_.receivingUnitEN = list;
console.log("receivingUnitCN2",list)
} else { } else {
this_.oilNameList = list; this_.oilNameList = list;
} }
@ -833,6 +848,7 @@ import {
this.oilPresetPrices.currentGbPrice = oil.gbPrice; this.oilPresetPrices.currentGbPrice = oil.gbPrice;
this.oilPresetPrices.numberId = oil.numberId; this.oilPresetPrices.numberId = oil.numberId;
this.oilPresetPrices.oilType = oil.id; this.oilPresetPrices.oilType = oil.id;
this.oilPresetPrices.unit = oil.unit;
} }
}); });
}, },

View File

@ -45,8 +45,8 @@
<el-table-column label="油品密度" align="center" prop="oilDensity"/> <el-table-column label="油品密度" align="center" prop="oilDensity"/>
</el-table-column> </el-table-column>
<el-table-column label="存油数量" align="center" prop="storedQuantity"/> <el-table-column label="存油数量" align="center" prop="storedQuantity"/>
<el-table-column label="存油总价 " align="center" prop="totalPrice"/> <el-table-column label="存油总价(元)" align="center" prop="totalPrice"/>
<el-table-column label="折后单价" align="center" prop="discountedPrice"/> <el-table-column label="折后单价(元/升)" align="center" prop="discountedPrice"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="200"> <el-table-column label="更新时间" align="center" prop="updateTime" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
@ -121,7 +121,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="油品密度" prop="oilDensity"> <el-form-item label="油品密度" prop="oilDensity">
<el-input v-model="tankForm.oilDensity" placeholder="请输入油品密度" maxlength="30" @input="getSecondName()"> <el-input v-model="tankForm.oilDensity" placeholder="请输入油品密度" :disabled="true" maxlength="30" @input="getSecondName()">
<template slot="append">g/ml</template> <template slot="append">g/ml</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -130,14 +130,14 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="存油数量" prop="storedQuantity"> <el-form-item label="存油数量" prop="storedQuantity">
<el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" maxlength="30" pattern="^\d+(\.\d+)?$" @change="changeNumber" @input="changePrice() " :disabled="disableInput"> <el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" maxlength="30" :disabled="true" pattern="^\d+(\.\d+)?$" @change="changeNumber" @input="changePrice() " >
<template slot="append">{{tankForm.unit}}</template> <template slot="append">{{tankForm.unit}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="存油总价" prop="totalPrice" > <el-form-item label="存油总价" prop="totalPrice" >
<el-input v-model="tankForm.totalPrice" placeholder="请输入存油总价" maxlength="30" @input="changePrice()" @change="changeNumber" :disabled="disableInput"> <el-input v-model="tankForm.totalPrice" placeholder="请输入存油总价" maxlength="30" :disabled="true" @input="changePrice()" @change="changeNumber" >
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -145,7 +145,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="折合单价" prop="discountedPrice"> <el-form-item label="折合单价" prop="discountedPrice">
<el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30" :disabled="true"> <el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30" :disabled="true">
<template slot="append"></template> <template slot="append">{{tankForm.unit?"/"+tankForm.unit:''}}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -217,7 +217,9 @@ export default {
callback(new Error('请输入内容')); callback(new Error('请输入内容'));
} else if (!reg.test(value)) { } else if (!reg.test(value)) {
callback(new Error('请输入数字')); callback(new Error('请输入数字'));
} else { } else if (value.length>8) {
callback(new Error('数字长度不得超过8位'));
}else {
callback(); callback();
} }
}; };
@ -232,10 +234,10 @@ export default {
oilNumber: '', oilNumber: '',
tankVolume: null, tankVolume: null,
lowerWarning: null, lowerWarning: null,
oilDensity: null, oilDensity: 0,
storedQuantity: null, storedQuantity: 0,
totalPrice: null, totalPrice: 0,
discountedPrice: null, discountedPrice: 0,
status: '', status: '',
inventoryStatistics: '', inventoryStatistics: '',
remarks: '', remarks: '',
@ -302,6 +304,14 @@ export default {
} }
} }
}, },
watch: {
open(newValue){
if (!newValue) {
let this_ = this
this_.getList()
}
}
},
async created() { async created() {
let this_ = this let this_ = this
await this_.getList() await this_.getList()
@ -392,15 +402,38 @@ export default {
tankAdd() { tankAdd() {
// //
let this_ = this let this_ = this
this_.tankForm = {} this_.recharge()
this_.tankForm.status= '启用', // this_.tankForm.status= '',
this_.tankForm.inventoryStatistics= '启用', // this_.tankForm.inventoryStatistics= '',
this_.disableInput = false this_.disableInput = false
this_.open = true; this_.open = true;
this_.title = "新增油罐"; this_.title = "新增油罐";
this.getOilNameList() // this.getOilNameList() //
}, },
recharge () {
this.tankForm= {
id: null,
tankName: '',
oilNumber: '',
tankVolume: null,
lowerWarning: null,
oilDensity: 0,
storedQuantity: 0,
totalPrice: 0,
discountedPrice: 0,
status: '启用',
inventoryStatistics: '启用',
remarks: '',
storeId: null,
numberId: null,
createTime: null,
updateTime: null,
createBy: '',
updateBy: '',
unit:''
}
},
// //
chooseOilNumber() { chooseOilNumber() {
let this_ = this; let this_ = this;

View File

@ -24,6 +24,15 @@ export function jklist() {
method: 'get', method: 'get',
}) })
} }
// 查询校色列表
export function getDutyList(data) {
return request({
url: '/backendApi/duty/getDutyList',
method: 'get',
params: data
})
}
// 查询用户详细 // 查询用户详细

View File

@ -20,6 +20,7 @@
@change="handleChange" @change="handleChange"
node-key="id" node-key="id"
@node-click="activecilck" @node-click="activecilck"
highlight-current
default-expand-all default-expand-all
:expand-on-click-node="false" :expand-on-click-node="false"
:render-content="renderContent"> :render-content="renderContent">
@ -184,31 +185,137 @@
</el-form-item> </el-form-item>
<el-row v-if="ruleForm.deptType == 4"> <el-row v-if="ruleForm.deptType !== '3'">
<el-col :span="8"> <el-col :span="20">
<el-form-item label="额度设置方式" prop=""> <el-form-item label="额度设置方式" prop="">
<el-radio-group v-model="ruleForm.turnoverType"> <el-radio-group v-model="ruleForm.turnoverType">
<el-radio label="1">金额上限</el-radio> <el-radio label=1>无限制</el-radio>
<el-radio label="2">时间上限</el-radio> <el-radio label=2>时间限制</el-radio>
<el-radio label=3>预付费</el-radio>
<el-radio label=4>后付费</el-radio>
<el-radio label=5>年付费</el-radio>
<el-radio label=6>可创建油站站点数量</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10">
<el-form-item v-if="ruleForm.turnoverType == 1" label="金额上限" prop="turnoverLimit" style="width:300px" >
<el-input v-model.number="ruleForm.turnoverLimit"></el-input>
</el-form-item>
<el-form-item v-if="ruleForm.turnoverType == 2" label="时间上限" prop="turnoverType" style="width:220px"> </el-row>
<el-row>
<template v-if="ruleForm.turnoverType === '2'">
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
<el-date-picker <el-date-picker
v-model="ruleForm.turnoverTime" v-model="ruleForm.turnoverTime"
type="date" type="daterange"
placeholder="选择日期"> range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</template>
<template v-if="ruleForm.turnoverType === '3'">
<el-col :span="6">
<el-form-item label="预付金额">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="费率">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="可跑流量">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '4'">
<el-col :span="6">
<el-form-item label="费率">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实际交易量">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="系统服务费">
<el-input v-model="ruleForm.turnoverTime">
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '5'">
<el-col :span="10">
<el-form-item label="时间范围">
<el-date-picker
v-model="ruleForm.turnoverTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="价格">
<el-input v-model="ruleForm.turnoverTime"></el-input>
</el-form-item>
</el-col>
</template>
<template v-if="ruleForm.turnoverType === '6'">
<el-col :span="10">
<el-form-item label="可创建油站数量" label-width="110px">
<el-input-number v-model="ruleForm.turnoverTime" @change="handleChangeInputNumber" :min="1"
:max="1000" label="可创建油站数量"></el-input-number>
</el-form-item>
</el-col>
</template>
</el-row> </el-row>
<el-row v-if="ruleForm.deptType === '3'">
<el-form-item label="时间范围">
<el-date-picker
v-model="ruleForm.turnoverTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-row>
<el-form-item label="状态" prop="name"> <el-form-item label="状态" prop="name">
<el-switch v-model="value10" @change="getswitch" ></el-switch> <el-switch v-model="value10" @change="getswitch" ></el-switch>
@ -294,9 +401,9 @@
<el-select v-model="form.roleIds" @change="$forceUpdate(),getCodeByRole($event)" placeholder="请选择角色"> <el-select v-model="form.roleIds" @change="$forceUpdate(),getCodeByRole($event)" placeholder="请选择角色">
<el-option <el-option
v-for="item in rolelist" v-for="item in rolelist"
:key="item.id" :key="item.dutyId"
:label="item.name" :label="item.dutyName"
:value="item.id" :value="item.dutyId"
></el-option> ></el-option>
</el-select> </el-select>
@ -347,7 +454,7 @@
</template> </template>
<script> <script>
import { import {
listUser, listUser,
delUser, delUser,
addUser, addUser,
@ -359,8 +466,8 @@
deptedit, deptedit,
deptDelete, deptDelete,
Userlist, Userlist,
jklist jklist, getDutyList
} from "@/api/system/Site/site"; } from "@/api/system/Site/site";
// import { getStoreStaffList } from "@/api/staff"; // import { getStoreStaffList } from "@/api/staff";
import { getAccountList, getAccount, delAccount, addAccount, updateAccount, resetAccountPwd, changeAccountStatus } from "@/api/system/account"; import { getAccountList, getAccount, delAccount, addAccount, updateAccount, resetAccountPwd, changeAccountStatus } from "@/api/system/account";
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
@ -573,20 +680,18 @@
this.getList(); this.getList();
}, },
components: { Treeselect }, components: { Treeselect },
methods: { methods: {
// //
initPage() { initPage() {
this.activeName= 'list', this.activeName= 'list',
this.userList= 'list', this.userList= 'list',
this.cleanUp() this.cleanUp()
this.getList() this.getList()
}, },
//
getswitch(e){ getswitch(e){
console.log(e) console.log(e)
if(e == true){ if(e == true){
@ -595,6 +700,7 @@
this.ruleForm.status = 'jy' this.ruleForm.status = 'jy'
} }
}, },
activecilck(data){ activecilck(data){
console.log('点树',data) console.log('点树',data)
@ -603,14 +709,13 @@
this.queryParams.deptId = data.id this.queryParams.deptId = data.id
this.deptType = data.deptType this.deptType = data.deptType
// //
// if(this.activeName == 'info'){
this.appedit(data.id,data.label) this.appedit(data.id,data.label)
// }
// //
// if(this.activeName == 'list'){ // this.getList();
this.getList(); this.onlyGetUser()
// }
}, },
//
cleanUp(){ cleanUp(){
this.ruleForm = { this.ruleForm = {
parentId:'', parentId:'',
@ -625,9 +730,15 @@
turnoverTime: '', turnoverTime: '',
} }
}, },
//
handleChange(value) { handleChange(value) {
console.log(value); console.log(value);
}, },
handleChangeInputNumber(value) {
console.log(value);
},
handleChanges(value) { handleChanges(value) {
// console.log('',value,this.cascader); // console.log('',value,this.cascader);
let arr = value let arr = value
@ -833,6 +944,20 @@
}, },
onlyGetUser(){
this.loading = true;
// this.addDateRange(this.queryParams, this.dateRange)
listUser(this.queryParams).then(response => {
this.userList = response.data.records;
this.total = response.data.total;
this.total = response.data.total;
this.loading = false;
}
);
},
// getStaffList() { // getStaffList() {
// const storeId = this.form.storeId ? this.form.storeId : 0; // const storeId = this.form.storeId ? this.form.storeId : 0;
// getStoreStaffList(storeId).then(response => { // getStoreStaffList(storeId).then(response => {
@ -964,17 +1089,31 @@
break; break;
} }
}, },
//
getRoleList(permissionType) {
let par={
permissionType:permissionType
}
getDutyList(par).then(res=>{
this.rolelist = res.data
})
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.open = true this.open = true
this.title = "新增用户" this.title = "新增用户"
this.resetForm() this.resetForm()
let permissionType
if (this.deptType === "3") {
permissionType = 'staff'
}else {
permissionType = 'system'
}
this.getRoleList(permissionType);
console.log("this.form",this.form)
jklist().then(res=>{
this.rolelist = res.data.content
})
}, },
resetForm () { resetForm () {
this.form= { this.form= {
@ -996,14 +1135,15 @@
app.form.roleIds = Number(app.form.roleIds); app.form.roleIds = Number(app.form.roleIds);
app.form.password1 = row.password app.form.password1 = row.password
jklist().then(res=>{ //
console.log(res) this.getRoleList();
this.rolelist = res.data.content
})
}, },
//
/** 重置密码按钮操作 */ /** 重置密码按钮操作 */
handleResetPwd(row) { handleResetPwd(row) {
@ -1112,7 +1252,13 @@
}; };
</script> </script>
<style> <style>
.app-container{
.el-tree-node.is-current > .el-tree-node__content {
background-color: rgb(64, 158, 255) !important;
}
.app-container{
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #f6f8f9; background: #f6f8f9;

View File

@ -108,5 +108,8 @@ public class IntegralOrders extends BaseEntity {
*/ */
private String processingStatus; private String processingStatus;
private String actualPayment;
private String makeChange;
} }

View File

@ -315,10 +315,10 @@
</insert> </insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into integral_orders(user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on, exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time, update_time, create_by, update_by,staff_id,payment_type,chain_store_id) insert into integral_orders(user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on, exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time, update_time, create_by, update_by,staff_id,payment_type,chain_store_id,actual_payment,make_change)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.userId}, #{entity.orderNumber}, #{entity.giftId}, #{entity.shippingType}, #{entity.paidInfo}, #{entity.amount}, #{entity.integral}, #{entity.comeOn}, #{entity.exchangeQuantity}, #{entity.orderStatus}, #{entity.status}, #{entity.orderType}, #{entity.processingResult}, #{entity.notes}, #{entity.storeId}, NOW(), NOW(), #{entity.createBy}, #{entity.updateBy},#{entity.staffId},#{entity.paymentType},#{entity.chainStoreId}) (#{entity.userId}, #{entity.orderNumber}, #{entity.giftId}, #{entity.shippingType}, #{entity.paidInfo}, #{entity.amount}, #{entity.integral}, #{entity.comeOn}, #{entity.exchangeQuantity}, #{entity.orderStatus}, #{entity.status}, #{entity.orderType}, #{entity.processingResult}, #{entity.notes}, #{entity.storeId}, NOW(), NOW(), #{entity.createBy}, #{entity.updateBy},#{entity.staffId},#{entity.paymentType},#{entity.chainStoreId} ,#{entity.actualPayment},#{entity.makeChange})
</foreach> </foreach>
</insert> </insert>

View File

@ -139,7 +139,9 @@ public class CardFuelRecord extends BaseEntity {
private String status; //订单处理状态防止二次执行0是订单未完成1是订单完成不可重复执行 private String status; //订单处理状态防止二次执行0是订单未完成1是订单完成不可重复执行
private String actualPayment;
private String makeChange;

View File

@ -216,8 +216,8 @@
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into card_fuel_record(mt_user_id, name, mobile, mt_staff_id, real_name, staff_mobile, card_fuel_id, recharge_balance,lockup_price, income_litres,pay_amount, payment_type, remark, points, growth_value, royalty_type, percentage_commissions, amount_commission, create_by, create_time, update_by, update_time, pay_status, store_id, payment_no, type, oil_type,oil_name,chain_store_id) insert into card_fuel_record(mt_user_id, name, mobile, mt_staff_id, real_name, staff_mobile, card_fuel_id, recharge_balance,lockup_price, income_litres,pay_amount, payment_type, remark, points, growth_value, royalty_type, percentage_commissions, amount_commission, create_by, create_time, update_by, update_time, pay_status, store_id, payment_no, type, oil_type,oil_name,chain_store_id,actual_payment,make_change)
values (#{mtUserId}, #{name}, #{mobile}, #{mtStaffId}, #{realName}, #{staffMobile}, #{cardFuelId}, #{rechargeBalance}, #{lockupPrice}, #{incomeLitres}, #{payAmount}, #{paymentType}, #{remark}, #{points}, #{growthValue}, #{royaltyType}, #{percentageCommissions}, #{amountCommission}, #{createBy}, #{createTime}, #{updateBy}, #{createTime}, #{payStatus}, #{storeId}, #{paymentNo}, #{type}, #{oilType},#{oilName}, #{chainStoreId}) values (#{mtUserId}, #{name}, #{mobile}, #{mtStaffId}, #{realName}, #{staffMobile}, #{cardFuelId}, #{rechargeBalance}, #{lockupPrice}, #{incomeLitres}, #{payAmount}, #{paymentType}, #{remark}, #{points}, #{growthValue}, #{royaltyType}, #{percentageCommissions}, #{amountCommission}, #{createBy}, #{createTime}, #{updateBy}, #{createTime}, #{payStatus}, #{storeId}, #{paymentNo}, #{type}, #{oilType},#{oilName}, #{chainStoreId}, #{actualPayment}, #{makeChange})
</insert> </insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">

View File

@ -79,5 +79,11 @@ public class CardValueRecord extends Model<CardValueRecord> {
private String status; private String status;
private String actualPayment;
private String makeChange;
} }

View File

@ -68,5 +68,11 @@ public class SysDept extends BaseEntity
private List<SysDept> children = new ArrayList<SysDept>(); private List<SysDept> children = new ArrayList<SysDept>();
private String turnoverType; private String turnoverType;
private BigDecimal turnoverLimit; private BigDecimal turnoverLimit;
private Date turnoverTime;
private Date turnoverStartTime;
private Date turnoverEndTime;
private BigDecimal rates;
private Integer storeNum;
private BigDecimal prepaidAmount;
} }

View File

@ -111,6 +111,14 @@ public class BackendDutyController extends BaseController {
return getSuccessResult(result); return getSuccessResult(result);
} }
// 获取角色列表
@GetMapping("getDutyList")
public ResponseObject getDutyList(TDuty tDuty) {
return getSuccessResult(tDutyService.getDutyList(tDuty));
};
/** /**
* 新增角色 * 新增角色
* *

View File

@ -47,6 +47,7 @@ public class TDuty extends BaseEntity implements Serializable {
@ApiModelProperty("角色编码") @ApiModelProperty("角色编码")
private String code; private String code;
private String permissionType;
} }

View File

@ -9,6 +9,7 @@ import com.fuint.system.role.entity.TDuty;
import com.fuint.repository.model.TSource; import com.fuint.repository.model.TSource;
import com.fuint.common.domain.TreeNode; import com.fuint.common.domain.TreeNode;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 角色服务接口 * 角色服务接口
@ -114,4 +115,6 @@ public interface DutyService extends IService<TDuty> {
* @return * @return
*/ */
List<Long> findDutiesByAccountId(Integer accountId); List<Long> findDutiesByAccountId(Integer accountId);
List<TDuty> getDutyList(TDuty tDuty);
} }

View File

@ -1,5 +1,6 @@
package com.fuint.system.role.service.impl; package com.fuint.system.role.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -29,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 角色服务实现类 * 角色服务实现类
@ -276,4 +278,14 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
public List<Long> findDutiesByAccountId(Integer accountId) { public List<Long> findDutiesByAccountId(Integer accountId) {
return tDutyMapper.getRoleIdsByAccountId(accountId); return tDutyMapper.getRoleIdsByAccountId(accountId);
} }
@Override
public List<TDuty> getDutyList(TDuty tDuty) {
LambdaQueryWrapper<TDuty> lambdaQueryWrapper = new LambdaQueryWrapper<>();
if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(tDuty.getPermissionType())) {
lambdaQueryWrapper.like(TDuty::getPermissionType,tDuty.getPermissionType());
}
return baseMapper.selectList(lambdaQueryWrapper);
}
} }

View File

@ -362,6 +362,22 @@
</template> </template>
</template> </template>
<template v-else-if="allAmout>0">
<div>
<el-input v-model="authCode"
v-focus ref="getFocus"
autofocus
@input="changeSeekZero"
@keydown.enter.native="collection"
placeholder="请输入收款金额">
</el-input>
</div>
<div style="text-align: right;margin: 10px 0">
<span>应找零</span>
<span style="color: red;font-size: 18px"> {{ seekZero }}</span>
</div>
</template>
<el-divider></el-divider> <el-divider></el-divider>
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around"> <span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
<el-button @click="dialogVisiblej = false" class="but"> </el-button> <el-button @click="dialogVisiblej = false" class="but"> </el-button>
@ -419,6 +435,8 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
dict: [], dict: [],
data(){ data(){
return{ return{
seekZero :0,
baseUrl:process.env.VUE_APP_BASE_API, baseUrl:process.env.VUE_APP_BASE_API,
shoppingCart:[], shoppingCart:[],
giftList:'', giftList:'',
@ -490,6 +508,11 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
}, },
}, },
methods:{ methods:{
changeSeekZero(){
this.seekZero = (this.authCode - this.allAmout).toFixed(2)
},
// //
async getGift() { async getGift() {
if (this.queryParams.categoryId ==='first') { if (this.queryParams.categoryId ==='first') {
@ -858,6 +881,14 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
// //
async collection() { async collection() {
let this_ = this let this_ = this
let actualPayment = 0
let makeChange = 0
if (this_.paymentType === "CASH") {
actualPayment = this.authCode
makeChange = this.seekZero
}
// this_.authCode // this_.authCode
let integralOrdersList = [] let integralOrdersList = []
if (this_.shoppingCart.length >0) { if (this_.shoppingCart.length >0) {
@ -871,7 +902,9 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
exchangeQuantity : res.markPurchases, exchangeQuantity : res.markPurchases,
orderType : 1, orderType : 1,
staffId: this_.staff.id, staffId: this_.staff.id,
paymentType : this_.paymentType paymentType : this_.paymentType,
actualPayment : actualPayment,
makeChange : makeChange
} }
integralOrdersList.push(integralOrders) integralOrdersList.push(integralOrders)
}) })
@ -973,7 +1006,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
page: 1, page: 1,
pageSize: 10000, pageSize: 10000,
}, },
this.seekZero = 0
this.handClose() this.handClose()
this.reset() this.reset()

View File

@ -385,13 +385,12 @@
</el-tag> --> </el-tag> -->
</div> </div>
<!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> --> <!-- <div style="text-align: center;margin-bottom: 10px">赠送金额</div> -->
<div v-if="cardValueForm.paymentType != 'CASH'"> <div v-if="(cardValueForm.paymentType !== 'CASH' && flag === 1) || (cardFuelDieselForm.paymentType !== 'CASH' && flag ===2) ">
<div> <div>
<el-input v-model="authCode" <el-input v-model="authCode"
v-focus ref="getFocus" v-focus ref="getFocus"
autofocus autofocus
@keydown.enter.native="collection" @keydown.enter.native="collection"
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付"> placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
<i <i
slot="suffix"> slot="suffix">
@ -428,7 +427,6 @@
<span style="color: red;font-size: 18px"> {{ seekZero }}</span> <span style="color: red;font-size: 18px"> {{ seekZero }}</span>
</div> </div>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="display: flex;justify-content: space-around"> <div style="display: flex;justify-content: space-around">
<el-button @click="cancelCollection">取消收款</el-button> <el-button @click="cancelCollection">取消收款</el-button>
@ -801,6 +799,8 @@ import couponList from "@/views/details/userInfoOrder/couponList.vue";
import growthValueRecord from "@/views/details/userInfoOrder/growthValueRecord.vue"; import growthValueRecord from "@/views/details/userInfoOrder/growthValueRecord.vue";
import refuelMoneyRecord from "@/views/details/userInfoOrder/refuelMoneyRecord.vue"; import refuelMoneyRecord from "@/views/details/userInfoOrder/refuelMoneyRecord.vue";
import cardValueChild from "@/views/details/userInfoOrder/cardValueChild.vue"; import cardValueChild from "@/views/details/userInfoOrder/cardValueChild.vue";
import BigNumber from 'bignumber.js';
import { import {
addCardValueChild, addCardValueChild,
cardValueChildInfo, cardValueChildInfo,
@ -1024,7 +1024,11 @@ export default {
methods: { methods: {
// //
changeSeekZero(){ changeSeekZero(){
this.seekZero = (this.authCode - this.cardValueForm.amount).toFixed(2) if (this.flag === 1) {
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
} else if (this.flag === 2) {
this.seekZero = (this.authCode - this.realyPayBills).toFixed(2)
}
}, },
getName(list,type){ getName(list,type){
let name = "" let name = ""
@ -1489,7 +1493,16 @@ export default {
}, },
async collection() { async collection() {
if (this.cardValueForm.paymentType=="CASH"){ let actualPayment = 0
let makeChange = 0
let userForm = this.form
if (this.flag === 1) {
if (!this.authCode && this.cardValueForm.paymentType !== "CASH") {
this.$message.error('请先扫码');
return
}else {
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){ if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
this.$modal.msgError("请输入正确的金额"); this.$modal.msgError("请输入正确的金额");
return; return;
@ -1498,13 +1511,8 @@ export default {
this.$modal.msgError("请输入正确的金额"); this.$modal.msgError("请输入正确的金额");
return; return;
} }
} actualPayment = this.authCode
let userForm = this.form makeChange = this.seekZero
if (this.flag === 1) {
if (!this.authCode && this.cardValueForm.paymentType !== "CASH") {
this.$message.error('请先扫码');
return
} }
// id // id
this.cardValueForm.mtUserId = userForm.id this.cardValueForm.mtUserId = userForm.id
@ -1513,6 +1521,8 @@ export default {
// //
this.cardValueForm.authCode = this.authCode this.cardValueForm.authCode = this.authCode
this.cardValueForm.realyPayBills = this.realyPayBills this.cardValueForm.realyPayBills = this.realyPayBills
this.cardValueForm.actualPayment = actualPayment
this.cardValueForm.makeChange = makeChange
let id; let id;
@ -1566,12 +1576,26 @@ export default {
if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") { if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") {
this.$message.error('请先扫码'); this.$message.error('请先扫码');
return return
}else {
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
this.$modal.msgError("请输入正确的金额");
return;
}
if (!this.authCode){
this.$modal.msgError("请输入正确的金额");
return;
}
actualPayment = this.authCode
makeChange = this.seekZero
} }
// console.log("cardFuelDieselForm",this.cardFuelDieselForm) // console.log("cardFuelDieselForm",this.cardFuelDieselForm)
this.cardFuelDieselForm.mtUserId = userForm.id this.cardFuelDieselForm.mtUserId = userForm.id
this.cardFuelDieselForm.name = userForm.name this.cardFuelDieselForm.name = userForm.name
this.cardFuelDieselForm.mobile = userForm.mobile this.cardFuelDieselForm.mobile = userForm.mobile
this.cardFuelDieselForm.authCode = this.authCode this.cardFuelDieselForm.authCode = this.authCode
this.cardFuelDieselForm.actualPayment = actualPayment
this.cardFuelDieselForm.makeChange = makeChange
// console.log("this.cardFuelDieselForm",this.cardFuelDieselForm) // console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
@ -1737,6 +1761,7 @@ export default {
this.cardValueForm = {} this.cardValueForm = {}
this.cardFuelDieselForm = {} this.cardFuelDieselForm = {}
this.iniz() this.iniz()
}, },
cancelCollection() { cancelCollection() {
@ -1755,7 +1780,26 @@ export default {
this.$router.back(-1); this.$router.back(-1);
} }
// //
},
watch: {
openConfirm(newValue) {
if (!newValue) {
this.openRecharge = false;
this.isPay = true;
this.openConfirm = false
this.openRecharge = false
this.seekZero = 0
this.isPaySuccess = false;
this.authCode = null
this.activeRecharge = 'balance'
this.cardValueForm = {}
this.cardFuelDieselForm = {}
this.iniz()
} }
}
},
} }
</script> </script>