修改磅单金额计算

product
Vayne 2 years ago
parent 714bfc587e
commit faf90342d5

@ -409,8 +409,9 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
if (StringUtils.isNotEmpty(model.getCustomerName())) {
String userId = userProvider.get().getUserId();
String departmentId = userProvider.getDepartmentId(userId);
String organizeId = userProvider.getOrganizeId(userId);
LambdaQueryWrapper<CustomerEntity> customerWrapper = new LambdaQueryWrapper<>();
customerWrapper.eq(CustomerEntity::getDepartmentId,departmentId);
customerWrapper.eq(CustomerEntity::getOrgnizeId,organizeId);
customerWrapper.eq(CustomerEntity::getSupplierNm,model.getCustomerName());
CustomerEntity customerEntity = customerService.getOne(customerWrapper);
String customerId = "";

@ -519,7 +519,7 @@ public class SaleorderitemController {
for (Salesorder_item0Entity salesorder_item0Entity : Salesorder_item0List){
PoundlistEntity poundlistEntity = poundlistService.getInfo(salesorder_item0Entity.getPoundlistId());
if(ObjectUtils.isNotEmpty(poundlistEntity) && poundlistEntity.getPurchaseStatus() != null){
if (!poundlistEntity.getPurchaseStatus().equals("2") && !poundlistEntity.getPurchaseStatus().equals("3")){
if (poundlistEntity.getPurchaseStatus().equals("99") || poundlistEntity.getPurchaseStatus().equals("0") || poundlistEntity.getPurchaseStatus().equals("1")){
return ActionResult.fail("存在磅单号为【磅单号-"+poundlistEntity.getPoundlistNo()+"】未开票或未入库");
}
}

@ -492,8 +492,8 @@
sums[index] = '';
}
});
this.dataForm.invoiceQuantity = sums[4];
this.dataForm.invoiceAmount = sums[5];
// this.dataForm.invoiceQuantity = sums[4];
// this.dataForm.invoiceAmount = sums[5];
return sums;
},
arinvoices_item1Exist() {
@ -640,6 +640,8 @@
},
delarinvoices_item0List(index) {
this.dataForm.arinvoices_item0List.splice(index, 1);
this.invoiceQuantitySum();
this.involceAmountSum();
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));

@ -280,7 +280,7 @@
<el-table-column prop="price" label="金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
placeholder="请输入" clearable :style='{"width":"100%"}' @change="updataPrice(scope.row)">
</el-input>
</template>
</el-table-column>
@ -847,6 +847,32 @@
mounted() {
},
methods: {
updataPrice(row){
var advanceAmount = 0
var price = 0
var notPrice = 0
var rate = 13
this.taxRateOptions.forEach((item, index) => {
if (item.id == row.rate) {
rate = parseInt(item.fullName)
}
})
this.dataForm.salesorder_item0List.forEach((item, index) => {
if (row.vehicleId == item.vehicleId) {
item.unitPrice = this.jnpf.floatDiv(item.price,item.settlement).toFixed(2) //
// item.price = this.jnpf.floatMul(item.settlement, item.unitPrice).toFixed(2)//
item.noPrice = this.jnpf.floatDiv(item.price, this.jnpf.floatAdd(1, this.jnpf.floatDiv(rate, 100))).toFixed(2)//
}
if (item.advance == '1') {//
advanceAmount = this.jnpf.floatAdd(advanceAmount, item.price)//
}
price = this.jnpf.floatAdd(price, item.price)//
notPrice = this.jnpf.floatAdd(notPrice, item.noPrice)//
})
this.dataForm.advanceAmount = advanceAmount
this.dataForm.price = price
this.dataForm.notPrice = notPrice
},
editPrice(row) {
var advanceAmount = 0
var price = 0

Loading…
Cancel
Save