修改磅单列表

product
杨世强 2 years ago
parent d2c1dc1d26
commit 2107379337

@ -52,7 +52,7 @@ import jnpf.util.enums.FileTypeEnum;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-05
* @ 2023-02-21
*/
@Slf4j
@RestController
@ -81,22 +81,27 @@ public class PoundlistController {
* @param poundlistPagination
* @return
*/
@ApiOperation("列表")
@PostMapping("/getList")
public ActionResult list(@RequestBody PoundlistPagination poundlistPagination)throws IOException{
List<PoundlistEntity> list= poundlistService.getList(poundlistPagination);
//处理id字段转名称若无需转或者为空可删除
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()));
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()));
Map<String,Object> purchaseNameMap = new HashMap<>();
// entity.setPurchaseName(generaterSwapUtil.swapRelationFormValue("selectField121",entity.getPurchaseName(),"294090217084722181",purchaseNameMap));
Map<String,Object> businessIdMap = new HashMap<>();
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);
for(PoundlistListVO poundlistVO:listVO){
@ -165,16 +170,22 @@ public class PoundlistController {
List<PoundlistEntity> list= poundlistService.getTypeList(poundlistPagination,poundlistPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除
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()));
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()));
Map<String,Object> purchaseNameMap = new HashMap<>();
// entity.setPurchaseName(generaterSwapUtil.swapRelationFormValue("selectField121",entity.getPurchaseName(),"294090217084722181",purchaseNameMap));
Map<String,Object> businessIdMap = new HashMap<>();
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);
for(PoundlistListVO poundlistVO:listVO){
@ -194,38 +205,29 @@ public class PoundlistController {
if(keys.length>0){
for(String key:keys){
switch(key){
case "materialCode" :
entitys.add(new ExcelExportEntity("物料编码" ,"materialCode"));
break;
case "materialName" :
entitys.add(new ExcelExportEntity("物料名称" ,"materialName"));
case "poundPictures" :
entitys.add(new ExcelExportEntity("磅单上传" ,"poundPictures"));
break;
case "salesName" :
entitys.add(new ExcelExportEntity("销售合同" ,"salesName"));
case "materialId" :
entitys.add(new ExcelExportEntity("物料名称" ,"materialId"));
break;
case "customerName" :
entitys.add(new ExcelExportEntity("客户名称" ,"customerName"));
case "customerId" :
entitys.add(new ExcelExportEntity("客户名称" ,"customerId"));
break;
case "advance" :
entitys.add(new ExcelExportEntity("是否垫资" ,"advance"));
case "salesId" :
entitys.add(new ExcelExportEntity("销售合同" ,"salesId"));
break;
case "salesPrice" :
entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice"));
case "vehicleId" :
entitys.add(new ExcelExportEntity("车牌号" ,"vehicleId"));
break;
case "transportType" :
entitys.add(new ExcelExportEntity("运输方式" ,"transportType"));
break;
case "departmentId" :
entitys.add(new ExcelExportEntity("运费" ,"departmentId"));
break;
case "licenseNo" :
entitys.add(new ExcelExportEntity("车号" ,"licenseNo"));
case "vehiclePictures" :
entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures"));
break;
case "businessName" :
entitys.add(new ExcelExportEntity("业务员名称" ,"businessName"));
case "poundDate" :
entitys.add(new ExcelExportEntity("磅单日期" ,"poundDate"));
break;
case "poundPictures" :
entitys.add(new ExcelExportEntity("磅单图片" ,"poundPictures"));
case "poundlistNo" :
entitys.add(new ExcelExportEntity("磅单号" ,"poundlistNo"));
break;
case "tareWeight" :
entitys.add(new ExcelExportEntity("皮重" ,"tareWeight"));
@ -239,26 +241,32 @@ public class PoundlistController {
case "netWeight" :
entitys.add(new ExcelExportEntity("净重" ,"netWeight"));
break;
case "remark" :
entitys.add(new ExcelExportEntity("备注" ,"remark"));
case "unit" :
entitys.add(new ExcelExportEntity("单位" ,"unit"));
break;
case "driverName" :
entitys.add(new ExcelExportEntity("司机名称" ,"driverName"));
case "transportType" :
entitys.add(new ExcelExportEntity("运输类型" ,"transportType"));
break;
case "vehiclePictures" :
entitys.add(new ExcelExportEntity("车辆图片" ,"vehiclePictures"));
case "advance" :
entitys.add(new ExcelExportEntity("是否垫资" ,"advance"));
break;
case "creatorusername" :
entitys.add(new ExcelExportEntity("制单人" ,"creatorusername"));
case "transportPrice" :
entitys.add(new ExcelExportEntity("运费" ,"transportPrice"));
break;
case "supplierName" :
entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName"));
case "salesPrice" :
entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice"));
break;
case "purchaseName" :
entitys.add(new ExcelExportEntity("采购合同" ,"purchaseName"));
case "businessId" :
entitys.add(new ExcelExportEntity("业务员" ,"businessId"));
break;
case "unit" :
entitys.add(new ExcelExportEntity("单位" ,"unit"));
case "naturalId" :
entitys.add(new ExcelExportEntity("自然人" ,"naturalId"));
break;
case "purchaseId" :
entitys.add(new ExcelExportEntity("采购合同" ,"purchaseId"));
break;
case "supplierName" :
entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName"));
break;
case "settlement" :
entitys.add(new ExcelExportEntity("结算重量" ,"settlement"));
@ -278,8 +286,8 @@ public class PoundlistController {
case "paymentDate" :
entitys.add(new ExcelExportEntity("回款日期" ,"paymentDate"));
break;
case "poundDate" :
entitys.add(new ExcelExportEntity("磅单日期" ,"poundDate"));
case "remark" :
entitys.add(new ExcelExportEntity("备注" ,"remark"));
break;
default:
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()));
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()));
Map<String,Object> purchaseNameMap = new HashMap<>();
vo.setPurchaseName(generaterSwapUtil.swapRelationFormValue("selectField121",vo.getPurchaseName(),"294090217084722181",purchaseNameMap));
Map<String,Object> businessIdMap = new HashMap<>();
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);
}
@ -427,4 +441,9 @@ public class PoundlistController {
}

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

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

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

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

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

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

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

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

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

@ -38,7 +38,7 @@ import java.util.*;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-05
* 2023-02-21
*/
@Service
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();
List<String> AllIdList =new ArrayList();
int total=0;
int poundlistNum =0;
int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1");
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
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())){
poundlistNum++;
// poundlistQueryWrapper.lambda().like(PoundlistEntity::getMaterialName,poundlistPagination.getMaterialName());
}
if(StringUtil.isNotEmpty(poundlistPagination.getKeyword())){
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
poundlistNum++;
poundlistQueryWrapper.lambda().and(wq -> {
// 拼接sql
wq.like(PoundlistEntity::getSupplierName,poundlistPagination.getKeyword())
.or();
// .like(PoundlistEntity::getCustomerName,poundlistPagination.getKeyword())
// .or()
// .like(PoundlistEntity::getLicenseNo,poundlistPagination.getKeyword());
});
}
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
}
if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(poundlistPagination.getSidx())){
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
}else{
try {
String sidx = poundlistPagination.getSidx();
@ -122,9 +124,9 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> userIPage=this.page(page, poundlistQueryWrapper);
return poundlistPagination.setData(userIPage.getRecords(),userIPage.getTotal());
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> userIPage=this.page(page, poundlistQueryWrapper);
return poundlistPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<PoundlistEntity> list = new ArrayList();
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){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int poundlistNum =0;
int total=0;
int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist"));
if (ObjectUtil.isEmpty(poundlistObj)){
return new ArrayList<>();
} else {
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());
}
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
}
if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
}
if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(poundlistPagination.getSidx())){
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
}else{
try {
String sidx = poundlistPagination.getSidx();
String sidx = poundlistPagination.getSidx();
PoundlistEntity poundlistEntity = new PoundlistEntity();
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}

@ -498,6 +498,8 @@ public class TradeuploadController {
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<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class);
for(TradeuploadListVO tradeuploadVO:listVO){
@ -586,6 +588,8 @@ public class TradeuploadController {
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","document_no",entity.getPurchaseId(),purchaseIdMap));
}
List<TradeuploadListVO> listVO=JsonUtil.getJsonToList(list,TradeuploadListVO.class);
for(TradeuploadListVO tradeuploadVO:listVO){
@ -770,6 +774,8 @@ public class TradeuploadController {
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<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","document_no",entity.getPurchaseId(),purchaseIdMap));
return ActionResult.success(vo);
}
@ -799,9 +805,9 @@ public class TradeuploadController {
return ActionResult.fail("磅单重复");
}
tradeuploadService.update(id, subentity);
return ActionResult.success("更新成功");
return ActionResult.success("审核成功");
}else{
return ActionResult.fail("更新失败,数据不存在");
return ActionResult.fail("审核失败,数据不存在");
}
}

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

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

@ -140,7 +140,7 @@
</div>
</div>
<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"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
@ -315,6 +315,7 @@
this.formVisible2 = true
this.$nextTick(() => {
this.$refs.JNPFForm2.init(id, isDetail)
debugger
})
},
exportData() {

Loading…
Cancel
Save