bug修改
This commit is contained in:
parent
79c152ca76
commit
d789b8b85a
@ -383,7 +383,7 @@
|
||||
</el-tag> -->
|
||||
</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>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
@ -1025,7 +1025,11 @@ export default {
|
||||
methods: {
|
||||
// 计算找零金额
|
||||
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(){
|
||||
this.subCardList.page = 1;
|
||||
@ -1329,6 +1333,7 @@ export default {
|
||||
confirm(flag) {
|
||||
this.flag = flag
|
||||
|
||||
|
||||
if (flag === 1) {
|
||||
if (this.cardValueForm.paymentType === '') {
|
||||
this.$message.error('请选择支付方式');
|
||||
@ -1431,7 +1436,7 @@ export default {
|
||||
let file = {}
|
||||
// 拿到金额
|
||||
file = this.cardValueList[index]
|
||||
console.log("file",file)
|
||||
|
||||
this.realyPayBills = file.rechargeBalance
|
||||
this.cardValueForm.rechargeBalance = file.rechargeBalance
|
||||
this.cardValueForm.bidBalance = file.bidBalance
|
||||
@ -1481,16 +1486,8 @@ export default {
|
||||
|
||||
// 最终支付
|
||||
async collection() {
|
||||
if (this.cardValueForm.paymentType=="CASH"){
|
||||
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
if (!this.authCode){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
}
|
||||
let actualPayment = 0
|
||||
let makeChange = 0
|
||||
|
||||
let userForm = this.form
|
||||
|
||||
@ -1498,6 +1495,17 @@ export default {
|
||||
if (!this.authCode && this.cardValueForm.paymentType !== "CASH") {
|
||||
this.$message.error('请先扫码');
|
||||
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
|
||||
}
|
||||
// 会员id 会员名字会员手机号码
|
||||
this.cardValueForm.mtUserId = userForm.id
|
||||
@ -1506,6 +1514,8 @@ export default {
|
||||
// 支付码
|
||||
this.cardValueForm.authCode = this.authCode
|
||||
this.cardValueForm.realyPayBills = this.realyPayBills
|
||||
this.cardValueForm.actualPayment = actualPayment
|
||||
this.cardValueForm.makeChange = makeChange
|
||||
|
||||
|
||||
let id;
|
||||
@ -1541,7 +1551,7 @@ export default {
|
||||
this_.isPay = false;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timer3);
|
||||
console.log("t2")
|
||||
|
||||
}
|
||||
}, 500)
|
||||
|
||||
@ -1559,12 +1569,26 @@ export default {
|
||||
if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") {
|
||||
this.$message.error('请先扫码');
|
||||
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)
|
||||
this.cardFuelDieselForm.mtUserId = userForm.id
|
||||
this.cardFuelDieselForm.name = userForm.name
|
||||
this.cardFuelDieselForm.mobile = userForm.mobile
|
||||
this.cardFuelDieselForm.authCode = this.authCode
|
||||
this.cardFuelDieselForm.actualPayment = actualPayment
|
||||
this.cardFuelDieselForm.makeChange = makeChange
|
||||
|
||||
// console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
|
||||
|
||||
@ -1746,8 +1770,29 @@ export default {
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -56,7 +56,7 @@
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="油机枪号" prop="name">
|
||||
<el-form-item label="油机编号" prop="name">
|
||||
<el-input v-model="gunForm.oilMachineGunNumber"></el-input>
|
||||
<div style="font-size: 12px;color: #999999">油机连接模式下 绑定油机系统中的枪号信息与当前枪号绑定</div>
|
||||
</el-form-item>
|
||||
|
@ -133,7 +133,7 @@
|
||||
|
||||
<el-dialog title="添加" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
|
||||
<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
|
||||
v-for="dict in dict.type.oil_type"
|
||||
@ -149,7 +149,7 @@
|
||||
|
||||
<el-row :gutter="24">
|
||||
<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-option
|
||||
v-for="option in oilNameList"
|
||||
@ -161,7 +161,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<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"
|
||||
placeholder="请选择计价单位">
|
||||
<el-option
|
||||
@ -177,28 +177,28 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<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">
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<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">
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="收款单位" prop="receivingUnits">
|
||||
<el-radio-group v-model="oilNumber.receivingUnits">
|
||||
<el-radio label="元" ></el-radio>
|
||||
<el-radio label="计价单位"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<div class="hui-seiz">点击油品输入的计算单位、可默认元或计价单位(L/m³/kg),页面也可自行切换</div>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<!-- <el-form-item label="收款单位" prop="receivingUnits">-->
|
||||
<!-- <el-radio-group v-model="oilNumber.receivingUnits">-->
|
||||
<!-- <el-radio label="元" ></el-radio>-->
|
||||
<!-- <el-radio label="计价单位"></el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <div class="hui-seiz">点击油品输入的计算单位、可默认元或计价单位(L/m³/kg),页面也可自行切换</div>-->
|
||||
<el-form-item label="状态" prop="state" label-width="130px">
|
||||
<el-radio-group v-model="oilNumber.state">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.zhzt"
|
||||
@ -208,10 +208,10 @@
|
||||
/>
|
||||
</el-radio-group>
|
||||
</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-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-form-item label="备注" label-width="130px">
|
||||
<el-input type="textarea" v-model="oilNumber.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -263,42 +263,54 @@
|
||||
<!-- -->
|
||||
<el-row :gutter="24">
|
||||
<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">
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<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">
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilNumber.unit?"/"+oilNumber.unit:''}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="收款单位" prop="receivingUnits">
|
||||
<el-radio-group v-model="oilNumber.receivingUnits">
|
||||
<el-radio label="元"></el-radio>
|
||||
<el-radio label="计价单位"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<div class="hui-seiz">点击油品输入的计算单位、可默认元或计价单位(L/m³/kg),页面也可自行切换</div>
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="oilNumber.state">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<!-- <el-radio label="启用"></el-radio>-->
|
||||
<!-- <el-radio label="禁用"></el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="收款单位" prop="receivingUnits">-->
|
||||
<!-- <el-radio-group v-model="oilNumber.receivingUnits">-->
|
||||
<!-- <el-radio label="元"></el-radio>-->
|
||||
<!-- <el-radio label="计价单位"></el-radio>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <div class="hui-seiz">点击油品输入的计算单位、可默认元或计价单位(L/m³/kg),页面也可自行切换</div>-->
|
||||
<el-row :gutter="24">
|
||||
|
||||
<el-col :span="12">
|
||||
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-radio-group v-model="oilNumber.state">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<!-- <el-radio label="启用"></el-radio>-->
|
||||
<!-- <el-radio label="禁用"></el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
|
||||
<el-col :span="12">
|
||||
<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-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注">
|
||||
<el-input type="textarea" v-model="oilNumber.remark" ></el-input>
|
||||
</el-form-item>
|
||||
@ -312,7 +324,7 @@
|
||||
|
||||
<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-item label="预设油号" prop="numberId">
|
||||
<el-form-item label="预设油号" prop="numberId" label-width="120px">
|
||||
<el-select v-model="oilPresetPrices.numberId" placeholder="请选择油号" @change="oilTypeClickByPrice()">
|
||||
<el-option
|
||||
v-for="option in selectOilTypeByPrice"
|
||||
@ -322,27 +334,27 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</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>
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
|
||||
</el-input>
|
||||
</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">
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
|
||||
</el-input>
|
||||
</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>
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
|
||||
</el-input>
|
||||
</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">
|
||||
<template slot="append">元</template>
|
||||
<template slot="append">元{{oilPresetPrices.unit?"/"+oilPresetPrices.unit:oilPresetPrices.unit}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="effectiveTime">
|
||||
<el-form-item label="活动时间" prop="effectiveTime" label-width="120px">
|
||||
<el-date-picker
|
||||
v-model="oilPresetPrices.effectiveTime"
|
||||
type="datetime"
|
||||
@ -353,7 +365,7 @@
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<div class="hui-seiz">如生效时间与当前时间间隔小于1分钟,当前油价将立即生效</div>
|
||||
<!-- <div class="hui-seiz">如生效时间与当前时间间隔小于1分钟,当前油价将立即生效</div>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormPricesAdd = false">取 消</el-button>
|
||||
@ -435,9 +447,9 @@ import {
|
||||
gbPrice: [
|
||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
||||
],
|
||||
receivingUnits: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
],
|
||||
// receivingUnits: [
|
||||
// { required: true, message: '请选择', trigger: 'change' }
|
||||
// ],
|
||||
state: [
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
]
|
||||
@ -609,16 +621,16 @@ import {
|
||||
await Promise.all([
|
||||
this.getOilTypeList("oil_type"),
|
||||
this.getOilTypeList("pricingUnitCN"),
|
||||
this.getOilTypeList("pricingUnitEN"),
|
||||
// this.getOilTypeList("pricingUnitEN"),
|
||||
]);
|
||||
|
||||
this.receivingUnitList = [];
|
||||
var cla1 = {
|
||||
label: "英文简称",
|
||||
value: -1,
|
||||
dis: true
|
||||
}
|
||||
this.receivingUnitList.push(cla1);
|
||||
// var cla1 = {
|
||||
// label: "英文简称",
|
||||
// value: -1,
|
||||
// dis: true
|
||||
// }
|
||||
// this.receivingUnitList.push(cla1);
|
||||
// 遍历 this.receivingUnitCN 对象的属性并添加到 receivingUnitList
|
||||
for (const argumentsKey in this.receivingUnitCN) {
|
||||
const value = this.receivingUnitCN[argumentsKey];
|
||||
@ -629,27 +641,28 @@ import {
|
||||
}
|
||||
this.receivingUnitList.push(cla);
|
||||
}
|
||||
var cla2 = {
|
||||
label: "中文简称",
|
||||
value: -2,
|
||||
dis: true
|
||||
}
|
||||
cla2 = {
|
||||
label: "中文简称",
|
||||
value: -3,
|
||||
dis: true
|
||||
}
|
||||
this.receivingUnitList.push(cla2);
|
||||
|
||||
for (const argumentsKey in this.receivingUnitEN) {
|
||||
const value = this.receivingUnitEN[argumentsKey];
|
||||
var cla = {
|
||||
label: value.dictLabel,
|
||||
value: value.dictValue,
|
||||
dis: false
|
||||
}
|
||||
this.receivingUnitList.push(cla);
|
||||
}
|
||||
// var cla2 = {
|
||||
// label: "中文简称",
|
||||
// value: -2,
|
||||
// dis: true
|
||||
// }
|
||||
// cla2 = {
|
||||
// label: "中文简称",
|
||||
// value: -3,
|
||||
// dis: true
|
||||
// }
|
||||
// this.receivingUnitList.push(cla2);
|
||||
//
|
||||
// for (const argumentsKey in this.receivingUnitEN) {
|
||||
// console.log("argumentsKey",argumentsKey)
|
||||
// const value = this.receivingUnitEN[argumentsKey];
|
||||
// var cla = {
|
||||
// label: value.dictLabel,
|
||||
// value: value.dictValue,
|
||||
// dis: false
|
||||
// }
|
||||
// this.receivingUnitList.push(cla);
|
||||
// }
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
@ -744,8 +757,10 @@ import {
|
||||
this_.oilTypeList = list;
|
||||
} else if (data == "pricingUnitCN") { //获取几家单位
|
||||
this_.receivingUnitCN = list;
|
||||
console.log("receivingUnitCN1",list)
|
||||
} else if (data == "pricingUnitEN") { //获取几家单位
|
||||
this_.receivingUnitEN = list;
|
||||
console.log("receivingUnitCN2",list)
|
||||
} else {
|
||||
this_.oilNameList = list;
|
||||
}
|
||||
@ -833,6 +848,7 @@ import {
|
||||
this.oilPresetPrices.currentGbPrice = oil.gbPrice;
|
||||
this.oilPresetPrices.numberId = oil.numberId;
|
||||
this.oilPresetPrices.oilType = oil.id;
|
||||
this.oilPresetPrices.unit = oil.unit;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -45,8 +45,8 @@
|
||||
<el-table-column label="油品密度" align="center" prop="oilDensity"/>
|
||||
</el-table-column>
|
||||
<el-table-column label="存油数量" align="center" prop="storedQuantity"/>
|
||||
<el-table-column label="存油总价 " align="center" prop="totalPrice"/>
|
||||
<el-table-column label="折后单价" align="center" prop="discountedPrice"/>
|
||||
<el-table-column label="存油总价(元)" align="center" prop="totalPrice"/>
|
||||
<el-table-column label="折后单价(元/升)" align="center" prop="discountedPrice"/>
|
||||
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" width="200">
|
||||
<template slot-scope="scope">
|
||||
@ -121,7 +121,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -130,14 +130,14 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -145,7 +145,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="折合单价" prop="discountedPrice">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
@ -217,7 +217,9 @@ export default {
|
||||
callback(new Error('请输入内容'));
|
||||
} else if (!reg.test(value)) {
|
||||
callback(new Error('请输入数字'));
|
||||
} else {
|
||||
} else if (value.length>8) {
|
||||
callback(new Error('数字长度不得超过8位'));
|
||||
}else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
@ -232,10 +234,10 @@ export default {
|
||||
oilNumber: '',
|
||||
tankVolume: null,
|
||||
lowerWarning: null,
|
||||
oilDensity: null,
|
||||
storedQuantity: null,
|
||||
totalPrice: null,
|
||||
discountedPrice: null,
|
||||
oilDensity: 0,
|
||||
storedQuantity: 0,
|
||||
totalPrice: 0,
|
||||
discountedPrice: 0,
|
||||
status: '',
|
||||
inventoryStatistics: '',
|
||||
remarks: '',
|
||||
@ -302,6 +304,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
open(newValue){
|
||||
if (!newValue) {
|
||||
let this_ = this
|
||||
this_.getList()
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
let this_ = this
|
||||
await this_.getList()
|
||||
@ -392,15 +402,38 @@ export default {
|
||||
tankAdd() {
|
||||
// 表单重置
|
||||
let this_ = this
|
||||
this_.tankForm = {}
|
||||
this_.tankForm.status= '启用',
|
||||
this_.tankForm.inventoryStatistics= '启用',
|
||||
this_.recharge()
|
||||
// this_.tankForm.status= '启用',
|
||||
// this_.tankForm.inventoryStatistics= '启用',
|
||||
this_.disableInput = false
|
||||
|
||||
this_.open = true;
|
||||
this_.title = "新增油罐";
|
||||
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() {
|
||||
let this_ = this;
|
||||
|
@ -24,6 +24,15 @@ export function jklist() {
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 查询校色列表
|
||||
export function getDutyList(data) {
|
||||
return request({
|
||||
url: '/backendApi/duty/getDutyList',
|
||||
method: 'get',
|
||||
params: data
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询用户详细
|
||||
|
@ -20,6 +20,7 @@
|
||||
@change="handleChange"
|
||||
node-key="id"
|
||||
@node-click="activecilck"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
:expand-on-click-node="false"
|
||||
:render-content="renderContent">
|
||||
@ -184,31 +185,137 @@
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-row v-if="ruleForm.deptType == 4">
|
||||
<el-col :span="8">
|
||||
<el-row v-if="ruleForm.deptType !== '3'">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="额度设置方式" prop="">
|
||||
<el-radio-group v-model="ruleForm.turnoverType">
|
||||
<el-radio label="1">金额上限</el-radio>
|
||||
<el-radio label="2">时间上限</el-radio>
|
||||
<el-radio label=1>无限制</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-form-item>
|
||||
</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
|
||||
v-model="ruleForm.turnoverTime"
|
||||
type="date"
|
||||
placeholder="选择日期">
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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-form-item>
|
||||
</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 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-switch v-model="value10" @change="getswitch" ></el-switch>
|
||||
@ -294,9 +401,9 @@
|
||||
<el-select v-model="form.roleIds" @change="$forceUpdate(),getCodeByRole($event)" placeholder="请选择角色">
|
||||
<el-option
|
||||
v-for="item in rolelist"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:key="item.dutyId"
|
||||
:label="item.dutyName"
|
||||
:value="item.dutyId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
@ -347,20 +454,20 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listUser,
|
||||
delUser,
|
||||
addUser,
|
||||
updateUser,
|
||||
resetUserPwd,
|
||||
changeUserStatus,
|
||||
deptTreeSelect,
|
||||
deptadd,
|
||||
deptedit,
|
||||
deptDelete,
|
||||
Userlist,
|
||||
jklist
|
||||
} from "@/api/system/Site/site";
|
||||
import {
|
||||
listUser,
|
||||
delUser,
|
||||
addUser,
|
||||
updateUser,
|
||||
resetUserPwd,
|
||||
changeUserStatus,
|
||||
deptTreeSelect,
|
||||
deptadd,
|
||||
deptedit,
|
||||
deptDelete,
|
||||
Userlist,
|
||||
jklist, getDutyList
|
||||
} from "@/api/system/Site/site";
|
||||
// import { getStoreStaffList } from "@/api/staff";
|
||||
import { getAccountList, getAccount, delAccount, addAccount, updateAccount, resetAccountPwd, changeAccountStatus } from "@/api/system/account";
|
||||
import {getToken} from "@/utils/auth";
|
||||
@ -573,20 +680,18 @@
|
||||
this.getList();
|
||||
|
||||
|
||||
|
||||
},
|
||||
components: { Treeselect },
|
||||
methods: {
|
||||
|
||||
// 页面初始化
|
||||
initPage() {
|
||||
|
||||
this.activeName= 'list',
|
||||
this.userList= 'list',
|
||||
this.cleanUp()
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 状态修改
|
||||
getswitch(e){
|
||||
console.log(e)
|
||||
if(e == true){
|
||||
@ -595,6 +700,7 @@
|
||||
this.ruleForm.status = 'jy'
|
||||
}
|
||||
},
|
||||
|
||||
activecilck(data){
|
||||
console.log('点树',data)
|
||||
|
||||
@ -603,14 +709,13 @@
|
||||
this.queryParams.deptId = data.id
|
||||
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(){
|
||||
this.ruleForm = {
|
||||
parentId:'',
|
||||
@ -625,9 +730,15 @@
|
||||
turnoverTime: '',
|
||||
}
|
||||
},
|
||||
|
||||
// 修改树
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
},
|
||||
|
||||
handleChangeInputNumber(value) {
|
||||
console.log(value);
|
||||
},
|
||||
handleChanges(value) {
|
||||
// console.log('层级',value,this.cascader);
|
||||
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() {
|
||||
// const storeId = this.form.storeId ? this.form.storeId : 0;
|
||||
// getStoreStaffList(storeId).then(response => {
|
||||
@ -964,17 +1089,31 @@
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
// 获取角色信息
|
||||
getRoleList(permissionType) {
|
||||
let par={
|
||||
permissionType:permissionType
|
||||
}
|
||||
getDutyList(par).then(res=>{
|
||||
this.rolelist = res.data
|
||||
})
|
||||
},
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.open = true
|
||||
this.title = "新增用户"
|
||||
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 () {
|
||||
this.form= {
|
||||
@ -996,14 +1135,15 @@
|
||||
app.form.roleIds = Number(app.form.roleIds);
|
||||
|
||||
app.form.password1 = row.password
|
||||
jklist().then(res=>{
|
||||
console.log(res)
|
||||
this.rolelist = res.data.content
|
||||
})
|
||||
|
||||
|
||||
//获取角色
|
||||
this.getRoleList();
|
||||
|
||||
},
|
||||
|
||||
// 角色过滤
|
||||
|
||||
|
||||
|
||||
/** 重置密码按钮操作 */
|
||||
handleResetPwd(row) {
|
||||
|
||||
@ -1112,7 +1252,13 @@
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.app-container{
|
||||
|
||||
|
||||
.el-tree-node.is-current > .el-tree-node__content {
|
||||
background-color: rgb(64, 158, 255) !important;
|
||||
}
|
||||
|
||||
.app-container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: #f6f8f9;
|
||||
|
@ -108,5 +108,8 @@ public class IntegralOrders extends BaseEntity {
|
||||
*/
|
||||
private String processingStatus;
|
||||
|
||||
private String actualPayment;
|
||||
private String makeChange;
|
||||
|
||||
}
|
||||
|
||||
|
@ -315,10 +315,10 @@
|
||||
</insert>
|
||||
|
||||
<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
|
||||
<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>
|
||||
</insert>
|
||||
|
||||
|
@ -139,7 +139,9 @@ public class CardFuelRecord extends BaseEntity {
|
||||
|
||||
private String status; //订单处理状态(防止二次执行,0是订单未完成,1是订单完成不可重复执行)
|
||||
|
||||
private String actualPayment;
|
||||
|
||||
private String makeChange;
|
||||
|
||||
|
||||
|
||||
|
@ -216,8 +216,8 @@
|
||||
|
||||
<!--新增所有列-->
|
||||
<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)
|
||||
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})
|
||||
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}, #{actualPayment}, #{makeChange})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
|
@ -79,5 +79,11 @@ public class CardValueRecord extends Model<CardValueRecord> {
|
||||
|
||||
private String status;
|
||||
|
||||
private String actualPayment;
|
||||
|
||||
private String makeChange;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -68,5 +68,11 @@ public class SysDept extends BaseEntity
|
||||
private List<SysDept> children = new ArrayList<SysDept>();
|
||||
private String turnoverType;
|
||||
private BigDecimal turnoverLimit;
|
||||
private Date turnoverTime;
|
||||
|
||||
private Date turnoverStartTime;
|
||||
private Date turnoverEndTime;
|
||||
private BigDecimal rates;
|
||||
private Integer storeNum;
|
||||
private BigDecimal prepaidAmount;
|
||||
|
||||
}
|
||||
|
@ -111,6 +111,14 @@ public class BackendDutyController extends BaseController {
|
||||
return getSuccessResult(result);
|
||||
}
|
||||
|
||||
|
||||
// 获取角色列表
|
||||
@GetMapping("getDutyList")
|
||||
public ResponseObject getDutyList(TDuty tDuty) {
|
||||
|
||||
return getSuccessResult(tDutyService.getDutyList(tDuty));
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增角色
|
||||
*
|
||||
|
@ -47,6 +47,7 @@ public class TDuty extends BaseEntity implements Serializable {
|
||||
|
||||
@ApiModelProperty("角色编码")
|
||||
private String code;
|
||||
private String permissionType;
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import com.fuint.system.role.entity.TDuty;
|
||||
import com.fuint.repository.model.TSource;
|
||||
import com.fuint.common.domain.TreeNode;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 角色服务接口
|
||||
@ -114,4 +115,6 @@ public interface DutyService extends IService<TDuty> {
|
||||
* @return
|
||||
*/
|
||||
List<Long> findDutiesByAccountId(Integer accountId);
|
||||
|
||||
List<TDuty> getDutyList(TDuty tDuty);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
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.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -29,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -362,6 +362,22 @@
|
||||
</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>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
<el-button @click="dialogVisiblej = false" class="but">取 消</el-button>
|
||||
@ -419,6 +435,8 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
dict: [],
|
||||
data(){
|
||||
return{
|
||||
seekZero :0,
|
||||
|
||||
baseUrl:process.env.VUE_APP_BASE_API,
|
||||
shoppingCart:[],
|
||||
giftList:'',
|
||||
@ -490,6 +508,11 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
changeSeekZero(){
|
||||
|
||||
this.seekZero = (this.authCode - this.allAmout).toFixed(2)
|
||||
|
||||
},
|
||||
// 获取所有积分商品
|
||||
async getGift() {
|
||||
if (this.queryParams.categoryId ==='first') {
|
||||
@ -858,6 +881,14 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
// 确定收款
|
||||
async collection() {
|
||||
let this_ = this
|
||||
|
||||
let actualPayment = 0
|
||||
let makeChange = 0
|
||||
if (this_.paymentType === "CASH") {
|
||||
actualPayment = this.authCode
|
||||
makeChange = this.seekZero
|
||||
}
|
||||
|
||||
// this_.authCode
|
||||
let integralOrdersList = []
|
||||
if (this_.shoppingCart.length >0) {
|
||||
@ -871,7 +902,9 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
exchangeQuantity : res.markPurchases,
|
||||
orderType : 1,
|
||||
staffId: this_.staff.id,
|
||||
paymentType : this_.paymentType
|
||||
paymentType : this_.paymentType,
|
||||
actualPayment : actualPayment,
|
||||
makeChange : makeChange
|
||||
}
|
||||
integralOrdersList.push(integralOrders)
|
||||
})
|
||||
@ -973,7 +1006,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
|
||||
page: 1,
|
||||
pageSize: 10000,
|
||||
},
|
||||
|
||||
this.seekZero = 0
|
||||
this.handClose()
|
||||
this.reset()
|
||||
|
||||
|
@ -385,13 +385,12 @@
|
||||
</el-tag> -->
|
||||
</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>
|
||||
<el-input v-model="authCode"
|
||||
v-focus ref="getFocus"
|
||||
autofocus
|
||||
@keydown.enter.native="collection"
|
||||
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
slot="suffix">
|
||||
@ -428,7 +427,6 @@
|
||||
<span style="color: red;font-size: 18px"> ¥{{ seekZero }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider></el-divider>
|
||||
<div style="display: flex;justify-content: space-around">
|
||||
<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 refuelMoneyRecord from "@/views/details/userInfoOrder/refuelMoneyRecord.vue";
|
||||
import cardValueChild from "@/views/details/userInfoOrder/cardValueChild.vue";
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
import {
|
||||
addCardValueChild,
|
||||
cardValueChildInfo,
|
||||
@ -1024,7 +1024,11 @@ export default {
|
||||
methods: {
|
||||
// 计算找零金额
|
||||
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){
|
||||
let name = ""
|
||||
@ -1489,22 +1493,26 @@ export default {
|
||||
},
|
||||
|
||||
async collection() {
|
||||
if (this.cardValueForm.paymentType=="CASH"){
|
||||
if (this.authCode<this.cardValueForm.amount || this.seekZero<0){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
if (!this.authCode){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
}
|
||||
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){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
if (!this.authCode){
|
||||
this.$modal.msgError("请输入正确的金额");
|
||||
return;
|
||||
}
|
||||
actualPayment = this.authCode
|
||||
makeChange = this.seekZero
|
||||
}
|
||||
// 会员id 会员名字会员手机号码
|
||||
this.cardValueForm.mtUserId = userForm.id
|
||||
@ -1513,6 +1521,8 @@ export default {
|
||||
// 支付码
|
||||
this.cardValueForm.authCode = this.authCode
|
||||
this.cardValueForm.realyPayBills = this.realyPayBills
|
||||
this.cardValueForm.actualPayment = actualPayment
|
||||
this.cardValueForm.makeChange = makeChange
|
||||
|
||||
|
||||
let id;
|
||||
@ -1566,12 +1576,26 @@ export default {
|
||||
if (!this.authCode && this.cardFuelDieselForm.paymentType !== "CASH") {
|
||||
this.$message.error('请先扫码');
|
||||
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)
|
||||
this.cardFuelDieselForm.mtUserId = userForm.id
|
||||
this.cardFuelDieselForm.name = userForm.name
|
||||
this.cardFuelDieselForm.mobile = userForm.mobile
|
||||
this.cardFuelDieselForm.authCode = this.authCode
|
||||
this.cardFuelDieselForm.actualPayment = actualPayment
|
||||
this.cardFuelDieselForm.makeChange = makeChange
|
||||
|
||||
// console.log("this.cardFuelDieselForm",this.cardFuelDieselForm)
|
||||
|
||||
|
||||
@ -1737,6 +1761,7 @@ export default {
|
||||
|
||||
this.cardValueForm = {}
|
||||
this.cardFuelDieselForm = {}
|
||||
|
||||
this.iniz()
|
||||
},
|
||||
cancelCollection() {
|
||||
@ -1755,7 +1780,26 @@ export default {
|
||||
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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user