This commit is contained in:
cun-nan 2024-10-28 10:36:06 +08:00
parent d9a0ff3125
commit 45757fd59d
13 changed files with 351 additions and 307 deletions

View File

@ -1,13 +1,22 @@
<template>
<div class="app-container">
<div class="card-change" >
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<div class="card-change">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="" prop="tankName">
<el-input v-model="queryParams.inventoryNumber" placeholder="业务单号" />
<el-input v-model="queryParams.inventoryNumber" placeholder="请输入盘点单号"/>
</el-form-item>
<el-form-item label="" v-model="queryParams.tankId" prop="status">
<el-select v-model="queryParams.tankId" placeholder="请选择盘点油罐" style="width:100%" clearable>
<el-option
v-for="(item,index) in tankList"
:key="index"
:label="item.tankName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="" v-model="queryParams.status" prop="status">
<el-select v-model="queryParams.status" placeholder="状态" style="width:100%" clearable
>
<el-select v-model="queryParams.status" placeholder="请选择状态" style="width:100%" clearable>
<el-option
v-for="dict in dict.type.oilPurchasedStatus"
:key="dict.value"
@ -17,91 +26,101 @@
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
<el-date-picker
v-model="beginTime"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right; margin-right: 0px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</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
type="primary"
icon="el-icon-plus"
@click="purchaseAdd"
v-hasPermi="['oilConfig:oilInventory:list']"
>添加盘点</el-button>
>添加盘点
</el-button>
</el-form-item>
</el-form>
<el-table ref="tables"
v-loading="loading"
:data="inventoryList"
border
:default-sort="defaultSort">
<el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column label="业务单号" align="center" prop="inventoryNumber"/>
<el-table-column label="盘点油罐" align="center" prop="tanks"/>
<el-table-column label="盘点升数" align="center" prop="inventoryVolume"/>
<el-table-column label="库存差异升数" align="center" prop="stockDifference"/>
<el-table-column label="盈亏金额(元)" align="center" prop="profitLossAmount" width="100"/>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag v-if ="scope.row.status == 'await'" size="medium">待审核</el-tag>
<el-tag v-if ="scope.row.status == 'qrts'" type="success" size="medium">已审核入库</el-tag>
<el-tag v-if ="scope.row.status == 'yzf'" type="danger" size="medium">已作废</el-tag>
<el-tag v-if ="scope.row.status == 'ysh'" type="success" size="medium">已审核</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="制单人" align="center" width="60" prop="creatorName"/>
<el-table-column label="审核人" align="center" width="60" prop="reviewerName"/>
<el-table-column label="入库人" align="center" width="60" prop="reviewerName"/>
<el-table-column label="制单时间" align="center" prop="orderTime" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" prop="orderTime" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime) }}</span>
</template>
</el-table-column>
<el-table-column label="入库时间" align="center" prop="orderTime" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime) }}</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="dispose(scope.row)"
>{{ scope.row.status == 'qrts'?'查看单据':'处理单据' }}
</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 style="height: 76vh;overflow: auto">
<el-table ref="tables"
v-loading="loading"
:data="inventoryList"
border
:default-sort="defaultSort">
<el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column label="盘点单号" align="center" prop="inventoryNumber"/>
<el-table-column label="盘点油罐" align="center" prop="tanks"/>
<el-table-column label="盘点升数" align="center" prop="inventoryVolume"/>
<el-table-column label="库存差异升数" align="center" prop="stockDifference"/>
<el-table-column label="盈亏金额(元)" align="center" prop="profitLossAmount" width="100"/>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<div style="color: #00CAFF" v-if="scope.row.status == 'await'">待审核</div>
<div style="color: #0DC291" v-if="scope.row.status == 'qrts'">已审核入库</div>
<div style="color: #F44522" v-if="scope.row.status == 'yzf'">已作废</div>
<div style="color: #FF770F" v-if="scope.row.status == 'ysh'">已审核</div>
</div>
</template>
</el-table-column>
<el-table-column label="制单人" align="center" width="60" prop="creatorName"/>
<el-table-column label="审核人" align="center" width="60" prop="reviewerName"/>
<el-table-column label="入库人" align="center" width="60" prop="reviewerName"/>
<el-table-column label="制单时间" align="center" prop="orderTime" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime) }}</span>
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" prop="orderTime" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime) }}</span>
</template>
</el-table-column>
<el-table-column label="入库时间" align="center" prop="orderTime" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderTime) }}</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"
v-if="scope.row.status == 'ysh'"
@click="dispose(scope.row)"
>盘点入库
</el-button>
<el-button
size="mini"
type="text"
v-else-if="scope.row.status == 'await'"
@click="dispose(scope.row)"
>盘点审核
</el-button>
<el-button
size="mini"
type="text"
v-else
@click="dispose(scope.row)"
>查看详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
@ -116,8 +135,8 @@
<script>
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
import {delInventoryApi, getInventoryApi} from "@/api/oilConfig/oilInventory";
import {getName,parseTime} from "../../../utils/fuint";
import {delInventoryApi, getInventoryApi, selectList2Api} from "@/api/oilConfig/oilInventory";
import {getName, parseTime} from "../../../utils/fuint";
export default {
name: "list",
@ -131,7 +150,7 @@ export default {
suppliersList: [],
//
title:'',
title: '',
//
showSearch: true,
disableInput: false, //
@ -139,18 +158,18 @@ export default {
open: false,
//
total: 0,
tankList: [],
// dateRange: '',
//
queryParams: {
inventoryNumber:'',
inventoryNumber: '',
status: '',
page:null,
pageSize:null
page: null,
pageSize: null
},
dateRange:[],
beginTime:"",
endTime:"",
dateRange: [],
beginTime: "",
endTime: "",
//
loading: false,
//
@ -158,7 +177,7 @@ export default {
//
rules: {
supplierName: [
{ required: true, message: "供应商名称不能为空", trigger: "blur" },
{required: true, message: "供应商名称不能为空", trigger: "blur"},
],
}
}
@ -166,11 +185,18 @@ export default {
async created() {
await this.getList();
this.getTankList();
},
methods: {
//
getTankList() {
selectList2Api().then(response => {
this.tankList = response.data
})
},
//
getList(){
getList() {
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
@ -180,7 +206,7 @@ export default {
this.loading = true;
getInventoryApi(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.inventoryList = response.data.records;
console.log("this.inventoryList",this.inventoryList)
console.log("this.inventoryList", this.inventoryList)
this.total = response.data.total;
})
this.loading = false;
@ -216,10 +242,10 @@ export default {
},
resetQuery() {
this.queryParams = {
inventoryNumber:'',
inventoryNumber: '',
status: '',
page:null,
pageSize:null
page: null,
pageSize: null
};
this.getList();
},
@ -228,11 +254,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

@ -885,11 +885,10 @@ 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-radius: 10px;
display: flex;

View File

@ -1,39 +1,42 @@
<template>
<div class="app-container" style="padding-top: 1px" >
<div class="app-container" style="padding-top: 1px">
<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;align-items: center">
<div class="box">
<span style="font-size: 24px;color: #0DC291;font-weight: bold" >{{purchasedTonnage}}</span>
<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>
<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: #00CAFF;font-weight: bold" >{{purchaseLiters}}</span>
<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>
<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: #F44522;font-weight: bold">{{totalAmountPurchased}}</span>
<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>
<div
style="background-color: #F44522;width: 10px;height: 10px;border-radius: 50%;margin-top: 6px;margin-right: 10px"></div>
采购总额</span>
</div>
</div>
<div style="height: 100%; width: 40%; display: flex; flex-direction: column; justify-content: space-between;">
<el-form ref="myForm" label-width="100px">
<el-form-item label="进货单号">
<el-input v-model="purchaseForm.purchaseNo" @change="saveJudgment" :disabled="numberInput"
style="width: 220Px">
<el-input v-model="purchaseForm.purchaseNo" @change="saveJudgment" :disabled="numberInput"
style="width: 220Px">
<el-button slot="append" @click="refresh()" icon="el-icon-refresh"></el-button>
</el-input>
</el-form-item>
<el-form-item label="进货时间" >
<el-form-item label="进货时间">
<el-date-picker
style="width: 220Px"
v-model="purchaseForm.purchaseDate"
@ -47,12 +50,13 @@
</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="primary" @click="cancelPurchase" v-if="state=='qrts'">关闭</el-button>
<el-button @click="cancelPurchase" v-else>取消</el-button>
<el-button type="success" v-if="state=='await'" :disabled="saveFlag" @click="savePurchase()">保存</el-button>
<el-button type="primary" v-if="state=='await'" :disabled="auditFlag" @click="audit">保存并审核</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'-->
<!-- state=='yzf'-->
</div>
</div>
@ -61,63 +65,72 @@
<div class="card-change-1-1">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" style="text-align: right; float: right">
<el-col :span="1.5" style="text-align: right; float: right">
<el-button
v-if="state =='await'"
v-if="state =='await'"
type="primary"
icon="el-icon-plus"
@click="orderAdd"
>添加采购油品</el-button>
>添加采购油品
</el-button>
</el-col>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row>
<el-table ref="tables"
v-loading="loading"
:data="orderList"
border
:default-sort="defaultSort">
<el-table-column label="油品油号" align="center" prop="numberName"/>
<el-table-column label="入库油罐" align="center" prop="tankName"/>
<el-table-column label="供应商" align="center" prop="supplierName" />
<el-table-column label="当前库存" align="center" prop="storedQuantity"/>
<!-- <el-table-column label="入库前库存" align="center" prop="preInboundInventory"/>-->
<el-table-column label="油品密度(g/ml)" align="center" prop="productDensity">
<template slot-scope="scope">
<el-input-number :disabled="numberInput" v-model="scope.row.productDensity" @change="change(scope.row)" controls-position="right" :min="0" :max="10000000" :step="1" style="max-width: 100%"></el-input-number>
</template>
</el-table-column>
<el-table-column label="采购吨数(t)" align="center" prop="purchaseWeight">
<template slot-scope="scope">
<el-input-number :disabled="numberInput" v-model="scope.row.purchaseWeight" @change="change(scope.row)" controls-position="right" :min="0" :step="0.01" style="max-width: 100%"></el-input-number>
</template>
</el-table-column>
<el-table-column :disabled="numberInput" label="采购单价(元/吨)" align="center" prop="purchasePrice">
<template slot-scope="scope">
<el-input-number :disabled="numberInput" v-model="scope.row.purchasePrice" @change="change(scope.row)" controls-position="right" :min="0" :step="1" style="max-width: 100%"></el-input-number>
</template>
</el-table-column>
<el-table-column label="小计金额(元)" align="center" prop="totalAmount">
<template slot-scope="scope">
{{ scope.row.totalAmount }}
<!-- <el-input-number :disabled="numberInput" v-model="scope.row.totalAmount" @change="change(scope.row)" controls-position="right" :min="0" :max="10000000" :step="1" style="max-width: 100%"></el-input-number> -->
</template>
</el-table-column>
<el-table-column label="采购升数L" align="center" prop="purchaseVolume"/>
<el-table-column label="成本价(元/升)" align="center" prop="discountedPrice"/>
<el-table-column v-if="state =='await'" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="orderDel(scope.row)"
>删除</el-button>
</template>
<!-- v-hasPermi="['']"-->
<div style="height: 60vh;overflow: auto">
</el-table-column>
</el-table>
<el-table ref="tables"
v-loading="loading"
:data="orderList"
border
:default-sort="defaultSort">
<el-table-column label="油品油号" align="center" prop="numberName"/>
<el-table-column label="入库油罐" align="center" prop="tankName"/>
<el-table-column label="供应商" align="center" prop="supplierName"/>
<el-table-column label="当前库存" align="center" prop="storedQuantity"/>
<!-- <el-table-column label="入库前库存" align="center" prop="preInboundInventory"/>-->
<el-table-column label="油品密度(g/ml)" align="center" prop="productDensity">
<template slot-scope="scope">
<el-input-number :disabled="numberInput" v-model="scope.row.productDensity" @change="change(scope.row)"
controls-position="right" :min="0" :max="10000000" :step="1"
style="max-width: 100%"></el-input-number>
</template>
</el-table-column>
<el-table-column label="采购吨数(t)" align="center" prop="purchaseWeight">
<template slot-scope="scope">
<el-input-number :disabled="numberInput" v-model="scope.row.purchaseWeight" @change="change(scope.row)"
controls-position="right" :min="0" :step="0.01"
style="max-width: 100%"></el-input-number>
</template>
</el-table-column>
<el-table-column :disabled="numberInput" label="采购单价(元/吨)" align="center" prop="purchasePrice">
<template slot-scope="scope">
<el-input-number :disabled="numberInput" v-model="scope.row.purchasePrice" @change="change(scope.row)"
controls-position="right" :min="0" :step="1" style="max-width: 100%"></el-input-number>
</template>
</el-table-column>
<el-table-column label="小计金额(元)" align="center" prop="totalAmount">
<template slot-scope="scope">
{{ scope.row.totalAmount }}
<!-- <el-input-number :disabled="numberInput" v-model="scope.row.totalAmount" @change="change(scope.row)" controls-position="right" :min="0" :max="10000000" :step="1" style="max-width: 100%"></el-input-number> -->
</template>
</el-table-column>
<el-table-column label="采购升数L" align="center" prop="purchaseVolume"/>
<el-table-column label="成本价(元/升)" align="center" prop="discountedPrice"/>
<el-table-column v-if="state =='await'" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="orderDel(scope.row)"
>删除
</el-button>
</template>
<!-- v-hasPermi="['']"-->
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
@ -127,13 +140,14 @@
/>
</div>
<!-- 添加采购油品-->
<!-- 添加采购油品-->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="orderForm" :rules="rules" label-width="120px">
<el-row :gutter="24">
<el-col :span="22">
<el-form-item label="采购油品号" prop="numberId">
<el-select v-model="orderForm.numberId" placeholder="请选择油品" style="width:100%" @change="chooseOilNumber($event)">
<el-select v-model="orderForm.numberId" placeholder="请选择油品" style="width:100%"
@change="chooseOilNumber($event)">
<el-option
v-for="option in numberList"
:key="option.numberId"
@ -147,7 +161,8 @@
<el-row :gutter="24">
<el-col :span="22">
<el-form-item label="入库油罐" prop="tankId">
<el-select v-model="orderForm.tankId" placeholder="请选择油罐" style="width:100%" @change="chooseTank($event),getSecondName()">
<el-select v-model="orderForm.tankId" placeholder="请选择油罐" style="width:100%"
@change="chooseTank($event),getSecondName()">
<el-option
v-for="option in tankList"
:key="option.id"
@ -178,7 +193,7 @@
<el-row :gutter="24">
<el-col :span="22">
<el-form-item label="油品密度" prop="productDensity">
<el-input v-model="orderForm.productDensity" @input="aaa()" placeholder="请输入油品密度" >
<el-input v-model="orderForm.productDensity" @input="aaa()" placeholder="请输入油品密度">
<template slot="append">g/ml</template>
</el-input>
<el-alert
@ -203,7 +218,7 @@
<el-row :gutter="24">
<el-col :span="22">
<el-form-item label="采购单价" prop="purchasePrice">
<el-input v-model="orderForm.purchasePrice" placeholder="请输入采购单价" >
<el-input v-model="orderForm.purchasePrice" placeholder="请输入采购单价">
<template slot="append">/</template>
</el-input>
</el-form-item>
@ -220,10 +235,10 @@
</template>
<script>
import { getSuppliersListApi2 } from "@/api/oilConfig/oilSuppliers";
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
import {
editPurchuseApi,
getPurchaseOrderApi,unifiedProcessingApi,
getPurchaseOrderApi, unifiedProcessingApi,
insertPurchaseApi,
insertPurchaseOrderApi,
disposeBatchApi,
@ -250,8 +265,8 @@ export default {
}
};
return {
orderList:[],
orderForm:{
orderList: [],
orderForm: {
id: null,
purchaseId: null,
numberId: null,
@ -272,7 +287,7 @@ export default {
nowVolume: 0, //
canUseVolume: 0,//
canUseT: 0,//
unit:'L',//
unit: 'L',//
// tTitle:'',
@ -285,18 +300,18 @@ export default {
purchasedTonnage: 0, //
purchaseLiters: 0, //
totalAmountPurchased: 0, //
numberList:[],
tankList:[],
suppliersList:[],
numberList: [],
tankList: [],
suppliersList: [],
saveFlag:false,
auditFlag:true,
voidFlag:false,
storageFlag:true,
state:'',
saveFlag: false,
auditFlag: true,
voidFlag: false,
storageFlag: true,
state: '',
//
title:'',
title: '',
//
showSearch: true,
disableInput: false, //
@ -308,8 +323,8 @@ export default {
queryParams: {
supplierId: '',
purchaseId: null,
page:null,
pageSize:null
page: null,
pageSize: null
},
//
loading: false,
@ -325,20 +340,20 @@ export default {
//
rules: {
productDensity: [
{ required: true, validator:valiNumberPass, trigger: "blur" }
{required: true, validator: valiNumberPass, trigger: "blur"}
],
purchaseWeight: [
{ required: true, validator:valiNumberPass, trigger: "blur" },
{required: true, validator: valiNumberPass, trigger: "blur"},
],
purchasePrice: [
{ required: true, validator:valiNumberPass, trigger: "blur" }
{required: true, validator: valiNumberPass, trigger: "blur"}
],
numberId: [
{required: true, message: "请选择采购油品", trigger: "blur"}
],
tankId: [
{required: true, message: "请选择油罐", trigger: "blur"}
] ,
],
supplierId: [
{required: true, message: "请选择供应商", trigger: "blur"}
]
@ -366,26 +381,26 @@ export default {
if (this.$route.query.purchaseId != null) {
this.queryParams.purchaseId = this.$route.query.purchaseId;
this.purchaseId = this.$route.query.purchaseId;
}else if (this.$route.query.purchaseId == null && this.purchaseId>0) {
} else if (this.$route.query.purchaseId == null && this.purchaseId > 0) {
}else {
} else {
// this.queryParams.purchaseId = -parseInt(new Date().getTime())% 100000000;
// this.purchaseId = -parseInt(new Date().getTime()) % 100000000;
}
this.state = this.$route.query.state;
if ( this.state == null) {
if (this.state == null) {
this.state = 'await'
}
if (this.state=='await') {
if (this.state == 'await') {
this.numberInput = false
}else {
} else {
this.numberInput = true
}
console.log(this.state, 388)
// this.purchaseForm.purchaseDate = localDate;
// console.log("this.purchaseForm.purchaseDate:", this.purchaseForm.purchaseDate);
@ -393,7 +408,7 @@ export default {
this.purchaseForm.purchaseDate = new Date(parseInt(this.$route.query.purchaseDate))
}
console.log("this.purchaseForm.purchaseDate",this.purchaseForm.purchaseDate)
console.log("this.purchaseForm.purchaseDate", this.purchaseForm.purchaseDate)
if (this.purchaseForm.purchaseDate == null) {
this.purchaseForm.purchaseDate = new Date()
}
@ -411,21 +426,21 @@ export default {
},
computed: {
tTitle() {
return "油罐总容量"+this.tankVolume+' '+this.unit+",当前密度下可用约"+this.canUseT+"吨"
return "油罐总容量" + this.tankVolume + ' ' + this.unit + ",当前密度下可用约" + this.canUseT + "吨"
}
},
methods: {
//
cancelPurchase(){
cancelPurchase() {
this.$router.back()
},
aaa() {
this.densityCalculations()
this.$forceUpdate();
console.log(" orderForm.productDensity()\n",this.orderForm.productDensity)
console.log(" orderForm.productDensity()\n", this.orderForm.productDensity)
},
getList(){
getList() {
this.loading = true;
getPurchaseOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.orderList = response.data.records;
@ -450,21 +465,21 @@ export default {
},
orderDel(data) {
if (data.id != null) {
delPurchaseOrderApi(data).then(res=>{
delPurchaseOrderApi(data).then(res => {
})
}
const index = this.orderList.indexOf(data); //
if (index !== -1) {
this.orderList.splice(index, 1); // 使splice
}
// this.numberOfTanks = this.numberOfTanks-1
// this.numberOfTanks = this.numberOfTanks-1
// delPurchaseOrderApi(data).then(response => {
// this.$modal.msgSuccess("");
// this.getList()
// })
},
//
submitForm: function() {
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
//
@ -481,9 +496,9 @@ export default {
let numberName = this.numberList.find(item => item.numberId === this.orderForm.numberId);
let tankName = this.tankList.find(item => item.id === this.orderForm.tankId);
let tankName = this.tankList.find(item => item.id === this.orderForm.tankId);
let supplierName = this.suppliersList.find(item => item.id === this.orderForm.supplierId);
console.log("numberName",numberName)
console.log("numberName", numberName)
//
let isDuplicate = false
if (this.orderList.length > 0) {
@ -501,7 +516,7 @@ export default {
"discountedPrice": this.orderForm.discountedPrice,
// "id": 47,
"numberId": this.orderForm.numberId,
"numberName": numberName.oilType +' '+numberName.oilName,
"numberName": numberName.oilType + ' ' + numberName.oilName,
"oilName": numberName.oilName,
"oilType": numberName.oilType,
// "preInboundInventory": null,
@ -522,7 +537,6 @@ export default {
}
this.orderList.push(addFrom)
this.open = false;
this.sumMethod(this.orderList)
@ -570,7 +584,6 @@ export default {
this.sumMethod(this.orderList)
//
// this.orderForm = data
// this.edit()
@ -586,15 +599,15 @@ export default {
//
chooseOilNumber(data) {
this.orderForm.tankId = '',
this.selectTankByNumber(this.orderForm.numberId);
this.selectTankByNumber(this.orderForm.numberId);
},
//
chooseTank(data){
chooseTank(data) {
// id
this.tankList.forEach(su=>{
this.tankList.forEach(su => {
if (data == su.id) {
this.orderForm.productDensity = su.oilDensity
console.log("su",su)
console.log("su", su)
this.tankVolume = su.tankVolume
this.nowVolume = su.storedQuantity
this.unit = su.unit
@ -607,7 +620,7 @@ export default {
this.canUseVolume = this.tankVolume - this.nowVolume
//
const volumeLiters = new BigNumber(this.canUseVolume); //
const densityGramsPerML = new BigNumber(this.orderForm.productDensity?this.orderForm.productDensity:0); // /
const densityGramsPerML = new BigNumber(this.orderForm.productDensity ? this.orderForm.productDensity : 0); // /
//
@ -615,7 +628,7 @@ export default {
const massTons = Math.floor(volumeLiters.times(densityGramsPerML).times(1e-3) * 100) / 100;
this.canUseT = massTons; //
console.log("canUseT",this.canUseT)
console.log("canUseT", this.canUseT)
},
inputPurchaseWeight() {
@ -631,20 +644,20 @@ export default {
const purchaseWeight = parseFloat(this.orderForm.purchaseWeight);
const canUseT = parseFloat(this.canUseT);
console.log("purchaseWeight",purchaseWeight)
console.log("canUseT",canUseT)
if (canUseT<=0) {
console.log("purchaseWeight", purchaseWeight)
console.log("canUseT", canUseT)
if (canUseT <= 0) {
this.$message('已无可用吨数!');
this.orderForm.purchaseWeight = ''
return
}else if (purchaseWeight>canUseT) {
} else if (purchaseWeight > canUseT) {
this.orderForm.purchaseWeight = canUseT
}
},
//
getOilNameList() {
let this_=this
getOilNameListApi().then( response => {
let this_ = this
getOilNameListApi().then(response => {
let list = response.data
this_.numberList = list
});
@ -669,25 +682,25 @@ export default {
var max = 999; // 9999
var randomFourDigitNumber = Math.floor(Math.random() * (max - min + 1)) + min;
// this.purchaseOrderNumber = timestamp+randomFourDigitNumber.toString();
this.purchaseForm.purchaseNo = timestamp+randomFourDigitNumber.toString();
this.purchaseForm.purchaseNo = timestamp + randomFourDigitNumber.toString();
},
//
sumMethod(data) {
this.purchasedTonnage= new BigNumber(0),
this.purchaseLiters= new BigNumber(0),
this.totalAmountPurchased= new BigNumber(0),
data.forEach(da => {
this.purchasedTonnage = this.purchasedTonnage.plus(da.purchaseWeight);
this.purchaseLiters = this.purchaseLiters.plus(da.purchaseVolume);
this.totalAmountPurchased = this.totalAmountPurchased.plus(da.totalAmount);
})
this.purchasedTonnage = new BigNumber(0),
this.purchaseLiters = new BigNumber(0),
this.totalAmountPurchased = new BigNumber(0),
data.forEach(da => {
this.purchasedTonnage = this.purchasedTonnage.plus(da.purchaseWeight);
this.purchaseLiters = this.purchaseLiters.plus(da.purchaseVolume);
this.totalAmountPurchased = this.totalAmountPurchased.plus(da.totalAmount);
})
},
//
async savePurchase(flag){
async savePurchase(flag) {
if (this.purchaseForm.purchaseNo == null) {
this.$modal.msgWarning("请先选择进货单号");
return -1;
}else if (this.purchaseForm.purchaseDate==null) {
} else if (this.purchaseForm.purchaseDate == null) {
this.$modal.msgWarning("请先选择进货时间");
return -1;
}
@ -697,22 +710,21 @@ export default {
}
let from = {
id:this.purchaseId,
purchaseNo : this.purchaseForm.purchaseNo,
purchaseDate : this.purchaseForm.purchaseDate,
theDocumentAmount : this.totalAmountPurchased,
id: this.purchaseId,
purchaseNo: this.purchaseForm.purchaseNo,
purchaseDate: this.purchaseForm.purchaseDate,
theDocumentAmount: this.totalAmountPurchased,
}
await unifiedProcessingApi({oilPurchase:from,oilPurchaseOrders:this.orderList}).then(res=>{
await unifiedProcessingApi({oilPurchase: from, oilPurchaseOrders: this.orderList}).then(res => {
if (res.code === 200) {
this.purchaseId = res.data.id
this.$router.push({ path: '/oilConfig/oilPurchase/list'});
}else {
this.$router.push({path: '/oilConfig/oilPurchase/list'});
} else {
return -1;
}
}).catch({
})
}).catch({})
// if(this.purchaseId != null) {
// //
@ -788,59 +800,59 @@ export default {
// }
},
//
saveJudgment(){
saveJudgment() {
// if (this.purchaseForm.purchaseNo != null && this.purchaseForm.purchaseDate != null && this.orderList.length > 0) {
// this.saveFlag = false;
// }
},
//
async JudgmentButton(){
async JudgmentButton() {
let judgmentPermissions1 = await this.judgmentPermissions("进油审核");
if (judgmentPermissions1 > 0){
this.auditFlag=false
}else {
this.auditFlag=true
if (judgmentPermissions1 > 0) {
this.auditFlag = false
} else {
this.auditFlag = true
}
let judgmentPermissions2 = await this.judgmentPermissions("进油入库");
if (judgmentPermissions2 > 0){
if (judgmentPermissions2 > 0) {
this.storageFlag = false
}else {
this.storageFlag=true
} else {
this.storageFlag = true
}
let judgmentPermissions3 = await this.judgmentPermissions("进油废止");
if (judgmentPermissions3 > 0){
this.voidFlag=false
}else {
this.voidFlag=true
if (judgmentPermissions3 > 0) {
this.voidFlag = false
} else {
this.voidFlag = true
}
},
//
async judgmentPermissions(data) {
let fil ={
auditPrem:data
}
return await getAuditPremApi(fil).then(res => {
let fil = {
auditPrem: data
}
return await getAuditPremApi(fil).then(res => {
return res.data
});
},
//
async audit(){
async audit() {
//
let number = await this.savePurchase(-1);
if (number != -1) {
//
let fil ={
let fil = {
id: this.purchaseId
}
console.log(" id: this.purchaseId",fil)
console.log(" id: this.purchaseId", fil)
await auditApi(fil).then(res => {
if (res.data) {
this.state = 'ysh'
this.numberInput= true
this.numberInput = true
this.$modal.msgWarning("审核成功");
this.$router.push('/oilConfig/oilPurchase/list');
}else {
} else {
this.$modal.msgWarning("暂无审核权限");
}
@ -853,7 +865,7 @@ export default {
if (this.purchaseForm.purchaseNo == null) {
this.$modal.msgWarning("请先选择进货单号");
return;
}else if (this.purchaseForm.purchaseDate==null) {
} else if (this.purchaseForm.purchaseDate == null) {
this.$modal.msgWarning("请先选择进货时间");
return;
}
@ -863,14 +875,14 @@ export default {
type: 'warning'
}).then(() => {
//
let fil ={
let fil = {
id: this.purchaseId
}
storageApi(fil).then(res => {
if (res.data) {
this.state = 'qrts'
this.$modal.msgWarning("入库成功");
this.numberInput= true
this.numberInput = true
this.$router.push('/oilConfig/oilPurchase/list');
@ -887,11 +899,9 @@ export default {
});
},
//
abolition(){
abolition() {
if (this.purchaseId < 0) {
this.$modal.msgWarning("数据未保存,不可废弃");
return;
@ -903,16 +913,16 @@ export default {
type: 'warning'
}).then(() => {
//
let fil ={
let fil = {
id: this.purchaseId
}
abolitionApi(fil).then(res => {
if (res.data) {
this.state = 'yzf'
this.$modal.msgWarning("审核废弃");
this.numberInput= true
this.numberInput = true
this.$router.push('/oilConfig/oilPurchase/list');
}else {
} else {
this.$modal.msgWarning("暂无废弃权限");
}
})
@ -935,7 +945,7 @@ export default {
this.getList();
},
getSecondName(){
getSecondName() {
this.$forceUpdate();
}
}
@ -943,26 +953,27 @@ export default {
</script>
<style scoped lang="scss">
.app-container{
.app-container {
width: 100%;
height: 100%;
background: #f6f8f9;
margin: 0px 0px 0px 0px;
padding: 0px;
}
.box {
height: 80%;
width: 212px;
margin-right: 10px;
background: #FFFFFF;
border: 1px solid #FF9655;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: start;
padding-left: 20px;
}
.box {
height: 80%;
width: 212px;
margin-right: 10px;
background: #FFFFFF;
border: 1px solid #FF9655;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: start;
padding-left: 20px;
}
</style>

View File

@ -444,7 +444,7 @@ public class FyPayServiceImpl implements FyPayService {
merchantConfigRecordService.insertMerchantConfigRecord(merchantConfigRecord);
}
//推荐会员充值有礼
activeRecommendRecordsService.recommendMembersRechargePolite(allOrderInfo.getStoreId(), allOrderInfo.getUserId(), allOrderInfo.getPayType());
if (ObjectUtil.isNotEmpty(allOrderInfo.getUserId())) activeRecommendRecordsService.recommendMembersRechargePolite(allOrderInfo.getStoreId(), allOrderInfo.getUserId(), allOrderInfo.getPayType());
}else {
//查询总订单
AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);

View File

@ -120,7 +120,7 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
queryWrapper.eq("rule_config_id",ruleConfigId);
List<OilConfig> list = baseMapper.selectList(queryWrapper);
for (OilConfig oilConfig : list) {
if (oilConfig.getTransactionType().contains(transactionType)){
if (ObjectUtil.isNotEmpty(oilConfig.getTransactionType()) && ObjectUtil.isNotEmpty(transactionType) && oilConfig.getTransactionType().contains(transactionType)){
if (transactionType.equals("4")){
String[] split = oilConfig.getOilGunId().split(",");
for (String id : split) {

View File

@ -59,6 +59,10 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
* 优惠金额
*/
private Double discountAmount;
/**
* 找零金额
*/
private Double seekZero;
/**
* 支付时间
*/

View File

@ -727,7 +727,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
}
} else {
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");
this.insertAllOrderInfo(orderNo, storeId, oilAmount + goodsAmount, payAmount, oilDiscount, payType, userId, "PC", "6", "paid",seekZero);
// 添加车队卡订单信息
if (payType.equals("car_card_value") && ObjectUtil.isNotEmpty(fleetMember)) this.addFleetOrder(orderNo,fleetMember);
@ -1123,7 +1123,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setSeekZero(0.0);
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, 0.0, map.get("payType"), userId, "PC", "1", status);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, 0.0, map.get("payType"), userId, "PC", "1", status,0.0);
if (ObjectUtil.isNotEmpty(map.get("staffId")))
staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")), storeId, oilAmount, oilAmount, "1", orderNo);
res.put("success", "success");
@ -1194,7 +1194,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder);
this.updateGrowthValue1(oilAmount, oilAmount, userId, Integer.valueOf(oilOrder.getOils()), 0.0, storeId, orderNo);
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, map.get("payType"), userId, "PC", "1", "paid");
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, map.get("payType"), userId, "PC", "1", "paid",0.0);
if (ObjectUtil.isNotEmpty(map.get("staffId")))
staffCommissionService.countStaffCommission(Integer.valueOf(map.get("staffId")), storeId, oilAmount, oilAmount, "1", orderNo);
res.put("success", "success");
@ -1309,7 +1309,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
cashierOrder.setSeekZero(0.0);
cashierOrder.setPayType(map.get("payType"));
cashierOrderService.insertCashierOrder(cashierOrder);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, 0.0, map.get("payType"), userId, "PC", "1", "paid");
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, 0.0, map.get("payType"), userId, "PC", "1", "paid",0.0);
staffCommissionService.countStaffCommission(accountInfo.getStaffId(), storeId, oilAmount, oilAmount, "1", orderNo);
res.put("success", "success");
@ -1377,7 +1377,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
baseMapper.insert(oilOrders);
this.updateGrowthValue1(oilAmount, 0.0, userId, Integer.valueOf(oilOrders.getOils()), 0.0, storeId, orderNo);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, oilAmount - lockupAmount, oilOrders.getPayType(), userId, "POS", "1", status);
this.insertAllOrderInfo(orderNo, storeId, oilAmount, oilAmount, oilAmount - lockupAmount, oilOrders.getPayType(), userId, "POS", "1", status,0.0);
staffCommissionService.countStaffCommission(accountInfo.getStaffId(), storeId, oilAmount, oilAmount, "1", orderNo);
res.put("success", "success");
} else {
@ -1385,7 +1385,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
oilOrders.setOrderStatus(status);
baseMapper.insert(oilOrders);
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, oilOrders.getPayType(), userId, "POS", "1", "payFail");
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, oilOrders.getPayType(), userId, "POS", "1", "payFail",0.0);
res.put("error", "储值卡余额不足!");
}
@ -1401,13 +1401,13 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
OilOrder oilOrder = this.selectOilOrderByOrderNo(orderNo);
this.updateGrowthValue1(oilAmount, oilAmount, userId, Integer.valueOf(oilOrder.getOils()), 0.0, storeId, orderNo);
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, oilOrders.getPayType(), userId, "POS", "1", "paid");
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, oilOrders.getPayType(), userId, "POS", "1", "paid",0.0);
staffCommissionService.countStaffCommission(accountInfo.getStaffId(), storeId, oilAmount, oilAmount, "1", orderNo);
res.put("success", "success");
} else {
oilOrders.setOrderStatus("payFail");
baseMapper.insert(oilOrders);
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, oilOrders.getPayType(), userId, "POS", "1", "payFail");
this.insertAllOrderInfo(orderNo, accountInfo.getStoreId(), oilAmount, oilAmount, 0.0, oilOrders.getPayType(), userId, "POS", "1", "payFail",0.0);
res.put("error", "储值卡余额不足!");
}
}
@ -1419,7 +1419,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
/**
* 添加所有订单信息
*/
private void insertAllOrderInfo(String orderNo, Integer storeId, Double goodsMoney, Double payAmount, Double discountAmount, String payType, Integer userId, String payChannel, String type, String status) {
private void insertAllOrderInfo(String orderNo, Integer storeId, Double goodsMoney, Double payAmount, Double discountAmount, String payType, Integer userId, String payChannel, String type, String status,Double seekZero) {
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(orderNo);
allOrderInfo.setType(type);
@ -1578,7 +1578,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
userId = userVo.getId();
if (!isUseChild.equals("yes")) {
applet.put("error", "不可使用子卡消费!");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail",0.0);
result = true;
}
}
@ -1589,7 +1589,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
if (balanceAmount.equals("0") && map.get("payAmount").equals("0")) {
if (Double.compare(oilCardLiters, oilOrder.getOilNum()) != 0) {
applet.put("error", "囤油卡消费升数不对!");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail",0.0);
result = true;
}
} else {
@ -1597,7 +1597,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
Double residueAmount = useLiters * oilNumber.getOilPrice();
if ((Double.valueOf(map.get("payAmount")) + Double.valueOf(balanceAmount) - residueAmount) >= 0.05) {
applet.put("error", "消费总金额不对!");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail",0.0);
result = true;
}
}
@ -1607,7 +1607,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
Double realAmount = Double.valueOf(map.get("payAmount")) + Double.valueOf(balanceAmount) + Double.valueOf(map.get("discountAmount"));
if (-0.03 >= (realAmount - oilOrder.getOrderAmount()) && (realAmount - oilOrder.getOrderAmount()) >= 0.03) {
applet.put("error", "消费总金额不对!");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), 0.0, oilOrder.getDiscountAmount(), oilOrder.getPayType(), userId, oilOrder.getPayType(), "1", "payFail",0.0);
result = true;
}
}
@ -1658,7 +1658,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
this.updateGrowthValue(oilOrder.getOrderAmount(), payAmount, userId, Integer.valueOf(oilOrder.getOils()), oilOrder.getStoreId(), orderNo);
this.addOilTracks(oilOrder, oilOrder.getStoreId());
this.insertCardOrder(oilOrder.getUserId(), oilOrder.getStoreId(), orderNo, oilOrder.getOrderAmount(), "paid", Double.valueOf(balanceAmount), payAmount);
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), payAmount, Double.valueOf(discountAmount), oilOrder.getPayType(), oilOrder.getUserId(), "applet", "1", "paid");
this.insertAllOrderInfo(orderNo, oilOrder.getStoreId(), oilOrder.getOrderAmount(), payAmount, Double.valueOf(discountAmount), oilOrder.getPayType(), oilOrder.getUserId(), "applet", "1", "paid",0.0);
this.insertCardBalance(Double.valueOf(balanceAmount), userId, oilOrder.getStoreId(), orderNo);
if (ObjectUtil.isNotEmpty(oilOrder.getStaffId()))
staffCommissionService.countStaffCommission(oilOrder.getStaffId(), oilOrder.getStoreId(), oilOrder.getOrderAmount(), oilOrder.getOrderAmount(), "1", orderNo);
@ -2259,7 +2259,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
staffCommissionService.countStaffCommission(nowAccountInfo.getStaffId(), nowAccountInfo.getStoreId(), oilOrderVo.getOrderAmount(), oilOrderVo.getPayAmount(), "1", orderNo);
this.addOilTracks(oilOrderVo, nowAccountInfo.getStoreId());
this.updateCardAndActiveById(nowAccountInfo.getStoreId(), oilOrderVo.getUserId(), oilOrderVo.getId());
this.insertAllOrderInfo(orderNo, nowAccountInfo.getStoreId(), oilOrderVo.getOrderAmount(), oilOrderVo.getPayAmount(), oilOrderVo.getDiscountAmount(), oilOrderVo.getPayType(), oilOrderVo.getUserId(), "POS", "1", "paid");
this.insertAllOrderInfo(orderNo, nowAccountInfo.getStoreId(), oilOrderVo.getOrderAmount(), oilOrderVo.getPayAmount(), oilOrderVo.getDiscountAmount(), oilOrderVo.getPayType(), oilOrderVo.getUserId(), "POS", "1", "paid",0.0);
this.insertFavorable(oilOrderVo, oilOrderVo.getOilCardAmount1());
if (ObjectUtil.isNotEmpty(oilOrderVo.getUserId())) integralSettingsService.refuelPoints(oilOrderVo);
//修改优惠券使用状态

View File

@ -53,7 +53,7 @@ public class OilInventoryController extends BaseController {
@GetMapping("getListPage")
public ResponseObject getListPage(@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("oilInventory") OilInventory oilInventory) {
@Param("oilInventory") OilInventoryVO oilInventory) {
Page page =new Page(pageNo,pageSize);
IPage<OilInventoryVO> oilInventoryIPage = this.oilInventoryService.getListPage(page, oilInventory);
return getSuccessResult(oilInventoryIPage);

View File

@ -34,7 +34,7 @@ public interface OilInventoryMapper {
*/
IPage<OilInventory> queryAllByLimit(@Param("page") Page page, @Param("oilInventory") OilInventory oilInventory);
IPage<OilInventoryVO> getListPage(@Param("page") Page page, @Param("oilInventory") OilInventory oilInventory);
IPage<OilInventoryVO> getListPage(@Param("page") Page page, @Param("oilInventory") OilInventoryVO oilInventory);
/**
* 统计总行数

View File

@ -164,6 +164,9 @@
<if test="oilInventory.inventoryNumber != null and oilInventory.inventoryNumber != ''">
and op.inventory_number LIKE CONCAT('%', #{oilInventory.inventoryNumber}, '%')
</if>
<if test="oilInventory.tankId != null and oilInventory.tankId != ''">
and opo.tank_id LIKE CONCAT('%', #{oilInventory.tankId}, '%')
</if>
<if test="oilInventory.params.beginTime != null and oilInventory.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(op.create_time,'%y%m%d') &gt;= date_format(#{oilInventory.params.beginTime},'%y%m%d')
</if>

View File

@ -32,7 +32,7 @@ public interface OilInventoryService {
*/
IPage<OilInventory> queryByPage(@Param("page") Page page, @Param("oilInventory") OilInventory oilInventory);
IPage<OilInventoryVO> getListPage(@Param("page") Page page, @Param("oilInventory") OilInventory oilInventory);
IPage<OilInventoryVO> getListPage(@Param("page") Page page, @Param("oilInventory") OilInventoryVO oilInventory);
/**
* 新增数据

View File

@ -62,7 +62,7 @@ public class OilInventoryServiceImpl implements OilInventoryService {
@Override
public IPage<OilInventoryVO> getListPage(@Param("page") Page page, @Param("oilInventory") OilInventory oilInventory) {
public IPage<OilInventoryVO> getListPage(@Param("page") Page page, @Param("oilInventory") OilInventoryVO oilInventory) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilInventory.setStoreId(nowAccountInfo.getStoreId());

View File

@ -1377,14 +1377,14 @@ export default {
this.$modal.msgError("请输入正确的金额");
return;
}
//
this.payForm.seekZero = this.getChangeShould
}
if (!this.payForm.authCode && ((+this.oilActualPay) + (+this.goodsActualPay)) > 0) {
this.$modal.msgError("请先扫码");
return;
}
//
this.payForm.seekZero = this.getChangeShould
this.loading = true;
let _this = this;