no message
This commit is contained in:
parent
e5a24d3c83
commit
6f6988b8b2
@ -100,6 +100,15 @@ export function selectList2Api(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询油罐信息
|
||||
export function getPurchaseByTankIdApi(data) {
|
||||
return request({
|
||||
url: 'business/petrolStationManagement/oilInventoryOrder/getPurchaseByTankId',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除有关信息
|
||||
export function delInventoryOrderApi(data) {
|
||||
return request({
|
||||
|
@ -120,7 +120,7 @@
|
||||
<el-table-column label="油品名称" align="center" prop="numberName"/>
|
||||
<el-table-column label="当前均进价" align="center" prop="currentAveragePrice" />
|
||||
<el-table-column label="当前库存升数(L)" align="center" prop="currentInventoryVolume"/>
|
||||
<el-table-column label="盘点升数(L)" align="center" prop="inventoryVolume">
|
||||
<el-table-column label="盘点升数(L)" align="center" prop="inventoryVolume" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :disabled="numberInput" v-model="scope.row.inventoryVolume" @change="change(scope.row)" controls-position="right" :min="0" :max="100000000" :step="1" :precision="2" style="max-width: 100%"></el-input-number>
|
||||
</template>
|
||||
@ -221,7 +221,12 @@ import {
|
||||
updateInventoryOrderApi,
|
||||
updateInventoryApi,
|
||||
selectList2Api,
|
||||
insertBatchInventoryOrderApi, getInventoryByIdApi, disposeBatchApi, delInventoryOrderApi, abolitionInventoryApi
|
||||
insertBatchInventoryOrderApi,
|
||||
getInventoryByIdApi,
|
||||
disposeBatchApi,
|
||||
delInventoryOrderApi,
|
||||
abolitionInventoryApi,
|
||||
getPurchaseByTankIdApi
|
||||
} from "@/api/oilConfig/oilInventory";
|
||||
import {getOilNameListApi} from "@/api/oilPrice";
|
||||
import {selectTankByNumberApi} from "@/api/oilConfig/oilGuns";
|
||||
@ -455,12 +460,15 @@ export default {
|
||||
// this.selectSuppliers()
|
||||
},
|
||||
// 添加油罐到订单列表
|
||||
addOrder () {
|
||||
async addOrder () {
|
||||
|
||||
let this_ = this
|
||||
// 油罐列表清除数据
|
||||
this_.tankList = []
|
||||
this_.tankForm = {}
|
||||
this.multipleSelection.forEach(mul=>{
|
||||
for (const mul of this.multipleSelection) {
|
||||
|
||||
// this.multipleSelection.forEach(mul=>{
|
||||
let isDuplicate = false
|
||||
if (this.orderList.length > 0) {
|
||||
isDuplicate = this.orderList.some(order => order.tankId === mul.id);
|
||||
@ -474,6 +482,12 @@ export default {
|
||||
this.multipleSelection = []
|
||||
return;
|
||||
}
|
||||
let getPurchaseByTankIdData
|
||||
// 根据油罐id查询数据
|
||||
await getPurchaseByTankIdApi({tankId:mul.id}).then(res=>{
|
||||
getPurchaseByTankIdData = res.data
|
||||
})
|
||||
|
||||
|
||||
let now = {
|
||||
tankId: mul.id,
|
||||
@ -482,10 +496,20 @@ export default {
|
||||
numberName: mul.oilNumber,
|
||||
inventoryVolume:mul.storedQuantity,
|
||||
currentAveragePrice: mul.discountedPrice,
|
||||
currentInventoryVolume: mul.storedQuantity
|
||||
currentInventoryVolume: mul.storedQuantity,
|
||||
|
||||
theTotalPurchasePrice:getPurchaseByTankIdData.theTotalPurchasePrice, // 采购总价
|
||||
theAmountOfOilPurchased:getPurchaseByTankIdData.theAmountOfOilPurchased, // 采购油量
|
||||
purchaseUnitPrice:getPurchaseByTankIdData.purchaseUnitPrice, // 采购单价
|
||||
totalOilVolumeSold:getPurchaseByTankIdData.totalOilVolumeSold, // 销售总油量
|
||||
theTotalSalePrice:getPurchaseByTankIdData.theTotalSalePrice, // 销售总价
|
||||
totalPrice:getPurchaseByTankIdData.purchaseUnitPrice*getPurchaseByTankIdData.totalOilVolumeSold // 当前剩余油量总价
|
||||
}
|
||||
|
||||
|
||||
this_.orderList.push(now)
|
||||
})
|
||||
// })
|
||||
}
|
||||
this.multipleSelection = []
|
||||
|
||||
this_.open = false
|
||||
|
@ -245,8 +245,6 @@ export default {
|
||||
numberId: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
createBy: '',
|
||||
updateBy: '',
|
||||
unit:''
|
||||
},
|
||||
disableInput: false, // 默认不禁用
|
||||
@ -429,8 +427,6 @@ export default {
|
||||
numberId: null,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
createBy: '',
|
||||
updateBy: '',
|
||||
unit:''
|
||||
}
|
||||
},
|
||||
|
@ -209,6 +209,7 @@
|
||||
<el-date-picker
|
||||
v-model="timeFrame"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
@ -280,6 +281,7 @@
|
||||
<el-form-item label="时间范围">
|
||||
<el-date-picker
|
||||
v-model="timeFrame"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
@ -315,6 +317,8 @@
|
||||
<el-date-picker
|
||||
v-model="timeFrame"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
@ -1340,7 +1344,7 @@ export default {
|
||||
|
||||
|
||||
.el-tree-node.is-current > .el-tree-node__content {
|
||||
background-color: rgb(64, 158, 255) !important;
|
||||
background-color: rgb(201, 227, 255) !important;
|
||||
}
|
||||
|
||||
.app-container{
|
||||
|
@ -151,9 +151,9 @@
|
||||
and mg.supplier_id = #{mtPurchase.supplierId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY create_time DESC
|
||||
GROUP BY
|
||||
mp.id
|
||||
ORDER BY
|
||||
ORDER BY mp.create_time DESC
|
||||
</select>
|
||||
<select id="getPurcaseList" resultType="com.fuint.business.convenienceSore.vo.MtPurchaseVO">
|
||||
|
||||
|
@ -192,7 +192,7 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper,AllO
|
||||
throw new RuntimeException("该订单类型不支持退款!");
|
||||
}
|
||||
boolean flag = false;
|
||||
if (!"CASH".equals(allOrderInfo.getPayType())) {
|
||||
if (!"CASH".equals(allOrderInfo.getPayType()) ) {
|
||||
try {
|
||||
refund = fyPayService.refund(map);
|
||||
} catch (Exception e) {
|
||||
|
@ -55,6 +55,11 @@ public class OilInventoryOrderController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("getPurchaseByTankId")
|
||||
public ResponseObject getPurchaseByTankId(Integer tankId) {
|
||||
return getSuccessResult(oilInventoryOrderService.getPurchaseByTankId(tankId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
|
@ -36,6 +36,8 @@ public interface OilInventoryOrderService {
|
||||
|
||||
IPage<OilInventoryOrderVO> getListPage(@Param("page") Page page, @Param("oilInventoryOrder") OilInventoryOrder oilInventoryOrder);
|
||||
|
||||
|
||||
OilInventoryOrderVO getPurchaseByTankId(Integer tankId);
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -107,7 +107,7 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
||||
}
|
||||
|
||||
Date time = new Date();
|
||||
// 获取进货数据
|
||||
// 获取进货数据 本次盘点上次的
|
||||
OilPurchaseOrder oilInletRecords = oilPurchaseOrderService.getOilInletRecords(record.getTankId());
|
||||
if (!ObjectUtil.isEmpty(oilInletRecords)) {
|
||||
time = oilInletRecords.getUpdateTime();
|
||||
@ -125,6 +125,40 @@ public class OilInventoryOrderServiceImpl implements OilInventoryOrderService {
|
||||
return listPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据油罐id获取
|
||||
* 获取进货数据
|
||||
* 获取销售信息
|
||||
* 获取所有油罐的当前均进价
|
||||
* @return
|
||||
*/
|
||||
public OilInventoryOrderVO getPurchaseByTankId(Integer tankId) {
|
||||
OilInventoryOrderVO oilInventoryOrderVO = new OilInventoryOrderVO();
|
||||
try {
|
||||
Double aDouble = calculateTheAveragePrice(tankId);
|
||||
oilInventoryOrderVO.setCurrentAveragePrice(aDouble);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Date time = new Date();
|
||||
// 获取进货数据 本次盘点上次的
|
||||
OilPurchaseOrder oilInletRecords = oilPurchaseOrderService.getOilInletRecords(tankId);
|
||||
if (!ObjectUtil.isEmpty(oilInletRecords)) {
|
||||
time = oilInletRecords.getUpdateTime();
|
||||
oilInventoryOrderVO.setTheTotalPurchasePrice(oilInletRecords.getTotalAmount().toString());
|
||||
oilInventoryOrderVO.setTheAmountOfOilPurchased(oilInletRecords.getPurchaseVolume().toString());
|
||||
oilInventoryOrderVO.setPurchaseUnitPrice(oilInletRecords.getDiscountedPrice().toString());
|
||||
}
|
||||
// 获取销售信息
|
||||
OilOrderVo infoByTime = oilOrderService.getInfoByTime(time, tankId);
|
||||
if (!ObjectUtil.isEmpty(infoByTime)) {
|
||||
oilInventoryOrderVO.setTotalOilVolumeSold(infoByTime.getOilNum().toString());
|
||||
oilInventoryOrderVO.setTheTotalSalePrice(infoByTime.getPayAmount().toString());
|
||||
}
|
||||
return oilInventoryOrderVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -487,6 +487,17 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
@Resource
|
||||
AllOrderInfoMapper allOrderInfoMapper;
|
||||
// 将流水上限和时间上限的部门全部设置为不可用
|
||||
|
||||
/**
|
||||
* 设置禁用
|
||||
* 设置流水类型
|
||||
* 1:无限制
|
||||
* 2:时间限制
|
||||
* 3:预付费
|
||||
* 4:后付费
|
||||
* 5:年付费
|
||||
* 6:可创建油站站点数量
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void flowflowConfiguration() {
|
||||
@ -499,7 +510,7 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
// 查询所有的子部门
|
||||
List<SysDept> sysDeptsList = sysDeptMapper.selectChildrenDeptById(sysDept.getDeptId());
|
||||
// 判断部门的流水方式
|
||||
if ("1".equals(sysDept.getTurnoverType())) {
|
||||
if ("3".equals(sysDept.getTurnoverType())) {
|
||||
|
||||
LambdaQueryWrapper<MtStore> storeWrapper = Wrappers.lambdaQuery();
|
||||
storeWrapper.eq(MtStore::getContractDeptId,sysDeptsList);
|
||||
@ -520,7 +531,7 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
|
||||
// mtStoreMapper.editStatusBydeptId(sysDept.getDeptId());
|
||||
}
|
||||
}else if ("2".equals(sysDept.getTurnoverType())) {
|
||||
}else if ("2".equals(sysDept.getTurnoverType()) || "5".equals(sysDept.getTurnoverType())) { // 同时判断年付费
|
||||
// 时间上限
|
||||
SysDept sysDeptsByjy = sysDeptMapper.selectStatusByTurnoverTime(sysDept.getDeptId());
|
||||
if (ObjectUtil.isEmpty(sysDeptsByjy)) {
|
||||
@ -541,6 +552,7 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
||||
public void petrolStationsAreExpired() {
|
||||
// 直接修改
|
||||
mtStoreMapper.editStatusByExpirationTime();
|
||||
// todo 将在时间范围内的油站启用
|
||||
beachDelStore();
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,6 @@ public class storeConfigTask {
|
||||
storeService.flowflowConfiguration();
|
||||
// // 将过期油站设置为不可用
|
||||
storeService.petrolStationsAreExpired();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,7 +69,9 @@ public class SysDept extends BaseEntity
|
||||
private String turnoverType;
|
||||
private BigDecimal turnoverLimit;
|
||||
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date turnoverStartTime;
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date turnoverEndTime;
|
||||
private BigDecimal rates;
|
||||
private Integer storeNum;
|
||||
|
@ -595,6 +595,16 @@ import {formatDate} from "@/utils";
|
||||
// 退款
|
||||
handleRefund(id){
|
||||
this.dialogRefund = true;
|
||||
cashierOrder(id).then( response => {
|
||||
this.cashierOrder = response.data
|
||||
if (response.data.status === "refund") {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '该订单已经退款'
|
||||
});
|
||||
this.dialogRefund = false;
|
||||
}
|
||||
})
|
||||
//退款确定
|
||||
// this.$confirm('是否将该收银台下的订单全部退款, 是否继续?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
|
Loading…
Reference in New Issue
Block a user