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

@ -1,6 +1,7 @@
package jnpf.arinvoices.mapper; package jnpf.arinvoices.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.arinvoices.entity.ArinvoicesEntity; import jnpf.arinvoices.entity.ArinvoicesEntity;
@ -20,5 +21,5 @@ import org.apache.ibatis.annotations.Param;
*/ */
public interface ArinvoicesMapper extends BaseMapper<ArinvoicesEntity> { 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 total=0;
int arinvoicesNum =0; int arinvoicesNum =0;
QueryWrapper<ArinvoicesEntity> arinvoicesQueryWrapper=new QueryWrapper<>(); QueryWrapper<ArinvoicesEntity> arinvoicesQueryWrapper=new QueryWrapper<>();
arinvoicesQueryWrapper.eq("a.delete_mark", "0");
int arinvoices_item0Num =0; int arinvoices_item0Num =0;
QueryWrapper<Arinvoices_item0Entity> arinvoices_item0QueryWrapper=new QueryWrapper<>(); QueryWrapper<Arinvoices_item0Entity> arinvoices_item0QueryWrapper=new QueryWrapper<>();
int arinvoices_item1Num =0; int arinvoices_item1Num =0;
@ -86,7 +87,7 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(arinvoicesObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -111,7 +112,7 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(arinvoicesObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } 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){ if(AllIdList.size()>0){
arinvoicesQueryWrapper.lambda().in(ArinvoicesEntity::getId, AllIdList); arinvoicesQueryWrapper.lambda().in(ArinvoicesEntity::getId, AllIdList);
} }
@ -197,7 +181,7 @@ public class ArinvoicesServiceImpl extends ServiceImpl<ArinvoicesMapper, Arinvoi
if (StringUtil.isNotNull(detpartment)) { if (StringUtil.isNotNull(detpartment)) {
arinvoicesPagination.setDepartmentId(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()); return arinvoicesPagination.setData(userIPage.getRecords(),userIPage.getTotal());
} }
@Override @Override

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

@ -1,8 +1,10 @@
package jnpf.collection.mapper; package jnpf.collection.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.arinvoices.entity.ArinvoicesEntity;
import jnpf.collection.entity.CollectionEntity; import jnpf.collection.entity.CollectionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.collection.model.collection.CollectionPagination; import jnpf.collection.model.collection.CollectionPagination;
@ -29,5 +31,5 @@ public interface CollectionMapper extends BaseMapper<CollectionEntity> {
List<ContractFileEntity> queryContract(String code); 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 total=0;
int collectionNum =0; int collectionNum =0;
QueryWrapper<CollectionEntity> collectionQueryWrapper=new QueryWrapper<>(); QueryWrapper<CollectionEntity> collectionQueryWrapper=new QueryWrapper<>();
collectionQueryWrapper.eq("a.delete_mark", "0");
int collection_item0Num =0; int collection_item0Num =0;
QueryWrapper<Collection_item0Entity> collection_item0QueryWrapper=new QueryWrapper<>(); QueryWrapper<Collection_item0Entity> collection_item0QueryWrapper=new QueryWrapper<>();
boolean pcPermission = true; boolean pcPermission = true;
@ -92,7 +93,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(collectionObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -110,7 +111,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(collectionObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } 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){ if(AllIdList.size()>0){
collectionQueryWrapper.lambda().in(CollectionEntity::getId, AllIdList); collectionQueryWrapper.lambda().in(CollectionEntity::getId, AllIdList);
} }
@ -176,7 +172,7 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
if (StringUtil.isNotNull(detpartment)) { if (StringUtil.isNotNull(detpartment)) {
collectionPagination.setDepartmentId(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()); return collectionPagination.setData(userIPage.getRecords(),userIPage.getTotal());
} }
@Override @Override

@ -1,8 +1,10 @@
package jnpf.invoices.mapper; package jnpf.invoices.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.collection.entity.CollectionEntity;
import jnpf.invoices.entity.InvoicesEntity; import jnpf.invoices.entity.InvoicesEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.invoices.model.invoices.InvoicesPagination; import jnpf.invoices.model.invoices.InvoicesPagination;
@ -18,5 +20,5 @@ import org.apache.ibatis.annotations.Param;
*/ */
public interface InvoicesMapper extends BaseMapper<InvoicesEntity> { 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("invoiceAmount", model.getInvoiceAmount().add(model.getTaxAmount()));//金额 + 税额=发票金额
dataRowMap.put("taxRate", model.getTaxRate()); dataRowMap.put("taxRate", model.getTaxRate());
dataRowMap.put("taxAmount", model.getTaxAmount()); dataRowMap.put("taxAmount", model.getTaxAmount());
dataRowMap.put("amountNotTax", model.getInvoiceAmount().subtract(model.getTaxAmount())); dataRowMap.put("amountNotTax", model.getInvoiceAmount());
dataRowMap.put("invoiceStatus", "0"); dataRowMap.put("invoiceStatus", "0");
dataRowMap.put("creatorUserName", model.getCreatorUserName()); dataRowMap.put("creatorUserName", model.getCreatorUserName());
dataRowMap.put("invoicingDate", model.getInvoicingDate()); dataRowMap.put("invoicingDate", model.getInvoicingDate());

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

@ -51,6 +51,18 @@ public class FileCopy {
int xlsIndex = 0; int xlsIndex = 0;
// 将文件夹中的文件上传到文件服务器 // 将文件夹中的文件上传到文件服务器
if (file.isDirectory()) { 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()); ArrayList<Object> resultListt = getInfoAndUpFile(file.listFiles());
if (resultListt.get(0) != null) { if (resultListt.get(0) != null) {
fileName = fileName+String.valueOf(resultListt.get(0)); fileName = fileName+String.valueOf(resultListt.get(0));
@ -128,6 +140,10 @@ public class FileCopy {
// 将车辆照片存在车辆照片中 // 将车辆照片存在车辆照片中
input.close(); input.close();
} }
}
if (i == fileList.length - 1) { if (i == fileList.length - 1) {
if (excelFile != null) { if (excelFile != null) {
ExcelReader reader = ExcelUtil.getReader(excelFile); ExcelReader reader = ExcelUtil.getReader(excelFile);
@ -182,6 +198,7 @@ public class FileCopy {
Cell strCell5 = row.getCell(11); Cell strCell5 = row.getCell(11);
Cell strCell6 = row.getCell(12); Cell strCell6 = row.getCell(12);
Cell strCell7 = row.getCell(1); Cell strCell7 = row.getCell(1);
Cell strCell8 = row.getCell(3);
if (i1 == 0) { if (i1 == 0) {
@ -218,9 +235,12 @@ public class FileCopy {
cell3.setCellValue(str3); cell3.setCellValue(str3);
cell5.setCellType(CellType.STRING); cell5.setCellType(CellType.STRING);
cell5.setCellValue(FileCopy.setSteColumn(cell5)); cell5.setCellValue(FileCopy.setSteColumn(cell5));
if (vehiclePictureFolder1!=null){
cell6.setCellValue(vehiclePictureFolder1.getDriverName()!=null?vehiclePictureFolder1.getDriverName():""); cell6.setCellValue(vehiclePictureFolder1.getDriverName()!=null?vehiclePictureFolder1.getDriverName():"");
cell7.setCellValue(vehiclePictureFolder1.getPhoneNumber()!=null?vehiclePictureFolder1.getPhoneNumber():""); cell7.setCellValue(vehiclePictureFolder1.getPhoneNumber()!=null?vehiclePictureFolder1.getPhoneNumber():"");
cell8.setCellValue(vehiclePictureFolder1.getCarNumber()!=null?vehiclePictureFolder1.getCarNumber():""); cell8.setCellValue(vehiclePictureFolder1.getCarNumber()!=null?vehiclePictureFolder1.getCarNumber():"");
}
strCell1.setCellType(CellType.STRING); strCell1.setCellType(CellType.STRING);
strCell1.setCellValue(FileCopy.setSteColumn(strCell1)); strCell1.setCellValue(FileCopy.setSteColumn(strCell1));
strCell2.setCellType(CellType.STRING); strCell2.setCellType(CellType.STRING);
@ -233,6 +253,8 @@ public class FileCopy {
strCell5.setCellValue(FileCopy.setSteColumn(strCell5)); strCell5.setCellValue(FileCopy.setSteColumn(strCell5));
strCell6.setCellType(CellType.STRING); strCell6.setCellType(CellType.STRING);
strCell6.setCellValue(FileCopy.setSteColumn(strCell6)); strCell6.setCellValue(FileCopy.setSteColumn(strCell6));
strCell8.setCellType(CellType.STRING);
strCell8.setCellValue(FileCopy.setSteColumn(strCell8));
// strCell7.setCellType(CellType.STRING); // strCell7.setCellType(CellType.STRING);
String stringCellValue = VehiclePictureFolderUtils.getValue(strCell7); String stringCellValue = VehiclePictureFolderUtils.getValue(strCell7);
@ -290,8 +312,6 @@ public class FileCopy {
} }
}
resultList.add(fileName); resultList.add(fileName);
resultList.add(carFileMap); resultList.add(carFileMap);

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

@ -1,8 +1,10 @@
package jnpf.purchaseback.mapper; package jnpf.purchaseback.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.invoices.entity.InvoicesEntity;
import jnpf.purchaseback.entity.PurchasebackEntity; import jnpf.purchaseback.entity.PurchasebackEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.purchaseback.model.purchaseback.PurchasebackPagination; import jnpf.purchaseback.model.purchaseback.PurchasebackPagination;
@ -18,5 +20,5 @@ import org.apache.ibatis.annotations.Param;
*/ */
public interface PurchasebackMapper extends BaseMapper<PurchasebackEntity> { 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 total=0;
int purchasebackNum =0; int purchasebackNum =0;
QueryWrapper<PurchasebackEntity> purchasebackQueryWrapper=new QueryWrapper<>(); QueryWrapper<PurchasebackEntity> purchasebackQueryWrapper=new QueryWrapper<>();
purchasebackQueryWrapper.eq("a.delete_mark", "0");
int purchaseback_item0Num =0; int purchaseback_item0Num =0;
QueryWrapper<Purchaseback_item0Entity> purchaseback_item0QueryWrapper=new QueryWrapper<>(); QueryWrapper<Purchaseback_item0Entity> purchaseback_item0QueryWrapper=new QueryWrapper<>();
int purchaseorderNum =0; int purchaseorderNum =0;
@ -85,7 +86,7 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(purchasebackObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -110,7 +111,7 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(purchasebackObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -174,7 +175,7 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
if (StringUtil.isNotNull(detpartment)) { if (StringUtil.isNotNull(detpartment)) {
purchasebackPagination.setDepartmentId(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()); return purchasebackPagination.setData(userIPage.getRecords(),userIPage.getTotal());
/*if(StringUtil.isNotEmpty(purchasebackPagination.getDocumentNo())){ /*if(StringUtil.isNotEmpty(purchasebackPagination.getDocumentNo())){
purchasebackNum++; purchasebackNum++;

@ -16,6 +16,7 @@ import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO; import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO; import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil; import jnpf.config.ConfigValueUtil;
import jnpf.config.ToolUtils;
import jnpf.contractfile.entity.ContractFileEntity; import jnpf.contractfile.entity.ContractFileEntity;
import jnpf.contractfile.service.ContractFileService; import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException; import jnpf.exception.DataException;
@ -343,12 +344,26 @@ public class PurchaseorderController {
InputStream inputStream = file.getInputStream(); InputStream inputStream = file.getInputStream();
File gbk = ZipUtil.unzip(inputStream, temporaryFile, Charset.forName("GBK")); 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(); inputStream.close();
cache.forceDelete(temporaryFile);
// cn.hutool.core.io.FileUtil.del(temporaryFile); // cn.hutool.core.io.FileUtil.del(temporaryFile);
// FileUtil.upFile(file, filePath, fileName); // FileUtil.upFile(file, filePath, fileName);
DownloadVO vo = DownloadVO.builder().build(); DownloadVO vo = DownloadVO.builder().build();
vo.setName(String.valueOf(resultList.get(0)));
Optional<List<Object>> userOptional = Optional.ofNullable(resultList);
userOptional.ifPresent(o -> vo.setName(String.valueOf(o.get(0))));
//vo.setName(String.valueOf(resultList.get(0)));
return ActionResult.success(vo); return ActionResult.success(vo);
} else { } else {
return ActionResult.fail("选择文件不符合导入"); return ActionResult.fail("选择文件不符合导入");
@ -386,7 +401,9 @@ public class PurchaseorderController {
List<PurchaseorderDTO> dataList = JsonUtil.getJsonToList(data.getList(), PurchaseorderDTO.class); List<PurchaseorderDTO> dataList = JsonUtil.getJsonToList(data.getList(), PurchaseorderDTO.class);
//导入数据 //导入数据
PurchaseOrderImportVo result = purchaseorderitemService.importData(dataList); PurchaseOrderImportVo result = purchaseorderitemService.importData(dataList);
return ActionResult.success(result); System.out.println("这是错误的数据"+result);
Map<String, Object> stringObjectMap = JsonUtil.entityToMap(result);
return ActionResult.success(stringObjectMap);
} }
@ -749,11 +766,6 @@ public class PurchaseorderController {
vo.setPaymentList(paymentList); vo.setPaymentList(paymentList);
List<Receiptin_item0Entity> receiptin_item0itemList = purchaseorderitemService.GetReceiptin_item0itemList(id); List<Receiptin_item0Entity> receiptin_item0itemList = purchaseorderitemService.GetReceiptin_item0itemList(id);
List<Receiptin_item0Model> jg_receiptin_item0ModelList = JsonUtil.getJsonToList(receiptin_item0itemList, Receiptin_item0Model.class); List<Receiptin_item0Model> jg_receiptin_item0ModelList = JsonUtil.getJsonToList(receiptin_item0itemList, Receiptin_item0Model.class);
vo.setReceiptin_item0List(jg_receiptin_item0ModelList); vo.setReceiptin_item0List(jg_receiptin_item0ModelList);
@ -975,6 +987,4 @@ public class PurchaseorderController {
} }
return ActionResult.success("删除成功"); return ActionResult.success("删除成功");
} }
} }

@ -13,7 +13,7 @@ import java.util.List;
* @Version 1.0 * @Version 1.0
*/ */
@Data @Data
public class PurchaseorderDTO { public class PurchaseorderDTO implements Cloneable{
@Excel(name = "收货日期") @Excel(name = "收货日期")
private String poundDate; private String poundDate;
@ -94,4 +94,15 @@ public class PurchaseorderDTO {
private List<PurchaseorderDTO> list; private List<PurchaseorderDTO> list;
private String creatorTime; 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); lineCell11.setCellStyle(lineStyle);
String ss=String.valueOf(map.get("purchaseAmount")).equals("null") ? "" : String.valueOf(map.get("purchaseAmount")); String ss=String.valueOf(map.get("purchaseAmount")).equals("null") ? "" : String.valueOf(map.get("purchaseAmount"));
priceSum= priceSum.add(new BigDecimal(ss)); priceSum= priceSum.add(new BigDecimal(ss));
String s = String.valueOf(map.get("settlement")).equals("null") ? "0" : String.valueOf(map.get("settlement")); String s = String.valueOf(map.get("settlement")).equals("null") ? "0" : String.valueOf(map.get("settlement"));
sum = sum.add(new BigDecimal(s)); sum = sum.add(new BigDecimal(s));
@ -598,7 +596,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
@Override @Override
public void getPdfInfo(PurchaseorderitemEntity purchaseorderitemEntity, HttpServletResponse response) throws Exception { 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); FileCopy.createFile(templateFilePath);
LambdaQueryWrapper<PurchaseorderitemEntity> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PurchaseorderitemEntity> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(PurchaseorderitemEntity::getDocumentNo,"cgdj2023020300000001"); // wrapper.eq(PurchaseorderitemEntity::getDocumentNo,"cgdj2023020300000001");
@ -1522,7 +1521,12 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
BigDecimal depositAmount =BigDecimal.ZERO; BigDecimal depositAmount =BigDecimal.ZERO;
for (int i = 0; i < num1; i++) { for (int i = 0; i < num1; i++) {
PurchaseorderDTO model = dataList.get(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")) { // 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()); model.setVehicleId(aLong.toString());
} }
}else { }else {
model.setCauseError("目录名称的车牌号对应不上表格中的请检查excel中的车牌号为"+model.getVehicleId()+",目录中车牌号为:"+model.getDriverVehicleId());
errList.add(model); dto.setCauseError("目录名称的车牌号对应不上表格中的请检查excel中的车牌号为"+model.getVehicleId()+",目录中车牌号为:"+model.getDriverVehicleId());
errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1662,8 +1667,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
model.setVehicleId(aLong.toString()); model.setVehicleId(aLong.toString());
} }
}else { }else {
model.setCauseError("车牌号不存在!请添加车辆信息在尝试添加!"); dto.setCauseError("车牌号不存在!请添加车辆信息在尝试添加!");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1676,8 +1681,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (materialEntityList != null && materialEntityList.size() > 0) { if (materialEntityList != null && materialEntityList.size() > 0) {
model.setMaterialId(materialEntityList.get(0).getId()); model.setMaterialId(materialEntityList.get(0).getId());
} else { } else {
model.setCauseError("货物信息不存在!请添加货物信息后尝试添加!"); dto.setCauseError("货物信息不存在!请添加货物信息后尝试添加!");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1690,8 +1695,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (naturalEntityList != null && naturalEntityList.size() > 0) { if (naturalEntityList != null && naturalEntityList.size() > 0) {
model.setNaturalId(naturalEntityList.get(0).getId()); model.setNaturalId(naturalEntityList.get(0).getId());
} else { } else {
model.setCauseError("业务员2信息不存在请添加业务员2信息后尝试添加"); dto.setCauseError("业务员2信息不存在请添加业务员2信息后尝试添加");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1710,8 +1715,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
model.setSupplierId(contractMEntities.get(0).getCode()); model.setSupplierId(contractMEntities.get(0).getCode());
} else { } else {
model.setCauseError("采购合同不存在!请添加采购合同后尝试添加!"); dto.setCauseError("采购合同不存在!请添加采购合同后尝试添加!");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1732,8 +1737,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
// 客户 // 客户
model.setCustomerId(contractMEntities.get(0).getCode()); model.setCustomerId(contractMEntities.get(0).getCode());
} else { } else {
model.setCauseError("销售合同不存在!请添加销售合同后尝试添加!"); dto.setCauseError("销售合同不存在!请添加销售合同后尝试添加!");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1742,8 +1747,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (model.getPoundPictures()!=null&&!model.getPoundPictures().isEmpty()){ if (model.getPoundPictures()!=null&&!model.getPoundPictures().isEmpty()){
}else { }else {
model.setCauseError("磅单照片导入失败!请重新导入!"); dto.setCauseError("磅单照片导入失败!请重新导入!");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1751,8 +1756,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (model.getCarPictures()!=null&&!model.getCarPictures().isEmpty()){ if (model.getCarPictures()!=null&&!model.getCarPictures().isEmpty()){
}else { }else {
model.setCauseError("车辆照片导入失败!请重新导入!"); dto.setCauseError("车辆照片导入失败!请重新导入!");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
@ -1795,17 +1800,19 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
model.setOriginPrice(JsonUtil.getListToJsonArray(strings).toJSONString()); model.setOriginPrice(JsonUtil.getListToJsonArray(strings).toJSONString());
} }
} else { } else {
model.setCauseError("发货地格式不正确!请修改后重新添加!"); dto.setCauseError("发货地格式不正确!请修改后重新添加!");
errList.add(model); errList.add(dto);
ints.add(i); ints.add(i);
continue; continue;
} }
} }
} else { } else {
ints.add(i); ints.add(i);
errList.add(model); errList.add(dto);
} }
} }
if (ints.size()==0){
// 错误信息 // 错误信息
ArrayList<PurchaseorderDTO> dtos = new ArrayList<>(); ArrayList<PurchaseorderDTO> dtos = new ArrayList<>();
for (int i = 0; i < ints.size(); i++) { for (int i = 0; i < ints.size(); i++) {
@ -1995,8 +2002,13 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
} }
} }
}
PurchaseOrderImportVo importVo = new PurchaseOrderImportVo(); PurchaseOrderImportVo importVo = new PurchaseOrderImportVo();
num = errList.size(); num = errList.size();
importVo.setSnum(sum); importVo.setSnum(sum);
importVo.setFnum(num); importVo.setFnum(num);
importVo.setFailResult(errList); importVo.setFailResult(errList);

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

@ -19,6 +19,7 @@ import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService; import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchaseorderEntity; import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.service.PurchaseorderService; import jnpf.purchaseback.service.PurchaseorderService;
import jnpf.purchaseorder.entity.Purchaseorder_item0Entity;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity; import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import jnpf.purchaseorder.service.PurchaseorderitemService; import jnpf.purchaseorder.service.PurchaseorderitemService;
import jnpf.reservoirarea.entity.ReservoirareaEntity; import jnpf.reservoirarea.entity.ReservoirareaEntity;
@ -56,6 +57,7 @@ import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import jnpf.util.GeneraterSwapUtil; import jnpf.util.GeneraterSwapUtil;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import jnpf.util.file.UploadUtil; import jnpf.util.file.UploadUtil;
import jnpf.util.enums.FileTypeEnum; import jnpf.util.enums.FileTypeEnum;
@ -121,9 +123,9 @@ public class ReceiptinController {
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName())); entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
}*/ }*/
List<ReceiptinListVO> listVO=JsonUtil.getJsonToList(list,ReceiptinListVO.class); List<ReceiptinListVO> listVO=JsonUtil.getJsonToList(list,ReceiptinListVO.class);
/*for(ReceiptinListVO receiptinVO:listVO){ for(ReceiptinListVO receiptinVO:listVO){
} }
*/
PageListVO vo=new PageListVO(); PageListVO vo=new PageListVO();
vo.setList(listVO); vo.setList(listVO);
@ -352,6 +354,10 @@ public class ReceiptinController {
receiptin_item0Entity.setWarehouseName(wareHouseEntity.getName()); 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 )); 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.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data; import lombok.Data;
import java.util.Date; 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.math.BigDecimal;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -127,4 +130,7 @@ public class Receiptin_item0Entity {
@TableField(exist = false) @TableField(exist = false)
private String reservoirareaName; 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.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
import java.util.Date; import java.util.Date;
@ -97,4 +98,7 @@ public class Receiptin_item0Model {
@JsonProperty("reservoirareaName") @JsonProperty("reservoirareaName")
private String reservoirareaName; private String reservoirareaName;
@JsonProperty("poundlistEntity")
private PoundlistEntity poundlistEntity;
} }

@ -1,8 +1,10 @@
package jnpf.receiptout.mapper; package jnpf.receiptout.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.receiptout.entity.ReceiptoutEntity; import jnpf.receiptout.entity.ReceiptoutEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.receiptout.model.receiptout.ReceiptoutPagination; import jnpf.receiptout.model.receiptout.ReceiptoutPagination;
@ -19,5 +21,5 @@ import org.apache.ibatis.annotations.Param;
* 2023-02-24 * 2023-02-24
*/ */
public interface ReceiptoutMapper extends BaseMapper<ReceiptoutEntity> { 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 total=0;
int receiptoutNum =0; int receiptoutNum =0;
QueryWrapper<ReceiptoutEntity> receiptoutQueryWrapper=new QueryWrapper<>(); QueryWrapper<ReceiptoutEntity> receiptoutQueryWrapper=new QueryWrapper<>();
receiptoutQueryWrapper.eq("a.delete_mark", "0");
int receiptout_item0Num =0; int receiptout_item0Num =0;
QueryWrapper<Receiptout_item0Entity> receiptout_item0QueryWrapper=new QueryWrapper<>(); QueryWrapper<Receiptout_item0Entity> receiptout_item0QueryWrapper=new QueryWrapper<>();
boolean pcPermission = true; boolean pcPermission = true;
@ -81,7 +82,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(receiptoutObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -99,7 +100,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(receiptoutObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -119,7 +120,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
} }
} }
if(StringUtil.isNotEmpty(receiptoutPagination.getDocumentNo())){ /* if(StringUtil.isNotEmpty(receiptoutPagination.getDocumentNo())){
receiptoutNum++; receiptoutNum++;
receiptoutQueryWrapper.lambda().like(ReceiptoutEntity::getDocumentNo,receiptoutPagination.getDocumentNo()); 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)); Long sec = Long.valueOf(creatorTime.get(1));
receiptoutPagination.setStartDate(new Date(fir)); receiptoutPagination.setStartDate(new Date(fir));
receiptoutPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59")); receiptoutPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
} }*/
if(AllIdList.size()>0){ if(AllIdList.size()>0){
receiptoutQueryWrapper.lambda().in(ReceiptoutEntity::getId, AllIdList); receiptoutQueryWrapper.lambda().in(ReceiptoutEntity::getId, AllIdList);
@ -176,7 +177,7 @@ public class ReceiptoutServiceImpl extends ServiceImpl<ReceiptoutMapper, Receipt
if (StringUtil.isNotNull(detpartment)) { if (StringUtil.isNotNull(detpartment)) {
receiptoutPagination.setDepartmentId(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()); return receiptoutPagination.setData(userIPage.getRecords(),userIPage.getTotal());
} }
@Override @Override

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

@ -72,6 +72,7 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
int total=0; int total=0;
int salebackNum =0; int salebackNum =0;
QueryWrapper<SalebackEntity> salebackQueryWrapper=new QueryWrapper<>(); QueryWrapper<SalebackEntity> salebackQueryWrapper=new QueryWrapper<>();
salebackQueryWrapper.eq("a.delete_mark", "0");
int saleback_item0Num =0; int saleback_item0Num =0;
QueryWrapper<Saleback_item0Entity> saleback_item0QueryWrapper=new QueryWrapper<>(); 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"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(salebackObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -98,7 +99,7 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(salebackObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -118,20 +119,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){ if(AllIdList.size()>0){
@ -174,7 +161,7 @@ public class SalebackServiceImpl extends ServiceImpl<SalebackMapper, SalebackEnt
if (StringUtil.isNotNull(detpartment)) { if (StringUtil.isNotNull(detpartment)) {
salebackPagination.setDepartmentId(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()); return salebackPagination.setData(userIPage.getRecords(),userIPage.getTotal());
} }
@Override @Override

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

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

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

@ -93,6 +93,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
int total=0; int total=0;
int saleorderitemNum =0; int saleorderitemNum =0;
QueryWrapper<SaleorderitemEntity> saleorderitemQueryWrapper=new QueryWrapper<>(); QueryWrapper<SaleorderitemEntity> saleorderitemQueryWrapper=new QueryWrapper<>();
saleorderitemQueryWrapper.eq("a.delete_mark","0");
int salesorder_item0Num =0; int salesorder_item0Num =0;
QueryWrapper<Salesorder_item0Entity> salesorder_item0QueryWrapper=new QueryWrapper<>(); QueryWrapper<Salesorder_item0Entity> salesorder_item0QueryWrapper=new QueryWrapper<>();
int receiptoutsoitemNum =0; int receiptoutsoitemNum =0;
@ -110,7 +111,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(saleorderitemObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -163,7 +164,7 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(saleorderitemObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } 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){ if(AllIdList.size()>0){
saleorderitemQueryWrapper.lambda().in(SaleorderitemEntity::getId, AllIdList); 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()); return saleorderitemPagination.setData(userIPage.getRecords(),userIPage.getTotal());
} }
@Override @Override

@ -55,6 +55,7 @@ import javax.validation.Valid;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@ -538,6 +539,8 @@ public class TradeuploadController {
return ActionResult.fail("磅单重复"); return ActionResult.fail("磅单重复");
} }
entity.setId(mainId); entity.setId(mainId);
BigDecimal netWeight = new BigDecimal(tradeuploadCrForm.getNetWeight());
entity.setSettlement(netWeight);
tradeuploadService.save(entity); tradeuploadService.save(entity);
return ActionResult.success("创建成功"); return ActionResult.success("创建成功");
} }
@ -804,6 +807,8 @@ public class TradeuploadController {
if(entity!=null){ if(entity!=null){
TradeuploadEntity subentity=JsonUtil.getJsonToBean(tradeuploadUpForm, TradeuploadEntity.class); TradeuploadEntity subentity=JsonUtil.getJsonToBean(tradeuploadUpForm, TradeuploadEntity.class);
subentity.setCreatorTime(entity.getCreatorTime()); subentity.setCreatorTime(entity.getCreatorTime());
BigDecimal netWeight = new BigDecimal(tradeuploadUpForm.getNetWeight());
subentity.setSettlement(netWeight);
QueryWrapper<TradeuploadEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<TradeuploadEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(TradeuploadEntity::getPoundlistNo,entity.getPoundlistNo()); queryWrapper.lambda().eq(TradeuploadEntity::getPoundlistNo,entity.getPoundlistNo());
queryWrapper.lambda().eq(TradeuploadEntity::getCustomerId,entity.getCustomerId()); 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.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.saleorder.entity.SaleorderitemEntity;
import jnpf.tradeupload.entity.TradeuploadEntity; import jnpf.tradeupload.entity.TradeuploadEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.tradeupload.model.tradeupload.TradeuploadPagination; import jnpf.tradeupload.model.tradeupload.TradeuploadPagination;
@ -23,5 +24,5 @@ import java.util.List;
public interface TradeuploadMapper extends BaseMapper<TradeuploadEntity> { public interface TradeuploadMapper extends BaseMapper<TradeuploadEntity> {
List<TradeuploadEntity> queryVehicle(TradeuploadEntity 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 total=0;
int tradeuploadNum =0; int tradeuploadNum =0;
QueryWrapper<TradeuploadEntity> tradeuploadQueryWrapper=new QueryWrapper<>(); QueryWrapper<TradeuploadEntity> tradeuploadQueryWrapper=new QueryWrapper<>();
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getIsExamine,"0"); tradeuploadQueryWrapper.eq("a.is_examine","0");
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getPoundType,"0"); tradeuploadQueryWrapper.eq("a.delete_mark","0");
boolean pcPermission = true; boolean pcPermission = true;
boolean appPermission = true; boolean appPermission = true;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(tradeuploadObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -104,7 +104,7 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ 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)){ if (ObjectUtil.isEmpty(tradeuploadObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -165,7 +165,7 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
} }
// tradeuploadPagination.setDepartmentId(detpartment); // 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()); 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.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
@ -15,6 +16,8 @@ import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO; import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil; import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.util.*; import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum; import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil; import jnpf.util.file.UploadUtil;
@ -63,6 +66,9 @@ public class VehicleController {
@Autowired @Autowired
private VehicleService vehicleService; private VehicleService vehicleService;
@Autowired
private PoundlistService poundlistService;
@ -317,9 +323,14 @@ public class VehicleController {
@Transactional @Transactional
public ActionResult delete(@PathVariable("id") String id){ public ActionResult delete(@PathVariable("id") String id){
VehicleEntity entity= vehicleService.getInfo(id); VehicleEntity entity= vehicleService.getInfo(id);
QueryWrapper<PoundlistEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(PoundlistEntity::getVehicleId,id);
List<PoundlistEntity> poundlistEntityList = poundlistService.list(queryWrapper);
if (poundlistEntityList.size()>0){
return ActionResult.fail("该车辆已被使用,无法删除");
}
if(entity!=null){ if(entity!=null){
vehicleService.delete(entity); vehicleService.delete(entity);
} }
return ActionResult.success("删除成功"); return ActionResult.success("删除成功");
} }

@ -13,15 +13,7 @@
LEFT JOIN jg_customer b ON a.customer_id = b.id and b.delete_mark = '0' 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_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' LEFT JOIN jg_salesorder d ON a.sales_order_id = d.id and d.delete_mark = '0'
WHERE 1=1 ${ew.customSqlSegment}
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>
<if test="arinvoicesPagination.documentNo != null and arinvoicesPagination.documentNo != ''"> <if test="arinvoicesPagination.documentNo != null and arinvoicesPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{arinvoicesPagination.documentNo},'%') and a.document_no LIKE CONCAT('%',#{arinvoicesPagination.documentNo},'%')
</if> </if>

@ -17,15 +17,7 @@
jg_collection a jg_collection a
LEFT JOIN jg_customer b ON a.customer_id = b.id and b.delete_mark = '0' 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_contract c ON a.contract_id = c.id and c.delete_mark = '0'
where 1=1 ${ew.customSqlSegment}
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>
<if test="collectionPagination.documentNo != null and collectionPagination.documentNo != ''"> <if test="collectionPagination.documentNo != null and collectionPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{collectionPagination.documentNo},'%') and a.document_no LIKE CONCAT('%',#{collectionPagination.documentNo},'%')
</if> </if>

@ -7,14 +7,7 @@
LEFT JOIN jg_purchaseorder b on a.purchaseorder_id = b.id 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_contract c on a.contract_id = c.id
LEFT JOIN jg_supplier d on a.supplier_id = d.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 ${ew.customSqlSegment} 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>
<if test="invoicesPagination.startDate != null and invoicesPagination.endDate != null"> <if test="invoicesPagination.startDate != null and invoicesPagination.endDate != null">
AND a.creator_time &gt; #{invoicesPagination.startDate} AND a.creator_time &lt;= #{invoicesPagination.endDate} AND a.creator_time &gt; #{invoicesPagination.startDate} AND a.creator_time &lt;= #{invoicesPagination.endDate}
</if> </if>

@ -7,16 +7,7 @@
LEFT JOIN jg_purchaseorder b on a.purchase_order_id = b.id 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_contract c on b.contract_code = c.id
LEFT JOIN jg_supplier d on b.supplier_id = d.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 ${ew.customSqlSegment} 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>
<if test="purchasebackPagination.documentNo != null and purchasebackPagination.documentNo != ''"> <if test="purchasebackPagination.documentNo != null and purchasebackPagination.documentNo != ''">
AND a.document_no LIKE CONCAT('%',#{purchasebackPagination.documentNo},'%') AND a.document_no LIKE CONCAT('%',#{purchasebackPagination.documentNo},'%')
</if> </if>

@ -11,15 +11,7 @@
jg_receiptout a jg_receiptout a
LEFT JOIN jg_customer b on a.customer_id = b.id and b.delete_mark = '0' 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' LEFT JOIN jg_salesorder c on a.source_no = c.id and c.delete_mark = '0'
where 1=1 ${ew.customSqlSegment}
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>
<if test="receiptoutPagination.documentNo != null and receiptoutPagination.documentNo != ''"> <if test="receiptoutPagination.documentNo != null and receiptoutPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{receiptoutPagination.documentNo},'%') and a.document_no LIKE CONCAT('%',#{receiptoutPagination.documentNo},'%')
</if> </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_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_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' LEFT JOIN jg_customer d on b.customer_id = d.id and d.delete_mark = '0'
where 1 = 1 ${ew.customSqlSegment}
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>
<if test="salebackPagination.documentNo != null and salebackPagination.documentNo != ''"> <if test="salebackPagination.documentNo != null and salebackPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{salebackPagination.documentNo},'%') and a.document_no LIKE CONCAT('%',#{salebackPagination.documentNo},'%')
</if> </if>

@ -11,15 +11,7 @@
jg_salesorder a jg_salesorder a
left join jg_contract b on a.contract_id = b.id and b.delete_mark = '0' 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' left join jg_customer c on a.customer_id = c.id and c.delete_mark = '0'
where 1=1 ${ew.customSqlSegment}
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>
<if test="saleorderitemPagination.documentNo != null and saleorderitemPagination.documentNo != ''"> <if test="saleorderitemPagination.documentNo != null and saleorderitemPagination.documentNo != ''">
and a.document_no LIKE CONCAT('%',#{saleorderitemPagination.documentNo},'%') and a.document_no LIKE CONCAT('%',#{saleorderitemPagination.documentNo},'%')
</if> </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 jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id LEFT JOIN jg_natural i on a.natural_id = i.id
where a.is_examine = '0' AND a.delete_mark = 0 ${ew.customSqlSegment}
/*添加权限*/
<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>
<if test="tradeuploadPagination.keyword != null and tradeuploadPagination.keyword != ''"> <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},'%')) AND (b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%'))
</if> </if>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

@ -724,8 +724,9 @@
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
isTransfer: '',
purchaseOrderId: '',
documentNo: '', documentNo: '',
contractId: '', contractId: '',
customerId: '', customerId: '',
contractName: '', contractName: '',
@ -847,8 +848,6 @@
}, },
methods: { methods: {
editPrice(row) { editPrice(row) {
row.id
debugger
var advanceAmount = 0 var advanceAmount = 0
var price = 0 var price = 0
var notPrice = 0 var notPrice = 0
@ -858,25 +857,10 @@
rate = parseInt(item.fullName) 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) => { this.dataForm.salesorder_item0List.forEach((item, index) => {
if (row.vehicleId == item.vehicleId) { if (row.vehicleId == item.vehicleId) {
item.price = this.jnpf.floatMul(item.settlement, item.unitPrice)// 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)// 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') {// if (item.advance == '1') {//
advanceAmount = this.jnpf.floatAdd(advanceAmount, item.price)// advanceAmount = this.jnpf.floatAdd(advanceAmount, item.price)//
@ -887,24 +871,6 @@
this.dataForm.advanceAmount = advanceAmount this.dataForm.advanceAmount = advanceAmount
this.dataForm.price = price this.dataForm.price = price
this.dataForm.notPrice = notPrice 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) { getSummaries(param) {
const { columns, data } = param const { columns, data } = param
@ -1034,6 +1000,8 @@
this.dataForm.contractNo = list[0].contractNo this.dataForm.contractNo = list[0].contractNo
this.dataForm.contractName = list[0].contractName this.dataForm.contractName = list[0].contractName
this.dataForm.customerName = list[0].customerName this.dataForm.customerName = list[0].customerName
this.dataForm.isTransfer = list.isTransfer
this.dataForm.purchaseOrderId = list .purchaseOrderId
var num = 0 var num = 0
var amount = 0 var amount = 0
var advance = 0 var advance = 0
@ -1044,7 +1012,7 @@
this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(list[i].salesPrice, list[i].settlement) this.dataForm.salesorder_item0List[i].price = this.jnpf.floatMul(list[i].salesPrice, list[i].settlement)
this.rateOptions.find((item) => { this.rateOptions.find((item) => {
if (this.dataForm.salesorder_item0List[i].rate == item.id) { if (this.dataForm.salesorder_item0List[i].rate == item.id) {
this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.salesorder_item0List[i].price, (100 - item.fullName)), 100) this.dataForm.salesorder_item0List[i].noPrice = this.jnpf.floatDiv(this.dataForm.salesorder_item0List[i].price, this.jnpf.floatAdd((1, this.jnpf.floatDiv(item.fullName,100))))
notPrice = this.jnpf.floatAdd(notPrice, this.dataForm.salesorder_item0List[i].noPrice) notPrice = this.jnpf.floatAdd(notPrice, this.dataForm.salesorder_item0List[i].noPrice)
} }
}) })

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

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

@ -39,7 +39,7 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <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" <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button> v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
@ -78,7 +78,7 @@
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" custom-column border> @selection-change="handleSelectionChange" custom-column border show-summary :summary-method="getSummaries">
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center" /> <el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center" />
<!-- <el-table-column label="单据状态 " sortable width="150" prop="status" align="center" >--> <!-- <el-table-column label="单据状态 " sortable width="150" prop="status" align="center" >-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
@ -103,7 +103,7 @@
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.isPayment | dynamicText(isPaymentOptions) }} {{ scope.row.isPayment | dynamicText(isPaymentOptions) }}
</template> </template>
@ -345,6 +345,31 @@
this.initData() this.initData()
}, },
methods: { methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 6 || index === 7)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return this.jnpf.floatAdd(prev,curr);
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
downLoadPDF(){ downLoadPDF(){
if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) { if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) {
this.$message({ this.$message({
@ -447,6 +472,14 @@
}); });
return return
} }
if (row.isPayment == '1' || row.isTransfer == '1'){
this.$message({
type: 'error',
message: '已转销售或已提交付款申请无法删除',
duration: 2500
});
return
}
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -522,6 +555,20 @@
}) })
return return
} }
var flag = true;
this.multipleSelectionItem.forEach((item,index) => {
if(item.isTransfer == '1'){
flag = flase;
}
})
if(!flag){
this.$message({
type: 'error',
message: '此订单已经转销售',
duration: 2500
})
return
}
console.log('aaaaaaa', this.multipleSelectionItem) console.log('aaaaaaa', this.multipleSelectionItem)
var ids = ''; var ids = '';
this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{ this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{
@ -530,13 +577,18 @@
if(ids.length > 0){ if(ids.length > 0){
ids = ids.substring(0, ids.length - 1); ids = ids.substring(0, ids.length - 1);
} }
debugger
request({ request({
url: `/api/poundlist/Poundlist/createsale/${ids}`, url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: 'post' method: 'post'
}).then(res => { }).then(res => {
var list = [] var list = []
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
// res.data[i].isTransfer = '1'
// res.data[i].purchaseOrderId = this.multipleSelectionItem[0].id
let _data = res.data[i] let _data = res.data[i]
_data.isTransfer = '1'
_data.purchaseOrderId = this.multipleSelectionItem[0].id
list.push(_data) list.push(_data)
} }
if (list.length>0) { if (list.length>0) {
@ -697,6 +749,20 @@
}) })
return 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 //id
request({ request({
url: '/api/purchaseorder/Purchaseorder/' + this.multipleSelectionItem[0].id, url: '/api/purchaseorder/Purchaseorder/' + this.multipleSelectionItem[0].id,
@ -765,6 +831,15 @@
}); });
return return
} }
if(row.isPayment == '1'){
debugger
this.$message({
type: 'error',
message: '付款申请中,无法编辑',
duration: 2500
});
return
}
} }
this.formVisible = true this.formVisible = true
this.$nextTick(() => { this.$nextTick(() => {
@ -833,6 +908,12 @@
if (isrRefresh) this.reset() if (isrRefresh) this.reset()
}, },
reset() { reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
},
resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined
} }

@ -656,7 +656,13 @@
this.dataForm.receiptin_item0List.forEach((item, index) => { this.dataForm.receiptin_item0List.forEach((item, index) => {
item.purchaseorderitemId = item.id; item.purchaseorderitemId = item.id;
item.num = item.settlement; 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 = ''; item.id = '';
}); });
let param = { let param = {
@ -695,6 +701,20 @@
}) })
}, },
request() { 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; this.submitDisabled = true;
var _data = this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {

@ -110,7 +110,7 @@
<el-tabs v-model="activevpzhms" tab-position="top" class="mb-20"> <el-tabs v-model="activevpzhms" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细"> <el-tab-pane label="磅单明细">
<el-col :span="24"> <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0" :rules="rules">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
@ -636,6 +636,32 @@
}) })
}, },
request() { 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; this.submitDisabled = true;
var _data = this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {

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

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

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

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

@ -815,7 +815,6 @@
message: '请在备注说明修改单价原因', message: '请在备注说明修改单价原因',
duration: 2500, duration: 2500,
}) })
return
} }
item.price = this.jnpf.floatMul(item.unitPrice,item.settlement);// item.price = this.jnpf.floatMul(item.unitPrice,item.settlement);//
debugger debugger
@ -824,20 +823,6 @@
item.noPrice = this.jnpf.floatDiv(this.jnpf.floatMul(item.price,(this.jnpf.floatSub(100,item2.fullName))), 100);// 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') {// if (item.advance == '1') {//
advanceAmount = this.jnpf.floatAdd(advanceAmount,item.price);// advanceAmount = this.jnpf.floatAdd(advanceAmount,item.price);//

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

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

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

@ -50,6 +50,31 @@
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </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-col :span="6">
<el-form-item label="车牌号" prop="vehicleId"> <el-form-item label="车牌号" prop="vehicleId">
<popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId" <popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
@ -177,7 +202,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="12">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注信息" clearable <el-input v-model="dataForm.remark" placeholder="请输入备注信息" clearable
:style='{"width":"100%"}'> :style='{"width":"100%"}'>
@ -426,7 +451,13 @@
"label": "业务员2地址", "label": "业务员2地址",
"value": "adress" "value": "adress"
}, ], }, ],
supplierIdcolumnOptions: [{
"label": "供应商编码",
"value": "supplier_code"
}, {
"label": "供应商名称",
"value": "supplier_name"
}],
} }
}, },
computed: {}, computed: {},
@ -571,20 +602,104 @@
this.dataInfo(res.data) this.dataInfo(res.data)
this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date(); this.dataForm.poundDate = new Date().getTime();
this.loading = false this.loading = false
}); });
} else { } else {
this.clearData(this.dataForm) this.clearData(this.dataForm)
this.dataForm.businessId = this.$store.state.user.userInfo.userId; this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName; this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date(); this.dataForm.poundDate = new Date().getTime();
} }
}); });
this.$store.commit('generator/UPDATE_RELATION_DATA', {}) this.$store.commit('generator/UPDATE_RELATION_DATA', {})
}, },
// //
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 tareWeight = this.dataForm.tareWeight; //
var grossWeight = this.dataForm.grossWeight; // var grossWeight = this.dataForm.grossWeight; //
var buckleWeight = this.dataForm.buckleWeight; // var buckleWeight = this.dataForm.buckleWeight; //
@ -648,7 +763,7 @@
this.submitDisabled = false this.submitDisabled = false
}) })
} }
}, },*/
request3() { request3() {
this.submitDisabled = true; this.submitDisabled = true;
var _data = this.dataList() 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-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <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" <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button> v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> <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" <el-table-column label="操作" align="center" fixed="right"
width="200"> width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text"
@click="continueUpload(scope.row.id)" v-has="'btn_continueUpload'">继续上传
</el-button>
<el-button type="text" <el-button type="text"
@click="addOrUpdateHandle2(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">审核 @click="addOrUpdateHandle2(scope.row.id)" v-has="'btn_addOrUpdateHandle2'">审核
</el-button> </el-button>
@ -174,6 +177,7 @@
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<JNPF-Form2 v-if="formVisible2" ref="JNPFForm2" @refresh="refresh2"/> <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"/> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div> </div>
@ -184,13 +188,14 @@
import { getDictionaryDataSelector } from '@/api/systemData/dictionary' import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import JNPFForm2 from './Form2' import JNPFForm2 from './Form2'
import JNPFForm3 from './Form3'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface' import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: { JNPFForm, JNPFForm2, ExportBox, Detail }, components: { JNPFForm, JNPFForm2, JNPFForm3, ExportBox, Detail },
data() { data() {
return { return {
showAll: false, showAll: false,
@ -215,6 +220,7 @@
}, },
formVisible: false, formVisible: false,
formVisible2: false, formVisible2: false,
formVisible3: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ prop: 'creatorTime', label: '磅单日期' }, { prop: 'creatorTime', label: '磅单日期' },
@ -257,6 +263,12 @@
this.initData() this.initData()
}, },
methods: { methods: {
continueUpload(id,isDetail){
this.formVisible3 = true
this.$nextTick(() => {
this.$refs.JNPFForm3.init(id, isDetail)
})
},
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
@ -391,6 +403,16 @@
this.formVisible2 = false this.formVisible2 = false
if (isrRefresh) this.reset() 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() { reset() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined

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

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

Loading…
Cancel
Save