bug
修改
This commit is contained in:
parent
e7ebac6b34
commit
90a3adc44f
@ -89,7 +89,7 @@
|
||||
<el-form ref="form" :model="dataForm" :rules="rules" label-width="120px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="分类名称" prop="supplierName">
|
||||
<el-form-item label="分类名称" prop="categoryName">
|
||||
<el-input v-model="dataForm.categoryName" placeholder="分类名称" maxlength="30"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -150,7 +150,7 @@ export default {
|
||||
|
||||
rules: {
|
||||
categoryName: [
|
||||
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "分类名称不能为空", trigger: "blur" },
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: "排序不能为空", trigger: "blur" },
|
||||
|
@ -265,14 +265,17 @@ export default {
|
||||
// 重置搜索条件
|
||||
resetQuery(){
|
||||
this.queryParams = {
|
||||
orderType:0,
|
||||
giftName: '',
|
||||
shippingType: '',
|
||||
mobile:'',
|
||||
shippingType: '',
|
||||
orderStatus:'',
|
||||
pageNo:1,
|
||||
pageSize:10
|
||||
pageNo:null,
|
||||
pageSize:null
|
||||
},
|
||||
this.dateRange = []
|
||||
this.getList()
|
||||
|
||||
},
|
||||
resetQuery2(){
|
||||
this.queryParams = {
|
||||
|
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
title="编辑油枪"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose"
|
||||
@ -116,6 +116,7 @@ import {cleanTankApi} from "@/api/oilConfig/oilTank";
|
||||
judgement:false,
|
||||
tankList: [],
|
||||
gunList: [],
|
||||
c:'',
|
||||
gunForm: {
|
||||
id: '',
|
||||
gunName: '',
|
||||
@ -175,15 +176,17 @@ import {cleanTankApi} from "@/api/oilConfig/oilTank";
|
||||
this_.judgement = false;
|
||||
this_.gunForm = {} // 清空数据
|
||||
this_.gunForm.status = '启用'
|
||||
this_.title = '添加油枪'
|
||||
this_.selectTankByNumber(numberId)
|
||||
},
|
||||
gunEdit(data) {
|
||||
let this_ = this;
|
||||
this_.dialogVisible = true;
|
||||
this_.judgement = true;
|
||||
console.log("datadatadata",data)
|
||||
this_.gunForm = data;
|
||||
this_.statusOut = data.status;
|
||||
this_.title = '修改油枪'
|
||||
|
||||
this_.selectTankByNumber(data.numberId)
|
||||
},
|
||||
delGun(id) {
|
||||
|
@ -65,7 +65,7 @@
|
||||
<el-card style="margin-top: 20px" >
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
<el-button v-if="state =='await'"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="orderAdd"
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<span>油价配置</span>
|
||||
</div>
|
||||
<el-button type="primary" @click="dialogFormVisible = true,oilTypeMethods(1)">新增油号</el-button>
|
||||
<el-button type="primary" @click="oilTypeMethods(1)">新增油号</el-button>
|
||||
<div class="top-box">
|
||||
<!-- 循环-->
|
||||
<div class="oil-box" v-for="(item,index) in oilNumberList " :key="index" >
|
||||
@ -122,7 +122,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-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber)">
|
||||
<el-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber),oilTypeClick2()">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.oil_type"
|
||||
:key="dict.value"
|
||||
@ -138,7 +138,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="油品名称" prop="oilName">
|
||||
<el-select v-model="oilNumber.oilName" style="width: 217px" placeholder="请选择油品名称">
|
||||
<el-select v-model="oilNumber.oilName" style="width: 217px" placeholder="请选择油品名称" @change="getSecondName()">
|
||||
<el-option
|
||||
v-for="option in oilNameList"
|
||||
:key="option.id"
|
||||
@ -212,7 +212,7 @@
|
||||
<el-dialog title="修改" :visible.sync="dialogFormNumberEdit" :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="oilNumber" :rules="rules">
|
||||
<el-form-item label="油品类型" prop="oilType">
|
||||
<el-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber.oilType)">
|
||||
<el-radio-group v-model="oilNumber.oilType" @change="oilTypeClick(oilNumber.oilType),oilTypeClick2()">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.oil_type"
|
||||
:key="dict.value"
|
||||
@ -406,10 +406,10 @@ import {
|
||||
{ required: true, message: '请选择油品类型', trigger: 'change' }
|
||||
],
|
||||
unit:[
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
{ required: true, message: '请选择单位', trigger: 'change' }
|
||||
],
|
||||
oilName: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
{ required: true, message: '请选择油品名称', trigger: 'change' }
|
||||
],
|
||||
oilPrice: [
|
||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
||||
@ -422,7 +422,7 @@ import {
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
],
|
||||
state: [
|
||||
{ required: true, message: '请选择', trigger: 'change' }
|
||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -445,14 +445,14 @@ import {
|
||||
|
||||
|
||||
oilNumber:{
|
||||
oilType: '',
|
||||
oilType: '汽油',
|
||||
oilName: '',
|
||||
oilPrice: '',
|
||||
gbPrice: '',
|
||||
receivingUnits: '',
|
||||
receivingUnits: '元',
|
||||
createTime: '',
|
||||
updateTime: '',
|
||||
state: '',
|
||||
state: '启用',
|
||||
sort: '',
|
||||
remark: '',
|
||||
ifDelete: '',
|
||||
@ -523,6 +523,7 @@ import {
|
||||
try {
|
||||
const response = await getOilNumberList();
|
||||
this.oilNumberList2 = response.data.records;
|
||||
console.log("this.oilNumberList2",this.oilNumberList2)
|
||||
await this.getAllOilList();
|
||||
resolve();
|
||||
} catch (error) {
|
||||
@ -547,17 +548,44 @@ import {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
} catch (error) {
|
||||
// Handle error here if needed
|
||||
}
|
||||
},
|
||||
res() {
|
||||
this.oilNumber={
|
||||
oilType: '汽油',
|
||||
oilName: '',
|
||||
oilPrice: '',
|
||||
gbPrice: '',
|
||||
receivingUnits: '元',
|
||||
createTime: '',
|
||||
updateTime: '',
|
||||
state: '启用',
|
||||
sort: '',
|
||||
remark: '',
|
||||
ifDelete: '',
|
||||
allOil:'',
|
||||
oilTypeT: '',
|
||||
oilNameT: '',
|
||||
unit:'', // 计价单位
|
||||
}
|
||||
},
|
||||
|
||||
// 编辑时使用
|
||||
async oilTypeMethods(data) {
|
||||
if (data == 1) {
|
||||
this.oilNumber = {}
|
||||
if (data === 1) {
|
||||
console.log("123123",data)
|
||||
|
||||
// this.oilNumber = {}
|
||||
this.dialogFormVisible = true
|
||||
this.res()
|
||||
this.getOilName('汽油')
|
||||
|
||||
// this.$refs.oilNumberF.rules = null;
|
||||
// this.$refs.oilNumberF.resetFields();
|
||||
// this.$refs.oilNumberF.resetFields();
|
||||
// this.$refs.form.resetFields();
|
||||
}
|
||||
|
||||
try {
|
||||
@ -607,22 +635,44 @@ import {
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 选择油品类型之后触发
|
||||
oilTypeClick(data) {
|
||||
console.log("selectedValue",data)
|
||||
// 清除油品名称
|
||||
// this.oilNumber.oilName = ''
|
||||
// this.oilNumber.oilNameT = ''
|
||||
|
||||
const selectedValue = this.oilNumber.oilType;
|
||||
// this.getOilTypeList(selectedValue)
|
||||
this.getOilName(selectedValue)
|
||||
},
|
||||
|
||||
oilTypeClick2() {
|
||||
console.log("hellooooooooooooooooooo")
|
||||
this.oilNumber.oilName = ''
|
||||
this.oilNumber.oilNameT = ''
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 打开修改窗口
|
||||
openOilNumberEdit(item) {
|
||||
console.log("item", item);
|
||||
this.oilNumber = {};
|
||||
|
||||
console.log("item",item)
|
||||
this.oilNumber = {}
|
||||
this.oilNumber = item
|
||||
this.oilTypeClick(item)
|
||||
let oil = item.allOil.split(' ');
|
||||
console.log("oil[1];",item)
|
||||
|
||||
item.oilNameT = oil[1];
|
||||
item.oilName = oil[1];
|
||||
|
||||
this.oilNumber = item;
|
||||
this.$set(this.oilNumber,'oilNameT',oil[1])
|
||||
|
||||
this.oilTypeClick(item);
|
||||
},
|
||||
|
||||
// 添加
|
||||
@ -777,6 +827,10 @@ import {
|
||||
},
|
||||
changeOilName() {
|
||||
this.oilNumber.oilName = this.oilNumber.oilNameT
|
||||
},
|
||||
|
||||
getSecondName(){
|
||||
this.$forceUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,8 +57,9 @@
|
||||
|
||||
<el-card style="margin-top: 20px" >
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
<el-col :span="1.5" >
|
||||
<el-button
|
||||
v-if="state =='await'"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="orderAdd"
|
||||
@ -141,7 +142,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="22">
|
||||
<el-form-item label="入库油罐" prop="tankId">
|
||||
<el-select v-model="orderForm.tankId" placeholder="请选择油罐" style="width:100%" @change="chooseTank($event)">
|
||||
<el-select v-model="orderForm.tankId" placeholder="请选择油罐" style="width:100%" @change="chooseTank($event),getSecondName()">
|
||||
<el-option
|
||||
v-for="option in tankList"
|
||||
:key="option.id"
|
||||
@ -277,7 +278,7 @@ export default {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 默认排序
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
defaultSort: {prop: 'createTime', order: 'ascending'},
|
||||
// 表单校验
|
||||
|
||||
purchaseForm: {
|
||||
@ -434,11 +435,11 @@ export default {
|
||||
// 去重
|
||||
let isDuplicate = false
|
||||
if (this.orderList.length > 0) {
|
||||
isDuplicate = this.orderList.some(order => order.numberId === this.orderForm.numberId);
|
||||
isDuplicate = this.orderList.some(order => order.tankId === this.orderForm.tankId);
|
||||
}
|
||||
if (isDuplicate) {
|
||||
this.$message({
|
||||
message: '有重复油号,请重新选择',
|
||||
message: '有重复油罐,请重新选择',
|
||||
type: 'warning'
|
||||
});
|
||||
this.orderForm = {}
|
||||
@ -522,6 +523,7 @@ export default {
|
||||
},
|
||||
// 选择油品号之后
|
||||
chooseOilNumber(data) {
|
||||
this.orderForm.tankId = '',
|
||||
this.selectTankByNumber(this.orderForm.numberId);
|
||||
},
|
||||
// 选择油罐添加密度
|
||||
@ -831,6 +833,9 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
getSecondName(){
|
||||
this.$forceUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -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">
|
||||
<el-input v-model="tankForm.oilDensity" placeholder="请输入油品密度" maxlength="30" @input="getSecondName()">
|
||||
<template slot="append">g/ml</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -130,21 +130,21 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="存油数量" prop="storedQuantity">
|
||||
<el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" maxlength="30" @input="changePrice() " :disabled="disableInput">
|
||||
<el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" maxlength="30" pattern="^\d+(\.\d+)?$" @change="changeNumber" @input="changePrice() " :disabled="disableInput">
|
||||
<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()" :disabled="disableInput">
|
||||
<el-input v-model="tankForm.totalPrice" placeholder="请输入存油总价" maxlength="30" @input="changePrice()" @change="changeNumber" :disabled="disableInput">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="折合单价" prop="discountedPrice">
|
||||
<el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30" :disabled="disableInput">
|
||||
<el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30" :disabled="true">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -381,7 +381,7 @@ export default {
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
// this.reset();
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
@ -406,7 +406,7 @@ export default {
|
||||
let this_ = this;
|
||||
this_.selectOilTypeByPrice.forEach(oilType=>{
|
||||
if (oilType.numberId == this_.tankForm.numberId) {
|
||||
this_.tankForm.oilDensity = oilType.oilDensity
|
||||
this.tankForm.oilDensity = oilType.oilDensity
|
||||
this_.tankForm.oilNumber = oilType.oilType +" "+oilType.oilName
|
||||
this_.tankForm.unit = oilType.unit
|
||||
}
|
||||
@ -414,13 +414,57 @@ export default {
|
||||
},
|
||||
|
||||
changePrice() {
|
||||
var this_=this
|
||||
var this_=this
|
||||
|
||||
|
||||
|
||||
|
||||
if (this_.tankForm.totalPrice != null && this_.tankForm.storedQuantity != null) {
|
||||
if (!this.checkNumeric(this_.tankForm.totalPrice)) {
|
||||
this_.tankForm.totalPrice = 0
|
||||
}
|
||||
if (!this.checkNumeric(this_.tankForm.storedQuantity)) {
|
||||
this_.tankForm.storedQuantity = 0
|
||||
}
|
||||
|
||||
var totalPrice = BigNumber(this_.tankForm.totalPrice);
|
||||
var storedQuantity = BigNumber(this_.tankForm.storedQuantity);
|
||||
this_.tankForm.discountedPrice = totalPrice.dividedBy(storedQuantity).toNumber();
|
||||
// this_.tankForm.discountedPrice = totalPrice.dividedBy(storedQuantity).toNumber();
|
||||
this_.tankForm.discountedPrice = parseFloat(totalPrice.dividedBy(storedQuantity).toFixed(2));
|
||||
|
||||
}
|
||||
},
|
||||
changeNumber() {
|
||||
var this_=this
|
||||
|
||||
|
||||
if (this_.tankForm.totalPrice != null) {
|
||||
if (!this.checkNumeric(this_.tankForm.totalPrice)) {
|
||||
this_.tankForm.totalPrice = 0
|
||||
}else {
|
||||
this_.tankForm.totalPrice = parseFloat(this_.tankForm.totalPrice).toFixed(2);
|
||||
|
||||
}
|
||||
}
|
||||
if (this_.tankForm.storedQuantity != null) {
|
||||
if (!this.checkNumeric(this_.tankForm.storedQuantity)) {
|
||||
this_.tankForm.storedQuantity = 0
|
||||
}else {
|
||||
this_.tankForm.storedQuantity = parseFloat(this_.tankForm.storedQuantity).toFixed(2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
checkNumeric(value) {
|
||||
// 使用JavaScript的方法判断是否为数字
|
||||
let isNumeric = !isNaN(parseFloat(value)) && isFinite(value);
|
||||
return isNumeric
|
||||
},
|
||||
// isNumeric(value) {
|
||||
// return typeof value === 'number' && isFinite(value);
|
||||
// },
|
||||
|
||||
getOilNameList() {
|
||||
var this_=this
|
||||
@ -429,7 +473,9 @@ export default {
|
||||
this_.selectOilTypeByPrice = list
|
||||
});
|
||||
},
|
||||
|
||||
getSecondName(){
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class IntegralOrdersController extends BaseController {
|
||||
* 分页查询
|
||||
*
|
||||
* @param integralOrders 筛选条件
|
||||
* @param 分页对象
|
||||
* @param page
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPage")
|
||||
|
@ -80,6 +80,8 @@
|
||||
and update_by = #{updateBy}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
|
@ -175,10 +175,10 @@
|
||||
op.store_id = #{oilPurchase.storeId}
|
||||
|
||||
<if test="oilPurchase.beginTime != null and oilPurchase.endTime != null">
|
||||
and created_at >= #{oilPurchase.beginTime} and created_at <= #{oilPurchase.endTime}
|
||||
and op.created_at >= #{oilPurchase.beginTime} and created_at <= #{oilPurchase.endTime}
|
||||
</if>
|
||||
<if test="oilPurchase.status != null and oilPurchase.status != ''">
|
||||
and status = #{oilPurchase.status}
|
||||
and op.status = #{oilPurchase.status}
|
||||
</if>
|
||||
<if test="oilPurchase.supplierId != null and oilPurchase.supplierId != ''">
|
||||
and opo.supplier_id = #{oilPurchase.supplierId}
|
||||
@ -188,6 +188,8 @@
|
||||
</if>
|
||||
</where>
|
||||
group by op.id
|
||||
order by op.create_time desc
|
||||
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
|
@ -228,7 +228,7 @@
|
||||
</update>
|
||||
|
||||
<update id="updateBatch">
|
||||
<foreach collection="list" item="user" separator=";">
|
||||
<foreach collection="list" item="user">
|
||||
update oil_purchase_order
|
||||
<set>
|
||||
<if test="user.purchaseId != null">
|
||||
@ -263,7 +263,7 @@
|
||||
</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
where id = #{user.id}
|
||||
where id = #{user.id};
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
@ -854,10 +854,11 @@ import {
|
||||
this_.loading = false;
|
||||
this_.isPay = false;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timer3);
|
||||
}
|
||||
},500)
|
||||
|
||||
setTimeout(function (){
|
||||
let timer3 = setTimeout(function (){
|
||||
clearInterval(timer2);
|
||||
clearInterval(timer);
|
||||
this_.loading = false;
|
||||
@ -883,9 +884,14 @@ import {
|
||||
// this.oilTotal = 0;
|
||||
// this.goodsTotal = 0;
|
||||
// }
|
||||
this.isPay = true;
|
||||
this.isPay=true,
|
||||
this.isPaySuccess=false,
|
||||
this.isQuery=true,
|
||||
this.openConfirm = false
|
||||
this.openRecharge = false
|
||||
|
||||
|
||||
this.dialogVisiblej = false
|
||||
this.isPaySuccess = false;
|
||||
this.authCode = '';
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user