
92 changed files with 5931 additions and 1163 deletions
@ -0,0 +1,17 @@ |
|||
package com.yxt.anrui.base.api.basemodelconfig; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AppCarConfigSummaryVo { |
|||
|
|||
@ApiModelProperty("常用配置") |
|||
private String config; |
|||
|
|||
@ApiModelProperty("更多配置") |
|||
private String moreConfig; |
|||
|
|||
@ApiModelProperty("车型名称") |
|||
private String model; |
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.yxt.anrui.base.api.basemodelconfig; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AppModelConfigListQuery implements Query { |
|||
|
|||
@ApiModelProperty("名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("颜色") |
|||
private String bodyColor; |
|||
|
|||
@ApiModelProperty("缓速器") |
|||
private String slowMachine; |
|||
|
|||
@ApiModelProperty("后视镜") |
|||
private String rearViewMirror; |
|||
|
|||
@ApiModelProperty("轮胎") |
|||
private String tireSize; |
|||
|
|||
@ApiModelProperty("驾驶室") |
|||
private String specification; |
|||
|
|||
@ApiModelProperty("后桥速比") |
|||
private String rearAxleRatio; |
|||
|
|||
@ApiModelProperty("空调") |
|||
private String airConditioner; |
|||
|
|||
@ApiModelProperty("轮毂材质") |
|||
private String hubMaterial; |
|||
|
|||
@ApiModelProperty("导流罩") |
|||
private String diversionCover; |
|||
|
|||
@ApiModelProperty("车型sid") |
|||
private String modelSid; |
|||
|
|||
@ApiModelProperty("多媒体") |
|||
private String multiMedia; |
|||
|
|||
@ApiModelProperty("燃料箱") |
|||
private String fuelTank; |
|||
|
|||
@ApiModelProperty("独立热源") |
|||
private String independentSources; |
|||
|
|||
@ApiModelProperty("配置包") |
|||
private String configuringBao; |
|||
|
|||
@ApiModelProperty("保险杠") |
|||
private String bumper; |
|||
|
|||
@ApiModelProperty("轴距") |
|||
private String wheelbase; |
|||
|
|||
@ApiModelProperty("鞍座") |
|||
private String saddle; |
|||
|
|||
@ApiModelProperty("护轮罩") |
|||
private String protectTireCover; |
|||
|
|||
@ApiModelProperty("座椅") |
|||
private String seat; |
|||
|
|||
@ApiModelProperty("悬架") |
|||
private String suspension; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("分公司") |
|||
private String useOrg; |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.yxt.anrui.base.api.basemodelconfig; |
|||
|
|||
import com.yxt.anrui.base.api.basevehicle.ConfigInfo; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class AppModelConfigVo implements Vo { |
|||
@ApiModelProperty("车型图片") |
|||
private List<String> modelImage; |
|||
@ApiModelProperty("车型名称") |
|||
private String modelName; |
|||
@ApiModelProperty("指导价") |
|||
private String price; |
|||
@ApiModelProperty("车型list") |
|||
private List<ConfigInfo> configList; |
|||
@ApiModelProperty("品牌名称") |
|||
private String brandName; |
|||
@ApiModelProperty("版本") |
|||
private String vehicleVersionValue; |
|||
|
|||
@ApiModelProperty("配置列表") |
|||
private List<AppModelConfigListVo> modelConfigList; |
|||
|
|||
@ApiModelProperty(value = "功能") |
|||
private String vehicleTypeValue; |
|||
|
|||
@ApiModelProperty(value = "系列") |
|||
private String productLineValue; |
|||
|
|||
@ApiModelProperty(value = "驱动") |
|||
private String driveFormValue; |
|||
|
|||
@ApiModelProperty(value = "马力") |
|||
private String powerValue; |
|||
|
|||
@ApiModelProperty(value = "燃料") |
|||
private String fuelTypeValue; |
|||
|
|||
@ApiModelProperty(value = "变速箱") |
|||
private String gearboxTypeValue; |
|||
|
|||
@ApiModelProperty(value = "细分市场") |
|||
private String marketSegments; |
|||
|
|||
@ApiModelProperty(value = "系别") |
|||
private String department; |
|||
|
|||
@ApiModelProperty(value = "发动机型号") |
|||
private String engineTypeValue; |
|||
|
|||
@ApiModelProperty(value = "公告型号") |
|||
private String announcementModel; |
|||
|
|||
@ApiModelProperty(value = "规格型号") |
|||
private String specifications; |
|||
|
|||
@ApiModelProperty(value = "货箱") |
|||
private String packingCase; |
|||
|
|||
@ApiModelProperty(value = "内部编码") |
|||
private String insideCode; |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.yxt.anrui.base.api.basevehicle; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AppBaseVehicleNowModelQuery implements Query { |
|||
|
|||
@ApiModelProperty("名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("排放标准") |
|||
private String emissionStandard; |
|||
|
|||
@ApiModelProperty("驱动") |
|||
private String driver; |
|||
|
|||
@ApiModelProperty("变速箱") |
|||
private String gearbox; |
|||
|
|||
@ApiModelProperty("产品系列") |
|||
private String series; |
|||
|
|||
@ApiModelProperty("功能") |
|||
private String vehicleFunction; |
|||
|
|||
@ApiModelProperty("细分市场") |
|||
private String marketSegments; |
|||
|
|||
@ApiModelProperty("版本") |
|||
private String vehicleVersion; |
|||
|
|||
@ApiModelProperty("燃料") |
|||
private String fuelType; |
|||
|
|||
@ApiModelProperty("马力") |
|||
private String horsepower; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("品牌") |
|||
private String brand; |
|||
|
|||
@ApiModelProperty("分公司") |
|||
private String useOrg; |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.base.api.basevehicle; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class AppBaseVehicleNowModelVo implements Vo { |
|||
|
|||
@ApiModelProperty("车型sid") |
|||
private String modelSid; |
|||
@ApiModelProperty("车型名称") |
|||
private String modelName; |
|||
@ApiModelProperty("车型图片") |
|||
private String modelImage; |
|||
@ApiModelProperty("品牌名称") |
|||
private String brandName; |
|||
@ApiModelProperty("品牌sid") |
|||
private String brandSid; |
|||
@ApiModelProperty("版本号") |
|||
private String versionValue; |
|||
@ApiModelProperty("燃料") |
|||
private String fuelTypeValue; |
|||
@ApiModelProperty("变速箱") |
|||
private String gearboxTypeValue; |
|||
@ApiModelProperty("指导价") |
|||
private String guidedPrice; |
|||
@ApiModelProperty("配置数量") |
|||
private String configNum; |
|||
@ApiModelProperty("现车数量") |
|||
private String nowCarNum; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.base.api.basevehicle; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
@Data |
|||
public class AppCurrentCarDetailConfigQuery implements Query { |
|||
|
|||
@ApiModelProperty("车型sid") |
|||
private String modelSid; |
|||
|
|||
@ApiModelProperty("配置sid") |
|||
private String configSid; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.yxt.anrui.base.api.basevehicle; |
|||
|
|||
import com.yxt.anrui.base.api.basemodelconfig.AppModelConfigDetailsVo; |
|||
import com.yxt.anrui.base.api.basemodelszconfig.AppBaseModelSzconfigDetailsVo; |
|||
import com.yxt.anrui.base.api.basetrailer.AppBaseTrailerDetailsVo; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
@Data |
|||
public class AppCurrentCarDetailConfigVo implements Vo { |
|||
|
|||
@ApiModelProperty(value = "车型信息") |
|||
private List<List<ConfigInfoSpanSize>> modelInfo; |
|||
|
|||
@ApiModelProperty(value = "常用配置") |
|||
private List<ConfigInfoSpanSize> configInfo; |
|||
|
|||
@ApiModelProperty(value = "更多配置") |
|||
private String moreConfig; |
|||
|
|||
@ApiModelProperty(value = "指导价") |
|||
private String price; |
|||
|
|||
@ApiModelProperty(value = "价格有效期") |
|||
private String date; |
|||
|
|||
@ApiModelProperty(value = "价格有效期") |
|||
private Long dateLong; |
|||
|
|||
@ApiModelProperty(value = "车型名称") |
|||
private String model; |
|||
|
|||
@ApiModelProperty(value = "品牌") |
|||
private String brand; |
|||
|
|||
@ApiModelProperty(value = "品牌sid") |
|||
private String brandSid; |
|||
|
|||
@ApiModelProperty(value = "现车和排产车总数") |
|||
private String num; |
|||
|
|||
} |
@ -1,31 +0,0 @@ |
|||
package com.yxt.anrui.base.api.basevehicle; |
|||
|
|||
import com.yxt.anrui.base.api.basemodelconfig.AppModelConfigDetailsVo; |
|||
import com.yxt.anrui.base.api.basemodelszconfig.AppBaseModelSzconfigDetailsVo; |
|||
import com.yxt.anrui.base.api.basetrailer.AppBaseTrailerDetailsVo; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
@Data |
|||
public class AppCurrentCarDetailCongfigVo implements Vo { |
|||
|
|||
@ApiModelProperty(value = "车型信息") |
|||
private List<List<ConfigInfoSpanSize>> modleInfo; |
|||
|
|||
@ApiModelProperty(value = "常用配置") |
|||
private List<ConfigInfoSpanSize> commonConfigInfo; |
|||
|
|||
@ApiModelProperty(value = "更多配置") |
|||
private String moreConfigDescibe; |
|||
|
|||
/*@ApiModelProperty(value = "上装") |
|||
private List<List<ConfigInfoSpanSize>> trailerInfo; |
|||
|
|||
@ApiModelProperty(value = "挂车") |
|||
private List<List<ConfigInfoSpanSize>> topInfo;*/ |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualdetails; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 17:29 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class ScmVehicleActualDetails extends BaseEntity { |
|||
private static final long serialVersionUID = 8008152391857378580L; |
|||
@ApiModelProperty(value = "车辆未售买断申请sid") |
|||
private String vehicleActualSid; |
|||
@ApiModelProperty(value = "车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty(value = "车型名称") |
|||
private String modelName; |
|||
@ApiModelProperty(value = "入库日期") |
|||
private Date inboundDate; |
|||
@ApiModelProperty(value = "入库价") |
|||
private String inboundPrice; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualdetails; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 17:35 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class ScmVehicleActualDetailsDto implements Dto { |
|||
private static final long serialVersionUID = 4387929122120092628L; |
|||
|
|||
@ApiModelProperty(value = "车架号") |
|||
private String vinNo; |
|||
@ApiModelProperty(value = "车型名称") |
|||
private String modelName; |
|||
@ApiModelProperty(value = "入库日期") |
|||
private Date inboundDate; |
|||
@ApiModelProperty(value = "入库价") |
|||
private String inboundPrice; |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualdetails; |
|||
|
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 18:09 |
|||
* @Description |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "anrui-scm-ScmVehicleActualDetails", |
|||
name = "anrui-scm", |
|||
path = "v1/scmvehicleactualdetails", |
|||
fallback = ScmVehicleActualDetailsFeignFallback.class) |
|||
public interface ScmVehicleActualDetailsFeign { |
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualdetails; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 18:10 |
|||
* @Description |
|||
*/ |
|||
@Component |
|||
public class ScmVehicleActualDetailsFeignFallback { |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualsales; |
|||
|
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 11:33 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class ScmVehicleActualSales extends BaseEntity { |
|||
private static final long serialVersionUID = -8236776276492093631L; |
|||
@ApiModelProperty(value = "申请人") |
|||
private String applicationName; |
|||
@ApiModelProperty(value = "买断") |
|||
private String reason; |
|||
@ApiModelProperty(value = "节点状态") |
|||
private String nodeState; |
|||
@ApiModelProperty(value = "流程定义id") |
|||
private String procDefId; |
|||
@ApiModelProperty(value = "环节定义的sid") |
|||
private String nodeSid; |
|||
@ApiModelProperty(value = "流程实例的sid") |
|||
private String procInstSid; |
|||
|
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualsales; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualdetails.ScmVehicleActualDetailsDto; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 17:22 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class ScmVehicleActualSalesDto implements Dto { |
|||
private static final long serialVersionUID = 3125388598762096051L; |
|||
|
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "申请人sid") |
|||
private String userSid; |
|||
@ApiModelProperty(value = "申请人") |
|||
private String applicationName; |
|||
@ApiModelProperty(value = "申请日期") |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date createTime; |
|||
@ApiModelProperty(value = "买断原因") |
|||
private String reason; |
|||
@ApiModelProperty(value = "车辆列表") |
|||
private List<ScmVehicleActualDetailsDto> detailsList; |
|||
|
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualsales; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 11:57 |
|||
* @Description |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "anrui-scm-ScmVehicleActualSales", |
|||
name = "anrui-scm", |
|||
path = "v1/scmvehicleactualsales", |
|||
fallback = ScmVehicleActualSalesFeignFallback.class) |
|||
public interface ScmVehicleActualSalesFeign { |
|||
|
|||
@ApiOperation("分页列表") |
|||
@PostMapping("/listPage") |
|||
@ResponseBody |
|||
ResultBean<PagerVo<ScmVehicleActualSalesVo>> listPage(@RequestBody PagerQuery<ScmVehicleActualSalesQuery> pagerQuery); |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/saveOrUpdate") |
|||
@ResponseBody |
|||
ResultBean saveOrUpdate(@RequestBody ScmVehicleActualSalesDto scmVehicleActualSalesDto); |
|||
|
|||
@ApiOperation("提交") |
|||
@PostMapping("/submitVehicleSales") |
|||
@ResponseBody |
|||
ResultBean submitVehicleSales(@RequestBody ScmVehicleActualSalesDto scmVehicleActualSalesDto); |
|||
|
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualsales; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 11:59 |
|||
* @Description |
|||
*/ |
|||
@Component |
|||
public class ScmVehicleActualSalesFeignFallback implements ScmVehicleActualSalesFeign{ |
|||
@Override |
|||
public ResultBean<PagerVo<ScmVehicleActualSalesVo>> listPage(PagerQuery<ScmVehicleActualSalesQuery> pagerQuery) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveOrUpdate(ScmVehicleActualSalesDto scmVehicleActualSalesDto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitVehicleSales(ScmVehicleActualSalesDto scmVehicleActualSalesDto) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualsales; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 17:11 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class ScmVehicleActualSalesQuery implements Query { |
|||
private static final long serialVersionUID = 970443773657128722L; |
|||
@ApiModelProperty(value = "申请日期开始时间") |
|||
private String applyStartDate; |
|||
@ApiModelProperty(value = "申请日期结束时间") |
|||
private String applyEndDate; |
|||
@ApiModelProperty(value = "状态") |
|||
private String nodeState; |
|||
@ApiModelProperty(value = "车架号") |
|||
private String vinNo; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.anrui.scm.api.scmvehicleactualsales; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 17:02 |
|||
* @Description |
|||
*/ |
|||
@Data |
|||
public class ScmVehicleActualSalesVo implements Vo { |
|||
private static final long serialVersionUID = -8518464944096578672L; |
|||
|
|||
@ApiModelProperty(value = "sid") |
|||
private String sid; |
|||
@ApiModelProperty(value = "节点状态") |
|||
private String nodeState; |
|||
@ApiModelProperty(value = "申请人") |
|||
private String applicationName; |
|||
@ApiModelProperty(value = "申请日期") |
|||
private String createTime; |
|||
@ApiModelProperty(value = "买断原因") |
|||
private String reason; |
|||
@ApiModelProperty(value = "台数") |
|||
private Integer num; |
|||
|
|||
@ApiModelProperty(value = "流程状态") //若不为0则办理不能点击
|
|||
private Integer flowState; |
|||
|
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.yxt.anrui.scm.biz.scmvehicleactualdetails; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualdetails.ScmVehicleActualDetails; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 18:12 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface ScmVehicleActualDetailsMapper extends BaseMapper<ScmVehicleActualDetails> { |
|||
|
|||
List<ScmVehicleActualDetails> selectBySaleSid(String sid); |
|||
|
|||
int deleteBySaleSid(String sid); |
|||
} |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|||
<mapper namespace="com.yxt.anrui.scm.biz.scmvehicleactualdetails.ScmVehicleActualDetailsMapper"> |
|||
<select id="selectBySaleSid" resultType="com.yxt.anrui.scm.api.scmvehicleactualdetails.ScmVehicleActualDetails"> |
|||
select * |
|||
from scm_vehicle_actual_details |
|||
where vehicleActualSid = #{sid} |
|||
</select> |
|||
|
|||
<delete id="deleteBySaleSid"> |
|||
delete |
|||
from scm_vehicle_actual_details |
|||
where vehicleActualSid = #{sid} |
|||
</delete> |
|||
</mapper> |
@ -0,0 +1,17 @@ |
|||
package com.yxt.anrui.scm.biz.scmvehicleactualdetails; |
|||
|
|||
import com.yxt.anrui.scm.api.scmvehicleactualdetails.ScmVehicleActualDetailsFeign; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 18:09 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "车辆未售买断管理") |
|||
@RequestMapping("v1/scmvehicleactualsales") |
|||
@Controller |
|||
public class ScmVehicleActualDetailsRest implements ScmVehicleActualDetailsFeign { |
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.yxt.anrui.scm.biz.scmvehicleactualdetails; |
|||
|
|||
import com.yxt.anrui.scm.api.scmvehicleactualdetails.ScmVehicleActualDetails; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualdetails.ScmVehicleActualDetailsDto; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 18:11 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class ScmVehicleActualDetailsService extends MybatisBaseService<ScmVehicleActualDetailsMapper, ScmVehicleActualDetails> { |
|||
|
|||
/** |
|||
* 新增 |
|||
* |
|||
* @param detailsList |
|||
* @param saleSid |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void saveDetails(List<ScmVehicleActualDetailsDto> detailsList, String saleSid) { |
|||
ScmVehicleActualDetails scmVehicleActualDetails = null; |
|||
for (ScmVehicleActualDetailsDto dto : detailsList) { |
|||
scmVehicleActualDetails = new ScmVehicleActualDetails(); |
|||
BeanUtils.copyProperties(dto, scmVehicleActualDetails, scmVehicleActualDetails.getSid()); |
|||
scmVehicleActualDetails.setVehicleActualSid(saleSid); |
|||
save(scmVehicleActualDetails); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 查询 |
|||
* |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public List<ScmVehicleActualDetails> selectBySaleSid(String sid) { |
|||
return baseMapper.selectBySaleSid(sid); |
|||
} |
|||
|
|||
/** |
|||
* 删除原车辆退库详细并新增 |
|||
* |
|||
* @param sid 车辆退库sid |
|||
* @param detailsList 退库车辆详细 |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void updateListByReturnSid(String sid, List<ScmVehicleActualDetailsDto> detailsList) { |
|||
baseMapper.deleteBySaleSid(sid); |
|||
saveDetails(detailsList, sid); |
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.yxt.anrui.scm.biz.scmvehicleactualsales; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSales; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesVo; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 17:43 |
|||
* @Description |
|||
*/ |
|||
@Mapper |
|||
public interface ScmVehicleActualSalesMapper extends BaseMapper<ScmVehicleActualSales> { |
|||
/** |
|||
* 分页列表 |
|||
* |
|||
* @param page 分页 |
|||
* @param qw 查询条件 |
|||
* @return |
|||
*/ |
|||
IPage<ScmVehicleActualSalesVo> pagerList(IPage<ScmVehicleActualSalesVo> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehicleActualSalesVo> qw); |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|||
<mapper namespace="com.yxt.anrui.scm.biz.scmvehicleactualsales.ScmVehicleActualSalesMapper"> |
|||
<select id="pagerList" resultType="com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesVo"> |
|||
select sv.sid, |
|||
sv.applicationName, |
|||
sv.createTime, |
|||
sv.reason, |
|||
(select count(*) from scm_vehicle_actual_details sa where sa.vehicleActualSid = sv.sid) as num |
|||
from scm_vehicle_actual_sales sv |
|||
${ew.customSqlSegment} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,45 @@ |
|||
package com.yxt.anrui.scm.biz.scmvehicleactualsales; |
|||
|
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesDto; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesFeign; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesQuery; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 15:05 |
|||
* @Description |
|||
*/ |
|||
@Api(tags = "车辆未售买断管理") |
|||
@RequestMapping("v1/scmvehicleactualsales") |
|||
@Controller |
|||
public class ScmVehicleActualSalesRest implements ScmVehicleActualSalesFeign { |
|||
|
|||
@Autowired |
|||
private ScmVehicleActualSalesService scmVehicleActualSalesService; |
|||
|
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<ScmVehicleActualSalesVo>> listPage(PagerQuery<ScmVehicleActualSalesQuery> pagerQuery) { |
|||
ResultBean<PagerVo<ScmVehicleActualSalesVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<ScmVehicleActualSalesVo> pv = scmVehicleActualSalesService.listPage(pagerQuery); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean saveOrUpdate(ScmVehicleActualSalesDto scmVehicleActualSalesDto) { |
|||
return scmVehicleActualSalesService.saveOrUpdateVehicleSales(scmVehicleActualSalesDto); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean submitVehicleSales(ScmVehicleActualSalesDto scmVehicleActualSalesDto) { |
|||
return scmVehicleActualSalesService.submitVehicleSales(scmVehicleActualSalesDto); |
|||
} |
|||
} |
@ -0,0 +1,155 @@ |
|||
package com.yxt.anrui.scm.biz.scmvehicleactualsales; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.flowable.api.sysformlink.SysFormLinkFeign; |
|||
import com.yxt.anrui.flowable.api.sysformlink.SysFormStateVo; |
|||
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|||
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualdetails.ScmVehicleActualDetails; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSales; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesDto; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesQuery; |
|||
import com.yxt.anrui.scm.api.scmvehicleactualsales.ScmVehicleActualSalesVo; |
|||
import com.yxt.anrui.scm.biz.scmvehicleactualdetails.ScmVehicleActualDetailsService; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.base.utils.StringUtils; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.BeanUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author dimengzhe |
|||
* @Date 2022/4/8 17:42 |
|||
* @Description |
|||
*/ |
|||
@Service |
|||
public class ScmVehicleActualSalesService extends MybatisBaseService<ScmVehicleActualSalesMapper, ScmVehicleActualSales> { |
|||
|
|||
@Autowired |
|||
private SysFormLinkFeign sysFormLinkFeign; |
|||
@Autowired |
|||
private ScmVehicleActualDetailsService scmVehicleActualDetailsService; |
|||
|
|||
@Autowired |
|||
private SysUserFeign sysUserFeign; |
|||
@Autowired |
|||
private SysStaffOrgFeign sysStaffOrgFeign; |
|||
|
|||
/** |
|||
* 分页列表 |
|||
* |
|||
* @param pagerQuery 查询条件 |
|||
* @return |
|||
*/ |
|||
public PagerVo<ScmVehicleActualSalesVo> listPage(PagerQuery<ScmVehicleActualSalesQuery> pagerQuery) { |
|||
IPage<ScmVehicleActualSalesVo> page = pagerList(pagerQuery); |
|||
PagerVo<ScmVehicleActualSalesVo> pv = new PagerVo<>(); |
|||
PagerVo<ScmVehicleActualSalesVo> pv1 = PagerUtil.pageToVo(page, pv); |
|||
List<ScmVehicleActualSalesVo> voList = pv1.getRecords(); |
|||
if (voList.size() > 0) { |
|||
for (int i = 0; i < voList.size(); i++) { |
|||
ResultBean<SysFormStateVo> resultBean = sysFormLinkFeign.selectStateByBusinessSid(voList.get(i).getSid()); |
|||
if (resultBean.getSuccess() && resultBean.getData() != null) { |
|||
SysFormStateVo formState = resultBean.getData(); |
|||
voList.get(i).setNodeState(formState.getNodeState()); |
|||
voList.get(i).setFlowState(formState.getFlowState()); |
|||
} else { |
|||
voList.get(i).setFlowState(0); |
|||
} |
|||
} |
|||
} |
|||
return pv1; |
|||
} |
|||
|
|||
private IPage<ScmVehicleActualSalesVo> pagerList(PagerQuery<ScmVehicleActualSalesQuery> pagerQuery) { |
|||
IPage<ScmVehicleActualSalesVo> page = PagerUtil.queryToPage(pagerQuery); |
|||
QueryWrapper<ScmVehicleActualSalesVo> qw = buildQueryWrapper(pagerQuery.getParams()); |
|||
return baseMapper.pagerList(page, qw); |
|||
} |
|||
|
|||
private QueryWrapper<ScmVehicleActualSalesVo> buildQueryWrapper(ScmVehicleActualSalesQuery params) { |
|||
QueryWrapper<ScmVehicleActualSalesVo> qw = new QueryWrapper<>(); |
|||
if (params != null) { |
|||
//申请日期
|
|||
//状态
|
|||
//车架号
|
|||
} |
|||
return qw; |
|||
} |
|||
|
|||
@Transactional(rollbackFor = Exception.class) |
|||
public ResultBean saveOrUpdateVehicleSales(ScmVehicleActualSalesDto scmVehicleActualSalesDto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String sid = scmVehicleActualSalesDto.getSid(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
//新增
|
|||
ScmVehicleActualSales scmVehicleActualSales = new ScmVehicleActualSales(); |
|||
BeanUtils.copyProperties(scmVehicleActualSalesDto, scmVehicleActualSales, scmVehicleActualSales.getSid()); |
|||
boolean isSave = save(scmVehicleActualSales); |
|||
if (!isSave) { |
|||
return rb.setMsg("保存失败"); |
|||
} else { |
|||
sid = scmVehicleActualSales.getSid(); |
|||
if (scmVehicleActualSalesDto.getDetailsList().size() > 0) { |
|||
scmVehicleActualDetailsService.saveDetails(scmVehicleActualSalesDto.getDetailsList(), scmVehicleActualSales.getSid()); |
|||
} |
|||
} |
|||
} else { |
|||
//编辑
|
|||
//验证数据是否可更改
|
|||
if (checkCouldChange(sid)) { |
|||
return rb.setMsg("该条信息不可更改"); |
|||
} |
|||
int i = updateBySid(scmVehicleActualSalesDto, sid); |
|||
//查询details中是否有关于sales的该条sid数据
|
|||
List<ScmVehicleActualDetails> scmVehicleActualDetailsList = scmVehicleActualDetailsService.selectBySaleSid(sid); |
|||
if (scmVehicleActualDetailsList.size() > 0) { |
|||
scmVehicleActualDetailsService.updateListByReturnSid(sid, scmVehicleActualSalesDto.getDetailsList()); |
|||
} |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
/** |
|||
* 判断是否可删除 |
|||
* |
|||
* @param sid sid |
|||
* @return |
|||
*/ |
|||
private boolean checkCouldChange(String sid) { |
|||
ScmVehicleActualSales scmVehicleActualSales = fetchBySid(sid); |
|||
// 判断是否可以更改(是否走了流程,更改了状态)
|
|||
if (StringUtils.isNotBlank(scmVehicleActualSales.getNodeState())) { |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
/** |
|||
* 查询用户是否设置了部门 |
|||
* |
|||
* @param userSid 用户sid |
|||
* @return |
|||
*/ |
|||
private String checkUserOrg(String userSid) { |
|||
String orgSid = ""; |
|||
String staffSid = sysUserFeign.selectBySid(userSid).getData().getStaffSid(); |
|||
ResultBean<String> resultBean = sysStaffOrgFeign.getSysStaffOrgSidListByStaffSid(staffSid); |
|||
if (resultBean.getSuccess()) { |
|||
orgSid = resultBean.getData(); |
|||
} |
|||
return orgSid; |
|||
} |
|||
|
|||
public ResultBean submitVehicleSales(ScmVehicleActualSalesDto scmVehicleActualSalesDto) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,50 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 代办任务同意办理
|
|||
export function businessAgree(params) { |
|||
return request({ |
|||
url: '/portal/v1/flow/complete', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 代办任务驳回任务
|
|||
export function rejectTask(params) { |
|||
return request({ |
|||
url: '/portal/v1/flow/reject/' + params.businessSid, |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 代办任务终止任务
|
|||
export function breakTask(params) { |
|||
return request({ |
|||
url: '/portal/v1/flow/breakProcess/' + params.businessSid, |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 代办任务撤回任务
|
|||
export function revokeTask(params) { |
|||
return request({ |
|||
url: '/portal/v1/flow/revokeProcess/' + params.userSid + '/' + params.businessSid, |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
@ -0,0 +1,47 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmapplyinbound/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 保存修改记录
|
|||
saveOrUpdate: function(params) { |
|||
return request({ |
|||
url: '/scm/v1/scmapplyinbound/saveOrUpdateApplyInBound', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 提交流程
|
|||
submitVehicleApply: function(params) { |
|||
return request({ |
|||
url: '/base/v1/busvehicleapply/submitVehicleApply', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid删除一条或多条记录
|
|||
delBySids: function(params) { |
|||
return request({ |
|||
url: '/base/v1/busvehicleapply/delBySids', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 通过sid查询一条记录
|
|||
fetchBySid: function(sid) { |
|||
return request({ |
|||
url: '/scm/v1/scmapplyinbound/fetchSid/' + sid, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,276 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveEdit()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" @click="submitVehicleApply()">提交 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>车辆入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="采购订单编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.purchaseOrderNo" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="车型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.modelName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="常用配置:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">车辆列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row style="margin-top: 10px"> |
|||
<el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="厂家发车日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="formobj.departureDate" clearable type="date" placeholder="开始日期"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
export default { |
|||
name: 'ruzhangAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
applicationSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
applicationName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applicationCode: '', // 申请编号 |
|||
configName: '', |
|||
departureDate: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', // 备注 |
|||
vehicleOrderSid: '', |
|||
vehicleList: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showEdit(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【编辑】入账单' |
|||
console.log('编辑回显', sid, row) |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
this.formobj.configName = data.configName |
|||
this.formobj.departureDate = data.departureDate |
|||
this.formobj.modelName = data.modelName |
|||
this.formobj.modelSid = data.modelSid |
|||
this.formobj.purchaseOrderNo = data.purchaseOrderNo |
|||
this.formobj.vehicleOrderSid = data.vehicleOrderSid |
|||
if (data.inboundVehicleList.length > 0) { |
|||
data.inboundVehicleList.forEach((e) => { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: e.applySid, |
|||
remarks: e.remarks, |
|||
modelSid: e.modelSid, |
|||
sid: e.sid, |
|||
vinNo: e.vinNo |
|||
}) |
|||
}) |
|||
} else { |
|||
for (var i = 0; i < row[0].vehicleNum; i++) { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: '', |
|||
remarks: '', |
|||
modelSid: this.formobj.modelSid, |
|||
sid: '', |
|||
vinNo: '' |
|||
}) |
|||
} |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
saveEdit() { |
|||
console.log(this.formobj, 636363) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
submitVehicleApply() { |
|||
req.submitVehicleApply(this.formobj).then((res) => { |
|||
if (res.code == '200') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '提交成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '提交失败' |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.departureDate = '' |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.vehicleList = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
/* padding: 0 10px 0 0; */ |
|||
text-align: right; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,219 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>车辆入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="采购订单编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.purchaseOrderNo" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="车型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.modelName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="常用配置:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" clearable readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">车辆列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable readonly/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable readonly/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row class="linetwo" style="margin-top: 10px"> |
|||
<el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="厂家发车日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.departureDate" placeholder="" class="addinputw" clearable readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
export default { |
|||
name: 'ruzhangInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
applicationSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
applicationName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applicationCode: '', // 申请编号 |
|||
configName: '', |
|||
departureDate: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', // 备注 |
|||
vehicleOrderSid: '', |
|||
vehicleList: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '入账单详情' |
|||
console.log('编辑回显', sid, row) |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
this.formobj.configName = data.configName |
|||
this.formobj.departureDate = data.departureDate |
|||
this.formobj.modelName = data.modelName |
|||
this.formobj.modelSid = data.modelSid |
|||
this.formobj.purchaseOrderNo = data.purchaseOrderNo |
|||
this.formobj.vehicleOrderSid = data.vehicleOrderSid |
|||
if (data.inboundVehicleList.length > 0) { |
|||
data.inboundVehicleList.forEach((e) => { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: e.applySid, |
|||
remarks: e.remarks, |
|||
modelSid: e.modelSid, |
|||
sid: e.sid, |
|||
vinNo: e.vinNo |
|||
}) |
|||
}) |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.departureDate = '' |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.vehicleList = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,258 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>入账申请单管理</div> |
|||
<div> |
|||
<!-- <el-button type="danger" size="small" @click="doDel()">删除</el-button>--> |
|||
<el-button type="primary" size="small">提交</el-button> |
|||
<el-button type="info" size="small">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="采购订单编号:"> |
|||
<el-input v-model="queryParams.params.purchaseOrderNo" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item label="车型:"> |
|||
<el-input v-model="queryParams.params.modelName" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-form-item class="formItem" label="申请日期:"> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="queryParams.params.applicationDateStart" clearable style="width: 160px;" type="date" placeholder="开始日期"/> |
|||
<div class="line">至</div> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="queryParams.params.applicationDateEnd" clearable style="width: 160px;" type="date" placeholder="结束日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="状态:"> |
|||
<el-input v-model="queryParams.params.nodeState" placeholder="" clearable/> |
|||
</el-form-item> |
|||
<el-divider/> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" @click="dosearch" icon="el-icon-search">查询</el-button> |
|||
<el-button type="primary" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--Start 项目列表头部--> |
|||
<div class="listtop"> |
|||
<div class="tit">入账申请列表</div> |
|||
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
|||
</div> |
|||
<!--End 项目列表头部--> |
|||
|
|||
<!--Start 项目列表--> |
|||
<div class="listcon"> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50" type="selection" align="center"/> |
|||
<el-table-column width="80" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column width="150" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="small" :disabled="scope.row.nodeState =='' ? false : scope.row.nodeState == '排产申请' ? false : true" @click="toEdit(scope.row)">办理</el-button> |
|||
<el-button type="primary" size="small" @click="toInfo(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column width="150" prop="nodeState" label="状态" align="center"/> |
|||
<el-table-column width="200" prop="applicationCode" label="申请编号" align="center"/> |
|||
<el-table-column width="150" prop="applicationDate" label="申请日期" align="center"/> |
|||
<el-table-column width="200" prop="purchaseOrderNo" label="采购订单编号" align="center"/> |
|||
<el-table-column prop="modelName" label="车型" align="center"/> |
|||
<el-table-column width="150" prop="vehicleNum" fit label="台数" align="center"/> |
|||
</el-table> |
|||
</div> |
|||
<!--End 项目列表--> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList"/> |
|||
</div> |
|||
</div> |
|||
<!--End 查询和其列表部分--> |
|||
|
|||
<!--新增修改部分组件--> |
|||
<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList"/> |
|||
<!--详情部分组件--> |
|||
<div-info v-show="viewState == 4" ref="divinfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import divAdd from './ruzhangAdd' |
|||
import divInfo from './ruzhangInfo' |
|||
|
|||
export default { |
|||
name: 'ruzhangguanli', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
divAdd, |
|||
divInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, // 显示隐藏 |
|||
tableLoading: false, |
|||
// 列表数据 |
|||
dataList: [], |
|||
// sid数组 |
|||
sids: [], // 用于导出的时候保存已选择SID |
|||
sides: '', // 一条数据的sid |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
applicationDateStart: '', |
|||
applicationDateEnd: '', |
|||
nodeState: '', |
|||
purchaseOrderNo: '', |
|||
modelName: '' |
|||
} |
|||
}, |
|||
row: {} |
|||
} |
|||
}, |
|||
created() { |
|||
this.loadList() |
|||
}, |
|||
methods: { |
|||
// 获取数据sid |
|||
handleSelectionChange(row) { |
|||
const aa = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
this.row = row |
|||
this.sides = this.sids.join() // 将sid数组的元素转化成字符串 |
|||
console.log('获取sids数组', this.sids) |
|||
}, |
|||
toEdit() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' }) |
|||
return |
|||
} |
|||
if (this.sids.length > 1) { |
|||
this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' }) |
|||
return |
|||
} |
|||
this.viewState = 3 |
|||
const sid = this.sids[0] |
|||
const row = this.row |
|||
this.$refs['divadd'].showEdit(sid, row) |
|||
}, |
|||
toInfo(row) { |
|||
this.viewState = 4 |
|||
console.log('这是打开详情接口', row) |
|||
const sid = row.sid |
|||
this.$refs['divinfo'].showInfo(sid, row) |
|||
}, |
|||
// 查询 |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
// 重置 |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
applicationDateStart: '', |
|||
applicationDateEnd: '', |
|||
nodeState: '', |
|||
purchaseOrderNo: '', |
|||
modelName: '' |
|||
} |
|||
} |
|||
this.dosearch() |
|||
}, |
|||
// 加载分页列表 |
|||
loadList() { |
|||
const _this = this |
|||
this.tableLoading = true |
|||
req.listPage(this.queryParams).then(resp => { |
|||
console.log('查询列表', resp) |
|||
_this.tableLoading = false |
|||
const data = resp.data |
|||
_this.queryParams.total = data.total |
|||
_this.dataList = data.records |
|||
}).catch(() => { |
|||
_this.tableLoading = false |
|||
}) |
|||
}, |
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 删除 |
|||
doDel(row) { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|||
return |
|||
} |
|||
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|||
this.$confirm(tip, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
const _this = this |
|||
req.delBySids(this.sids).then(resp => { |
|||
loading.close() |
|||
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|||
_this.loadList() |
|||
}).catch(e => { |
|||
loading.close() |
|||
}) |
|||
}).catch(() => {}) |
|||
}, |
|||
// 子组件关闭(返回) |
|||
resetState() { |
|||
this.viewState = 1 |
|||
this.loadList() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.line { |
|||
display: inline-block; |
|||
margin: 0px 15px; |
|||
} |
|||
.listtop { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.tit { |
|||
margin-bottom: -10px; |
|||
} |
|||
|
|||
.pagination { |
|||
margin-bottom: -10px; |
|||
} |
|||
.formItem { |
|||
margin-right: 28px; |
|||
} |
|||
</style> |
@ -1,207 +1,305 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>【详情】排产申请</div> |
|||
<!--start 详情按钮--> |
|||
<div> |
|||
<el-button itype="info" size="small" @click="handleReturn()">返回</el-button> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--end 详情按钮--> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<div class="listconadd"><!-- --> |
|||
<div class="title">排产申请</div> |
|||
<el-form ref="form_obj" :model="formobj" :inline="true" label-width="120px"> |
|||
<div style="border-bottom: 2px solid #e0e3eb; height: 40px;"> |
|||
<!--第一行--> |
|||
<el-row> |
|||
<el-col :span="10" style="margin-left: 80px; height: 20px;"> |
|||
<el-form-item label="单据编号:">{{ formobj.applicationCode }}</el-form-item> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>排产申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6" style=" height: 20px;"> |
|||
<el-form-item label="制单人:">{{ formobj.makeListName }}</el-form-item> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="5" style=" height: 20px;"> |
|||
<el-form-item label="制单日期:">{{ formobj.applicationDate }}</el-form-item> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<div class="invoiceadd" style="margin-top: 5px;"> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item prop="schedulingType" label="排产类型"> |
|||
<el-input v-model="formobj.schedulingType" placeholder="" class="addinputw" |
|||
readonly/> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.createByName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="24"> |
|||
<el-form-item prop="depositPayment" label="排产订金使用"> |
|||
<el-input v-model="formobj.depositPayment" placeholder="" class="addinputw" |
|||
readonly/> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="24"> |
|||
<el-form-item prop="remarks" label="备注"> |
|||
<el-input v-model="formobj.remarks" placeholder="" class="addinputw" |
|||
readonly/> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="排产类型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.schedulingType" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">排产车型列表</div> |
|||
</div> |
|||
<div class="addtable"> |
|||
<div class="tabletitle"> |
|||
<div class="titlename"> |
|||
货物明细 |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" show-summary :summary-method="getSummaries" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车型" align="left" header-align="center" width="250"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<span>{{ scope.row.vehicleName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="configName"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="排产数量" header-align="center" width="130"> |
|||
<template slot-scope="scope" prop="quantity"> |
|||
<span>{{ scope.row.quantity }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="useDeposit" label="使用订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="useDeposit"> |
|||
<span>{{ scope.row.useDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="applyForDeposit" label="申请订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="applyForDeposit"> |
|||
<span>{{ scope.row.applyForDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售指导价" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="saleGuPrice"> |
|||
<span>{{ scope.row.saleGuPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center" width="200"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">订金使用情况</div> |
|||
</div> |
|||
<template class="tablelist"> |
|||
<!-- :rules="rules" <el-table :data="tableData" :index="index" border tyle="width: 100%">--> |
|||
<el-table |
|||
:data="formobj.busVehicleApplyDetailVoList" |
|||
:index="index" |
|||
border |
|||
style="width: 100%"> <!-- show-summary :summary-method="getSummaries" --> |
|||
<el-table-column |
|||
align="center" |
|||
label="序号" |
|||
type="index" |
|||
width="50"/> |
|||
<el-table-column prop="vehicleName" width="210" label="车型" align="center"> |
|||
<template slot-scope="props"> |
|||
<span>{{props.row.vehicleName}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="configName" width="210" label="简述配置" align="center"> |
|||
<template slot-scope="props"> |
|||
<!-- <el-input v-model="props.row.mName" style="width:120px;" class="tableinput"/>--> |
|||
<span>{{props.row.configName}}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="spOrDiConDes" width="300" label="特殊或差异配置说明" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.spOrDiConDes" style="width:203px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.model}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="actualQuantity" width="180" label="排产数量" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.actualQuantity" style="width:150px;" class="tableinput"/> |
|||
<!--<span>{{props.row.count}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="proSchDep" width="180" label="排产订金" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.proSchDep" style="width:150px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.leviedSubtotal}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="saleGuPrice " width="180" label="销售指导价" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.saleGuPrice " style="width:150px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.company}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="remarks" width="280" label="备注" align="center"> |
|||
<template slot-scope="props"> |
|||
<el-input v-model="props.row.remarks" style="width:180px;" class="tableinput"/> |
|||
<!-- <span>{{props.row.remarks}}</span>--> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</template> |
|||
<el-form ref="formobj" :model="formobj" label-width="130px" label-position="top" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="当前订金金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ formobj.currentAmount }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次需使用金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ useMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次申请金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ applyMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
|
|||
export default { |
|||
name: 'cheliangpaichanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
|
|||
viewState: 4, |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
orgSid: window.sessionStorage.getItem('orgSid'), // 部门sid |
|||
orgName: window.sessionStorage.getItem('departmentName'), // 部门名称 |
|||
makeListName: window.sessionStorage.getItem('name'),//制单人 |
|||
applicationCode:'', |
|||
applicationDate:'', |
|||
schedulingType: '',// 排产类型 |
|||
depositPayment: '', // 排产订金使用 |
|||
remarks: '', // 备注 |
|||
busVehicleApplyDetailDtoList: [{ |
|||
vehicleName: '', // 车型 |
|||
configName: '', // 简述配置 |
|||
spOrDiConDes: '', // 特殊或差异 |
|||
actualQuantity: '', // 排产数量 |
|||
proSchDep: '', // 排产订金 |
|||
saleGuPrice: '', // 销售指导价 |
|||
remarks:'' // 备注 |
|||
}] |
|||
}, |
|||
} |
|||
}, |
|||
methods: { |
|||
handleReturn() { |
|||
this.formobj.scmOtherInboundDto = {} |
|||
this.formobj.scmOtherInboundDetailDto = [{}] |
|||
this.$emit('doback') |
|||
}, |
|||
showInfo(sid, row) { |
|||
this.viewTitle = '其他入库单详情' |
|||
const _this = this |
|||
console.log('详情页面', sid) |
|||
req.fetchBySid(sid).then(resp => { |
|||
const data = resp.data |
|||
// this.formobj = data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.depositPayment = data.depositPayment |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
// //明细表 |
|||
this.formobj.busVehicleApplyDetailVoList = data.busVehicleApplyDetailVoList |
|||
}).catch(e => { |
|||
this.formobj = row |
|||
}) |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
export default { |
|||
name: 'cheliangpaichanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
useMoney: '', // 本次需使用金额 |
|||
applyMoney: '', // 本次申请金额 |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
createByName: window.sessionStorage.getItem('name'), // 制单人 |
|||
applicationCode: '', // 申请编号 |
|||
applicationDate: '', // 申请日期 |
|||
schedulingType: '', // 排产类型 |
|||
remarks: '', // 备注 |
|||
currentAmount: '', // 当前订金金额 |
|||
busVehicleApplyDetailDtoList: [] |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '排产申请详情' |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.currentAmount = data.currentAmount |
|||
this.formobj.sid = sid |
|||
this.formobj.busVehicleApplyDetailDtoList = data.busVehicleApplyDetailVoList |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.schedulingType = '' // 排产类型 |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.currentAmount = '' |
|||
this.formobj.createByName = '' |
|||
this.formobj.createBySid = '' |
|||
this.formobj.applicationCode = '' |
|||
this.formobj.applicationDate = '' |
|||
this.formobj.busVehicleApplyDetailDtoList = [] |
|||
this.list1 = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { columns, data } = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '合计' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'useDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.useMoney = sums[index] += '' |
|||
} else if (column.property === 'applyForDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.applyMoney = sums[index] += '' |
|||
} else { |
|||
if (!values.every(value => isNaN(value))) { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.amount = sums[index] += '' |
|||
} else { |
|||
sums[index] = '' |
|||
} |
|||
} |
|||
}) |
|||
return sums |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/* 利用穿透,设置input边框隐藏 */ |
|||
.invoiceadd >>> .el-input__inner { |
|||
border: 0; |
|||
border-bottom: 1px solid #e0e3eb !important; |
|||
} |
|||
|
|||
/* 如果你的 el-input type 设置成textarea ,就要用这个了 */ |
|||
/*.invoiceadd>>>.el-textarea__inner { |
|||
border: 0; |
|||
resize: none;!* 这个是去掉 textarea 下面拉伸的那个标志,如下图 *! |
|||
}*/ |
|||
.invoiceadd >>> .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
|
|||
.el-input { |
|||
width: 230px; |
|||
} |
|||
|
|||
.el-col .el-form-item { |
|||
margin-bottom: 10px; |
|||
} |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.formadd{ |
|||
padding: 0px !important; |
|||
} |
|||
.icon { |
|||
color: #e84026; |
|||
margin-right: 4px; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,191 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>车型常用列表</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="webcon"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="客户名称:"> |
|||
<el-input v-model="listQuery.params.customerName" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="合同编号:"> |
|||
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<div class="searchbtns"> |
|||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" @click="handresetting">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center"/> |
|||
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column label="车型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.modelName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
|
|||
export default { |
|||
name: "chexingbyconfiguration", |
|||
components: { |
|||
Pagination |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
tableKey: 0, |
|||
showbackState: 30, |
|||
sids: [], |
|||
list: [], |
|||
datalist: [], |
|||
number: '', |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 1 |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
// 加载列表 |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
init() { |
|||
this.getList() |
|||
}, |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.configurationlistPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.code == '200') { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.getList() |
|||
}, |
|||
// 重置按钮 |
|||
handresetting() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
handleSelectionChange(row) { |
|||
this.sids = [] |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push({ |
|||
modelName: element.modelName, |
|||
modelSid: element.modelSid, |
|||
configName: element.configName, |
|||
configurationItemsSid: element.configurationItemsSid |
|||
}) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
showData(value) { |
|||
if (value.length > 0){ |
|||
for (var i = 0; i < value.length; i++) { |
|||
this.datalist.push(value[i]) |
|||
} |
|||
} else { |
|||
this.datalist = [] |
|||
} |
|||
if (this.datalist.length > 0) { |
|||
for (var j = 0; j < this.datalist.length; j++) { |
|||
for (var k = 0; k < this.list.length; k++) { |
|||
if (this.datalist[j].vehicleName == this.list[k].modelName && this.datalist[j].configName == this.list[k].configName) { |
|||
this.$refs.multipleTable.toggleRowSelection(this.list[k], true) |
|||
} |
|||
} |
|||
} |
|||
} else { |
|||
this.$refs.multipleTable.clearSelection() |
|||
} |
|||
}, |
|||
// 添加修改返回 |
|||
AddUpdateReturn() { |
|||
if (this.sids.length > 0) { |
|||
this.$emit('backData', this.sids) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '请选择至少一条记录进行删除操作!', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,455 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState== 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="dialogStatus === 'add' ? saveAdd() : saveEdit()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" @click="submitVehicleApply()">提交 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>排产申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.createByName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="排产类型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-select v-model="formobj.schedulingType" placeholder="请选择" clearable> |
|||
<el-option v-for="item in schedulingType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">排产车型列表</div> |
|||
<div style="margin-left: 15px"> |
|||
<el-button type="primary" size="small" icon="el-icon-plus" @click="addCommodity()">添加</el-button> |
|||
</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" show-summary :summary-method="getSummaries" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column fixed prop="name" label="操作" width="80px" align="center" header-align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button size="mini" type="danger" @click="dataDelete(scope.$index, formobj.busVehicleApplyDetailDtoList[scope.$index])">删除 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="车型" align="left" header-align="center" width="250"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<span>{{ scope.row.vehicleName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="configName"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="排产数量" header-align="center" width="130"> |
|||
<template slot-scope="scope" prop="quantity"> |
|||
<el-input v-model="scope.row.quantity" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="useDeposit" label="使用订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="useDeposit"> |
|||
<el-input v-model="scope.row.useDeposit" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="applyForDeposit" label="申请订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="applyForDeposit"> |
|||
<el-input v-model="scope.row.applyForDeposit" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售指导价" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="saleGuPrice"> |
|||
<el-input v-model="scope.row.saleGuPrice" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">订金使用情况</div> |
|||
</div> |
|||
<el-form ref="formobj" :model="formobj" label-width="130px" label-position="top" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="当前订金金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.currentAmount" placeholder="" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次需使用金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ useMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次申请金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ applyMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
<!--选择车型和常用配置--> |
|||
<configuration v-show="viewState == 2" ref="divconfiguration" @backData="backData" @doback="closePage"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
import configuration from './chexingbyconfiguration' |
|||
export default { |
|||
name: 'cheliangpaichanEdit', |
|||
components: { |
|||
configuration |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
dialogStatus: '', |
|||
viewState: 1, |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 下拉框 |
|||
schedulingType_list: [], // 排产订金使用 |
|||
list1: [], |
|||
useMoney: '', // 本次需使用金额 |
|||
applyMoney: '', // 本次申请金额 |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
createByName: window.sessionStorage.getItem('name'), // 制单人 |
|||
applicationCode: '', // 申请编号 |
|||
applicationDate: '', // 申请日期 |
|||
schedulingType: '', // 排产类型 |
|||
remarks: '', // 备注 |
|||
currentAmount: '', // 当前订金金额 |
|||
busVehicleApplyDetailDtoList: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|||
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|||
const info = window.location.href.slice(a, b) |
|||
var sid = info.substr(info.indexOf('=') + 1) |
|||
this.showInfo(sid) |
|||
this.getSchedulingType() |
|||
}, |
|||
methods: { |
|||
// 下拉框-排产类型 |
|||
getSchedulingType() { |
|||
req.pullDown({ type: 'schedulingType' }).then((res) => { |
|||
if (res.code == '200') { |
|||
this.schedulingType_list = res.data |
|||
console.log('下拉框请求111', res.data) |
|||
} |
|||
}) |
|||
}, |
|||
// 明细表添加一行数据 |
|||
addCommodity() { |
|||
this.viewState = 2 |
|||
this.$refs['divconfiguration'].showData(this.list1) |
|||
}, |
|||
// 明细表删除一行数据 |
|||
dataDelete(index, row) { |
|||
this.formobj.busVehicleApplyDetailDtoList.splice(index, 1) |
|||
this.list1.splice(index, 1) |
|||
}, |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.dialogStatus = 'edit' |
|||
this.viewTitle = '【编辑】排产申请' |
|||
console.log('编辑回显', sid) |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.currentAmount = data.currentAmount |
|||
this.formobj.sid = sid |
|||
this.formobj.busVehicleApplyDetailDtoList = data.busVehicleApplyDetailVoList |
|||
this.list1 = data.busVehicleApplyDetailVoList |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
// 车型常用配置列表--新增确定返回的数据 |
|||
backData(value) { |
|||
this.viewState = 1 |
|||
// this.formobj.busVehicleApplyDetailDtoList = [] |
|||
if (this.formobj.busVehicleApplyDetailDtoList.length > 0) { |
|||
for (var i = 0; i < value.length; i++) { |
|||
for (var u = 0; u < this.formobj.busVehicleApplyDetailDtoList.length; u++) { |
|||
if (value[i].modelName == this.formobj.busVehicleApplyDetailDtoList[u].vehicleName && value[i].configName == this.formobj.busVehicleApplyDetailDtoList[u].configName) { |
|||
value.splice(value[i], 1) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (value.length > 0) { |
|||
value.forEach((e) => { |
|||
this.formobj.busVehicleApplyDetailDtoList.push({ |
|||
quantity: '', |
|||
applySid: '', |
|||
configSid: e.configurationItemsSid, |
|||
configName: e.configName, |
|||
useDeposit: '', |
|||
applyForDeposit: '', |
|||
remarks: '', |
|||
saleGuPrice: '', |
|||
vehicleName: e.modelName, |
|||
vehicleSid: e.modelSid |
|||
}) |
|||
}) |
|||
this.list1 = this.formobj.busVehicleApplyDetailDtoList |
|||
} |
|||
}, |
|||
saveAdd() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveAdd(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
if (resp.code == '200') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
saveEdit() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveEdit(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
submitVehicleApply() { |
|||
console.log(this.formobj,858585) |
|||
req.submitVehicleApply(this.formobj).then((res) => { |
|||
if (res.code == '200') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '提交成功' |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '提交失败' |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.schedulingType = '' // 排产类型 |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.currentAmount = '' |
|||
this.formobj.applicationCode = '' |
|||
this.formobj.applicationDate = '' |
|||
this.formobj.busVehicleApplyDetailDtoList = [] |
|||
this.list1 = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$refs['divconfiguration'].getList() |
|||
this.$emit('doback') |
|||
}, |
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { columns, data } = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '合计' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'useDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.useMoney = sums[index] += '' |
|||
} else if (column.property === 'applyForDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.applyMoney = sums[index] += '' |
|||
} else { |
|||
if (!values.every(value => isNaN(value))) { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.amount = sums[index] += '' |
|||
} else { |
|||
sums[index] = '' |
|||
} |
|||
} |
|||
}) |
|||
return sums |
|||
}, |
|||
closePage() { |
|||
this.viewState = 1 |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
/* padding: 0 10px 0 0; */ |
|||
text-align: right; |
|||
} |
|||
.formadd{ |
|||
padding: 0px !important; |
|||
} |
|||
.icon { |
|||
color: #e84026; |
|||
margin-right: 4px; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,529 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button v-show="transactState=='00'" type="primary" @click="openAgree">同 意</el-button> |
|||
<el-button v-show="transactState=='00'" type="danger" @click="openReject">驳 回</el-button> |
|||
<el-button v-show="transactState=='00'" type="danger" @click="openStop">终 止</el-button> |
|||
<el-button v-show="transactState=='01'" type="danger" @click="openRevoke">撤 回 </el-button> |
|||
<el-button type="info" @click="centerDialogVisible = false">关 闭</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>排产申请</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.createByName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationDate" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="排产类型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.schedulingType" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div v-show="transactState=='00'"> |
|||
<!-- <div class="diaTitle"><i class="el-icon-chat-line-square"></i><span>审批意见</span></div>--> |
|||
<el-form :model="dialogList" :inline="true" label-width="80px"> |
|||
<el-row> |
|||
<el-col> |
|||
<el-form-item label="审批意见"> |
|||
<el-input v-model="dialogList.comment" type="textarea" maxlength="20" placeholder="请输入审批意见" class="inputType" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">排产车型列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.busVehicleApplyDetailDtoList" :index="index" show-summary :summary-method="getSummaries" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车型" align="left" header-align="center" width="250"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<span>{{ scope.row.vehicleName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="configName"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="排产数量" header-align="center" width="130"> |
|||
<template slot-scope="scope" prop="quantity"> |
|||
<span>{{ scope.row.quantity }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="useDeposit" label="使用订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="useDeposit"> |
|||
<span>{{ scope.row.useDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="applyForDeposit" label="申请订金" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="applyForDeposit"> |
|||
<span>{{ scope.row.applyForDeposit }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="销售指导价" header-align="center" width="150"> |
|||
<template slot-scope="scope" prop="saleGuPrice"> |
|||
<span>{{ scope.row.saleGuPrice }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center" width="200"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">订金使用情况</div> |
|||
</div> |
|||
<el-form ref="formobj" :model="formobj" label-width="130px" label-position="top" class="formadd"> |
|||
<el-row> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="当前订金金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ formobj.currentAmount }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次需使用金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ useMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="el-form-item-right"> |
|||
<el-form-item label="本次申请金额"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item> |
|||
{{ applyMoney }} |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
import { businessAgree, rejectTask, breakTask, revokeTask } from '@/api/flow/todo' |
|||
export default { |
|||
name: 'cheliangpaichanInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
useMoney: '', // 本次需使用金额 |
|||
applyMoney: '', // 本次申请金额 |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
createBySid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
createByName: window.sessionStorage.getItem('name'), // 制单人 |
|||
applicationCode: '', // 申请编号 |
|||
applicationDate: '', // 申请日期 |
|||
schedulingType: '', // 排产类型 |
|||
remarks: '', // 备注 |
|||
currentAmount: '', // 当前订金金额 |
|||
busVehicleApplyDetailDtoList: [] |
|||
}, |
|||
transactState: '', // 办理状态 |
|||
// 同意办理列表 |
|||
agreeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 驳回列表 |
|||
regectList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 终止列表 |
|||
stopList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
// 撤回 |
|||
revokeList: { |
|||
businessSid: '', |
|||
comment: '', |
|||
instanceId: '', |
|||
taskId: '', |
|||
userSid: window.sessionStorage.getItem('userSid') |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var a = window.location.href.indexOf('?') + 1 // 第一个?后面的一个字符的位置 |
|||
var b = window.location.href.indexOf('#data') // 第一个#data出现的位置 |
|||
const info = window.location.href.slice(a, b) |
|||
var sid = info.substr(info.indexOf('=') + 1) |
|||
this.showInfo(sid) |
|||
// ===获取参数 |
|||
var one = window.location.href.lastIndexOf('#') + 1 |
|||
var two = window.location.href.lastIndexOf('}') + 1 |
|||
const data = decodeURI(window.location.href.slice(one, two)) // url解码unescape()已从web中移除,尽量不使用 |
|||
var tar = data.substr(data.indexOf('=') + 1) |
|||
const obj = JSON.parse(tar) |
|||
console.log('iframe页面获取的obj:', obj) |
|||
// 同意列表 |
|||
this.agreeList.businessSid = sid |
|||
this.agreeList.instanceId = obj.instanceId |
|||
this.agreeList.taskId = obj.taskId |
|||
// 驳回列表 |
|||
this.regectList.businessSid = sid |
|||
this.regectList.instanceId = obj.instanceId |
|||
this.regectList.taskId = obj.taskId |
|||
// 终止列表 |
|||
this.stopList.businessSid = sid |
|||
this.stopList.instanceId = obj.instanceId |
|||
this.stopList.taskId = obj.taskId |
|||
// 撤回列表 |
|||
this.revokeList.businessSid = sid |
|||
this.revokeList.instanceId = obj.instanceId |
|||
this.revokeList.taskId = obj.taskId |
|||
// 办理状态 |
|||
this.transactState = obj.transactState |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '排产申请详情' |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.applicationDate = data.applicationDate |
|||
this.formobj.schedulingType = data.schedulingType |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.currentAmount = data.currentAmount |
|||
this.formobj.sid = sid |
|||
this.formobj.busVehicleApplyDetailDtoList = data.busVehicleApplyDetailVoList |
|||
}).catch((e) => { |
|||
this.formobj = {} |
|||
}) |
|||
}, |
|||
// 同意 |
|||
openAgree() { |
|||
this.$confirm('是否确认执行同意操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleAgree() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消同意' |
|||
}) |
|||
}) |
|||
}, |
|||
// 驳回 |
|||
openReject() { |
|||
this.$confirm('是否确认执行驳回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleReject() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消驳回' |
|||
}) |
|||
}) |
|||
}, |
|||
// 终止 |
|||
openStop() { |
|||
this.$confirm('是否确认执行终止操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleStop() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消终止' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.agreeList.comment = this.dialogList.comment |
|||
businessAgree(this.agreeList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
this.refreshIt() |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.stopList.comment = this.dialogList.comment |
|||
breakTask(this.stopList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.regectList.comment = this.dialogList.comment |
|||
rejectTask(this.regectList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
this.revokeList.comment = this.dialogList.comment |
|||
revokeTask(this.revokeList).then((response) => { |
|||
if (response.code === '200') { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 合计 |
|||
getSummaries(param) { |
|||
const { columns, data } = param |
|||
const sums = [] |
|||
columns.forEach((column, index) => { |
|||
if (index === 0) { |
|||
sums[index] = '合计' |
|||
return |
|||
} |
|||
const values = data.map(item => Number(item[column.property])) |
|||
if (column.property === 'useDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.useMoney = sums[index] += '' |
|||
} else if (column.property === 'applyForDeposit') { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.applyMoney = sums[index] += '' |
|||
} else { |
|||
if (!values.every(value => isNaN(value))) { |
|||
sums[index] = values.reduce((prev, curr) => { |
|||
const value = Number(curr) |
|||
if (!isNaN(value)) { |
|||
return prev + curr |
|||
} else { |
|||
return prev |
|||
} |
|||
}, 0) |
|||
sums[index] += '' |
|||
this.amount = sums[index] += '' |
|||
} else { |
|||
sums[index] = '' |
|||
} |
|||
} |
|||
}) |
|||
return sums |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.diaTitle { |
|||
padding: 30px 0 15px 0; |
|||
font-size: 20px; |
|||
font-weight: 500; |
|||
} |
|||
.inputType { |
|||
width: 600px; |
|||
} |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
.formadd{ |
|||
padding: 0px !important; |
|||
} |
|||
.icon { |
|||
color: #e84026; |
|||
margin-right: 4px; |
|||
} |
|||
</style> |
@ -0,0 +1,191 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>车型常用列表</div> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="webcon"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|||
<el-form-item label="客户名称:"> |
|||
<el-input v-model="listQuery.params.customerName" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="合同编号:"> |
|||
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<div class="searchbtns"> |
|||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" @click="handresetting">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange"> |
|||
<el-table-column width="50px" type="selection" align="center"/> |
|||
<el-table-column width="80px" label="编号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column label="车型" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.modelName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="常用配置" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.configName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Pagination from '@/components/pagination' |
|||
import req from '@/api/supplychain/busvehicleapply' |
|||
|
|||
export default { |
|||
name: "chexingbyconfiguration", |
|||
components: { |
|||
Pagination |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
tableKey: 0, |
|||
showbackState: 30, |
|||
sids: [], |
|||
list: [], |
|||
datalist: [], |
|||
number: '', |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 1 |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
// 加载列表 |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
init() { |
|||
this.getList() |
|||
}, |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
req.configurationlistPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.code == '200') { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.getList() |
|||
}, |
|||
// 重置按钮 |
|||
handresetting() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
contractNo: '', |
|||
customerName: '' |
|||
}, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
handleSelectionChange(row) { |
|||
this.sids = [] |
|||
const aa = [] |
|||
row.forEach((element) => { |
|||
aa.push({ |
|||
modelName: element.modelName, |
|||
modelSid: element.modelSid, |
|||
configName: element.configName, |
|||
configurationItemsSid: element.configurationItemsSid |
|||
}) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
showData(value) { |
|||
if (value.length > 0){ |
|||
for (var i = 0; i < value.length; i++) { |
|||
this.datalist.push(value[i]) |
|||
} |
|||
} else { |
|||
this.datalist = [] |
|||
} |
|||
if (this.datalist.length > 0) { |
|||
for (var j = 0; j < this.datalist.length; j++) { |
|||
for (var k = 0; k < this.list.length; k++) { |
|||
if (this.datalist[j].vehicleName == this.list[k].modelName && this.datalist[j].configName == this.list[k].configName) { |
|||
this.$refs.multipleTable.toggleRowSelection(this.list[k], true) |
|||
} |
|||
} |
|||
} |
|||
} else { |
|||
this.$refs.multipleTable.clearSelection() |
|||
} |
|||
}, |
|||
// 添加修改返回 |
|||
AddUpdateReturn() { |
|||
if (this.sids.length > 0) { |
|||
this.$emit('backData', this.sids) |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '请选择至少一条记录进行删除操作!', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,276 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveEdit()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" @click="submitVehicleApply()">提交 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>车辆入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="采购订单编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.purchaseOrderNo" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="车型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.modelName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="常用配置:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linethree"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">车辆列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row style="margin-top: 10px"> |
|||
<el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="厂家发车日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="formobj.departureDate" clearable type="date" placeholder="开始日期"/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
export default { |
|||
name: 'ruzhangAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
applicationSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
applicationName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applicationCode: '', // 申请编号 |
|||
configName: '', |
|||
departureDate: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', // 备注 |
|||
vehicleOrderSid: '', |
|||
vehicleList: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showEdit(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【编辑】入账单' |
|||
console.log('编辑回显', sid, row) |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
this.formobj.configName = data.configName |
|||
this.formobj.departureDate = data.departureDate |
|||
this.formobj.modelName = data.modelName |
|||
this.formobj.modelSid = data.modelSid |
|||
this.formobj.purchaseOrderNo = data.purchaseOrderNo |
|||
this.formobj.vehicleOrderSid = data.vehicleOrderSid |
|||
if (data.inboundVehicleList.length > 0) { |
|||
data.inboundVehicleList.forEach((e) => { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: e.applySid, |
|||
remarks: e.remarks, |
|||
modelSid: e.modelSid, |
|||
sid: e.sid, |
|||
vinNo: e.vinNo |
|||
}) |
|||
}) |
|||
} else { |
|||
for (var i = 0; i < row[0].vehicleNum; i++) { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: '', |
|||
remarks: '', |
|||
modelSid: this.formobj.modelSid, |
|||
sid: '', |
|||
vinNo: '' |
|||
}) |
|||
} |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
saveEdit() { |
|||
console.log(this.formobj, 636363) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
submitVehicleApply() { |
|||
req.submitVehicleApply(this.formobj).then((res) => { |
|||
if (res.code == '200') { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '提交成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '提交失败' |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.departureDate = '' |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.vehicleList = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linethree .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
/* padding: 0 10px 0 0; */ |
|||
text-align: right; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,219 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>{{ viewTitle }}</div> |
|||
<!--start 添加修改按钮--> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<!--标题按钮部分结束--> |
|||
<!--Start 新增修改部分--> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>车辆入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="lineone"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationCode" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="采购订单编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.purchaseOrderNo" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请人:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="5"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.applicationName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="车型:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.modelName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="常用配置:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" clearable readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">车辆列表</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable readonly/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable readonly/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row class="linetwo" style="margin-top: 10px"> |
|||
<el-col> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="厂家发车日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.departureDate" placeholder="" class="addinputw" clearable readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
export default { |
|||
name: 'ruzhangInfo', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
applicationSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
applicationName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applicationCode: '', // 申请编号 |
|||
configName: '', |
|||
departureDate: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', // 备注 |
|||
vehicleOrderSid: '', |
|||
vehicleList: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '入账单详情' |
|||
console.log('编辑回显', sid, row) |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
this.formobj.configName = data.configName |
|||
this.formobj.departureDate = data.departureDate |
|||
this.formobj.modelName = data.modelName |
|||
this.formobj.modelSid = data.modelSid |
|||
this.formobj.purchaseOrderNo = data.purchaseOrderNo |
|||
this.formobj.vehicleOrderSid = data.vehicleOrderSid |
|||
if (data.inboundVehicleList.length > 0) { |
|||
data.inboundVehicleList.forEach((e) => { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: e.applySid, |
|||
remarks: e.remarks, |
|||
modelSid: e.modelSid, |
|||
sid: e.sid, |
|||
vinNo: e.vinNo |
|||
}) |
|||
}) |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.departureDate = '' |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.vehicleList = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.lineone { |
|||
border-bottom: 2px solid #e0e3eb; |
|||
} |
|||
.lineone .el-form-item { |
|||
margin-bottom: -10px; |
|||
} |
|||
.lineone >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue