修改磅单列表

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{
@ -61,6 +61,7 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
int total=0; int total=0;
int poundlistNum =0; int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>(); QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1");
boolean pcPermission = 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");
@ -88,21 +89,22 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
} }
if(StringUtil.isNotEmpty(poundlistPagination.getMaterialName())){ if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
poundlistNum++; poundlistNum++;
// poundlistQueryWrapper.lambda().like(PoundlistEntity::getMaterialName,poundlistPagination.getMaterialName()); 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.getKeyword())){
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
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);
} }
@ -164,9 +166,20 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
} }
if(StringUtil.isNotEmpty(poundlistPagination.getMaterialName())){ 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.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){

@ -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"}],
} }
}, },

@ -1,232 +1,282 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1200px"> :close-on-click-modal="false" append-to-body
<el-row :gutter="15" class=""> :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right"> width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading"> <template v-if="!loading">
<el-col :span="12"> <el-col :span="24" >
<el-form-item label="物料编码" prop="materialCode"> <el-form-item label="磅单上传"
<popup-select v-model="dataForm.materialCode" placeholder="请选择" clearable field="materialCode" prop="poundPictures" >
interfaceId="381037852907038533" :columnOptions="materialCodecolumnOptions" propsValue="item_code" <el-upload class="avatar-uploader" :action="action" :show-file-list="false"
relationField="item_code" popupType="dialog" popupTitle="选择数据" popupWidth="800px"> :on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
</popup-select> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-form-item> </el-upload>
</el-col>
<el-col :span="12">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="dataForm.materialName" 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="salesName"> <el-form-item label="物料名称"
<popup-select v-model="dataForm.salesName" placeholder="请选择" clearable field="salesName" prop="materialId" >
interfaceId="381038993740949317" :columnOptions="salesNamecolumnOptions" propsValue="contract_name" <popupSelect v-model="dataForm.materialId"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"> placeholder="请选择物料编码" clearable field="materialId" interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
</popup-select> >
</el-form-item> </popupSelect>
</el-col>
<el-col :span="12">
<el-form-item label="客户名称" prop="customerName">
<el-input v-model="dataForm.customerName" 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="advance"> <el-form-item label="客户名称"
<el-select v-model="dataForm.advance" placeholder="请选择" clearable :style='{"width":"100%"}'> prop="customerId" >
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" <popupSelect v-model="dataForm.customerId"
:disabled="item.disabled"></el-option> placeholder="请选择客户名称" clearable field="customerId" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
>
</el-select> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="销售价格" prop="salesPrice"> <el-form-item label="销售合同"
<el-input-number v-model="dataForm.salesPrice" placeholder="数字文本" :step="1"> prop="salesId" >
<popupSelect v-model="dataForm.salesId"
placeholder="请选择销售合同" clearable field="salesId" interfaceId="381038993740949317" :columnOptions="salesIdcolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
>
</el-input-number> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="运输方式" prop="transportType"> <el-form-item label="车牌号"
<el-select v-model="dataForm.transportType" placeholder="请选择" clearable :style='{"width":"100%"}'> prop="vehicleId" >
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName" <popupSelect v-model="dataForm.vehicleId"
:value="item.id" :disabled="item.disabled"></el-option> placeholder="请选择" clearable field="vehicleId" interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog"
popupTitle="选择数据" popupWidth="800px" @change="changePicture"
>
</el-select> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="24" >
<el-form-item label="运费" prop="departmentId"> <el-form-item label="车辆图片"
<el-input-number v-model="dataForm.departmentId" placeholder="数字文本" :step="1"> prop="vehiclePictures" >
<JNPF-UploadImg v-model="dataForm.vehiclePictures"
:fileSize="500" sizeUnit="MB" :limit="9" >
</el-input-number> </JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="车号" prop="licenseNo"> <el-form-item label="磅单日期"
<popupSelect v-model="dataForm.licenseNo" placeholder="请选择" clearable field="licenseNo" prop="poundDate" >
interfaceId="381432451370615173" :columnOptions="licenseNocolumnOptions" propsValue="ticketno" <el-date-picker v-model="dataForm.poundDate"
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px"> placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</popupSelect> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="业务员名称" prop="businessName"> <el-form-item label="磅单号"
<el-input v-model="dataForm.businessName" placeholder="请输入" clearable :style='{"width":"100%"}'> prop="poundlistNo" >
<el-input v-model="dataForm.poundlistNo"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12" >
<el-form-item label="磅单图片" prop="poundPictures"> <el-form-item label="皮重"
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9"> prop="tareWeight" >
<el-input-number v-model="dataForm.tareWeight"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
</JNPF-UploadImg> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="皮重" prop="tareWeight"> <el-form-item label="毛重"
<el-input-number v-model="dataForm.tareWeight" placeholder="数字文本" :step="1"> prop="grossWeight" >
<el-input-number v-model="dataForm.grossWeight"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="毛重" prop="grossWeight"> <el-form-item label="扣重"
<el-input-number v-model="dataForm.grossWeight" placeholder="数字文本" :step="1"> prop="buckleWeight" >
<el-input-number v-model="dataForm.buckleWeight"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="扣重" prop="buckleWeight"> <el-form-item label="净重"
<el-input-number v-model="dataForm.buckleWeight" placeholder="数字文本" :step="1"> prop="netWeight" >
<el-input-number v-model="dataForm.netWeight"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="净重" prop="netWeight"> <el-form-item label="单位"
<el-input-number v-model="dataForm.netWeight" placeholder="数字文本" :step="1"> prop="unit" >
<el-select v-model="dataForm.unit"
placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-input-number> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12" >
<el-form-item label="备注" prop="remark"> <el-form-item label="运输类型"
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'> prop="transportType" >
<el-select v-model="dataForm.transportType"
placeholder="请选择" clearable :style='{"width":"100%"}' @change="transportTypeChange">
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-input> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12" >
<el-form-item label="司机名称" prop="driverName"> <el-form-item label="是否垫资"
<el-input v-model="dataForm.driverName" placeholder="请输入" clearable :style='{"width":"100%"}'> prop="advance" >
<el-select v-model="dataForm.advance"
placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-input> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12" >
<el-form-item label="车辆图片" prop="vehiclePictures"> <el-form-item label="运费"
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9"> prop="transportPrice" >
<el-input-number v-model="dataForm.transportPrice"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
</JNPF-UploadImg> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12" >
<el-form-item label="制单人" prop="creatorusername"> <el-form-item label="销售价格"
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable :style='{"width":"100%"}'> prop="salesPrice" >
<el-input-number v-model="dataForm.salesPrice"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
</el-input> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="供应商名称" prop="supplierName"> <el-form-item label="业务员"
<el-input v-model="dataForm.supplierName" placeholder="请输入" clearable :style='{"width":"100%"}'> prop="businessId" >
<popupSelect v-model="dataForm.businessId"
placeholder="请选择" clearable field="businessId" interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="businessIdcolumnOptions" propsValue="F_Id" relationField="F_RealName" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
>
</el-input> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="采购合同" prop="purchaseName"> <el-form-item label="自然人"
<relationForm v-model="dataForm.purchaseName" placeholder="请选择" clearable field="purchaseName" prop="naturalId" >
modelId="294090217084722181" :columnOptions="purchaseNamecolumnOptions" relationField="selectField121"> <popupSelect v-model="dataForm.naturalId"
placeholder="请选择" clearable field="naturalId" interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
>
</relationForm> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="单位" prop="unit"> <el-form-item label="采购合同"
<el-select v-model="dataForm.unit" placeholder="请选择" clearable :style='{"width":"100%"}'> prop="purchaseId" >
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" <popupSelect v-model="dataForm.purchaseId"
:disabled="item.disabled"></el-option> placeholder="请选择" clearable field="purchaseId" interfaceId="397408984857931205" :columnOptions="purchaseIdcolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px" @change="purchaseSelect"
>
</el-select> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="结算重量" prop="settlement"> <el-form-item label="供应商名称"
<el-input v-model="dataForm.settlement" placeholder="请输入" clearable :style='{"width":"100%"}'> prop="supplierName" >
<el-input v-model="dataForm.supplierName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </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="purchasePrice"> <el-form-item label="结算重量"
<el-input v-model="dataForm.purchasePrice" placeholder="请输入" clearable :style='{"width":"100%"}'> prop="settlement" >
<el-input v-model="dataForm.settlement"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </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="inputDate"> <el-form-item label="采购单价"
<el-date-picker v-model="dataForm.inputDate" placeholder="请选择" clearable :style='{"width":"100%"}' prop="purchasePrice" >
type="datetime" format="yyyy-MM-dd" value-format="timestamp"> <el-input-number v-model="dataForm.purchasePrice"
placeholder="请输入" :step="1" :style='{"width":"100%"}'>
</el-date-picker> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="销项票日期" prop="outputDate"> <el-form-item label="进项票日期"
<el-date-picker v-model="dataForm.outputDate" placeholder="请选择" clearable :style='{"width":"100%"}' prop="inputDate" >
type="datetime" format="yyyy-MM-dd" value-format="timestamp"> <el-date-picker v-model="dataForm.inputDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="付款日期" prop="payDate"> <el-form-item label="销项票日期"
<el-date-picker v-model="dataForm.payDate" placeholder="请选择" clearable :style='{"width":"100%"}' prop="outputDate" >
type="datetime" format="yyyy-MM-dd" value-format="timestamp"> <el-date-picker v-model="dataForm.outputDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="回款日期" prop="paymentDate"> <el-form-item label="付款日期"
<el-date-picker v-model="dataForm.paymentDate" placeholder="请选择" clearable :style='{"width":"100%"}' prop="payDate" >
type="datetime" format="yyyy-MM-dd" value-format="timestamp"> <el-date-picker v-model="dataForm.payDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" >
<el-form-item label="磅单日期" prop="poundDate"> <el-form-item label="回款日期"
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}' prop="paymentDate" >
type="datetime" format="yyyy-MM-dd" value-format="timestamp"> <el-date-picker v-model="dataForm.paymentDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" >
<el-form-item label="备注"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
</template> </template>
</el-form> </el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
@ -236,189 +286,210 @@
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
getDataInterfaceRes import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default { export default {
components: {}, components: {},
props: [], props: [],
data() { data() {
return { return {
unit: "0",
transportType: "0",
advance: "0",
action: this.define.APIURl + '/api/tradeupload/Tradeupload/UploaderPondList/annexpic',
imageUrl: '',
visible: false, visible: false,
loading: false, loading: false,
isDetail: false, isDetail: false,
dataForm: { dataForm: {
materialCode: "", poundPictures : [],
materialName: '', materialId : "",
salesName: "", customerId : "",
customerName: '', salesId : "",
advance: "", vehicleId : "",
salesPrice: '', vehiclePictures : [],
transportType: "", poundDate : '',
departmentId: 11.225, poundlistNo : '',
licenseNo: "", tareWeight : 0,
businessName: '', grossWeight : 0,
poundPictures: [], buckleWeight : 0,
tareWeight: '', netWeight : 0,
grossWeight: '', unit : "0",
buckleWeight: '', transportType : "0",
netWeight: '', advance : "0",
remark: '', transportPrice : 0,
driverName: '', salesPrice : 0,
vehiclePictures: [], businessId : "",
creatorusername: '', naturalId : "",
supplierName: '', purchaseId : "",
purchaseName: "", supplierName : '',
unit: "", settlement : '',
settlement: '', purchasePrice : 0,
purchasePrice: '', inputDate : '',
inputDate: '', outputDate : '',
outputDate: '', payDate : '',
payDate: '', paymentDate : '',
paymentDate: '', remark : '',
poundDate: '', },
}, rules:
rules: { {
materialCode: [{ // poundPictures: [
// {
// required: true,
// message: '',
// trigger: 'click'
// },
// ],
materialId: [
{
required: true, required: true,
message: '请选择', message: '请选择物料编码',
trigger: 'change' trigger: 'change'
}, ], },
salesName: [{ ],
customerId: [
{
required: true, required: true,
message: '请选择', message: '请选择客户名称',
trigger: 'change' trigger: 'change'
}, ], },
licenseNo: [{ ],
salesId: [
{
required: true, required: true,
message: '请选择', message: '请选择销售合同',
trigger: 'change' trigger: 'change'
}, ],
poundPictures: [{
required: true,
message: '请至少选择一个',
trigger: 'click'
}, ],
tareWeight: [{
required: true,
message: '数字文本',
trigger: ["blur", "change"]
}, ],
grossWeight: [{
required: true,
message: '数字文本',
trigger: ["blur", "change"]
}, ],
buckleWeight: [{
required: true,
message: '数字文本',
trigger: ["blur", "change"]
}, ],
netWeight: [{
required: true,
message: '数字文本',
trigger: ["blur", "change"]
}, ],
},
materialCodecolumnOptions: [{
"label": "物料编码",
"value": "item_code"
}, },
],
vehicleId: [
{ {
"label": "物料名称", required: true,
"value": "description" message: '请选择',
trigger: 'change'
}, },
],
vehiclePictures: [
{ {
"label": "库存组织", required: true,
"value": "organization_id" message: '请至少选择一个',
trigger: 'click'
}, },
],
poundDate: [
{ {
"label": "默认库区", required: true,
"value": "areaname" message: '请选择',
trigger: 'change'
}, },
], ],
salesNamecolumnOptions: [{ poundlistNo: [
"label": "合同编码",
"value": "contract_code"
},
{ {
"label": "合同名称", required: true,
"value": "contract_name" message: '请输入',
trigger: 'blur'
}, },
],
tareWeight: [
{ {
"label": "合同类型", required: true,
"value": "contract_type" message: '数字文本',
trigger: ["blur","change"]
}, },
],
grossWeight: [
{ {
"label": "供应商/客户名称", required: true,
"value": "name" message: '数字文本',
trigger: ["blur","change"]
}, },
], ],
advanceOptions: [{ buckleWeight: [
"fullName": "是",
"id": "1"
}, {
"fullName": "否",
"id": "0"
}],
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
licenseNocolumnOptions: [{
"label": "车牌号",
"value": "ticketno"
},
{ {
"label": "司机", required: true,
"value": "drivername" message: '数字文本',
trigger: ["blur","change"]
}, },
],
netWeight: [
{ {
"label": "车辆照片", required: true,
"value": "vehiclephotos" message: '数字文本',
trigger: ["blur","change"]
}, },
],
salesPrice: [
{ {
"label": "手机号", required: true,
"value": "contact" message: '数字文本',
trigger: ["blur","change"]
}, },
],
businessId: [
{ {
"label": "创建人", required: true,
"value": "f_creatorusername" message: '请选择',
trigger: 'change'
}, },
],
purchaseId: [
{ {
"label": "创建时间", required: true,
"value": "f_creatortime" message: '请选择',
trigger: 'change'
}, },
], ],
purchaseNamecolumnOptions: [{ },
"label": "事件等级", materialIdcolumnOptions:[ {"label":"物料编码","value":"item_code"}, {"label":"物料名称","value":"item_name"}, {"label":"单位","value":"primary_unit_of_measure"}, {"label":"默认入库区","value":"in_area"}, {"label":"默认出库区","value":"out_area"},],
"value": "selectField121" customerIdcolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"地址","value":"address"}, {"label":"银行账号","value":"bank_account"},],
}, ], salesIdcolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"}, {"label":"合同类型","value":"contract_type"}, {"label":"供应商/客户名称","value":"name"},],
unitOptions: [{ vehicleIdcolumnOptions:[ {"label":"车牌号","value":"ticketno"}, {"label":"司机","value":"drivername"}, {"label":"车辆照片","value":"vehiclephotos"}, {"label":"手机号","value":"contact"},],
"fullName": "吨", unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
"id": "0" transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
}, { advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
"fullName": "千克", businessIdcolumnOptions:[ {"label":"人员名称","value":"F_RealName"}, {"label":"人员职位","value":"F_FullName"},],
"id": "1" naturalIdcolumnOptions:[ {"label":"自然人名称","value":"name"}, {"label":"自然人手机号","value":"contact"}, {"label":"自然人地址","value":"adress"},],
}], purchaseIdcolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"}, {"label":"合同类型","value":"contract_type"}, {"label":"供应商ID","value":"code"}, {"label":"供应商名称","value":"name"},],
} }
}, },
computed: {}, computed: {},
watch: {}, watch: {},
created() {}, created() {
},
mounted() {}, mounted() {},
methods: { methods: {
clearData(data) { unitChange(e){
this.dataForm.unit = e;
},
transportTypeChange(e){
this.dataForm.transportType = e;
},
advanceChange(e){
this.dataForm.advance = e;
},
purchaseSelect(j,k){
this.dataForm.supplierName = k.name;
this.dataForm.supplierId = k.code;
},
handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
this.dataForm.customerId = res.data.customerId;
this.dataForm.customerName = res.data.customerName;
this.dataForm.salesId = res.data.salesId;
this.dataForm.salesName = res.data.salesName;
this.dataForm.vehicleId = res.data.vehicleId;
this.dataForm.poundDate = res.data.poundDate;
this.dataForm.poundlistNo = res.data.poundlistNo;
this.dataForm.tareWeight = res.data.tareWeight;
this.dataForm.grossWeight = res.data.grossWeight;
this.dataForm.buckleWeight = res.data.buckleWeight;
this.dataForm.netWeight = res.data.netWeight;
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
},
changePicture(a, b) {
this.dataForm.vehiclePictures = JSON.parse(b.vehiclephotos);
},
clearData(data){
for (let key in data) { for (let key in data) {
if (data[key] instanceof Array) { if (data[key] instanceof Array) {
data[key] = []; data[key] = [];
@ -435,16 +506,16 @@
this.isDetail = isDetail || false; this.isDetail = isDetail || false;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['elForm'].resetFields(); this.$refs['elForm'].resetFields();
if (this.dataForm.id) { if(this.dataForm.id){
this.loading = true this.loading = true
request({ request({
url: '/api/poundlist/Poundlist/' + this.dataForm.id, url: '/api/poundlist/Poundlist/'+this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false this.loading = false
}); });
} else { }else{
this.clearData(this.dataForm) this.clearData(this.dataForm)
} }
}); });
@ -452,17 +523,48 @@
}, },
// //
dataFormSubmit() { dataFormSubmit() {
var tareWeight = this.dataForm.tareWeight;//
var grossWeight = this.dataForm.grossWeight;//
var buckleWeight = this.dataForm.buckleWeight;//
var netWeight = this.dataForm.netWeight;//
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
if(grossWeight < tareWeight + buckleWeight + netWeight){
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= netWeight){
this.$message({
message: '扣重不得大于净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= grossWeight){
this.$message({
message: '扣重不得大于毛重',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => { this.$refs['elForm'].validate((valid) => {
if (valid) { if (valid) {
this.request() this.request2()
} }
}) })
}, },
request() { request2() {
var _data = this.dataList() var _data = this.dataList()
if (!this.dataForm.id) { if (!this.dataForm.id) {
request({ request({
url: '/api/poundlist/Poundlist', url: '/api/tradeupload/Tradeupload',
method: 'post', method: 'post',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -478,7 +580,7 @@
}) })
} else { } else {
request({ request({
url: '/api/poundlist/Poundlist/' + this.dataForm.id, url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT', method: 'PUT',
data: _data data: _data
}).then((res) => { }).then((res) => {
@ -494,18 +596,80 @@
}) })
} }
}, },
dataList() { request() {
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/poundlist/Poundlist',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}else{
request({
url: '/api/poundlist/Poundlist/'+this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm)); var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures) _data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures) _data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
return _data; return _data;
}, },
dataInfo(dataAll) { dataInfo(dataAll){
let _dataAll = dataAll let _dataAll =dataAll
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures) _dataAll.poundPictures = JSON.parse( _dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures) _dataAll.vehiclePictures = JSON.parse( _dataAll.vehiclePictures)
this.dataForm = _dataAll this.dataForm = _dataAll
}, },
}, },
} }
</script> </script>
<style>
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 120px;
height: 120px;
line-height: 120px;
text-align: center;
}
.avatar {
width: 120px;
height: 120px;
display: block;
}
</style>

@ -5,8 +5,16 @@
<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"
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-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -20,59 +28,74 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()"> <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> </el-button>
<el-button type="text" icon="el-icon-check" @click="exportData()"> <el-button type="text" icon="el-icon-download" @click="exportData()" >导出
</el-button> </el-button>
<el-button type="text" icon="el-icon-close" @click="exportData()"> <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" /> @click="reset()"/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer/>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
@selection-change="handleSelectionChange" border> <el-table-column prop="vehicleId" label="车牌号" width="0" align="left"
<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="customerId" label="客户" width="0" align="left"
<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="salesId" 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="supplierName" 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="purchaseId" label="采购合同" width="0" align="left"
<el-table-column prop="advance" label="是否垫资" sortable width="100" align="center" > />
<el-table-column prop="materialId" label="物料名称" width="0" align="left"
/>
<el-table-column label="是否垫资" width="0" prop="advance" algin="left"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.advance | dynamicText(advanceOptions) }} {{ scope.row.advance | dynamicText(advanceOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unit" label="单位" sortable width="100" align="center" > <el-table-column label="单位" width="0" prop="unit" algin="left"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.unit | dynamicText(unitOptions) }} {{ scope.row.unit | dynamicText(unitOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="grossWeight" sortable label="毛重" width="100" align="center" /> <el-table-column prop="grossWeight" label="毛重" width="0" align="left"
<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="tareWeight" label="皮重" width="0" align="left"
<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="buckleWeight" label="扣重" width="0" align="left"
<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="netWeight" label="净重" width="0" align="left"
<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="settlement" label="结算重量" width="0" align="left"
<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="purchasePrice" label="采购单价" width="0" align="left"
<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="salesPrice" label="销售价格" width="0" align="left"
<el-table-column prop="remark" sortable label="备注" width="150" align="center" /> />
<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"> <el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index"> <span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
@ -103,48 +126,57 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="100" align="center"> <!-- <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"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)"> <el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
@pagination="initData" />
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<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>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form' import JNPFForm from './Form'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import { import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail' import Detail from './Detail'
export default { export default {
components: { components: {JNPFForm, ExportBox,Detail},
JNPFForm,
ExportBox,
Detail
},
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
materialName: undefined, poundDate:undefined,
poundlistNo:undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -153,8 +185,7 @@
}, },
list: [], list: [],
listLoading: true, listLoading: true,
multipleSelection: [], multipleSelection: [], total: 0,
total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
@ -163,135 +194,40 @@
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [{ columnList: [
prop: 'licenseNo', {prop: 'vehicleId', label: '车牌号'},
label: '车号' {prop: 'customerId', label: '客户名称'},
}, {prop: 'salesId', label: '销售合同'},
{ {prop: 'supplierName', label: '供应商名称'},
prop: 'customerName', {prop: 'purchaseId', label: '采购合同'},
label: '客户名称' {prop: 'materialId', label: '物料名称'},
}, {prop: 'advance', label: '是否垫资'},
{ {prop: 'unit', label: '单位'},
prop: 'salesName', {prop: 'grossWeight', label: '毛重'},
label: '销售合同' {prop: 'tareWeight', label: '皮重'},
}, {prop: 'buckleWeight', label: '扣重'},
{ {prop: 'netWeight', label: '净重'},
prop: 'supplierName', {prop: 'settlement', label: '结算重量'},
label: '供应商名称' {prop: 'purchasePrice', label: '采购单价'},
}, {prop: 'salesPrice', label: '销售价格'},
{ {prop: 'inputDate', label: '进项票日期'},
prop: 'purchaseName', {prop: 'outputDate', label: '销项票日期'},
label: '采购合同' {prop: 'payDate', label: '付款日期'},
}, {prop: 'paymentDate', label: '回款日期'},
{ {prop: 'poundDate', label: '磅单日期'},
prop: 'materialCode', {prop: 'businessId', label: '业务员'},
label: '物料编码' {prop: 'remark', label: '备注'},
}, {prop: 'poundlistNo', label: '磅单号'},
{ {prop: 'transportType', label: '运输类型'},
prop: 'materialName', {prop: 'transportPrice', label: '运费'},
label: '物料名称' {prop: 'naturalId', 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: [{ unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
"fullName": "是", unitProps:{"label":"fullName","value":"id"},
"id": "1" transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
}, { transportTypeProps:{"label":"fullName","value":"id"},
"fullName": "否", advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
"id": "0" advanceProps:{"label":"fullName","value":"id"},
}],
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: { computed: {
@ -303,17 +239,13 @@
this.initData() this.initData()
}, },
methods: { methods: {
goDetail(id) { goDetail(id){
this.detailVisible = true this.detailVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id)
}) })
}, },
sortChange({ sortChange({column, prop, order}) {
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? '' : prop
this.initData() this.initData()
@ -323,25 +255,15 @@
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId:this.menuId
}; };
request({ request({
url: `/api/poundlist/Poundlist/getList`, url: `/api/poundlist/Poundlist/getList`,
method: 'post', method: 'post',
data: _query data: _query
}).then(res => { }).then(res => {
var _list = []; var _list =[];
for (let i = 0; i < res.data.list.length; i++) { 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]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data)
} }
@ -367,7 +289,8 @@
} }
}); });
}) })
}).catch(() => {}); }).catch(() => {
});
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map(item => item.id)
@ -398,7 +321,8 @@
} }
}); });
}) })
}).catch(() => {}) }).catch(() => {
})
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true
@ -413,12 +337,7 @@
}) })
}, },
download(data) { download(data) {
let query = { let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({ request({
url: `/api/poundlist/Poundlist/Actions/Export`, url: `/api/poundlist/Poundlist/Actions/Export`,
method: 'GET', method: 'GET',

@ -44,21 +44,25 @@
</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>
@ -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