This commit is contained in:
cun-nan 2024-10-25 17:51:00 +08:00
parent 42b9df78a8
commit 73576a54ae
3 changed files with 114 additions and 102 deletions

View File

@ -1,9 +1,9 @@
<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="100px">
<el-form-item label="" prop="purchaseNo"> <el-form-item label="" prop="purchaseNo">
<el-input v-model="queryParams.purchaseNo" placeholder="请输入进货单号" /> <el-input v-model="queryParams.purchaseNo" placeholder="请输入进货单号"/>
</el-form-item> </el-form-item>
<el-form-item label="" prop="supplierId"> <el-form-item label="" prop="supplierId">
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" clearable> <el-select v-model="queryParams.supplierId" placeholder="请选择供应商" clearable>
@ -17,7 +17,7 @@
</el-form-item> </el-form-item>
<el-form-item label="" prop="numberId"> <el-form-item label="" prop="numberId">
<el-select v-model="queryParams.numberId" placeholder="请选择油品油号" > <el-select v-model="queryParams.numberId" placeholder="请选择油品油号">
<el-option <el-option
v-for="option in selectOilTypeByPrice" v-for="option in selectOilTypeByPrice"
:key="option.numberId" :key="option.numberId"
@ -52,87 +52,93 @@
placeholder="结束日期"> placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item style="float: right;margin-right: 0px"> <el-form-item style="display:flex;justify-content: end">
<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="purchaseAdd" @click="purchaseAdd"
v-hasPermi="['oilConfig:oilPurchase:list:add']" v-hasPermi="['oilConfig:oilPurchase:list:add']"
>新增采购</el-button> >新增采购
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table ref="tables" <div style="height: 70vh;overflow: auto">
v-loading="loading" <el-table ref="tables"
:data="purchaseList" v-loading="loading"
border :data="purchaseList"
:default-sort="defaultSort"> border
<el-table-column label="序号" align="center" type="index"/> :default-sort="defaultSort">
<el-table-column label="进货单号" align="center" prop="purchaseNo"/> <el-table-column label="序号" align="center" type="index"/>
<el-table-column label="供应商" align="center" prop="supplierss"/> <el-table-column label="进货单号" align="center" prop="purchaseNo"/>
<el-table-column label="油品-油号" align="center" prop="oils"/> <el-table-column label="供应商" align="center" prop="supplierss"/>
<el-table-column label="入库油罐" align="center" prop="tanks"/> <el-table-column label="油品-油号" align="center" prop="oils"/>
<el-table-column label="单据金额" align="center" prop="theDocumentAmount"/> <el-table-column label="入库油罐" align="center" prop="tanks"/>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="单据金额" align="center" prop="theDocumentAmount"/>
<template slot-scope="scope"> <el-table-column label="状态" align="center" prop="status">
<div slot="reference" class="name-wrapper"> <template slot-scope="scope">
<div style="color: #FF770F" v-if="scope.row.status == 'await'">待审核</div> <div slot="reference" class="name-wrapper">
<div style="color: #0DC291" v-if="scope.row.status == 'qrts'">已审核入库</div> <div style="color: #FF770F" v-if="scope.row.status == 'await'">待审核</div>
<div style="color: #F44522" v-if="scope.row.status == 'yzf'">已作废</div> <div style="color: #0DC291" v-if="scope.row.status == 'qrts'">已审核入库</div>
<div style="color: #00CAFF" v-if="scope.row.status == 'ysh'">已审核</div> <div style="color: #F44522" v-if="scope.row.status == 'yzf'">已作废</div>
</div> <div style="color: #00CAFF" v-if="scope.row.status == 'ysh'">已审核</div>
</template> </div>
</el-table-column> </template>
<el-table-column label="制单人" align="center" prop="creatorName"/> </el-table-column>
<el-table-column label="审核人" align="center" prop="reviewerName"/> <el-table-column label="制单人" align="center" prop="creatorName"/>
<el-table-column label="入库人" align="center" prop="reviewerName"/> <el-table-column label="审核人" align="center" prop="reviewerName"/>
<el-table-column label="制单时间" align="center" prop="createdAt" width="200"> <el-table-column label="入库人" align="center" prop="reviewerName"/>
<template slot-scope="scope"> <el-table-column label="制单时间" align="center" prop="createdAt" width="200">
<span>{{ parseTime(scope.row.createdAt) }}</span> <template slot-scope="scope">
</template> <span>{{ parseTime(scope.row.createdAt) }}</span>
</el-table-column> </template>
<el-table-column label="审核时间" align="center" prop="createdAt" width="200"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="审核时间" align="center" prop="createdAt" width="200">
<span>{{ parseTime(scope.row.createdAt) }}</span> <template slot-scope="scope">
</template> <span>{{ parseTime(scope.row.createdAt) }}</span>
</el-table-column> </template>
<el-table-column label="入库时间" align="center" prop="createdAt" width="200"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="入库时间" align="center" prop="createdAt" width="200">
<span>{{ parseTime(scope.row.createdAt) }}</span> <template slot-scope="scope">
</template> <span>{{ parseTime(scope.row.createdAt) }}</span>
</el-table-column> </template>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> </el-table-column>
<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"
v-if="scope.row.status == 'await'" type="text"
@click="dispose(scope.row)" v-if="scope.row.status == 'await'"
>油品入库</el-button> @click="dispose(scope.row)"
<el-button >油品入库
size="mini" </el-button>
type="text" <el-button
v-else-if="scope.row.status == 'ysh'" size="mini"
@click="dispose(scope.row)" type="text"
>采购审核</el-button> v-else-if="scope.row.status == 'ysh'"
<el-button @click="dispose(scope.row)"
size="mini" >采购审核
type="text" </el-button>
v-else <el-button
@click="dispose(scope.row)" size="mini"
>查看详情</el-button> type="text"
<!-- <el-button--> v-else
<!-- size="mini"--> @click="dispose(scope.row)"
<!-- type="text"--> >查看详情
<!-- icon="el-icon-copy-document"--> </el-button>
<!-- @click="handleDel(scope.row.id)"--> <!-- <el-button-->
<!-- >删除</el-button>--> <!-- size="mini"-->
<!-- v-hasPermi="['']"--> <!-- type="text"-->
</template> <!-- icon="el-icon-copy-document"-->
</el-table-column> <!-- @click="handleDel(scope.row.id)"-->
</el-table> <!-- >删除</el-button>-->
<!-- v-hasPermi="['']"-->
</template>
</el-table-column>
</el-table>
</div>
<pagination <pagination
v-show="total>0" v-show="total>0"
@ -150,7 +156,7 @@
<script> <script>
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase"; import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers"; import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
import {getName,parseTime} from "../../../utils/fuint"; import {getName, parseTime} from "../../../utils/fuint";
import {getOilNameListApi} from "@/api/oilPrice"; import {getOilNameListApi} from "@/api/oilPrice";
@ -163,7 +169,7 @@ export default {
purchaseList: [], purchaseList: [],
suppliersList: [], suppliersList: [],
// //
title:'', title: '',
// //
showSearch: true, showSearch: true,
disableInput: false, // disableInput: false, //
@ -178,10 +184,10 @@ export default {
supplierId: '', supplierId: '',
tankName: '', tankName: '',
status: '', status: '',
page:null, page: null,
pageSize:null pageSize: null
}, },
selectOilTypeByPrice:[], selectOilTypeByPrice: [],
beginTime: "", beginTime: "",
endTime: "", endTime: "",
// //
@ -191,7 +197,7 @@ export default {
// //
rules: { rules: {
supplierName: [ supplierName: [
{ required: true, message: "供应商名称不能为空", trigger: "blur" }, {required: true, message: "供应商名称不能为空", trigger: "blur"},
], ],
} }
} }
@ -211,7 +217,7 @@ export default {
}); });
}, },
// //
getList(){ getList() {
this.loading = true; this.loading = true;
let dateRange = [] let dateRange = []
if (this.beginTime && this.endTime) { if (this.beginTime && this.endTime) {
@ -220,7 +226,7 @@ export default {
} }
getPurchaseApi(this.addDateRange(this.queryParams, dateRange)).then(response => { getPurchaseApi(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.purchaseList = response.data.records; this.purchaseList = response.data.records;
console.log("this.tankList",this.purchaseList) console.log("this.tankList", this.purchaseList)
this.total = response.data.total; this.total = response.data.total;
}) })
this.loading = false; this.loading = false;
@ -259,8 +265,8 @@ export default {
supplierId: '', supplierId: '',
tankName: '', tankName: '',
status: '', status: '',
page:null, page: null,
pageSize:null pageSize: null
}; };
this.beginTime = '' this.beginTime = ''
this.endTime = '' this.endTime = ''
@ -271,11 +277,12 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.app-container{ .app-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f6f8f9; background: #f6f8f9;
} }
.el-form--inline .el-form-item { .el-form--inline .el-form-item {
margin-right: 44px; margin-right: 44px;
} }

View File

@ -4,24 +4,24 @@
<div class="card-change-1-search"> <div class="card-change-1-search">
<div class="" style="height: 90px; display: flex; justify-content: space-between;"> <div class="" 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;align-items: center">
<div class="box"> <div class="box">
<span style="font-size: 26px;color: #3B6ADE;font-weight: bold" >{{purchasedTonnage}}</span> <span style="font-size: 24px;color: #0DC291;font-weight: bold" >{{purchasedTonnage}}</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" >{{purchaseLiters}}</span> <span style="font-size: 26px;color: #00CAFF;font-weight: bold" >{{purchaseLiters}}</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">{{totalAmountPurchased}}</span> <span style="font-size: 26px;color: #F44522;font-weight: bold">{{totalAmountPurchased}}</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>
采购总额</span> 采购总额</span>
</div> </div>
</div> </div>
@ -47,10 +47,11 @@
</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 @click="cancelPurchase">取消</el-button>
<el-button type="primary" v-if="state=='await'" :disabled="saveFlag" @click="savePurchase()">保存</el-button> <el-button type="primary" v-if="state=='await'" :disabled="saveFlag" @click="savePurchase()">保存</el-button>
<el-button type="success" v-if="state=='await'" :disabled="auditFlag" @click="audit">保存并审核</el-button> <el-button type="success" v-if="state=='await'" :disabled="auditFlag" @click="audit">保存并审核</el-button>
<el-button type="success" v-if="state=='ysh'" :disabled="storageFlag" @click="storage">收货并入库</el-button> <el-button type="danger" v-if="state=='ysh'" :disabled="voidFlag" @click="abolition()">作废</el-button>
<el-button type="warning" v-if="state =='await' || state=='ysh'" :disabled="voidFlag" @click="abolition()">作废</el-button> <el-button type="primary" v-if="state=='ysh'" :disabled="storageFlag" @click="storage">收货并入库</el-button>
<!-- state=='yzf'--> <!-- state=='yzf'-->
</div> </div>
</div> </div>
@ -414,6 +415,10 @@ export default {
} }
}, },
methods: { methods: {
//
cancelPurchase(){
this.$router.back()
},
aaa() { aaa() {
this.densityCalculations() this.densityCalculations()
this.$forceUpdate(); this.$forceUpdate();
@ -946,12 +951,11 @@ export default {
padding: 0px; padding: 0px;
} }
.box { .box {
height: 100%; height: 80%;
width: 212px; width: 212px;
margin-right: 10px; margin-right: 10px;
background: #FFFFFF; background: #FFFFFF;
border-radius: 10px 10px 10px 10px; border: 1px solid #FF9655;
border: 1px solid #EEEEEE;
border-radius: 10px; border-radius: 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -726,7 +726,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
e.printStackTrace(); e.printStackTrace();
} }
} else { } else {
this.insertAllOrderInfo(orderNo, storeId, oilAmount + goodsAmount, Double.valueOf(map.get("allAmount")), oilDiscount, payType, userId, "PC", "6", "paid"); Double payAmount = map.get("payType").equals("CASH") ? Double.valueOf(map.get("authCode")) : Double.valueOf(map.get("allAmount"));
this.insertAllOrderInfo(orderNo, storeId, oilAmount + goodsAmount, payAmount, oilDiscount, payType, userId, "PC", "6", "paid");
// 添加车队卡订单信息 // 添加车队卡订单信息
if (payType.equals("car_card_value") && ObjectUtil.isNotEmpty(fleetMember)) this.addFleetOrder(orderNo,fleetMember); if (payType.equals("car_card_value") && ObjectUtil.isNotEmpty(fleetMember)) this.addFleetOrder(orderNo,fleetMember);