贸易数据权限和导出

product
17602169347 2 years ago
parent 578ffee46d
commit e984a060be

@ -285,21 +285,42 @@ public class PoundlistController {
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(PoundlistEntity entity:list){ for(PoundlistEntity entity:list){
entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures())); entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures()));
Map<String,Object> materialIdMap = new HashMap<>();
entity.setMaterialId(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",entity.getMaterialId(),materialIdMap));
Map<String,Object> customerIdMap = new HashMap<>();
entity.setCustomerId(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",entity.getCustomerId(),customerIdMap));
Map<String,Object> salesIdMap = new HashMap<>();
entity.setSalesId(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",entity.getSalesId(),salesIdMap));
Map<String,Object> vehicleIdMap = new HashMap<>();
entity.setVehicleId(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getVehicleId(),vehicleIdMap));
entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures())); entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures()));
Map<String,Object> businessIdMap = new HashMap<>(); entity.setAdvance("0".equals(entity.getAdvance()) ? "否" : "是");
entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap)); entity.setIsInvoicing("0".equals(entity.getIsInvoicing()) ? "否" : "是");
Map<String,Object> naturalIdMap = new HashMap<>(); entity.setIsPay("0".equals(entity.getIsPay()) ? "否" : "是");
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap)); entity.setIsCollection("0".equals(entity.getIsCollection()) ? "否" : "是");
Map<String,Object> purchaseIdMap = new HashMap<>(); entity.setIsExpense("0".equals(entity.getIsExpense()) ? "否" : "是");
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap)); entity.setUnit("0".equals(entity.getAdvance()) ? "吨" : "千克");
if("0".equals(entity.getTransportType())){
entity.setTransportType("汽运");
}else if("1".equals(entity.getTransportType())){
entity.setTransportType("船运");
}else if("2".equals(entity.getTransportType())){
entity.setTransportType("火车");
}
if("0".equals(entity.getPurchaseStatus())){
entity.setPurchaseStatus("待开票");
}else if("1".equals(entity.getPurchaseStatus())){
entity.setPurchaseStatus("开票中");
}else if("2".equals(entity.getPurchaseStatus())){
entity.setPurchaseStatus("已入库");
}else if("3".equals(entity.getPurchaseStatus())){
entity.setPurchaseStatus("归档");
}else if("99".equals(entity.getPurchaseStatus())){
entity.setPurchaseStatus("已保存");
}
if("0".equals(entity.getSalesStatus())){
entity.setSalesStatus("待发货");
}else if("1".equals(entity.getSalesStatus())){
entity.setSalesStatus("待开票");
}else if("2".equals(entity.getSalesStatus())){
entity.setSalesStatus("待回款");
}else if("3".equals(entity.getSalesStatus())){
entity.setSalesStatus("归档");
}else if("99".equals(entity.getSalesStatus())){
entity.setSalesStatus("已保存");
}
} }
List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class); List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class);
for(PoundlistListVO poundlistVO:listVO){ for(PoundlistListVO poundlistVO:listVO){
@ -320,19 +341,19 @@ public class PoundlistController {
for(String key:keys){ for(String key:keys){
switch(key){ switch(key){
case "poundPictures" : case "poundPictures" :
entitys.add(new ExcelExportEntity("磅单上传" ,"poundPictures")); entitys.add(new ExcelExportEntity("磅单图片" ,"poundPictures"));
break; break;
case "materialId" : case "materialName" :
entitys.add(new ExcelExportEntity("物料名称" ,"materialId")); entitys.add(new ExcelExportEntity("物料名称" ,"materialName"));
break; break;
case "customerId" : case "customerName" :
entitys.add(new ExcelExportEntity("客户名称" ,"customerId")); entitys.add(new ExcelExportEntity("客户名称" ,"customerName"));
break; break;
case "salesId" : case "salesName" :
entitys.add(new ExcelExportEntity("销售合同" ,"salesId")); entitys.add(new ExcelExportEntity("销售合同" ,"salesName"));
break; break;
case "vehicleId" : case "vehicleName" :
entitys.add(new ExcelExportEntity("车牌号" ,"vehicleId")); entitys.add(new ExcelExportEntity("车牌号" ,"vehicleName"));
break; break;
case "vehiclePictures" : case "vehiclePictures" :
entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures")); entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures"));
@ -364,20 +385,20 @@ public class PoundlistController {
case "advance" : case "advance" :
entitys.add(new ExcelExportEntity("是否垫资" ,"advance")); entitys.add(new ExcelExportEntity("是否垫资" ,"advance"));
break; break;
case "transportPrice" : case "collectPrice" :
entitys.add(new ExcelExportEntity("运费" ,"transportPrice")); entitys.add(new ExcelExportEntity("收货价格" ,"collectPrice"));
break; break;
case "salesPrice" : case "salesPrice" :
entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice")); entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice"));
break; break;
case "businessId" : case "businessName" :
entitys.add(new ExcelExportEntity("业务员" ,"businessId")); entitys.add(new ExcelExportEntity("业务员" ,"businessName"));
break; break;
case "naturalId" : case "naturalId" :
entitys.add(new ExcelExportEntity("自然人" ,"naturalId")); entitys.add(new ExcelExportEntity("自然人" ,"naturalId"));
break; break;
case "purchaseId" : case "purchaseName" :
entitys.add(new ExcelExportEntity("采购合同" ,"purchaseId")); entitys.add(new ExcelExportEntity("采购合同" ,"purchaseName"));
break; break;
case "supplierName" : case "supplierName" :
entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName")); entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName"));
@ -403,10 +424,27 @@ public class PoundlistController {
case "remark" : case "remark" :
entitys.add(new ExcelExportEntity("备注" ,"remark")); entitys.add(new ExcelExportEntity("备注" ,"remark"));
break; break;
case "collectPrice" : case "purchaseStatus" :
entitys.add(new ExcelExportEntity("收货单价" ,"collectPrice")); entitys.add(new ExcelExportEntity("采购状态" ,"purchaseStatus"));
break;
case "salesStatus" :
entitys.add(new ExcelExportEntity("销售状态" ,"salesStatus"));
break;
case "creatorTime" :
entitys.add(new ExcelExportEntity("创建日期" ,"creatorTime"));
break;
case "isInvoicing" :
entitys.add(new ExcelExportEntity("是否开进项票" ,"isInvoicing"));
break;
case "isPay" :
entitys.add(new ExcelExportEntity("是否付款" ,"isPay"));
break;
case "isCollection" :
entitys.add(new ExcelExportEntity("是否回款" ,"isCollection"));
break;
case "isExpense" :
entitys.add(new ExcelExportEntity("是否开销项票" ,"isExpense"));
break; break;
default: default:
break; break;
} }

@ -2,6 +2,7 @@ package jnpf.poundlist.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.poundlist.entity.PoundlistEntity; import jnpf.poundlist.entity.PoundlistEntity;
@ -35,4 +36,6 @@ public interface PoundlistMapper extends BaseMapper<PoundlistEntity> {
List<PoundlistEntity> queryPoundListByIds(@Param("poundlistIdList") List<String> poundlistIdList); List<PoundlistEntity> queryPoundListByIds(@Param("poundlistIdList") List<String> poundlistIdList);
List<PoundlistEntity> queryPoundListByIdsRenkuan(@Param("poundlistIdList") List<String> poundlistIdList, @Param("paymentdocId") String paymentdocId); List<PoundlistEntity> queryPoundListByIdsRenkuan(@Param("poundlistIdList") List<String> poundlistIdList, @Param("paymentdocId") String paymentdocId);
List<PoundlistEntity> queryByKeywordNotPage(@Param("poundlistPagination") PoundlistPagination poundlistPagination, @Param("ew") Wrapper<PoundlistEntity> queryWrapper);
} }

@ -1,13 +1,6 @@
package jnpf.poundlist.service.impl; package jnpf.poundlist.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
import jnpf.Jg_natural.entity.Jg_naturalEntity;
import jnpf.arinvoices.entity.Arinvoices_item0Entity;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.controller.BillRuleController;
import jnpf.base.entity.ProvinceEntity;
import jnpf.contractfile.entity.ContractFileEntity; import jnpf.contractfile.entity.ContractFileEntity;
import jnpf.contractfile.service.ContractFileService; import jnpf.contractfile.service.ContractFileService;
import jnpf.customer.entity.CustomerEntity; import jnpf.customer.entity.CustomerEntity;
@ -22,13 +15,8 @@ import jnpf.poundlist.model.poundlist.PoundlistDTO;
import jnpf.poundlist.model.poundlist.PoundlistListVO; import jnpf.poundlist.model.poundlist.PoundlistListVO;
import jnpf.poundlist.service.*; import jnpf.poundlist.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.purchaseorder.entity.PurchaseOrderImportVo;
import jnpf.purchaseorder.entity.Purchaseorder_item0Entity;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import jnpf.purchaseorder.model.purchaseorder.PurchaseorderDTO;
import jnpf.supplier.entity.SupplierEntity; import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.service.SupplierService; import jnpf.supplier.service.SupplierService;
import jnpf.supplyProcessAnalysis.entity.ContractMEntity;
import jnpf.util.RandomUtil; import jnpf.util.RandomUtil;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -45,12 +33,10 @@ import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import java.math.RoundingMode;
import java.text.ParseException; import java.text.ParseException;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jnpf.util.context.SpringContext;
import jnpf.vehicle.entity.VehicleEntity; import jnpf.vehicle.entity.VehicleEntity;
import jnpf.vehicle.service.VehicleService; import jnpf.vehicle.service.VehicleService;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
@ -96,10 +82,8 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
private ContractFileService contractFileService; private ContractFileService contractFileService;
@Autowired @Autowired
private MaterialService materialService; private MaterialService materialService;
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@Override @Override
public List<PoundlistEntity> getList(PoundlistPagination poundlistPagination) { public List<PoundlistEntity> getList(PoundlistPagination poundlistPagination) {
String userId = userProvider.get().getUserId(); String userId = userProvider.get().getUserId();
@ -162,29 +146,6 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
} }
Page<PoundlistEntity> page = new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize()); Page<PoundlistEntity> page = new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
/*************************************************************************/
// IPage<PoundlistEntity> userIPage = this.page(page, poundlistQueryWrapper);
// List<PoundlistEntity> list = userIPage.getRecords();
// Optional<PoundlistEntity> firstElement = list.stream().findFirst();
// String department_id = firstElement.flatMap(list1 -> firstElement.filter(Objects::nonNull))
// .map(PoundlistEntity::getDepartmentId)
// .orElse(null);
//
// if (department_id==null){
// poundlistPagination.setDepartmentId(detpartment);
// }else {
// poundlistPagination.setDepartmentId(department_id);
// }
String detpartment=null;
if (!userProvider.get().getIsAdministrator()) {
detpartment = userProvider.getDepartmentId(userId);
}
if (StringUtil.isNotNull(detpartment)) {
poundlistPagination.setDepartmentId(detpartment);
}
/*************************************************************************/
IPage<PoundlistEntity> iPage = poundlistMapper.queryByKeyword(page, poundlistPagination, poundlistQueryWrapper); IPage<PoundlistEntity> iPage = poundlistMapper.queryByKeyword(page, poundlistPagination, poundlistQueryWrapper);
return poundlistPagination.setData(iPage.getRecords(), iPage.getTotal()); return poundlistPagination.setData(iPage.getRecords(), iPage.getTotal());
@ -197,12 +158,13 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
int total = 0; int total = 0;
int poundlistNum = 0; int poundlistNum = 0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper = new QueryWrapper<>(); QueryWrapper<PoundlistEntity> poundlistQueryWrapper = new QueryWrapper<>();
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine, "1");
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 poundlistObj = authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper, poundlistPagination.getMenuId(), "jg_poundlist")); Object poundlistObj = authorizeService.getCondition2(new AuthorizeConditionModel(poundlistQueryWrapper, poundlistPagination.getMenuId(), "jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)) { if (ObjectUtil.isEmpty(poundlistObj)) {
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -213,7 +175,7 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
if (!isPc && appPermission) { if (!isPc && appPermission) {
if (!userProvider.get().getIsAdministrator()) { if (!userProvider.get().getIsAdministrator()) {
Object poundlistObj = authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper, poundlistPagination.getMenuId(), "jg_poundlist")); Object poundlistObj = authorizeService.getCondition2(new AuthorizeConditionModel(poundlistQueryWrapper, poundlistPagination.getMenuId(), "jg_poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)) { if (ObjectUtil.isEmpty(poundlistObj)) {
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
@ -225,27 +187,15 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
} }
if (StringUtil.isNotEmpty(poundlistPagination.getPoundDate())) { if (StringUtil.isNotEmpty(poundlistPagination.getPoundDate())) {
poundlistNum++;
List<String> PoundDateList = poundlistPagination.getPoundDate(); List<String> PoundDateList = poundlistPagination.getPoundDate();
Long fir = Long.valueOf(PoundDateList.get(0)); Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1)); Long sec = Long.valueOf(PoundDateList.get(1));
poundlistPagination.setStartDate(new Date(fir));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir)) poundlistPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if (StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())) {
poundlistNum++;
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo, poundlistPagination.getPoundlistNo());
}
if (AllIdList.size() > 0) {
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
} }
//排序
if (StringUtil.isEmpty(poundlistPagination.getSidx())) { if (StringUtil.isEmpty(poundlistPagination.getSidx())) {
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId); poundlistPagination.setSidx("CREATOR_TIME");
poundlistPagination.setSort("ASC");
} else { } else {
try { try {
String sidx = poundlistPagination.getSidx(); String sidx = poundlistPagination.getSidx();
@ -253,7 +203,7 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx); Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true); declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value(); String value = declaredField.getAnnotation(TableField.class).value();
poundlistQueryWrapper = "asc".equals(poundlistPagination.getSort().toLowerCase()) ? poundlistQueryWrapper.orderByAsc(value) : poundlistQueryWrapper.orderByDesc(value); poundlistPagination.setSidx(value);
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -261,14 +211,14 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
if ("0".equals(dataType)) { if ("0".equals(dataType)) {
if ((total > 0 && AllIdList.size() > 0) || total == 0) { if ((total > 0 && AllIdList.size() > 0) || total == 0) {
Page<PoundlistEntity> page = new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize()); Page<PoundlistEntity> page = new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> userIPage = this.page(page, poundlistQueryWrapper); IPage<PoundlistEntity> userIPage = poundlistMapper.queryByKeyword(page, poundlistPagination, poundlistQueryWrapper);
return poundlistPagination.setData(userIPage.getRecords(), userIPage.getTotal()); return poundlistPagination.setData(userIPage.getRecords(), userIPage.getTotal());
} else { } else {
List<PoundlistEntity> list = new ArrayList(); List<PoundlistEntity> list = new ArrayList();
return poundlistPagination.setData(list, list.size()); return poundlistPagination.setData(list, list.size());
} }
} else { } else {
return this.list(poundlistQueryWrapper); return poundlistMapper.queryByKeywordNotPage(poundlistPagination, poundlistQueryWrapper);
} }
} }

@ -13,6 +13,8 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.service.Jg_naturalService;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
import jnpf.base.NoDataSourceBind; import jnpf.base.NoDataSourceBind;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
@ -27,9 +29,13 @@ import jnpf.contractfile.service.ContractFileService;
import jnpf.customer.entity.CustomerEntity; import jnpf.customer.entity.CustomerEntity;
import jnpf.customer.service.CustomerService; import jnpf.customer.service.CustomerService;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.materialvo.entity.MaterialEntity;
import jnpf.materialvo.service.MaterialService;
import jnpf.model.UploaderVO; import jnpf.model.UploaderVO;
import jnpf.ocr_sdk.baiduUtils.VatInvoice; import jnpf.ocr_sdk.baiduUtils.VatInvoice;
import jnpf.ocr_sdk.controller.BaiduOcrController; import jnpf.ocr_sdk.controller.BaiduOcrController;
import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.service.SupplierService;
import jnpf.tradeupload.entity.TradeuploadEntity; import jnpf.tradeupload.entity.TradeuploadEntity;
import jnpf.tradeupload.model.tradeupload.*; import jnpf.tradeupload.model.tradeupload.*;
import jnpf.tradeupload.service.TradeuploadService; import jnpf.tradeupload.service.TradeuploadService;
@ -98,6 +104,12 @@ public class TradeuploadController {
@Autowired @Autowired
private VehicleService vehicleService; private VehicleService vehicleService;
@Autowired @Autowired
private MaterialService materialService;
@Autowired
private SupplierService supplierService;
@Autowired
private Jg_naturalService naturalService;
@Autowired
private YozoUtils yozoUtils; private YozoUtils yozoUtils;
@ -581,22 +593,15 @@ public class TradeuploadController {
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(TradeuploadEntity entity:list){ for(TradeuploadEntity entity:list){
entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures())); entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures()));
Map<String,Object> materialIdMap = new HashMap<>();
entity.setMaterialId(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",entity.getMaterialId(),materialIdMap));
Map<String,Object> customerIdMap = new HashMap<>();
entity.setCustomerId(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",entity.getCustomerId(),customerIdMap));
Map<String,Object> salesIdMap = new HashMap<>();
entity.setSalesId(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","contract_name",entity.getSalesId(),salesIdMap));
Map<String,Object> vehicleIdMap = new HashMap<>();
entity.setVehicleId(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getVehicleId(),vehicleIdMap));
entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures())); entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures()));
Map<String,Object> businessIdMap = new HashMap<>(); entity.setAdvance("0".equals(entity.getAdvance()) ? "否" : "是");
entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap)); if("0".equals(entity.getTransportType())){
Map<String,Object> naturalIdMap = new HashMap<>(); entity.setTransportType("汽运");
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap)); }else if("1".equals(entity.getTransportType())){
Map<String,Object> purchaseIdMap = new HashMap<>(); entity.setTransportType("船运");
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","document_no",entity.getPurchaseId(),purchaseIdMap)); }else if("2".equals(entity.getTransportType())){
entity.setOriginPlace(generaterSwapUtil.provinceData(entity.getOriginPlace())); entity.setTransportType("火车");
}
} }
List<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class); List<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class);
for(TradeuploadListVO tradeuploadVO:listVO){ for(TradeuploadListVO tradeuploadVO:listVO){
@ -617,25 +622,25 @@ public class TradeuploadController {
for(String key:keys){ for(String key:keys){
switch(key){ switch(key){
case "poundPictures" : case "poundPictures" :
entitys.add(new ExcelExportEntity("磅单上传" ,"poundPictures")); entitys.add(new ExcelExportEntity("磅单图片" ,"poundPictures"));
break; break;
case "materialId" : case "materialName" :
entitys.add(new ExcelExportEntity("物料名称" ,"materialId")); entitys.add(new ExcelExportEntity("物料名称" ,"materialName"));
break; break;
case "customerId" : case "customerName" :
entitys.add(new ExcelExportEntity("客户名称" ,"customerId")); entitys.add(new ExcelExportEntity("客户名称" ,"customerName"));
break; break;
case "salesId" : case "salesName" :
entitys.add(new ExcelExportEntity("销售合同" ,"salesId")); entitys.add(new ExcelExportEntity("销售合同" ,"salesName"));
break; break;
case "vehicleId" : case "vehicleName" :
entitys.add(new ExcelExportEntity("车牌号" ,"vehicleId")); entitys.add(new ExcelExportEntity("车牌号" ,"vehicleName"));
break; break;
case "vehiclePictures" : case "vehiclePictures" :
entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures")); entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures"));
break; break;
case "poundDate" : case "poundDate" :
entitys.add(new ExcelExportEntity("磅单时间" ,"poundDate")); entitys.add(new ExcelExportEntity("磅单日期" ,"poundDate"));
break; break;
case "poundlistNo" : case "poundlistNo" :
entitys.add(new ExcelExportEntity("磅单号" ,"poundlistNo")); entitys.add(new ExcelExportEntity("磅单号" ,"poundlistNo"));
@ -670,11 +675,11 @@ public class TradeuploadController {
case "salesPrice" : case "salesPrice" :
entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice")); entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice"));
break; break;
case "businessId" : case "businessName" :
entitys.add(new ExcelExportEntity("业务员" ,"businessId")); entitys.add(new ExcelExportEntity("业务员" ,"businessName"));
break; break;
case "naturalId" : case "naturalName" :
entitys.add(new ExcelExportEntity("自然人" ,"naturalId")); entitys.add(new ExcelExportEntity("自然人" ,"naturalName"));
break; break;
case "remark" : case "remark" :
entitys.add(new ExcelExportEntity("备注" ,"remark")); entitys.add(new ExcelExportEntity("备注" ,"remark"));
@ -744,10 +749,53 @@ public class TradeuploadController {
@GetMapping("/{id}") @GetMapping("/{id}")
public ActionResult<TradeuploadInfoVO> info(@PathVariable("id") String id){ public ActionResult<TradeuploadInfoVO> info(@PathVariable("id") String id){
TradeuploadEntity entity= tradeuploadService.getInfo(id); TradeuploadEntity entity= tradeuploadService.getInfo(id);
TradeuploadInfoVO vo=JsonUtil.getJsonToBean(entity, TradeuploadInfoVO.class); TradeuploadInfoVO vo=JsonUtil.getJsonToBean(entity, TradeuploadInfoVO.class);
if(vo.getCreatorTime()!=null){ if(vo.getCreatorTime()!=null){
vo.setCreatorTime(vo.getCreatorTime()); vo.setCreatorTime(vo.getCreatorTime());
} }
if(StringUtils.isNotBlank(vo.getMaterialId())){
MaterialEntity materialEntity = materialService.getById(vo.getMaterialId());
if(materialEntity != null){
vo.setMaterialName(materialEntity.getItemName());
}
}
if(StringUtils.isNotBlank(vo.getCustomerId())){
CustomerEntity customerEntity = customerService.getById(vo.getCustomerId());
if(customerEntity != null){
vo.setCustomerName(customerEntity.getSupplierNm());
}
}
if(StringUtils.isNotBlank(vo.getCustomerId())){
ContractFileEntity contractFileEntity = contractFileService.getById(vo.getSalesId());
if(contractFileEntity != null){
vo.setSalesName(contractFileEntity.getContractName());
}
}
if(StringUtils.isNotBlank(vo.getVehicleId())){
VehicleEntity vehicleEntity = vehicleService.getById(vo.getVehicleId());
if(vehicleEntity != null){
vo.setVehicleName(vehicleEntity.getTicketno());
}
}
if(StringUtils.isNotBlank(vo.getNaturalId())){
Jg_naturalEntity naturalEntity = naturalService.getById(vo.getNaturalId());
if(naturalEntity != null){
vo.setNaturalName(naturalEntity.getName());
}
}
if(StringUtils.isNotBlank(vo.getPurchaseId())){
ContractFileEntity contractFileEntity = contractFileService.getById(vo.getPurchaseId());
if(contractFileEntity != null){
vo.setPurchaseName(contractFileEntity.getContractName());
}
}
if(StringUtils.isNotBlank(vo.getSupplierId())){
SupplierEntity supplierEntity = supplierService.getById(vo.getSupplierId());
if(supplierEntity != null){
vo.setSupplierName(supplierEntity.getSupplierName());
}
}
// vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace())); // vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace()));
//子表 //子表
//副表 //副表

@ -2,6 +2,7 @@ package jnpf.tradeupload.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.saleorder.entity.SaleorderitemEntity;
@ -25,4 +26,6 @@ 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, @Param("ew") Wrapper<TradeuploadEntity> queryWrapper); IPage<TradeuploadEntity> queryByKeyword(@Param("page") Page<TradeuploadEntity> page, @Param("tradeuploadPagination") TradeuploadPagination tradeuploadPagination, @Param("ew") Wrapper<TradeuploadEntity> queryWrapper);
List<TradeuploadEntity> queryByKeywordNotPage(@Param("tradeuploadPagination") TradeuploadPagination tradeuploadPagination, @Param("ew") Wrapper<TradeuploadEntity> queryWrapper);
} }

@ -132,4 +132,25 @@ public class TradeuploadInfoVO{
/** 收货单价 **/ /** 收货单价 **/
@JsonProperty("collectPrice") @JsonProperty("collectPrice")
private String collectPrice; private String collectPrice;
@JsonProperty("materialName")
private String materialName;
@JsonProperty("customerName")
private String customerName;
@JsonProperty("salesName")
private String salesName;
@JsonProperty("vehicleName")
private String vehicleName;
@JsonProperty("businessName")
private String businessName;
@JsonProperty("naturalName")
private String naturalName;
@JsonProperty("purchaseName")
private String purchaseName;
} }

@ -142,138 +142,8 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
} }
} }
Page<TradeuploadEntity> page=new Page<>(tradeuploadPagination.getCurrentPage(), tradeuploadPagination.getPageSize()); Page<TradeuploadEntity> page=new Page<>(tradeuploadPagination.getCurrentPage(), tradeuploadPagination.getPageSize());
//加权限
// IPage<TradeuploadEntity> IPage = this.page(page, tradeuploadQueryWrapper);
// List<TradeuploadEntity> list = IPage.getRecords();
// Optional<TradeuploadEntity> firstElement = list.stream().findFirst();
// String department_id = firstElement.flatMap(list1 -> firstElement.filter(Objects::nonNull))
// .map(TradeuploadEntity::getDepartmentId)
// .orElse(null);
// if (!userProvider.get().getIsAdministrator()) {
// if (department_id==null){
// tradeuploadPagination.setDepartmentId(detpartment);
// }else {
// tradeuploadPagination.setDepartmentId(department_id);
// }
// }
String detpartment=null;
if (!userProvider.get().getIsAdministrator()) {
detpartment = userProvider.getDepartmentId(userId);
}
if (StringUtil.isNotNull(detpartment)) {
tradeuploadPagination.setDepartmentId(detpartment);
}
// tradeuploadPagination.setDepartmentId(detpartment);
IPage<TradeuploadEntity> userIPage = tradeuploadMapper.queryByKeyword(page, tradeuploadPagination, tradeuploadQueryWrapper); IPage<TradeuploadEntity> userIPage = tradeuploadMapper.queryByKeyword(page, tradeuploadPagination, tradeuploadQueryWrapper);
return tradeuploadPagination.setData(userIPage.getRecords(),userIPage.getTotal()); return tradeuploadPagination.setData(userIPage.getRecords(),userIPage.getTotal());
/*
if(StringUtil.isNotEmpty(tradeuploadPagination.getPoundDate())){
tradeuploadNum++;
List<String> PoundDateList = tradeuploadPagination.getPoundDate();
Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1));
tradeuploadQueryWrapper.lambda().ge(TradeuploadEntity::getPoundDate, new Date(fir))
.le(TradeuploadEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(StringUtil.isNotEmpty(tradeuploadPagination.getPoundlistNo())){
tradeuploadNum++;
tradeuploadQueryWrapper.lambda().like(TradeuploadEntity::getPoundlistNo,tradeuploadPagination.getPoundlistNo());
}
if(StringUtil.isNotEmpty(tradeuploadPagination.getMaterialName())){
QueryWrapper<MaterialEntity> materialQueryWrapper =new QueryWrapper<>();
materialQueryWrapper.lambda().like(MaterialEntity::getItemName, tradeuploadPagination.getMaterialName());
materialQueryWrapper.lambda().select(MaterialEntity::getId);
List<String> materialIdList = materialService.listObjs(materialQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
tradeuploadNum++;
if(materialIdList.size() > 0){
tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getMaterialId,materialIdList);
}else{
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getMaterialId, tradeuploadPagination.getMaterialName());
}
}
if(StringUtil.isNotEmpty(tradeuploadPagination.getCustomerName())){
QueryWrapper<CustomerEntity> customerQueryWrapper =new QueryWrapper<>();
customerQueryWrapper.lambda().like(CustomerEntity::getSupplierNm, tradeuploadPagination.getCustomerName());
customerQueryWrapper.lambda().select(CustomerEntity::getId);
List<String> customerIdList = customerService.listObjs(customerQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
tradeuploadNum++;
if(customerIdList.size() > 0){
tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getCustomerId,customerIdList);
}else{
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getCustomerId, tradeuploadPagination.getCustomerName());
}
}
if(StringUtil.isNotEmpty(tradeuploadPagination.getSalesName())){
QueryWrapper<ContractFileEntity> contractFileQueryWrapper =new QueryWrapper<>();
contractFileQueryWrapper.lambda().like(ContractFileEntity::getContractName, tradeuploadPagination.getSalesName());
contractFileQueryWrapper.lambda().select(ContractFileEntity::getId);
List<String> customerIdList = contractFileService.listObjs(contractFileQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
tradeuploadNum++;
if(customerIdList.size() > 0){
tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getSalesId,customerIdList);
}else{
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getSalesId, tradeuploadPagination.getSalesName());
}
}
if(StringUtil.isNotEmpty(tradeuploadPagination.getBusinessName())){
QueryWrapper<UserEntity> userQueryWrapper =new QueryWrapper<>();
userQueryWrapper.lambda().like(UserEntity::getRealName, tradeuploadPagination.getBusinessName());
userQueryWrapper.lambda().select(UserEntity::getId);
List<String> userIdList = userService.listObjs(userQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
tradeuploadNum++;
if(userIdList.size() > 0){
tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getBusinessId,userIdList);
}else{
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getBusinessId, tradeuploadPagination.getBusinessName());
}
}
if(StringUtil.isNotEmpty(tradeuploadPagination.getVehicleName())){
QueryWrapper<VehicleEntity> vehicleQueryWrapper =new QueryWrapper<>();
vehicleQueryWrapper.lambda().like(VehicleEntity::getTicketno, tradeuploadPagination.getVehicleName());
vehicleQueryWrapper.lambda().select(VehicleEntity::getId);
List<String> customerIdList = vehicleService.listObjs(vehicleQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
tradeuploadNum++;
if(customerIdList.size() > 0){
tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getVehicleId,customerIdList);
}else{
tradeuploadQueryWrapper.lambda().eq(TradeuploadEntity::getVehicleId, tradeuploadPagination.getVehicleName());
}
}
if(AllIdList.size()>0){
tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(tradeuploadPagination.getSidx())){
tradeuploadQueryWrapper.lambda().orderByDesc(TradeuploadEntity::getId);
}else{
try {
String sidx = tradeuploadPagination.getSidx();
TradeuploadEntity tradeuploadEntity = new TradeuploadEntity();
Field declaredField = tradeuploadEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
tradeuploadQueryWrapper="asc".equals(tradeuploadPagination.getSort().toLowerCase())?tradeuploadQueryWrapper.orderByAsc(value):tradeuploadQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<TradeuploadEntity> page=new Page<>(tradeuploadPagination.getCurrentPage(), tradeuploadPagination.getPageSize());
IPage<TradeuploadEntity> userIPage=this.page(page, tradeuploadQueryWrapper);
return tradeuploadPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<TradeuploadEntity> list = new ArrayList();
return tradeuploadPagination.setData(list, list.size());
}*/
} }
@Override @Override
public List<TradeuploadEntity> getTypeList(TradeuploadPagination tradeuploadPagination,String dataType){ public List<TradeuploadEntity> getTypeList(TradeuploadPagination tradeuploadPagination,String dataType){
@ -282,12 +152,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.eq("a.is_examine","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 {
@ -298,7 +170,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 {
@ -310,27 +182,19 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
} }
} }
if(StringUtil.isNotEmpty(tradeuploadPagination.getPoundDate())){ if(StringUtil.isNotEmpty(tradeuploadPagination.getPoundDate())){
tradeuploadNum++;
List<String> PoundDateList = tradeuploadPagination.getPoundDate(); List<String> PoundDateList = tradeuploadPagination.getPoundDate();
Long fir = Long.valueOf(PoundDateList.get(0)); Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1)); Long sec = Long.valueOf(PoundDateList.get(1));
tradeuploadPagination.setStartDate(new Date(fir));
tradeuploadQueryWrapper.lambda().ge(TradeuploadEntity::getPoundDate, new Date(fir)) tradeuploadPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
.le(TradeuploadEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(StringUtil.isNotEmpty(tradeuploadPagination.getPoundlistNo())){
tradeuploadNum++;
tradeuploadQueryWrapper.lambda().like(TradeuploadEntity::getPoundlistNo,tradeuploadPagination.getPoundlistNo());
} }
if(AllIdList.size()>0){ if(AllIdList.size()>0){
tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getId, AllIdList); tradeuploadQueryWrapper.lambda().in(TradeuploadEntity::getId, AllIdList);
} }
//排序 //排序
if(StringUtil.isEmpty(tradeuploadPagination.getSidx())){ if(StringUtil.isEmpty(tradeuploadPagination.getSidx())){
tradeuploadQueryWrapper.lambda().orderByDesc(TradeuploadEntity::getId); tradeuploadPagination.setSidx("CREATOR_TIME");
tradeuploadPagination.setSort("ASC");
}else{ }else{
try { try {
String sidx = tradeuploadPagination.getSidx(); String sidx = tradeuploadPagination.getSidx();
@ -346,14 +210,14 @@ public class TradeuploadServiceImpl extends ServiceImpl<TradeuploadMapper, Trade
if("0".equals(dataType)){ if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){ if((total>0 && AllIdList.size()>0) || total==0){
Page<TradeuploadEntity> page=new Page<>(tradeuploadPagination.getCurrentPage(), tradeuploadPagination.getPageSize()); Page<TradeuploadEntity> page=new Page<>(tradeuploadPagination.getCurrentPage(), tradeuploadPagination.getPageSize());
IPage<TradeuploadEntity> userIPage=this.page(page, tradeuploadQueryWrapper); IPage<TradeuploadEntity> userIPage=tradeuploadMapper.queryByKeyword(page, tradeuploadPagination, tradeuploadQueryWrapper);
return tradeuploadPagination.setData(userIPage.getRecords(),userIPage.getTotal()); return tradeuploadPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{ }else{
List<TradeuploadEntity> list = new ArrayList(); List<TradeuploadEntity> list = new ArrayList();
return tradeuploadPagination.setData(list, list.size()); return tradeuploadPagination.setData(list, list.size());
} }
}else{ }else{
return this.list(tradeuploadQueryWrapper); return tradeuploadMapper.queryByKeywordNotPage(tradeuploadPagination, tradeuploadQueryWrapper);
} }
} }

@ -200,5 +200,90 @@ WHERE a.delete_mark = 0 and
ORDER BY l.is_firstpay DESC,l.is_pay ASC,a.advance DESC,a.pound_date ASC ORDER BY l.is_firstpay DESC,l.is_pay ASC,a.advance DESC,a.pound_date ASC
</select> </select>
<select id="queryByKeywordNotPage" resultType="jnpf.poundlist.entity.PoundlistEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,
i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo, j.id purchaseorderItem0Id,k.id salesorderItem0Id,k.rate saleRate
from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id and b.delete_mark = 0
LEFT JOIN jg_supplier c on a.supplier_id = c.id and c.delete_mark = 0
LEFT JOIN jg_customer d on a.customer_id = d.id and d.delete_mark = 0
LEFT JOIN jg_material e on a.material_id = e.id and e.delete_mark = 0
LEFT JOIN jg_contract f on a.sales_id = f.id and f.delete_mark = 0
LEFT JOIN jg_contract g on a.purchase_id = g.id and g.delete_mark = 0
LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id and i.delete_mark = 0
LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id and j.delete_mark = 0
LEFT JOIN jg_salesorder_item0 k on a.id = k.poundlist_id and k.delete_mark = 0
${ew.customSqlSegment} and a.delete_mark = 0
<if test="poundlistPagination.keyword != null and poundlistPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.keyword},'%'))
</if>
<if test="poundlistPagination.startDate != null and poundlistPagination.endDate != null">
AND a.pound_date &gt; #{poundlistPagination.startDate} AND a.pound_date &lt;= #{poundlistPagination.endDate}
</if>
<if test="poundlistPagination.poundlistNo != null and poundlistPagination.poundlistNo != ''">
AND a.poundlist_no LIKE CONCAT('%',#{poundlistPagination.poundlistNo},'%')
</if>
<if test="poundlistPagination.businessId != null and poundlistPagination.businessId != ''">
AND h.F_RealName LIKE CONCAT('%',#{poundlistPagination.businessId},'%')
</if>
<if test="poundlistPagination.isInvoicing != null and poundlistPagination.isInvoicing != ''">
AND a.is_Invoicing = #{poundlistPagination.isInvoicing}
</if>
<if test="poundlistPagination.isPay != null and poundlistPagination.isPay != ''">
AND a.is_pay = #{poundlistPagination.isPay}
</if>
<!--<if test="poundlistPagination.departmentId != null and poundlistPagination.departmentId != ''">
AND a.department_id = #{poundlistPagination.departmentId}
</if>
<if test="poundlistPagination.orgnizeId != null and poundlistPagination.orgnizeId != ''">
AND a.orgnize_id = #{poundlistPagination.orgnizeId}
</if>-->
<if test="poundlistPagination.isCollection != null and poundlistPagination.isCollection != ''">
AND a.is_collection = #{poundlistPagination.isCollection}
</if>
<if test="poundlistPagination.isExpense != null and poundlistPagination.isExpense != ''">
AND a.is_expense = #{poundlistPagination.isExpense}
</if>
<if test="poundlistPagination.purchaseStatus != null and poundlistPagination.purchaseStatus != ''">
AND a.purchase_status = #{poundlistPagination.purchaseStatus}
</if>
<if test="poundlistPagination.salesStatus != null and poundlistPagination.salesStatus != ''">
AND a.sales_status = #{poundlistPagination.salesStatus}
</if>
<if test="poundlistPagination.materialName != null and poundlistPagination.materialName != ''">
AND e.item_name LIKE CONCAT('%',#{poundlistPagination.materialName},'%')
</if>
<if test="poundlistPagination.vehicleName != null and poundlistPagination.vehicleName != ''">
AND b.ticketno LIKE CONCAT('%',#{poundlistPagination.vehicleName},'%')
</if>
<if test="poundlistPagination.purchaseName != null and poundlistPagination.purchaseName != ''">
AND g.contract_name LIKE CONCAT('%',#{poundlistPagination.purchaseName},'%')
</if>
<if test="poundlistPagination.salesName != null and poundlistPagination.salesName != ''">
AND f.contract_name LIKE CONCAT('%',#{poundlistPagination.salesName},'%')
</if>
<if test="poundlistPagination.customerName != null and poundlistPagination.customerName != ''">
AND d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.customerName},'%')
</if>
<if test="poundlistPagination.supplierName != null and poundlistPagination.supplierName != ''">
AND c.supplier_name LIKE CONCAT('%',#{poundlistPagination.supplierName},'%')
</if>
<if test="poundlistPagination.purchaseOrderId != null and poundlistPagination.purchaseOrderId != ''">
AND a.id IN (SELECT poundlist_id from jg_purchaseorder_item0 where purchaseorder_id = #{poundlistPagination.purchaseOrderId})
</if>
<if test="poundlistPagination.salesOrderId != null and poundlistPagination.salesOrderId != ''">
AND a.id IN (SELECT poundlist_id from jg_salesorder_item0 where sales_order_id = #{poundlistPagination.salesOrderId})
</if>
<if test="poundlistPagination.poundlistIds != null and poundlistPagination.poundlistIds.size()!=0">
AND a.id NOT IN
<foreach collection="poundlistPagination.poundlistIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="poundlistPagination.sidx != null and poundlistPagination.sidx != ''">
ORDER BY ${poundlistPagination.sidx} ${poundlistPagination.sort}
</if>
</select>
</mapper> </mapper>

@ -55,4 +55,45 @@ creator_time = DATE_SUB(NOW(),interval 15 day)
ORDER BY ${tradeuploadPagination.sidx} ${tradeuploadPagination.sort} ORDER BY ${tradeuploadPagination.sidx} ${tradeuploadPagination.sort}
</if> </if>
</select> </select>
<select id="queryByKeywordNotPage" resultType="jnpf.tradeupload.entity.TradeuploadEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo
from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id
LEFT JOIN jg_customer d on a.customer_id = d.id
LEFT JOIN jg_material e on a.material_id = e.id
LEFT JOIN jg_contract f on a.sales_id = f.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 jg_natural i on a.natural_id = i.id
${ew.customSqlSegment}
<if test="tradeuploadPagination.keyword != null and tradeuploadPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%'))
</if>
<if test="tradeuploadPagination.startDate != null and tradeuploadPagination.endDate != null">
AND a.POUND_DATE &gt; #{tradeuploadPagination.startDate} AND a.POUND_DATE &lt;= #{tradeuploadPagination.endDate}
</if>
<if test="tradeuploadPagination.poundlistNo != null and tradeuploadPagination.poundlistNo != ''">
AND a.POUNDLIST_NO LIKE CONCAT('%',#{tradeuploadPagination.poundlistNo},'%')
</if>
<if test="tradeuploadPagination.materialName != null and tradeuploadPagination.materialName != ''">
AND e.item_name LIKE CONCAT('%',#{tradeuploadPagination.materialName},'%')
</if>
<if test="tradeuploadPagination.vehicleName != null and tradeuploadPagination.vehicleName != ''">
AND b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.vehicleName},'%')
</if>
<if test="tradeuploadPagination.salesName != null and tradeuploadPagination.salesName != ''">
AND f.contract_name LIKE CONCAT('%',#{tradeuploadPagination.salesName},'%')
</if>
<if test="tradeuploadPagination.customerName != null and tradeuploadPagination.customerName != ''">
AND d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.customerName},'%')
</if>
<if test="tradeuploadPagination.businessName != null and tradeuploadPagination.businessName != ''">
AND h.F_RealName LIKE CONCAT('%',#{tradeuploadPagination.businessName},'%')
</if>
<if test="tradeuploadPagination.sidx != null and tradeuploadPagination.sidx != ''">
ORDER BY ${tradeuploadPagination.sidx} ${tradeuploadPagination.sort}
</if>
</select>
</mapper> </mapper>

@ -23,7 +23,7 @@
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料名称" clearable field="materialId" <popupSelect v-model="dataForm.materialId" placeholder="请选择物料名称" clearable field="materialId"
interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id" interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id"
relationField="item_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage relationField="item_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20"> :pageSize="20" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -33,7 +33,7 @@
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId" <popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId"
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id"
relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" @change="customerSelect"> :pageSize="20" @change="customerSelect" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -43,7 +43,7 @@
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId" relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId"
hasPage :pageSize="20"> hasPage :pageSize="20" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -53,7 +53,7 @@
<popupSelect v-model="dataForm.supplierId" placeholder="请选择供应商" clearable field="supplierId" <popupSelect v-model="dataForm.supplierId" placeholder="请选择供应商" clearable field="supplierId"
interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id" interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" > :pageSize="20" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -63,7 +63,7 @@
<popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId" <popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id" interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
hasPage :pageSize="20" @change="customerSelect2"> hasPage :pageSize="20" @change="customerSelect2" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -78,7 +78,7 @@
<popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId" <popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id"
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="changePicture" relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="changePicture"
hasPage :pageSize="20"> hasPage :pageSize="20" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -181,7 +181,7 @@
<el-form-item label="业务员2" prop="naturalId"> <el-form-item label="业务员2" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId" <popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId"
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id"
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20"> relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>

@ -16,7 +16,7 @@
<popupSelect v-model="dataForm.contractCode" placeholder="请选择" clearable field="contractCode" <popupSelect v-model="dataForm.contractCode" placeholder="请选择" clearable field="contractCode"
interfaceId="390143765857220229" :columnOptions="contractCodecolumnOptions" propsValue="id" interfaceId="390143765857220229" :columnOptions="contractCodecolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" @change="changeContract"> :pageSize="20" @change="changeContract" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -26,7 +26,7 @@
<popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId" <popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
interfaceId="397751667988199621" :columnOptions="supplierIdcolumnOptions" propsValue="id" interfaceId="397751667988199621" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20"> :pageSize="20" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>

@ -0,0 +1,156 @@
<template>
<el-dialog title="选择合同" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="1000px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="8">
<el-form-item label="合同编码">
<el-input v-model="contractCode" placeholder="请输入合同编码查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同名称">
<el-input v-model="contractName" placeholder="请输入合同名称查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="init()">{{$t('common.search')}}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{$t('common.reset')}}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="init()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" @row-click="rowClick" @row-dblclick="rowdbClick" :border="false" :hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="checkedRow.id">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="contractCode" width="200" align="center" label="合同编码" />
<el-table-column prop="contractName" width="200" align="center" label="合同名称" />
<el-table-column label="合同类型" prop="contractType" align="center" >
<template slot-scope="scope">
{{ scope.row.contractType | dynamicText(contractTypeOptions) }}
</template>
</el-table-column>
<el-table-column prop="name" width="200" align="center" label="供应商/客户" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="refresh" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
<el-button type="primary" @click="select()">{{$t('common.confirmButton')}}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
contractTypeOptions: [{ 'fullName': '采购合同', 'id': '0' }, { 'fullName': '销售合同', 'id': '1' }],
visible: false,
listLoading: true,
contractCode: '',
contractName: '',
list: [],
total: 0,
checkedRow: {},
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
contractCode: '',
contractName: '',
},
total: 0,
checked: '',
}
},
methods: {
rowdbClick(row){
this.checked = row.id
this.checkedRow = row
this.select();
},
rowClick(row) {
this.checked = row.id
this.checkedRow = row
},
init(param) {
this.visible = true
this.listLoading = true
this.listQuery.name = param.name
this.listQuery.contractCode = this.contractCode
this.listQuery.contractName = this.contractName
this.listQuery.contractType = param.contractType
this.listQuery.menuId = param.menuId
let listQuery = this.listQuery
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: listQuery
}).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
})
/* GoodsList(query).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
}) */
},
refresh() {
this.contractCode = ''
this.contractName = ''
this.init()
},
select() {
if (this.checked == '') return
this.$emit('refreshDataList', this.checkedRow)
this.visible = false
},
handleSelectionChange(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -0,0 +1,150 @@
<template>
<el-dialog title="选择客户" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="1000px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="8">
<el-form-item label="客户编码">
<el-input v-model="supplierCd" placeholder="请输入客户编码查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户名称">
<el-input v-model="supplierNm" placeholder="请输入客户名称查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="init()">{{$t('common.search')}}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{$t('common.reset')}}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="init()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" @row-click="rowClick" @row-dblclick="rowdbClick" :border="false" :hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="checkedRow.id">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="supplierCd" width="200" align="center" label="客户编码" />
<el-table-column prop="supplierNm" width="200" align="center" label="客户名称" />
<el-table-column prop="address" width="150" align="center" label="地址" />
<el-table-column prop="bankAccount" width="150" align="center" label="银行账号" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="refresh" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
<el-button type="primary" @click="select()">{{$t('common.confirmButton')}}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
primaryUnitOmeasureOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }],
visible: false,
listLoading: true,
supplierCd: '',
supplierNm: '',
list: [],
total: 0,
checkedRow: {},
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
supplierCd: '',
supplierNm: '',
},
total: 0,
checked: '',
}
},
methods: {
rowdbClick(row){
this.checked = row.id
this.checkedRow = row
this.select();
},
rowClick(row) {
this.checked = row.id
this.checkedRow = row
},
init() {
this.visible = true
this.listLoading = true
this.listQuery.supplierCd = this.supplierCd
this.listQuery.supplierNm = this.supplierNm
this.listQuery.menuId = '380358734926336581'
let listQuery = this.listQuery
request({
url: `/api/example/Customer/getList`,
method: 'post',
data: listQuery
}).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
})
/* GoodsList(query).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
}) */
},
refresh() {
this.supplierCd = ''
this.supplierNm = ''
this.init()
},
select() {
if (this.checked == '') return
this.$emit('refreshDataList', this.checkedRow)
this.visible = false
},
handleSelectionChange(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -20,42 +20,26 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId" <el-input v-model="dataForm.materialName" placeholder="选择物料" readonly>
interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id" </el-input>
relationField="item_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId" <el-input v-model="dataForm.customerName" placeholder="选择客户" readonly>
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" </el-input>
relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" @change="customerSelect">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="销售合同" prop="salesId"> <el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <el-input v-model="dataForm.salesName" placeholder="选择销售合同" readonly>
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" </el-input>
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId"
hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </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" <el-input v-model="dataForm.vehicleName" placeholder="选择车车辆" readonly>
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" </el-input>
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="changePicture"
hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -146,11 +130,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="业务员2" prop="naturalId"> <el-form-item label="业务员2" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId" <el-input v-model="dataForm.naturalName" placeholder="选择业务员2" readonly>
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" </el-input>
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -450,19 +431,22 @@
advanceChange(e){ advanceChange(e){
this.dataForm.advance = e; this.dataForm.advance = e;
}, },
customerSelect(e, d) { customerSelect() {
const query = { const query = {
code: d.id code: this.dataForm.customerId
} }
request({ request({
url: '/api/example/ContractFile/getListByCustomer', url: '/api/example/ContractFile/getListByCustomer',
method: 'post', method: 'post',
data: query data: query
}).then((res) => { }).then((res) => {
if(res.data.length > 0){ if (res.data.length > 0) {
// type // type
this.dataForm.salesId = res.data[0].id this.dataForm.salesId = res.data[0].id
this.dataForm.salesName = res.data[0].contractName this.dataForm.salesName = res.data[0].contractName
}else{
this.dataForm.salesId = ''
this.dataForm.salesName = ''
} }
}) })
}, },

@ -15,54 +15,44 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="车辆图片" prop="vehiclePictures"> <el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImgB v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9"> <JNPF-UploadImgB v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB"
:limit="9">
</JNPF-UploadImgB> </JNPF-UploadImgB>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable <el-input v-model="dataForm.materialName" placeholder="选择物料" readonly
field="materialId" interfaceId="381037852907038533" @click.native="choiceMaterialId()">
:columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name" </el-input>
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId" <el-input v-model="dataForm.customerName" placeholder="选择客户" readonly
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" @click.native="choiceCustomerId()">
propsValue="id" relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" </el-input>
popupWidth="800px" hasPage :pageSize="20" @change="customerSelect">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="销售合同" prop="salesId"> <el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <el-input v-model="dataForm.salesName" placeholder="选择销售合同" readonly
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" @click.native="choiceSalesId()">
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" </el-input>
:bissId="dataForm.customerId" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </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" <el-input v-model="dataForm.vehicleName" placeholder="选择车车辆" readonly
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" @click.native="choiceVehicleId()">
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" </el-input>
@change="changePicture" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice"> <el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}' :precision="6" :min="0"> <el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}' :precision="6"
:min="0">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -86,7 +76,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="净重" prop="netWeight"> <el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}' :precision="6" :min="0"> <el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}' :precision="6"
:min="0">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -136,7 +127,8 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="运费" prop="transportPrice"> <el-form-item label="运费" prop="transportPrice">
<el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}' :precision="6" :min="0"> <el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}' :precision="6"
:min="0">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -161,18 +153,15 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="业务员2" prop="naturalId"> <el-form-item label="业务员2" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId" <el-input v-model="dataForm.naturalName" placeholder="选择业务员2" readonly
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" @click.native="choiceNaturalId()">
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage </el-input>
:pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="收货价格" prop="collectPrice"> <el-form-item label="收货价格" prop="collectPrice">
<el-input-number v-model="dataForm.collectPrice" :style='{"width":"100%"}' :precision="6" :min="0"> <el-input-number v-model="dataForm.collectPrice" :style='{"width":"100%"}' :precision="6"
:min="0">
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -190,9 +179,15 @@
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled">
</el-button>
<el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button> <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>
</span> </span>
<MaterialBox v-if="formVisible" ref="form" @refreshDataList="initData" />
<CustomerBox v-if="formVisible2" ref="form2" @refreshDataList="initData2" />
<ContractBox v-if="formVisible3" ref="form3" @refreshDataList="initData3" />
<VehicleBox v-if="formVisible4" ref="form4" @refreshDataList="initData4" />
<NaturalBox v-if="formVisible5" ref="form5" @refreshDataList="initData5" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
@ -201,6 +196,11 @@
MB: 1024 * 1024, MB: 1024 * 1024,
GB: 1024 * 1024 * 1024 GB: 1024 * 1024 * 1024
} }
import MaterialBox from './MaterialBox'
import CustomerBox from './CustomerBox'
import ContractBox from './ContractBox'
import VehicleBox from './VehicleBox'
import NaturalBox from './NaturalBox'
import request from '@/utils/request' import request from '@/utils/request'
import { import {
getDataInterfaceRes getDataInterfaceRes
@ -209,10 +209,15 @@
getDictionaryDataSelector getDictionaryDataSelector
} from '@/api/systemData/dictionary' } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {MaterialBox, CustomerBox, ContractBox, VehicleBox, NaturalBox},
props: [], props: [],
data() { data() {
return { return {
formVisible5: false,
formVisible4: false,
formVisible3: false,
formVisible2: false,
formVisible: false,
controll: false, controll: false,
submitDisabled: false, submitDisabled: false,
fileList: [], fileList: [],
@ -241,9 +246,13 @@
dataForm: { dataForm: {
poundPictures: [], poundPictures: [],
materialId: "", materialId: "",
materialName: "",
customerId: "", customerId: "",
customerName: "",
salesId: "", salesId: "",
salesName: "",
vehicleId: "", vehicleId: "",
vehicleName: "",
vehiclePictures: [], vehiclePictures: [],
poundDate: '', poundDate: '',
poundlistNo: '', poundlistNo: '',
@ -260,6 +269,7 @@
salesPrice: 0, salesPrice: 0,
businessId: "", businessId: "",
naturalId: "", naturalId: "",
naturalName: '',
remark: '', remark: '',
creatorTime: "", creatorTime: "",
}, },
@ -453,9 +463,64 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
initData5(natural) {
this.dataForm.naturalId = natural.id;
this.dataForm.naturalName = natural.name;
},
initData4(vehicle) {
this.dataForm.vehicleId = vehicle.id;
this.dataForm.vehicleName = vehicle.ticketno;
this.dataForm.vehiclePictures = JSON.parse(vehicle.vehiclephotos);
},
initData3(contract) {
this.dataForm.salesId = contract.id;
this.dataForm.salesName = contract.contractName;
},
initData2(custmer) {
this.dataForm.customerId = custmer.id;
this.dataForm.customerName = custmer.supplierNm;
this.customerSelect();
},
initData(material) {
this.dataForm.materialId = material.id;
this.dataForm.materialName = material.itemName;
},
choiceNaturalId(){
this.formVisible5 = true
this.$nextTick(() => {
this.$refs.form5.init()
})
},
choiceVehicleId(){
this.formVisible4 = true
this.$nextTick(() => {
this.$refs.form4.init()
})
},
choiceSalesId(){
var param = {};
param.name = this.dataForm.customerName;
param.contractType = '1';
param.menuId = '380358734926336581';
this.formVisible3 = true
this.$nextTick(() => {
this.$refs.form3.init(param)
})
},
choiceCustomerId(){
this.formVisible2 = true
this.$nextTick(() => {
this.$refs.form2.init()
})
},
choiceMaterialId() {
this.formVisible = true
this.$nextTick(() => {
this.$refs.form.init()
})
},
imgChange(res) { imgChange(res) {
debugger if (!this.controll) {
if (!this.controll){
this.dataForm.customerId = res.data.customerId; this.dataForm.customerId = res.data.customerId;
this.dataForm.customerName = res.data.customerName; this.dataForm.customerName = res.data.customerName;
this.dataForm.salesId = res.data.salesId; this.dataForm.salesId = res.data.salesId;
@ -494,9 +559,9 @@
advanceChange(e) { advanceChange(e) {
this.dataForm.advance = e; this.dataForm.advance = e;
}, },
customerSelect(e, d) { customerSelect() {
const query = { const query = {
code: d.id code: this.dataForm.customerId
} }
request({ request({
url: '/api/example/ContractFile/getListByCustomer', url: '/api/example/ContractFile/getListByCustomer',
@ -507,6 +572,9 @@
// type // type
this.dataForm.salesId = res.data[0].id this.dataForm.salesId = res.data[0].id
this.dataForm.salesName = res.data[0].contractName this.dataForm.salesName = res.data[0].contractName
}else{
this.dataForm.salesId = ''
this.dataForm.salesName = ''
} }
}) })
}, },
@ -560,7 +628,7 @@
} }
}, },
init(id, isDetail) { init(id, isDetail) {
this.controll=false; this.controll = false;
this.value = []; this.value = [];
this.dataForm.id = id || 0; this.dataForm.id = id || 0;
this.visible = true; this.visible = true;

@ -20,52 +20,36 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId" <el-input v-model="dataForm.materialName" placeholder="选择物料" readonly
interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id" @click.native="choiceMaterialId()">
relationField="item_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage </el-input>
:pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId" <el-input v-model="dataForm.customerName" placeholder="选择客户" readonly
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" @click.native="choiceCustomerId()">
relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage </el-input>
:pageSize="20" @change="customerSelect">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="销售合同" prop="salesId"> <el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <el-input v-model="dataForm.salesName" placeholder="选择销售合同" readonly
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" @click.native="choiceSalesId()">
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId" </el-input>
hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="采购合同" prop="purchaseId"> <el-form-item label="采购合同" prop="purchaseId">
<popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId" <el-input v-model="dataForm.purchaseName" placeholder="选择采购合同" readonly
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id" @click.native="choicePurchaseId()">
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" </el-input>
hasPage :pageSize="20" @change="customerSelect2">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="供应商" prop="supplierId"> <el-form-item label="供应商" prop="supplierId">
<popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId" <el-input v-model="dataForm.supplierName" placeholder="选择供应商" readonly>
interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id" </el-input>
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" :disabled="true">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -100,12 +84,9 @@
</el-col> </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" <el-input v-model="dataForm.vehicleName" placeholder="选择车车辆" readonly
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" @click.native="choiceVehicleId()">
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="changePicture" </el-input>
hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -173,11 +154,9 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="业务员2" prop="naturalId"> <el-form-item label="业务员2" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId" <el-input v-model="dataForm.naturalName" placeholder="选择业务员2" readonly
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" @click.native="choiceNaturalId()">
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20"> </el-input>
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -200,9 +179,20 @@
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button>
<!-- <el-button type="primary" @click="continueUpload()"> </el-button>--> <!-- <el-button type="primary" @click="continueUpload()"> </el-button>-->
</span> </span>
<MaterialBox v-if="formVisible" ref="form" @refreshDataList="initData" />
<CustomerBox v-if="formVisible2" ref="form2" @refreshDataList="initData2" />
<ContractBox v-if="formVisible3" ref="form3" @refreshDataList="initData3" />
<VehicleBox v-if="formVisible4" ref="form4" @refreshDataList="initData4" />
<NaturalBox v-if="formVisible5" ref="form5" @refreshDataList="initData5" />
<ContractBox v-if="formVisible6" ref="form6" @refreshDataList="initData6" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import MaterialBox from './MaterialBox'
import CustomerBox from './CustomerBox'
import ContractBox from './ContractBox'
import VehicleBox from './VehicleBox'
import NaturalBox from './NaturalBox'
import request from '@/utils/request' import request from '@/utils/request'
import { import {
getDataInterfaceRes getDataInterfaceRes
@ -211,10 +201,16 @@
getDictionaryDataSelector getDictionaryDataSelector
} from '@/api/systemData/dictionary' } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {MaterialBox, CustomerBox, ContractBox, VehicleBox, NaturalBox},
props: [], props: [],
data() { data() {
return { return {
formVisible6: false,
formVisible5: false,
formVisible4: false,
formVisible3: false,
formVisible2: false,
formVisible: false,
submitDisabled: false, submitDisabled: false,
unit: "0", unit: "0",
transportType: "0", transportType: "0",
@ -228,12 +224,18 @@
isDetail: false, isDetail: false,
dataForm: { dataForm: {
poundPictures: [], poundPictures: [],
purchaseId: "",
purchaseName: "",
materialId: "", materialId: "",
materialName: "",
customerId: "", customerId: "",
customerName: "",
supplierId: "", supplierId: "",
supplierName: "", supplierName: "",
salesId: "", salesId: "",
salesName: "",
vehicleId: "", vehicleId: "",
vehicleName: "",
vehiclePictures: [], vehiclePictures: [],
poundDate: '', poundDate: '',
poundlistNo: '', poundlistNo: '',
@ -251,6 +253,7 @@
purchasePrice: 0, purchasePrice: 0,
businessId: "", businessId: "",
naturalId: "", naturalId: "",
naturalName: '',
remark: '', remark: '',
creatorTime: "", creatorTime: "",
isExamine: "", isExamine: "",
@ -445,6 +448,78 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
initData6(contract) {
this.dataForm.purchaseId = contract.id;
this.dataForm.purchaseName = contract.contractName;
this.dataForm.supplierId = contract.code;
this.dataForm.supplierName = contract.name;
},
initData5(natural) {
this.dataForm.naturalId = natural.id;
this.dataForm.naturalName = natural.name;
},
initData4(vehicle) {
this.dataForm.vehicleId = vehicle.id;
this.dataForm.vehicleName = vehicle.ticketno;
this.dataForm.vehiclePictures = JSON.parse(vehicle.vehiclephotos);
},
initData3(contract) {
this.dataForm.salesId = contract.id;
this.dataForm.salesName = contract.contractName;
},
initData2(custmer) {
this.dataForm.customerId = custmer.id;
this.dataForm.customerName = custmer.supplierNm;
this.customerSelect();
},
initData(material) {
this.dataForm.materialId = material.id;
this.dataForm.materialName = material.itemName;
},
choiceNaturalId(){
this.formVisible5 = true
this.$nextTick(() => {
this.$refs.form5.init()
})
},
choiceVehicleId(){
this.formVisible4 = true
this.$nextTick(() => {
this.$refs.form4.init()
})
},
choicePurchaseId(){
var param = {};
param.name = '';
param.contractType = '0';
param.menuId = '380358734926336581';
this.formVisible6 = true
this.$nextTick(() => {
this.$refs.form6.init(param)
})
},
choiceSalesId(){
var param = {};
param.name = this.dataForm.customerName;
param.contractType = '1';
param.menuId = '380358734926336581';
this.formVisible3 = true
this.$nextTick(() => {
this.$refs.form3.init(param)
})
},
choiceCustomerId(){
this.formVisible2 = true
this.$nextTick(() => {
this.$refs.form2.init()
})
},
choiceMaterialId() {
this.formVisible = true
this.$nextTick(() => {
this.$refs.form.init()
})
},
grossWeightChange(e, f){ grossWeightChange(e, f){
//this.dataForm.netWeight = this.dataForm.grossWeight - this.dataForm.tareWeight - this.dataForm.buckleWeight; //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)) this.dataForm.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(this.dataForm.grossWeight), parseFloat(this.dataForm.tareWeight)), parseFloat(this.dataForm.buckleWeight))
@ -458,19 +533,22 @@
advanceChange(e){ advanceChange(e){
this.dataForm.advance = e; this.dataForm.advance = e;
}, },
customerSelect(e, d) { customerSelect() {
const query = { const query = {
code: d.id code: this.dataForm.customerId
} }
request({ request({
url: '/api/example/ContractFile/getListByCustomer', url: '/api/example/ContractFile/getListByCustomer',
method: 'post', method: 'post',
data: query data: query
}).then((res) => { }).then((res) => {
if(res.data.length > 0){ if (res.data.length > 0) {
// type // type
this.dataForm.salesId = res.data[0].id this.dataForm.salesId = res.data[0].id
this.dataForm.salesName = res.data[0].contractName this.dataForm.salesName = res.data[0].contractName
}else{
this.dataForm.salesId = ''
this.dataForm.salesName = ''
} }
}) })
}, },

@ -22,32 +22,21 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable <el-input v-model="dataForm.materialName" placeholder="选择物料" readonly
field="materialId" interfaceId="381037852907038533" @click.native="choiceMaterialId()">
:columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name" </el-input>
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20" >
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId" <el-input v-model="dataForm.customerName" placeholder="选择客户" readonly>
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" </el-input>
propsValue="id" relationField="supplier_nm" popupType="dialog" popupTitle="选择数据"
popupWidth="800px" hasPage :pageSize="20" @change="customerSelect" disabled >
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="销售合同" prop="salesId"> <el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <el-input v-model="dataForm.salesName" placeholder="选择销售合同" readonly>
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" </el-input>
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
:bissId="dataForm.customerId" hasPage :pageSize="20" disabled>
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="6"> <!-- <el-col :span="6">
@ -77,12 +66,9 @@
</el-col>--> </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" <el-input v-model="dataForm.vehicleName" placeholder="选择车车辆" readonly
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" @click.native="choiceVehicleId()">
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" </el-input>
@change="changePicture" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -186,12 +172,9 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="业务员2" prop="naturalId"> <el-form-item label="业务员2" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId" <el-input v-model="dataForm.naturalName" placeholder="选择业务员2" readonly
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" @click.native="choiceNaturalId()">
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage </el-input>
:pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -218,6 +201,11 @@
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button>
<el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button> <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>
</span> </span>
<MaterialBox v-if="formVisible" ref="form" @refreshDataList="initData" />
<CustomerBox v-if="formVisible2" ref="form2" @refreshDataList="initData2" />
<ContractBox v-if="formVisible3" ref="form3" @refreshDataList="initData3" />
<VehicleBox v-if="formVisible4" ref="form4" @refreshDataList="initData4" />
<NaturalBox v-if="formVisible5" ref="form5" @refreshDataList="initData5" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
@ -226,6 +214,11 @@
MB: 1024 * 1024, MB: 1024 * 1024,
GB: 1024 * 1024 * 1024 GB: 1024 * 1024 * 1024
} }
import MaterialBox from './MaterialBox'
import CustomerBox from './CustomerBox'
import ContractBox from './ContractBox'
import VehicleBox from './VehicleBox'
import NaturalBox from './NaturalBox'
import request from '@/utils/request' import request from '@/utils/request'
import { import {
getDataInterfaceRes getDataInterfaceRes
@ -234,10 +227,16 @@
getDictionaryDataSelector getDictionaryDataSelector
} from '@/api/systemData/dictionary' } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {MaterialBox, CustomerBox, ContractBox, VehicleBox, NaturalBox},
props: [], props: [],
data() { data() {
return { return {
formVisible6: false,
formVisible5: false,
formVisible4: false,
formVisible3: false,
formVisible2: false,
formVisible: false,
submitDisabled: false, submitDisabled: false,
fileList: [], fileList: [],
uploadHeaders: { uploadHeaders: {
@ -265,9 +264,14 @@
dataForm: { dataForm: {
poundPictures: [], poundPictures: [],
materialId: "", materialId: "",
customerId: "", materialName: "",
customerName: "",
supplierId: "",
supplierName: "",
salesId: "", salesId: "",
salesName: "",
vehicleId: "", vehicleId: "",
vehicleName: "",
vehiclePictures: [], vehiclePictures: [],
poundDate: '', poundDate: '',
poundlistNo: '', poundlistNo: '',
@ -284,6 +288,7 @@
salesPrice: 0, salesPrice: 0,
businessId: "", businessId: "",
naturalId: "", naturalId: "",
naturalName: '',
remark: '', remark: '',
creatorTime: "", creatorTime: "",
}, },
@ -483,6 +488,78 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
initData6(contract) {
this.dataForm.purchaseId = contract.id;
this.dataForm.purchaseName = contract.contractName;
this.dataForm.supplierId = contract.code;
this.dataForm.supplierName = contract.name;
},
initData5(natural) {
this.dataForm.naturalId = natural.id;
this.dataForm.naturalName = natural.name;
},
initData4(vehicle) {
this.dataForm.vehicleId = vehicle.id;
this.dataForm.vehicleName = vehicle.ticketno;
this.dataForm.vehiclePictures = JSON.parse(vehicle.vehiclephotos);
},
initData3(contract) {
this.dataForm.salesId = contract.id;
this.dataForm.salesName = contract.contractName;
},
initData2(custmer) {
this.dataForm.customerId = custmer.id;
this.dataForm.customerName = custmer.supplierNm;
this.customerSelect();
},
initData(material) {
this.dataForm.materialId = material.id;
this.dataForm.materialName = material.itemName;
},
choiceNaturalId(){
this.formVisible5 = true
this.$nextTick(() => {
this.$refs.form5.init()
})
},
choiceVehicleId(){
this.formVisible4 = true
this.$nextTick(() => {
this.$refs.form4.init()
})
},
choicePurchaseId(){
var param = {};
param.name = '';
param.contractType = '0';
param.menuId = '380358734926336581';
this.formVisible6 = true
this.$nextTick(() => {
this.$refs.form6.init(param)
})
},
choiceSalesId(){
var param = {};
param.name = this.dataForm.customerName;
param.contractType = '1';
param.menuId = '380358734926336581';
this.formVisible3 = true
this.$nextTick(() => {
this.$refs.form3.init(param)
})
},
choiceCustomerId(){
this.formVisible2 = true
this.$nextTick(() => {
this.$refs.form2.init()
})
},
choiceMaterialId() {
this.formVisible = true
this.$nextTick(() => {
this.$refs.form.init()
})
},
imgChange(res) { imgChange(res) {
// this.dataForm.customerId = res.data.customerId; // this.dataForm.customerId = res.data.customerId;
// this.dataForm.customerName = res.data.customerName; // this.dataForm.customerName = res.data.customerName;
@ -521,9 +598,9 @@
advanceChange(e) { advanceChange(e) {
this.dataForm.advance = e; this.dataForm.advance = e;
}, },
customerSelect(e, d) { customerSelect() {
const query = { const query = {
code: d.id code: this.dataForm.customerId
} }
request({ request({
url: '/api/example/ContractFile/getListByCustomer', url: '/api/example/ContractFile/getListByCustomer',
@ -534,6 +611,9 @@
// type // type
this.dataForm.salesId = res.data[0].id this.dataForm.salesId = res.data[0].id
this.dataForm.salesName = res.data[0].contractName this.dataForm.salesName = res.data[0].contractName
}else{
this.dataForm.salesId = ''
this.dataForm.salesName = ''
} }
}) })
}, },

@ -22,32 +22,23 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable <el-input v-model="dataForm.materialName" placeholder="选择物料" readonly
field="materialId" interfaceId="381037852907038533" @click.native="choiceMaterialId()">
:columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name" </el-input>
popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId" <el-input v-model="dataForm.customerName" placeholder="选择客户" readonly
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" @click.native="choiceCustomerId()">
propsValue="id" relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" </el-input>
popupWidth="800px" hasPage :pageSize="20" @change="customerSelect">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="销售合同" prop="salesId"> <el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <el-input v-model="dataForm.salesName" placeholder="选择销售合同" readonly
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" @click.native="choiceSalesId()">
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" </el-input>
:bissId="dataForm.customerId" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -77,12 +68,9 @@
</el-col> </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" <el-input v-model="dataForm.vehicleName" placeholder="选择车车辆" readonly
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" @click.native="choiceVehicleId()">
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" </el-input>
@change="changePicture" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -186,12 +174,9 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="业务员2" prop="naturalId"> <el-form-item label="业务员2" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择业务员2" clearable field="naturalId" <el-input v-model="dataForm.naturalName" placeholder="选择业务员2" readonly
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" @click.native="choiceNaturalId()">
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage </el-input>
:pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -218,6 +203,11 @@
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail" :disabled="submitDisabled"> </el-button>
<!-- <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>--> <!-- <el-button type="primary" @click="continueUpload()" :disabled="submitDisabled"> 继续上传</el-button>-->
</span> </span>
<MaterialBox v-if="formVisible" ref="form" @refreshDataList="initData" />
<CustomerBox v-if="formVisible2" ref="form2" @refreshDataList="initData2" />
<ContractBox v-if="formVisible3" ref="form3" @refreshDataList="initData3" />
<VehicleBox v-if="formVisible4" ref="form4" @refreshDataList="initData4" />
<NaturalBox v-if="formVisible5" ref="form5" @refreshDataList="initData5" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
@ -226,6 +216,11 @@
MB: 1024 * 1024, MB: 1024 * 1024,
GB: 1024 * 1024 * 1024 GB: 1024 * 1024 * 1024
} }
import MaterialBox from './MaterialBox'
import CustomerBox from './CustomerBox'
import ContractBox from './ContractBox'
import VehicleBox from './VehicleBox'
import NaturalBox from './NaturalBox'
import request from '@/utils/request' import request from '@/utils/request'
import { import {
getDataInterfaceRes getDataInterfaceRes
@ -234,10 +229,16 @@
getDictionaryDataSelector getDictionaryDataSelector
} from '@/api/systemData/dictionary' } from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {MaterialBox, CustomerBox, ContractBox, VehicleBox, NaturalBox},
props: [], props: [],
data() { data() {
return { return {
formVisible6: false,
formVisible5: false,
formVisible4: false,
formVisible3: false,
formVisible2: false,
formVisible: false,
submitDisabled: false, submitDisabled: false,
fileList: [], fileList: [],
uploadHeaders: { uploadHeaders: {
@ -265,9 +266,14 @@
dataForm: { dataForm: {
poundPictures: [], poundPictures: [],
materialId: "", materialId: "",
customerId: "", materialName: "",
customerName: "",
supplierId: "",
supplierName: "",
salesId: "", salesId: "",
salesName: "",
vehicleId: "", vehicleId: "",
vehicleName: "",
vehiclePictures: [], vehiclePictures: [],
poundDate: '', poundDate: '',
poundlistNo: '', poundlistNo: '',
@ -284,6 +290,7 @@
salesPrice: 0, salesPrice: 0,
businessId: "", businessId: "",
naturalId: "", naturalId: "",
naturalName: '',
remark: '', remark: '',
creatorTime: "", creatorTime: "",
}, },
@ -477,6 +484,78 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
initData6(contract) {
this.dataForm.purchaseId = contract.id;
this.dataForm.purchaseName = contract.contractName;
this.dataForm.supplierId = contract.code;
this.dataForm.supplierName = contract.name;
},
initData5(natural) {
this.dataForm.naturalId = natural.id;
this.dataForm.naturalName = natural.name;
},
initData4(vehicle) {
this.dataForm.vehicleId = vehicle.id;
this.dataForm.vehicleName = vehicle.ticketno;
this.dataForm.vehiclePictures = JSON.parse(vehicle.vehiclephotos);
},
initData3(contract) {
this.dataForm.salesId = contract.id;
this.dataForm.salesName = contract.contractName;
},
initData2(custmer) {
this.dataForm.customerId = custmer.id;
this.dataForm.customerName = custmer.supplierNm;
this.customerSelect();
},
initData(material) {
this.dataForm.materialId = material.id;
this.dataForm.materialName = material.itemName;
},
choiceNaturalId(){
this.formVisible5 = true
this.$nextTick(() => {
this.$refs.form5.init()
})
},
choiceVehicleId(){
this.formVisible4 = true
this.$nextTick(() => {
this.$refs.form4.init()
})
},
choicePurchaseId(){
var param = {};
param.name = '';
param.contractType = '0';
param.menuId = '380358734926336581';
this.formVisible6 = true
this.$nextTick(() => {
this.$refs.form6.init(param)
})
},
choiceSalesId(){
var param = {};
param.name = this.dataForm.customerName;
param.contractType = '1';
param.menuId = '380358734926336581';
this.formVisible3 = true
this.$nextTick(() => {
this.$refs.form3.init(param)
})
},
choiceCustomerId(){
this.formVisible2 = true
this.$nextTick(() => {
this.$refs.form2.init()
})
},
choiceMaterialId() {
this.formVisible = true
this.$nextTick(() => {
this.$refs.form.init()
})
},
imgChange(res) { imgChange(res) {
this.dataForm.customerId = res.data.customerId; this.dataForm.customerId = res.data.customerId;
this.dataForm.customerName = res.data.customerName; this.dataForm.customerName = res.data.customerName;
@ -515,9 +594,9 @@
advanceChange(e) { advanceChange(e) {
this.dataForm.advance = e; this.dataForm.advance = e;
}, },
customerSelect(e, d) { customerSelect() {
const query = { const query = {
code: d.id code: this.dataForm.customerId
} }
request({ request({
url: '/api/example/ContractFile/getListByCustomer', url: '/api/example/ContractFile/getListByCustomer',
@ -528,6 +607,9 @@
// type // type
this.dataForm.salesId = res.data[0].id this.dataForm.salesId = res.data[0].id
this.dataForm.salesName = res.data[0].contractName this.dataForm.salesName = res.data[0].contractName
}else{
this.dataForm.salesId = ''
this.dataForm.salesName = ''
} }
}) })
}, },

@ -0,0 +1,155 @@
<template>
<el-dialog title="选择物料" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="1000px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="8">
<el-form-item label="物料编码">
<el-input v-model="itemCode" placeholder="请输入物料编码查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料名称">
<el-input v-model="itemName" placeholder="请输入物料名称查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="init()">{{$t('common.search')}}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{$t('common.reset')}}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="init()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" @row-click="rowClick" @row-dblclick="rowdbClick" :border="false" :hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="checkedRow.id">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="itemCode" width="200" align="center" label="物料编码" />
<el-table-column prop="itemName" width="200" align="center" label="物料名称" />
<el-table-column label="单位" prop="primaryUnitOmeasure" align="center" >
<template slot-scope="scope">
{{ scope.row.primaryUnitOmeasure | dynamicText(primaryUnitOmeasureOptions) }}
</template>
</el-table-column>
<el-table-column prop="inArea" width="150" align="center" label="默认入库区" />
<el-table-column prop="outArea" width="150" align="center" label="默认出库区" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="refresh" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
<el-button type="primary" @click="select()">{{$t('common.confirmButton')}}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
primaryUnitOmeasureOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }],
visible: false,
listLoading: true,
itemCode: '',
itemName: '',
list: [],
total: 0,
checkedRow: {},
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
itemCode: '',
itemName: '',
},
total: 0,
checked: '',
}
},
methods: {
rowdbClick(row){
this.checked = row.id
this.checkedRow = row
this.select();
},
rowClick(row) {
this.checked = row.id
this.checkedRow = row
},
init() {
this.visible = true
this.listLoading = true
this.listQuery.itemCode = this.itemCode
this.listQuery.itemName = this.itemName
this.listQuery.menuId = '380611389670053189'
let listQuery = this.listQuery
request({
url: `/api/example/Material/getList`,
method: 'post',
data: listQuery
}).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
})
/* GoodsList(query).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
}) */
},
refresh() {
this.itemCode = ''
this.itemName = ''
this.init()
},
select() {
if (this.checked == '') return
this.$emit('refreshDataList', this.checkedRow)
this.visible = false
},
handleSelectionChange(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -0,0 +1,148 @@
<template>
<el-dialog title="选择业务员2" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="1000px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="8">
<el-form-item label="业务员2名称">
<el-input v-model="name" placeholder="请输入业务员2名称查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务员2手机号">
<el-input v-model="contact" placeholder="请输入业务员2手机号查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="init()">{{$t('common.search')}}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{$t('common.reset')}}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="init()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" @row-click="rowClick" @row-dblclick="rowdbClick" :border="false" :hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="checkedRow.id">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="name" width="200" align="center" label="业务员2名称" />
<el-table-column prop="contact" width="200" align="center" label="业务员2手机号" />
<el-table-column prop="adress" align="center" label="业务员2地址" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="refresh" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
<el-button type="primary" @click="select()">{{$t('common.confirmButton')}}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
visible: false,
listLoading: true,
contact: '',
name: '',
list: [],
total: 0,
checkedRow: {},
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
contact: '',
name: '',
},
total: 0,
checked: '',
}
},
methods: {
rowdbClick(row){
this.checked = row.id
this.checkedRow = row
this.select();
},
rowClick(row) {
this.checked = row.id
this.checkedRow = row
},
init() {
this.visible = true
this.listLoading = true
this.listQuery.contact = this.contact
this.listQuery.name = this.name
this.listQuery.menuId = '390421844370438021'
let listQuery = this.listQuery
request({
url: `/api/example/Jg_natural/getList`,
method: 'post',
data: listQuery
}).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
})
/* GoodsList(query).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
}) */
},
refresh() {
this.contact = ''
this.name = ''
this.init()
},
select() {
if (this.checked == '') return
this.$emit('refreshDataList', this.checkedRow)
this.visible = false
},
handleSelectionChange(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -0,0 +1,149 @@
<template>
<el-dialog title="选择车辆" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="1000px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="8">
<el-form-item label="车牌号">
<el-input v-model="ticketno" placeholder="请输入车牌号查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="司机名称">
<el-input v-model="drivername" placeholder="请输入司机名称查询" clearable @keyup.enter.native="init()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="init()">{{$t('common.search')}}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{$t('common.reset')}}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="init()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" @row-click="rowClick" @row-dblclick="rowdbClick" :border="false" :hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="checkedRow.id">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="ticketno" width="200" align="center" label="车牌号" />
<el-table-column prop="drivername" align="center" label="司机名称" />
<el-table-column prop="contact" width="150" align="center" label="手机号" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="refresh" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
<el-button type="primary" @click="select()">{{$t('common.confirmButton')}}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
primaryUnitOmeasureOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }],
visible: false,
listLoading: true,
ticketno: '',
drivername: '',
list: [],
total: 0,
checkedRow: {},
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
ticketno: '',
drivername: '',
},
total: 0,
checked: '',
}
},
methods: {
rowdbClick(row){
this.checked = row.id
this.checkedRow = row
this.select();
},
rowClick(row) {
this.checked = row.id
this.checkedRow = row
},
init() {
this.visible = true
this.listLoading = true
this.listQuery.ticketno = this.ticketno
this.listQuery.drivername = this.drivername
this.listQuery.menuId = '380662313734134341'
let listQuery = this.listQuery
request({
url: `/api/example/Vehicle/getList`,
method: 'post',
data: listQuery
}).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
})
/* GoodsList(query).then(res => {
this.list = res.data.list
this.total = res.data.pagination.total
this.listLoading = false
}) */
},
refresh() {
this.ticketno = ''
this.drivername = ''
this.init()
},
select() {
if (this.checked == '') return
this.$emit('refreshDataList', this.checkedRow)
this.visible = false
},
handleSelectionChange(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -226,25 +226,25 @@
formVisible4: false, formVisible4: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ prop: 'creatorTime', label: '磅单日期' }, { prop: 'poundDate', label: '磅单日期' },
{ prop: 'vehicleId', label: '车牌号' }, { prop: 'poundlistNo', label: '磅单号' },
{ prop: 'materialId', label: '物料名称' }, { prop: 'vehicleName', label: '车牌号' },
{ prop: 'materialName', label: '物料名称' },
{ prop: 'grossWeight', label: '毛重' }, { prop: 'grossWeight', label: '毛重' },
{ prop: 'tareWeight', label: '皮重' }, { prop: 'tareWeight', label: '皮重' },
{ prop: 'buckleWeight', label: '扣重' }, { prop: 'buckleWeight', label: '扣重' },
{ prop: 'netWeight', label: '净重' }, { prop: 'netWeight', label: '净重' },
{ prop: 'customerId', label: '客户名称' }, { prop: 'customerName', label: '客户名称' },
{ prop: 'salesId', label: '销售合同' }, { prop: 'salesName', label: '销售合同' },
{ prop: 'advance', label: '是否垫资' }, { prop: 'advance', label: '是否垫资' },
{ prop: 'transportType', label: '运输类型' }, { prop: 'transportType', label: '运输类型' },
{ prop: 'transportPrice', label: '运费' }, { prop: 'transportPrice', label: '运费' },
{ prop: 'salesPrice', label: '销售价格' }, { prop: 'salesPrice', label: '销售价格' },
{ {prop: 'collectPrice', label: '收货价格'},
prop: 'collectPrice', { prop: 'businessName', label: '业务员' },
label: '收货价格' { prop: 'remark', label: '备注' },
}, { prop: 'poundPictures', label: '磅单图片' },
{ prop: 'creatorUserName', label: '业务员' }, { prop: 'vehiclePictures', label: '车辆图片' }
{ prop: 'remark', label: '备注' }
], ],
unitOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }], unitOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }],
unitProps: { 'label': 'fullName', 'value': 'id' }, unitProps: { 'label': 'fullName', 'value': 'id' },

Loading…
Cancel
Save