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>
<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-item label="" prop="purchaseNo">
<el-input v-model="queryParams.purchaseNo" placeholder="请输入进货单号" />
<el-input v-model="queryParams.purchaseNo" placeholder="请输入进货单号"/>
</el-form-item>
<el-form-item label="" prop="supplierId">
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" clearable>
@ -17,7 +17,7 @@
</el-form-item>
<el-form-item label="" prop="numberId">
<el-select v-model="queryParams.numberId" placeholder="请选择油品油号" >
<el-select v-model="queryParams.numberId" placeholder="请选择油品油号">
<el-option
v-for="option in selectOilTypeByPrice"
:key="option.numberId"
@ -52,7 +52,7 @@
placeholder="结束日期">
</el-date-picker>
</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 icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button
@ -60,10 +60,12 @@
@click="purchaseAdd"
v-hasPermi="['oilConfig:oilPurchase:list:add']"
>新增采购</el-button>
>新增采购
</el-button>
</el-form-item>
</el-form>
<div style="height: 70vh;overflow: auto">
<el-table ref="tables"
v-loading="loading"
:data="purchaseList"
@ -110,29 +112,33 @@
type="text"
v-if="scope.row.status == 'await'"
@click="dispose(scope.row)"
>油品入库</el-button>
>油品入库
</el-button>
<el-button
size="mini"
type="text"
v-else-if="scope.row.status == 'ysh'"
@click="dispose(scope.row)"
>采购审核</el-button>
>采购审核
</el-button>
<el-button
size="mini"
type="text"
v-else
@click="dispose(scope.row)"
>查看详情</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-copy-document"-->
<!-- @click="handleDel(scope.row.id)"-->
<!-- >删除</el-button>-->
>查看详情
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-copy-document"-->
<!-- @click="handleDel(scope.row.id)"-->
<!-- >删除</el-button>-->
<!-- v-hasPermi="['']"-->
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
@ -150,7 +156,7 @@
<script>
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
import {getName,parseTime} from "../../../utils/fuint";
import {getName, parseTime} from "../../../utils/fuint";
import {getOilNameListApi} from "@/api/oilPrice";
@ -163,7 +169,7 @@ export default {
purchaseList: [],
suppliersList: [],
//
title:'',
title: '',
//
showSearch: true,
disableInput: false, //
@ -178,10 +184,10 @@ export default {
supplierId: '',
tankName: '',
status: '',
page:null,
pageSize:null
page: null,
pageSize: null
},
selectOilTypeByPrice:[],
selectOilTypeByPrice: [],
beginTime: "",
endTime: "",
//
@ -191,7 +197,7 @@ export default {
//
rules: {
supplierName: [
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
{required: true, message: "供应商名称不能为空", trigger: "blur"},
],
}
}
@ -211,7 +217,7 @@ export default {
});
},
//
getList(){
getList() {
this.loading = true;
let dateRange = []
if (this.beginTime && this.endTime) {
@ -220,7 +226,7 @@ export default {
}
getPurchaseApi(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.purchaseList = response.data.records;
console.log("this.tankList",this.purchaseList)
console.log("this.tankList", this.purchaseList)
this.total = response.data.total;
})
this.loading = false;
@ -259,8 +265,8 @@ export default {
supplierId: '',
tankName: '',
status: '',
page:null,
pageSize:null
page: null,
pageSize: null
};
this.beginTime = ''
this.endTime = ''
@ -271,11 +277,12 @@ export default {
</script>
<style scoped lang="scss">
.app-container{
.app-container {
width: 100%;
height: 100%;
background: #f6f8f9;
}
.el-form--inline .el-form-item {
margin-right: 44px;
}

View File

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

View File

@ -726,7 +726,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
e.printStackTrace();
}
} 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);