This commit is contained in:
cun-nan 2024-10-28 11:33:35 +08:00
parent 45757fd59d
commit 4f9479c799
6 changed files with 258 additions and 244 deletions

View File

@ -48,7 +48,7 @@
@click="purchaseAdd" @click="purchaseAdd"
v-hasPermi="['oilConfig:oilInventory:list']" v-hasPermi="['oilConfig:oilInventory:list']"
>添加盘点 >新增盘点
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

View File

@ -4,32 +4,32 @@
<div class="card-change-1-search" > <div class="card-change-1-search" >
<div style="height: 90px; display: flex; justify-content: space-between;"> <div style="height: 90px; display: flex; justify-content: space-between;">
<div style="height: 100%; display: flex; justify-content: space-between;"> <div style="height: 100%; display: flex; justify-content: space-between;">
<div style="height: 100%; width: 70%; display: flex; justify-content: space-between;font-family: YouSheBiaoTiHei"> <div style="height: 100%; width: 70%; display: flex; justify-content: space-between;">
<div class="box"> <div class="box">
<span style="font-size: 26px;color: #0DC291;font-weight: bold;">{{numberOfTanks}}</span> <span style="font-size: 26px;color: #0DC291;font-weight: bold;">{{numberOfTanks}}</span>
<span style="display: flex"> <span style="display: flex;font-size: 14px;font-weight: bold">
<div style="background-color: #0DC291;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div> <div style="background-color: #0DC291;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
油罐数量 油罐数量
</span> </span>
</div> </div>
<div class="box" > <div class="box" >
<span style="font-size: 26px;color: #3B6ADE;font-weight: bold" >{{inventoryVolume}}</span> <span style="font-size: 26px;color: #00CAFF;font-weight: bold" >{{inventoryVolume}}</span>
<span style="display: flex"> <span style="display: flex;font-size: 14px;font-weight: bold">
<div style="background-color: #3B6ADE;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div> <div style="background-color: #00CAFF;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
盘点升数 盘点升数
</span> </span>
</div> </div>
<div class="box"> <div class="box">
<span style="font-size: 26px;color: #FF4347;font-weight: bold">{{stockDifference}}</span> <span style="font-size: 26px;color: #F44522;font-weight: bold">{{stockDifference}}</span>
<span style="display: flex"> <span style="display: flex;font-size: 14px;font-weight: bold">
<div style="background-color: #FF4347;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div> <div style="background-color: #F44522;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
库存差异(L) 库存差异(L)
</span> </span>
</div> </div>
<div class="box"> <div class="box">
<span style="font-size: 26px;color: #FF9655;font-weight: bold">{{profitLossAmount}}</span> <span style="font-size: 26px;color: #F4C622;font-weight: bold">{{profitLossAmount}}</span>
<span style="display: flex"> <span style="display: flex;font-size: 14px;font-weight: bold">
<div style="background-color: #FF9655;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div> <div style="background-color: #F4C622;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
盈亏总额() 盈亏总额()
</span> </span>
</div> </div>
@ -60,10 +60,12 @@
</div> </div>
</div> </div>
<div style="height: 100%; width: 30%; display: flex; align-items: center; justify-content: flex-end;"> <div style="height: 100%; width: 30%; display: flex; align-items: center; justify-content: flex-end;">
<el-button type="warning" v-if="state=='await'" :disabled="saveFlag" @click="saveInventory()">保存</el-button> <el-button type="primary" @click="cancelPurchase" v-if="state=='yzf' || state=='qrts'">关闭</el-button>
<el-button type="success" v-if="state=='await'" :disabled="auditFlag" @click="audit">保存并审核</el-button> <el-button @click="cancelPurchase" v-else>取消</el-button>
<el-button type="success" v-if="state=='ysh'" :disabled="auditFlag" @click="storage">盘点并处理库存</el-button> <el-button type="success" v-if="state=='await'" :disabled="saveFlag" @click="saveInventory()">保存</el-button>
<el-button type="danger" plain v-if="state =='await' || state=='ysh'" :disabled="voidFlag" @click="abolition()">作废</el-button> <el-button type="danger" v-if="state =='await' || state=='ysh'" :disabled="voidFlag" @click="abolition()">作废</el-button>
<el-button type="primary" v-if="state=='await'" :disabled="auditFlag" @click="audit">保存并审核</el-button>
<el-button type="primary" v-if="state=='ysh'" :disabled="auditFlag" @click="storage">盘点并处理库存</el-button>
</div> </div>
</div> </div>
@ -98,8 +100,8 @@
: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="numberName"/> <el-table-column label="油品-油号" align="center" prop="numberName"/>
<!-- <el-table-column label="油品名称" align="center" prop="numberName"/>--> <el-table-column label="供应商" align="center" prop="numberName"/>
<el-table-column label="上次采购信息" align="center" prop="numberName"> <el-table-column label="上次采购信息" align="center" prop="numberName">
@ -133,15 +135,15 @@
</el-table-column> </el-table-column>
<!-- <el-table-column label="当前剩余油量总价" align="center" prop="totalPrice"/>--> <!-- <el-table-column label="当前剩余油量总价" align="center" prop="totalPrice"/>-->
<el-table-column label="当前均价" align="center" prop="currentAveragePrice" /> <el-table-column label="当前均(元/L)" align="center" prop="currentAveragePrice" />
<el-table-column label="当前库存升数(L)" align="center" prop="currentInventoryVolume"/> <el-table-column label="当前库存(L)" align="center" prop="currentInventoryVolume"/>
<el-table-column label="盘点升数(L)" align="center" prop="inventoryVolume" width="150px"> <el-table-column label="盘点升数(L)" align="center" prop="inventoryVolume" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :disabled="numberInput" v-model="scope.row.inventoryVolume" @change="change(scope.row)" controls-position="right" :min="0" :max="100000000" :step="1" :precision="2" style="max-width: 100%"></el-input-number> <el-input-number :disabled="numberInput" v-model="scope.row.inventoryVolume" @change="change(scope.row)" controls-position="right" :min="0" :max="100000000" :step="1" :precision="2" style="max-width: 100%"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存差异升数(L)" align="center" prop="stockDifference"/> <el-table-column label="库存差异(L)" align="center" prop="stockDifference"/>
<el-table-column label="盈亏金额(元)" align="center" prop="profitLossAmount"/> <el-table-column label="盈亏金额(元)" align="center" prop="profitLossAmount"/>
<el-table-column v-if="state =='await'" label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column v-if="state =='await'" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -172,8 +174,8 @@
<el-form ref="tankForm" :model="tankForm" label-width="80px"> <el-form ref="tankForm" :model="tankForm" label-width="80px">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="10"> <el-col :span="10">
<el-form-item label="选择油号"> <el-form-item label="">
<el-select v-model="tankForm.numberId" placeholder="请选择油品号" style="width:100%" @change="chooseOilNumber()" clearable> <el-select v-model="tankForm.numberId" placeholder="请选择油品号" style="width:100%" @change="chooseOilNumber()" clearable>
<el-option <el-option
v-for="option in selectOilTypeByPrice" v-for="option in selectOilTypeByPrice"
:key="option.numberId" :key="option.numberId"
@ -184,12 +186,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="油罐名称"> <el-form-item label="">
<el-input v-model="tankForm.tankName"></el-input> <el-input v-model="tankForm.tankName" placeholder="请输入油罐名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-button type="primary" @click="inquireTank()">查询</el-button> <el-button type="primary" @click="inquireTank()" icon="el-icon-search">搜索</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -206,15 +208,15 @@
width="55"> width="55">
</el-table-column> </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" prop="discountedPrice" /> <el-table-column label="当前均价(元/L)" align="center" prop="discountedPrice" />
<el-table-column label="当前库存(L)" align="center" prop="storedQuantity"/> <el-table-column label="当前库存(L)" align="center" prop="storedQuantity"/>
</el-table> </el-table>
</el-main> </el-main>
</el-container> </el-container>
<div slot="footer" class="dialog-footer"> <div class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="addOrder"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
<el-button type="primary" @click="addOrder"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -361,6 +363,7 @@ export default {
}else { }else {
this.numberInput = true this.numberInput = true
} }
console.log(this.state,366)
this.inventoryNo.inventoryNo = this.$route.query.inventoryNo; this.inventoryNo.inventoryNo = this.$route.query.inventoryNo;
// this.inventoryNo.inventoryDate = this.$route.query.inventoryDate; // this.inventoryNo.inventoryDate = this.$route.query.inventoryDate;
@ -389,6 +392,10 @@ export default {
}, },
methods: { methods: {
//
cancelPurchase() {
this.$router.back()
},
getList(){ getList(){
this.loading = true; this.loading = true;
getInventoryOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(response => { getInventoryOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
@ -470,7 +477,7 @@ export default {
orderAdd() { orderAdd() {
// //
this.open = true; this.open = true;
this.title = "选择油罐" this.title = "添加盘点油罐"
this.getOilNameList() this.getOilNameList()
// this.selectSuppliers() // this.selectSuppliers()
}, },
@ -889,7 +896,7 @@ export default {
width: 212px; width: 212px;
margin-right: 10px; margin-right: 10px;
background: #FFFFFF; background: #FFFFFF;
border: 1px solid #EEEEEE; border: 1px solid #FF9655;
border-radius: 10px; border-radius: 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -6,7 +6,7 @@
<div style="height: 100%; display: flex; justify-content: space-between;"> <div style="height: 100%; display: flex; justify-content: space-between;">
<div style="height: 100%; width: 70%; display: flex; justify-content: space-between;align-items: center"> <div style="height: 100%; width: 70%; display: flex; justify-content: space-between;align-items: center">
<div class="box"> <div class="box">
<span style="font-size: 24px;color: #0DC291;font-weight: bold">{{ purchasedTonnage }}</span> <span style="font-size: 26px;color: #0DC291;font-weight: bold">{{ purchasedTonnage }}</span>
<span style="display: flex;font-size: 14px;font-weight: bold"> <span style="display: flex;font-size: 14px;font-weight: bold">
<div <div
style="background-color: #0DC291;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div> style="background-color: #0DC291;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
@ -400,7 +400,6 @@ export default {
this.numberInput = true this.numberInput = true
} }
console.log(this.state, 388)
// this.purchaseForm.purchaseDate = localDate; // this.purchaseForm.purchaseDate = localDate;
// console.log("this.purchaseForm.purchaseDate:", this.purchaseForm.purchaseDate); // console.log("this.purchaseForm.purchaseDate:", this.purchaseForm.purchaseDate);
@ -408,7 +407,6 @@ export default {
this.purchaseForm.purchaseDate = new Date(parseInt(this.$route.query.purchaseDate)) this.purchaseForm.purchaseDate = new Date(parseInt(this.$route.query.purchaseDate))
} }
console.log("this.purchaseForm.purchaseDate", this.purchaseForm.purchaseDate)
if (this.purchaseForm.purchaseDate == null) { if (this.purchaseForm.purchaseDate == null) {
this.purchaseForm.purchaseDate = new Date() this.purchaseForm.purchaseDate = new Date()
} }

View File

@ -1,11 +1,19 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索框--> <!-- 搜索框-->
<el-card > <el-card>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="tankName">
<el-input
v-model="queryParams.tankName"
placeholder="请输入油罐名称"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="oilNumber"> <el-form-item label="" prop="oilNumber">
<el-select v-model="queryParams.numberId" placeholder="油品" style="width:100%" @change="chooseOilNumber()" clearable <el-select v-model="queryParams.numberId" placeholder="请选择油品油号" style="width:100%" clearable>
>
<el-option <el-option
v-for="option in selectOilTypeByPrice" v-for="option in selectOilTypeByPrice"
:key="option.numberId" :key="option.numberId"
@ -15,20 +23,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label-width="120px" label="" v-model="queryParams.inventoryStatistics" prop="inventoryStatistics"
<el-form-item label="" prop="tankName"> clearable>
<el-input <el-select v-model="queryParams.inventoryStatistics" placeholder="请选择状态" style="width:100%">
v-model="queryParams.tankName" <!-- <el-option label="库存统计状态" value=""></el-option>-->
placeholder="油罐名称"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label-width="120px" label="" v-model="queryParams.inventoryStatistics" prop="inventoryStatistics" clearable>
<el-select v-model="queryParams.inventoryStatistics" placeholder="" style="width:100%">
<el-option label="库存统计状态" value=""></el-option>
<el-option <el-option
v-for="dict in dict.type.zhzt" v-for="dict in dict.type.zhzt"
:key="dict.label" :key="dict.label"
@ -39,64 +37,67 @@
</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 type="primary" @click="exportExcelTank()" <el-button type="primary" @click="exportExcelTank()"
v-hasPermi="['oilConfig:oilStatistics:list:ex']" v-hasPermi="['oilConfig:oilStatistics:list:ex']"
>导出</el-button> >导出
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table key="2" ref="tables" <div style="height: 76vh;overflow: auto">
v-loading="loading" <el-table key="2" ref="tables"
:data="statisticsList" v-loading="loading"
border :data="statisticsList"
:default-sort="defaultSort"> border
<el-table-column align="center" type="index" label="序号"></el-table-column> :default-sort="defaultSort">
<el-table-column label="油罐名称" align="center" prop="tankName"/> <el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column label="油品名称" align="center" prop="oilNumber" /> <el-table-column label="油罐名称" align="center" prop="tankName"/>
<el-table-column label="油罐容量L" align="center" prop="tankVolume" /> <el-table-column label="油品-油号" align="center" prop="oilNumber"/>
<el-table-column label="油品密度(g/ml)" align="center" prop="oilDensity" /> <el-table-column label="油罐容量L" align="center" prop="tankVolume"/>
<el-table-column label="当前剩余油量L" align="center" prop="storedQuantity" /> <el-table-column label="油品密度g/ml" align="center" prop="oilDensity"/>
<el-table-column label="当前成本价(元/L" align="center" prop="discountedPrice" /> <el-table-column label="当前剩余油量L" align="center" prop="storedQuantity"/>
<el-table-column label="成本金额(元)" align="center" prop="totalPrice" /> <el-table-column label="当前成本价(元/L" align="center" prop="discountedPrice"/>
<el-table-column label="状态" align="center" prop="inventoryStatistics"> <el-table-column label="成本金额(元)" align="center" prop="totalPrice"/>
<template slot-scope="scope"> <el-table-column label="状态" align="center" prop="inventoryStatistics">
<div slot="reference" class="name-wrapper"> <!-- <template slot-scope="scope">-->
<el-tag v-if ="scope.row.inventoryStatistics == '启用'" size="success">启用</el-tag> <!-- <div slot="reference" class="name-wrapper">-->
<el-tag v-if ="scope.row.inventoryStatistics == '禁用'" type="danger" size="medium">禁用</el-tag> <!-- <el-tag v-if="scope.row.inventoryStatistics == '启用'" size="success">启用</el-tag>-->
</div> <!-- <el-tag v-if="scope.row.inventoryStatistics == '禁用'" type="danger" size="medium">禁用</el-tag>-->
</template> <!-- </div>-->
<!-- <template slot-scope="scope">--> <!-- </template>-->
<!-- <el-switch--> <template slot-scope="scope">
<!-- v-model="scope.row.status"--> <el-switch
<!-- active-value="启用"--> disabled
<!-- inactive-value="禁用"--> v-model="scope.row.status"
<!-- @change="changeStatus(scope.row)"--> active-value="启用"
<!-- active-color="#13ce66"--> inactive-value="禁用"
<!-- inactive-color="#ff4949">--> active-color="#13ce66"
<!-- </el-switch>--> inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="trace(scope.row)"
>库存跟踪记录
</el-button>
<!-- v-hasPermi="['']"-->
<!-- </template>--> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" align="center" prop="updateTime" width="200"> </el-table>
<template slot-scope="scope"> </div>
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="trace(scope.row)"
>库存跟踪记录</el-button>
<!-- v-hasPermi="['']"-->
</template>
</el-table-column>
</el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -111,34 +112,36 @@
title="库存跟踪记录" title="库存跟踪记录"
:visible.sync="drawer" :visible.sync="drawer"
direction="rtl" direction="rtl"
size="40%" size="45%"
:before-close="handleClose"> :before-close="handleClose">
<div style="display: grid; place-items: center;"> <div style="display: grid; place-items: center;">
<div class="box-card" style=""> <div class="box-card" style="">
<div style="display: flex; justify-content: space-between;margin-bottom: 10px"> <div style="display: flex; justify-content: space-between;margin-bottom: 10px">
<span>油罐名称{{statisticsForm.tankName}}</span> <span>油罐名称{{ statisticsForm.tankName }}</span>
<span>油品油号:{{ statisticsForm.oilNumber }}</span> <span>油品油号{{ statisticsForm.oilNumber }}</span>
<span>库存数量:{{statisticsForm.storedQuantity}}{{statisticsForm.unit}}</span> <span>库存数量L{{ statisticsForm.storedQuantity }}{{ statisticsForm.unit }}</span>
<span>更新时间:{{ statisticsForm.updateTime }}</span> <span>更新时间{{ statisticsForm.updateTime }}</span>
</div> </div>
<el-table ref="tables" <div style="height: 80vh;overflow: auto">
v-loading="loading" <el-table ref="tables"
:data="trackList" v-loading="loading"
:default-sort="defaultSort" :data="trackList"
border :default-sort="defaultSort"
key="1"> border
<el-table-column align="center" type="index" label="序号"></el-table-column> key="1">
<el-table-column label="单据" align="center" prop="document" /> <el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column label="单号" align="center" prop="orderNumber" /> <el-table-column label="单号" align="center" prop="orderNumber"/>
<el-table-column label="变动数量L" align="center" prop="quantityChange" /> <el-table-column label="类型" align="center" prop="document"/>
<el-table-column label="变动数量L" align="center" prop="quantityChange"/>
<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> </el-table>
</div>
<pagination <pagination
v-show="total2>0" v-show="total2>0"
:total="total2" :total="total2"
@ -171,26 +174,26 @@ export default {
total: 0, total: 0,
total2: 0, total2: 0,
statisticsForm: { statisticsForm: {
tankName:'', tankName: '',
oilNumber:'', oilNumber: '',
storedQuantity:'', storedQuantity: '',
updateTime:'', updateTime: '',
unit:'' unit: ''
}, },
// //
queryParams: { queryParams: {
numberId:'', numberId: '',
status:'启用', status: '启用',
inventoryStatistics:'', inventoryStatistics: '',
tankName: '', tankName: '',
page:null, page: null,
pageSize:null pageSize: null
}, },
queryParams2: { queryParams2: {
page:null, page: null,
pageSize:null pageSize: null
}, },
drawer: false, drawer: false,
@ -208,19 +211,19 @@ export default {
methods: { methods: {
exportExcelTank() { exportExcelTank() {
exportExcelTankApi().then(res=>{ exportExcelTankApi().then(res => {
console.log("res",res) console.log("res", res)
// this.downloadFile(res); // this.downloadFile(res);
const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); const blob = new Blob([res], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
this.$download.saveAs(blob,'库存统计.xLsx') this.$download.saveAs(blob, '库存统计.xLsx')
}) })
}, },
downloadFile(blobData) { downloadFile(blobData) {
this.$down() this.$down()
// Blob URL // Blob URL
const blob = new Blob([blobData], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); const blob = new Blob([blobData], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'});
const url = window.URL.createObjectURL(blob); const url = window.URL.createObjectURL(blob);
const link = document.createElement('a'); const link = document.createElement('a');
link.href = url; link.href = url;
@ -234,7 +237,7 @@ export default {
getList() { getList() {
getTankApi(this.queryParams).then(res=>{ getTankApi(this.queryParams).then(res => {
this.statisticsList = res.data.records this.statisticsList = res.data.records
this.total = res.data.total; this.total = res.data.total;
@ -242,7 +245,7 @@ export default {
}, },
getTrackingList(data) { getTrackingList(data) {
// this.queryParams2.tankId = data.id // this.queryParams2.tankId = data.id
getTrackingApi(this.queryParams2).then(res=>{ getTrackingApi(this.queryParams2).then(res => {
this.trackList = res.data.records this.trackList = res.data.records
this.total2 = res.data.total; this.total2 = res.data.total;
}) })
@ -251,15 +254,15 @@ export default {
trace(data) { trace(data) {
let this_ = this let this_ = this
this_.statisticsForm = {}, this_.statisticsForm = {},
this_.statisticsForm.tankName = data.tankName, this_.statisticsForm.tankName = data.tankName,
this_.statisticsForm.oilNumber = data.oilNumber, this_.statisticsForm.oilNumber = data.oilNumber,
this_.statisticsForm.storedQuantity = data.storedQuantity, this_.statisticsForm.storedQuantity = data.storedQuantity,
this_.statisticsForm.updateTime = data.updateTime, this_.statisticsForm.updateTime = data.updateTime,
this_.statisticsForm.unit = data.unit, this_.statisticsForm.unit = data.unit,
this_.queryParams2.tankId = data.id this_.queryParams2.tankId = data.id
this.trackList = [] this.trackList = []
this_.getTrackingList(data) this_.getTrackingList(data)
this.drawer=true this.drawer = true
}, },
// //
@ -271,13 +274,13 @@ export default {
res() { res() {
// //
this.queryParams= { this.queryParams = {
numberId:'', numberId: '',
status:'启用', status: '启用',
inventoryStatistics:'', inventoryStatistics: '',
tankName: '', tankName: '',
page:null, page: null,
pageSize:null pageSize: null
} }
}, },
@ -293,8 +296,8 @@ 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
}); });
@ -311,34 +314,36 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.app-container{ .app-container {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background: #f6f8f9; background: #f6f8f9;
} }
.text { .text {
font-size: 14px; font-size: 14px;
} }
.item { .item {
margin-bottom: 18px; margin-bottom: 18px;
} }
.clearfix:before, .clearfix:before,
.clearfix:after { .clearfix:after {
display: table; display: table;
content: ""; content: "";
} }
.clearfix:after {
clear: both
}
.box-card { .clearfix:after {
width: 90%; clear: both
} }
.el-form--inline .el-form-item {
margin-right: 44px; .box-card {
} width: 90%;
}
.el-form--inline .el-form-item {
margin-right: 44px;
}
</style> </style>

View File

@ -1,12 +1,12 @@
<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="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="" prop="supplierName"> <el-form-item label="" prop="supplierName">
<el-input <el-input
v-model="queryParams.supplierName" v-model="queryParams.supplierName"
placeholder="供应商名称" placeholder="请输入供应商名称"
clearable clearable
style="width: 240px;" style="width: 240px;"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -16,7 +16,7 @@
<el-form-item label="" prop="contactPerson"> <el-form-item label="" prop="contactPerson">
<el-input <el-input
v-model="queryParams.contactPerson" v-model="queryParams.contactPerson"
placeholder="联系人" placeholder="请输入联系人"
clearable clearable
style="width: 240px;" style="width: 240px;"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -25,7 +25,7 @@
<el-form-item label="" prop="contactPhone"> <el-form-item label="" prop="contactPhone">
<el-input <el-input
v-model.number="queryParams.contactPhone" v-model.number="queryParams.contactPhone"
placeholder="供应商电话" placeholder="请输入联系方式"
clearable clearable
style="width: 240px;" style="width: 240px;"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -33,43 +33,45 @@
</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"
@click="suppliersAdd" @click="suppliersAdd"
v-hasPermi="['oilConfig:oilSuppliers:list:add']" v-hasPermi="['oilConfig:oilSuppliers:list:add']"
>新增供应商</el-button> >新增供应商
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table ref="tables" <div style="height: 76vh;overflow: auto">
v-loading="loading" <el-table ref="tables"
:data="suppliersList" v-loading="loading"
border :data="suppliersList"
:default-sort="defaultSort"> border
<el-table-column label="序号" align="center" type="index"/> :default-sort="defaultSort">
<el-table-column label="供应商名称" align="center" prop="supplierName"/> <el-table-column label="序号" align="center" type="index"/>
<el-table-column label="联系人" align="center" prop="contactPerson" /> <el-table-column label="供应商名称" align="center" prop="supplierName"/>
<el-table-column label="联系方式" align="center" prop="contactPhone"/> <el-table-column label="联系人" align="center" prop="contactPerson"/>
<el-table-column label="联系地址" align="center" prop="contactAddress"/> <el-table-column label="联系电话" align="center" prop="contactPhone"/>
<el-table-column label="备注信息" align="center" prop="remarks"/> <el-table-column label="联系地址" align="center" prop="contactAddress"/>
<el-table-column label="创建人" align="center" prop="createName"/> <el-table-column label="备注" align="center" prop="remarks"/>
<el-table-column label="创建时间" align="center" prop="createTime"/> <el-table-column label="创建人" align="center" prop="createName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="创建时间" align="center" prop="createTime"/>
<template slot-scope="scope"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-button <template slot-scope="scope">
size="mini" <el-button
type="text" size="mini"
icon="el-icon-edit" type="text"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['oilConfig:oilSuppliers:list:update']" v-hasPermi="['oilConfig:oilSuppliers:list:update']"
>修改</el-button> >修改
</template> </el-button>
<!-- v-hasPermi="['']"--> </template>
<!-- v-hasPermi="['']"-->
</el-table-column>
</el-table>
</el-table-column>
</el-table>
</div>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -81,26 +83,27 @@
<!-- 新增/修改--> <!-- 新增/修改-->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false"> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="suppliersForm" :rules="rules" label-width="120px"> <el-form ref="form" :model="suppliersForm" :rules="rules" label-width="100px">
<el-form-item label="供应商" prop="supplierName"> <el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="suppliersForm.supplierName" style="width: 300px" placeholder="供应商名称" maxlength="30"/> <el-input v-model="suppliersForm.supplierName" placeholder="供应商名称" maxlength="30"/>
</el-form-item> </el-form-item>
<el-form-item label="联系人" prop="contactPerson"> <el-form-item label="联系人" prop="contactPerson">
<el-input v-model="suppliersForm.contactPerson" style="width: 300px" placeholder="联系人名称" maxlength="30"/> <el-input v-model="suppliersForm.contactPerson" placeholder="联系人名称" maxlength="30"/>
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="contactPhone"> <el-form-item label="联系电话" prop="contactPhone">
<el-input v-model="suppliersForm.contactPhone" style="width: 300px" placeholder="联系电话" maxlength="30"/> <el-input v-model="suppliersForm.contactPhone" placeholder="联系电话" maxlength="30"/>
</el-form-item> </el-form-item>
<el-form-item label="联系地址" prop="contactAddress"> <el-form-item label="联系地址" prop="contactAddress">
<el-input v-model="suppliersForm.contactAddress" style="width: 300px" placeholder="联系地址" maxlength="30"/> <el-input v-model="suppliersForm.contactAddress" placeholder="联系地址" maxlength="30"/>
</el-form-item> </el-form-item>
<el-form-item label="备注信息" prop="remarks"> <el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="suppliersForm.remarks" style="width: 300px" placeholder="备注信息" maxlength="30"/> <el-input type="textarea" v-model="suppliersForm.remarks" placeholder="备注信息"
maxlength="100"/>
</el-form-item> </el-form-item>
@ -121,18 +124,18 @@ import {getSuppliersListApi, insertSuppliersApi, updateSuppliersApi} from "@/api
export default { export default {
data() { data() {
return { return {
suppliersList:[], suppliersList: [],
suppliersForm:{ suppliersForm: {
id: null, id: null,
supplierName: '', supplierName: '',
contactPerson: '', contactPerson: '',
contactPhone: '', contactPhone: '',
contactAddress: '', contactAddress: '',
remarks: '', remarks: '',
createTime:'' createTime: ''
}, },
// //
title:'', title: '',
// //
showSearch: true, showSearch: true,
disableInput: false, // disableInput: false, //
@ -145,8 +148,8 @@ export default {
supplierName: '', supplierName: '',
contactPerson: '', contactPerson: '',
contactPhone: '', contactPhone: '',
page:null, page: null,
pageSize:null pageSize: null
}, },
// //
loading: false, loading: false,
@ -155,7 +158,7 @@ export default {
// //
rules: { rules: {
supplierName: [ supplierName: [
{ required: true, message: "供应商名称不能为空", trigger: "blur" }, {required: true, message: "供应商名称不能为空", trigger: "blur"},
], ],
// contactPerson: [ // contactPerson: [
// { required: true, message: "", trigger: "blur" }, // { required: true, message: "", trigger: "blur" },
@ -185,7 +188,7 @@ export default {
this.loading = false; this.loading = false;
}, },
// //
submitForm: function() { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (!this.suppliersForm.id) { if (!this.suppliersForm.id) {
@ -213,7 +216,7 @@ export default {
handleUpdate(data) { handleUpdate(data) {
this.suppliersForm = data this.suppliersForm = data
this.open = true this.open = true
this.title = '新增供应商' this.title = '修改供应商'
}, },
// //
cancel() { cancel() {
@ -230,8 +233,8 @@ export default {
supplierName: '', supplierName: '',
contactPerson: '', contactPerson: '',
contactPhone: '', contactPhone: '',
page:null, page: null,
pageSize:null pageSize: null
}; };
this.getList(); this.getList();
}, },
@ -243,11 +246,12 @@ export default {
</script> </script>
<style> <style>
.app-container{ .app-container {
width: 100%; width: 100%;
height: 100vh; height: 100%;
background: #f6f8f9; background: #f6f8f9;
} }
.el-form--inline .el-form-item { .el-form--inline .el-form-item {
//margin-right: 20px; //margin-right: 20px;
} }

View File

@ -33,11 +33,11 @@
<if test="stock.status != null and stock.status != ''"> <if test="stock.status != null and stock.status != ''">
and mg.status = #{stock.status} and mg.status = #{stock.status}
</if> </if>
<if test="allOrderInfo.params.beginTime != null and allOrderInfo.params.beginTime != ''"><!-- 开始时间检索 --> <if test="stock.params.beginTime != null and stock.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(mg.update_time,'%y%m%d') &gt;= date_format(#{allOrderInfo.params.beginTime},'%y%m%d') and date_format(mg.update_time,'%y%m%d') &gt;= date_format(#{stock.params.beginTime},'%y%m%d')
</if> </if>
<if test="allOrderInfo.params.endTime != null and allOrderInfo.params.endTime != ''"><!-- 结束时间检索 --> <if test="stock.params.endTime != null and stock.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(mg.update_time,'%y%m%d') &lt;= date_format(#{allOrderInfo.params.endTime},'%y%m%d') and date_format(mg.update_time,'%y%m%d') &lt;= date_format(#{stock.params.endTime},'%y%m%d')
</if> </if>
</where> </where>
order by st.update_time desc order by st.update_time desc