Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit 10495ef520

@ -0,0 +1,2 @@
#Tue Apr 04 18:09:06 CST 2023
gradle.version=6.1

@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import jnpf.Jg_natural.entity.Jg_naturalEntity; import jnpf.Jg_natural.entity.Jg_naturalEntity;
@ -19,6 +20,8 @@ import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO; import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil; import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.util.*; import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum; import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil; import jnpf.util.file.UploadUtil;
@ -63,6 +66,9 @@ public class Jg_naturalController {
@Autowired @Autowired
private Jg_naturalService jg_naturalService; private Jg_naturalService jg_naturalService;
@Autowired
private PoundlistService poundlistService;
/** /**
* *
@ -302,6 +308,12 @@ public class Jg_naturalController {
@Transactional @Transactional
public ActionResult delete(@PathVariable("id") String id) { public ActionResult delete(@PathVariable("id") String id) {
Jg_naturalEntity entity = jg_naturalService.getInfo(id); Jg_naturalEntity entity = jg_naturalService.getInfo(id);
QueryWrapper<PoundlistEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(PoundlistEntity::getVehicleId,id);
List<PoundlistEntity> poundlistEntityList = poundlistService.list(queryWrapper);
if (poundlistEntityList.size()>0){
return ActionResult.fail("该业务员已被使用,无法删除");
}
if (entity != null) { if (entity != null) {
jg_naturalService.delete(entity); jg_naturalService.delete(entity);

@ -147,8 +147,7 @@ public class PoundlistController {
}else{ }else{
return ActionResult.success(list); return ActionResult.success(list);
} }
} }else {
else {
return ActionResult.fail("当前状态不能生成销售订单"); return ActionResult.fail("当前状态不能生成销售订单");
} }
} }

@ -359,7 +359,11 @@ public class PurchaseorderController {
// cn.hutool.core.io.FileUtil.del(temporaryFile); // cn.hutool.core.io.FileUtil.del(temporaryFile);
// FileUtil.upFile(file, filePath, fileName); // FileUtil.upFile(file, filePath, fileName);
DownloadVO vo = DownloadVO.builder().build(); DownloadVO vo = DownloadVO.builder().build();
vo.setName(String.valueOf(resultList.get(0)));
Optional<List<Object>> userOptional = Optional.ofNullable(resultList);
userOptional.ifPresent(o -> vo.setName(String.valueOf(o.get(0))));
//vo.setName(String.valueOf(resultList.get(0)));
return ActionResult.success(vo); return ActionResult.success(vo);
} else { } else {
return ActionResult.fail("选择文件不符合导入"); return ActionResult.fail("选择文件不符合导入");
@ -983,4 +987,4 @@ public class PurchaseorderController {
} }
return ActionResult.success("删除成功"); return ActionResult.success("删除成功");
} }
} }

@ -34,6 +34,8 @@ import jnpf.materialvo.service.MaterialService;
import jnpf.poundlist.entity.PoundlistEntity; import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService; import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseorder.entity.Purchaseorder_item0Entity; import jnpf.purchaseorder.entity.Purchaseorder_item0Entity;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import jnpf.purchaseorder.service.PurchaseorderitemService;
import jnpf.receiptin.entity.Receiptin_item0Entity; import jnpf.receiptin.entity.Receiptin_item0Entity;
import jnpf.receiptin.service.Receiptin_item0Service; import jnpf.receiptin.service.Receiptin_item0Service;
import jnpf.receiptout.entity.ReceiptoutEntity; import jnpf.receiptout.entity.ReceiptoutEntity;
@ -166,6 +168,8 @@ public class SaleorderitemController {
private CustomerService customerService; private CustomerService customerService;
@Autowired @Autowired
private VehicleService vehicleService; private VehicleService vehicleService;
@Autowired
private PurchaseorderitemService purchaseorderitemService;
/** /**
* *
@ -540,36 +544,15 @@ public class SaleorderitemController {
entitys.setSalesOrderId(entity.getId()); entitys.setSalesOrderId(entity.getId());
salesorder_item0Service.save(entitys); salesorder_item0Service.save(entitys);
} }
/* List<ReceiptoutsoitemEntity> ReceiptoutsoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getReceiptoutsoitemList(),ReceiptoutsoitemEntity.class); if (StringUtils.isNotEmpty(saleorderitemCrForm.getIsTransfer()) && saleorderitemCrForm.getIsTransfer().equals("1")){
for(ReceiptoutsoitemEntity entitys : ReceiptoutsoitemList){ if (StringUtils.isNotEmpty(saleorderitemCrForm.getPurchaseOrderId())){
entitys.setId(RandomUtil.uuId()); PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getById(saleorderitemCrForm.getPurchaseOrderId());
entitys.setSourceNo(entity.getDocumentNo()); if (ObjectUtils.isNotEmpty(purchaseorderitemEntity)){
receiptoutsoitemService.save(entitys); purchaseorderitemEntity.setIsTransfer("1");
} purchaseorderitemService.updateById(purchaseorderitemEntity);
List<Arinvoices_item0soitemEntity> Arinvoices_item0soitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getArinvoices_item0soitemList(),Arinvoices_item0soitemEntity.class); }
for(Arinvoices_item0soitemEntity entitys : Arinvoices_item0soitemList){ }
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderNo(entity.getDocumentNo());
arinvoices_item0soitemService.save(entitys);
}
List<CollectionsoitemEntity> CollectionsoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getCollectionsoitemList(),CollectionsoitemEntity.class);
for(CollectionsoitemEntity entitys : CollectionsoitemList){
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderNo(entity.getDocumentNo());
collectionsoitemService.save(entitys);
}
List<SalesbacksoitemEntity> SalesbacksoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getSalesbacksoitemList(),SalesbacksoitemEntity.class);
for(SalesbacksoitemEntity entitys : SalesbacksoitemList){
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderId(entity.getId());
salesbacksoitemService.save(entitys);
} }
List<PaymentsoitemEntity> PaymentsoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getPaymentsoitemList(),PaymentsoitemEntity.class);
for(PaymentsoitemEntity entitys : PaymentsoitemList){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentno(entity.getDocumentNo());
paymentsoitemService.save(entitys);
}*/
return ActionResult.success("创建成功"); return ActionResult.success("创建成功");
} }

@ -130,5 +130,10 @@ public class SaleorderitemCrForm {
@TableField("bidSection") @TableField("bidSection")
private String bidSection; private String bidSection;
@TableField("isTransfer")
private String isTransfer;
@TableField("purchaseOrderId")
private String purchaseOrderId;
} }

@ -745,9 +745,9 @@ public class TradeuploadController {
public ActionResult<TradeuploadInfoVO> info(@PathVariable("id") String id){ public ActionResult<TradeuploadInfoVO> info(@PathVariable("id") String id){
TradeuploadEntity entity= tradeuploadService.getInfo(id); TradeuploadEntity entity= tradeuploadService.getInfo(id);
TradeuploadInfoVO vo=JsonUtil.getJsonToBean(entity, TradeuploadInfoVO.class); TradeuploadInfoVO vo=JsonUtil.getJsonToBean(entity, TradeuploadInfoVO.class);
// if(vo.getCreatorTime()!=null){ if(vo.getCreatorTime()!=null){
// vo.setCreatorTime(vo.getCreatorTime()); vo.setCreatorTime(vo.getCreatorTime());
// } }
// vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace())); // vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace()));
//子表 //子表
//副表 //副表

@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams; import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
@ -15,6 +16,8 @@ import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO; import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil; import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.util.*; import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum; import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil; import jnpf.util.file.UploadUtil;
@ -63,6 +66,9 @@ public class VehicleController {
@Autowired @Autowired
private VehicleService vehicleService; private VehicleService vehicleService;
@Autowired
private PoundlistService poundlistService;
@ -317,9 +323,14 @@ public class VehicleController {
@Transactional @Transactional
public ActionResult delete(@PathVariable("id") String id){ public ActionResult delete(@PathVariable("id") String id){
VehicleEntity entity= vehicleService.getInfo(id); VehicleEntity entity= vehicleService.getInfo(id);
QueryWrapper<PoundlistEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(PoundlistEntity::getVehicleId,id);
List<PoundlistEntity> poundlistEntityList = poundlistService.list(queryWrapper);
if (poundlistEntityList.size()>0){
return ActionResult.fail("该车辆已被使用,无法删除");
}
if(entity!=null){ if(entity!=null){
vehicleService.delete(entity); vehicleService.delete(entity);
} }
return ActionResult.success("删除成功"); return ActionResult.success("删除成功");
} }

@ -403,10 +403,11 @@
this.taxRateOptions.find((item) => { this.taxRateOptions.find((item) => {
if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) { if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) {
debugger debugger
// this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100) this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100)
this.dataForm.arinvoices_item0List[i].taxAmount = this.dataForm.arinvoices_item0List[i].involceAmount*item.fullName/100 // this.dataForm.arinvoices_item0List[i].taxAmount = this.dataForm.arinvoices_item0List[i].involceAmount*item.fullName/100
debugger debugger
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount) // this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount)
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatDiv(this.dataForm.arinvoices_item0List[i].involceAmount, this.jnpf.floatAdd(1,this.jnpf.floatDiv(item.fullName,100)))
} }
}) })
} }
@ -420,7 +421,8 @@
this.taxRateOptions.find((item) => { this.taxRateOptions.find((item) => {
if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) { if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) {
this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100) this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100)
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount) // this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount)
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatDiv(this.dataForm.arinvoices_item0List[i].involceAmount, this.jnpf.floatAdd(1,this.jnpf.floatDiv(item.fullName,100)))
} }
}) })
} }

@ -613,8 +613,12 @@
this.dataForm.invoicesitem0List.forEach((model, i) => { this.dataForm.invoicesitem0List.forEach((model, i) => {
invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount); invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount);
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){ if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100; this.taxRateOptions.forEach((model1, i) => {
model.taxAmount = model.invoiceAmount - model.amountNotTax if(e.taxRate == model1.id){
model.amountNotTax = this.jnpf.floatDiv(model.invoiceAmount,this.jnpf.floatAdd(1,this.jnpf.floatDiv(model1.fullName,100)));
model.taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(model.invoiceAmount,model1.fullName),100)
}
})
} }
}) })
this.dataForm.invoiceAmount = invoiceAmount this.dataForm.invoiceAmount = invoiceAmount
@ -628,8 +632,14 @@
}) })
this.dataForm.invoicesitem0List.forEach((model, i) => { this.dataForm.invoicesitem0List.forEach((model, i) => {
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){ if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100; this.taxRateOptions.forEach((model1, i) => {
model.taxAmount = model.invoiceAmount - model.amountNotTax if(e.taxRate == model1.id){
model.amountNotTax = this.jnpf.floatDiv(model.invoiceAmount,this.jnpf.floatAdd(1,this.jnpf.floatDiv(model1.fullName,100)));
model.taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(model.invoiceAmount,model1.fullName),100)
}
})
// model.amountNotTax = this.jnpf.floatDiv(model.invoiceAmount,this.jnpf.floatAdd(1,this.jnpf.floatDiv(model.fullName,100)));
// model.taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(model.invoiceAmount,model.fullName),100)
} }
}) })
}, },

@ -724,8 +724,9 @@
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
isTransfer: '',
purchaseOrderId: '',
documentNo: '', documentNo: '',
contractId: '', contractId: '',
customerId: '', customerId: '',
contractName: '', contractName: '',
@ -999,6 +1000,8 @@
this.dataForm.contractNo = list[0].contractNo this.dataForm.contractNo = list[0].contractNo
this.dataForm.contractName = list[0].contractName this.dataForm.contractName = list[0].contractName
this.dataForm.customerName = list[0].customerName this.dataForm.customerName = list[0].customerName
this.dataForm.isTransfer = list.isTransfer
this.dataForm.purchaseOrderId = list .purchaseOrderId
var num = 0 var num = 0
var amount = 0 var amount = 0
var advance = 0 var advance = 0
@ -1009,7 +1012,7 @@
this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(list[i].salesPrice, list[i].settlement) this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(list[i].salesPrice, list[i].settlement)
this.rateOptions.find((item) => { this.rateOptions.find((item) => {
if (this.dataForm.salesorder_item0List[i].rate == item.id) { if (this.dataForm.salesorder_item0List[i].rate == item.id) {
this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.salesorder_item0List[i].price, (100 - item.fullName)), 100) 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))))
notPrice = this.jnpf.floatAdd(notPrice, this.dataForm.salesorder_item0List[i].noPrice) notPrice = this.jnpf.floatAdd(notPrice, this.dataForm.salesorder_item0List[i].noPrice)
} }
}) })

@ -578,8 +578,16 @@
this.dataForm.invoicesitem0List.forEach((model, i) => { this.dataForm.invoicesitem0List.forEach((model, i) => {
invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount); invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount);
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){ if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100; this.taxRateOptions.forEach((model1, i) => {
model.taxAmount = model.invoiceAmount - model.amountNotTax if(e.taxRate == model1.id){
model.amountNotTax = this.jnpf.floatDiv(model.invoiceAmount,this.jnpf.floatAdd(1,this.jnpf.floatDiv(model1.fullName,100)));
model.taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(model.invoiceAmount,model1.fullName),100)
}
})
// model.amountNotTax = model.invoiceAmount * taxRateName / 100;
// model.taxAmount = model.invoiceAmount - model.amountNotTax
// model.amountNotTax = this.jnpf.floatDiv(model.invoiceAmount,this.jnpf.floatAdd(1, this.jnpf.floatDiv(taxRateName,100)));
// model.taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(model.invoiceAmount,taxRateName),100)
} }
}) })
this.dataForm.invoiceAmount = invoiceAmount this.dataForm.invoiceAmount = invoiceAmount
@ -593,8 +601,16 @@
}) })
this.dataForm.invoicesitem0List.forEach((model, i) => { this.dataForm.invoicesitem0List.forEach((model, i) => {
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){ if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100; this.taxRateOptions.forEach((model1, i) => {
model.taxAmount = model.invoiceAmount - model.amountNotTax if(e.taxRate == model1.id){
model.amountNotTax = this.jnpf.floatDiv(model.invoiceAmount,this.jnpf.floatAdd(1,this.jnpf.floatDiv(model1.fullName,100)));
model.taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(model.invoiceAmount,model1.fullName),100)
}
})
// model.amountNotTax = model.invoiceAmount * taxRateName / 100;
// model.taxAmount = model.invoiceAmount - model.amountNotTax
// model.amountNotTax = this.jnpf.floatDiv(model.invoiceAmount,this.jnpf.floatAdd(1,this.jnpf.floatDiv(taxRateName,100)));
// model.taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(model.invoiceAmount,taxRateName),100)
} }
}) })
}, },

@ -78,7 +78,7 @@
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" custom-column border> @selection-change="handleSelectionChange" custom-column border show-summary :summary-method="getSummaries">
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center" /> <el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center" />
<!-- <el-table-column label="单据状态 " sortable width="150" prop="status" align="center" >--> <!-- <el-table-column label="单据状态 " sortable width="150" prop="status" align="center" >-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
@ -345,6 +345,31 @@
this.initData() this.initData()
}, },
methods: { methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 6 || index === 7)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return this.jnpf.floatAdd(prev,curr);
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
downLoadPDF(){ downLoadPDF(){
if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) { if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) {
this.$message({ this.$message({
@ -530,6 +555,20 @@
}) })
return return
} }
var flag = true;
this.multipleSelectionItem.forEach((item,index) => {
if(item.isTransfer == '1'){
flag = flase;
}
})
if(!flag){
this.$message({
type: 'error',
message: '此订单已经转销售',
duration: 2500
})
return
}
console.log('aaaaaaa', this.multipleSelectionItem) console.log('aaaaaaa', this.multipleSelectionItem)
var ids = ''; var ids = '';
this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{ this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{
@ -538,13 +577,18 @@
if(ids.length > 0){ if(ids.length > 0){
ids = ids.substring(0, ids.length - 1); ids = ids.substring(0, ids.length - 1);
} }
debugger
request({ request({
url: `/api/poundlist/Poundlist/createsale/${ids}`, url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: 'post' method: 'post'
}).then(res => { }).then(res => {
var list = [] var list = []
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
// res.data[i].isTransfer = '1'
// res.data[i].purchaseOrderId = this.multipleSelectionItem[0].id
let _data = res.data[i] let _data = res.data[i]
_data.isTransfer = '1'
_data.purchaseOrderId = this.multipleSelectionItem[0].id
list.push(_data) list.push(_data)
} }
if (list.length>0) { if (list.length>0) {

@ -490,10 +490,11 @@
this.taxRateOptions.find((item) => { this.taxRateOptions.find((item) => {
if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) { if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) {
debugger debugger
// this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100) this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100)
this.dataForm.arinvoices_item0List[i].taxAmount = this.dataForm.arinvoices_item0List[i].involceAmount*item.fullName/100 // this.dataForm.arinvoices_item0List[i].taxAmount = this.dataForm.arinvoices_item0List[i].involceAmount*item.fullName/100
debugger debugger
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount) // this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount)
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatDiv(this.dataForm.arinvoices_item0List[i].involceAmount, this.jnpf.floatAdd(1,this.jnpf.floatDiv(item.fullName,100)))
} }
}) })
} }
@ -506,7 +507,8 @@
this.taxRateOptions.find((item) => { this.taxRateOptions.find((item) => {
if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) { if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) {
this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100) this.dataForm.arinvoices_item0List[i].taxAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.arinvoices_item0List[i].involceAmount,item.fullName),100)
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount) // this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatSub(this.dataForm.arinvoices_item0List[i].involceAmount, this.dataForm.arinvoices_item0List[i].taxAmount)
this.dataForm.arinvoices_item0List[i].amountNotTax = this.jnpf.floatDiv(this.dataForm.arinvoices_item0List[i].involceAmount, this.jnpf.floatAdd(1,this.jnpf.floatDiv(item.fullName,100)))
} }
}) })
} }

@ -25,7 +25,7 @@
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable <popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable
field="materialId" interfaceId="381037852907038533" field="materialId" interfaceId="381037852907038533"
:columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name" :columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name"
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" disabled> popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" >
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -216,7 +216,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button>
<!-- <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>--> <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -600,16 +600,16 @@
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date().getTime(); this.dataForm.poundDate = new Date().getTime();
this.loading = false this.loading = false
}); });
} else { } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date(); this.dataForm.poundDate = new Date().getTime();
} }
}); });
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})

@ -600,16 +600,16 @@
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date().getTime(); this.dataForm.poundDate = new Date().getTime();
this.loading = false this.loading = false
}); });
} else { } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
// this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
// this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
// this.dataForm.poundDate = new Date(); this.dataForm.poundDate = new Date().getTime();
} }
}); });
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})

@ -155,7 +155,7 @@
width="200"> width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="continueUpload(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">继续上传 @click="continueUpload(scope.row.id)" v-has="'btn_continueUpload'">继续上传
</el-button> </el-button>
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle2(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">审核 @click="addOrUpdateHandle2(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">审核

Loading…
Cancel
Save