修改磅单列表

product
杨世强 2 years ago
parent d2c1dc1d26
commit 2107379337

@ -52,7 +52,7 @@ import jnpf.util.enums.FileTypeEnum;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Slf4j @Slf4j
@RestController @RestController
@ -81,22 +81,27 @@ public class PoundlistController {
* @param poundlistPagination * @param poundlistPagination
* @return * @return
*/ */
@ApiOperation("列表")
@PostMapping("/getList") @PostMapping("/getList")
public ActionResult list(@RequestBody PoundlistPagination poundlistPagination)throws IOException{ public ActionResult list(@RequestBody PoundlistPagination poundlistPagination)throws IOException{
List<PoundlistEntity> list= poundlistService.getList(poundlistPagination); List<PoundlistEntity> list= poundlistService.getList(poundlistPagination);
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(PoundlistEntity entity:list){ for(PoundlistEntity entity:list){
Map<String,Object> materialCodeMap = new HashMap<>();
// entity.setMaterialCode(generaterSwapUtil.getPopupSelectValue("381037852907038533","item_code","item_code",entity.getMaterialCode(),materialCodeMap));
Map<String,Object> salesNameMap = new HashMap<>();
// entity.setSalesName(generaterSwapUtil.getPopupSelectValue("381038993740949317","contract_name","contract_name",entity.getSalesName(),salesNameMap));
Map<String,Object> licenseNoMap = new HashMap<>();
// entity.setLicenseNo(generaterSwapUtil.getPopupSelectValue("381432451370615173","ticketno","ticketno",entity.getLicenseNo(),licenseNoMap));
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> purchaseNameMap = new HashMap<>(); Map<String,Object> businessIdMap = new HashMap<>();
// entity.setPurchaseName(generaterSwapUtil.swapRelationFormValue("selectField121",entity.getPurchaseName(),"294090217084722181",purchaseNameMap)); entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>();
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap));
} }
List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class); List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class);
for(PoundlistListVO poundlistVO:listVO){ for(PoundlistListVO poundlistVO:listVO){
@ -165,16 +170,22 @@ public class PoundlistController {
List<PoundlistEntity> list= poundlistService.getTypeList(poundlistPagination,poundlistPaginationExportModel.getDataType()); List<PoundlistEntity> list= poundlistService.getTypeList(poundlistPagination,poundlistPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(PoundlistEntity entity:list){ for(PoundlistEntity entity:list){
Map<String,Object> materialCodeMap = new HashMap<>();
// entity.setMaterialCode(generaterSwapUtil.swapRelationFormValue("selectField121",entity.getMaterialCode(),"294090217084722181",materialCodeMap));
Map<String,Object> salesNameMap = new HashMap<>();
// entity.setSalesName(generaterSwapUtil.swapRelationFormValue("selectField121",entity.getSalesName(),"294090217084722181",salesNameMap));
Map<String,Object> licenseNoMap = new HashMap<>();
// entity.setLicenseNo(generaterSwapUtil.swapRelationFormValue("selectField122",entity.getLicenseNo(),"294090217084722181",licenseNoMap));
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> purchaseNameMap = new HashMap<>(); Map<String,Object> businessIdMap = new HashMap<>();
// entity.setPurchaseName(generaterSwapUtil.swapRelationFormValue("selectField121",entity.getPurchaseName(),"294090217084722181",purchaseNameMap)); entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_ID","F_RealName",entity.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>();
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap));
} }
List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class); List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class);
for(PoundlistListVO poundlistVO:listVO){ for(PoundlistListVO poundlistVO:listVO){
@ -194,38 +205,29 @@ public class PoundlistController {
if(keys.length>0){ if(keys.length>0){
for(String key:keys){ for(String key:keys){
switch(key){ switch(key){
case "materialCode" : case "poundPictures" :
entitys.add(new ExcelExportEntity("物料编码" ,"materialCode")); entitys.add(new ExcelExportEntity("磅单上传" ,"poundPictures"));
break;
case "materialName" :
entitys.add(new ExcelExportEntity("物料名称" ,"materialName"));
break; break;
case "salesName" : case "materialId" :
entitys.add(new ExcelExportEntity("销售合同" ,"salesName")); entitys.add(new ExcelExportEntity("物料名称" ,"materialId"));
break; break;
case "customerName" : case "customerId" :
entitys.add(new ExcelExportEntity("客户名称" ,"customerName")); entitys.add(new ExcelExportEntity("客户名称" ,"customerId"));
break; break;
case "advance" : case "salesId" :
entitys.add(new ExcelExportEntity("是否垫资" ,"advance")); entitys.add(new ExcelExportEntity("销售合同" ,"salesId"));
break; break;
case "salesPrice" : case "vehicleId" :
entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice")); entitys.add(new ExcelExportEntity("车牌号" ,"vehicleId"));
break; break;
case "transportType" : case "vehiclePictures" :
entitys.add(new ExcelExportEntity("运输方式" ,"transportType")); entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures"));
break;
case "departmentId" :
entitys.add(new ExcelExportEntity("运费" ,"departmentId"));
break;
case "licenseNo" :
entitys.add(new ExcelExportEntity("车号" ,"licenseNo"));
break; break;
case "businessName" : case "poundDate" :
entitys.add(new ExcelExportEntity("业务员名称" ,"businessName")); entitys.add(new ExcelExportEntity("磅单日期" ,"poundDate"));
break; break;
case "poundPictures" : case "poundlistNo" :
entitys.add(new ExcelExportEntity("磅单图片" ,"poundPictures")); entitys.add(new ExcelExportEntity("磅单号" ,"poundlistNo"));
break; break;
case "tareWeight" : case "tareWeight" :
entitys.add(new ExcelExportEntity("皮重" ,"tareWeight")); entitys.add(new ExcelExportEntity("皮重" ,"tareWeight"));
@ -239,26 +241,32 @@ public class PoundlistController {
case "netWeight" : case "netWeight" :
entitys.add(new ExcelExportEntity("净重" ,"netWeight")); entitys.add(new ExcelExportEntity("净重" ,"netWeight"));
break; break;
case "remark" : case "unit" :
entitys.add(new ExcelExportEntity("备注" ,"remark")); entitys.add(new ExcelExportEntity("单位" ,"unit"));
break; break;
case "driverName" : case "transportType" :
entitys.add(new ExcelExportEntity("司机名称" ,"driverName")); entitys.add(new ExcelExportEntity("运输类型" ,"transportType"));
break; break;
case "vehiclePictures" : case "advance" :
entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures")); entitys.add(new ExcelExportEntity("是否垫资" ,"advance"));
break; break;
case "creatorusername" : case "transportPrice" :
entitys.add(new ExcelExportEntity("制单人" ,"creatorusername")); entitys.add(new ExcelExportEntity("运费" ,"transportPrice"));
break; break;
case "supplierName" : case "salesPrice" :
entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName")); entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice"));
break; break;
case "purchaseName" : case "businessId" :
entitys.add(new ExcelExportEntity("采购合同" ,"purchaseName")); entitys.add(new ExcelExportEntity("业务员" ,"businessId"));
break; break;
case "unit" : case "naturalId" :
entitys.add(new ExcelExportEntity("单位" ,"unit")); entitys.add(new ExcelExportEntity("自然人" ,"naturalId"));
break;
case "purchaseId" :
entitys.add(new ExcelExportEntity("采购合同" ,"purchaseId"));
break;
case "supplierName" :
entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName"));
break; break;
case "settlement" : case "settlement" :
entitys.add(new ExcelExportEntity("结算重量" ,"settlement")); entitys.add(new ExcelExportEntity("结算重量" ,"settlement"));
@ -278,8 +286,8 @@ public class PoundlistController {
case "paymentDate" : case "paymentDate" :
entitys.add(new ExcelExportEntity("回款日期" ,"paymentDate")); entitys.add(new ExcelExportEntity("回款日期" ,"paymentDate"));
break; break;
case "poundDate" : case "remark" :
entitys.add(new ExcelExportEntity("磅单日期" ,"poundDate")); entitys.add(new ExcelExportEntity("备注" ,"remark"));
break; break;
default: default:
break; break;
@ -366,16 +374,22 @@ public class PoundlistController {
//附表数据转换 //附表数据转换
//添加到详情表单对象中 //添加到详情表单对象中
Map<String,Object> materialCodeMap = new HashMap<>();
vo.setMaterialCode(generaterSwapUtil.swapRelationFormValue("selectField121",vo.getMaterialCode(),"294090217084722181",materialCodeMap));
Map<String,Object> salesNameMap = new HashMap<>();
vo.setSalesName(generaterSwapUtil.swapRelationFormValue("selectField121",vo.getSalesName(),"294090217084722181",salesNameMap));
Map<String,Object> licenseNoMap = new HashMap<>();
vo.setLicenseNo(generaterSwapUtil.swapRelationFormValue("selectField122",vo.getLicenseNo(),"294090217084722181",licenseNoMap));
vo.setPoundPictures(generaterSwapUtil.getFileNameInJson(vo.getPoundPictures())); vo.setPoundPictures(generaterSwapUtil.getFileNameInJson(vo.getPoundPictures()));
Map<String,Object> materialIdMap = new HashMap<>();
vo.setMaterialId(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",vo.getMaterialId(),materialIdMap));
Map<String,Object> customerIdMap = new HashMap<>();
vo.setCustomerId(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",vo.getCustomerId(),customerIdMap));
Map<String,Object> salesIdMap = new HashMap<>();
vo.setSalesId(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",vo.getSalesId(),salesIdMap));
Map<String,Object> vehicleIdMap = new HashMap<>();
vo.setVehicleId(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",vo.getVehicleId(),vehicleIdMap));
vo.setVehiclePictures(generaterSwapUtil.getFileNameInJson(vo.getVehiclePictures())); vo.setVehiclePictures(generaterSwapUtil.getFileNameInJson(vo.getVehiclePictures()));
Map<String,Object> purchaseNameMap = new HashMap<>(); Map<String,Object> businessIdMap = new HashMap<>();
vo.setPurchaseName(generaterSwapUtil.swapRelationFormValue("selectField121",vo.getPurchaseName(),"294090217084722181",purchaseNameMap)); vo.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_ID","F_RealName",vo.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>();
vo.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",vo.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
vo.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",vo.getPurchaseId(),purchaseIdMap));
return ActionResult.success(vo); return ActionResult.success(vo);
} }
@ -427,4 +441,9 @@ public class PoundlistController {
} }

@ -24,7 +24,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
@TableName("jg_poundlist") @TableName("jg_poundlist")
@ -34,34 +34,34 @@ public class PoundlistEntity {
private String id; private String id;
@TableField("CREATOR_USER_ID") @TableField("CREATOR_USER_ID")
private String creatoruserid; private String creatorUserId;
@TableField("CREATOR_USER_NAME") @TableField("CREATOR_USER_NAME")
private String creatorusername; private String creatorUserName;
@TableField("CREATOR_TIME") @TableField("CREATOR_TIME")
private Date creatortime; private Date creatorTime;
@TableField("LAST_MODIFY_USER_ID") @TableField("LAST_MODIFY_USER_ID")
private String lastmodifyuserid; private String lastModifyUserId;
@TableField("LAST_MODIFY_USER_NAME") @TableField("LAST_MODIFY_USER_NAME")
private String lastmodifyusername; private String lastModifyUserName;
@TableField("LAST_MODIFY_TIME") @TableField("LAST_MODIFY_TIME")
private Date lastmodifytime; private Date lastModifyTime;
@TableField("DELETE_USER_ID") @TableField("DELETE_USER_ID")
private String deleteuserid; private String deleteUserId;
@TableField("DELETE_USER_NAME") @TableField("DELETE_USER_NAME")
private String deleteusername; private String deleteUserName;
@TableField("DELETE_TIME") @TableField("DELETE_TIME")
private Date deletetime; private Date deleteTime;
@TableField("DELETE_MARK") @TableField("DELETE_MARK")
private String deletemark; private String deleteMark;
@TableField("ORGNIZE_ID") @TableField("ORGNIZE_ID")
private String orgnizeId; private String orgnizeId;
@ -69,23 +69,12 @@ public class PoundlistEntity {
@TableField("DEPARTMENT_ID") @TableField("DEPARTMENT_ID")
private String departmentId; private String departmentId;
// @TableField("LICENSE_NO")
// private String licenseNo;
// @TableField("LICENSE_NO")
// private String licenseNo;
// @TableField("CUSTOMER_CODE")
// private String customerCode;
@TableField("CUSTOMER_ID") @TableField("CUSTOMER_ID")
private String customerId; private String customerId;
@TableField("SALES_ID") @TableField("SALES_ID")
private String salesId; private String salesId;
// @TableField("SALES_NAME")
// private String salesName;
@TableField("SUPPLIER_ID") @TableField("SUPPLIER_ID")
private String supplierId; private String supplierId;
@ -95,15 +84,9 @@ public class PoundlistEntity {
@TableField("PURCHASE_ID") @TableField("PURCHASE_ID")
private String purchaseId; private String purchaseId;
// @TableField("PURCHASE_NAME")
// private String purchaseName;
@TableField("MATERIAL_ID") @TableField("MATERIAL_ID")
private String materialId; private String materialId;
// @TableField("MATERIAL_NAME")
// private String materialName;
@TableField("ADVANCE") @TableField("ADVANCE")
private String advance; private String advance;
@ -149,18 +132,12 @@ public class PoundlistEntity {
@TableField("BUSINESS_ID") @TableField("BUSINESS_ID")
private String businessId; private String businessId;
// @TableField("BUSINESS_NAME")
// private String businessName;
@TableField("POUND_PICTURES") @TableField("POUND_PICTURES")
private String poundPictures; private String poundPictures;
@TableField("VEHICLE_PICTURES") @TableField("VEHICLE_PICTURES")
private String vehiclePictures; private String vehiclePictures;
// @TableField("DRIVER_NAME")
// private String driverName;
@TableField("POUND_TYPE") @TableField("POUND_TYPE")
private String poundType; private String poundType;
@ -182,4 +159,31 @@ public class PoundlistEntity {
@TableField("TRANSPORT_PRICE") @TableField("TRANSPORT_PRICE")
private BigDecimal transportPrice; private BigDecimal transportPrice;
@TableField("ORIGIN_PLACE")
private String originPlace;
@TableField("NATURAL_ID")
private String naturalId;
@TableField("POUNDLIST_NO")
private String poundlistNo;
@TableField("VEHICLE_ID")
private String vehicleId;
@TableField("IS_EXAMINE")
private String isExamine;
@TableField("IS_INVOICING")
private String isInvoicing;
@TableField("IS_PAY")
private String isPay;
@TableField("IS_COLLECTION")
private String isCollection;
@TableField("IS_EXPENSE")
private String isExpense;
} }

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-01-05 * 2023-02-21
*/ */
public interface PoundlistMapper extends BaseMapper<PoundlistEntity> { public interface PoundlistMapper extends BaseMapper<PoundlistEntity> {

@ -14,54 +14,42 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
public class PoundlistCrForm { public class PoundlistCrForm {
/** 物料编码 **/ /** 磅单上传 **/
@JsonProperty("materialCode") @JsonProperty("poundPictures")
private String materialCode; private String poundPictures;
/** 物料名称 **/ /** 物料名称 **/
@JsonProperty("materialName") @JsonProperty("materialId")
private String materialName; private String materialId;
/** 销售合同 **/
@JsonProperty("salesName")
private String salesName;
/** 客户名称 **/ /** 客户名称 **/
@JsonProperty("customerName") @JsonProperty("customerId")
private String customerName; private String customerId;
/** 是否垫资 **/
@JsonProperty("advance")
private String advance;
/** 销售价格 **/ /** 销售合同 **/
@JsonProperty("salesPrice") @JsonProperty("salesId")
private Integer salesPrice; private String salesId;
/** 运输方式 **/
@JsonProperty("transportType")
private String transportType;
/** 运费 **/ /** 车牌号 **/
@JsonProperty("departmentId") @JsonProperty("vehicleId")
private Integer departmentId; private String vehicleId;
/** 车 **/ /** 车辆图片 **/
@JsonProperty("licenseNo") @JsonProperty("vehiclePictures")
private String licenseNo; private String vehiclePictures;
/** 业务员名称 **/ /** 磅单日期 **/
@JsonProperty("businessName") @JsonProperty("poundDate")
private String businessName; private Long poundDate;
/** 磅单图片 **/ /** 磅单 **/
@JsonProperty("poundPictures") @JsonProperty("poundlistNo")
private String poundPictures; private String poundlistNo;
/** 皮重 **/ /** 皮重 **/
@JsonProperty("tareWeight") @JsonProperty("tareWeight")
@ -79,33 +67,41 @@ public class PoundlistCrForm {
@JsonProperty("netWeight") @JsonProperty("netWeight")
private Integer netWeight; private Integer netWeight;
/** 备注 **/ /** 单位 **/
@JsonProperty("remark") @JsonProperty("unit")
private String remark; private String unit;
/** 司机名称 **/ /** 运输类型 **/
@JsonProperty("driverName") @JsonProperty("transportType")
private String driverName; private String transportType;
/** 车辆图片 **/ /** 是否垫资 **/
@JsonProperty("vehiclePictures") @JsonProperty("advance")
private String vehiclePictures; private String advance;
/** 制单人 **/ /** 运费 **/
@JsonProperty("creatorusername") @JsonProperty("transportPrice")
private String creatorusername; private Integer transportPrice;
/** 供应商名称 **/ /** 销售价格 **/
@JsonProperty("supplierName") @JsonProperty("salesPrice")
private String supplierName; private Integer salesPrice;
/** 业务员 **/
@JsonProperty("businessId")
private String businessId;
/** 自然人 **/
@JsonProperty("naturalId")
private String naturalId;
/** 采购合同 **/ /** 采购合同 **/
@JsonProperty("purchaseName") @JsonProperty("purchaseId")
private String purchaseName; private String purchaseId;
/** 单位 **/ /** 供应商名称 **/
@JsonProperty("unit") @JsonProperty("supplierName")
private String unit; private String supplierName;
/** 结算重量 **/ /** 结算重量 **/
@JsonProperty("settlement") @JsonProperty("settlement")
@ -131,9 +127,9 @@ public class PoundlistCrForm {
@JsonProperty("paymentDate") @JsonProperty("paymentDate")
private Long paymentDate; private Long paymentDate;
/** 磅单日期 **/ /** 备注 **/
@JsonProperty("poundDate") @JsonProperty("remark")
private Long poundDate; private String remark;

@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
public class PoundlistInfoVO{ public class PoundlistInfoVO{
@ -23,49 +23,37 @@ public class PoundlistInfoVO{
@JsonProperty("id") @JsonProperty("id")
private String id; private String id;
/** 物料编码 **/ /** 磅单上传 **/
@JsonProperty("materialCode") @JsonProperty("poundPictures")
private String materialCode; private String poundPictures;
/** 物料名称 **/ /** 物料名称 **/
@JsonProperty("materialName") @JsonProperty("materialId")
private String materialName; private String materialId;
/** 销售合同 **/
@JsonProperty("salesName")
private String salesName;
/** 客户名称 **/ /** 客户名称 **/
@JsonProperty("customerName") @JsonProperty("customerId")
private String customerName; private String customerId;
/** 是否垫资 **/
@JsonProperty("advance")
private String advance;
/** 销售价格 **/ /** 销售合同 **/
@JsonProperty("salesPrice") @JsonProperty("salesId")
private Integer salesPrice; private String salesId;
/** 运输方式 **/
@JsonProperty("transportType")
private String transportType;
/** 运费 **/ /** 车牌号 **/
@JsonProperty("departmentId") @JsonProperty("vehicleId")
private Integer departmentId; private String vehicleId;
/** 车 **/ /** 车辆图片 **/
@JsonProperty("licenseNo") @JsonProperty("vehiclePictures")
private String licenseNo; private String vehiclePictures;
/** 业务员名称 **/ /** 磅单日期 **/
@JsonProperty("businessName") @JsonProperty("poundDate")
private String businessName; private Long poundDate;
/** 磅单图片 **/ /** 磅单 **/
@JsonProperty("poundPictures") @JsonProperty("poundlistNo")
private String poundPictures; private String poundlistNo;
/** 皮重 **/ /** 皮重 **/
@JsonProperty("tareWeight") @JsonProperty("tareWeight")
@ -83,33 +71,41 @@ public class PoundlistInfoVO{
@JsonProperty("netWeight") @JsonProperty("netWeight")
private Integer netWeight; private Integer netWeight;
/** 备注 **/ /** 单位 **/
@JsonProperty("remark") @JsonProperty("unit")
private String remark; private String unit;
/** 司机名称 **/ /** 运输类型 **/
@JsonProperty("driverName") @JsonProperty("transportType")
private String driverName; private String transportType;
/** 车辆图片 **/ /** 是否垫资 **/
@JsonProperty("vehiclePictures") @JsonProperty("advance")
private String vehiclePictures; private String advance;
/** 制单人 **/ /** 运费 **/
@JsonProperty("creatorusername") @JsonProperty("transportPrice")
private String creatorusername; private Integer transportPrice;
/** 供应商名称 **/ /** 销售价格 **/
@JsonProperty("supplierName") @JsonProperty("salesPrice")
private String supplierName; private Integer salesPrice;
/** 业务员 **/
@JsonProperty("businessId")
private String businessId;
/** 自然人 **/
@JsonProperty("naturalId")
private String naturalId;
/** 采购合同 **/ /** 采购合同 **/
@JsonProperty("purchaseName") @JsonProperty("purchaseId")
private String purchaseName; private String purchaseId;
/** 单位 **/ /** 供应商名称 **/
@JsonProperty("unit") @JsonProperty("supplierName")
private String unit; private String supplierName;
/** 结算重量 **/ /** 结算重量 **/
@JsonProperty("settlement") @JsonProperty("settlement")
@ -135,8 +131,8 @@ public class PoundlistInfoVO{
@JsonProperty("paymentDate") @JsonProperty("paymentDate")
private Long paymentDate; private Long paymentDate;
/** 磅单日期 **/ /** 备注 **/
@JsonProperty("poundDate") @JsonProperty("remark")
private Long poundDate; private String remark;
} }

@ -10,13 +10,16 @@ import java.util.List;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
public class PoundlistListQuery extends Pagination { public class PoundlistListQuery extends Pagination {
/** 物料名称 */ /** 磅单日期 */
private String materialName; private List<String> poundDate;
/** 磅单号 */
private String poundlistNo;
/** /**
* id * id
*/ */

@ -15,7 +15,7 @@ import java.math.BigDecimal;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
public class PoundlistListVO{ public class PoundlistListVO{
@ -24,57 +24,45 @@ public class PoundlistListVO{
private String id; private String id;
/** 物料编码 **/ /** 磅单上传 **/
@JsonProperty("materialCode") @JsonProperty("poundPictures")
private String materialCode; private String poundPictures;
/** 物料名称 **/ /** 物料名称 **/
@JsonProperty("materialName") @JsonProperty("materialId")
private String materialName; private String materialId;
/** 销售合同 **/
@JsonProperty("salesName")
private String salesName;
/** 客户名称 **/ /** 客户名称 **/
@JsonProperty("customerName") @JsonProperty("customerId")
private String customerName; private String customerId;
/** 是否垫资 **/ /** 销售合同 **/
@JsonProperty("advance") @JsonProperty("salesId")
private String advance; private String salesId;
/** 销售价格 **/
@JsonProperty("salesPrice")
private Integer salesPrice;
/** 运输方式 **/
@JsonProperty("transportType")
private String transportType;
/** 车牌号 **/
@JsonProperty("vehicleId")
private String vehicleId;
/** 运费 **/
@JsonProperty("departmentId")
private Integer departmentId;
/** 车 **/ /** 车辆图片 **/
@JsonProperty("licenseNo") @JsonProperty("vehiclePictures")
private String licenseNo; private String vehiclePictures;
/** 业务员名称 **/ /** 磅单日期 **/
@JsonProperty("businessName") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
private String businessName; @JsonProperty("poundDate")
private Date poundDate;
/** 磅单图片 **/ /** 磅单 **/
@JsonProperty("poundPictures") @JsonProperty("poundlistNo")
private String poundPictures; private String poundlistNo;
/** 皮重 **/ /** 皮重 **/
@ -93,39 +81,47 @@ public class PoundlistListVO{
@JsonProperty("netWeight") @JsonProperty("netWeight")
private Integer netWeight; private Integer netWeight;
/** 备注 **/ /** 单位 **/
@JsonProperty("remark") @JsonProperty("unit")
private String remark; private String unit;
/** 司机名称 **/ /** 运输类型 **/
@JsonProperty("driverName") @JsonProperty("transportType")
private String driverName; private String transportType;
/** 车辆图片 **/ /** 是否垫资 **/
@JsonProperty("vehiclePictures") @JsonProperty("advance")
private String vehiclePictures; private String advance;
/** 制单人 **/ /** 运费 **/
@JsonProperty("creatorusername") @JsonProperty("transportPrice")
private String creatorusername; private Integer transportPrice;
/** 销售价格 **/
@JsonProperty("salesPrice")
private Integer salesPrice;
/** 业务员 **/
@JsonProperty("businessId")
private String businessId;
/** 供应商名称 **/
@JsonProperty("supplierName") /** 自然人 **/
private String supplierName; @JsonProperty("naturalId")
private String naturalId;
/** 采购合同 **/ /** 采购合同 **/
@JsonProperty("purchaseName") @JsonProperty("purchaseId")
private String purchaseName; private String purchaseId;
/** 单位 **/ /** 供应商名称 **/
@JsonProperty("unit") @JsonProperty("supplierName")
private String unit; private String supplierName;
/** 结算重量 **/ /** 结算重量 **/
@ -139,33 +135,32 @@ public class PoundlistListVO{
/** 进项票日期 **/ /** 进项票日期 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonProperty("inputDate") @JsonProperty("inputDate")
private Date inputDate; private Date inputDate;
/** 销项票日期 **/ /** 销项票日期 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonProperty("outputDate") @JsonProperty("outputDate")
private Date outputDate; private Date outputDate;
/** 付款日期 **/ /** 付款日期 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonProperty("payDate") @JsonProperty("payDate")
private Date payDate; private Date payDate;
/** 回款日期 **/ /** 回款日期 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonProperty("paymentDate") @JsonProperty("paymentDate")
private Date paymentDate; private Date paymentDate;
/** 磅单日期 **/ /** 备注 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonProperty("remark")
@JsonProperty("poundDate") private String remark;
private Date poundDate;
} }

@ -11,13 +11,16 @@ import java.util.List;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
public class PoundlistPagination extends Pagination { public class PoundlistPagination extends Pagination {
/** 物料名称 */ /** 磅单日期 */
private String materialName; private List<String> poundDate;
/** 磅单号 */
private String poundlistNo;
/** /**
* id * id
*/ */

@ -9,7 +9,7 @@ import java.util.*;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
public class PoundlistPaginationExportModel extends Pagination { public class PoundlistPaginationExportModel extends Pagination {
@ -21,6 +21,9 @@ public class PoundlistPaginationExportModel extends Pagination {
private String dataType; private String dataType;
/** 物料名称 */ /** 磅单日期 */
private String materialName; private List<String> poundDate;
/** 磅单号 */
private String poundlistNo;
} }

@ -15,7 +15,7 @@ import lombok.Data;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-01-05 * @ 2023-02-21
*/ */
@Data @Data
public class PoundlistUpForm{ public class PoundlistUpForm{
@ -23,59 +23,44 @@ public class PoundlistUpForm{
private String id; private String id;
/** 物料编码 **/ /** 磅单上传 **/
@JsonProperty("materialCode") @JsonProperty("poundPictures")
private String materialCode; private String poundPictures;
/** 物料名称 **/ /** 物料名称 **/
@JsonProperty("materialName") @JsonProperty("materialId")
private String materialName; private String materialId;
/** 销售合同 **/
@JsonProperty("salesName")
private String salesName;
/** 客户名称 **/ /** 客户名称 **/
@JsonProperty("customerName") @JsonProperty("customerId")
private String customerName; private String customerId;
/** 是否垫资 **/
@JsonProperty("advance")
private String advance;
/** 销售价格 **/
@JsonProperty("salesPrice")
private Integer salesPrice;
/** 运输方式 **/ /** 销售合同 **/
@JsonProperty("transportType") @JsonProperty("salesId")
private String transportType; private String salesId;
/** 运费 **/ /** 车牌号 **/
@JsonProperty("departmentId") @JsonProperty("vehicleId")
private Integer departmentId; private String vehicleId;
/** 车 **/ /** 车辆图片 **/
@JsonProperty("licenseNo") @JsonProperty("vehiclePictures")
private String licenseNo; private String vehiclePictures;
/** 业务员名称 **/ /** 磅单日期 **/
@JsonProperty("businessName") @JsonProperty("poundDate")
private String businessName; private Long poundDate;
/** 磅单图片 **/ /** 磅单 **/
@JsonProperty("poundPictures") @JsonProperty("poundlistNo")
private String poundPictures; private String poundlistNo;
/** 皮重 **/ /** 皮重 **/
@ -98,39 +83,49 @@ public class PoundlistUpForm{
private Integer netWeight; private Integer netWeight;
/** 备注 **/ /** 单位 **/
@JsonProperty("remark") @JsonProperty("unit")
private String remark; private String unit;
/** 司机名称 **/ /** 运输类型 **/
@JsonProperty("driverName") @JsonProperty("transportType")
private String driverName; private String transportType;
/** 车辆图片 **/ /** 是否垫资 **/
@JsonProperty("vehiclePictures") @JsonProperty("advance")
private String vehiclePictures; private String advance;
/** 制单人 **/ /** 运费 **/
@JsonProperty("creatorusername") @JsonProperty("transportPrice")
private String creatorusername; private Integer transportPrice;
/** 供应商名称 **/ /** 销售价格 **/
@JsonProperty("supplierName") @JsonProperty("salesPrice")
private String supplierName; private Integer salesPrice;
/** 业务员 **/
@JsonProperty("businessId")
private String businessId;
/** 自然人 **/
@JsonProperty("naturalId")
private String naturalId;
/** 采购合同 **/ /** 采购合同 **/
@JsonProperty("purchaseName") @JsonProperty("purchaseId")
private String purchaseName; private String purchaseId;
/** 单位 **/ /** 供应商名称 **/
@JsonProperty("unit") @JsonProperty("supplierName")
private String unit; private String supplierName;
/** 结算重量 **/ /** 结算重量 **/
@ -163,9 +158,9 @@ public class PoundlistUpForm{
private Long paymentDate; private Long paymentDate;
/** 磅单日期 **/ /** 备注 **/
@JsonProperty("poundDate") @JsonProperty("remark")
private Long poundDate; private String remark;
} }

@ -10,7 +10,7 @@ import java.util.*;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-01-05 * 2023-02-21
*/ */
public interface PoundlistService extends IService<PoundlistEntity> { public interface PoundlistService extends IService<PoundlistEntity> {

@ -38,7 +38,7 @@ import java.util.*;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-01-05 * 2023-02-21
*/ */
@Service @Service
public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, PoundlistEntity> implements PoundlistService{ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, PoundlistEntity> implements PoundlistService{
@ -59,56 +59,58 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
String userId=userProvider.get().getUserId(); String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList(); List<String> AllIdList =new ArrayList();
int total=0; int total=0;
int poundlistNum =0; int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>(); QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false; poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1");
boolean appPermission = false; boolean pcPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean appPermission = false;
if(isPc && pcPermission){ boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if (!userProvider.get().getIsAdministrator()){ if(isPc && pcPermission){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist")); if (!userProvider.get().getIsAdministrator()){
if (ObjectUtil.isEmpty(poundlistObj)){ Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
return new ArrayList<>(); if (ObjectUtil.isEmpty(poundlistObj)){
} else { return new ArrayList<>();
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj; } else {
poundlistNum++; poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
} poundlistNum++;
} }
} }
if(!isPc && appPermission){ }
if (!userProvider.get().getIsAdministrator()){ if(!isPc && appPermission){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist")); if (!userProvider.get().getIsAdministrator()){
if (ObjectUtil.isEmpty(poundlistObj)){ Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
return new ArrayList<>(); if (ObjectUtil.isEmpty(poundlistObj)){
} else { return new ArrayList<>();
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj; } else {
poundlistNum++; poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
} poundlistNum++;
}
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
poundlistNum++;
List<String> PoundDateList = poundlistPagination.getPoundDate();
Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
} }
}
if(StringUtil.isNotEmpty(poundlistPagination.getMaterialName())){ if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
poundlistNum++;
// poundlistQueryWrapper.lambda().like(PoundlistEntity::getMaterialName,poundlistPagination.getMaterialName());
}
if(StringUtil.isNotEmpty(poundlistPagination.getKeyword())){
poundlistNum++; poundlistNum++;
poundlistQueryWrapper.lambda().and(wq -> { poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
// 拼接sql }
wq.like(PoundlistEntity::getSupplierName,poundlistPagination.getKeyword())
.or();
// .like(PoundlistEntity::getCustomerName,poundlistPagination.getKeyword())
// .or()
// .like(PoundlistEntity::getLicenseNo,poundlistPagination.getKeyword());
});
}
if(AllIdList.size()>0){ if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList); poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
} }
//排序 //排序
if(StringUtil.isEmpty(poundlistPagination.getSidx())){ if(StringUtil.isEmpty(poundlistPagination.getSidx())){
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId); poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
}else{ }else{
try { try {
String sidx = poundlistPagination.getSidx(); String sidx = poundlistPagination.getSidx();
@ -122,9 +124,9 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
} }
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=this.page(page, 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());
@ -134,55 +136,66 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
public List<PoundlistEntity> getTypeList(PoundlistPagination poundlistPagination,String dataType){ public List<PoundlistEntity> getTypeList(PoundlistPagination poundlistPagination,String dataType){
String userId=userProvider.get().getUserId(); String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList(); List<String> AllIdList =new ArrayList();
int total=0; int total=0;
int poundlistNum =0; int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>(); QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false; boolean pcPermission = false;
boolean appPermission = false; boolean appPermission = false;
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(),"poundlist")); Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){ if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj; poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++; poundlistNum++;
}
} }
} }
if(!isPc && appPermission){ }
if (!userProvider.get().getIsAdministrator()){ if(!isPc && appPermission){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist")); if (!userProvider.get().getIsAdministrator()){
if (ObjectUtil.isEmpty(poundlistObj)){ Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
return new ArrayList<>(); if (ObjectUtil.isEmpty(poundlistObj)){
} else { return new ArrayList<>();
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj; } else {
poundlistNum++; poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
} poundlistNum++;
}
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
poundlistNum++;
List<String> PoundDateList = poundlistPagination.getPoundDate();
Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
} }
}
if(StringUtil.isNotEmpty(poundlistPagination.getMaterialName())){ if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
poundlistNum++; poundlistNum++;
// poundlistQueryWrapper.lambda().like(PoundlistEntity::getMaterialName,poundlistPagination.getMaterialName()); poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
} }
if(AllIdList.size()>0){ if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList); poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
} }
//排序 //排序
if(StringUtil.isEmpty(poundlistPagination.getSidx())){ if(StringUtil.isEmpty(poundlistPagination.getSidx())){
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId); poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
}else{ }else{
try { try {
String sidx = poundlistPagination.getSidx(); String sidx = poundlistPagination.getSidx();
PoundlistEntity poundlistEntity = new PoundlistEntity(); PoundlistEntity poundlistEntity = new PoundlistEntity();
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); poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
e.printStackTrace(); e.printStackTrace();
} }

@ -498,6 +498,8 @@ public class TradeuploadController {
entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap)); entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>(); Map<String,Object> naturalIdMap = new HashMap<>();
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap)); entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap));
} }
List<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class); List<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class);
for(TradeuploadListVO tradeuploadVO:listVO){ for(TradeuploadListVO tradeuploadVO:listVO){
@ -586,6 +588,8 @@ public class TradeuploadController {
entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap)); entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>(); Map<String,Object> naturalIdMap = new HashMap<>();
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap)); entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","document_no",entity.getPurchaseId(),purchaseIdMap));
} }
List<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class); List<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class);
for(TradeuploadListVO tradeuploadVO:listVO){ for(TradeuploadListVO tradeuploadVO:listVO){
@ -770,6 +774,8 @@ public class TradeuploadController {
vo.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",vo.getBusinessId(),businessIdMap)); vo.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",vo.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>(); Map<String,Object> naturalIdMap = new HashMap<>();
vo.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",vo.getNaturalId(),naturalIdMap)); vo.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",vo.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","document_no",entity.getPurchaseId(),purchaseIdMap));
return ActionResult.success(vo); return ActionResult.success(vo);
} }
@ -799,9 +805,9 @@ public class TradeuploadController {
return ActionResult.fail("磅单重复"); return ActionResult.fail("磅单重复");
} }
tradeuploadService.update(id, subentity); tradeuploadService.update(id, subentity);
return ActionResult.success("更新成功"); return ActionResult.success("审核成功");
}else{ }else{
return ActionResult.fail("更新失败,数据不存在"); return ActionResult.fail("审核失败,数据不存在");
} }
} }

@ -133,8 +133,24 @@ public class TradeuploadCrForm {
/** 备注 **/ /** 备注 **/
@JsonProperty("vo") @JsonProperty("vo")
private UploaderVO vo; private UploaderVO vo;
/** 供应商id **/
@JsonProperty("supplierId")
private String supplierId;
/** 供应商名称 **/
@JsonProperty("supplierName")
private String supplierName;
/** 采购合同ID **/
@JsonProperty("purchaseId")
private String purchaseId;
/** 采购单价 **/
@JsonProperty("purchasePrice")
private String purchasePrice;
/** 是否审核 **/
@JsonProperty("isExamine")
private String isExamine;
} }

@ -108,4 +108,21 @@ public class TradeuploadInfoVO{
@JsonProperty("creatorTime") @JsonProperty("creatorTime")
private Date creatorTime; private Date creatorTime;
/** 供应商id **/
@JsonProperty("supplierId")
private String supplierId;
/** 供应商名称 **/
@JsonProperty("supplierName")
private String supplierName;
/** 采购合同ID **/
@JsonProperty("purchaseId")
private String purchaseId;
/** 采购单价 **/
@JsonProperty("purchasePrice")
private String purchasePrice;
/** 是否审核 **/
@JsonProperty("isExamine")
private String isExamine;
} }

@ -130,5 +130,22 @@ public class TradeuploadListVO{
@JsonProperty("creatorTime") @JsonProperty("creatorTime")
private Date creatorTime; private Date creatorTime;
/** 供应商id **/
@JsonProperty("supplierId")
private String supplierId;
/** 供应商名称 **/
@JsonProperty("supplierName")
private String supplierName;
/** 采购合同ID **/
@JsonProperty("purchaseId")
private String purchaseId;
/** 采购单价 **/
@JsonProperty("purchasePrice")
private String purchasePrice;
/** 是否审核 **/
@JsonProperty("isExamine")
private String isExamine;
} }

@ -127,5 +127,22 @@ public class TradeuploadUpForm{
@JsonProperty("creatorTime") @JsonProperty("creatorTime")
private String creatorTime; private String creatorTime;
/** 供应商id **/
@JsonProperty("supplierId")
private String supplierId;
/** 供应商名称 **/
@JsonProperty("supplierName")
private String supplierName;
/** 采购合同ID **/
@JsonProperty("purchaseId")
private String purchaseId;
/** 采购单价 **/
@JsonProperty("purchasePrice")
private String purchasePrice;
/** 是否审核 **/
@JsonProperty("isExamine")
private String isExamine;
} }

@ -2,77 +2,62 @@
<el-dialog title="详情" <el-dialog title="详情"
:close-on-click-modal="false" append-to-body :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px"> width="1000px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="物料编码" <el-form-item label="磅单上传"
prop="materialCode" > prop="poundPictures" >
<p>{{dataForm.materialCode}}</p> <JNPF-UploadImg v-model="dataForm.poundPictures"
disabled
detailed :fileSize="500" sizeUnit="MB" :limit="9" >
</JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="物料名称" <el-form-item label="物料名称"
prop="materialName" > prop="materialId" >
<p>{{dataForm.materialName}}</p> <p>{{dataForm.materialId}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="销售合同"
prop="salesName" >
<p>{{dataForm.salesName}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="客户名称" <el-form-item label="客户名称"
prop="customerName" > prop="customerId" >
<p>{{dataForm.customerName}}</p> <p>{{dataForm.customerId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="是否垫资" <el-form-item label="销售合同"
prop="advance" > prop="salesId" >
<p>{{ dataForm.advance | dynamicText(advanceOptions) }} </p> <p>{{dataForm.salesId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="销售价格" <el-form-item label="车牌号"
prop="salesPrice" > prop="vehicleId" >
<p>{{dataForm.salesPrice}}</p> <p>{{dataForm.vehicleId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="24" >
<el-form-item label="运输方式" <el-form-item label="车辆图片"
prop="transportType" > prop="vehiclePictures" >
<p>{{ dataForm.transportType | dynamicText(transportTypeOptions) }} </p> <JNPF-UploadImg v-model="dataForm.vehiclePictures"
</el-form-item> disabled
</el-col> detailed :fileSize="500" sizeUnit="MB" :limit="9" >
<el-col :span="12" > </JNPF-UploadImg>
<el-form-item label="运费"
prop="departmentId" >
<p>{{dataForm.departmentId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="车号" <el-form-item label="磅单日期"
prop="licenseNo" > prop="poundDate" >
<p>{{dataForm.licenseNo}}</p> <p>{{jnpf.dateFormat(dataForm.poundDate)}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="业务员名称" <el-form-item label="磅单号"
prop="businessName" > prop="poundlistNo" >
<p>{{dataForm.businessName}}</p> <p>{{dataForm.poundlistNo}}</p>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="磅单图片"
prop="poundPictures" >
<JNPF-UploadImg v-model="dataForm.poundPictures"
disabled
detailed :fileSize="500" sizeUnit="MB" :limit="9" >
</JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
@ -99,49 +84,58 @@
<p>{{dataForm.netWeight}}</p> <p>{{dataForm.netWeight}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="12" >
<el-form-item label="备注" <el-form-item label="单位"
prop="remark" > prop="unit" >
<p>{{dataForm.remark}}</p> <p>{{ dataForm.unit | dynamicText(unitOptions) }} </p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="12" >
<el-form-item label="司机名称" <el-form-item label="运输类型"
prop="driverName" > prop="transportType" >
<p>{{dataForm.driverName}}</p> <p>{{ dataForm.transportType | dynamicText(transportTypeOptions) }} </p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="12" >
<el-form-item label="车辆图片" <el-form-item label="是否垫资"
prop="vehiclePictures" > prop="advance" >
<JNPF-UploadImg v-model="dataForm.vehiclePictures" <p>{{ dataForm.advance | dynamicText(advanceOptions) }} </p>
disabled
detailed :fileSize="500" sizeUnit="MB" :limit="9" >
</JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="12" >
<el-form-item label="制单人" <el-form-item label="运费"
prop="creatorusername" > prop="transportPrice" >
<p>{{dataForm.creatorusername}}</p> <p>{{dataForm.transportPrice}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="供应商名称" <el-form-item label="销售价格"
prop="supplierName" > prop="salesPrice" >
<p>{{dataForm.supplierName}}</p> <p>{{dataForm.salesPrice}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="业务员"
prop="businessId" >
<p>{{dataForm.businessId}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="自然人"
prop="naturalId" >
<p>{{dataForm.naturalId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="采购合同" <el-form-item label="采购合同"
prop="purchaseName" > prop="purchaseId" >
<p>{{dataForm.purchaseName}}</p> <p>{{dataForm.purchaseId}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="单位" <el-form-item label="供应商名称"
prop="unit" > prop="supplierName" >
<p>{{ dataForm.unit | dynamicText(unitOptions) }} </p> <p>{{dataForm.supplierName}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
@ -181,9 +175,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="12" >
<el-form-item label="磅单日期" <el-form-item label="备注"
prop="poundDate" > prop="remark" >
<p>{{jnpf.dateFormat(dataForm.poundDate)}}</p> <p>{{dataForm.remark}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
@ -209,39 +203,38 @@
printId: '', printId: '',
dataForm: { dataForm: {
id :'', id :'',
materialCode : "",
materialName : '',
salesName : "",
customerName : '',
advance : "",
salesPrice : '',
transportType : "",
departmentId : 11.225,
licenseNo : "",
businessName : '',
poundPictures : [], poundPictures : [],
materialId : "",
customerId : "",
salesId : "",
vehicleId : "",
vehiclePictures : [],
poundDate : '',
poundlistNo : '',
tareWeight : '', tareWeight : '',
grossWeight : '', grossWeight : '',
buckleWeight : '', buckleWeight : '',
netWeight : '', netWeight : '',
remark : '',
driverName : '',
vehiclePictures : [],
creatorusername : '',
supplierName : '',
purchaseName : "",
unit : "", unit : "",
transportType : "0",
advance : "0",
transportPrice : '',
salesPrice : '',
businessId : "",
naturalId : "",
purchaseId : "",
supplierName : '',
settlement : '', settlement : '',
purchasePrice : '', purchasePrice : '',
inputDate : '', inputDate : '',
outputDate : '', outputDate : '',
payDate : '', payDate : '',
paymentDate : '', paymentDate : '',
poundDate : '', remark : '',
}, },
advanceOptions:[{"fullName":"是","id":"1"},{"fullName":"否","id":"0"}],
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
} }
}, },

File diff suppressed because it is too large Load Diff

@ -1,454 +1,373 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物料名称"> <el-form-item label="磅单日期">
<el-input v-model="query.materialName" placeholder="请输入" clearable> </el-input> <el-date-picker v-model="query.poundDate" type="daterange"
</el-form-item> value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期"
</el-col> end-placeholder="结束日期" >
<el-col :span="6"> </el-date-picker>
<el-form-item> </el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> </el-col>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-col :span="6">
</el-form-item> <el-form-item label="磅单号">
</el-col> <el-input v-model="query.poundlistNo" placeholder="请输入" clearable> </el-input>
</el-form> </el-form-item>
</el-row> </el-col>
<div class="JNPF-common-layout-main JNPF-flex-main"> <el-col :span="6">
<div class="JNPF-common-head"> <el-form-item>
<div> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-button> </el-form-item>
<el-button type="text" icon="el-icon-download" @click="exportData()"> </el-col>
</el-button> </el-form>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"> </el-row>
</el-button> <div class="JNPF-common-layout-main JNPF-flex-main">
<el-button type="text" icon="el-icon-check" @click="exportData()"> <div class="JNPF-common-head">
</el-button> <div>
<el-button type="text" icon="el-icon-close" @click="exportData()"> <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button>
</div> <el-button type="text" icon="el-icon-download" @click="exportData()" >导出
<div class="JNPF-common-head-right"> </el-button>
<el-tooltip effect="dark" content="刷新" placement="top"> <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" </el-button>
@click="reset()" /> </div>
</el-tooltip> <div class="JNPF-common-head-right">
<screenfull isContainer /> <el-tooltip effect="dark" content="刷新" placement="top">
</div> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
</div> @click="reset()"/>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" </el-tooltip>
@selection-change="handleSelectionChange" border> <screenfull isContainer/>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" /> </div>
<el-table-column prop="licenseNo" label="车号" fixed="left" sortable width="120" align="center" /> </div>
<el-table-column prop="customerName" label="客户名称" sortable width="150" align="center" /> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="salesName" label="销售合同" sortable width="150" align="center" /> <el-table-column prop="vehicleId" label="车牌号" width="0" align="left"
<el-table-column prop="supplierName" label="供应商名称" sortable width="150" align="center" /> />
<el-table-column prop="purchaseName" label="采购合同" sortable width="150" align="center" /> <el-table-column prop="customerId" label="客户" width="0" align="left"
<el-table-column prop="materialCode" label="物料编码" sortable width="150" align="center" /> />
<el-table-column prop="materialName" label="物料名称" sortable width="150" align="center" /> <el-table-column prop="salesId" label="销售合同" width="0" align="left"
<el-table-column prop="advance" label="是否垫资" sortable width="100" align="center" > />
<template slot-scope="scope"> <el-table-column prop="supplierName" label="供应商" width="0" align="left"
{{ scope.row.advance | dynamicText(advanceOptions) }} />
</template> <el-table-column prop="purchaseId" label="采购合同" width="0" align="left"
</el-table-column> />
<el-table-column prop="unit" label="单位" sortable width="100" align="center" > <el-table-column prop="materialId" label="物料名称" width="0" align="left"
<template slot-scope="scope"> />
{{ scope.row.unit | dynamicText(unitOptions) }} <el-table-column label="是否垫资" width="0" prop="advance" algin="left"
</template> >
</el-table-column> <template slot-scope="scope">
<el-table-column prop="grossWeight" sortable label="毛重" width="100" align="center" /> {{ scope.row.advance | dynamicText(advanceOptions) }}
<el-table-column prop="tareWeight" sortable label="皮重" width="100" align="center" /> </template>
<el-table-column prop="buckleWeight" sortable label="扣重" width="100" align="center" /> </el-table-column>
<el-table-column prop="netWeight" sortable label="净重" width="100" align="center" /> <el-table-column label="单位" width="0" prop="unit" algin="left"
<el-table-column prop="settlement" sortable label="结算重量" width="100" align="center" /> >
<el-table-column prop="purchasePrice" sortable label="采购单价" width="100" align="center" /> <template slot-scope="scope">
<el-table-column prop="salesPrice" sortable label="销售价格" width="100" align="center" /> {{ scope.row.unit | dynamicText(unitOptions) }}
<el-table-column prop="inputDate" sortable label="进项票日期" width="150" align="center" /> </template>
<el-table-column prop="outputDate" sortable label="销项票日期" width="150" align="center" /> </el-table-column>
<el-table-column prop="payDate" sortable label="付款日期" width="150" align="center" /> <el-table-column prop="grossWeight" label="毛重" width="0" align="left"
<el-table-column prop="paymentDate" sortable label="回款日期" width="150" align="center" /> />
<el-table-column prop="poundDate" sortable label="磅单日期" width="150" align="center" /> <el-table-column prop="tareWeight" label="皮重" width="0" align="left"
<el-table-column prop="businessName" sortable label="业务员" width="150" align="center" /> />
<el-table-column prop="remark" sortable label="备注" width="150" align="center" /> <el-table-column prop="buckleWeight" label="扣重" width="0" align="left"
<el-table-column prop="poundPictures" label="磅单图片" width="150" align="center"> />
<template slot-scope="scope"> <el-table-column prop="netWeight" label="净重" width="0" align="left"
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index"> />
<el-popover placement="bottom" trigger="click" width="1000"> <el-table-column prop="settlement" label="结算重量" width="0" align="left"
<img :src="`/dev${item.url}`" width="100%" /> />
<img <el-table-column prop="purchasePrice" label="采购单价" width="0" align="left"
slot="reference" />
:src="`/dev${item.url}`" <el-table-column prop="salesPrice" label="销售价格" width="0" align="left"
:alt="`/dev${item.url}`" />
style="max-height: 70px;max-width: 70px; padding: 5px" <el-table-column prop="inputDate" label="进项票日期" width="0" align="left"
/> />
</el-popover> <el-table-column prop="outputDate" label="销项票日期" width="0" align="left"
</span> />
</template> <el-table-column prop="payDate" label="付款日期" width="0" align="left"
</el-table-column> />
<el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center"> <el-table-column prop="paymentDate" label="回款日期" width="0" align="left"
<template slot-scope="scope"> />
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index"> <el-table-column prop="poundDate" label="磅单日期" width="0" align="left"
<el-popover placement="bottom" trigger="click" width="1000"> />
<img :src="`/dev${item.url}`" width="100%" /> <el-table-column prop="businessId" label="业务员" width="0" align="left"
<img />
slot="reference" <el-table-column prop="remark" label="备注" width="0" align="left"
:src="`/dev${item.url}`" />
:alt="`/dev${item.url}`" <el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
style="max-height: 70px;max-width: 70px; padding: 5px" <template slot-scope="scope">
/> <span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
</el-popover> <el-popover placement="bottom" trigger="click" width="1000">
</span> <img :src="`/dev${item.url}`" width="100%" />
</template> <img
</el-table-column> slot="reference"
<el-table-column label="操作" fixed="right" width="100" align="center"> :src="`/dev${item.url}`"
<template slot-scope="scope"> :alt="`/dev${item.url}`"
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)"> style="max-height: 70px;max-width: 70px; padding: 5px"
</el-button> />
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> </el-popover>
</el-button> </span>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> <el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <template slot-scope="scope">
@pagination="initData" /> <span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
</div> <el-popover placement="bottom" trigger="click" width="1000">
</div> <img :src="`/dev${item.url}`" width="100%" />
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <img
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> slot="reference"
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" /> :src="`/dev${item.url}`"
</div> :alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
<!-- <el-table-column prop="poundlistNo" label="磅单号" width="0" align="left"-->
<!--/>-->
<!-- <el-table-column label="运输类型" width="0" prop="transportType" algin="left"-->
<!--&gt;-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.transportType | dynamicText(transportTypeOptions) }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="transportPrice" label="运费" width="0" align="left"-->
<!--/>-->
<!-- <el-table-column prop="naturalId" label="自然人" width="0" align="left"-->
<!--/>-->
<el-table-column label="操作" fixed="right"
width="150" >
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
getDictionaryDataSelector import JNPFForm from './Form'
} from '@/api/systemData/dictionary' import ExportBox from './ExportBox'
import JNPFForm from './Form' import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import ExportBox from './ExportBox' import Detail from './Detail'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: { components: {JNPFForm, ExportBox,Detail},
JNPFForm, data() {
ExportBox, return {
Detail detailVisible: false,
}, query: {
data() { poundDate:undefined,
return { poundlistNo:undefined,
detailVisible: false, },
query: { treeProps: {
materialName: undefined, children: 'children',
}, label: 'fullName',
treeProps: { value: 'id'
children: 'children', },
label: 'fullName', list: [],
value: 'id' listLoading: true,
}, multipleSelection: [], total: 0,
list: [], listQuery: {
listLoading: true, currentPage: 1,
multipleSelection: [], pageSize: 20,
total: 0, sort: "desc",
listQuery: { sidx: "",
currentPage: 1, },
pageSize: 20, formVisible: false,
sort: "desc", exportBoxVisible: false,
sidx: "", columnList: [
}, {prop: 'vehicleId', label: '车牌号'},
formVisible: false, {prop: 'customerId', label: '客户名称'},
exportBoxVisible: false, {prop: 'salesId', label: '销售合同'},
columnList: [{ {prop: 'supplierName', label: '供应商名称'},
prop: 'licenseNo', {prop: 'purchaseId', label: '采购合同'},
label: '车号' {prop: 'materialId', label: '物料名称'},
}, {prop: 'advance', label: '是否垫资'},
{ {prop: 'unit', label: '单位'},
prop: 'customerName', {prop: 'grossWeight', label: '毛重'},
label: '客户名称' {prop: 'tareWeight', label: '皮重'},
}, {prop: 'buckleWeight', label: '扣重'},
{ {prop: 'netWeight', label: '净重'},
prop: 'salesName', {prop: 'settlement', label: '结算重量'},
label: '销售合同' {prop: 'purchasePrice', label: '采购单价'},
}, {prop: 'salesPrice', label: '销售价格'},
{ {prop: 'inputDate', label: '进项票日期'},
prop: 'supplierName', {prop: 'outputDate', label: '销项票日期'},
label: '供应商名称' {prop: 'payDate', label: '付款日期'},
}, {prop: 'paymentDate', label: '回款日期'},
{ {prop: 'poundDate', label: '磅单日期'},
prop: 'purchaseName', {prop: 'businessId', label: '业务员'},
label: '采购合同' {prop: 'remark', label: '备注'},
}, {prop: 'poundlistNo', label: '磅单号'},
{ {prop: 'transportType', label: '运输类型'},
prop: 'materialCode', {prop: 'transportPrice', label: '运费'},
label: '物料编码' {prop: 'naturalId', label: '自然人'},
}, ],
{ unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
prop: 'materialName', unitProps:{"label":"fullName","value":"id"},
label: '物料名称' transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
}, transportTypeProps:{"label":"fullName","value":"id"},
{ advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
prop: 'advance', advanceProps:{"label":"fullName","value":"id"},
label: '是否垫资' }
}, },
{ computed: {
prop: 'unit', menuId() {
label: '单位' return this.$route.meta.modelId || ''
}, }
{ },
prop: 'grossWeight', created() {
label: '毛重' this.initData()
}, },
{ methods: {
prop: 'tareWeight', goDetail(id){
label: '皮重' this.detailVisible = true
}, this.$nextTick(() => {
{ this.$refs.Detail.init(id)
prop: 'buckleWeight', })
label: '扣重' },
}, sortChange({column, prop, order}) {
{ this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
prop: 'netWeight', this.listQuery.sidx = !order ? '' : prop
label: '净重' this.initData()
}, },
{ initData() {
prop: 'settlement', this.listLoading = true;
label: '结算重量' let _query = {
}, ...this.listQuery,
{ ...this.query,
prop: 'purchasePrice', menuId:this.menuId
label: '采购单价' };
}, request({
{ url: `/api/poundlist/Poundlist/getList`,
prop: 'salesPrice', method: 'post',
label: '销售价格' data: _query
}, }).then(res => {
{ var _list =[];
prop: 'inputDate', for(let i=0;i<res.data.list.length;i++){
label: '进项票日期' let _data = res.data.list[i];
}, _list.push(_data)
{ }
prop: 'outputDate', this.list = _list
label: '销项票日期' this.total = res.data.pagination.total
},
{
prop: 'payDate',
label: '付款日期'
},
{
prop: 'paymentDate',
label: '回款日期'
},
{
prop: 'poundDate',
label: '磅单日期'
},
{
prop: 'businessName',
label: '业务员名称'
},
{
prop: 'remark',
label: '备注'
},
],
advanceOptions: [{
"fullName": "是",
"id": "1"
}, {
"fullName": "否",
"id": "0"
}],
advanceProps: {
"label": "fullName",
"value": "id"
},
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
transportTypeProps: {
"label": "fullName",
"value": "id"
},
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
unitProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
};
request({
url: `/api/poundlist/Poundlist/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].inputDate = res.data.list[i].inputDate ? res.data.list[i].inputDate.substring(0,
10) : '';
res.data.list[i].outputDate = res.data.list[i].outputDate ? res.data.list[i].outputDate
.substring(0, 10) : '';
res.data.list[i].payDate = res.data.list[i].payDate ? res.data.list[i].payDate
.substring(0, 10) : '';
res.data.list[i].paymentDate = res.data.list[i].paymentDate ? res.data.list[i].paymentDate
.substring(0, 10) : '';
res.data.list[i].poundDate = res.data.list[i].poundDate ? res.data.list[i].poundDate
.substring(0, 10) : '';
let _data = res.data.list[i];
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false this.listLoading = false
}) })
}, },
handleDel(id) { handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/poundlist/Poundlist/${id}`, url: `/api/poundlist/Poundlist/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); });
}) })
}).catch(() => {}); }).catch(() => {
}, });
handleSelectionChange(val) { },
const res = val.map(item => item.id) handleSelectionChange(val) {
this.multipleSelection = res const res = val.map(item => item.id)
}, this.multipleSelection = res
handleBatchRemoveDel() { },
if (!this.multipleSelection.length) { handleBatchRemoveDel() {
this.$message({ if (!this.multipleSelection.length) {
type: 'error', this.$message({
message: '请选择一条数据', type: 'error',
duration: 1500, message: '请选择一条数据',
}) duration: 1500,
return })
} return
const ids = this.multipleSelection.join() }
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { const ids = this.multipleSelection.join()
type: 'warning' this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
}).then(() => { type: 'warning'
request({ }).then(() => {
url: `/api/poundlist/Poundlist/batchRemove/${ids}`, request({
method: 'DELETE' url: `/api/poundlist/Poundlist/batchRemove/${ids}`,
}).then(res => { method: 'DELETE'
this.$message({ }).then(res => {
type: 'success', this.$message({
message: res.msg, type: 'success',
onClose: () => { message: res.msg,
this.initData() onClose: () => {
} this.initData()
}); }
}) });
}).catch(() => {}) })
}, }).catch(() => {
addOrUpdateHandle(id, isDetail) { })
this.formVisible = true },
this.$nextTick(() => { addOrUpdateHandle(id, isDetail) {
this.$refs.JNPFForm.init(id, isDetail) this.formVisible = true
}) this.$nextTick(() => {
}, this.$refs.JNPFForm.init(id, isDetail)
exportData() { })
this.exportBoxVisible = true },
this.$nextTick(() => { exportData() {
this.$refs.ExportBox.init(this.columnList) this.exportBoxVisible = true
}) this.$nextTick(() => {
}, this.$refs.ExportBox.init(this.columnList)
download(data) { })
let query = { },
...data, download(data) {
...this.listQuery, let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
...this.query, request({
menuId: this.menuId url: `/api/poundlist/Poundlist/Actions/Export`,
} method: 'GET',
request({ data: query
url: `/api/poundlist/Poundlist/Actions/Export`, }).then(res => {
method: 'GET', if (!res.data.url) return
data: query this.jnpf.downloadFile(res.data.url)
}).then(res => { this.$refs.ExportBox.visible = false
if (!res.data.url) return this.exportBoxVisible = false
this.jnpf.downloadFile(res.data.url) })
this.$refs.ExportBox.visible = false },
this.exportBoxVisible = false search() {
}) this.listQuery = {
}, currentPage: 1,
search() { pageSize: 20,
this.listQuery = { sort: "desc",
currentPage: 1, sidx: "",
pageSize: 20, }
sort: "desc", this.initData()
sidx: "", },
} refresh(isrRefresh) {
this.initData() this.formVisible = false
}, if (isrRefresh) this.reset()
refresh(isrRefresh) { },
this.formVisible = false reset() {
if (isrRefresh) this.reset() for (let key in this.query) {
}, this.query[key] = undefined
reset() { }
for (let key in this.query) { this.search()
this.query[key] = undefined }
} }
this.search() }
}
}
}
</script> </script>

@ -44,22 +44,26 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="供应商" prop="supplierId"> <el-form-item label="供应商" prop="supplierName">
<popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId" <!-- <popupSelect v-model="dataForm.supplierId" placeholder="请选择供应商" clearable field="supplierId"-->
interfaceId="395936123471343749" :columnOptions="supplierIdcolumnOptions" propsValue="id" <!-- interfaceId="395936123471343749" :columnOptions="supplierIdcolumnOptions" 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 >-->
</popupSelect>
<!-- </popupSelect>-->
<el-input v-model="dataForm.supplierName" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="采购合同" prop="salesId"> <el-form-item label="采购合同" prop="purchaseId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" interfaceId="397408984857931205" :columnOptions="purchaseIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.supplierId" relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
hasPage :pageSize="20"> hasPage :pageSize="20" @change="purchaseSelect">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -189,7 +193,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
<el-button type="primary" @click="continueUpload()"> </el-button> <!-- <el-button type="primary" @click="continueUpload()"> </el-button>-->
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -240,6 +244,9 @@
naturalId: "", naturalId: "",
remark: '', remark: '',
creatorTime: "", creatorTime: "",
purchaseId: "",
supplierName: "",
isExamine: "",
}, },
rules: { rules: {
materialId: [{ materialId: [{
@ -354,6 +361,15 @@
"label": "供应商名称", "label": "供应商名称",
"value": "supplier_name" "value": "supplier_name"
}], }],
purchaseIdcolumnOptions:[ {"label":"合同编码","value":"contract_code"},
{"label":"合同名称",
"value":"contract_name"},
{"label":"合同类型",
"value":"contract_type"},
{"label":"供应商ID",
"value":"code"},
{"label":"供应商名称",
"value":"name"},],
salesIdcolumnOptions: [{ salesIdcolumnOptions: [{
"label": "合同编码", "label": "合同编码",
"value": "contract_code" "value": "contract_code"
@ -438,6 +454,10 @@
advanceChange(e){ advanceChange(e){
this.dataForm.advance = e; this.dataForm.advance = e;
}, },
purchaseSelect(j,k){
this.dataForm.supplierName = k.name;
this.dataForm.supplierId = k.code;
},
customerSelect(e, d) { customerSelect(e, d) {
const query = { const query = {
code: d.id code: d.id
@ -564,6 +584,7 @@
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0; this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0; this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0; this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
this.dataForm.isExamine = 1;
if(grossWeight < tareWeight + buckleWeight + netWeight){ if(grossWeight < tareWeight + buckleWeight + netWeight){
this.$message({ this.$message({
message: '毛重不得小于皮重+扣重+净重', message: '毛重不得小于皮重+扣重+净重',
@ -596,7 +617,6 @@
}, },
request2() { request2() {
var _data = this.dataList() var _data = this.dataList()
debugger
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/tradeupload/Tradeupload', url: '/api/tradeupload/Tradeupload',

@ -140,7 +140,7 @@
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<JNPF-Form v-if="formVisible2" ref="JNPFForm2" @refresh="refresh2"/> <JNPF-Form2 v-if="formVisible2" ref="JNPFForm2" @refresh="refresh2"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div> </div>
@ -315,6 +315,7 @@
this.formVisible2 = true this.formVisible2 = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm2.init(id, isDetail) this.$refs.JNPFForm2.init(id, isDetail)
debugger
}) })
}, },
exportData() { exportData() {

Loading…
Cancel
Save