Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit 3a832054e8

@ -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 = "";
@ -450,6 +451,7 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
poundlistWrapper.eq(PoundlistEntity::getTareWeight,model.getTareWeight());
poundlistWrapper.eq(PoundlistEntity::getSettlement,model.getSettlement());
poundlistWrapper.eq(PoundlistEntity::getUnit,model.getUnit());
poundlistWrapper.eq(PoundlistEntity::getDepartmentId,departmentId);
poundlistWrapper.in(PoundlistEntity::getVehicleId,vehicleId);
List<PoundlistEntity> poundlistList = poundlistMapper.selectList(poundlistWrapper);
if (poundlistList != null && poundlistList.size() != 0){
@ -474,8 +476,12 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
poundlistEntity.setMaterialName(materialEntity.getItemName());
}
poundlistEntity.setRate("0");
poundlistEntity.setUnitPrice(new BigDecimal(model.getSalesPrice()));
poundlistEntity.setPrice(new BigDecimal(model.getSalesAmount()));
if (StringUtils.isNotEmpty(model.getSalesPrice())){
poundlistEntity.setUnitPrice(new BigDecimal(model.getSalesPrice()));
}
if (StringUtils.isNotEmpty(model.getSalesAmount())){
poundlistEntity.setPrice(new BigDecimal(model.getSalesAmount()));
}
poundlistEntityList.add(poundlistEntity);
sum++;
}else{

@ -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()+"】未开票或未入库");
}
}

@ -3,6 +3,8 @@
package jnpf.tradeupload.model.tradeupload;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -55,7 +57,7 @@ public class TradeuploadUpForm{
/** 磅单时间 **/
@JsonProperty("poundDate")
private Long poundDate;
private Date poundDate;
/** 磅单号 **/

@ -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
@ -1046,9 +1072,17 @@
var advance = 0
var notPrice = 0
for (let i = 0; i < list.length; i++) {
// this.dataForm.salesorder_item0List[i].unitPrice = list[i].salesPrice;
if(list[i].salesPrice != null){
this.dataForm.salesorder_item0List[i].unitPrice = list[i].unitPrice;
}else{
this.dataForm.salesorder_item0List[i].unitPrice = list[i].salesPrice;
}
this.dataForm.salesorder_item0List[i].poundlistId = list[i].id
this.dataForm.salesorder_item0List[i].price = list[i].price.toFixed(2)
if(list[i].price != null){
this.dataForm.salesorder_item0List[i].price = list[i].price.toFixed(2)
}else{
this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(list[i].unitPrice, list[i].settlement).toFixed(2)
}
this.rateOptions.find((item) => {
if (this.dataForm.salesorder_item0List[i].rate == item.id) {
this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.dataForm.salesorder_item0List[i].price, this.jnpf.floatAdd(1, this.jnpf.floatDiv(item.fullName,100))).toFixed(2)
@ -1056,7 +1090,7 @@
}
})
if (list[i].advance == 1) {
advance = this.jnpf.floatAdd(advance, this.jnpf.floatMul(list[i].salesPrice, list[i].settlement)).toFixed(2)
advance = this.jnpf.floatAdd(advance, this.jnpf.floatMul(list[i].unitPrice, list[i].settlement)).toFixed(2)
}
num = this.jnpf.floatAdd(num, list[i].settlement)
amount = this.jnpf.floatAdd(amount, list[i].price)

@ -1,6 +1,6 @@
<template>
<el-col :span="12" style="padding-left:20px; overflow: auto;">
<el-timeline reverse>
<el-timeline :reverse="false">
<template v-for="(item, i) in list">
<el-timeline-item :timestamp="item.handleTime | toDate()" placement="top" :key="i"
v-if="item.handleStatus==0">

Loading…
Cancel
Save