Merge remote-tracking branch 'origin/main'

product
bawei 2 years ago
commit eff4d753b2

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

@ -23,8 +23,8 @@ public class Pagination extends Page{
private String sidx="";
@ApiModelProperty(value = "当前页数",example = "1")
private long currentPage=1;
@ApiModelProperty(value = "菜单id")
private String menuId;
@ApiModelProperty(hidden = true)
@JsonIgnore

@ -0,0 +1,23 @@
package jnpf.config;
import java.io.File;
public class ToolUtils {
public boolean forceDelete(File file) {
boolean result = file.delete();
int tryCount = 0;
while (!result && tryCount++ < 10) {
System.gc(); //回收资源
result = file.delete();
}
return result;
}
}

@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
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.ApiOperation;
import jnpf.Jg_natural.entity.Jg_naturalEntity;
@ -19,6 +20,8 @@ import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
@ -63,6 +66,9 @@ public class Jg_naturalController {
@Autowired
private Jg_naturalService jg_naturalService;
@Autowired
private PoundlistService poundlistService;
/**
*
@ -302,6 +308,12 @@ public class Jg_naturalController {
@Transactional
public ActionResult delete(@PathVariable("id") String 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) {
jg_naturalService.delete(entity);

@ -1,6 +1,7 @@
package jnpf.arinvoices.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.arinvoices.entity.ArinvoicesEntity;
@ -20,5 +21,5 @@ import org.apache.ibatis.annotations.Param;
*/
public interface ArinvoicesMapper extends BaseMapper<ArinvoicesEntity> {
IPage<ArinvoicesEntity> queryArinvoices(@Param("page") Page<ArinvoicesEntity> page, @Param("arinvoicesPagination") ArinvoicesPagination arinvoicesPagination);
IPage<ArinvoicesEntity> queryArinvoices(@Param("page") Page<ArinvoicesEntity> page, @Param("arinvoicesPagination") ArinvoicesPagination arinvoicesPagination, @Param("ew") Wrapper<ArinvoicesEntity> queryWrapper);
}

@ -77,6 +77,7 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
int total=0;
int arinvoicesNum =0;
QueryWrapper<ArinvoicesEntity> arinvoicesQueryWrapper=new QueryWrapper<>();
arinvoicesQueryWrapper.eq("a.delete_mark", "0");
int arinvoices_item0Num =0;
QueryWrapper<Arinvoices_item0Entity> arinvoices_item0QueryWrapper=new QueryWrapper<>();
int arinvoices_item1Num =0;
@ -86,7 +87,7 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object arinvoicesObj=authorizeService.getCondition(new AuthorizeConditionModel(arinvoicesQueryWrapper,arinvoicesPagination.getMenuId(),"jg_arinvoices"));
Object arinvoicesObj=authorizeService.getCondition2(new AuthorizeConditionModel(arinvoicesQueryWrapper,arinvoicesPagination.getMenuId(),"jg_arinvoices"));
if (ObjectUtil.isEmpty(arinvoicesObj)){
return new ArrayList<>();
} else {
@ -111,7 +112,7 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object arinvoicesObj=authorizeService.getCondition(new AuthorizeConditionModel(arinvoicesQueryWrapper,arinvoicesPagination.getMenuId(),"jg_arinvoices"));
Object arinvoicesObj=authorizeService.getCondition2(new AuthorizeConditionModel(arinvoicesQueryWrapper,arinvoicesPagination.getMenuId(),"jg_arinvoices"));
if (ObjectUtil.isEmpty(arinvoicesObj)){
return new ArrayList<>();
} else {
@ -140,23 +141,6 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
}
}
if(StringUtil.isNotEmpty(arinvoicesPagination.getDocumentNo())){
arinvoicesNum++;
arinvoicesQueryWrapper.lambda().like(ArinvoicesEntity::getDocumentNo,arinvoicesPagination.getDocumentNo());
}
if(StringUtil.isNotEmpty(arinvoicesPagination.getBusinessDate())){
arinvoicesNum++;
List<String> BusinessDateList = arinvoicesPagination.getBusinessDate();
Long fir = Long.valueOf(BusinessDateList.get(0));
Long sec = Long.valueOf(BusinessDateList.get(1));
arinvoicesPagination.setStartDate(new Date(fir));
arinvoicesPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
// arinvoicesQueryWrapper.lambda().ge(ArinvoicesEntity::getBusinessDate, new Date(fir))
// .le(ArinvoicesEntity::getBusinessDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(AllIdList.size()>0){
arinvoicesQueryWrapper.lambda().in(ArinvoicesEntity::getId, AllIdList);
}
@ -197,7 +181,7 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
if (StringUtil.isNotNull(detpartment)) {
arinvoicesPagination.setDepartmentId(detpartment);
}
IPage<ArinvoicesEntity> userIPage=arinvoicesMapper.queryArinvoices(page, arinvoicesPagination);
IPage<ArinvoicesEntity> userIPage=arinvoicesMapper.queryArinvoices(page, arinvoicesPagination, arinvoicesQueryWrapper);
return arinvoicesPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}
@Override

@ -54,7 +54,7 @@ public class Arinvoices_item0ServiceImpl extends ServiceImpl<Arinvoices_item0Map
dataRowMap.put("involceAmount", model.getInvolceAmount().add(model.getTaxAmount()));
dataRowMap.put("taxRate", model.getTaxRate());
dataRowMap.put("taxAmount", model.getTaxAmount());
dataRowMap.put("amountNotTax", model.getInvolceAmount().subtract(model.getTaxAmount()));
dataRowMap.put("amountNotTax", model.getInvolceAmount());
dataRowMap.put("invoiceStatus", "0");
dataRowMap.put("creatorUserName", model.getCreatorUserName());
dataRowMap.put("invoiceDate", model.getInvoiceDate());

@ -1,8 +1,10 @@
package jnpf.collection.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.arinvoices.entity.ArinvoicesEntity;
import jnpf.collection.entity.CollectionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.collection.model.collection.CollectionPagination;
@ -29,5 +31,5 @@ public interface CollectionMapper extends BaseMapper<CollectionEntity> {
List<ContractFileEntity> queryContract(String code);
IPage<CollectionEntity> queryCollection(@Param("page") Page<CollectionEntity> page, @Param("collectionPagination") CollectionPagination collectionPagination);
IPage<CollectionEntity> queryCollection(@Param("page") Page<CollectionEntity> page, @Param("collectionPagination") CollectionPagination collectionPagination, @Param("ew") Wrapper<CollectionEntity> queryWrapper);
}

@ -85,6 +85,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
int total=0;
int collectionNum =0;
QueryWrapper<CollectionEntity> collectionQueryWrapper=new QueryWrapper<>();
collectionQueryWrapper.eq("a.delete_mark", "0");
int collection_item0Num =0;
QueryWrapper<Collection_item0Entity> collection_item0QueryWrapper=new QueryWrapper<>();
boolean pcPermission = true;
@ -92,7 +93,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object collectionObj=authorizeService.getCondition(new AuthorizeConditionModel(collectionQueryWrapper,collectionPagination.getMenuId(),"jg_collection"));
Object collectionObj=authorizeService.getCondition2(new AuthorizeConditionModel(collectionQueryWrapper,collectionPagination.getMenuId(),"jg_collection"));
if (ObjectUtil.isEmpty(collectionObj)){
return new ArrayList<>();
} else {
@ -110,7 +111,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object collectionObj=authorizeService.getCondition(new AuthorizeConditionModel(collectionQueryWrapper,collectionPagination.getMenuId(),"jg_collection"));
Object collectionObj=authorizeService.getCondition2(new AuthorizeConditionModel(collectionQueryWrapper,collectionPagination.getMenuId(),"jg_collection"));
if (ObjectUtil.isEmpty(collectionObj)){
return new ArrayList<>();
} else {
@ -130,11 +131,6 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
}
}
if(StringUtil.isNotEmpty(collectionPagination.getDocumentNo())){
collectionNum++;
collectionQueryWrapper.lambda().like(CollectionEntity::getDocumentNo,collectionPagination.getDocumentNo());
}
if(AllIdList.size()>0){
collectionQueryWrapper.lambda().in(CollectionEntity::getId, AllIdList);
}
@ -176,7 +172,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
if (StringUtil.isNotNull(detpartment)) {
collectionPagination.setDepartmentId(detpartment);
}
IPage<CollectionEntity> userIPage=collectionMapper.queryCollection(page, collectionPagination);
IPage<CollectionEntity> userIPage=collectionMapper.queryCollection(page, collectionPagination, collectionQueryWrapper);
return collectionPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}
@Override

@ -1,8 +1,10 @@
package jnpf.invoices.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.collection.entity.CollectionEntity;
import jnpf.invoices.entity.InvoicesEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.invoices.model.invoices.InvoicesPagination;
@ -18,5 +20,5 @@ import org.apache.ibatis.annotations.Param;
*/
public interface InvoicesMapper extends BaseMapper<InvoicesEntity> {
IPage<InvoicesEntity> queryByKeyword(@Param("page") Page<InvoicesEntity> page, @Param("invoicesPagination") InvoicesPagination invoicesPagination);
IPage<InvoicesEntity> queryByKeyword(@Param("page") Page<InvoicesEntity> page, @Param("invoicesPagination") InvoicesPagination invoicesPagination, @Param("ew") Wrapper<InvoicesEntity> queryWrapper);
}

@ -58,7 +58,7 @@ public class InvoicesItem0ServiceImpl extends ServiceImpl<InvoicesItem0Mapper, I
dataRowMap.put("invoiceAmount", model.getInvoiceAmount().add(model.getTaxAmount()));//金额 + 税额=发票金额
dataRowMap.put("taxRate", model.getTaxRate());
dataRowMap.put("taxAmount", model.getTaxAmount());
dataRowMap.put("amountNotTax", model.getInvoiceAmount().subtract(model.getTaxAmount()));
dataRowMap.put("amountNotTax", model.getInvoiceAmount());
dataRowMap.put("invoiceStatus", "0");
dataRowMap.put("creatorUserName", model.getCreatorUserName());
dataRowMap.put("invoicingDate", model.getInvoicingDate());

@ -84,6 +84,7 @@ public class InvoicesServiceImpl extends ServiceImpl<InvoicesMapper, InvoicesEnt
int total=0;
int invoicesNum =0;
QueryWrapper<InvoicesEntity> invoicesQueryWrapper=new QueryWrapper<>();
invoicesQueryWrapper.eq("a.delete_mark", "0");
int invoicesItem0Num =0;
QueryWrapper<InvoicesItem0Entity> invoicesItem0QueryWrapper=new QueryWrapper<>();
int invoicesItem1Num =0;
@ -93,7 +94,7 @@ public class InvoicesServiceImpl extends ServiceImpl<InvoicesMapper, InvoicesEnt
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object invoicesObj=authorizeService.getCondition(new AuthorizeConditionModel(invoicesQueryWrapper,invoicesPagination.getMenuId(),"jg_invoices"));
Object invoicesObj=authorizeService.getCondition2(new AuthorizeConditionModel(invoicesQueryWrapper,invoicesPagination.getMenuId(),"jg_invoices"));
if (ObjectUtil.isEmpty(invoicesObj)){
return new ArrayList<>();
} else {
@ -118,7 +119,7 @@ public class InvoicesServiceImpl extends ServiceImpl<InvoicesMapper, InvoicesEnt
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object invoicesObj=authorizeService.getCondition(new AuthorizeConditionModel(invoicesQueryWrapper,invoicesPagination.getMenuId(),"jg_invoices"));
Object invoicesObj=authorizeService.getCondition2(new AuthorizeConditionModel(invoicesQueryWrapper,invoicesPagination.getMenuId(),"jg_invoices"));
if (ObjectUtil.isEmpty(invoicesObj)){
return new ArrayList<>();
} else {
@ -189,7 +190,7 @@ public class InvoicesServiceImpl extends ServiceImpl<InvoicesMapper, InvoicesEnt
if (StringUtil.isNotNull(detpartment)) {
invoicesPagination.setDepartmentId(detpartment);
}
IPage<InvoicesEntity> userIPage=invoicesMapper.queryByKeyword(page, invoicesPagination);
IPage<InvoicesEntity> userIPage=invoicesMapper.queryByKeyword(page, invoicesPagination, invoicesQueryWrapper);
return invoicesPagination.setData(userIPage.getRecords(),userIPage.getTotal());

@ -51,6 +51,18 @@ public class FileCopy {
int xlsIndex = 0;
// 将文件夹中的文件上传到文件服务器
if (file.isDirectory()) {
String path = file.getPath();
String parentName = path.substring(path.lastIndexOf("\\") + 1, path.length());
VehiclePictureFolder vehiclePictureFolder = VehiclePictureFolderUtils.getVehiclePictureFolder(parentName);
// 序号
parentName=vehiclePictureFolder.getSerialNumber();
if (!folderHashMap.containsKey(parentName)){
folderHashMap.put(parentName,vehiclePictureFolder);
}
ArrayList<Object> resultListt = getInfoAndUpFile(file.listFiles());
if (resultListt.get(0) != null) {
fileName = fileName+String.valueOf(resultListt.get(0));
@ -128,125 +140,135 @@ public class FileCopy {
// 将车辆照片存在车辆照片中
input.close();
}
if (i == fileList.length - 1) {
if (excelFile != null) {
ExcelReader reader = ExcelUtil.getReader(excelFile);
reader.setIgnoreEmptyRow(true);
}
if (i == fileList.length - 1) {
if (excelFile != null) {
ExcelReader reader = ExcelUtil.getReader(excelFile);
reader.setIgnoreEmptyRow(true);
// List<HashMap> read = reader.read(3, reader.read().size(), HashMap.class);
// List<Object> objects1 = reader.readRow(0);
// System.out.println(objects1);
List<Object> objects2 = reader.readColumn(0, 0, 1);
List<Object> objects2 = reader.readColumn(0, 0, 1);
// 公司名字
String companyStr = String.valueOf(objects2.get(0));
companyStr=companyStr.substring(0,companyStr.lastIndexOf("废钢收货"));
String companyStr = String.valueOf(objects2.get(0));
companyStr=companyStr.substring(0,companyStr.lastIndexOf("废钢收货"));
// 销售合同编码
String infoStr = String.valueOf(objects2.get(1));
String infoStr = String.valueOf(objects2.get(1));
infoStr = infoStr.replaceAll(" ", "");
infoStr = infoStr.replaceAll(" ", "");
// 销售合同编码
String str = infoStr.substring(7, infoStr.indexOf("采购合同编码"));
String str = infoStr.substring(7, infoStr.indexOf("采购合同编码"));
// 销售合同编码
String str3 = infoStr.substring(infoStr.lastIndexOf("") + 1, infoStr.length());
List<Object> objects = reader.readColumn(0, 3);
String str3 = infoStr.substring(infoStr.lastIndexOf("") + 1, infoStr.length());
List<Object> objects = reader.readColumn(0, 3);
// 写入工具类
ExcelWriter writer = reader.getWriter();
ExcelWriter writer = reader.getWriter();
// Workbook workbook = writer.getWorkbook();
Sheet sheet = writer.getSheet();
for (int i1 = 0; i1 < objects.size(); i1++) {
Object o = objects.get(i1);
Row row = sheet.getRow(i1 + 3);
if (String.valueOf(o).isEmpty()) {
continue;
}
Sheet sheet = writer.getSheet();
for (int i1 = 0; i1 < objects.size(); i1++) {
Object o = objects.get(i1);
Row row = sheet.getRow(i1 + 3);
if (String.valueOf(o).isEmpty()) {
continue;
}
//// System.out.println(row.getCell(0).getStringCellValue());
// if ( row.getCell(0).getStringCellValue().isEmpty()){
// continue;
// }
Cell cell = row.createCell(19);
Cell cell1 = row.createCell(20);
Cell cell2 = row.createCell(21);
Cell cell3 = row.createCell(22);
Cell cell4 = row.createCell(23);
Cell cell6 = row.createCell(25);
Cell cell7 = row.createCell(26);
Cell cell8 = row.createCell(27);
Cell cell5 = row.getCell(9);
Cell strCell1 = row.getCell(8);
Cell strCell2 = row.getCell(7);
Cell strCell3 = row.getCell(6);
Cell strCell4 = row.getCell(5);
Cell strCell5 = row.getCell(11);
Cell strCell6 = row.getCell(12);
Cell strCell7 = row.getCell(1);
if (i1 == 0) {
Row row1 = sheet.getRow(2);
Cell cell11 = row1.createCell(19);
cell11.setCellValue("磅单图片地址");
Cell cell22 = row1.createCell(20);
cell22.setCellValue("客户");
Cell cell33 = row1.createCell(21);
cell33.setCellValue("销售合同编码");
Cell cell44 = row1.createCell(22);
cell44.setCellValue("采购合同编码");
Cell cell55 = row1.createCell(23);
cell55.setCellValue("车辆图片地址");
Cell cell66 = row1.createCell(24);
cell66.setCellValue("错误原因");
Cell cell77 = row1.createCell(25);
cell77.setCellValue("司机姓名");
Cell cell88 = row1.createCell(26);
cell88.setCellValue("司机联系方式");
Cell cell99 = row1.createCell(27);
cell99.setCellValue("司机车牌号");
}
Cell cell = row.createCell(19);
Cell cell1 = row.createCell(20);
Cell cell2 = row.createCell(21);
Cell cell3 = row.createCell(22);
Cell cell4 = row.createCell(23);
Cell cell6 = row.createCell(25);
Cell cell7 = row.createCell(26);
Cell cell8 = row.createCell(27);
Cell cell5 = row.getCell(9);
Cell strCell1 = row.getCell(8);
Cell strCell2 = row.getCell(7);
Cell strCell3 = row.getCell(6);
Cell strCell4 = row.getCell(5);
Cell strCell5 = row.getCell(11);
Cell strCell6 = row.getCell(12);
Cell strCell7 = row.getCell(1);
Cell strCell8 = row.getCell(3);
if (i1 == 0) {
Row row1 = sheet.getRow(2);
Cell cell11 = row1.createCell(19);
cell11.setCellValue("磅单图片地址");
Cell cell22 = row1.createCell(20);
cell22.setCellValue("客户");
Cell cell33 = row1.createCell(21);
cell33.setCellValue("销售合同编码");
Cell cell44 = row1.createCell(22);
cell44.setCellValue("采购合同编码");
Cell cell55 = row1.createCell(23);
cell55.setCellValue("车辆图片地址");
Cell cell66 = row1.createCell(24);
cell66.setCellValue("错误原因");
Cell cell77 = row1.createCell(25);
cell77.setCellValue("司机姓名");
Cell cell88 = row1.createCell(26);
cell88.setCellValue("司机联系方式");
Cell cell99 = row1.createCell(27);
cell99.setCellValue("司机车牌号");
}
Object o1 = fileMap.get(String.valueOf(o));
Object o2 = carFileMap.get(String.valueOf(o));
VehiclePictureFolder vehiclePictureFolder1 = folderHashMap.get(String.valueOf(o));
cell.setCellValue(String.valueOf(o1).equals("null") ? "" : JsonUtil.getListToJsonArray((List<Map<String,Object>>)o1).toString());
cell4.setCellValue(String.valueOf(o2).equals("null") ? "" :JsonUtil.getListToJsonArray((List<Map<String,Object>>)o2).toString());
cell1.setCellValue(companyStr);
cell2.setCellValue(str);
cell3.setCellValue(str3);
cell5.setCellType(CellType.STRING);
cell5.setCellValue(FileCopy.setSteColumn(cell5));
cell6.setCellValue(vehiclePictureFolder1.getDriverName()!=null?vehiclePictureFolder1.getDriverName():"");
cell7.setCellValue(vehiclePictureFolder1.getPhoneNumber()!=null?vehiclePictureFolder1.getPhoneNumber():"");
cell8.setCellValue(vehiclePictureFolder1.getCarNumber()!=null?vehiclePictureFolder1.getCarNumber():"");
strCell1.setCellType(CellType.STRING);
strCell1.setCellValue(FileCopy.setSteColumn(strCell1));
strCell2.setCellType(CellType.STRING);
strCell2.setCellValue(FileCopy.setSteColumn(strCell2));
strCell3.setCellType(CellType.STRING);
strCell3.setCellValue(FileCopy.setSteColumn(strCell3));
strCell4.setCellType(CellType.STRING);
strCell4.setCellValue(FileCopy.setSteColumn(strCell4));
strCell5.setCellType(CellType.STRING);
strCell5.setCellValue(FileCopy.setSteColumn(strCell5));
strCell6.setCellType(CellType.STRING);
strCell6.setCellValue(FileCopy.setSteColumn(strCell6));
Object o1 = fileMap.get(String.valueOf(o));
Object o2 = carFileMap.get(String.valueOf(o));
VehiclePictureFolder vehiclePictureFolder1 = folderHashMap.get(String.valueOf(o));
cell.setCellValue(String.valueOf(o1).equals("null") ? "" : JsonUtil.getListToJsonArray((List<Map<String,Object>>)o1).toString());
cell4.setCellValue(String.valueOf(o2).equals("null") ? "" :JsonUtil.getListToJsonArray((List<Map<String,Object>>)o2).toString());
cell1.setCellValue(companyStr);
cell2.setCellValue(str);
cell3.setCellValue(str3);
cell5.setCellType(CellType.STRING);
cell5.setCellValue(FileCopy.setSteColumn(cell5));
if (vehiclePictureFolder1!=null){
cell6.setCellValue(vehiclePictureFolder1.getDriverName()!=null?vehiclePictureFolder1.getDriverName():"");
cell7.setCellValue(vehiclePictureFolder1.getPhoneNumber()!=null?vehiclePictureFolder1.getPhoneNumber():"");
cell8.setCellValue(vehiclePictureFolder1.getCarNumber()!=null?vehiclePictureFolder1.getCarNumber():"");
}
strCell1.setCellType(CellType.STRING);
strCell1.setCellValue(FileCopy.setSteColumn(strCell1));
strCell2.setCellType(CellType.STRING);
strCell2.setCellValue(FileCopy.setSteColumn(strCell2));
strCell3.setCellType(CellType.STRING);
strCell3.setCellValue(FileCopy.setSteColumn(strCell3));
strCell4.setCellType(CellType.STRING);
strCell4.setCellValue(FileCopy.setSteColumn(strCell4));
strCell5.setCellType(CellType.STRING);
strCell5.setCellValue(FileCopy.setSteColumn(strCell5));
strCell6.setCellType(CellType.STRING);
strCell6.setCellValue(FileCopy.setSteColumn(strCell6));
strCell8.setCellType(CellType.STRING);
strCell8.setCellValue(FileCopy.setSteColumn(strCell8));
// strCell7.setCellType(CellType.STRING);
String stringCellValue = VehiclePictureFolderUtils.getValue(strCell7);
String stringCellValue = VehiclePictureFolderUtils.getValue(strCell7);
// strCell7.setCellValue(stringCellValue);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//定义新的日期格式
SimpleDateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy/MM/dd K:mm:ss a");//定义新的日期格式
SimpleDateFormat formatter3 = new SimpleDateFormat("yyyy.MM.dd");//定义新的日期格式
//format():将给定的 Date 格式化为日期/时间字符串。即date--->String
try {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//定义新的日期格式
SimpleDateFormat formatter1 = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy/MM/dd K:mm:ss a");//定义新的日期格式
SimpleDateFormat formatter3 = new SimpleDateFormat("yyyy.MM.dd");//定义新的日期格式
//format():将给定的 Date 格式化为日期/时间字符串。即date--->String
try {
if (stringCellValue.contains("/")){
Date date = formatter2.parse(stringCellValue);//parse():String--->date
strCell7.setCellValue(formatter.format(date));
Date date = formatter2.parse(stringCellValue);//parse():String--->date
strCell7.setCellValue(formatter.format(date));
}
else if (stringCellValue.contains("-")&&stringCellValue.contains(":")){
Date date = formatter.parse(stringCellValue);//parse():String--->date
@ -258,34 +280,32 @@ public class FileCopy {
Date date = formatter3.parse(stringCellValue);//parse():String--->date
strCell7.setCellValue(formatter.format(date));
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
writer.flush(excelFile);
writer.close();
reader.close();
InputStream input = new FileInputStream(excelFile);
}
writer.flush(excelFile);
writer.close();
reader.close();
InputStream input = new FileInputStream(excelFile);
// MultipartFile multipartFile = new MultipartFileDto(file.getName(),input);
MultipartFile multipartFile = new MultipartFileDto(excelFile.getName(), excelFile.getName(), ContentType.JSON.toString(), FileCopyUtils.copyToByteArray(input));
UtilsController utilsController = SpringContext.getBean(UtilsController.class);
System.out.println(multipartFile.getName());
ActionResult annex = utilsController.uploader(multipartFile, "annex");
if (annex.getCode() == 200) {
UploaderVO fileLoader = (UploaderVO) annex.getData();
System.out.println(fileLoader);
System.out.println(fileLoader.getName());
resultList.add(fileLoader.getName());
resultList.add(carFileMap);
resultList.add(fileMap);
resultList.add(folderHashMap);
return resultList;
}
input.close();
MultipartFile multipartFile = new MultipartFileDto(excelFile.getName(), excelFile.getName(), ContentType.JSON.toString(), FileCopyUtils.copyToByteArray(input));
UtilsController utilsController = SpringContext.getBean(UtilsController.class);
System.out.println(multipartFile.getName());
ActionResult annex = utilsController.uploader(multipartFile, "annex");
if (annex.getCode() == 200) {
UploaderVO fileLoader = (UploaderVO) annex.getData();
System.out.println(fileLoader);
System.out.println(fileLoader.getName());
resultList.add(fileLoader.getName());
resultList.add(carFileMap);
resultList.add(fileMap);
resultList.add(folderHashMap);
return resultList;
}
input.close();
}
}

@ -147,8 +147,7 @@ public class PoundlistController {
}else{
return ActionResult.success(list);
}
}
else {
}else {
return ActionResult.fail("当前状态不能生成销售订单");
}
}
@ -589,6 +588,10 @@ public class PoundlistController {
PoundlistEntity entity= poundlistService.getInfo(id);
if(entity!=null){
entity.setIsExamine("0");
entity.setPurchaseId(null);
entity.setSupplierId(null);
entity.setSupplierName(null);
entity.setPurchasePrice(null);
poundlistService.updateById(entity);
return ActionResult.success("驳回成功");
}

@ -1,8 +1,10 @@
package jnpf.purchaseback.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.invoices.entity.InvoicesEntity;
import jnpf.purchaseback.entity.PurchasebackEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.purchaseback.model.purchaseback.PurchasebackPagination;
@ -18,5 +20,5 @@ import org.apache.ibatis.annotations.Param;
*/
public interface PurchasebackMapper extends BaseMapper<PurchasebackEntity> {
IPage<PurchasebackEntity> queryByKeyword(@Param("page") Page<PurchasebackEntity> page, @Param("purchasebackPagination") PurchasebackPagination purchasebackPagination);
IPage<PurchasebackEntity> queryByKeyword(@Param("page") Page<PurchasebackEntity> page, @Param("purchasebackPagination") PurchasebackPagination purchasebackPagination, @Param("ew") Wrapper<PurchasebackEntity> queryWrapper);
}

@ -76,6 +76,7 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
int total=0;
int purchasebackNum =0;
QueryWrapper<PurchasebackEntity> purchasebackQueryWrapper=new QueryWrapper<>();
purchasebackQueryWrapper.eq("a.delete_mark", "0");
int purchaseback_item0Num =0;
QueryWrapper<Purchaseback_item0Entity> purchaseback_item0QueryWrapper=new QueryWrapper<>();
int purchaseorderNum =0;
@ -85,7 +86,7 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object purchasebackObj=authorizeService.getCondition(new AuthorizeConditionModel(purchasebackQueryWrapper,purchasebackPagination.getMenuId(),"jg_purchaseback"));
Object purchasebackObj=authorizeService.getCondition2(new AuthorizeConditionModel(purchasebackQueryWrapper,purchasebackPagination.getMenuId(),"jg_purchaseback"));
if (ObjectUtil.isEmpty(purchasebackObj)){
return new ArrayList<>();
} else {
@ -110,7 +111,7 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object purchasebackObj=authorizeService.getCondition(new AuthorizeConditionModel(purchasebackQueryWrapper,purchasebackPagination.getMenuId(),"jg_purchaseback"));
Object purchasebackObj=authorizeService.getCondition2(new AuthorizeConditionModel(purchasebackQueryWrapper,purchasebackPagination.getMenuId(),"jg_purchaseback"));
if (ObjectUtil.isEmpty(purchasebackObj)){
return new ArrayList<>();
} else {
@ -174,7 +175,7 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
if (StringUtil.isNotNull(detpartment)) {
purchasebackPagination.setDepartmentId(detpartment);
}
IPage<PurchasebackEntity> userIPage = purchasebackMapper.queryByKeyword(page, purchasebackPagination);
IPage<PurchasebackEntity> userIPage = purchasebackMapper.queryByKeyword(page, purchasebackPagination, purchasebackQueryWrapper);
return purchasebackPagination.setData(userIPage.getRecords(),userIPage.getTotal());
/*if(StringUtil.isNotEmpty(purchasebackPagination.getDocumentNo())){
purchasebackNum++;

@ -16,6 +16,7 @@ import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil;
import jnpf.config.ToolUtils;
import jnpf.contractfile.entity.ContractFileEntity;
import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException;
@ -220,7 +221,7 @@ public class PurchaseorderController {
purchaseorder_item0Wrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
List<String> poundIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0Wrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<PoundlistEntity> poundlistEntityList = new ArrayList<>();
if(poundIdList.size() > 0){
if (poundIdList.size() > 0) {
poundlistEntityList = poundlistService.queryPoundListByIds(poundIdList);
}
purchaseorderVO.setPoundlistEntityList(poundlistEntityList);
@ -330,8 +331,8 @@ public class PurchaseorderController {
String s = UUID.randomUUID().toString();
cn.hutool.core.io.FileUtil.del(new File(configValueUtil.getTemporaryFilePath() +"unzip\\"+s+"\\"));
String filePath = configValueUtil.getTemporaryFilePath() + "unzip\\"+s+"\\";
cn.hutool.core.io.FileUtil.del(new File(configValueUtil.getTemporaryFilePath() + "unzip\\" + s + "\\"));
String filePath = configValueUtil.getTemporaryFilePath() + "unzip\\" + s + "\\";
// String fileName = RandomUtil.uuId() + "." + UpUtil.getFileType(file);
// fileName = XSSEscape.escape(fileName);
@ -343,12 +344,26 @@ public class PurchaseorderController {
InputStream inputStream = file.getInputStream();
File gbk = ZipUtil.unzip(inputStream, temporaryFile, Charset.forName("GBK"));
List<Object> resultList= FileCopy.getInfoAndUpFile(gbk.listFiles());
List<Object> resultList = null;
ToolUtils cache = new ToolUtils();
try {
resultList = FileCopy.getInfoAndUpFile(gbk.listFiles());
} catch (IOException e) {
log.info("loadProperties IOException:" + e.getMessage());
}
inputStream.close();
cache.forceDelete(temporaryFile);
// cn.hutool.core.io.FileUtil.del(temporaryFile);
// FileUtil.upFile(file, filePath, fileName);
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);
} else {
return ActionResult.fail("选择文件不符合导入");
@ -386,7 +401,9 @@ public class PurchaseorderController {
List<PurchaseorderDTO> dataList = JsonUtil.getJsonToList(data.getList(), PurchaseorderDTO.class);
//导入数据
PurchaseOrderImportVo result = purchaseorderitemService.importData(dataList);
return ActionResult.success(result);
System.out.println("这是错误的数据"+result);
Map<String, Object> stringObjectMap = JsonUtil.entityToMap(result);
return ActionResult.success(stringObjectMap);
}
@ -523,11 +540,11 @@ public class PurchaseorderController {
int i = 0;
for (String allId : idList) {
QueryWrapper<Purchaseorder_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId,allId);
queryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId, allId);
queryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(queryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
for (PoundlistEntity poundlistEntity: poundlistList) {
for (PoundlistEntity poundlistEntity : poundlistList) {
poundlistEntity.setPurchaseStatus("99");
}
poundlistService.updateBatchById(poundlistList);
@ -554,7 +571,7 @@ public class PurchaseorderController {
String[] idList = ids.split(",");
for (String id : idList) {
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
if(StringUtils.isNotEmpty(entity.getSupplierId())){
if (StringUtils.isNotEmpty(entity.getSupplierId())) {
SupplierEntity supplierEntity = supplierService.getById(entity.getSupplierId());
entity.setColectionBank(supplierEntity.getBank());
entity.setCollectionAccount(supplierEntity.getBankAccount());
@ -584,15 +601,15 @@ public class PurchaseorderController {
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
PurchaseorderInfoVO vo = JsonUtil.getJsonToBean(entity, PurchaseorderInfoVO.class);
vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName()));
if(StringUtils.isNotEmpty(vo.getSupplierId())) {
if (StringUtils.isNotEmpty(vo.getSupplierId())) {
SupplierEntity supplierEntity = supplierService.getById(vo.getSupplierId());
if (ObjectUtils.isNotEmpty(supplierEntity) && StringUtils.isNotEmpty(supplierEntity.getSupplierName())) {
vo.setSupplierName(supplierEntity.getSupplierName());
}
}
if (StringUtils.isNotEmpty(vo.getContractCode())){
if (StringUtils.isNotEmpty(vo.getContractCode())) {
ContractFileEntity contractFileEntity = contractFileService.getById(vo.getContractCode());
if (ObjectUtils.isNotEmpty(contractFileEntity) && StringUtils.isNotEmpty(contractFileEntity.getContractName())){
if (ObjectUtils.isNotEmpty(contractFileEntity) && StringUtils.isNotEmpty(contractFileEntity.getContractName())) {
vo.setContractName(contractFileEntity.getContractName());
}
}
@ -611,13 +628,13 @@ public class PurchaseorderController {
purchaseorder_item0Entity.setMaterialName(materialEntity.getItemName());
if (StringUtils.isNotEmpty(materialEntity.getInArea())) {
purchaseorder_item0Entity.setReservoirareaId(materialEntity.getInArea());
if(StringUtils.isNotEmpty(purchaseorder_item0Entity.getReservoirareaId())){
if (StringUtils.isNotEmpty(purchaseorder_item0Entity.getReservoirareaId())) {
ReservoirareaEntity reservoirareaEntity = reservoirareaService.getById(purchaseorder_item0Entity.getReservoirareaId());
if(reservoirareaEntity != null){
if (reservoirareaEntity != null) {
purchaseorder_item0Entity.setReservoirareaName(reservoirareaEntity.getAreaname());
if(StringUtils.isNotEmpty(reservoirareaEntity.getWarehouseId())){
if (StringUtils.isNotEmpty(reservoirareaEntity.getWarehouseId())) {
WareHouseEntity wareHouseEntity = wareHouseService.getById(reservoirareaEntity.getWarehouseId());
if(wareHouseEntity != null){
if (wareHouseEntity != null) {
purchaseorder_item0Entity.setWarehouseName(wareHouseEntity.getName());
}
}
@ -646,16 +663,16 @@ public class PurchaseorderController {
QueryWrapper<ReceiptinEntity> receiptinWrapper = new QueryWrapper<>();
receiptinWrapper.lambda().eq(ReceiptinEntity::getSouceno, id);
ReceiptinEntity receiptinEntity = receiptinService.getOne(receiptinWrapper);
if(receiptinEntity != null){
if (receiptinEntity != null) {
vo.setReceiptamount(receiptinEntity.getReceiptamount());
vo.setReceiptnum(receiptinEntity.getReceiptnum());
QueryWrapper<Receiptin_item0Entity> receiptinitem0Wrapper = new QueryWrapper<>();
receiptinitem0Wrapper.lambda().eq(Receiptin_item0Entity::getReceiptinId, receiptinEntity.getId());
List<Receiptin_item0Entity> receiptin_item0EntityList = receiptin_item0Service.list(receiptinitem0Wrapper);
receiptinEntity.setReceiptin_item0List(receiptin_item0EntityList);
vo.setReceiptin_item0List(JsonUtil.getJsonToList(receiptin_item0EntityList,Receiptin_item0Model.class ));
vo.setReceiptin_item0List(JsonUtil.getJsonToList(receiptin_item0EntityList, Receiptin_item0Model.class));
vo.setReceiptinEntity(receiptinEntity);
}else{
} else {
vo.setReceiptinEntity(new ReceiptinEntity());
}
@ -749,11 +766,6 @@ public class PurchaseorderController {
vo.setPaymentList(paymentList);
List<Receiptin_item0Entity> receiptin_item0itemList = purchaseorderitemService.GetReceiptin_item0itemList(id);
List<Receiptin_item0Model> jg_receiptin_item0ModelList = JsonUtil.getJsonToList(receiptin_item0itemList, Receiptin_item0Model.class);
vo.setReceiptin_item0List(jg_receiptin_item0ModelList);
@ -768,7 +780,7 @@ public class PurchaseorderController {
List<Receiptin_item0Entity> receiptin_item0EntityList = receiptin_item0Service.list(receiptinitem0Wrapper);
receiptinEntity.setReceiptin_item0List(receiptin_item0EntityList);
vo.setReceiptinEntity(receiptinEntity);
}else{
} else {
vo.setReceiptinEntity(new ReceiptinEntity());
}
QueryWrapper<PurchasebackEntity> purchasebackWrapper = new QueryWrapper<>();
@ -804,11 +816,11 @@ public class PurchaseorderController {
//添加到详情表单对象中
ContractFileEntity contractFileEntity = contractFileService.getInfo(vo.getContractCode());
if (ObjectUtils.isNotEmpty(contractFileEntity) && StringUtils.isNotEmpty(contractFileEntity.getContractName())){
if (ObjectUtils.isNotEmpty(contractFileEntity) && StringUtils.isNotEmpty(contractFileEntity.getContractName())) {
vo.setContractName(contractFileEntity.getContractName());
}
SupplierEntity supplierEntity = supplierService.getInfo(vo.getSupplierId());
if (ObjectUtils.isNotEmpty(supplierEntity) && StringUtils.isNotEmpty(supplierEntity.getSupplierName())){
if (ObjectUtils.isNotEmpty(supplierEntity) && StringUtils.isNotEmpty(supplierEntity.getSupplierName())) {
vo.setSupplierName(supplierEntity.getSupplierName());
}
// Map<String, Object> contractCodeMap = new HashMap<>();
@ -948,11 +960,11 @@ public class PurchaseorderController {
if (entity != null) {
purchaseorderitemService.delete(entity);
QueryWrapper<Purchaseorder_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId,entity.getId());
queryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId, entity.getId());
queryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(queryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<PoundlistEntity> poundlistList = poundlistService.listByIds(poundlistIdList);
for (PoundlistEntity poundlistEntity: poundlistList) {
for (PoundlistEntity poundlistEntity : poundlistList) {
poundlistEntity.setPurchaseStatus("99");
}
poundlistService.updateBatchById(poundlistList);
@ -975,6 +987,4 @@ public class PurchaseorderController {
}
return ActionResult.success("删除成功");
}
}
}

@ -13,7 +13,7 @@ import java.util.List;
* @Version 1.0
*/
@Data
public class PurchaseorderDTO {
public class PurchaseorderDTO implements Cloneable{
@Excel(name = "收货日期")
private String poundDate;
@ -94,4 +94,15 @@ public class PurchaseorderDTO {
private List<PurchaseorderDTO> list;
private String creatorTime;
@Override
public PurchaseorderDTO clone() throws CloneNotSupportedException {
try {
PurchaseorderDTO clone = (PurchaseorderDTO) super.clone();
// TODO: copy mutable state here, so the clone can't change the internals of the original
return clone;
} catch (CloneNotSupportedException e) {
throw new AssertionError();
}
}
}

@ -277,8 +277,6 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
lineCell11.setCellStyle(lineStyle);
String ss=String.valueOf(map.get("purchaseAmount")).equals("null") ? "" : String.valueOf(map.get("purchaseAmount"));
priceSum= priceSum.add(new BigDecimal(ss));
String s = String.valueOf(map.get("settlement")).equals("null") ? "0" : String.valueOf(map.get("settlement"));
sum = sum.add(new BigDecimal(s));
@ -598,7 +596,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
@Override
public void getPdfInfo(PurchaseorderitemEntity purchaseorderitemEntity, HttpServletResponse response) throws Exception {
// 临时文件夹地址
String templateFilePath = configValueUtil.getTemplateFilePath() + "info\\";
String s = UUID.randomUUID().toString();
String templateFilePath = configValueUtil.getTemplateFilePath() + "info\\"+s+"\\";
FileCopy.createFile(templateFilePath);
LambdaQueryWrapper<PurchaseorderitemEntity> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(PurchaseorderitemEntity::getDocumentNo,"cgdj2023020300000001");
@ -1522,7 +1521,12 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
BigDecimal depositAmount =BigDecimal.ZERO;
for (int i = 0; i < num1; i++) {
PurchaseorderDTO model = dataList.get(i);
PurchaseorderDTO dto = null;
try {
dto = model.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
//// 收获日期
// if (model.getPoundDate() != null && !model.getPoundDate().isEmpty() && !model.getPoundDate().equals("null")) {
@ -1613,8 +1617,9 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
model.setVehicleId(aLong.toString());
}
}else {
model.setCauseError("目录名称的车牌号对应不上表格中的请检查excel中的车牌号为"+model.getVehicleId()+",目录中车牌号为:"+model.getDriverVehicleId());
errList.add(model);
dto.setCauseError("目录名称的车牌号对应不上表格中的请检查excel中的车牌号为"+model.getVehicleId()+",目录中车牌号为:"+model.getDriverVehicleId());
errList.add(dto);
ints.add(i);
continue;
}
@ -1662,8 +1667,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
model.setVehicleId(aLong.toString());
}
}else {
model.setCauseError("车牌号不存在!请添加车辆信息在尝试添加!");
errList.add(model);
dto.setCauseError("车牌号不存在!请添加车辆信息在尝试添加!");
errList.add(dto);
ints.add(i);
continue;
}
@ -1676,8 +1681,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (materialEntityList != null && materialEntityList.size() > 0) {
model.setMaterialId(materialEntityList.get(0).getId());
} else {
model.setCauseError("货物信息不存在!请添加货物信息后尝试添加!");
errList.add(model);
dto.setCauseError("货物信息不存在!请添加货物信息后尝试添加!");
errList.add(dto);
ints.add(i);
continue;
}
@ -1690,8 +1695,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (naturalEntityList != null && naturalEntityList.size() > 0) {
model.setNaturalId(naturalEntityList.get(0).getId());
} else {
model.setCauseError("业务员2信息不存在请添加业务员2信息后尝试添加");
errList.add(model);
dto.setCauseError("业务员2信息不存在请添加业务员2信息后尝试添加");
errList.add(dto);
ints.add(i);
continue;
}
@ -1710,8 +1715,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
model.setSupplierId(contractMEntities.get(0).getCode());
} else {
model.setCauseError("采购合同不存在!请添加采购合同后尝试添加!");
errList.add(model);
dto.setCauseError("采购合同不存在!请添加采购合同后尝试添加!");
errList.add(dto);
ints.add(i);
continue;
}
@ -1732,8 +1737,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
// 客户
model.setCustomerId(contractMEntities.get(0).getCode());
} else {
model.setCauseError("销售合同不存在!请添加销售合同后尝试添加!");
errList.add(model);
dto.setCauseError("销售合同不存在!请添加销售合同后尝试添加!");
errList.add(dto);
ints.add(i);
continue;
}
@ -1742,8 +1747,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (model.getPoundPictures()!=null&&!model.getPoundPictures().isEmpty()){
}else {
model.setCauseError("磅单照片导入失败!请重新导入!");
errList.add(model);
dto.setCauseError("磅单照片导入失败!请重新导入!");
errList.add(dto);
ints.add(i);
continue;
}
@ -1751,8 +1756,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (model.getCarPictures()!=null&&!model.getCarPictures().isEmpty()){
}else {
model.setCauseError("车辆照片导入失败!请重新导入!");
errList.add(model);
dto.setCauseError("车辆照片导入失败!请重新导入!");
errList.add(dto);
ints.add(i);
continue;
}
@ -1795,153 +1800,155 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
model.setOriginPrice(JsonUtil.getListToJsonArray(strings).toJSONString());
}
} else {
model.setCauseError("发货地格式不正确!请修改后重新添加!");
errList.add(model);
dto.setCauseError("发货地格式不正确!请修改后重新添加!");
errList.add(dto);
ints.add(i);
continue;
}
}
} else {
ints.add(i);
errList.add(model);
errList.add(dto);
}
}
// 错误信息
ArrayList<PurchaseorderDTO> dtos = new ArrayList<>();
for (int i = 0; i < ints.size(); i++) {
Integer integer = ints.get(i);
dtos.add(dataList.get(integer));
}
if (ints.size()==0){
// 错误信息
ArrayList<PurchaseorderDTO> dtos = new ArrayList<>();
for (int i = 0; i < ints.size(); i++) {
Integer integer = ints.get(i);
dtos.add(dataList.get(integer));
}
// 移除错误的信息
for (int i = 0; i < dtos.size(); i++) {
PurchaseorderDTO purchaseorderDTO = dtos.get(i);
dataList.remove(purchaseorderDTO);
}
BillRuleController bean = SpringContext.getBean(BillRuleController.class);
String str2 = "purchase";
// 采购订单表
PurchaseorderitemEntity purEntities = new PurchaseorderitemEntity();
for (int i = 0; i < dtos.size(); i++) {
PurchaseorderDTO purchaseorderDTO = dtos.get(i);
dataList.remove(purchaseorderDTO);
}
BillRuleController bean = SpringContext.getBean(BillRuleController.class);
String str2 = "purchase";
// 采购订单表
PurchaseorderitemEntity purEntities = new PurchaseorderitemEntity();
// 采购订单明细
ArrayList<Purchaseorder_item0Entity> purItemEntities = new ArrayList<>();
// num重量采购订单子表【settlement】结算重量汇总得到
BigDecimal settlementNum = new BigDecimal("0.00");
//amount金额采购订单子表【amount】金额汇总得到
BigDecimal amoutSum = new BigDecimal("0.00");
//not_amount不含税金额采购订单子表【not_amount】不含税金额汇总得到
BigDecimal notAmountSum = new BigDecimal("0.00");
ArrayList<Purchaseorder_item0Entity> purItemEntities = new ArrayList<>();
// num重量采购订单子表【settlement】结算重量汇总得到
BigDecimal settlementNum = new BigDecimal("0.00");
//amount金额采购订单子表【amount】金额汇总得到
BigDecimal amoutSum = new BigDecimal("0.00");
//not_amount不含税金额采购订单子表【not_amount】不含税金额汇总得到
BigDecimal notAmountSum = new BigDecimal("0.00");
// rate税额采购订单【amount金额】-【not_amount不含税金额】
BigDecimal rateSum = new BigDecimal("0.00");
BigDecimal rateSum = new BigDecimal("0.00");
// advance_amount垫资金额判断采购订单子表中有多少磅单是属于垫资的找到之后将他们的【金额】进行汇总得到。
// BigDecimal advanceSum = new BigDecimal("0.00");
if (dataList.size() > 0) {
// 合同id
String purchaseId = dataList.get(0).getPurchaseId();
LambdaQueryWrapper<ContractMEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ContractMEntity::getContractType, "0");
wrapper.eq(ContractMEntity::getId, purchaseId);
List<ContractMEntity> contractMEntities = contractMapper.selectList(wrapper);
if (dataList.size() > 0) {
// 合同id
String purchaseId = dataList.get(0).getPurchaseId();
LambdaQueryWrapper<ContractMEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ContractMEntity::getContractType, "0");
wrapper.eq(ContractMEntity::getId, purchaseId);
List<ContractMEntity> contractMEntities = contractMapper.selectList(wrapper);
// if (contractMEntities != null && contractMEntities.size() > 0) {
// 采购合同
ContractMEntity contractMEntity = contractMEntities.get(0);
// 采购合同
ContractMEntity contractMEntity = contractMEntities.get(0);
//雪花算法获取采购订单id
Long aLong = new DefaultIdentifierGenerator().nextId(PurchaseorderitemEntity.class);
Long aLong = new DefaultIdentifierGenerator().nextId(PurchaseorderitemEntity.class);
//采购
for (int i = 0; i < dataList.size(); i++) {
PurchaseorderDTO model = dataList.get(i);
Purchaseorder_item0Entity item0 = new Purchaseorder_item0Entity();
Long aLong2 = new DefaultIdentifierGenerator().nextId(Purchaseorder_item0Entity.class);
for (int i = 0; i < dataList.size(); i++) {
PurchaseorderDTO model = dataList.get(i);
Purchaseorder_item0Entity item0 = new Purchaseorder_item0Entity();
Long aLong2 = new DefaultIdentifierGenerator().nextId(Purchaseorder_item0Entity.class);
// 雪花算法获取磅单id
Long aLong1 = new DefaultIdentifierGenerator().nextId(PoundlistEntity.class);
model.setId(aLong1.toString());
Long aLong1 = new DefaultIdentifierGenerator().nextId(PoundlistEntity.class);
model.setId(aLong1.toString());
// 设置id
item0.setId(aLong2.toString());
item0.setId(aLong2.toString());
// 主表Id
item0.setPurchaseorderId(aLong.toString());
item0.setPurchaseorderId(aLong.toString());
//poundlist_id磅单id
item0.setPoundlistId(aLong1.toString());
item0.setPoundlistId(aLong1.toString());
//price单价为execl中的采购单价
BigDecimal pricePur = new BigDecimal(model.getPurchasePrice());
BigDecimal settlem = model.getSettlement();
BigDecimal pricePur = new BigDecimal(model.getPurchasePrice());
BigDecimal settlem = model.getSettlement();
// 采购额/结算重量
item0.setPrice(pricePur.divide(settlem,6, RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
item0.setPrice(pricePur.divide(settlem,6, RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
//settlement结算重量为execl中的结算重量
item0.setSettlement(model.getSettlement());
item0.setSettlement(model.getSettlement());
//rate税率默认为0 即13个点
item0.setRate("0");
item0.setRate("0");
// 单位
item0.setUnit(model.getUnit());
item0.setUnit(model.getUnit());
//amount金额price*settlement保留6位小数
item0.setAmount(new BigDecimal(model.getPurchasePrice()));
item0.setAmount(new BigDecimal(model.getPurchasePrice()));
//not_amount不含税金额price*settlement*(1 - 税率) 不含税价格为sum/1.13=price
item0.setNotAmount(item0.getAmount().divide(BigDecimal.valueOf(1 + 0.13),6, RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
item0.setNotAmount(item0.getAmount().divide(BigDecimal.valueOf(1 + 0.13),6, RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
//vehicle_id车辆id磅单c表车辆id
item0.setVehicleId(model.getVehicleId());
item0.setVehicleId(model.getVehicleId());
//material_id物料id磅单表物料id
item0.setMaterialId(model.getMaterialId());
item0.setMaterialId(model.getMaterialId());
//supplier_id供应商id磅单表供应商id
item0.setSupplierId(contractMEntity.getCode());
item0.setSupplierId(contractMEntity.getCode());
//是否垫资
item0.setAdvance(model.getAdvance());
if(!StringUtil.isEmpty(model.getNetWeight())){
item0.setNetWeight(new BigDecimal(model.getNetWeight()));
}
item0.setAdvance(model.getAdvance());
if(!StringUtil.isEmpty(model.getNetWeight())){
item0.setNetWeight(new BigDecimal(model.getNetWeight()));
}
//结算重量汇总到主表
settlementNum = settlementNum.add(item0.getSettlement());
settlementNum = settlementNum.add(item0.getSettlement());
////垫资金额
// if (model.getAdvance().equals("是")) {
// advanceSum = advanceSum.add(item0.getSettlement());
// }
//金额
amoutSum = amoutSum.add(item0.getAmount());
amoutSum = amoutSum.add(item0.getAmount());
// 不含税金额
notAmountSum = notAmountSum.add(item0.getNotAmount());
notAmountSum = notAmountSum.add(item0.getNotAmount());
purItemEntities.add(item0);
purItemEntities.add(item0);
if (i == dataList.size() - 1) {
PurchaseorderitemEntity entity = new PurchaseorderitemEntity();
if (i == dataList.size() - 1) {
PurchaseorderitemEntity entity = new PurchaseorderitemEntity();
// id
entity.setId(aLong.toString());
// 税额rateSum
rateSum = amoutSum.subtract(notAmountSum);
entity.setId(aLong.toString());
// 税额rateSum
rateSum = amoutSum.subtract(notAmountSum);
// 生成的采购编码
ActionResult pdBillNumber = bean.getBillNumber(str2);
entity.setDocumentNo(String.valueOf(pdBillNumber.getData()));
ActionResult pdBillNumber = bean.getBillNumber(str2);
entity.setDocumentNo(String.valueOf(pdBillNumber.getData()));
// 合同id
entity.setContractCode(contractMEntities.get(0).getId());
entity.setContractCode(contractMEntities.get(0).getId());
// 合同名称
// entity.setContractName(contractMEntities.get(0).getContractName());
// 来源系统
entity.setSourceSystem("0");
entity.setSourceSystem("0");
// 是否结算
entity.setIsSettle("0");
entity.setIsSettle("0");
//是否转销售
entity.setIsSettle("0");
entity.setIsSettle("0");
// 是否付款申请
entity.setIsPayment("0");
entity.setIsPayment("0");
// 对方合同号
entity.setContractNo(contractMEntities.get(0).getContractNo());
entity.setContractNo(contractMEntities.get(0).getContractNo());
// 供应商、客户ID
entity.setSupplierId(contractMEntities.get(0).getCode());
entity.setSupplierId(contractMEntities.get(0).getCode());
// 供应商名称
entity.setSupplierName(contractMEntities.get(0).getName());
entity.setSupplierName(contractMEntities.get(0).getName());
// 重量
entity.setNum(settlementNum);
entity.setNum(settlementNum);
// 金额
entity.setAmount(amoutSum);
entity.setAmount(amoutSum);
// 不含税金额
entity.setNotAmount(notAmountSum);
entity.setNotAmount(notAmountSum);
// 税额
entity.setRate(rateSum);
entity.setRate(rateSum);
// 垫资金额
entity.setAdvanceAmount(depositAmount);
purEntities = entity;
entity.setAdvanceAmount(depositAmount);
purEntities = entity;
}
}
}
// } else {
@ -1949,54 +1956,59 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
// errList.addAll(dataList);
// }
for (int i = 0; i < ints.size(); i++) {
Integer integer = ints.get(i);
dataList.remove(integer);
}
List<PoundlistEntity> entitys = JsonUtil.getJsonToList(dataList, PoundlistEntity.class);
for (int i = 0; i < ints.size(); i++) {
Integer integer = ints.get(i);
dataList.remove(integer);
}
List<PoundlistEntity> entitys = JsonUtil.getJsonToList(dataList, PoundlistEntity.class);
String str1 = "poundlist";
int i5 = 0;
for (PoundlistEntity model : entitys) {
PurchaseorderDTO purchaseorderDTO = dataList.get(i5);
String str1 = "poundlist";
int i5 = 0;
for (PoundlistEntity model : entitys) {
PurchaseorderDTO purchaseorderDTO = dataList.get(i5);
// 生成的磅单编码
ActionResult pdBillNumber = bean.getBillNumber(str1);
model.setPoundlistNo(String.valueOf(pdBillNumber.getData()));
model.setSupplierName(contractMEntities.get(0).getName());
ActionResult pdBillNumber = bean.getBillNumber(str1);
model.setPoundlistNo(String.valueOf(pdBillNumber.getData()));
model.setSupplierName(contractMEntities.get(0).getName());
// 车辆信息
model.setVehiclePictures(purchaseorderDTO.getCarPictures());
BigDecimal settlement = model.getSettlement();
BigDecimal purchasePrice = model.getPurchasePrice();
model.setVehiclePictures(purchaseorderDTO.getCarPictures());
BigDecimal settlement = model.getSettlement();
BigDecimal purchasePrice = model.getPurchasePrice();
// 采购单价
model.setPurchasePrice(purchasePrice.divide(settlement,6, RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
BigDecimal salesPrice = model.getSalesPrice();
model.setPurchasePrice(purchasePrice.divide(settlement,6, RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
BigDecimal salesPrice = model.getSalesPrice();
// 销售单价
model.setSalesPrice(salesPrice.divide(settlement, 6,RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
model.setSalesPrice(salesPrice.divide(settlement, 6,RoundingMode.CEILING).setScale(6, RoundingMode.HALF_UP));
// 是否审核
model.setIsExamine("1");
model.setIsExamine("1");
// 磅单类型
model.setPoundType("0");
model.setPurchaseStatus("0");
model.setPoundType("0");
model.setPurchaseStatus("0");
// 业务员默认当前操作人
String userId = userProvider.get().getUserId();
model.setBusinessId(userId);
sum += poundlistMapper.insert(model);
i5++;
}
String userId = userProvider.get().getUserId();
model.setBusinessId(userId);
sum += poundlistMapper.insert(model);
i5++;
}
// 磅单逻辑
//进行数据添加
int insert = purchaseorderitemMapper.insert(purEntities);
for (int i = 0; i < purItemEntities.size(); i++) {
int insert = purchaseorderitemMapper.insert(purEntities);
for (int i = 0; i < purItemEntities.size(); i++) {
Purchaseorder_item0Entity entity = purItemEntities.get(i);
purchaseorderItem0Mapper.insert(entity);
Purchaseorder_item0Entity entity = purItemEntities.get(i);
purchaseorderItem0Mapper.insert(entity);
}
}
}
PurchaseOrderImportVo importVo = new PurchaseOrderImportVo();
num = errList.size();
num = errList.size();
importVo.setSnum(sum);
importVo.setFnum(num);
importVo.setFailResult(errList);

@ -5,6 +5,7 @@ import jnpf.util.StringUtil;
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.junit.jupiter.api.Test;
import java.text.DateFormat;
import java.text.DecimalFormat;
@ -73,10 +74,10 @@ public class VehiclePictureFolderUtils {
return vehiclePictureFolder;
}
// @Test
// public void test1(){ System.out.println(
// VehiclePictureFolderUtils.getVehiclePictureFolder("1-豫AS0K91-李高洋"));
// }
@Test
public void test1(){ System.out.println(
VehiclePictureFolderUtils.getVehiclePictureFolder("2-皖D39239-13955463796"));
}

@ -19,6 +19,7 @@ import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.service.PurchaseorderService;
import jnpf.purchaseorder.entity.Purchaseorder_item0Entity;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import jnpf.purchaseorder.service.PurchaseorderitemService;
import jnpf.reservoirarea.entity.ReservoirareaEntity;
@ -56,6 +57,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.util.*;
import java.util.stream.Collectors;
import jnpf.util.file.UploadUtil;
import jnpf.util.enums.FileTypeEnum;
@ -121,9 +123,9 @@ public class ReceiptinController {
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
}*/
List<ReceiptinListVO> listVO=JsonUtil.getJsonToList(list,ReceiptinListVO.class);
/*for(ReceiptinListVO receiptinVO:listVO){
for(ReceiptinListVO receiptinVO:listVO){
}
*/
PageListVO vo=new PageListVO();
vo.setList(listVO);
@ -339,19 +341,23 @@ public class ReceiptinController {
//子表
List<Receiptin_item0Entity> Receiptin_item0List = receiptinService.GetReceiptin_item0List(id);
for(Receiptin_item0Entity receiptin_item0Entity : Receiptin_item0List){
if(StringUtils.isNotEmpty(receiptin_item0Entity.getReservoirareaId())){
for(Receiptin_item0Entity receiptin_item0Entity : Receiptin_item0List) {
if (StringUtils.isNotEmpty(receiptin_item0Entity.getReservoirareaId())) {
ReservoirareaEntity reservoirareaEntity = reservoirareaService.getById(receiptin_item0Entity.getReservoirareaId());
if(reservoirareaEntity != null){
if (reservoirareaEntity != null) {
receiptin_item0Entity.setReservoirareaName(reservoirareaEntity.getAreaname());
}
}
if(StringUtils.isNotEmpty(receiptin_item0Entity.getWarehouseId())){
if (StringUtils.isNotEmpty(receiptin_item0Entity.getWarehouseId())) {
WareHouseEntity wareHouseEntity = wareHouseService.getById(receiptin_item0Entity.getWarehouseId());
if(wareHouseEntity != null){
if (wareHouseEntity != null) {
receiptin_item0Entity.setWarehouseName(wareHouseEntity.getName());
}
}
if (StringUtils.isNotEmpty(receiptin_item0Entity.getPoundlistId())) {
PoundlistEntity poundlistEntity = poundlistService.getById(receiptin_item0Entity.getPoundlistId());
receiptin_item0Entity.setPoundlistEntity(poundlistEntity);
}
}
vo.setReceiptin_item0List(JsonUtil.getJsonToList(Receiptin_item0List,Receiptin_item0Model.class ));
//副表

@ -2,6 +2,7 @@ package jnpf.receiptin.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data;
import java.util.Date;
@ -9,6 +10,8 @@ import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -127,4 +130,7 @@ public class Receiptin_item0Entity {
@TableField(exist = false)
private String reservoirareaName;
@TableField(exist = false)
private PoundlistEntity poundlistEntity;
}

@ -2,6 +2,7 @@ package jnpf.receiptin.model.receiptin;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data;
import java.util.List;
import java.util.Date;
@ -97,4 +98,7 @@ public class Receiptin_item0Model {
@JsonProperty("reservoirareaName")
private String reservoirareaName;
@JsonProperty("poundlistEntity")
private PoundlistEntity poundlistEntity;
}

@ -1,8 +1,10 @@
package jnpf.receiptout.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.receiptout.entity.ReceiptoutEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.receiptout.model.receiptout.ReceiptoutPagination;
@ -19,5 +21,5 @@ import org.apache.ibatis.annotations.Param;
* 2023-02-24
*/
public interface ReceiptoutMapper extends BaseMapper<ReceiptoutEntity> {
IPage<ReceiptoutEntity> queryReceiptout(@Param("page") Page<ReceiptoutEntity> page, @Param("receiptoutPagination") ReceiptoutPagination receiptoutPagination);
IPage<ReceiptoutEntity> queryReceiptout(@Param("page") Page<ReceiptoutEntity> page, @Param("receiptoutPagination") ReceiptoutPagination receiptoutPagination, @Param("ew") Wrapper<ReceiptoutEntity> queryWrapper);
}

@ -74,6 +74,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
int total=0;
int receiptoutNum =0;
QueryWrapper<ReceiptoutEntity> receiptoutQueryWrapper=new QueryWrapper<>();
receiptoutQueryWrapper.eq("a.delete_mark", "0");
int receiptout_item0Num =0;
QueryWrapper<Receiptout_item0Entity> receiptout_item0QueryWrapper=new QueryWrapper<>();
boolean pcPermission = true;
@ -81,7 +82,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object receiptoutObj=authorizeService.getCondition(new AuthorizeConditionModel(receiptoutQueryWrapper,receiptoutPagination.getMenuId(),"jg_receiptout"));
Object receiptoutObj=authorizeService.getCondition2(new AuthorizeConditionModel(receiptoutQueryWrapper,receiptoutPagination.getMenuId(),"jg_receiptout"));
if (ObjectUtil.isEmpty(receiptoutObj)){
return new ArrayList<>();
} else {
@ -99,7 +100,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object receiptoutObj=authorizeService.getCondition(new AuthorizeConditionModel(receiptoutQueryWrapper,receiptoutPagination.getMenuId(),"jg_receiptout"));
Object receiptoutObj=authorizeService.getCondition2(new AuthorizeConditionModel(receiptoutQueryWrapper,receiptoutPagination.getMenuId(),"jg_receiptout"));
if (ObjectUtil.isEmpty(receiptoutObj)){
return new ArrayList<>();
} else {
@ -119,7 +120,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
}
}
if(StringUtil.isNotEmpty(receiptoutPagination.getDocumentNo())){
/* if(StringUtil.isNotEmpty(receiptoutPagination.getDocumentNo())){
receiptoutNum++;
receiptoutQueryWrapper.lambda().like(ReceiptoutEntity::getDocumentNo,receiptoutPagination.getDocumentNo());
}
@ -134,7 +135,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
Long sec = Long.valueOf(creatorTime.get(1));
receiptoutPagination.setStartDate(new Date(fir));
receiptoutPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
}*/
if(AllIdList.size()>0){
receiptoutQueryWrapper.lambda().in(ReceiptoutEntity::getId, AllIdList);
@ -176,7 +177,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
if (StringUtil.isNotNull(detpartment)) {
receiptoutPagination.setDepartmentId(detpartment);
}
IPage<ReceiptoutEntity> userIPage=receiptoutMapper.queryReceiptout(page, receiptoutPagination);
IPage<ReceiptoutEntity> userIPage=receiptoutMapper.queryReceiptout(page, receiptoutPagination, receiptoutQueryWrapper);
return receiptoutPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}
@Override

@ -1,8 +1,10 @@
package jnpf.saleback.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.receiptout.entity.ReceiptoutEntity;
import jnpf.saleback.entity.SalebackEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.saleback.entity.Saleback_item0Entity;
@ -23,7 +25,7 @@ import java.util.List;
* 2023-01-13
*/
public interface SalebackMapper extends BaseMapper<SalebackEntity> {
IPage<SalebackEntity> querySaleBack(@Param("page") Page<SalebackEntity> page, @Param("salebackPagination") SalebackPagination salebackPagination);
IPage<SalebackEntity> querySaleBack(@Param("page") Page<SalebackEntity> page, @Param("salebackPagination") SalebackPagination salebackPagination, @Param("ew") Wrapper<SalebackEntity> queryWrapper);
List<Saleback_item0Entity> querySaleBackItem(String id);
}

@ -72,6 +72,7 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
int total=0;
int salebackNum =0;
QueryWrapper<SalebackEntity> salebackQueryWrapper=new QueryWrapper<>();
salebackQueryWrapper.eq("a.delete_mark", "0");
int saleback_item0Num =0;
QueryWrapper<Saleback_item0Entity> saleback_item0QueryWrapper=new QueryWrapper<>();
@ -80,7 +81,7 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object salebackObj=authorizeService.getCondition(new AuthorizeConditionModel(salebackQueryWrapper,salebackPagination.getMenuId(),"jg_saleback"));
Object salebackObj=authorizeService.getCondition2(new AuthorizeConditionModel(salebackQueryWrapper,salebackPagination.getMenuId(),"jg_saleback"));
if (ObjectUtil.isEmpty(salebackObj)){
return new ArrayList<>();
} else {
@ -98,7 +99,7 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object salebackObj=authorizeService.getCondition(new AuthorizeConditionModel(salebackQueryWrapper,salebackPagination.getMenuId(),"jg_saleback"));
Object salebackObj=authorizeService.getCondition2(new AuthorizeConditionModel(salebackQueryWrapper,salebackPagination.getMenuId(),"jg_saleback"));
if (ObjectUtil.isEmpty(salebackObj)){
return new ArrayList<>();
} else {
@ -119,20 +120,6 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
}
}
if(StringUtil.isNotEmpty(salebackPagination.getDocumentNo())){
salebackNum++;
salebackQueryWrapper.lambda().like(SalebackEntity::getDocumentNo,salebackPagination.getDocumentNo());
}
if(StringUtil.isNotEmpty(salebackPagination.getCreatorTime())){
List<String> creatorTime = salebackPagination.getCreatorTime();
Long fir = Long.valueOf(creatorTime.get(0));
Long sec = Long.valueOf(creatorTime.get(1));
salebackPagination.setStartDate(new Date(fir));
salebackPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
// saleorderitemQueryWrapper.lambda().ge(SaleorderitemEntity::getCreatorTime, new Date(fir))
// .le(SaleorderitemEntity::getCreatorTime, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(AllIdList.size()>0){
salebackQueryWrapper.lambda().in(SalebackEntity::getId, AllIdList);
@ -174,7 +161,7 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
if (StringUtil.isNotNull(detpartment)) {
salebackPagination.setDepartmentId(detpartment);
}
IPage<SalebackEntity> userIPage=salebackMapper.querySaleBack(page, salebackPagination);
IPage<SalebackEntity> userIPage=salebackMapper.querySaleBack(page, salebackPagination, salebackQueryWrapper);
return salebackPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}
@Override

@ -34,6 +34,8 @@ import jnpf.materialvo.service.MaterialService;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
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.service.Receiptin_item0Service;
import jnpf.receiptout.entity.ReceiptoutEntity;
@ -166,6 +168,8 @@ public class SaleorderitemController {
private CustomerService customerService;
@Autowired
private VehicleService vehicleService;
@Autowired
private PurchaseorderitemService purchaseorderitemService;
/**
*
@ -540,36 +544,15 @@ public class SaleorderitemController {
entitys.setSalesOrderId(entity.getId());
salesorder_item0Service.save(entitys);
}
/* List<ReceiptoutsoitemEntity> ReceiptoutsoitemList = JsonUtil.getJsonToList(saleorderitemCrForm.getReceiptoutsoitemList(),ReceiptoutsoitemEntity.class);
for(ReceiptoutsoitemEntity entitys : ReceiptoutsoitemList){
entitys.setId(RandomUtil.uuId());
entitys.setSourceNo(entity.getDocumentNo());
receiptoutsoitemService.save(entitys);
}
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);
if (StringUtils.isNotEmpty(saleorderitemCrForm.getIsTransfer()) && saleorderitemCrForm.getIsTransfer().equals("1")){
if (StringUtils.isNotEmpty(saleorderitemCrForm.getPurchaseOrderId())){
PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getById(saleorderitemCrForm.getPurchaseOrderId());
if (ObjectUtils.isNotEmpty(purchaseorderitemEntity)){
purchaseorderitemEntity.setIsTransfer("1");
purchaseorderitemService.updateById(purchaseorderitemEntity);
}
}
}
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("创建成功");
}

@ -1,12 +1,14 @@
package jnpf.saleorder.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.arinvoices.entity.ArinvoicesEntity;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.model.poundlist.PoundlistPagination;
import jnpf.receiptout.entity.Receiptout_item0Entity;
import jnpf.saleback.entity.SalebackEntity;
import jnpf.saleorder.entity.SaleorderitemEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.saleorder.entity.Salesorder_item0Entity;
@ -24,7 +26,7 @@ import java.util.List;
* 2023-02-22
*/
public interface SaleorderitemMapper extends BaseMapper<SaleorderitemEntity> {
IPage<SaleorderitemEntity> querySalesOrder(@Param("page") Page<SaleorderitemEntity> page, @Param("saleorderitemPagination") SaleorderitemPagination saleorderitemPagination);
IPage<SaleorderitemEntity> querySalesOrder(@Param("page") Page<SaleorderitemEntity> page, @Param("saleorderitemPagination") SaleorderitemPagination saleorderitemPagination, @Param("ew") Wrapper<SaleorderitemEntity> queryWrapper);
PoundlistEntity queryPoundlist(String poundlistId);
List<Salesorder_item0Entity> querySaleOrderItem(String id);
List<Receiptout_item0Entity> queryReceiptoutItem(String id);

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

@ -93,6 +93,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
int total=0;
int saleorderitemNum =0;
QueryWrapper<SaleorderitemEntity> saleorderitemQueryWrapper=new QueryWrapper<>();
saleorderitemQueryWrapper.eq("a.delete_mark","0");
int salesorder_item0Num =0;
QueryWrapper<Salesorder_item0Entity> salesorder_item0QueryWrapper=new QueryWrapper<>();
int receiptoutsoitemNum =0;
@ -110,7 +111,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object saleorderitemObj=authorizeService.getCondition(new AuthorizeConditionModel(saleorderitemQueryWrapper,saleorderitemPagination.getMenuId(),"jg_saleorder"));
Object saleorderitemObj=authorizeService.getCondition2(new AuthorizeConditionModel(saleorderitemQueryWrapper,saleorderitemPagination.getMenuId(),"jg_saleorder"));
if (ObjectUtil.isEmpty(saleorderitemObj)){
return new ArrayList<>();
} else {
@ -163,7 +164,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object saleorderitemObj=authorizeService.getCondition(new AuthorizeConditionModel(saleorderitemQueryWrapper,saleorderitemPagination.getMenuId(),"jg_saleorder"));
Object saleorderitemObj=authorizeService.getCondition2(new AuthorizeConditionModel(saleorderitemQueryWrapper,saleorderitemPagination.getMenuId(),"jg_saleorder"));
if (ObjectUtil.isEmpty(saleorderitemObj)){
return new ArrayList<>();
} else {
@ -228,27 +229,6 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
}
}
if(StringUtil.isNotEmpty(saleorderitemPagination.getDocumentNo())){
saleorderitemNum++;
saleorderitemQueryWrapper.lambda().like(SaleorderitemEntity::getDocumentNo,saleorderitemPagination.getDocumentNo());
}
if(StringUtil.isNotEmpty(saleorderitemPagination.getStatus())){
saleorderitemNum++;
saleorderitemQueryWrapper.lambda().eq(SaleorderitemEntity::getStatus,saleorderitemPagination.getStatus());
}
if(StringUtil.isNotEmpty(saleorderitemPagination.getCreatorTime())){
saleorderitemNum++;
List<String> creatorTime = saleorderitemPagination.getCreatorTime();
Long fir = Long.valueOf(creatorTime.get(0));
Long sec = Long.valueOf(creatorTime.get(1));
saleorderitemPagination.setStartDate(new Date(fir));
saleorderitemPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
saleorderitemQueryWrapper.lambda().ge(SaleorderitemEntity::getCreatorTime, new Date(fir))
.le(SaleorderitemEntity::getCreatorTime, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(AllIdList.size()>0){
saleorderitemQueryWrapper.lambda().in(SaleorderitemEntity::getId, AllIdList);
}
@ -291,7 +271,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
}
IPage<SaleorderitemEntity> userIPage=saleorderitemMapper.querySalesOrder(page, saleorderitemPagination);
IPage<SaleorderitemEntity> userIPage=saleorderitemMapper.querySalesOrder(page, saleorderitemPagination, saleorderitemQueryWrapper);
return saleorderitemPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}
@Override

@ -55,6 +55,7 @@ import javax.validation.Valid;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -538,6 +539,8 @@ public class TradeuploadController {
return ActionResult.fail("磅单重复");
}
entity.setId(mainId);
BigDecimal netWeight = new BigDecimal(tradeuploadCrForm.getNetWeight());
entity.setSettlement(netWeight);
tradeuploadService.save(entity);
return ActionResult.success("创建成功");
}
@ -745,7 +748,7 @@ public class TradeuploadController {
if(vo.getCreatorTime()!=null){
vo.setCreatorTime(vo.getCreatorTime());
}
//vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace()));
// vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace()));
//子表
//副表
return ActionResult.success(vo);
@ -804,6 +807,8 @@ public class TradeuploadController {
if(entity!=null){
TradeuploadEntity subentity=JsonUtil.getJsonToBean(tradeuploadUpForm, TradeuploadEntity.class);
subentity.setCreatorTime(entity.getCreatorTime());
BigDecimal netWeight = new BigDecimal(tradeuploadUpForm.getNetWeight());
subentity.setSettlement(netWeight);
QueryWrapper<TradeuploadEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(TradeuploadEntity::getPoundlistNo,entity.getPoundlistNo());
queryWrapper.lambda().eq(TradeuploadEntity::getCustomerId,entity.getCustomerId());

@ -4,6 +4,7 @@ package jnpf.tradeupload.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.saleorder.entity.SaleorderitemEntity;
import jnpf.tradeupload.entity.TradeuploadEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.tradeupload.model.tradeupload.TradeuploadPagination;
@ -23,5 +24,5 @@ import java.util.List;
public interface TradeuploadMapper extends BaseMapper<TradeuploadEntity> {
List<TradeuploadEntity> queryVehicle(TradeuploadEntity tradeuploadEntity);
IPage<TradeuploadEntity> queryByKeyword(@Param("page") Page<TradeuploadEntity> page, @Param("tradeuploadPagination") TradeuploadPagination tradeuploadPagination);
IPage<TradeuploadEntity> queryByKeyword(@Param("page") Page<TradeuploadEntity> page, @Param("tradeuploadPagination") TradeuploadPagination tradeuploadPagination, @Param("ew") Wrapper<TradeuploadEntity> queryWrapper);
}

@ -86,14 +86,14 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
int total=0;
int tradeuploadNum =0;
QueryWrapper<TradeuploadEntity> tradeuploadQueryWrapper=new QueryWrapper<>();
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getIsExamine,"0");
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getPoundType,"0");
tradeuploadQueryWrapper.eq("a.is_examine","0");
tradeuploadQueryWrapper.eq("a.delete_mark","0");
boolean pcPermission = true;
boolean appPermission = true;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object tradeuploadObj=authorizeService.getCondition(new AuthorizeConditionModel(tradeuploadQueryWrapper,tradeuploadPagination.getMenuId(),"jg_poundlist"));
Object tradeuploadObj=authorizeService.getCondition2(new AuthorizeConditionModel(tradeuploadQueryWrapper,tradeuploadPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(tradeuploadObj)){
return new ArrayList<>();
} else {
@ -104,7 +104,7 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object tradeuploadObj=authorizeService.getCondition(new AuthorizeConditionModel(tradeuploadQueryWrapper,tradeuploadPagination.getMenuId(),"jg_poundlist"));
Object tradeuploadObj=authorizeService.getCondition2(new AuthorizeConditionModel(tradeuploadQueryWrapper,tradeuploadPagination.getMenuId(),"jg_poundlist"));
if (ObjectUtil.isEmpty(tradeuploadObj)){
return new ArrayList<>();
} else {
@ -165,7 +165,7 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
}
// tradeuploadPagination.setDepartmentId(detpartment);
IPage<TradeuploadEntity> userIPage = tradeuploadMapper.queryByKeyword(page, tradeuploadPagination);
IPage<TradeuploadEntity> userIPage = tradeuploadMapper.queryByKeyword(page, tradeuploadPagination, tradeuploadQueryWrapper);
return tradeuploadPagination.setData(userIPage.getRecords(),userIPage.getTotal());
/*

@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
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.ApiOperation;
import jnpf.base.ActionResult;
@ -15,6 +16,8 @@ import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
@ -63,6 +66,9 @@ public class VehicleController {
@Autowired
private VehicleService vehicleService;
@Autowired
private PoundlistService poundlistService;
@ -317,9 +323,14 @@ public class VehicleController {
@Transactional
public ActionResult delete(@PathVariable("id") String 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){
vehicleService.delete(entity);
}
return ActionResult.success("删除成功");
}

@ -13,15 +13,7 @@
LEFT JOIN jg_customer b ON a.customer_id = b.id and b.delete_mark = '0'
LEFT JOIN jg_contract c ON a.contract_id = c.id and c.delete_mark = '0'
LEFT JOIN jg_salesorder d ON a.sales_order_id = d.id and d.delete_mark = '0'
WHERE 1=1
and a.delete_mark = '0'
/*添加权限*/
<if test="arinvoicesPagination.departmentId != null and arinvoicesPagination.departmentId != ''">
AND a.department_id = #{arinvoicesPagination.departmentId}
</if>
<if test="arinvoicesPagination.orgnizeId != null and arinvoicesPagination.orgnizeId != ''">
AND a.orgnize_id = #{arinvoicesPagination.orgnizeId}
</if>
${ew.customSqlSegment}
<if test="arinvoicesPagination.documentNo != null and arinvoicesPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{arinvoicesPagination.documentNo},'%')
</if>

@ -17,15 +17,7 @@
jg_collection a
LEFT JOIN jg_customer b ON a.customer_id = b.id and b.delete_mark = '0'
LEFT JOIN jg_contract c ON a.contract_id = c.id and c.delete_mark = '0'
where 1=1
and a.delete_mark = '0'
/*添加权限*/
<if test="collectionPagination.departmentId != null and collectionPagination.departmentId != ''">
AND a.department_id = #{collectionPagination.departmentId}
</if>
<if test="collectionPagination.orgnizeId != null and collectionPagination.orgnizeId != ''">
AND a.orgnize_id = #{collectionPagination.orgnizeId}
</if>
${ew.customSqlSegment}
<if test="collectionPagination.documentNo != null and collectionPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{collectionPagination.documentNo},'%')
</if>

@ -7,14 +7,7 @@
LEFT JOIN jg_purchaseorder b on a.purchaseorder_id = b.id
LEFT JOIN jg_contract c on a.contract_id = c.id
LEFT JOIN jg_supplier d on a.supplier_id = d.id
where 1=1 AND a.delete_mark = 0 AND b.delete_mark = 0 AND c.delete_mark = 0 AND d.delete_mark = 0
/*添加权限*/
<if test="invoicesPagination.departmentId != null and invoicesPagination.departmentId != ''">
AND a.department_id = #{invoicesPagination.departmentId}
</if>
<if test="invoicesPagination.orgnizeId != null and invoicesPagination.orgnizeId != ''">
AND a.orgnize_id = #{invoicesPagination.orgnizeId}
</if>
${ew.customSqlSegment} AND b.delete_mark = 0 AND c.delete_mark = 0 AND d.delete_mark = 0
<if test="invoicesPagination.startDate != null and invoicesPagination.endDate != null">
AND a.creator_time &gt; #{invoicesPagination.startDate} AND a.creator_time &lt;= #{invoicesPagination.endDate}
</if>

@ -7,16 +7,7 @@
LEFT JOIN jg_purchaseorder b on a.purchase_order_id = b.id
LEFT JOIN jg_contract c on b.contract_code = c.id
LEFT JOIN jg_supplier d on b.supplier_id = d.id
where 1=1 and a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0
/*添加权限*/
<if test="purchasebackPagination.departmentId != null and purchasebackPagination.departmentId != ''">
AND a.department_id = #{purchasebackPagination.departmentId}
</if>
<if test="purchasebackPagination.orgnizeId != null and purchasebackPagination.orgnizeId != ''">
AND a.orgnize_id = #{purchasebackPagination.orgnizeId}
</if>
${ew.customSqlSegment} and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0
<if test="purchasebackPagination.documentNo != null and purchasebackPagination.documentNo != ''">
AND a.document_no LIKE CONCAT('%',#{purchasebackPagination.documentNo},'%')
</if>

@ -11,15 +11,7 @@
jg_receiptout a
LEFT JOIN jg_customer b on a.customer_id = b.id and b.delete_mark = '0'
LEFT JOIN jg_salesorder c on a.source_no = c.id and c.delete_mark = '0'
where 1=1
and a.delete_mark = '0'
/*添加权限*/
<if test="receiptoutPagination.departmentId != null and receiptoutPagination.departmentId != ''">
AND a.department_id = #{receiptoutPagination.departmentId}
</if>
<if test="receiptoutPagination.orgnizeId != null and receiptoutPagination.orgnizeId != ''">
AND a.orgnize_id = #{receiptoutPagination.orgnizeId}
</if>
${ew.customSqlSegment}
<if test="receiptoutPagination.documentNo != null and receiptoutPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{receiptoutPagination.documentNo},'%')
</if>

@ -12,15 +12,7 @@
LEFT JOIN jg_salesorder b on a.sales_order_id = b.id and b.delete_mark = '0'
LEFT JOIN jg_contract c on b.contract_id = c.id and c.delete_mark = '0'
LEFT JOIN jg_customer d on b.customer_id = d.id and d.delete_mark = '0'
where 1 = 1
and a.delete_mark = '0'
/*添加权限*/
<if test="salebackPagination.departmentId != null and salebackPagination.departmentId != ''">
AND a.department_id = #{salebackPagination.departmentId}
</if>
<if test="salebackPagination.orgnizeId != null and salebackPagination.orgnizeId != ''">
AND a.orgnize_id = #{salebackPagination.orgnizeId}
</if>
${ew.customSqlSegment}
<if test="salebackPagination.documentNo != null and salebackPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{salebackPagination.documentNo},'%')
</if>

@ -11,15 +11,7 @@
jg_salesorder a
left join jg_contract b on a.contract_id = b.id and b.delete_mark = '0'
left join jg_customer c on a.customer_id = c.id and c.delete_mark = '0'
where 1=1
and a.delete_mark = '0'
/*添加权限*/
<if test="saleorderitemPagination.departmentId != null and saleorderitemPagination.departmentId != ''">
AND a.department_id = #{saleorderitemPagination.departmentId}
</if>
<if test="saleorderitemPagination.orgnizeId != null and saleorderitemPagination.orgnizeId != ''">
AND a.orgnize_id = #{saleorderitemPagination.orgnizeId}
</if>
${ew.customSqlSegment}
<if test="saleorderitemPagination.documentNo != null and saleorderitemPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{saleorderitemPagination.documentNo},'%')
</if>

@ -26,14 +26,7 @@ creator_time = DATE_SUB(NOW(),interval 15 day)
LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id
where a.is_examine = '0' AND a.delete_mark = 0
/*添加权限*/
<if test="tradeuploadPagination.departmentId != null and tradeuploadPagination.departmentId != ''">
AND a.department_id = #{tradeuploadPagination.departmentId}
</if>
<if test="tradeuploadPagination.orgnizeId != null and tradeuploadPagination.orgnizeId != ''">
AND a.orgnize_id = #{tradeuploadPagination.orgnizeId}
</if>
${ew.customSqlSegment}
<if test="tradeuploadPagination.keyword != null and tradeuploadPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%'))
</if>

@ -6,8 +6,8 @@
<template v-if="!loading && formOperates">
<el-col :span="6" v-if="judgeShow('documentNo')">
<el-form-item label="单据编号" prop="documentNo">
<el-input :disabled="judgeWrite('documentNo')" v-model="dataForm.documentNo"
placeholder="系统自动生成" disabled >
<el-input v-model="dataForm.documentNo"
placeholder="系统自动生成" readonly >
</el-input>
</el-form-item>
@ -18,7 +18,7 @@
<popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
interfaceId="389674191453990661" :columnOptions="supplierIdcolumnOptions"
propsValue="id" relationField="supplier_name" popupType="dialog" popupTitle="选择数据"
popupWidth="800px" hasPage :pageSize="20" :disabled="true">
popupWidth="800px" hasPage :pageSize="20" :disabled="true" :title="dataForm.supplierName">
</popupSelect>
</el-form-item>
@ -26,8 +26,8 @@
<el-col :span="6" v-if="judgeShow('paymentType')">
<el-form-item label="付款类型" prop="paymentType">
<el-select :disabled="judgeWrite('paymentType')" v-model="dataForm.paymentType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="dataForm.paymentType"
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in paymentTypeOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled" disabled></el-option>
@ -37,9 +37,9 @@
<el-col :span="6" v-if="judgeShow('businessDate')">
<el-form-item label="业务日期" prop="businessDate">
<el-date-picker :disabled="judgeWrite('businessDate')" v-model="dataForm.businessDate"
<el-date-picker v-model="dataForm.businessDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
value-format="timestamp">
value-format="timestamp" readonly>
</el-date-picker>
</el-form-item>
@ -48,7 +48,7 @@
<el-col :span="6" v-if="judgeShow('currency')">
<el-form-item label="币别" prop="currency">
<el-select :disabled="true" v-model="dataForm.currency" placeholder="请选择" clearable
:style='{"width":"100%"}'>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
@ -59,7 +59,7 @@
<el-col :span="6" v-if="judgeShow('settlementType')">
<el-form-item label="结算类型" prop="settlementType">
<el-select :disabled="judgeWrite('settlementType')" v-model="dataForm.settlementType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in settlementTypeOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
@ -69,8 +69,8 @@
<el-col :span="6" v-if="judgeShow('ramount')">
<el-form-item label="申请金额" prop="ramount">
<el-input-number :disabled="true" v-model="dataForm.ramount" :style='{"width":"100%"}'
placeholder="数字文本" :step="1" :precision="6">
<el-input-number v-model="dataForm.ramount" :style='{"width":"100%"}'
placeholder="数字文本" :step="1" :precision="6" disabled>
</el-input-number>
</el-form-item>
@ -78,8 +78,8 @@
<el-col :span="6" v-if="judgeShow('paymentAmount')">
<el-form-item label="已付款金额" prop="paymentAmount">
<el-input-number :disabled="true" v-model="dataForm.paymentAmount" :style='{"width":"100%"}'
placeholder="数字文本" :step="1" :precision="6">
<el-input-number v-model="dataForm.paymentAmount" :style='{"width":"100%"}'
placeholder="数字文本" :step="1" :precision="6" disabled>
</el-input-number>
</el-form-item>
@ -103,7 +103,7 @@
<el-col :span="6" v-if="judgeShow('collectionAccount')">
<el-form-item label="收款账户" prop="collectionAccount">
<el-input :disabled="judgeWrite('collectionAccount')" v-model="dataForm.collectionAccount"
<el-input v-model="dataForm.collectionAccount"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
@ -112,7 +112,7 @@
<el-col :span="6" v-if="judgeShow('colectionBank')">
<el-form-item label="收款银行" prop="colectionBank">
<el-input :disabled="judgeWrite('colectionBank')" v-model="dataForm.colectionBank"
<el-input v-model="dataForm.colectionBank"
placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
@ -121,9 +121,9 @@
<el-col :span="6" v-if="judgeShow('dueDate')">
<el-form-item label="应付日期" prop="dueDate">
<el-date-picker :disabled="judgeWrite('dueDate')" v-model="dataForm.dueDate"
<el-date-picker v-model="dataForm.dueDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd"
value-format="timestamp">
value-format="timestamp" readonly>
</el-date-picker>
</el-form-item>
@ -153,8 +153,8 @@
<el-col :span="12" v-if="judgeShow('remark')">
<el-form-item label="备注" prop="remark">
<el-input :disabled="judgeWrite('remark')" v-model="dataForm.remark" placeholder="请输入"
clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.remark" placeholder="请输入"
clearable :style='{"width":"100%"}' readonly>
</el-input>
</el-form-item>
@ -190,7 +190,6 @@
</template>
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
:disabled="judgeWrite('paymentdocitem0List') || judgeWrite('paymentdocitem0List-amount')"
placeholder="请输入" clearable :style='{"width":"100%"}'
@change="amountChange(scope.row)" readonly>
</el-input>
@ -404,7 +403,7 @@
<el-table-column prop="poundType" label="磅单类型" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.poundType" placeholder="请选择" clearable
:style='{"width":"100%"}' readonly>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in poundTypeOptions"
:key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled" disabled></el-option>
@ -421,7 +420,7 @@
<el-table-column prop="unit" label="单位" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit" placeholder="请选择" clearable
:style='{"width":"100%"}' readonly>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in unitOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
@ -432,7 +431,7 @@
:disabled="true">
<template slot-scope="scope">
<el-select v-model="scope.row.advance" placeholder="请选择" clearable
:style='{"width":"100%"}' readonly>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in advanceOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
@ -456,7 +455,7 @@
<el-table-column prop="rate" label="税率 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.rate" placeholder="请选择" clearable
:style='{"width":"100%"}' readonly>
:style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in rateOptions" :key="index"
:label="item.fullName" :value="item.id"
:disabled="item.disabled" disabled></el-option>

@ -12,7 +12,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -277,6 +277,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -403,10 +403,11 @@
this.taxRateOptions.find((item) => {
if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) {
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.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
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) => {
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].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)))
}
})
}

@ -37,7 +37,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -313,6 +313,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -22,7 +22,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -515,6 +515,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -33,7 +33,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开
</el-button>
@ -434,6 +434,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -29,7 +29,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">
展开
</el-button>
@ -338,6 +338,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -17,7 +17,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -213,6 +213,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -17,7 +17,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -213,6 +213,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -613,8 +613,12 @@
this.dataForm.invoicesitem0List.forEach((model, i) => {
invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount);
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
this.taxRateOptions.forEach((model1, i) => {
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
@ -628,8 +632,14 @@
})
this.dataForm.invoicesitem0List.forEach((model, i) => {
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
this.taxRateOptions.forEach((model1, i) => {
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)
}
})
},

@ -37,7 +37,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -412,6 +412,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -17,7 +17,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -284,6 +284,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -34,7 +34,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">
展开
</el-button>
@ -369,6 +369,12 @@ width="150" >
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -17,7 +17,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -307,6 +307,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -32,7 +32,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开
</el-button>
@ -236,6 +236,12 @@ export default {
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -22,7 +22,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -285,6 +285,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -29,7 +29,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开
</el-button>
@ -271,6 +271,12 @@ export default {
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -26,7 +26,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -513,6 +513,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -16,7 +16,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -534,9 +534,21 @@
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
}
this.initData()
},
resetAll() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.listQuery = {
currentPage: 1,
pageSize: 20,

@ -622,6 +622,7 @@
},
request2() {
this.submitDisabled = true;
this.dataForm;
var _data = this.dataList()
debugger
if (!this.dataForm.id) {

File diff suppressed because it is too large Load Diff

@ -724,8 +724,9 @@
loading: false,
isDetail: false,
dataForm: {
isTransfer: '',
purchaseOrderId: '',
documentNo: '',
contractId: '',
customerId: '',
contractName: '',
@ -847,8 +848,6 @@
},
methods: {
editPrice(row) {
row.id
debugger
var advanceAmount = 0
var price = 0
var notPrice = 0
@ -858,25 +857,10 @@
rate = parseInt(item.fullName)
}
})
// for (let i = 0;i<this.dataForm.salesorder_item0List.length;i++) {
// this.dataForm.salesorder_item0List[i].price = this.dataForm.salesorder_item0List[i].unitPrice * this.dataForm.salesorder_item0List[i].settlement;
// price = price + parseFloat(this.dataForm.salesorder_item0List[i].price);
// }
this.dataForm.salesorder_item0List.forEach((item, index) => {
if (row.vehicleId == item.vehicleId) {
item.price = this.jnpf.floatMul(item.settlement, item.unitPrice)//
item.noPrice = this.jnpf.floatDiv(this.jnpf.floatMul(item.price, (this.jnpf.floatSub(100, rate))), 100)//
// request({
// url: '/api/saleorder/Saleorderitem/updatePrice'+row.poundlistId,
// method: 'post',
// data: item.price
// }).then((res) => {
// this.$message({
// message: res.msg,
// type: 'success',
// duration: 1000,
// })
// })
}
if (item.advance == '1') {//
advanceAmount = this.jnpf.floatAdd(advanceAmount, item.price)//
@ -887,24 +871,6 @@
this.dataForm.advanceAmount = advanceAmount
this.dataForm.price = price
this.dataForm.notPrice = notPrice
// row.salesPrice = row.unitPrice;
// request({
// url: '/api/saleorder/Saleorderitem/updatePrice',
// method: 'post',
// data: row
// }).then((res) => {
// debugger
// this.$message({
// message: res.msg,
// type: 'success',
// duration: 1000,
// onClose: () => {
// this.visible = false
// this.$emit('refresh', true)
// }
// })
// })
},
getSummaries(param) {
const { columns, data } = param
@ -1034,6 +1000,8 @@
this.dataForm.contractNo = list[0].contractNo
this.dataForm.contractName = list[0].contractName
this.dataForm.customerName = list[0].customerName
this.dataForm.isTransfer = list.isTransfer
this.dataForm.purchaseOrderId = list .purchaseOrderId
var num = 0
var amount = 0
var advance = 0
@ -1044,7 +1012,7 @@
this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(list[i].salesPrice, list[i].settlement)
this.rateOptions.find((item) => {
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)
}
})

@ -12,7 +12,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -356,6 +356,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -578,8 +578,16 @@
this.dataForm.invoicesitem0List.forEach((model, i) => {
invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount);
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
this.taxRateOptions.forEach((model1, i) => {
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
@ -593,8 +601,16 @@
})
this.dataForm.invoicesitem0List.forEach((model, i) => {
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
this.taxRateOptions.forEach((model1, i) => {
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)
}
})
},
@ -640,7 +656,7 @@
item.unitPrice = item.price;
item.taxRate = item.rate;
item.amountNotTax = item.notAmount;
item.taxAmount = item.amount - item.notAmount;
item.taxAmount = this.jnpf.floatSub(item.amount, item.notAmount);
});
this.dataForm.invoicesitem1List = purchaseorder.purchaseorder_item0List;
let param = {

@ -39,7 +39,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -78,7 +78,7 @@
</div>
</div>
<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 label="单据状态 " sortable width="150" prop="status" align="center" >-->
<!-- <template slot-scope="scope">-->
@ -103,7 +103,7 @@
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column label="是否付款" sortable width="100" prop="isPayment" align="center" >
<el-table-column label="是否付款申请" sortable width="100" prop="isPayment" align="center" >
<template slot-scope="scope">
{{ scope.row.isPayment | dynamicText(isPaymentOptions) }}
</template>
@ -345,6 +345,31 @@
this.initData()
},
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(){
if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) {
this.$message({
@ -447,6 +472,14 @@
});
return
}
if (row.isPayment == '1' || row.isTransfer == '1'){
this.$message({
type: 'error',
message: '已转销售或已提交付款申请无法删除',
duration: 2500
});
return
}
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
@ -522,6 +555,20 @@
})
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)
var ids = '';
this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{
@ -530,13 +577,18 @@
if(ids.length > 0){
ids = ids.substring(0, ids.length - 1);
}
debugger
request({
url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: 'post'
}).then(res => {
var list = []
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]
_data.isTransfer = '1'
_data.purchaseOrderId = this.multipleSelectionItem[0].id
list.push(_data)
}
if (list.length>0) {
@ -697,6 +749,20 @@
})
return
}
var flag = true;
this.multipleSelectionItem[0].poundlistEntityList.forEach((item,index) => {
if (item.salesStatus == 1 || item.salesStatus == 2 || item.salesStatus == 3){
flag = false;
}
})
if (!flag){
this.$message({
type: 'error',
message: '存在已发货的磅单无法入库',
duration: 2500
})
return
}
//id
request({
url: '/api/purchaseorder/Purchaseorder/' + this.multipleSelectionItem[0].id,
@ -765,6 +831,15 @@
});
return
}
if(row.isPayment == '1'){
debugger
this.$message({
type: 'error',
message: '付款申请中,无法编辑',
duration: 2500
});
return
}
}
this.formVisible = true
this.$nextTick(() => {
@ -833,6 +908,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -656,7 +656,13 @@
this.dataForm.receiptin_item0List.forEach((item, index) => {
item.purchaseorderitemId = item.id;
item.num = item.settlement;
item.rateamount = item.amount - item.notAmount;
// item.rateamount = this.jnpf.floatDiv(item.amount,) - item.notAmount;
this.rateOptions.find((item2) => {
if (item.rate == item2.id) {
item.rateamount =this.jnpf.floatDiv(item.amount,this.jnpf.floatAdd(1, this.jnpf.floatDiv(item2.fullName,100))).toFixed(2)
debugger
}
})
item.id = '';
});
let param = {
@ -695,6 +701,20 @@
})
},
request() {
var flag = true;
this.dataForm.receiptin_item0List.forEach((item,index) => {
if (item.reservoirareaName == null || item.reservoirareaName == ''){
flag = false;
}
})
if (!flag){
this.$message({
message: res.msg,
type: 'success',
duration: 2000
})
return
}
this.submitDisabled = true;
var _data = this.dataList()
if (!this.dataForm.id) {

@ -110,7 +110,7 @@
<el-tabs v-model="activevpzhms" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细">
<el-col :span="24">
<el-form-item label-width="0">
<el-form-item label-width="0" :rules="rules">
<div class="JNPF-common-title">
<h2></h2>
</div>
@ -636,6 +636,32 @@
})
},
request() {
var flag = true;
var statusFlag = true;
this.dataForm.receiptin_item0List.forEach((item,index) => {
if (item.reservoirareaName == null || item.reservoirareaName == ''){
flag = false;
}
if (item.poundlistEntity.salesStatus > 0){
statusFlag = false;
}
})
if (!flag){
this.$message({
message: res.msg,
type: 'success',
duration: 2000
})
return
}
if (!statusFlag){
this.$message({
type: 'error',
message: '存在已发货的磅单无法入库',
duration: 2500
})
return
}
this.submitDisabled = true;
var _data = this.dataList()
if (!this.dataForm.id) {

@ -40,7 +40,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -409,6 +409,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -42,7 +42,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -329,6 +329,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -17,7 +17,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -267,6 +267,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -35,7 +35,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -317,6 +317,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -815,7 +815,6 @@
message: '请在备注说明修改单价原因',
duration: 2500,
})
return
}
item.price = this.jnpf.floatMul(item.unitPrice,item.settlement);//
debugger
@ -824,20 +823,6 @@
item.noPrice = this.jnpf.floatDiv(this.jnpf.floatMul(item.price,(this.jnpf.floatSub(100,item2.fullName))), 100);//
}
});
// let params = {}
// params.id = row.poundlistId
// params.salesPrice = item.unitPrice
// request({
// url: '/api/saleorder/Saleorderitem/updatePrice',
// method: 'post',
// data: params
// }).then((res) => {
// this.$message({
// message: res.msg,
// type: 'success',
// duration: 1000,
// })
// })
}
if (item.advance == '1') {//
advanceAmount = this.jnpf.floatAdd(advanceAmount,item.price);//

@ -490,10 +490,11 @@
this.taxRateOptions.find((item) => {
if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) {
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.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
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) => {
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].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)))
}
})
}

@ -42,7 +42,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -600,6 +600,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -34,7 +34,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开
</el-button>
@ -374,6 +374,12 @@ export default {
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -8,7 +8,7 @@
<el-col :span="12">
<el-form-item label="磅单上传" prop="poundPictures">
<JNPF-UploadImg2B v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1"
@change="imgChange" ref="poundUpload">
@change="imgChange" ref="poundUpload" >
</JNPF-UploadImg2B>
</el-form-item>
@ -25,7 +25,7 @@
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable
field="materialId" interfaceId="381037852907038533"
:columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name"
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20">
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" >
</popupSelect>
</el-form-item>
@ -35,7 +35,7 @@
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId"
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions"
propsValue="id" relationField="supplier_nm" popupType="dialog" popupTitle="选择数据"
popupWidth="800px" hasPage :pageSize="20" @change="customerSelect">
popupWidth="800px" hasPage :pageSize="20" @change="customerSelect" >
</popupSelect>
</el-form-item>
@ -50,6 +50,31 @@
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="采购合同" prop="purchaseId">
<popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
hasPage :pageSize="20" disabled>
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="供应商" prop="supplierId">
<popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId"
interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" disabled>
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="采购价格" prop="purchasePrice" disabled="">
<el-input-number v-model="dataForm.purchasePrice" :style='{"width":"100%"}' :precision="6" disabled></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="车牌号" prop="vehicleId">
<popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
@ -177,7 +202,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注信息" clearable
:style='{"width":"100%"}'>
@ -426,7 +451,13 @@
"label": "业务员2地址",
"value": "adress"
}, ],
supplierIdcolumnOptions: [{
"label": "供应商编码",
"value": "supplier_code"
}, {
"label": "供应商名称",
"value": "supplier_name"
}],
}
},
computed: {},
@ -571,20 +602,104 @@
this.dataInfo(res.data)
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date();
this.dataForm.poundDate = new Date().getTime();
this.loading = false
});
} else {
this.clearData(this.dataForm)
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
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', {})
},
//
dataFormSubmit() {
dataFormSubmit() {
var tareWeight = this.dataForm.tareWeight;//
var grossWeight = this.dataForm.grossWeight;//
var buckleWeight = this.dataForm.buckleWeight;//
var netWeight = this.dataForm.netWeight;//
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
if(grossWeight < tareWeight + buckleWeight + netWeight){
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= netWeight){
this.$message({
message: '扣重不得大于净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= grossWeight){
this.$message({
message: '扣重不得大于毛重',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request2()
}
})
},
request2() {
this.submitDisabled = true;
this.dataForm;
var _data = this.dataList()
debugger
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 3000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
} else {
debugger
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 3000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
}
},
/* dataFormSubmit() {
var tareWeight = this.dataForm.tareWeight; //
var grossWeight = this.dataForm.grossWeight; //
var buckleWeight = this.dataForm.buckleWeight; //
@ -648,7 +763,7 @@
this.submitDisabled = false
})
}
},
},*/
request3() {
this.submitDisabled = true;
var _data = this.dataList()

@ -0,0 +1,988 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="12">
<el-form-item label="磅单上传" prop="poundPictures">
<JNPF-UploadImg2B v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1"
@change="imgChange" ref="poundUpload" >
</JNPF-UploadImg2B>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImgB v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImgB>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable
field="materialId" interfaceId="381037852907038533"
:columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name"
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" >
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户名称" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId"
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions"
propsValue="id" relationField="supplier_nm" popupType="dialog" popupTitle="选择数据"
popupWidth="800px" hasPage :pageSize="20" @change="customerSelect" disabled >
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
:bissId="dataForm.customerId" hasPage :pageSize="20" disabled>
</popupSelect>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item label="采购合同" prop="purchaseId">
<popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
hasPage :pageSize="20" disabled>
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="供应商" prop="supplierId">
<popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId"
interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" disabled>
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="采购价格" prop="purchasePrice" disabled="">
<el-input-number v-model="dataForm.purchasePrice" :style='{"width":"100%"}' :precision="6" disabled></el-input-number>
</el-form-item>
</el-col>-->
<el-col :span="6">
<el-form-item label="车牌号" prop="vehicleId">
<popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id"
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
@change="changePicture" hasPage :pageSize="20">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}' :precision="6" :min="0">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}'
@change="grossWeightChange" :precision="6" :min="0"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'
@change="grossWeightChange" :precision="6" :min="0"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'
@change="grossWeightChange" :precision="6" :min="0"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}' :precision="6" :min="0">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单日期" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单号" prop="poundlistNo">
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位 " prop="unit">
<el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}'
@change="unitChange">
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运输类型" prop="transportType">
<el-select v-model="transportType" placeholder="请选择" clearable :style='{"width":"100%"}'
@change="transportTypeChange">
<el-option v-for="(item, index) in transportTypeOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否垫资" prop="advance">
<el-select v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}'
@change="advanceChange">
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运费" prop="transportPrice">
<el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}' :precision="6" :min="0">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="起始地" prop="originPlace">
<JNPF-Address v-model="dataForm.originPlace" placeholder="请选择省市区" clearable :level='2'>
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员1" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员1" clearable
field="businessId" interfaceId="ebcc44be142e43b795c0d769abd6d25a"
:columnOptions="businessIdcolumnOptions" propsValue="F_Id" relationField="F_RealName"
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20"
:bissId="dataForm.businessId" disabled>
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员2" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId"
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id"
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="收货价格" prop="collectPrice">
<el-input-number v-model="dataForm.collectPrice" :style='{"width":"100%"}' :precision="6" :min="0">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注信息" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<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="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>
</span>
</el-dialog>
</template>
<script>
const units = {
KB: 1024,
MB: 1024 * 1024,
GB: 1024 * 1024 * 1024
}
import request from '@/utils/request'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
data() {
return {
submitDisabled: false,
fileList: [],
uploadHeaders: {
Authorization: this.$store.getters.token
},
value: [],
type: 'annexpic',
disabled: false,
detailed: false,
showTip: false,
limit: 0,
accept: 'image/*',
sizeUnit: 'MB',
fileSize: 5,
unit: "0",
transportType: "0",
advance: "0",
action: this.define.APIURl + '/api/tradeupload/Tradeupload/UploaderPondList/annexpic',
imageUrl: '',
code: '100',
fileList: [],
visible: false,
loading: false,
isDetail: false,
dataForm: {
poundPictures: [],
materialId: "",
customerId: "",
salesId: "",
vehicleId: "",
vehiclePictures: [],
poundDate: '',
poundlistNo: '',
tareWeight: 0,
grossWeight: 0,
buckleWeight: 0,
collectPrice: 0,
netWeight: 0,
unit: "0",
transportType: "0",
advance: "0",
transportPrice: 0,
originPlace: [],
salesPrice: 0,
businessId: "",
naturalId: "",
remark: '',
creatorTime: "",
},
rules: {
materialId: [{
required: true,
message: '请选择物料编码',
trigger: 'change'
}, ],
customerId: [{
required: true,
message: '请选择客户',
trigger: 'change'
}, ],
salesId: [{
required: true,
message: '请选择合同',
trigger: 'change'
}, ],
vehicleId: [{
required: true,
message: '请选择车辆',
trigger: 'change'
}, ],
// vehiclePictures: [{
// required: true,
// message: '',
// trigger: 'click'
// }, ],
poundDate: [{
required: true,
message: '请选择',
trigger: 'change'
}, ],
poundlistNo: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
tareWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
grossWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
buckleWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
netWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
salesPrice: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
businessId: [{
required: true,
message: '请选择业务员',
trigger: 'change'
}, ],
},
materialIdcolumnOptions: [{
"label": "物料编码",
"value": "item_code"
}, {
"label": "物料名称",
"value": "item_name"
}, {
"label": "单位",
"value": "primary_unit_of_measure"
}, {
"label": "默认入库区",
"value": "inareaname"
}, {
"label": "默认出库区",
"value": "outareaname"
}, ],
customerIdcolumnOptions: [{
"label": "客户编码",
"value": "supplier_cd"
}, {
"label": "客户名称",
"value": "supplier_nm"
}, {
"label": "地址",
"value": "address"
}, {
"label": "银行账号",
"value": "bank_account"
}, ],
salesIdcolumnOptions: [{
"label": "合同编码",
"value": "contract_code"
}, {
"label": "合同名称",
"value": "contract_name"
}, {
"label": "合同类型",
"value": "contract_type"
}, {
"label": "供应商/客户名称",
"value": "name"
}, ],
vehicleIdcolumnOptions: [{
"label": "车牌号",
"value": "ticketno"
}, {
"label": "司机",
"value": "drivername"
}, {
"label": "手机号",
"value": "contact"
}, ],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
advanceOptions: [{
"fullName": "否",
"id": "0"
}, {
"fullName": "是",
"id": "1"
}],
businessIdcolumnOptions: [{
"label": "人员名称",
"value": "F_RealName"
}, {
"label": "账号",
"value": "F_Account"
}, {
"label": "人员职位",
"value": "positionName"
}],
naturalIdcolumnOptions: [{
"label": "业务员2名称",
"value": "name"
}, {
"label": "业务员2手机号",
"value": "contact"
}, {
"label": "业务员2地址",
"value": "adress"
}, ],
supplierIdcolumnOptions: [{
"label": "供应商编码",
"value": "supplier_code"
}, {
"label": "供应商名称",
"value": "supplier_name"
}],
}
},
computed: {},
watch: {
/* value: {
immediate: true,
handler(val) {
this.fileList = val
this.$nextTick(() => {
if (!val.length) {
this.$refs.elUpload && this.$refs.elUpload.uploadFiles.splice(0)
} else {
if (!this.$refs.elUpload) return
this.$refs.elUpload.uploadFiles = val.map(o => ({
...o,
uid: o.fileId
}))
}
})
}
} */
},
created() {},
mounted() {},
methods: {
imgChange(res) {
// this.dataForm.customerId = res.data.customerId;
// this.dataForm.customerName = res.data.customerName;
// this.dataForm.salesId = res.data.salesId;
// this.dataForm.salesName = res.data.salesName;
this.dataForm.vehicleId = res.data.vehicleId;
this.dataForm.poundDate = res.data.poundDate;
this.dataForm.poundlistNo = res.data.poundlistNo;
this.dataForm.tareWeight = res.data.tareWeight > 1000 ? (res.data.tareWeight / 1000).toFixed(6) : res.data
.tareWeight;
this.dataForm.grossWeight = res.data.grossWeight > 1000 ? (res.data.grossWeight / 1000).toFixed(6) : res
.data.grossWeight;
this.dataForm.buckleWeight = res.data.buckleWeight > 1000 ? (res.data.buckleWeight / 1000).toFixed(6) : res
.data.buckleWeight;
if (this.dataForm.netWeight && this.dataForm.netWeight > 0) {
this.dataForm.netWeight = res.data.netWeight > 1000 ? (res.data.netWeight / 1000).toFixed(6) : res.data
.netWeight;
} else {
this.dataForm.netWeight = res.data.grossWeight - res.data.tareWeight - res.data.buckleWeight;
}
if (res.data.vehiclePictures && res.data.vehiclePictures.length > 0) {
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
}
},
grossWeightChange(e, f) {
//this.dataForm.netWeight = this.dataForm.grossWeight - this.dataForm.tareWeight - this.dataForm.buckleWeight;
this.dataForm.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(this.dataForm.grossWeight),
parseFloat(this.dataForm.tareWeight)), parseFloat(this.dataForm.buckleWeight))
},
unitChange(e) {
this.dataForm.unit = e;
},
transportTypeChange(e) {
this.dataForm.transportType = e;
},
advanceChange(e) {
this.dataForm.advance = e;
},
customerSelect(e, d) {
const query = {
code: d.id
}
request({
url: '/api/example/ContractFile/getListByCustomer',
method: 'post',
data: query
}).then((res) => {
if (res.data.length > 0) {
// type
this.dataForm.salesId = res.data[0].id
this.dataForm.salesName = res.data[0].contractName
}
})
},
changePicture(a, b) {
this.dataForm.vehiclePictures = JSON.parse(b.vehiclephotos);
},
continueUpload() {
var tareWeight = this.dataForm.tareWeight; //
var grossWeight = this.dataForm.grossWeight; //
var buckleWeight = this.dataForm.buckleWeight; //
var netWeight = this.dataForm.netWeight; //
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
if (grossWeight != this.jnpf.floatAdd(tareWeight, this.jnpf.floatAdd(buckleWeight, netWeight))) {
this.$message({
message: '毛重必须等于皮重+扣重+净重',
type: 'warning',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request3()
}
})
},
// poundAI(){
// let formData = new FormData();
// let file = this.dataForm.poundPictures
// formData.append('file',file);
// request({
// url: '/api/tradeupload/Tradeupload/poundai',
// method: 'post',
// data: formData
// }).then(res => {
// this.dataInfo(res.data)
// this.loading = false
// });
// },
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.value = [];
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date().getTime();
this.loading = false
});
} else {
this.clearData(this.dataForm)
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date().getTime();
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
var tareWeight = this.dataForm.tareWeight;//
var grossWeight = this.dataForm.grossWeight;//
var buckleWeight = this.dataForm.buckleWeight;//
var netWeight = this.dataForm.netWeight;//
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
if(grossWeight < tareWeight + buckleWeight + netWeight){
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= netWeight){
this.$message({
message: '扣重不得大于净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= grossWeight){
this.$message({
message: '扣重不得大于毛重',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request2()
}
})
},
request2() {
this.submitDisabled = true;
this.dataForm.id = '';
var _data = this.dataList()
debugger
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 3000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
} else {
debugger
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 3000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
}
},
/* dataFormSubmit() {
var tareWeight = this.dataForm.tareWeight; //
var grossWeight = this.dataForm.grossWeight; //
var buckleWeight = this.dataForm.buckleWeight; //
var netWeight = this.dataForm.netWeight; //
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
if (grossWeight != this.jnpf.floatAdd(tareWeight, this.jnpf.floatAdd(buckleWeight, netWeight))) {
this.$message({
message: '毛重必须等于皮重+扣重+净重',
type: 'error',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request2()
}
})
},
request2() {
this.submitDisabled = true;
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
} else {
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
}).catch(() => {
this.submitDisabled = false
})
}
},*/
request3() {
this.submitDisabled = true;
this.dataForm.id = '';
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.dataForm.id = '';
this.dataForm.tareWeight = 0; //
this.dataForm.grossWeight = 0; //
this.dataForm.buckleWeight = 0; //
this.dataForm.netWeight = 0; //
this.dataForm.poundlistNo = '';
this.$refs.poundUpload.handleRemove(0);
}
})
}).catch(() => {
this.submitDisabled = false
})
} else {
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.dataForm.id = '';
this.dataForm.tareWeight = 0; //
this.dataForm.grossWeight = 0; //
this.dataForm.buckleWeight = 0; //
this.dataForm.netWeight = 0; //
this.dataForm.poundlistNo = '';
this.$refs.poundUpload.handleRemove(0);
}
})
}).catch(() => {
this.submitDisabled = false
})
}
},
request() {
this.submitDisabled = true;
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.submitDisabled = false;
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
_data.originPlace = JSON.stringify(_data.originPlace)
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.poundPictures = []
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
if (_dataAll.originPlace.length > 0) {
_dataAll.originPlace = JSON.parse(_dataAll.originPlace)
} else {
_dataAll.originPlace = []
}
this.value = _dataAll.poundPictures;
_dataAll.id = '';
_dataAll.tareWeight = 0; //
_dataAll.grossWeight = 0; //
_dataAll.buckleWeight = 0; //
_dataAll.netWeight = 0; //
_dataAll.poundlistNo = '';
//this.$refs.poundUpload.handleRemove(0);
this.dataForm = _dataAll
},
beforeUpload(file) {
const unitNum = units[this.sizeUnit];
if (!this.fileSize) return true
let isRightSize = file.size / unitNum < this.fileSize
if (!isRightSize) {
this.$message.error(`图片大小超过${this.fileSize}${this.sizeUnit}`)
return isRightSize;
}
let isAccept = new RegExp('image/*').test(file.type)
if (!isAccept) {
this.$message.error(`请上传图片`)
return isAccept;
}
return isRightSize && isAccept;
},
/* handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
this.dataForm.customerId = res.data.customerId;
this.dataForm.customerName = res.data.customerName;
this.dataForm.salesId = res.data.salesId;
this.dataForm.salesName = res.data.salesName;
this.dataForm.vehicleId = res.data.vehicleId;
this.dataForm.poundDate = res.data.poundDate;
this.dataForm.poundlistNo = res.data.poundlistNo;
this.dataForm.tareWeight = res.data.tareWeight;
this.dataForm.grossWeight = res.data.grossWeight;
this.dataForm.buckleWeight = res.data.buckleWeight;
this.dataForm.netWeight = res.data.netWeight;
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
}, */
handleSuccess(res, file, fileList) {
if (res.code == 200) {
this.fileList.push({
name: file.name,
fileId: res.data.vo.name,
url: res.data.vo.url
})
this.dataForm.customerId = res.data.customerId;
this.dataForm.customerName = res.data.customerName;
this.dataForm.salesId = res.data.salesId;
this.dataForm.salesName = res.data.salesName;
this.dataForm.vehicleId = res.data.vehicleId;
this.dataForm.poundDate = res.data.poundDate;
this.dataForm.poundlistNo = res.data.poundlistNo;
this.dataForm.tareWeight = res.data.tareWeight;
this.dataForm.grossWeight = res.data.grossWeight;
this.dataForm.buckleWeight = res.data.buckleWeight;
this.dataForm.netWeight = res.data.netWeight;
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
this.dataForm.poundPictures = this.fileList;
if (res.data.grossWeight >= 1000) {
this.dataForm.unit = '1';
this.unit = '1';
}
/* this.$emit('input', this.fileList)
this.$emit('change', this.fileList) */
} else {
this.$refs.elUpload.uploadFiles.splice(fileList.length - 1, 1)
fileList.filter(o => o.uid != file.uid)
this.$emit('input', this.fileList)
this.$emit('change', this.fileList)
this.$message({
message: res.msg,
type: 'error',
duration: 2500
})
}
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制最多可以上传${this.limit}张图片`)
},
handlePictureCardPreview(index) {
this.$refs['image' + index][0].clickHandler()
},
handleRemove(index) {
this.fileList.splice(index, 1)
this.$refs.elUpload.uploadFiles.splice(index, 1)
this.$emit("input", this.fileList)
this.$emit('change', this.fileList)
},
getImgList(list) {
const newList = list.map(o => this.define.comUrl + o.url)
return newList
}
},
}
</script>
<style lang="scss" scoped>
>>>.el-upload-list--picture-card .el-upload-list__item {
width: 120px;
height: 120px;
}
>>>.el-upload--picture-card {
width: 120px;
height: 120px;
line-height: 120px;
}
.upload-btn {
display: inline-block;
}
</style>

@ -47,7 +47,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -154,6 +154,9 @@
<el-table-column label="操作" align="center" fixed="right"
width="200">
<template slot-scope="scope">
<el-button type="text"
@click="continueUpload(scope.row.id)" v-has="'btn_continueUpload'">继续上传
</el-button>
<el-button type="text"
@click="addOrUpdateHandle2(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">审核
</el-button>
@ -174,6 +177,7 @@
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<JNPF-Form2 v-if="formVisible2" ref="JNPFForm2" @refresh="refresh2"/>
<JNPF-Form3 v-if="formVisible3" ref="JNPFForm3" @refresh="refresh3"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
@ -184,13 +188,14 @@
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import JNPFForm2 from './Form2'
import JNPFForm3 from './Form3'
import ExportBox from './ExportBox'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: { JNPFForm, JNPFForm2, ExportBox, Detail },
components: { JNPFForm, JNPFForm2, JNPFForm3, ExportBox, Detail },
data() {
return {
showAll: false,
@ -215,6 +220,7 @@
},
formVisible: false,
formVisible2: false,
formVisible3: false,
exportBoxVisible: false,
columnList: [
{ prop: 'creatorTime', label: '磅单日期' },
@ -257,6 +263,12 @@
this.initData()
},
methods: {
continueUpload(id,isDetail){
this.formVisible3 = true
this.$nextTick(() => {
this.$refs.JNPFForm3.init(id, isDetail)
})
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
@ -391,6 +403,16 @@
this.formVisible2 = false
if (isrRefresh) this.reset()
},
refresh3(isrRefresh) {
this.formVisible2 = false
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined

@ -17,7 +17,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -294,6 +294,12 @@
if (isrRefresh) this.reset()
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}

@ -17,7 +17,7 @@
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
</el-form-item>
</el-col>
</el-form>
@ -289,6 +289,12 @@
this.query[key] = undefined
}
this.search()
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}

Loading…
Cancel
Save