Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
cc0bb3e292
|
|
@ -148,4 +148,7 @@ public class LeaseApplyInfo implements Serializable {
|
|||
@ApiModelProperty(value = "设备数据所属组织类型")
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value="审批状态id")
|
||||
private String examineStatusId;
|
||||
|
||||
}
|
||||
|
|
@ -289,34 +289,21 @@ public class TmTaskController extends BaseController {
|
|||
LeaseApplyInfo infoAdd = new LeaseApplyInfo();
|
||||
if(list.size()<2){
|
||||
List<List<LeaseApplyDetails>> deviceByCompanyList = CollUtil.groupByField(task.getLeaseApplyDetails(), "companyId");
|
||||
String companyId="";
|
||||
for (List<LeaseApplyDetails> leaseApplyDetailsList : deviceByCompanyList) {
|
||||
companyId = leaseApplyDetailsList.get(0).getCompanyId() + "@" ;
|
||||
}
|
||||
|
||||
LeaseApplyInfo info = new LeaseApplyInfo();
|
||||
infoAdd.setTaskId(task.getTaskId().intValue());
|
||||
infoAdd.setCode(task.getLeaseApplyInfoList().get(0).getCode());
|
||||
infoAdd.setLeasePerson(task.getLeaseApplyInfoList().get(0).getLeasePerson());
|
||||
infoAdd.setPhone(task.getLeaseApplyInfoList().get(0).getPhone());
|
||||
infoAdd.setRemark(task.getLeaseApplyInfoList().get(0).getRemark());
|
||||
infoAdd.setType(task.getLeaseApplyInfoList().get(0).getType());
|
||||
|
||||
if(companyId.contains("101")){
|
||||
info.setId(101);
|
||||
info.setTaskId(task.getTaskId().intValue());
|
||||
LeaseApplyInfo bean = tmTaskService.getListSomeol(info);
|
||||
if(bean==null){
|
||||
infoAdd.setCompanyId(101);
|
||||
leaseApplyInfoService.genderLeaseCode(infoAdd);
|
||||
}
|
||||
}else if(companyId.contains("102")){
|
||||
info.setId(102);
|
||||
info.setTaskId(task.getTaskId().intValue());
|
||||
LeaseApplyInfo bean = tmTaskService.getListSomeol(info);
|
||||
if(bean==null){
|
||||
infoAdd.setCompanyId(102);
|
||||
leaseApplyInfoService.genderLeaseCode(infoAdd);
|
||||
for (List<LeaseApplyDetails> leaseApplyDetailsList : deviceByCompanyList) {
|
||||
if(leaseApplyDetailsList.get(0).getParenntId() == null ){
|
||||
if(leaseApplyDetailsList.get(0).getCompanyId()==101){
|
||||
infoAdd.setCompanyId(101);
|
||||
leaseApplyInfoService.genderLeaseCode(infoAdd);
|
||||
}else if(leaseApplyDetailsList.get(0).getCompanyId()==102){
|
||||
infoAdd.setCompanyId(102);
|
||||
leaseApplyInfoService.genderLeaseCode(infoAdd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -328,7 +315,6 @@ public class TmTaskController extends BaseController {
|
|||
tmTaskService.updateLeaseInfo(bean);
|
||||
|
||||
for (LeaseApplyInfo leaseApplyInfo : task.getLeaseApplyInfoList()) {
|
||||
|
||||
if (leaseApplyInfo == null || leaseApplyInfo.getId() == null) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -340,7 +326,12 @@ public class TmTaskController extends BaseController {
|
|||
// 删除后,插入新地领料任务明细
|
||||
if (StringUtils.isNotNull(leaseApplyInfo.getId())) {
|
||||
for (LeaseApplyDetails leaseApplyDetails : leaseApplyInfo.getLeaseApplyDetails()) {
|
||||
leaseApplyDetails.setParenntId(leaseApplyInfo.getId()); // 设置领料任务ID
|
||||
if(leaseApplyDetails.getParenntId() == null){
|
||||
leaseApplyDetails.setParenntId(infoAdd.getId());
|
||||
}else{
|
||||
leaseApplyDetails.setParenntId(leaseApplyInfo.getId()); // 设置领料任务ID
|
||||
}
|
||||
|
||||
}
|
||||
// 插入领料任务明细
|
||||
boolean addLeaseTaskDetailsResult = leaseApplyDetailsService.batchInsert(leaseApplyInfo.getLeaseApplyDetails()) > 0;
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ public class TmTaskServiceImpl implements TmTaskService{
|
|||
if (CollUtil.isNotEmpty(record.getLeaseApplyInfoList())) {
|
||||
for (LeaseApplyInfo leaseApplyInfo : record.getLeaseApplyInfoList()) {
|
||||
if (leaseApplyInfo != null) {
|
||||
leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
|
||||
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
|
||||
// 再审核领料任务详情表
|
||||
if (CollUtil.isNotEmpty(leaseApplyInfo.getLeaseApplyDetails())) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class CommonConstants {
|
|||
public static final String SGJJ = "施工机具";
|
||||
/** 安全工器具*/
|
||||
public static final String AQGQJ = "安全工器具";
|
||||
/** 机具分公司*/
|
||||
/** 机具设备分公司*/
|
||||
public static final String JJ = "机具设备分公司";
|
||||
/** 调试分公司*/
|
||||
public static final String TS = "调试分公司";
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
@Override
|
||||
public AjaxResult getMaterialReqData() {
|
||||
HashMap<Object, Object> map = new HashMap<>(2);
|
||||
// 施工工具、安全工器具数量
|
||||
// 施工机具、安全工器具数量
|
||||
int num = 0, num2 = 0;
|
||||
try {
|
||||
List<MaTypeDo> list = mapper.getMaterialReqData(DateTimeHelper.getNowDate());
|
||||
|
|
@ -48,7 +48,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
@Override
|
||||
public AjaxResult getMaterialReturnData() {
|
||||
HashMap<Object, Object> map = new HashMap<>(2);
|
||||
// 施工工具、安全工器具数量
|
||||
// 施工机具、安全工器具数量
|
||||
int num = 0, num2 = 0;
|
||||
try {
|
||||
List<MaTypeDo> list = mapper.getMaterialReturnData(DateTimeHelper.getNowDate());
|
||||
|
|
@ -80,9 +80,9 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
ParamsDto dto = new ParamsDto();
|
||||
try {
|
||||
// 施工机具
|
||||
TotalOwnershipVo vo = countNum("1", CommonConstants.SGJJ);
|
||||
TotalOwnershipVo vo = countNum("1", CommonConstants.JJ);
|
||||
// 安全工器具
|
||||
TotalOwnershipVo vo2 = countNum("2", CommonConstants.AQGQJ);
|
||||
TotalOwnershipVo vo2 = countNum("2", CommonConstants.TS);
|
||||
list.add(vo);
|
||||
list.add(vo2);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -146,7 +146,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
HashMap<Object, Object> map = new HashMap<>(3);
|
||||
try {
|
||||
dto.setType("1");
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.SGJJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.AQGQJ : null);
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.JJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.TS : null);
|
||||
List<MaterialDataVo> lyList = mapper.getScrapAnalysisByMonth(dto);
|
||||
dto.setType("2");
|
||||
List<MaterialDataVo> bfList = mapper.getScrapAnalysisByMonth(dto);
|
||||
|
|
@ -169,7 +169,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
List<String> yearMonthList = DateTimeHelper.getYearMonth();
|
||||
List<Integer> valueList = new ArrayList<>();
|
||||
List<Integer> valueList2 = new ArrayList<>();
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.SGJJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.AQGQJ : null);
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.JJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.TS : null);
|
||||
try {
|
||||
for (String date : yearMonthList) {
|
||||
String year = date.substring(0, 4);
|
||||
|
|
@ -208,7 +208,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
int num = 0, num2 = 0;
|
||||
String rate = "0%", rate2 = "0%";
|
||||
try {
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.SGJJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.AQGQJ : null);
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.JJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.TS : null);
|
||||
dto.setStartDate(monthDayMap.get("beginDate"));
|
||||
dto.setEndDate(monthDayMap.get("endDate"));
|
||||
List<MaTypeDo> list = mapper.getPickingAnalysisByMonth(dto);
|
||||
|
|
@ -235,7 +235,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
Map<String, String> monthDayMap = DateTimeHelper.getNowOneMonthDay();
|
||||
dto.setStartDate(monthDayMap.get("beginDate"));
|
||||
dto.setEndDate(monthDayMap.get("endDate"));
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.SGJJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.AQGQJ : null);
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.JJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.TS : null);
|
||||
try {
|
||||
List<ScrapAnalysisVo> list = mapper.getMaterialReturnByMonth(dto);
|
||||
List<Integer> valueList = commonUtil.setMaterialReturnData(list);
|
||||
|
|
@ -259,7 +259,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
|||
Map<String, String> monthDayMap = DateTimeHelper.getNowOneMonthDay();
|
||||
dto.setStartDate(monthDayMap.get("beginDate"));
|
||||
dto.setEndDate(monthDayMap.get("endDate"));
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.SGJJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.AQGQJ : null);
|
||||
dto.setMaTypeName(Objects.equals("1", dto.getMaType()) ? CommonConstants.JJ : Objects.equals("2", dto.getMaType()) ? CommonConstants.TS : null);
|
||||
try {
|
||||
List<ScrapAnalysisVo> list = mapper.getMaintenanceByMonth(dto);
|
||||
List<Integer> valueList = commonUtil.setMaintenanceData(list);
|
||||
|
|
|
|||
|
|
@ -585,19 +585,20 @@
|
|||
lease_apply_info
|
||||
set
|
||||
<trim suffixOverrides=",">
|
||||
<if test="record.companyAuditBy != null and record.companyAuditBy != ''">
|
||||
<if test="record.examineStatusId == 30 and record.examineStatusId == '30'">
|
||||
company_audit_by = #{record.companyAuditBy},
|
||||
company_audit_time = now(),
|
||||
company_audit_remark = #{record.companyAuditRemark},
|
||||
</if>
|
||||
<if test="record.deptAuditBy != null and record.deptAuditBy != ''">
|
||||
<if test="record.examineStatusId == 31 and record.examineStatusId == '31'">
|
||||
dept_audit_by = #{record.companyAuditBy},
|
||||
dept_audit_time = now(),
|
||||
dept_audit_remark = #{record.companyAuditRemark},
|
||||
</if>
|
||||
<if test="record.directAuditBy != null and record.directAuditBy != ''">
|
||||
direct_audit_by = #{record.directAuditBy},
|
||||
direct_audit_time = now()
|
||||
<if test="record.examineStatusId == 32 and record.examineStatusId == '32'">
|
||||
direct_audit_by = #{record.companyAuditBy},
|
||||
direct_audit_time = now(),
|
||||
direct_audit_remark = #{record.companyAuditRemark},
|
||||
</if>
|
||||
</trim>
|
||||
WHERE
|
||||
|
|
|
|||
|
|
@ -27,23 +27,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!--当月领料分析-->
|
||||
<select id="getPickingAnalysisByMonth" resultType="com.bonus.sgzb.largeScreen.domain.MaTypeDo">
|
||||
SELECT lod.out_num AS num,
|
||||
a.typeName,
|
||||
a.manage_type AS manageType
|
||||
mt.type_name AS typeName,
|
||||
mt.manage_type AS manageType
|
||||
FROM lease_out_details lod
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName,mt.manage_type
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON lod.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON lod.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE lod.create_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59')
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</select>
|
||||
<!--设备分布-->
|
||||
|
|
@ -53,44 +47,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
/*验收*/
|
||||
<if test="type == 1">
|
||||
SELECT pcd.check_num AS num,
|
||||
a.typeName
|
||||
mt.type_name AS typeName
|
||||
FROM purchase_check_info pci
|
||||
LEFT JOIN purchase_check_details pcd ON pci.task_id = pcd.task_id
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON pcd.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE pci.arrival_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59')
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</if>
|
||||
/*入库*/
|
||||
<if test="type == 2">
|
||||
SELECT iad.input_num,
|
||||
a.typeName
|
||||
mt.type_name AS typeName
|
||||
FROM input_apply_details iad
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON iad.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON iad.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE iad.create_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59') AND iad.input_type = '1'
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
|
@ -101,24 +83,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT SUM(lod.out_num) AS num,
|
||||
bui.unit_name AS unitName
|
||||
FROM lease_out_details lod
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON lod.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON lod.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
LEFT JOIN lease_apply_info lai ON lod.parent_id = lai.id
|
||||
LEFT JOIN tm_task_agreement tta ON lai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_unit_info bui ON bai.unit_id = bui.unit_id
|
||||
<where>
|
||||
<if test="maType!=null and maType == 1">
|
||||
a.typeName = #{maTypeName}
|
||||
sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY bai.unit_id
|
||||
|
|
@ -129,23 +105,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT SUM(scrap_num) AS num,
|
||||
bui.unit_name AS unitName
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON sad.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
LEFT JOIN tm_task_agreement tta ON sad.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_unit_info bui ON bai.unit_id = bui.unit_id
|
||||
WHERE sad.status = '1'
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
GROUP BY bai.unit_id
|
||||
ORDER BY num DESC
|
||||
|
|
@ -155,22 +125,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getMaterialReturnByMonth" resultType="com.bonus.sgzb.largeScreen.domain.ScrapAnalysisVo">
|
||||
SELECT bad.pre_num AS planNum,
|
||||
bad.audit_num AS realityNum,
|
||||
a.typeName
|
||||
mt.type_name AS typeName
|
||||
FROM back_apply_details bad
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON bad.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON bad.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE bad.create_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59')
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</select>
|
||||
<!--当月维修分析-->
|
||||
|
|
@ -178,82 +142,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT rad.repair_num AS repairNum,
|
||||
rad.repaired_num AS repairedNum,
|
||||
rad.scrap_num AS scrapNum,
|
||||
a.typeName
|
||||
mt.type_name AS typeName
|
||||
FROM repair_apply_details rad
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON rad.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE rad.create_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59')
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</select>
|
||||
<!--施工机具/工器具总保有量-->
|
||||
<select id="getTotalOwnership" resultType="com.bonus.sgzb.largeScreen.domain.ScrapAnalysisVo">
|
||||
/*在库*/
|
||||
<if test="type == 1">
|
||||
SELECT mt4.type_name AS typeName,
|
||||
SELECT mt.type_name AS typeName,
|
||||
mt.num AS num
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE mt.`level` = '4' AND mt.del_flag = '0'
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND mt4.type_name = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND mt4.type_name = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</if>
|
||||
/*待入库 新购/修试*/
|
||||
<if test="type == 2">
|
||||
SELECT pcd.purchase_num AS num,
|
||||
pcd.input_num AS num2,
|
||||
a.typeName AS typeName
|
||||
mt.type_name AS typeName
|
||||
FROM purchase_check_details pcd
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON pcd.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE pcd.status = '1'
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
UNION ALL
|
||||
SELECT rid.repair_num AS num,
|
||||
rid.input_num AS num2,
|
||||
a.typeName AS typeName
|
||||
mt.type_name AS typeName
|
||||
FROM repair_input_details rid
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON rid.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON rid.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
<where>
|
||||
<if test="maType!=null and maType == 1">
|
||||
a.typeName = #{maTypeName}
|
||||
sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</where>
|
||||
</if>
|
||||
|
|
@ -261,43 +205,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="type == 3">
|
||||
SELECT lod.out_num AS num,
|
||||
'1' AS type,
|
||||
a.typeName AS typeName
|
||||
mt.type_name AS typeName
|
||||
FROM lease_out_details lod
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON lod.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON lod.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
<where>
|
||||
<if test="maType!=null and maType == 1">
|
||||
a.typeName = #{maTypeName}
|
||||
sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</where>
|
||||
UNION ALL
|
||||
SELECT bad.audit_num AS num,
|
||||
'2' AS type,
|
||||
a.typeName AS typeName
|
||||
mt.type_name AS typeName
|
||||
FROM back_apply_details bad
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON bad.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON bad.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
<where>
|
||||
<if test="maType!=null and maType == 1">
|
||||
a.typeName = #{maTypeName}
|
||||
sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</where>
|
||||
</if>
|
||||
|
|
@ -306,44 +238,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT rad.repair_num AS repairNum,
|
||||
rad.repaired_num AS repairedNum,
|
||||
rad.scrap_num AS scrapNum,
|
||||
a.typeName AS typeName
|
||||
mt.type_name AS typeName
|
||||
FROM repair_apply_details rad
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON rad.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
<where>
|
||||
<if test="maType!=null and maType == 1">
|
||||
a.typeName = #{maTypeName}
|
||||
sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</where>
|
||||
</if>
|
||||
/*报废*/
|
||||
<if test="type == 5">
|
||||
SELECT sad.scrap_num AS num,
|
||||
a.typeName AS typeName
|
||||
mt.type_name AS typeName
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id,mt4.type_name AS typeName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON sad.type_id = a.type_id
|
||||
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id AND mt.`level` = '4'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id
|
||||
WHERE sad.status = '1'
|
||||
<if test="maType!=null and maType == 1">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
<if test="maType!=null and maType == 2">
|
||||
AND a.typeName = #{maTypeName}
|
||||
AND sd.dept_name = #{maTypeName}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -47,17 +47,35 @@ export function ApiGetMaterialList(query) {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//审核
|
||||
export function ApiBackApplyAudit(query) {
|
||||
// 删除
|
||||
export function backApplyDelApi(query) {
|
||||
console.log('query====', query);
|
||||
return request({
|
||||
url: '/material/backApply/audit',
|
||||
url: '/material/backApply/del',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//审核
|
||||
export function ApiBackApplyAudit(data) {
|
||||
return request({
|
||||
url: '/material/backApply/audit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 退料审核新增
|
||||
export function submitBackApplyApi(data) {
|
||||
return request({
|
||||
url: '/material/backApply/submitBackApply',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,32 +13,44 @@
|
|||
<div class="order_box">
|
||||
<div class="order_box_one">
|
||||
<div>
|
||||
<span>工程名称:</span
|
||||
><span>(送电一公司)vue百度地图获取天气</span>
|
||||
<span>工程名称:</span><span>{{ rowObj.lotName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span></span><span>{{ rowObj.backTime }}</span>
|
||||
</div>
|
||||
<div><span></span><span>2023年10月06日</span></div>
|
||||
</div>
|
||||
<div class="order_box_one">
|
||||
<div>
|
||||
<span>退料单位:</span
|
||||
><span>(送电一公司)vue百度地图获取天气</span>
|
||||
<span>退料单位:</span><span>{{ rowObj.unitName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>编号:</span><span>{{ rowObj.code }}</span>
|
||||
</div>
|
||||
<div><span>编号:</span><span>2023年10月06日</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column label="序号" align="center" prop="dictId" />
|
||||
<el-table-column prop="name" label="名称" align="center">
|
||||
<el-table-column label="编号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料数量"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="200"
|
||||
prop="num"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="规格型号" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="单位" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="number" label="数量" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="weight" label="重量" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" label="备注" align="center">
|
||||
<!-- <el-table-column prop="remarks" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
@click="remarksClick"
|
||||
|
|
@ -46,7 +58,7 @@
|
|||
>{{ scope.row.remarks }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<div class="order_footer">
|
||||
<div>审核:</div>
|
||||
|
|
@ -83,6 +95,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import vueEasyPrint from 'vue-easy-print';
|
||||
import { ApiGetView, } from "@/api/claimAndRefund/return.js"
|
||||
export default {
|
||||
components: { vueEasyPrint, },
|
||||
props: {
|
||||
|
|
@ -100,6 +113,10 @@ export default {
|
|||
dialogTitle: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
rowObj: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -122,21 +139,20 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
fullscreenLoading: false,
|
||||
tableData: [{
|
||||
dictId: '1',
|
||||
name: '机动胶膜',
|
||||
type: 'CJM_5',
|
||||
unit: '台',
|
||||
number: '5',
|
||||
weight: '525',
|
||||
remarks: '编号详见明细',
|
||||
},],
|
||||
tableData: [],
|
||||
open: false,
|
||||
title: ""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let params = {
|
||||
id: this.rowObj.id,
|
||||
agreementId: this.rowObj.agreementId
|
||||
}
|
||||
ApiGetView(params).then(res => {
|
||||
this.tableData = res.rows
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
|
|
|||
|
|
@ -1,88 +1,241 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable style="width: 240px" />
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="unitId">
|
||||
<el-select v-model="queryParams.unitId" clearable @change="getAgreementByUnit" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
v-model="queryParams.unitId"
|
||||
clearable
|
||||
@change="getAgreementByUnit"
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
<el-select v-model="queryParams.proId" clearable @change="getAgreementByProId" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
v-model="queryParams.proId"
|
||||
clearable
|
||||
@change="getAgreementByProId"
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in proList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工机具类型" prop="typeId">
|
||||
<el-cascader v-model="queryParams.typeId" :options="deptOptions"
|
||||
:props="{ expandTrigger: 'hover', label: 'label', value: 'id', checkStrictly: true }" @change="handleNodeClick"
|
||||
aria-placeholder="请选择极具类型"> </el-cascader>
|
||||
<el-cascader
|
||||
v-model="queryParams.typeId"
|
||||
:options="deptOptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover',
|
||||
label: 'label',
|
||||
value: 'id',
|
||||
checkStrictly: true,
|
||||
}"
|
||||
@change="handleNodeClick"
|
||||
aria-placeholder="请选择极具类型"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料申请时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" value-format="yyyy-MM-dd">
|
||||
<el-date-picker
|
||||
v-model="queryParams.time"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料状态" prop="taskStatus">
|
||||
<el-select v-model="queryParams.taskStatus" clearable style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in taskStatusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="协议号" prop="agreementCode">
|
||||
<el-input v-model="queryParams.agreementCode" placeholder="请选择协议号" clearable style="width: 240px" />
|
||||
<el-input
|
||||
v-model="queryParams.agreementCode"
|
||||
placeholder="请选择协议号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain size="mini" @click="handleAdd"
|
||||
v-hasPermi="['store:labelType:add']">退料申请</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['store:labelType:add']"
|
||||
>退料申请</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleSubmit()"
|
||||
v-hasPermi="['store:labelType:add']"
|
||||
>批量提交</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<!-- :disabled="multiple" -->
|
||||
<el-button type="warning" plain size="mini" @click="handleSubmit()"
|
||||
v-hasPermi="['store:labelType:add']">批量提交</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['store:labelType:export']">导出</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['store:labelType:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="typeList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" sortable align="center" type="index" />
|
||||
<el-table-column label="退料单号" align="center" prop="code" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料单位名称" align="center" sortable prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工程名称" sortable align="center" prop="lotName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工机具类型" align="center" prop="typeName" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人员" align="center" prop="backPerson" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人联系电话" align="center" prop="phone" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料申请时间" align="center" prop="backTime" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="协议号" align="center" prop="agreementCode" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="是否异常退料" align="center" prop="dictName" sortable :show-overflow-tooltip="true" >
|
||||
<el-table-column
|
||||
label="退料单号"
|
||||
align="center"
|
||||
prop="code"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料单位名称"
|
||||
align="center"
|
||||
sortable
|
||||
prop="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料工程名称"
|
||||
sortable
|
||||
align="center"
|
||||
prop="lotName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料工机具类型"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料人员"
|
||||
align="center"
|
||||
prop="backPerson"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料人联系电话"
|
||||
align="center"
|
||||
prop="phone"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料申请时间"
|
||||
align="center"
|
||||
prop="backTime"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="协议号"
|
||||
align="center"
|
||||
prop="agreementCode"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否异常退料"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<!-- 暂时全部未否 -->
|
||||
否
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退料状态" align="center" sortable :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="退料状态"
|
||||
align="center"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- 状态
|
||||
37-待审核
|
||||
|
|
@ -90,89 +243,261 @@
|
|||
<el-button type="text" v-if="scope.row.taskStatus == '37'">
|
||||
待审核
|
||||
</el-button>
|
||||
<el-button type="text" style="color:#67C23A" v-else-if="scope.row.taskStatus == '38'">
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #67c23a"
|
||||
v-else-if="scope.row.taskStatus == '38'"
|
||||
>
|
||||
已审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不通过原因" align="center" prop="dictName" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<el-table-column
|
||||
label="不通过原因"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="300"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-zoom-in" @click="handleUpdate(scope.row, 'see')"
|
||||
v-hasPermi="['store:labelType:edit']">查看</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleSee(scope.row, 'see')"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>查看</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
@click="handlUpdate(scope.row, 'update')"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>编辑</el-button
|
||||
> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handlePrint(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']"
|
||||
>退料单</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm1" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="dialogQueryParams"
|
||||
ref="queryForm1"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-form-item label="退料单位" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料单位" prop="unitName">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.unitName"
|
||||
placeholder="请输入退料单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料工程" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借入方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料工程" prop="lotName">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.lotName"
|
||||
placeholder="请输入退料工程"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料协议编号" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入关键字" clearable style="width: 240px" />
|
||||
<el-form-item label="退料协议编号" prop="agreementCode">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.agreementCode"
|
||||
placeholder="请输入退料协议编号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预退料时间" prop="backTime">
|
||||
<el-date-picker
|
||||
style="width: 240px"
|
||||
disabled
|
||||
v-model="dialogQueryParams.backTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="退料人" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料人" prop="backPerson">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.backPerson"
|
||||
placeholder="请输入退料人"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料人电话" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借入方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料人电话" prop="phone">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.phone"
|
||||
placeholder="请输入退料人电话"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-form-item label="关键字" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogQueryParams.keyWord"
|
||||
placeholder="请输入借出方单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery1">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery1"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" height="500px" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="loadingList"
|
||||
height="500px"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="dictId" />
|
||||
<el-table-column label="类型名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="编码" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="当前在用量" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料数量" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="maCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="当前在用量"
|
||||
align="center"
|
||||
prop="useNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料数量"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.dictName" placeholder="请输入退料数量" clearable />
|
||||
<el-input
|
||||
v-model="scope.row.num"
|
||||
placeholder="请输入退料数量"
|
||||
clearable
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="loadingTotal > 0"
|
||||
:total="loadingTotal"
|
||||
:page.sync="dialogQueryParams.pageNum"
|
||||
:limit.sync="dialogQueryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center" v-if="type == 'update'">
|
||||
<div
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
style="text-align: center"
|
||||
v-if="loadingType == 'update'"
|
||||
>
|
||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 退料单 -->
|
||||
<dialogForm :dialogTitle="title" :isShowFlag.sync="isShowOneFlag" :priKey="priKey"></dialogForm>
|
||||
<dialogForm
|
||||
:dialogTitle="title"
|
||||
:isShowFlag.sync="isShowOneFlag"
|
||||
:priKey="priKey"
|
||||
:rowObj="rowObj"
|
||||
></dialogForm>
|
||||
<!-- 提交 -->
|
||||
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openOne" append-to-body
|
||||
width="400px">
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:title="title"
|
||||
:visible.sync="openOne"
|
||||
append-to-body
|
||||
width="400px"
|
||||
>
|
||||
<div class="submit_box">
|
||||
<div>
|
||||
<i class="el-icon-circle-check" style="color: #ff9900; font-size: 30px"></i>
|
||||
<i
|
||||
class="el-icon-circle-check"
|
||||
style="color: #ff9900; font-size: 30px"
|
||||
></i>
|
||||
</div>
|
||||
<div class="submit_box_title">
|
||||
<div>{{ openTextOne }}</div>
|
||||
|
|
@ -184,11 +509,19 @@
|
|||
<el-button type="primary" @click="submitOpenOneForm()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openTwo" append-to-body
|
||||
width="400px">
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:title="title"
|
||||
:visible.sync="openTwo"
|
||||
append-to-body
|
||||
width="400px"
|
||||
>
|
||||
<div class="submit_box_two">
|
||||
<div>
|
||||
<i class="el-icon-circle-check" style="color: #00c196; font-size: 30px"></i>
|
||||
<i
|
||||
class="el-icon-circle-check"
|
||||
style="color: #00c196; font-size: 30px"
|
||||
></i>
|
||||
</div>
|
||||
<div class="submit_box_title">{{ openTextThree }}</div>
|
||||
</div>
|
||||
|
|
@ -199,11 +532,11 @@
|
|||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { ApiGetBackApplyList } from "@/api/claimAndRefund/return.js"
|
||||
import { ApiGetBackApplyList, ApiGetView, backApplyDelApi, submitBackApplyApi } from "@/api/claimAndRefund/return.js"
|
||||
import {
|
||||
getInfo, h
|
||||
} from "@/api/login";
|
||||
import { getUnitData, getProData, getAgreementInfoById } from "@/api/claimAndRefund/receive.js"
|
||||
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
|
||||
import dialogForm from "./dialogForm.vue";
|
||||
// 10:42开始日期startTime,结束日期endTime 机具类型typeId
|
||||
// http://localhost/claimAndRefund/return/returnApply
|
||||
|
|
@ -251,6 +584,10 @@ export default {
|
|||
startTime: '',
|
||||
endTime: ''
|
||||
},
|
||||
dialogQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
|
@ -271,16 +608,20 @@ export default {
|
|||
deptOptions: [],
|
||||
unitList: [],
|
||||
proList: [],
|
||||
taskStatusList:[
|
||||
taskStatusList: [
|
||||
{
|
||||
name:'待审核',
|
||||
id:'37'
|
||||
name: '待审核',
|
||||
id: '37'
|
||||
},
|
||||
{
|
||||
name:'已审核',
|
||||
id:'38'
|
||||
name: '已审核',
|
||||
id: '38'
|
||||
}
|
||||
]
|
||||
],
|
||||
rowObj: {},
|
||||
loadingType: '',
|
||||
loadingTotal: 0,
|
||||
loadingList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -300,16 +641,12 @@ export default {
|
|||
companyId: this.companyId,
|
||||
...this.queryParams
|
||||
}
|
||||
console.log("paramsparamsparams", params)
|
||||
const res = await ApiGetBackApplyList(params)
|
||||
console.log("res=====", res)
|
||||
this.typeList = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
this.loading = false;
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
|
@ -355,13 +692,13 @@ export default {
|
|||
/** 修改按钮操作 */
|
||||
handleUpdate(row, type) {
|
||||
this.type = type
|
||||
this.reset();
|
||||
const dictId = row.dictId || this.ids
|
||||
getType(dictId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
// this.reset();
|
||||
// const dictId = row.dictId || this.ids
|
||||
// getType(dictId).then(response => {
|
||||
// this.form = response.data;
|
||||
// this.open = true;
|
||||
// this.title = "修改";
|
||||
// });
|
||||
},
|
||||
// 退料单
|
||||
handleUpdateOrder() {
|
||||
|
|
@ -381,40 +718,107 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs["queryForm1"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
updateType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
let backApplyInfo = []
|
||||
for (let i = 0; i < this.loadingList.length; i++) {
|
||||
this.loadingList[i].companyId = this.companyId;
|
||||
}
|
||||
backApplyInfo.push(
|
||||
{
|
||||
backPerson: '张三',
|
||||
phone: '1234578988',
|
||||
remark: '1425备注',
|
||||
backTime: '2023-12-14',
|
||||
// backPerson: this.dialogQueryParams.backPerson,
|
||||
// phone: this.dialogQueryParams.phone,
|
||||
// remark: this.dialogQueryParams.remark,
|
||||
// backTime: this.dialogQueryParams.backTime,
|
||||
companyId: this.companyId
|
||||
}
|
||||
)
|
||||
let params = {
|
||||
companyId: this.companyId,
|
||||
agreementId: this.rowObj.agreementId,
|
||||
backApplyInfo: JSON.stringify(backApplyInfo),
|
||||
backApplyDetails: JSON.stringify(this.loadingList)
|
||||
}
|
||||
console.log('param----', params);
|
||||
submitBackApplyApi(params).then(res => {
|
||||
|
||||
})
|
||||
// if (this.form.dictId != undefined) {
|
||||
// updateType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("修改成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// } else {
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
// }
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除该数据项?').then(function () {
|
||||
return delType(dictIds);
|
||||
let param = {
|
||||
id: row.id + ''
|
||||
};
|
||||
this.$modal.confirm('是否确认删除该数据项?').then(() => {
|
||||
return backApplyDelApi(param);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('删除失败');
|
||||
});
|
||||
},
|
||||
handlePrint(row) {
|
||||
this.isShowOneFlag = true
|
||||
this.rowObj = row
|
||||
},
|
||||
|
||||
handleSee(row, type) {
|
||||
this.dialogQueryParams.unitName = row.unitName
|
||||
this.dialogQueryParams.lotName = row.lotName
|
||||
this.dialogQueryParams.agreementCode = row.agreementCode
|
||||
this.dialogQueryParams.backPerson = row.backPerson
|
||||
this.dialogQueryParams.phone = row.phone
|
||||
this.dialogQueryParams.backTime = row.backTime + ''
|
||||
this.loadingType = type
|
||||
this.rowObj = row
|
||||
this.open = true
|
||||
this.getDialogList()
|
||||
},
|
||||
handlUpdate(row, type) {
|
||||
this.loadingType = type
|
||||
this.rowObj = row
|
||||
this.open = true
|
||||
this.getDialogList()
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/dict/type/export', {
|
||||
...this.queryParams
|
||||
}, `type_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
getDialogList() {
|
||||
let params = {
|
||||
id: this.rowObj.id,
|
||||
agreementId: this.rowObj.agreementId
|
||||
}
|
||||
ApiGetView(params).then(res => {
|
||||
this.loadingList = res.rows
|
||||
this.loadingTotal = res.total
|
||||
})
|
||||
},
|
||||
/** 刷新缓存按钮操作 */
|
||||
handleRefreshCache() {
|
||||
refreshCache().then(() => {
|
||||
|
|
@ -425,7 +829,6 @@ export default {
|
|||
InitIGetInfo() {
|
||||
getInfo().then(res => {
|
||||
this.companyId = res.user.companyId
|
||||
console.log("9999999999999")
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
|
|
@ -440,21 +843,17 @@ export default {
|
|||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
|
||||
}
|
||||
const res = await getUnitData(params)
|
||||
this.unitList = res.data
|
||||
console.log('GetUnitData ======================', res)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
id:this.queryParams.unitId
|
||||
id: this.queryParams.unitId
|
||||
}
|
||||
const res = await getProData(params)
|
||||
this.proList = res.data
|
||||
|
||||
console.log('GetProData ======================', res)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async InitGetAgreementInfoById() {
|
||||
|
|
@ -471,22 +870,21 @@ export default {
|
|||
}
|
||||
const res = await getAgreementInfoById(params)
|
||||
// this.proList = res.data
|
||||
console.log('getAgreementInfoById ======================', res)
|
||||
this.queryParams.agreementCode = res.data.agreementCode
|
||||
},
|
||||
getAgreementByUnitAndProId() {
|
||||
this.InitGetAgreementInfoById()
|
||||
},
|
||||
getAgreementByProId(){
|
||||
getAgreementByProId() {
|
||||
this.InitGetAgreementInfoById()
|
||||
},
|
||||
getAgreementByUnit(){
|
||||
getAgreementByUnit() {
|
||||
this.GetProData()
|
||||
},
|
||||
handleQuery1(){
|
||||
handleQuery1() {
|
||||
|
||||
},
|
||||
resetQuery1(){
|
||||
resetQuery1() {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -539,4 +937,9 @@ export default {
|
|||
width: 70px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,89 +1,244 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable style="width: 240px" />
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="unitId">
|
||||
<el-select v-model="queryParams.unitId" clearable @change="getAgreementByUnit" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
v-model="queryParams.unitId"
|
||||
clearable
|
||||
@change="getAgreementByUnit"
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in unitList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
<el-select v-model="queryParams.proId" clearable @change="getAgreementByProId" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
v-model="queryParams.proId"
|
||||
clearable
|
||||
@change="getAgreementByProId"
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in proList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工机具类型" prop="typeId">
|
||||
<el-cascader v-model="queryParams.typeId" :options="deptOptions"
|
||||
:props="{ expandTrigger: 'hover', label: 'label', value: 'id', checkStrictly: true }" @change="handleNodeClick"
|
||||
aria-placeholder="请选择极具类型"> </el-cascader>
|
||||
<el-cascader
|
||||
v-model="queryParams.typeId"
|
||||
:options="deptOptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover',
|
||||
label: 'label',
|
||||
value: 'id',
|
||||
checkStrictly: true,
|
||||
}"
|
||||
@change="handleNodeClick"
|
||||
aria-placeholder="请选择极具类型"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="协议号" prop="agreementCode">
|
||||
<el-input v-model="queryParams.agreementCode" placeholder="请选择协议号" clearable style="width: 240px" />
|
||||
<el-input
|
||||
v-model="queryParams.agreementCode"
|
||||
placeholder="请选择协议号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料状态" prop="taskStatus">
|
||||
<el-select v-model="queryParams.taskStatus" clearable style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in taskStatusList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退料申请时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" value-format="yyyy-MM-dd">
|
||||
<el-date-picker
|
||||
v-model="queryParams.time"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain size="mini" @click="handleAdd"
|
||||
v-hasPermi="['store:labelType:add']">退料申请</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleExam"
|
||||
:disabled="!checkResultOne"
|
||||
v-hasPermi="['store:labelType:add']"
|
||||
>批量审核</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleSubmit()"
|
||||
v-hasPermi="['store:labelType:add']"
|
||||
>批量提交</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<!-- :disabled="multiple" -->
|
||||
<el-button type="warning" plain size="mini" @click="handleSubmit()"
|
||||
v-hasPermi="['store:labelType:add']">批量提交</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['store:labelType:export']">导出</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['store:labelType:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="typeList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" sortable align="center" type="index" />
|
||||
<el-table-column label="退料单号" align="center" prop="code" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料单位名称" align="center" sortable prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工程名称" sortable align="center" prop="lotName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工机具类型" align="center" prop="typeName" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人员" align="center" prop="backPerson" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人联系电话" align="center" prop="phone" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料申请时间" align="center" prop="backTime" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="协议号" align="center" prop="agreementCode" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="是否异常退料" align="center" prop="dictName" sortable :show-overflow-tooltip="true" >
|
||||
<el-table-column
|
||||
label="退料单号"
|
||||
align="center"
|
||||
prop="code"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料单位名称"
|
||||
align="center"
|
||||
sortable
|
||||
prop="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料工程名称"
|
||||
sortable
|
||||
align="center"
|
||||
prop="lotName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料工机具类型"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料人员"
|
||||
align="center"
|
||||
prop="backPerson"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料人联系电话"
|
||||
align="center"
|
||||
prop="phone"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料申请时间"
|
||||
align="center"
|
||||
prop="backTime"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="协议号"
|
||||
align="center"
|
||||
prop="agreementCode"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否异常退料"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<!-- 暂时全部未否 -->
|
||||
否
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退料状态" align="center" sortable :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="退料状态"
|
||||
align="center"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- 状态
|
||||
37-待审核
|
||||
|
|
@ -91,89 +246,230 @@
|
|||
<el-button type="text" v-if="scope.row.taskStatus == '37'">
|
||||
待审核
|
||||
</el-button>
|
||||
<el-button type="text" style="color:#67C23A" v-else-if="scope.row.taskStatus == '38'">
|
||||
<el-button
|
||||
type="text"
|
||||
style="color: #67c23a"
|
||||
v-else-if="scope.row.taskStatus == '38'"
|
||||
>
|
||||
已审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不通过原因" align="center" prop="dictName" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<el-table-column
|
||||
label="不通过原因"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="300"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-zoom-in" @click="handleUpdate(scope.row, 'see')"
|
||||
v-hasPermi="['store:labelType:edit']">查看</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']">删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleSee(scope.row, 'see')"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-icon"
|
||||
:disabled="scope.row.taskStatus == '38'"
|
||||
@click="handleUpdate(scope.row, 'update')"
|
||||
v-hasPermi="['store:labelType:remove']"
|
||||
>审核</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handlePrint(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']"
|
||||
>退料单</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm1" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="dialogQueryParams"
|
||||
ref="queryForm1"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-form-item label="退料单位" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料单位" prop="unitName">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.unitName"
|
||||
placeholder="请输入退料单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料工程" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借入方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料工程" prop="lotName">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.lotName"
|
||||
placeholder="请输入退料工程"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料协议编号" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入关键字" clearable style="width: 240px" />
|
||||
<el-form-item label="退料协议编号" prop="agreementCode">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.agreementCode"
|
||||
placeholder="请输入退料协议编号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预退料时间" prop="backTime">
|
||||
<el-date-picker
|
||||
style="width: 240px"
|
||||
disabled
|
||||
v-model="dialogQueryParams.backTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择时间"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="退料人" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料人" prop="backPerson">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.backPerson"
|
||||
placeholder="请输入退料人"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料人电话" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借入方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="退料人电话" prop="phone">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="dialogQueryParams.phone"
|
||||
placeholder="请输入退料人电话"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-form-item label="关键字" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogQueryParams.keyWord"
|
||||
placeholder="请输入借出方单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery1">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery1"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" height="500px" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="loadingList" height="500px">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="dictId" />
|
||||
<el-table-column label="类型名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="编码" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="当前在用量" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料数量" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.dictName" placeholder="请输入退料数量" clearable />
|
||||
</template>
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料数量"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="200"
|
||||
prop="num"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="loadingTotal > 0"
|
||||
:total="loadingTotal"
|
||||
:page.sync="dialogQueryParams.pageNum"
|
||||
:limit.sync="dialogQueryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center" v-if="type == 'update'">
|
||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||
<div
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
style="text-align: center"
|
||||
v-if="loadingType == 'update' && loadingList.length > 0"
|
||||
>
|
||||
<el-button type="primary" @click="submitForm">通过</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 退料单 -->
|
||||
<dialogForm :dialogTitle="title" :isShowFlag.sync="isShowOneFlag" :priKey="priKey"></dialogForm>
|
||||
<dialogForm
|
||||
:dialogTitle="title"
|
||||
:isShowFlag.sync="isShowOneFlag"
|
||||
:rowObj="rowObj"
|
||||
:priKey="priKey"
|
||||
></dialogForm>
|
||||
<!-- 提交 -->
|
||||
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openOne" append-to-body
|
||||
width="400px">
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:title="title"
|
||||
:visible.sync="openOne"
|
||||
append-to-body
|
||||
width="400px"
|
||||
>
|
||||
<div class="submit_box">
|
||||
<div>
|
||||
<i class="el-icon-circle-check" style="color: #ff9900; font-size: 30px"></i>
|
||||
<i
|
||||
class="el-icon-circle-check"
|
||||
style="color: #ff9900; font-size: 30px"
|
||||
></i>
|
||||
</div>
|
||||
<div class="submit_box_title">
|
||||
<div>{{ openTextOne }}</div>
|
||||
|
|
@ -185,11 +481,19 @@
|
|||
<el-button type="primary" @click="submitOpenOneForm()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openTwo" append-to-body
|
||||
width="400px">
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:title="title"
|
||||
:visible.sync="openTwo"
|
||||
append-to-body
|
||||
width="400px"
|
||||
>
|
||||
<div class="submit_box_two">
|
||||
<div>
|
||||
<i class="el-icon-circle-check" style="color: #00c196; font-size: 30px"></i>
|
||||
<i
|
||||
class="el-icon-circle-check"
|
||||
style="color: #00c196; font-size: 30px"
|
||||
></i>
|
||||
</div>
|
||||
<div class="submit_box_title">{{ openTextThree }}</div>
|
||||
</div>
|
||||
|
|
@ -200,11 +504,11 @@
|
|||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { ApiGetBackApplyList } from "@/api/claimAndRefund/return.js"
|
||||
import { ApiGetBackApplyList, ApiGetView, ApiBackApplyAudit } from "@/api/claimAndRefund/return.js"
|
||||
import {
|
||||
getInfo, h
|
||||
} from "@/api/login";
|
||||
import { getUnitData, getProData, getAgreementInfoById } from "@/api/claimAndRefund/receive.js"
|
||||
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
|
||||
import dialogForm from "./dialogForm.vue";
|
||||
// 10:42开始日期startTime,结束日期endTime 机具类型typeId
|
||||
// http://localhost/claimAndRefund/return/returnApply
|
||||
|
|
@ -214,6 +518,7 @@ export default {
|
|||
components: { dialogForm, },
|
||||
data() {
|
||||
return {
|
||||
checkResultOne: false,
|
||||
fullscreenLoading: false,
|
||||
type: '',
|
||||
isShowOneFlag: false,
|
||||
|
|
@ -252,6 +557,10 @@ export default {
|
|||
startTime: '',
|
||||
endTime: ''
|
||||
},
|
||||
dialogQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
|
@ -272,21 +581,26 @@ export default {
|
|||
deptOptions: [],
|
||||
unitList: [],
|
||||
proList: [],
|
||||
taskStatusList:[
|
||||
taskStatusList: [
|
||||
{
|
||||
name:'待审核',
|
||||
id:'37'
|
||||
name: '待审核',
|
||||
id: '37'
|
||||
},
|
||||
{
|
||||
name:'已审核',
|
||||
id:'38'
|
||||
name: '已审核',
|
||||
id: '38'
|
||||
}
|
||||
]
|
||||
],
|
||||
loadingList: [],
|
||||
loadingTotal: 0,
|
||||
rowObj: {},
|
||||
loadingType: ''
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initSelectData()
|
||||
this.InitIGetInfo()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// claimAndRefund/return/returnApplyAdd
|
||||
|
|
@ -303,14 +617,11 @@ export default {
|
|||
}
|
||||
console.log("paramsparamsparams", params)
|
||||
const res = await ApiGetBackApplyList(params)
|
||||
console.log("res=====", res)
|
||||
this.typeList = res.rows;
|
||||
this.total = res.total;
|
||||
this.typeList = res.data.rows;
|
||||
this.total = res.data.total;
|
||||
this.loading = false;
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
|
@ -340,29 +651,53 @@ export default {
|
|||
this.$refs.queryForm.resetFields()
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
// this.reset();
|
||||
// // this.open = true;
|
||||
// // this.title = "计划借调";
|
||||
this.$router.push("/claimAndRefund/return/returnApplyAdd");
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.dictId)
|
||||
this.checkResultOne = selection.every(item => item.taskStatus !== '38');
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePrint(row) {
|
||||
this.isShowOneFlag = true
|
||||
this.rowObj = row
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row, type) {
|
||||
this.type = type
|
||||
this.reset();
|
||||
const dictId = row.dictId || this.ids
|
||||
getType(dictId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
this.dialogQueryParams.unitName = row.unitName
|
||||
this.dialogQueryParams.lotName = row.lotName
|
||||
this.dialogQueryParams.agreementCode = row.agreementCode
|
||||
this.dialogQueryParams.backPerson = row.backPerson
|
||||
this.dialogQueryParams.backPerson = row.backPerson
|
||||
this.dialogQueryParams.phone = row.phone
|
||||
this.dialogQueryParams.backTime = row.backTime + ''
|
||||
this.loadingType = type
|
||||
this.rowObj = row
|
||||
this.open = true
|
||||
this.getDialogList()
|
||||
},
|
||||
handleSee(row, type) {
|
||||
this.dialogQueryParams.unitName = row.unitName
|
||||
this.dialogQueryParams.lotName = row.lotName
|
||||
this.dialogQueryParams.agreementCode = row.agreementCode
|
||||
this.dialogQueryParams.backPerson = row.backPerson
|
||||
this.dialogQueryParams.phone = row.phone
|
||||
this.dialogQueryParams.backTime = row.backTime + ''
|
||||
this.loadingType = type
|
||||
this.rowObj = row
|
||||
this.open = true
|
||||
this.getDialogList()
|
||||
},
|
||||
getDialogList() {
|
||||
let params = {
|
||||
id: this.rowObj.id,
|
||||
agreementId: this.rowObj.agreementId
|
||||
}
|
||||
ApiGetView(params).then(res => {
|
||||
this.loadingList = res.rows
|
||||
this.loadingTotal = res.total
|
||||
})
|
||||
},
|
||||
// 退料单
|
||||
handleUpdateOrder() {
|
||||
|
|
@ -381,25 +716,42 @@ export default {
|
|||
this.openTwo = true
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
updateType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addType(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
submitForm() {
|
||||
let params = {
|
||||
ids: this.rowObj.id
|
||||
}
|
||||
ApiBackApplyAudit(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.getList()
|
||||
}
|
||||
});
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleAdd() {
|
||||
let params = {
|
||||
ids: this.rowObj.id
|
||||
}
|
||||
ApiBackApplyAudit(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.$message.error(res.msg);
|
||||
this.getList()
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleExam() {
|
||||
let params = {
|
||||
ids: this.ids.join(',')
|
||||
}
|
||||
ApiBackApplyAudit(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.ids = []
|
||||
this.$message.error(res.msg);
|
||||
this.getList()
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
|
|
@ -426,7 +778,6 @@ export default {
|
|||
InitIGetInfo() {
|
||||
getInfo().then(res => {
|
||||
this.companyId = res.user.companyId
|
||||
console.log("9999999999999")
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
|
|
@ -450,7 +801,7 @@ export default {
|
|||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
id:this.queryParams.unitId
|
||||
id: this.queryParams.unitId
|
||||
}
|
||||
const res = await getProData(params)
|
||||
this.proList = res.data
|
||||
|
|
@ -478,16 +829,16 @@ export default {
|
|||
getAgreementByUnitAndProId() {
|
||||
this.InitGetAgreementInfoById()
|
||||
},
|
||||
getAgreementByProId(){
|
||||
getAgreementByProId() {
|
||||
this.InitGetAgreementInfoById()
|
||||
},
|
||||
getAgreementByUnit(){
|
||||
getAgreementByUnit() {
|
||||
this.GetProData()
|
||||
},
|
||||
handleQuery1(){
|
||||
handleQuery1() {
|
||||
|
||||
},
|
||||
resetQuery1(){
|
||||
resetQuery1() {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -540,4 +891,9 @@ export default {
|
|||
width: 70px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -653,38 +653,24 @@ export default {
|
|||
},
|
||||
//标签下载
|
||||
async labelUpload() {
|
||||
if (this.checkboxModel.length < 0) {
|
||||
return false;
|
||||
}
|
||||
console.log('checkboxModel', this.checkboxModel);
|
||||
const msg = this.$modal.loading("批量生成中,请稍候...");
|
||||
try {
|
||||
let that = this;
|
||||
// 获取生成二维码dom元素
|
||||
let captureId = document.getElementsByClassName("captureId");
|
||||
// 循环复选框数组,生成多个二维码
|
||||
for (let i = 0; i < this.checkboxModel.length; i++) {
|
||||
// that.$nextTick(() => {
|
||||
const element = this.checkboxModel[i];
|
||||
// 每次生成二维码画布之前,先清空原来的
|
||||
captureId[i].innerHTML = "";
|
||||
// console.log(captureId[i]);
|
||||
// 二维码下显示的文案
|
||||
// that.codeVal = element.campus + "-" + element.addr + "-" + element.room;
|
||||
let shareContent = that.$refs["QrcodePage"][i],
|
||||
width = shareContent.offsetWidth,
|
||||
height = shareContent.offsetHeight;
|
||||
// 生成二维码
|
||||
new QRCode(captureId[i], {
|
||||
width: width, // 二维码的宽
|
||||
height: height, // 二维码的高
|
||||
// 二维码扫描出来的数据
|
||||
text: element.maCode, // 二维码地址
|
||||
// text: element.maCode + "-" + element.addr + "-" + element.room, // 二维码地址
|
||||
colorDark: "#000", // 二维码颜色
|
||||
colorLight: "#fff" // 二维码背景色
|
||||
// 这里 生成的二维码可能样式达不到预期要求,文后在说一说怎么调节
|
||||
width: width,
|
||||
height: height,
|
||||
text: element.maCode,
|
||||
colorDark: "#000",
|
||||
colorLight: "#fff"
|
||||
});
|
||||
// 创建画布放二维码,方便下载
|
||||
let canvas = document.createElement("canvas"),
|
||||
scale = 1;
|
||||
canvas.width = width * scale;
|
||||
|
|
@ -700,34 +686,30 @@ export default {
|
|||
height: height,
|
||||
useCORS: true
|
||||
};
|
||||
// console.log(shareContent);
|
||||
// return false;
|
||||
// 生成二维码图片
|
||||
await html2canvas(shareContent, opts)
|
||||
.then(function (canvas) {
|
||||
const qrContentImage = canvas.toDataURL("image/jpeg", 1.0);
|
||||
// const qrContentImage = canvas.toDataURL();
|
||||
if (i <= that.checkboxModel.length - 1) {
|
||||
that.qrcodeArr.push({
|
||||
url: qrContentImage,
|
||||
name: element.maCode
|
||||
name: element.labelCode
|
||||
});
|
||||
}
|
||||
if (that.qrcodeArr.length == that.checkboxModel.length) {
|
||||
that.packageImages();
|
||||
that.codeId = null;
|
||||
setTimeout(msg, 1000);
|
||||
that.$modal.closeLoading()
|
||||
}
|
||||
})
|
||||
.catch(function (reason) {
|
||||
console.log(reason);
|
||||
that.$modal.closeLoading()
|
||||
that.getList();
|
||||
that.$modal.closeLoading();
|
||||
});
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
that.packageImages();
|
||||
setTimeout(msg, 1000);
|
||||
that.$modal.closeLoading();
|
||||
} catch (error) {
|
||||
setTimeout(msg, 1000);
|
||||
that.$modal.closeLoading()
|
||||
that.getList();
|
||||
that.$modal.closeLoading();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -735,39 +717,35 @@ export default {
|
|||
let that = this;
|
||||
const zip = new JSZip();
|
||||
const cache = {};
|
||||
setTimeout(() => {
|
||||
let arr = that.qrcodeArr;
|
||||
arr.forEach((item, index) => {
|
||||
let fileName = item.name;
|
||||
zip.file(fileName + ".png", item.url.substring(22), { base64: true });
|
||||
cache[fileName] = item.url;
|
||||
});
|
||||
// 下载压缩包
|
||||
zip.generateAsync({ type: "blob" }).then(content => {
|
||||
FileSaver.saveAs(content, "二维码.zip");
|
||||
});
|
||||
this.getList()
|
||||
// this.checkboxModel = []
|
||||
// this.selectionList = []
|
||||
// this.qrcodeArr = []
|
||||
}, 0);
|
||||
let arr = that.qrcodeArr;
|
||||
arr.forEach((item, index) => {
|
||||
let fileName = item.name;
|
||||
zip.file(fileName + ".png", item.url.substring(22), { base64: true });
|
||||
cache[fileName] = item.url;
|
||||
});
|
||||
zip.generateAsync({ type: "blob" }).then(content => {
|
||||
FileSaver.saveAs(content, "二维码.zip");
|
||||
});
|
||||
that.getList();
|
||||
that.qrcodeArr = [];
|
||||
},
|
||||
|
||||
|
||||
labelUploadCode(row) {
|
||||
if (row.maCode == null) {
|
||||
this.$message.error('当前设备没有设备编码');
|
||||
return
|
||||
}
|
||||
// if (row.maCode == null) {
|
||||
// this.$message.error('当前设备没有设备编码');
|
||||
// return
|
||||
// }
|
||||
this.labelCodeName = ''
|
||||
this.rowObj = row
|
||||
this.uploadOpen = true;
|
||||
this.title = "二维码查看";
|
||||
this.labelmaCode = row.maCode
|
||||
this.labelmaCode = row.labelCode
|
||||
this.$nextTick(() => {
|
||||
// this.selectionList.forEach((item, index) => {
|
||||
this.$refs.codeItem.innerHTML = "";
|
||||
var qrcode = new QRCode(this.$refs.codeItem, {
|
||||
text: row.maCode, //二维码内容
|
||||
text: row.labelCode, //二维码内容
|
||||
width: 256,
|
||||
height: 256,
|
||||
colorDark: '#000000',
|
||||
|
|
|
|||
Loading…
Reference in New Issue