10.28
This commit is contained in:
parent
d9a0ff3125
commit
45757fd59d
@ -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">
|
||||
<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"
|
||||
@ -36,20 +45,22 @@
|
||||
<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>
|
||||
|
||||
<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="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"/>
|
||||
@ -57,10 +68,10 @@
|
||||
<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 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>
|
||||
@ -88,20 +99,28 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.status == 'ysh'"
|
||||
@click="dispose(scope.row)"
|
||||
>{{ scope.row.status == 'qrts'?'查看单据':'处理单据' }}
|
||||
>盘点入库
|
||||
</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>
|
||||
<!-- <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"
|
||||
:total="total"
|
||||
@ -116,7 +135,7 @@
|
||||
<script>
|
||||
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
|
||||
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
|
||||
import {delInventoryApi, getInventoryApi} from "@/api/oilConfig/oilInventory";
|
||||
import {delInventoryApi, getInventoryApi, selectList2Api} from "@/api/oilConfig/oilInventory";
|
||||
import {getName, parseTime} from "../../../utils/fuint";
|
||||
|
||||
export default {
|
||||
@ -139,7 +158,7 @@ export default {
|
||||
open: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
|
||||
tankList: [],
|
||||
// dateRange: '',
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
@ -166,9 +185,16 @@ export default {
|
||||
|
||||
async created() {
|
||||
await this.getList();
|
||||
this.getTankList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 油罐列表
|
||||
getTankList() {
|
||||
selectList2Api().then(response => {
|
||||
this.tankList = response.data
|
||||
})
|
||||
},
|
||||
// 获取列表
|
||||
getList() {
|
||||
let dateRange = []
|
||||
@ -233,6 +259,7 @@ export default {
|
||||
height: 100%;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
|
||||
.el-form--inline .el-form-item {
|
||||
margin-right: 44px;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -8,20 +8,23 @@
|
||||
<div class="box">
|
||||
<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="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="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>
|
||||
@ -47,9 +50,10 @@
|
||||
</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'-->
|
||||
@ -67,10 +71,12 @@
|
||||
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>
|
||||
<div style="height: 60vh;overflow: auto">
|
||||
|
||||
<el-table ref="tables"
|
||||
v-loading="loading"
|
||||
:data="orderList"
|
||||
@ -83,17 +89,22 @@
|
||||
<!-- <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>
|
||||
<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>
|
||||
<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>
|
||||
<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">
|
||||
@ -111,13 +122,15 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="orderDel(scope.row)"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- v-hasPermi="['']"-->
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -133,7 +146,8 @@
|
||||
<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"
|
||||
@ -385,7 +400,7 @@ export default {
|
||||
this.numberInput = true
|
||||
}
|
||||
|
||||
|
||||
console.log(this.state, 388)
|
||||
|
||||
// this.purchaseForm.purchaseDate = localDate;
|
||||
// console.log("this.purchaseForm.purchaseDate:", this.purchaseForm.purchaseDate);
|
||||
@ -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()
|
||||
@ -711,8 +724,7 @@ export default {
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}).catch({
|
||||
})
|
||||
}).catch({})
|
||||
|
||||
// if(this.purchaseId != null) {
|
||||
// // 修改
|
||||
@ -887,8 +899,6 @@ export default {
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
// 作废
|
||||
abolition() {
|
||||
@ -950,6 +960,7 @@ export default {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.box {
|
||||
height: 80%;
|
||||
width: 212px;
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -59,6 +59,10 @@ public class AllOrderInfo extends BaseEntity implements Serializable {
|
||||
* 优惠金额
|
||||
*/
|
||||
private Double discountAmount;
|
||||
/**
|
||||
* 找零金额
|
||||
*/
|
||||
private Double seekZero;
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
|
@ -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);
|
||||
//修改优惠券使用状态
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
|
@ -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') >= date_format(#{oilInventory.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
|
@ -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);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user