10.25
This commit is contained in:
parent
bd5bba3198
commit
3937a4d0f2
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索框-->
|
<!-- 搜索框-->
|
||||||
<div class="card-change" >
|
<div class="card-change">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="" prop="tankName">
|
<el-form-item label="" prop="tankName">
|
||||||
<el-input
|
<el-input
|
||||||
@ -13,7 +13,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" prop="oilNumber">
|
<el-form-item label="" prop="oilNumber">
|
||||||
<el-select v-model="queryParams.oilNumber" placeholder="请选择油品油号" style="width:300px" @change="chooseOilNumber()" :disabled="disableInput">
|
<el-select v-model="queryParams.oilNumber" placeholder="请选择油品油号" style="width:300px"
|
||||||
|
@change="chooseOilNumber()" :disabled="disableInput">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in selectOilTypeByPrice"
|
v-for="option in selectOilTypeByPrice"
|
||||||
:key="option.numberId"
|
:key="option.numberId"
|
||||||
@ -39,78 +40,76 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item style="float: right;margin-right: 0px ">
|
<el-form-item style="float: right;margin-right: 0px ">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="tankAdd"
|
@click="tankAdd"
|
||||||
v-hasPermi="['oilConfig:oilTank:list:add']"
|
v-hasPermi="['oilConfig:oilTank:list:add']"
|
||||||
>新增油罐</el-button>
|
>新增油罐
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- 列表-->
|
<!-- 列表-->
|
||||||
|
<div style="height: 70vh;overflow: auto">
|
||||||
<el-table ref="tables"
|
<el-table ref="tables"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tankList"
|
:data="tankList"
|
||||||
border
|
border
|
||||||
:default-sort="defaultSort">
|
:default-sort="defaultSort">
|
||||||
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
||||||
<el-table-column label="油罐名称" align="center" prop="tankName"/>
|
<el-table-column label="油罐名称" align="center" prop="tankName"/>
|
||||||
<el-table-column label="油品-油号" align="center" prop="oilNumber" />
|
<el-table-column label="油品-油号" align="center" prop="oilNumber"/>
|
||||||
<!-- <el-table-column label="当前数据" align="center">-->
|
|
||||||
<el-table-column label="油罐容量" align="center" prop="tankVolume"/>
|
<el-table-column label="油罐容量" align="center" prop="tankVolume"/>
|
||||||
<el-table-column label="下限预警" align="center" prop="lowerWarning"/>
|
<el-table-column label="下限预警" align="center" prop="lowerWarning"/>
|
||||||
<el-table-column label="油品密度" align="center" prop="oilDensity"/>
|
<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="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="discountedPrice">
|
||||||
<el-table-column label="油罐状态" align="center" prop="discountedPrice">
|
<template slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
<el-switch
|
||||||
<el-switch
|
disabled
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
active-value="启用"
|
active-value="启用"
|
||||||
inactive-value="禁用"
|
inactive-value="禁用"
|
||||||
@change="changeStatus(scope.row)"
|
@change="changeStatus(scope.row)"
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
inactive-color="#ff4949">
|
inactive-color="#ff4949">
|
||||||
</el-switch>
|
</el-switch>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" align="center" prop="createName"/>
|
<el-table-column label="操作人" align="center" prop="realName"/>
|
||||||
|
|
||||||
<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">
|
||||||
<span>{{ parseTime(scope.row.updateTime) }}</span>
|
<span>{{ parseTime(scope.row.updateTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
@click="handleUpdate(scope.row)"
|
||||||
@click="handleUpdate(scope.row)"
|
v-hasPermi="['oilConfig:oilTank:list:update']"
|
||||||
v-hasPermi="['oilConfig:oilTank:list:update']"
|
>修改
|
||||||
>修改</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-copy-document"
|
@click="handleClean(scope.row)"
|
||||||
@click="handleClean(scope.row)"
|
v-hasPermi="['oilConfig:oilTank:list:del']"
|
||||||
v-hasPermi="['oilConfig:oilTank:list:del']"
|
>初始化
|
||||||
>初始化</el-button>
|
</el-button>
|
||||||
<!-- v-hasPermi="['']"-->
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
@ -120,14 +119,15 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 新增/修改-->
|
<!-- 新增/修改-->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body :close-on-click-modal="false">
|
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="tankForm" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="tankForm" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="油罐名称" prop="tankName">
|
<el-form-item label="油罐名称" prop="tankName">
|
||||||
<el-input v-model="tankForm.tankName" placeholder="请输入油罐名称" style="width:300px" />
|
<el-input v-model="tankForm.tankName" placeholder="请输入油罐名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="油品油号" prop="oilNumber">
|
<el-form-item label="油品油号" prop="oilNumber">
|
||||||
<el-select v-model="tankForm.numberId" placeholder="请选择油品油号" style="width:300px" @change="chooseOilNumber()" :disabled="disableInput">
|
<el-select v-model="tankForm.numberId" placeholder="请选择油品油号" style="width:100%"
|
||||||
|
@change="chooseOilNumber()" :disabled="disableInput">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in selectOilTypeByPrice"
|
v-for="option in selectOilTypeByPrice"
|
||||||
:key="option.numberId"
|
:key="option.numberId"
|
||||||
@ -137,24 +137,28 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="油罐体积" prop="tankVolume">
|
<el-form-item label="油罐体积" prop="tankVolume">
|
||||||
<el-input v-model="tankForm.tankVolume" placeholder="请输入油罐体积" maxlength="30" @change="changeNumber" style="width:300px" :disabled="disableInput">
|
<el-input v-model="tankForm.tankVolume" placeholder="请输入油罐体积" maxlength="30" @change="changeNumber"
|
||||||
<template slot="append">{{tankForm.unit}}</template>
|
:disabled="disableInput">
|
||||||
|
<template slot="append">{{ tankForm.unit }}</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="下限预警" prop="lowerWarning">
|
<el-form-item label="下限预警" prop="lowerWarning">
|
||||||
<el-input v-model="tankForm.lowerWarning" placeholder="小于预警值将进行提示" style="width:300px" maxlength="30">
|
<el-input v-model="tankForm.lowerWarning" placeholder="小于预警值将进行提示"
|
||||||
<template slot="append">{{tankForm.unit}}</template>
|
maxlength="30">
|
||||||
|
<template slot="append">{{ tankForm.unit }}</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<template v-if="title == '修改油罐'">
|
<template v-if="title == '修改油罐'">
|
||||||
<el-form-item label="油品密度" prop="oilDensity">
|
<el-form-item label="油品密度" prop="oilDensity">
|
||||||
<el-input v-model="tankForm.oilDensity" placeholder="请输入油品密度" style="width:300px" :disabled="true" 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>
|
||||||
<el-form-item label="存油数量" prop="storedQuantity">
|
<el-form-item label="存油数量" prop="storedQuantity">
|
||||||
<el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" style="width:300px" maxlength="30" :disabled="true" pattern="^\d+(\.\d+)?$" @change="changeNumber" @input="changePrice() " >
|
<el-input v-model="tankForm.storedQuantity" placeholder="请输入存油数量" maxlength="30"
|
||||||
<template slot="append">{{tankForm.unit}}</template>
|
:disabled="true" pattern="^\d+(\.\d+)?$" @change="changeNumber" @input="changePrice() ">
|
||||||
|
<template slot="append">{{ tankForm.unit }}</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="存油总价" prop="totalPrice" >-->
|
<!-- <el-form-item label="存油总价" prop="totalPrice" >-->
|
||||||
@ -163,8 +167,9 @@
|
|||||||
<!-- </el-input>-->
|
<!-- </el-input>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="折合单价" prop="discountedPrice">
|
<el-form-item label="折合单价" prop="discountedPrice">
|
||||||
<el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30" style="width:300px" :disabled="true">
|
<el-input v-model="tankForm.discountedPrice" placeholder="请输入折合单价" maxlength="30"
|
||||||
<template slot="append">元{{tankForm.unit?"/"+tankForm.unit:''}}</template>
|
:disabled="true">
|
||||||
|
<template slot="append">元{{ tankForm.unit ? "/" + tankForm.unit : '' }}</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@ -180,19 +185,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="库存统计" prop="inventoryStatistics">-->
|
<!-- <el-form-item label="库存统计" prop="inventoryStatistics">-->
|
||||||
<!-- <el-radio-group v-model="tankForm.inventoryStatistics">-->
|
<!-- <el-radio-group v-model="tankForm.inventoryStatistics">-->
|
||||||
<!-- <el-radio-->
|
<!-- <el-radio-->
|
||||||
<!-- v-for="dict in dict.type.zhzt"-->
|
<!-- v-for="dict in dict.type.zhzt"-->
|
||||||
<!-- :key="dict.value"-->
|
<!-- :key="dict.value"-->
|
||||||
<!-- :label="dict.label"-->
|
<!-- :label="dict.label"-->
|
||||||
<!-- :value="dict.value"-->
|
<!-- :value="dict.value"-->
|
||||||
<!-- @change="handleIsopenSelect"-->
|
<!-- @change="handleIsopenSelect"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-radio-group>-->
|
<!-- </el-radio-group>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="备注信息">
|
<el-form-item label="备注信息">
|
||||||
<el-input type="textarea" style="width:300px" v-model="tankForm.remarks"></el-input>
|
<el-input type="textarea" v-model="tankForm.remarks"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -207,16 +212,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {cleanTankApi, exportExcelTankApi, getTankApi, insertTankApi, updateTankApi} from "@/api/oilConfig/oilTank";
|
import {cleanTankApi, exportExcelTankApi, getTankApi, insertTankApi, updateTankApi} from "@/api/oilConfig/oilTank";
|
||||||
import {getName,parseTime} from "../../../utils/fuint";
|
import {getName, parseTime} from "../../../utils/fuint";
|
||||||
import {addStaff, updateStaff} from "@/api/staff/staff";
|
import {addStaff, updateStaff} from "@/api/staff/staff";
|
||||||
import {getOilNameListApi} from "@/api/oilPrice";
|
import {getOilNameListApi} from "@/api/oilPrice";
|
||||||
import { BigNumber } from 'bignumber.js';
|
import {BigNumber} from 'bignumber.js';
|
||||||
import {changeAccountStatus} from "@/api/system/account";
|
import {changeAccountStatus} from "@/api/system/account";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:'oilTank',
|
name: 'oilTank',
|
||||||
dicts: ['zhzt'],
|
dicts: ['zhzt'],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -226,18 +230,18 @@ 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 if (value.length>8) {
|
} else if (value.length > 8) {
|
||||||
callback(new Error('数字长度不得超过8位'));
|
callback(new Error('数字长度不得超过8位'));
|
||||||
}else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 表单名称
|
// 表单名称
|
||||||
title:'',
|
title: '',
|
||||||
tankList: [], // 油罐列表
|
tankList: [], // 油罐列表
|
||||||
statusList: ['启用','禁用'],
|
statusList: ['启用', '禁用'],
|
||||||
tankForm: {
|
tankForm: {
|
||||||
id: null,
|
id: null,
|
||||||
tankName: '',
|
tankName: '',
|
||||||
@ -255,7 +259,7 @@ export default {
|
|||||||
numberId: null,
|
numberId: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
unit:''
|
unit: ''
|
||||||
},
|
},
|
||||||
disableInput: false, // 默认不禁用
|
disableInput: false, // 默认不禁用
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -265,8 +269,8 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
tankName: '',
|
tankName: '',
|
||||||
page:null,
|
page: null,
|
||||||
pageSize:null
|
pageSize: null
|
||||||
},
|
},
|
||||||
beginTime: "",
|
beginTime: "",
|
||||||
endTime: "",
|
endTime: "",
|
||||||
@ -282,40 +286,40 @@ export default {
|
|||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
tankName: [
|
tankName: [
|
||||||
{ required: true, message: "油罐名称不能为空", trigger: "blur" },
|
{required: true, message: "油罐名称不能为空", trigger: "blur"},
|
||||||
],
|
],
|
||||||
oilNumber: [
|
oilNumber: [
|
||||||
{ required: true, message: '请选择油品类型', trigger: 'change' }
|
{required: true, message: '请选择油品类型', trigger: 'change'}
|
||||||
],
|
],
|
||||||
tankVolume: [
|
tankVolume: [
|
||||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
{required: true, validator: valiNumberPass, trigger: "blur"}
|
||||||
],
|
],
|
||||||
lowerWarning: [
|
lowerWarning: [
|
||||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
{required: true, validator: valiNumberPass, trigger: "blur"}
|
||||||
],
|
],
|
||||||
oilDensity: [
|
oilDensity: [
|
||||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
{required: true, validator: valiNumberPass, trigger: "blur"}
|
||||||
],
|
],
|
||||||
storedQuantity: [
|
storedQuantity: [
|
||||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
{required: true, validator: valiNumberPass, trigger: "blur"}
|
||||||
],
|
],
|
||||||
totalPrice: [
|
totalPrice: [
|
||||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
{required: true, validator: valiNumberPass, trigger: "blur"}
|
||||||
],
|
],
|
||||||
discountedPrice: [
|
discountedPrice: [
|
||||||
{ required: true, validator:valiNumberPass, trigger: "blur" }
|
{required: true, validator: valiNumberPass, trigger: "blur"}
|
||||||
],
|
],
|
||||||
status: [
|
status: [
|
||||||
{ required: true, message: "请选择对应状态", trigger: "blur" }
|
{required: true, message: "请选择对应状态", trigger: "blur"}
|
||||||
],
|
],
|
||||||
inventoryStatistics: [
|
inventoryStatistics: [
|
||||||
{ required: true, message: "请选择对应状态", trigger: "blur" }
|
{required: true, message: "请选择对应状态", trigger: "blur"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
open(newValue){
|
open(newValue) {
|
||||||
if (!newValue) {
|
if (!newValue) {
|
||||||
let this_ = this
|
let this_ = this
|
||||||
this_.getList()
|
this_.getList()
|
||||||
@ -347,7 +351,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
submitForm: function() {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -407,8 +411,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
@ -423,8 +425,8 @@ export default {
|
|||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
tankName: '',
|
tankName: '',
|
||||||
page:null,
|
page: null,
|
||||||
pageSize:null
|
pageSize: null
|
||||||
};
|
};
|
||||||
this.beginTime = ''
|
this.beginTime = ''
|
||||||
this.endTime = ''
|
this.endTime = ''
|
||||||
@ -443,8 +445,8 @@ export default {
|
|||||||
this_.title = "新增油罐";
|
this_.title = "新增油罐";
|
||||||
this.getOilNameList() // 查询全部油品
|
this.getOilNameList() // 查询全部油品
|
||||||
},
|
},
|
||||||
recharge () {
|
recharge() {
|
||||||
this.tankForm= {
|
this.tankForm = {
|
||||||
id: null,
|
id: null,
|
||||||
tankName: '',
|
tankName: '',
|
||||||
oilNumber: '',
|
oilNumber: '',
|
||||||
@ -461,35 +463,32 @@ export default {
|
|||||||
numberId: null,
|
numberId: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
unit:''
|
unit: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 选择油品号之后
|
// 选择油品号之后
|
||||||
chooseOilNumber() {
|
chooseOilNumber() {
|
||||||
let this_ = this;
|
let this_ = this;
|
||||||
this_.selectOilTypeByPrice.forEach(oilType=>{
|
this_.selectOilTypeByPrice.forEach(oilType => {
|
||||||
if (oilType.numberId == this_.tankForm.numberId) {
|
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.oilNumber = oilType.oilType + " " + oilType.oilName
|
||||||
this_.tankForm.unit = oilType.unit
|
this_.tankForm.unit = oilType.unit
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
changePrice() {
|
changePrice() {
|
||||||
var this_=this
|
var this_ = this
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (this_.tankForm.totalPrice != null && this_.tankForm.storedQuantity != null) {
|
if (this_.tankForm.totalPrice != null && this_.tankForm.storedQuantity != null) {
|
||||||
if (!this.checkNumeric(this_.tankForm.totalPrice)) {
|
if (!this.checkNumeric(this_.tankForm.totalPrice)) {
|
||||||
this_.tankForm.totalPrice = 0
|
this_.tankForm.totalPrice = 0
|
||||||
}
|
}
|
||||||
if (!this.checkNumeric(this_.tankForm.storedQuantity)) {
|
if (!this.checkNumeric(this_.tankForm.storedQuantity)) {
|
||||||
this_.tankForm.storedQuantity = 0
|
this_.tankForm.storedQuantity = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
var totalPrice = BigNumber(this_.tankForm.totalPrice);
|
var totalPrice = BigNumber(this_.tankForm.totalPrice);
|
||||||
var storedQuantity = BigNumber(this_.tankForm.storedQuantity);
|
var storedQuantity = BigNumber(this_.tankForm.storedQuantity);
|
||||||
@ -499,7 +498,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeNumber() {
|
changeNumber() {
|
||||||
var this_=this
|
var this_ = this
|
||||||
|
|
||||||
|
|
||||||
// console.log("this_.tankForm.tankVolume",this_.tankForm.tankVolume)
|
// console.log("this_.tankForm.tankVolume",this_.tankForm.tankVolume)
|
||||||
@ -513,8 +512,8 @@ export default {
|
|||||||
|
|
||||||
if (this_.tankForm.totalPrice != null) {
|
if (this_.tankForm.totalPrice != null) {
|
||||||
if (!this.checkNumeric(this_.tankForm.totalPrice)) {
|
if (!this.checkNumeric(this_.tankForm.totalPrice)) {
|
||||||
this_.tankForm.totalPrice = 0
|
this_.tankForm.totalPrice = 0
|
||||||
}else {
|
} else {
|
||||||
this_.tankForm.totalPrice = parseFloat(this_.tankForm.totalPrice).toFixed(2);
|
this_.tankForm.totalPrice = parseFloat(this_.tankForm.totalPrice).toFixed(2);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -522,7 +521,7 @@ export default {
|
|||||||
if (this_.tankForm.storedQuantity != null) {
|
if (this_.tankForm.storedQuantity != null) {
|
||||||
if (!this.checkNumeric(this_.tankForm.storedQuantity)) {
|
if (!this.checkNumeric(this_.tankForm.storedQuantity)) {
|
||||||
this_.tankForm.storedQuantity = 0
|
this_.tankForm.storedQuantity = 0
|
||||||
}else {
|
} else {
|
||||||
this_.tankForm.storedQuantity = parseFloat(this_.tankForm.storedQuantity).toFixed(2);
|
this_.tankForm.storedQuantity = parseFloat(this_.tankForm.storedQuantity).toFixed(2);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -540,13 +539,13 @@ export default {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
getOilNameList() {
|
getOilNameList() {
|
||||||
var this_=this
|
var this_ = this
|
||||||
getOilNameListApi().then( response => {
|
getOilNameListApi().then(response => {
|
||||||
var list = response.data
|
var list = response.data
|
||||||
this_.selectOilTypeByPrice = list
|
this_.selectOilTypeByPrice = list
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getSecondName(){
|
getSecondName() {
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -555,11 +554,12 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.app-container{
|
.app-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: #f6f8f9;
|
background: #f6f8f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form--inline .el-form-item {
|
.el-form--inline .el-form-item {
|
||||||
margin-right: 44px;
|
margin-right: 44px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,6 +60,9 @@ public class OilGun extends BaseEntity {
|
|||||||
private String staffList;
|
private String staffList;
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
private String deviceName;
|
private String deviceName;
|
||||||
|
// 创建人
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String realName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.fuint.business.petrolStationManagement.entity;
|
package com.fuint.business.petrolStationManagement.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fuint.repository.model.base.BaseEntity;
|
import com.fuint.repository.model.base.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -78,6 +79,11 @@ public class OilTank extends BaseEntity {
|
|||||||
* 关联油号表ID
|
* 关联油号表ID
|
||||||
*/
|
*/
|
||||||
private Integer numberId;
|
private Integer numberId;
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
<result property="numberId" column="number_id" jdbcType="INTEGER"/>
|
<result property="numberId" column="number_id" jdbcType="INTEGER"/>
|
||||||
<result property="tankName" column="tank_name" jdbcType="VARCHAR"/>
|
<result property="tankName" column="tank_name" jdbcType="VARCHAR"/>
|
||||||
<result property="oilNumber" column="oil_number" jdbcType="VARCHAR"/>
|
<result property="oilNumber" column="oil_number" jdbcType="VARCHAR"/>
|
||||||
|
<result property="realName" column="real_name" jdbcType="VARCHAR"/>
|
||||||
<result property="oilMachineGunNumber" column="oil_machine_gun_number" jdbcType="VARCHAR"/>
|
<result property="oilMachineGunNumber" column="oil_machine_gun_number" jdbcType="VARCHAR"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -53,16 +54,26 @@
|
|||||||
<select id="queryAllByLimit2" resultMap="OilGunMap">
|
<select id="queryAllByLimit2" resultMap="OilGunMap">
|
||||||
select
|
select
|
||||||
og.id, og.gun_name, og.tank_id, og.status, og.store_id, og.create_time,og.update_time, og.create_by,
|
og.id, og.gun_name, og.tank_id, og.status, og.store_id, og.create_time,og.update_time, og.create_by,
|
||||||
og.update_by, ot.oil_number, ot.number_id,
|
og.update_by,og.oil_machine_gun_number, ot.oil_number, ot.number_id,
|
||||||
ot.tank_name,og.staff_status,og.staff_list,og.device_id,og.device_name
|
ot.tank_name,og.staff_status,og.staff_list,og.device_id,og.device_name,ms.real_name
|
||||||
from oil_gun og
|
from oil_gun og
|
||||||
left join oil_tank ot on og.tank_id = ot.id
|
left join oil_tank ot on og.tank_id = ot.id
|
||||||
|
LEFT JOIN mt_staff ms ON og.create_by = ms.id
|
||||||
<where>
|
<where>
|
||||||
og.store_id = #{oilGun.storeId} and og.status = '启用'
|
og.store_id = #{oilGun.storeId} and og.status = '启用'
|
||||||
|
|
||||||
<if test="oilGun.numberId != null">
|
<if test="oilGun.numberId != null">
|
||||||
and ot.number_id = #{oilGun.numberId}
|
and ot.number_id = #{oilGun.numberId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="oilGun.gunName != null">
|
||||||
|
and og.gun_name LIKE CONCAT('%', #{oilGun.gunName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="oilGun.params.beginTime != null and oilGun.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(og.create_time,'%y%m%d') >= date_format(#{oilGun.params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="oilGun.params.endTime != null and oilGun.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(og.create_time,'%y%m%d') <= date_format(#{oilGun.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -198,9 +209,9 @@
|
|||||||
values (#{gunName}, #{tankId}, #{status}, #{storeId},
|
values (#{gunName}, #{tankId}, #{status}, #{storeId},
|
||||||
#{createTime}, #{createTime}, #{createBy},
|
#{createTime}, #{createTime}, #{createBy},
|
||||||
#{updateBy}, #{numberId}, #{oilMachineGunNumber},
|
#{updateBy}, #{numberId}, #{oilMachineGunNumber},
|
||||||
#{staffStatus}
|
#{staffStatus},
|
||||||
#{staffList}
|
#{staffList},
|
||||||
#{deviceId}
|
#{deviceId},
|
||||||
#{deviceName})
|
#{deviceName})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
@ -34,72 +34,70 @@
|
|||||||
|
|
||||||
<!--查询指定行数据-->
|
<!--查询指定行数据-->
|
||||||
<select id="queryAllByLimit" resultMap="OilTankMap">
|
<select id="queryAllByLimit" resultMap="OilTankMap">
|
||||||
select
|
SELECT ot.*,ms.real_name FROM oil_tank ot LEFT JOIN mt_staff ms ON ot.create_by = ms.id
|
||||||
id, tank_name, oil_number, tank_volume, lower_warning, oil_density, stored_quantity, total_price, discounted_price, status, remarks, store_id, number_id, create_time, update_time, create_by, update_by, inventory_statistics, unit
|
|
||||||
from oil_tank
|
|
||||||
<where>
|
<where>
|
||||||
<if test="oilTank.id != null">
|
<if test="oilTank.id != null">
|
||||||
and id = #{oilTank.id}
|
and ot.id = #{oilTank.id}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.tankName != null and oilTank.tankName != ''">
|
<if test="oilTank.tankName != null and oilTank.tankName != ''">
|
||||||
and tank_name LIKE CONCAT('%', #{oilTank.tankName}, '%')
|
and ot.tank_name LIKE CONCAT('%', #{oilTank.tankName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.oilNumber != null and oilTank.oilNumber != ''">
|
<if test="oilTank.oilNumber != null and oilTank.oilNumber != ''">
|
||||||
and oil_number = #{oilTank.oilNumber}
|
and ot.oil_number = #{oilTank.oilNumber}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.tankVolume != null">
|
<if test="oilTank.tankVolume != null">
|
||||||
and tank_volume = #{oilTank.tankVolume}
|
and ot.tank_volume = #{oilTank.tankVolume}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.lowerWarning != null">
|
<if test="oilTank.lowerWarning != null">
|
||||||
and lower_warning = #{oilTank.lowerWarning}
|
and ot.lower_warning = #{oilTank.lowerWarning}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.oilDensity != null">
|
<if test="oilTank.oilDensity != null">
|
||||||
and oil_density = #{oilTank.oilDensity}
|
and ot.oil_density = #{oilTank.oilDensity}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.storedQuantity != null">
|
<if test="oilTank.storedQuantity != null">
|
||||||
and stored_quantity = #{oilTank.storedQuantity}
|
and ot.stored_quantity = #{oilTank.storedQuantity}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.totalPrice != null">
|
<if test="oilTank.totalPrice != null">
|
||||||
and total_price = #{oilTank.otalPrice}
|
and ot.total_price = #{oilTank.otalPrice}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.discountedPrice != null">
|
<if test="oilTank.discountedPrice != null">
|
||||||
and discounted_price = #{oilTank.discountedPrice}
|
and ot.discounted_price = #{oilTank.discountedPrice}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.status != null and oilTank.status != ''">
|
<if test="oilTank.status != null and oilTank.status != ''">
|
||||||
and status = #{oilTank.status}
|
and ot.status = #{oilTank.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.remarks != null and oilTank.remarks != ''">
|
<if test="oilTank.remarks != null and oilTank.remarks != ''">
|
||||||
and remarks = #{oilTank.remarks}
|
and ot.remarks = #{oilTank.remarks}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.storeId != null">
|
<if test="oilTank.storeId != null">
|
||||||
and store_id = #{oilTank.storeId}
|
and ot.store_id = #{oilTank.storeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.numberId != null">
|
<if test="oilTank.numberId != null">
|
||||||
and number_id = #{oilTank.numberId}
|
and ot.number_id = #{oilTank.numberId}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.createTime != null">
|
<if test="oilTank.createTime != null">
|
||||||
and create_time = #{oilTank.createTime}
|
and ot.create_time = #{oilTank.createTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.updateTime != null">
|
<if test="oilTank.updateTime != null">
|
||||||
and update_time = #{oilTank.updateTime}
|
and ot.update_time = #{oilTank.updateTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.createBy != null">
|
<if test="oilTank.createBy != null">
|
||||||
and create_by = #{oilTank.createBy}
|
and ot.create_by = #{oilTank.createBy}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.updateBy != null">
|
<if test="oilTank.updateBy != null">
|
||||||
and update_by = #{oilTank.updateBy}
|
and ot.update_by = #{oilTank.updateBy}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.inventoryStatistics != null and oilTank.inventoryStatistics != ''">
|
<if test="oilTank.inventoryStatistics != null and oilTank.inventoryStatistics != ''">
|
||||||
and inventory_statistics = #{oilTank.inventoryStatistics}
|
and ot.inventory_statistics = #{oilTank.inventoryStatistics}
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.params.beginTime != null and oilTank.params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="oilTank.params.beginTime != null and oilTank.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and date_format(update_time,'%y%m%d') >= date_format(#{oilTank.params.beginTime},'%y%m%d')
|
and date_format(ot.update_time,'%y%m%d') >= date_format(#{oilTank.params.beginTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
<if test="oilTank.params.endTime != null and oilTank.params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="oilTank.params.endTime != null and oilTank.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and date_format(update_time,'%y%m%d') <= date_format(#{oilTank.params.endTime},'%y%m%d')
|
and date_format(ot.update_time,'%y%m%d') <= date_format(#{oilTank.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY update_time DESC
|
ORDER BY ot.update_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectList" resultMap="OilTankMap">
|
<select id="selectList" resultMap="OilTankMap">
|
||||||
|
|||||||
@ -141,7 +141,7 @@ public class OilGunServiceImpl implements OilGunService {
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
oilGun.setCreateBy(accountInfo.getId().toString());
|
// oilGun.setCreateBy(accountInfo.getId().toString());
|
||||||
|
|
||||||
return oilGunDao.insert(oilGun) > 0;
|
return oilGunDao.insert(oilGun) > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
public class OilGunVO extends OilGun {
|
public class OilGunVO extends OilGun {
|
||||||
private List<OilGun> oilGunList;
|
private List<OilGun> oilGunList;
|
||||||
private OilGun oilGun;
|
private OilGun oilGun;
|
||||||
public Integer numberId; //id(主键)
|
private Integer numberId; //id(主键)
|
||||||
private String oilType; // 油品类型
|
private String oilType; // 油品类型
|
||||||
private String oilName; //油品名称
|
private String oilName; //油品名称
|
||||||
private Double oilPrice; //油品单价
|
private Double oilPrice; //油品单价
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user