冲突合并

This commit is contained in:
BianLzhaoMin 2024-05-06 19:37:14 +08:00
commit 4686425fbb
64 changed files with 3361 additions and 9054 deletions

View File

@ -44,12 +44,27 @@ public class BmNumLogs extends BaseEntity {
@Excel(name = "实例/任务")
private String task;
/**
* 任务名称
*/
private String taskName;
/**
* 规格id
*/
@Excel(name = "规格id")
private Integer typeId;
/**
* 规格名称
*/
private String typeName;
/**
* 父级规格名称
*/
private String typeParentName;
/**
* 数量
*/

View File

@ -53,7 +53,7 @@ public class BackApplyController extends BaseController {
@PostMapping("getbackList")
public AjaxResult getbackList(@RequestBody BackApplyInfo record) {
try {
record.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
record.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
List<BackApplyInfo> list = backApplyService.getbackList(record);
return success(list);
} catch (Exception e) {

View File

@ -189,7 +189,7 @@ public class BackReceiveController extends BaseController {
}
}
@Log(title = "退料接收-结束任务", businessType = BusinessType.INSERT)
@Log(title = "退料接收-结束任务", businessType = BusinessType.MATERIAL)
@PostMapping("endBack")
public AjaxResult endBack(@RequestBody BackApplyInfo record) {
try {

View File

@ -1,13 +1,10 @@
package com.bonus.sgzb.app.controller;
import cn.hutool.core.collection.CollUtil;
import com.bonus.sgzb.app.domain.StorageStatus;
import com.bonus.sgzb.app.service.HoldingLedgerService;
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

View File

@ -128,7 +128,7 @@ public class LeaseOutDetailsController extends BaseController {
*
* @param record 出库内容
*/
@Log(title = "领料出库", businessType = BusinessType.UPDATE)
@Log(title = "领料出库", businessType = BusinessType.MATERIAL)
@PostMapping("/submitOut")
public AjaxResult submitOut(@RequestBody LeaseOutDetails record) {
return leaseOutDetailsService.submitOut(record);
@ -138,7 +138,7 @@ public class LeaseOutDetailsController extends BaseController {
* @param recordList
* @return
*/
@Log(title = "领料出库", businessType = BusinessType.UPDATE)
@Log(title = "领料出库", businessType = BusinessType.MATERIAL)
@PostMapping("/submitOutRfid")
public AjaxResult submitOutRfid(@RequestBody List<LeaseOutDetails> recordList) {
if (CollUtil.isEmpty(recordList)){

View File

@ -177,7 +177,7 @@ public class TmTaskController extends BaseController {
}
if (StringUtils.isNotBlank(task.getLeaseApplyInfo().getPhone())) {
String phone = task.getLeaseApplyInfo().getPhone();
if (!PhoneUtil.isMobile(phone)){
if (!PhoneUtil.isMobile(phone)) {
logger.error("手机号格式错误 :{}", phone);
return AjaxResult.error("手机号格式错误");
}
@ -406,7 +406,7 @@ public class TmTaskController extends BaseController {
/**
* 查询机具领料管理列表
*
* @param task 筛选条件
* @param task 筛选条件
* @param sourceBy app为1 web为0
* @return 列表
*/
@ -496,13 +496,19 @@ public class TmTaskController extends BaseController {
if (StringUtils.isNull(task)) {
return AjaxResult.error("参数错误");
}
startPage();
if (SecurityUtils.getLoginUser() != null) {
Long userid = SecurityUtils.getLoginUser().getUserid();
task.setUserId(String.valueOf(userid));
}
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListByOne(task);
return AjaxResult.success(getDataTable(leaseAuditList));
// app端传1
if (task.getSouceBy() == 1) {
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListByOne(task);
return AjaxResult.success(leaseAuditList);
} else {
startPage();
List<TmTask> leaseAuditList = tmTaskService.getLeaseAuditListByOne(task);
return AjaxResult.success(getDataTable(leaseAuditList));
}
}
/**
@ -527,18 +533,40 @@ public class TmTaskController extends BaseController {
}
/**
* 修改任务信息
* 宁夏修改任务信息
*/
@Log(title = "修改任务信息", businessType = BusinessType.UPDATE)
@Log(title = "宁夏修改任务信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
public AjaxResult edit(@RequestBody TmTask task) {
if (StringUtils.isNull(task)) {
return AjaxResult.error("参数错误,传入信息为空!");
try {
if (StringUtils.isNull(task)) {
return AjaxResult.error("参数错误,传入信息为空!");
}
tmTaskService.edit(task);
return AjaxResult.success("修改成功");
} catch (Exception e) {
return AjaxResult.error("修改失败");
}
tmTaskService.edit(task);
return AjaxResult.success("修改成功");
}
/**
* 重庆修改任务信息
*/
@Log(title = "重庆修改任务信息", businessType = BusinessType.UPDATE)
@PostMapping("/editCq")
public AjaxResult editCq(@RequestBody TmTask task) {
try {
if (StringUtils.isNull(task)) {
return AjaxResult.error("参数错误,传入信息为空!");
}
tmTaskService.editCq(task);
return AjaxResult.success("修改成功");
} catch (Exception e) {
return AjaxResult.error("修改失败");
}
}
/**
* 通过主键查询单条数据

View File

@ -186,4 +186,16 @@ public class BackApplyInfo {
private String endTime;
private Integer flag;
private Integer partNum;
/**
* 合格数量
*/
private Integer hgNum;
/**
* 维修数量
*/
private Integer wxNum;
/**
* 报废数量
*/
private Integer bfNum;
}

View File

@ -265,5 +265,6 @@ public class TmTask implements Serializable {
private Date estimateLeaseTime;
private Integer souceByRefuse;
private int souceBy;
}

View File

@ -103,9 +103,6 @@ public class TmTaskDto implements Serializable {
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "申请时间", sort = 5)
private Date createTime;
/**
@ -209,6 +206,9 @@ public class TmTaskDto implements Serializable {
private String examineStatus;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Excel(name = "申请时间", sort = 5)
private String createTimes;
@ApiModelProperty(value = "更新时间")

View File

@ -2,6 +2,7 @@ package com.bonus.sgzb.app.mapper;
import com.bonus.sgzb.app.domain.BackApplyInfo;
import com.bonus.sgzb.app.domain.BmAgreementInfo;
import com.bonus.sgzb.app.domain.MachinePart;
import com.bonus.sgzb.app.domain.TmTask;
import org.apache.ibatis.annotations.Mapper;
@ -52,4 +53,8 @@ public interface BackApplyAppMapper {
int refuse(BackApplyInfo record);
int updateTmTask(BackApplyInfo record);
List<TmTask> getMaTypeDetails(BackApplyInfo backApplyInfo);
MachinePart getMachineParts(TmTask typeId);
}

View File

@ -18,7 +18,7 @@ public interface LeaseApplyInfoMapper {
int deleteByPrimaryKey(Integer id);
int insert(LeaseApplyInfo record);
LeaseApplyInfo selectByTaskIdAndCompId(@Param("taskId") String taskId, @Param("companyId") String companyId);
LeaseApplyInfo selectByTaskIdAndCompId(@Param("taskId") String taskId, @Param("companyId") Integer companyId);
int insertOrUpdate(LeaseApplyInfo record);
@ -37,4 +37,6 @@ public interface LeaseApplyInfoMapper {
int updateBatchSelective(List<LeaseApplyInfo> list);
int batchInsert(@Param("list") List<LeaseApplyInfo> list);
LeaseApplyInfo selectByTaskIdAndCompIdCq(@Param("taskId") String taskId);
}

View File

@ -138,4 +138,8 @@ public interface TmTaskMapper {
* @return
*/
int deleteTaskAgreementByTaskId(@Param("taskId") String taskId);
int updateLeaseApplyInfoRejectInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
}

View File

@ -70,6 +70,7 @@ public interface TmTaskService{
int updateByPrimaryKeySelective(TmTask record);
int edit(TmTask tmTask);
int editCq(TmTask tmTask);
Integer getAgreementIdByUnit(TmTask task);

View File

@ -3,11 +3,13 @@ package com.bonus.sgzb.app.service.impl;
import cn.hutool.core.collection.CollUtil;
import com.bonus.sgzb.app.domain.BackApplyInfo;
import com.bonus.sgzb.app.domain.BmAgreementInfo;
import com.bonus.sgzb.app.domain.MachinePart;
import com.bonus.sgzb.app.domain.TmTask;
import com.bonus.sgzb.app.mapper.BackApplyAppMapper;
import com.bonus.sgzb.app.service.BackApplyService;
import com.bonus.sgzb.common.core.utils.StringUtils;
import com.bonus.sgzb.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -112,7 +114,27 @@ public class BackApplyServiceImpl implements BackApplyService {
@Override
public List<BackApplyInfo> examineView(BackApplyInfo record) {
return backApplyMapper.examineView(record);
List<BackApplyInfo> backApplyInfoList = backApplyMapper.examineView(record);
return getMaTypeDetails(backApplyInfoList);
}
private List<BackApplyInfo> getMaTypeDetails(List<BackApplyInfo> view) {
if (view.size() > 0) {
for (BackApplyInfo backApplyInfo : view) {
if ("2".equals(backApplyInfo.getManageType())) {
List<MachinePart> machineParts = new ArrayList<>();
List<TmTask> typeIds = backApplyMapper.getMaTypeDetails(backApplyInfo);
typeIds.removeIf(item -> item == null);
for (TmTask typeId : typeIds) {
MachinePart machinePart = backApplyMapper.getMachineParts(typeId);
machinePart.setPartNum((typeId.getPartNum() * Double.parseDouble(backApplyInfo.getPreNum())));
machineParts.add(machinePart);
}
backApplyInfo.setMaTypeDetails(machineParts);
}
}
}
return view;
}
@Override
@ -124,11 +146,11 @@ public class BackApplyServiceImpl implements BackApplyService {
record.setCreateBy(userId);
if (roles.contains("jjfgs") || roles.contains("admin")) {
record.setStatus("1");
backApplyMapper.audit(record);
backApplyMapper.audit(record);
}
if (roles.contains("tsfgs") || roles.contains("admin")) {
record.setStatus("3");
backApplyMapper.audit(record);
backApplyMapper.audit(record);
}
List<Integer> taskIdById = backApplyMapper.getTaskIdById(record);
if (CollUtil.isNotEmpty(taskIdById)) {
@ -149,8 +171,8 @@ public class BackApplyServiceImpl implements BackApplyService {
public int refuse(BackApplyInfo record) {
int num = 0;
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
String username = SecurityUtils.getLoginUser().getUsername();
record.setCreateBy(username);
Long userid = SecurityUtils.getLoginUser().getUserid();
record.setCreateBy(userid.toString());
if (roles.contains("jjfgs") || roles.contains("admin")) {
record.setStatus("2");
return backApplyMapper.refuse(record);

View File

@ -205,8 +205,11 @@ public class TmTaskServiceImpl implements TmTaskService {
if (CollUtil.isNotEmpty(leaseApplyInfoList)) {
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
if (leaseApplyInfo != null) {
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
if (leaseApplyInfo.getCompanyId() == null) {
result += tmTaskMapper.updateLeaseApplyInfoAuditInfoCq(leaseApplyInfo);
} else {
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
}
}
}
}
@ -898,8 +901,11 @@ public class TmTaskServiceImpl implements TmTaskService {
if (CollUtil.isNotEmpty(leaseApplyInfoList)) {
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
if (leaseApplyInfo != null) {
//leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
result += tmTaskMapper.updateLeaseApplyInfoRejectInfo(leaseApplyInfo);
if (leaseApplyInfo.getCompanyId() == null) {
result += tmTaskMapper.updateLeaseApplyInfoRejectInfoCq(leaseApplyInfo);
} else {
result += tmTaskMapper.updateLeaseApplyInfoRejectInfo(leaseApplyInfo);
}
}
}
}
@ -1019,12 +1025,12 @@ public class TmTaskServiceImpl implements TmTaskService {
@Override
@Transactional(rollbackFor = Exception.class)
public int edit(TmTask tmTask) {
int flag = 0;
int res = 0;
int taskResult = this.updateByPrimaryKeySelective(tmTask);
//修改任务信息tm_task
this.updateByPrimaryKeySelective(tmTask);
try {
if (CollUtil.isEmpty(tmTask.getLeaseApplyInfoList())) {
flag = 1;
throw new RuntimeException("参数异常");
}
// 修改任务关联的协议
this.updateAgreementByTask(tmTask);
@ -1050,7 +1056,44 @@ public class TmTaskServiceImpl implements TmTaskService {
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return res;
}
@Override
@Transactional(rollbackFor = Exception.class)
public int editCq(TmTask tmTask) {
int res = 0;
//修改任务信息tm_task
this.updateByPrimaryKeySelective(tmTask);
try {
if (CollUtil.isEmpty(tmTask.getLeaseApplyInfoList())) {
throw new RuntimeException("参数异常");
}
// 修改任务关联的协议
this.updateAgreementByTask(tmTask);
//先删除leaseApplyDetail
res = deletePreDetailData(tmTask);
if (res == 0) {
throw new RuntimeException("删除leaseApplyDetail异常");
}
//再删除leaseApplyInfo
res = deletePreData(tmTask);
if (res == 0) {
throw new RuntimeException("删除leaseApplyInfo异常");
}
// 先查询lease apply info根据task id,company id,不存在则插入领料任务领料单号领料人联系电话备注存在则不插入
res = insertNewDataCq(tmTask);
if (res == 0) {
throw new RuntimeException("insertNewData异常");
}
// 再插入lease apply detail
res = insertNewDetailData(tmTask);
if (res == 0) {
throw new RuntimeException("insertNewDetailData异常");
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return res;
}
@ -1079,7 +1122,53 @@ public class TmTaskServiceImpl implements TmTaskService {
Long taskId = task.getTaskId();
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
LeaseApplyInfo leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompId(String.valueOf(taskId), String.valueOf(leaseApplyDetail.getCompanyId()));
LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo();
if (leaseApplyDetail.getCompanyId() == null) {
leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompIdCq(String.valueOf(taskId));
} else {
leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompId(String.valueOf(taskId), leaseApplyDetail.getCompanyId());
}
if (leaseApplyInfos == null) {
LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo();
String code = this.genderLeaseCode();
leaseApplyInfo.setCode(code);
leaseApplyInfo.setTaskId(task.getTaskId().intValue());
leaseApplyInfo.setCode(task.getLeaseApplyInfoList().get(0).getCode());
leaseApplyInfo.setLeasePerson(leasePerson);
leaseApplyInfo.setPhone(phone);
if (task.getTaskStatus() == 32 && task.getSouceByRefuse() == 1) {
leaseApplyInfo.setDeptAuditBy(task.getLeaseApplyInfoList().get(0).getDeptAuditBy());
leaseApplyInfo.setDeptAuditTime(task.getLeaseApplyInfoList().get(0).getDeptAuditTime());
leaseApplyInfo.setDeptAuditRemark(task.getLeaseApplyInfoList().get(0).getDeptAuditRemark());
}
leaseApplyInfo.setRemark(remark);
leaseApplyInfo.setType(task.getLeaseApplyInfoList().get(0).getType());
leaseApplyInfo.setCompanyId(leaseApplyDetail.getCompanyId());
leaseApplyInfo.setEstimateLeaseTime(task.getEstimateLeaseTime());
leaseApplyInfo.setLeaseType(task.getLeaseType());
res = leaseApplyInfoMapper.insert(leaseApplyInfo);
}
}
}
return res;
}
private int insertNewDataCq(TmTask task) {
int res = 0;
LeaseApplyInfo leaseApplyInfo1 = task.getLeaseApplyInfo();
String leasePerson = "";
String remark = "";
String phone = "";
if (leaseApplyInfo1 != null) {
leasePerson = leaseApplyInfo1.getLeasePerson();
remark = leaseApplyInfo1.getRemark();
phone = leaseApplyInfo1.getPhone();
}
List<LeaseApplyDetails> leaseApplyDetails = task.getLeaseApplyDetails();
Long taskId = task.getTaskId();
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
LeaseApplyInfo leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompIdCq(String.valueOf(taskId));
if (leaseApplyInfos == null) {
LeaseApplyInfo leaseApplyInfo = new LeaseApplyInfo();
String code = this.genderLeaseCode();
@ -1111,9 +1200,17 @@ public class TmTaskServiceImpl implements TmTaskService {
Long taskId = task.getTaskId();
if (CollUtil.isNotEmpty(leaseApplyDetails)) {
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
LeaseApplyInfo leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompId(String.valueOf(taskId), String.valueOf(leaseApplyDetail.getCompanyId()));
LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo();
if (leaseApplyDetail.getCompanyId() == null) {
leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompIdCq(String.valueOf(taskId));
} else {
leaseApplyInfos = leaseApplyInfoMapper.selectByTaskIdAndCompId(String.valueOf(taskId), leaseApplyDetail.getCompanyId());
}
Integer id = leaseApplyInfos.getId();
if (leaseApplyDetail.getCompanyId().equals(leaseApplyInfos.getCompanyId())) {
if (leaseApplyDetail.getCompanyId() == null && leaseApplyInfos.getCompanyId() == null) {
leaseApplyDetail.setParenntId(id);
res = leaseApplyDetailsMapper.insert(leaseApplyDetail);
} else if (leaseApplyDetail.getCompanyId().equals(leaseApplyInfos.getCompanyId())) {
leaseApplyDetail.setParenntId(id);
res = leaseApplyDetailsMapper.insert(leaseApplyDetail);
}

View File

@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author c liu
* @date 2023/12/11
@ -134,4 +136,9 @@ public class RepairTask {
@ApiModelProperty(value = "维修时间")
@Excel(name = "维修时间",sort = 16)
private String updateTime;
/** 导出选中列表 */
@ApiModelProperty(value = "导出选中列表")
private List<Long> dataCondition;
}

View File

@ -466,7 +466,7 @@
GROUP_CONCAT(bai.company_id) as companyId,
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
GROUP_CONCAT(CONCAT_WS('/', IFNULL(mt2.type_name, ''))) AS typeName,
SUM(DISTINCT bad.pre_num) AS num,
SUM(bad.pre_num) AS num,
bai.direct_audit_remark as directAuditRemark
FROM
back_apply_info bai
@ -488,6 +488,9 @@
SELECT
mt.type_name typeCode,
CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
bad.type_id as typeId,
mt.manage_type as manageType,
bad.pre_num as preNum,
bad.pre_num as num
FROM
back_apply_details bad
@ -511,6 +514,27 @@
(SELECT * FROM back_apply_info bai2 WHERE bai2.id = #{id}) dd
on bai1.task_id = dd.task_id
</select>
<select id="getMaTypeDetails" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT
mws2.type_id AS typeId,
mws2.part_num AS partNum
FROM
ma_type mt1
LEFT JOIN ma_whole_set mws2 ON mt1.type_id = mws2.parent_id
WHERE
mt1.type_id = #{typeId}
</select>
<select id="getMachineParts" resultType="com.bonus.sgzb.app.domain.MachinePart">
SELECT
mt.type_name AS typeModelName,
mt.unit_name as unitName,
m2.type_name As typeName
FROM
ma_type mt
LEFT JOIN ma_type m2 ON mt.parent_id = m2.type_id
WHERE
mt.type_id = #{typeId}
</select>
</mapper>

View File

@ -621,8 +621,7 @@
WHERE
tt.task_status IN ( 37, 38, 39, 40 )
<if test="keyWord != null and keyWord != ''">
and (bai.code like concat('%', #{keyWord}, '%') or
bagi.agreement_code like concat('%', #{keyWord}, '%'))
and bai.code like concat('%', #{keyWord}, '%')
</if>
<if test="unitId != null and unitId != ''">
and bui.unit_id = #{unitId}
@ -964,8 +963,10 @@
SELECT
mt2.type_name AS typeName,
mt1.type_name AS typeCode,
ifnull(sum( bcd.back_num ), 0) AS backNum,
mm.ma_code as maCode,
SUM( CASE WHEN bcd.back_status = 1 THEN bcd.back_num ELSE 0 END ) AS hgNum,
SUM( CASE WHEN bcd.back_status = 2 THEN bcd.back_num ELSE 0 END ) AS wxNum,
SUM( CASE WHEN bcd.back_status = 3 THEN bcd.back_num ELSE 0 END ) AS bfNum,
mm.ma_code AS maCode,
bcd.create_time AS backTime,
bcd.type_id as modelId,
bcd.back_status AS backStatus

View File

@ -44,6 +44,15 @@
where task_id = #{taskId}
and company_id = #{companyId}
</select>
<select id="selectByTaskIdAndCompIdCq" resultType="com.bonus.sgzb.app.domain.LeaseApplyInfo">
SELECT
*
FROM
lease_apply_info
WHERE
task_id = #{taskId}
AND company_id IS NULL
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->

View File

@ -526,6 +526,7 @@
AND (bai.agreement_code like concat('%', #{record.keyWord}, '%') or
tt.code like concat('%', #{record.keyWord}, '%'))
</if>
GROUP BY tt.task_id
ORDER BY tt.update_time DESC
</select>
@ -810,6 +811,75 @@
UPDATE lease_apply_info SET lease_person = #{leasePerson}, phone = #{phone}, remark = #{remark}
WHERE task_id = #{taskId}
</update>
<update id="updateLeaseApplyInfoRejectInfoCq">
UPDATE
lease_apply_info
set
<trim suffixOverrides=",">
<if test="record.examineStatusId == 98 and record.examineStatusId == '98'">
company_audit_by = #{record.companyAuditBy},
company_audit_time = now(),
company_audit_remark = #{record.companyAuditRemark},
status = #{record.status},
</if>
<if test="record.examineStatusId == 99 and record.examineStatusId == '99'">
dept_audit_by = #{record.companyAuditBy},
dept_audit_time = now(),
dept_audit_remark = #{record.companyAuditRemark},
status = #{record.status},
</if>
<if test="record.examineStatusId == 100 and record.examineStatusId == '100'">
direct_audit_by = #{record.companyAuditBy},
direct_audit_time = now(),
direct_audit_remark = #{record.companyAuditRemark},
status = #{record.status},
</if>
</trim>
WHERE
task_id = #{record.taskId} and company_id is null
</update>
<update id="updateLeaseApplyInfoAuditInfoCq">
UPDATE
lease_apply_info
set
<trim suffixOverrides=",">
<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.examineStatusId == 31 and record.examineStatusId == '31'">
dept_audit_by = #{record.companyAuditBy},
dept_audit_time = now(),
dept_audit_remark = #{record.companyAuditRemark},
status = #{record.status},
</if>
<if test="record.examineStatusId == 32 and record.examineStatusId == '32'">
direct_audit_by = #{record.companyAuditBy},
direct_audit_time = now(),
direct_audit_remark = #{record.companyAuditRemark},
status = #{record.status},
</if>
<if test="record.examineStatusId == 33 and record.examineStatusId == '33'">
update_by = #{record.companyAuditBy},
update_time = now(),
</if>
<if test="record.examineStatusId == 34 and record.examineStatusId == '34'">
update_by = #{record.companyAuditBy},
update_time = now(),
</if>
<if test="record.examineStatusId == 35 and record.examineStatusId == '35'">
update_by = #{record.companyAuditBy},
update_time = now(),
</if>
<if test="record.examineStatusId == 117 and record.examineStatusId == '117'">
update_by = #{record.companyAuditBy},
update_time = now(),
</if>
</trim>
WHERE
task_id = #{record.taskId} and company_id is null
</update>
<select id="getAgreementIdByUnit" resultType="java.lang.Integer">
select agreement_id from bm_agreement_info
@ -883,6 +953,7 @@
AND (bai.agreement_code like concat('%', #{record.keyWord}, '%') or
tt.code like concat('%', #{record.keyWord}, '%'))
</if>
GROUP BY tt.task_id
ORDER BY tt.update_time DESC
</select>
<select id="getLeaseApplyDetailsByApply" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
@ -976,14 +1047,12 @@
mt.manage_type as manageType,
mt.num as num,
su.user_name as userName,
mm.ma_code as maCode,
lad.type_id as typeId
FROM
lease_apply_details lad
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id
LEFT JOIN ma_type mt on lad.type_id = mt.type_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
LEFT JOIN ma_machine mm on mt.type_id = mm.type_id
LEFT JOIN ma_type_keeper mtk on lad.type_id = mtk.type_id
LEFT JOIN sys_user su on mtk.user_id = su.user_id
WHERE

View File

@ -178,6 +178,12 @@
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND tt.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
</if>
<if test="dataCondition != null and dataCondition.size()>0">
AND rd.task_id in
<foreach collection="dataCondition" item="taskId" index="index" open="(" separator="," close=")">
#{taskId}
</foreach>
</if>
ORDER BY
tt.create_time DESC
</select>

View File

@ -3,6 +3,8 @@ package com.bonus.sgzb.material.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.sgzb.common.log.annotation.Log;
import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.material.domain.LeaseApplyInfo;
import com.bonus.sgzb.material.domain.MaInputRecord;
import com.bonus.sgzb.material.service.IPurchaseMacodeInfoService;
@ -45,6 +47,18 @@ public class PurchaseMacodeInfoController extends BaseController {
return AjaxResult.success(list);
}
/**
* 查询新购验收编号管理列表
*/
@ApiOperation(value = "查询单个新购验收编号管理列表详情")
@GetMapping("/details")
public AjaxResult details(PurchaseMacodeInfo purchaseMacodeInfo) throws Exception {
if (purchaseMacodeInfo.getTaskId() == null || purchaseMacodeInfo.getTaskId() == 0) {
throw new Exception("任务taskId为空!!!");
}
List<PurchaseMacodeInfo> list = purchaseMacodeInfoService.selectPurchaseMacodeInfoListDetails(purchaseMacodeInfo);
return AjaxResult.success(list);
}
/**
* 导出新购验收编号管理列表
*/
@ -107,6 +121,7 @@ public class PurchaseMacodeInfoController extends BaseController {
* 通过/不通过
*/
@ApiOperation(value = "新购入库审核")
@Log(title = "新购验收任务", businessType = BusinessType.MATERIAL)
@PutMapping("/manageStatus")
public AjaxResult modifyManageStatus(@RequestBody MaInputVO maInputVO) throws Exception {
return toAjax(purchaseMacodeInfoService.modifyManageStatus(maInputVO));

View File

@ -280,4 +280,6 @@ public interface PurchaseMacodeInfoMapper {
int selectPurchaseCheckDetailsStatus(Long taskId);
int updateMaTypeNum(MachinePart wholeSetDetail);
List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo);
}

View File

@ -32,6 +32,7 @@ public interface IPurchaseMacodeInfoService
* @return 新购验收编号管理purchase_macode_info集合
*/
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoList(PurchaseMacodeInfo purchaseMacodeInfo);
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo);
/**
* 新增新购验收编号管理purchase_macode_info

View File

@ -92,6 +92,12 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
return purchaseMacodeInfoList;
}
@Override
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
List<PurchaseMacodeInfo> purchaseMacodeInfoList = purchaseMacodeInfoMapper.selectPurchaseMacodeInfoListDetails(purchaseMacodeInfo);
return purchaseMacodeInfoList;
}
/**
* 新增新购验收编号管理
*

View File

@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="codeType != null and codeType != ''"> and pmi.code_type = #{codeType}</if>
<if test="status != null and status != ''"> and pmi.status = #{status}</if>
<if test="companyId != null "> and pmi.company_id = #{companyId}</if>
GROUP BY pcd.type_id
</select>
<select id="selectPurchaseMacodeInfoByTaskId" parameterType="Long" resultMap="PurchaseMacodeInfoResult">
@ -385,7 +386,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (mt.type_name like concat('%',#{dictName},'%') or
mt1.type_name like concat('%',#{dictName},'%'))
</if>
order by status
order by status, pmi.id
</select>
<select id="selectMaCode" resultType="java.lang.Integer">
select count(ma_id) from ma_machine where ma_code = #{maCode}
@ -519,6 +520,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
task_id = #{taskId} and status =4
</select>
<select id="selectPurchaseMacodeInfoListDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
SELECT
mt.type_name specificationType,
mt1.type_name typeName,
pmi.ma_code maCode,
mm.assets_code assetsCode
FROM
purchase_check_details pcd
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
LEFT JOIN ma_machine mm on mm.ma_code = pmi.ma_code
AND pmi.type_id = pcd.type_id
LEFT JOIN purchase_check_info pt ON pcd.task_id = pt.task_id
WHERE
pcd.task_id = #{taskId}
AND mt.manage_type = '0'
AND pcd.`status` != 3
AND pcd.`status` != 5
</select>
<update id="updateTypeByTypeId">
update ma_type set num = #{num} where type_id = #{typeId}

View File

@ -27,9 +27,9 @@ public class BmNumLogsController extends BaseController {
private BmNumLogsService bmNumLogsService;
@GetMapping("/list")
public TableDataInfo list() {
public TableDataInfo list(BmNumLogs record) {
startPage();
List<BmNumLogs> list = bmNumLogsService.selectAll();
List<BmNumLogs> list = bmNumLogsService.selectAll(record);
return getDataTable(list);
}

View File

@ -15,7 +15,7 @@ public interface BmNumLogsMapper {
BmNumLogs selectByPrimaryKey(Integer id);
List<BmNumLogs> selectAll();
List<BmNumLogs> selectAll(BmNumLogs record);
int updateByPrimaryKeySelective(BmNumLogs record);

View File

@ -24,8 +24,8 @@ public class BmNumLogsService{
return bmNumLogsMapper.insert(record);
}
public List<BmNumLogs> selectAll() {
return bmNumLogsMapper.selectAll();
public List<BmNumLogs> selectAll(BmNumLogs record) {
return bmNumLogsMapper.selectAll(record);
}
public int insertSelective(BmNumLogs record) {

View File

@ -6,8 +6,8 @@ server:
spring:
servlet:
multipart:
max-request-size: 10MB
max-file-size: 10MB
max-request-size: 50MB
max-file-size: 30MB
application:
# 应用名称
name: sgzb-system

View File

@ -8,7 +8,10 @@
<result column="model_title" jdbcType="VARCHAR" property="modelTitle" />
<result column="method" jdbcType="VARCHAR" property="method" />
<result column="task" jdbcType="VARCHAR" property="task" />
<result column="task_name" jdbcType="VARCHAR" property="taskName" />
<result column="type_id" jdbcType="INTEGER" property="typeId" />
<result column="type_name" jdbcType="VARCHAR" property="typeName" />
<result column="type_parent_name" jdbcType="VARCHAR" property="typeParentName" />
<result column="num" jdbcType="VARCHAR" property="num" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="json_result" jdbcType="VARCHAR" property="jsonResult" />
@ -25,18 +28,32 @@
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from bm_num_logs
select
bnl.id, bnl.model_title, bnl.`method`, bnl.task, bnl.type_id, bnl.num, bnl.`description`, bnl.json_result, bnl.`time`, bnl.creator,
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
from bm_num_logs bnl
left join ma_type mt on bnl.type_id = mt.type_id
inner join ma_type mt1 on mt.parent_id = mt1.type_id
left join tm_task tt on bnl.task = tt.task_id
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from bm_num_logs
bnl.id, bnl.model_title, bnl.`method`, bnl.task, bnl.type_id, bnl.num, bnl.`description`, bnl.json_result, bnl.`time`, bnl.creator,
bnl.remark, bnl.`status`, mt.type_name, mt1.type_name as type_parent_name, tt.code as task_name
from bm_num_logs bnl
left join ma_type mt on bnl.type_id = mt.type_id
inner join ma_type mt1 on mt.parent_id = mt1.type_id
left join tm_task tt on bnl.task = tt.task_id
<where>
<if test="modelTitle != null and modelTitle != ''">
and bnl.model_title like concat('%', #{modelTitle}, '%')
</if>
<if test="typeName != null and typeName != ''">
and mt1.type_name like concat('%', #{typeName}, '%')
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
@ -48,11 +65,11 @@
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.system.api.domain.BmNumLogs" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into bm_num_logs (model_title, `method`, task,
type_id, num, description, json_result,
type_id, description, json_result,
`time`, creator, remark
)
values (#{modelTitle,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{task,jdbcType=VARCHAR},
#{typeId,jdbcType=INTEGER}, #{num,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{jsonResult,jdbcType=VARCHAR},
#{typeId,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{jsonResult,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
)
</insert>

View File

@ -6,8 +6,8 @@ var prodEnv = require('./prod.env')
// var testUrl = '14.29.196.32:8802'
// var testUrl = '10.14.16.165:8802'
// var testUrl = '112.29.103.165:21624' //线上
var testUrl = '192.168.0.14:21626' //线上
// var testUrl = '192.168.0.166:8080'
// var testUrl = '192.168.0.14:21626' //线上
var testUrl = '10.40.92.8:8080'
// var testUrl = '223.243.184.53:8480'
// var testUrl = 'www.lingyangplat.com'
// var testUrl = ''

View File

@ -20,7 +20,9 @@ module.exports = {
cssSourceMap: true,
proxyTable: {
'/screen': {
target: 'http://112.29.103.165:21624',
// target: 'http://112.29.103.165:21626',//重庆
target: 'http://192.168.0.14:21624',//测试
// target: 'http://10.40.92.74:8080',
changeOrigin: true,
// secure: true, //如果是https接口需要配置这个参数
pathRewrite: {

View File

@ -120,13 +120,4 @@ export default {
)
},
// 根据名称获取大宗原材料柱状图数据
screenSaleMaterial: params => {
return API.GET(
URL_PREFIXRightUrl.concat(
'gywlw/screenSaleMaterial/data'
),
params
)
},
}

View File

@ -22,4 +22,6 @@ export const getTotalOwnershipApi = params => POST(`/screen/base/largeScreen/hom
export const getCarUseByMonthApi = params => POST(`/screen/base/largeScreen/home/getCarUseByMonth?maType=${params.maType}`,)
// 当月使用车辆
export const getMaintenanceWarningApi = params => POST(`/screen/base/largeScreen/home/getMaintenanceWarning`,)
//各公司机具保有量
export const getTotalOwnershipByCompany = params => POST(`/screen/base/largeScreen/home/getTotalOwnershipByCompany`)

View File

@ -0,0 +1,471 @@
<template>
<div class="centerTopPage">
<div class="mapBox">
<div id="mapEcharts"></div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts'
let mapChinaJson = require('@/untils/china.json')
let ningxiaJson = require('@/untils/ningxia.json')
import { getEquipmentDisByMapApi } from "../../api/screen";
export default {
name: 'centerTopPage',
data() {
return {
type: 1,
zoom: 1.39,
zoom2: 1.2,
mapEcharts: null,
mapEcharts2: null,
mapJson: null,
pointArea: [],
pointAll: [],
companyList: [],
companyAreaList: [],
isCity: 0,
cityCount: [],
gozoom: 1
}
},
created() {
// this.getCompanyList()
// this.getCompanyAreaList()
// this.getCityCount()
},
mounted() {
// this.getEquipmentDisByMapApiPage()
this.getInitData()
},
methods: {
getEquipmentDisByMapApiPage() {
getEquipmentDisByMapApi().then(res => {
console.log('res=====', res);
})
},
getCompanyList() {
let params = {
provinceId: ''
}
getCompanyListByProvinceId(params).then(res => {
if (res.success && res.data) {
this.companyList = res.data
}
})
},
getCompanyAreaList() {
let params = {
areaId: ''
}
getCompanyListByAreaId(params).then(res => {
if (res.success && res.data) {
this.companyAreaList = res.data
}
})
},
getInitData() {
this.mapEcharts = echarts.init(document.getElementById('mapEcharts'))
this.mapJson = mapChinaJson
echarts.registerMap('china', this.mapJson)
this.setMapOption('china')
// this.setMapOption2()
},
setMapOption(name) {
var option = {
backgroundColor: 'rgba(0,0,0,0)',
series: [
{
name: 'MAP',
type: 'map3D',
map: name,
zlevel: -10,
boxWidth: 150,
boxHeight:60,
boxDepth: 90,//
regionHeight: 5,//
label: {
show: true,//
textStyle: {
color: "#fff",//
fontSize: 14,//
// fontFamily: '',
backgroundColor: "rgba(0,0,0,0)",//0
},
},
//
itemStyle: {
opacity:1,
color: 'rgba(35, 72, 174,0.5)',//
borderWidth: 1.5,
borderColor: 'rgb(125, 239, 250)'
},
// hover
emphasis: {
label: {
show: true,//
textStyle: {
color: '#fff',//
fontSize: 16,
fontFamily: '微软雅黑'
},
},
itemStyle: {
areaColor: '#7BE7FC',
borderColor:'#7BE7FC',
borderWidth:3,
}
},
shading: 'lambert', // echarts-gl :
// 'color'
// 'lambert' lambert
// 'realistic' light.ambientCubemap postEffect 使ECharts GL 使PBR
// realisticMaterial: {} // shading 'realistic'
// lambertMaterial: {} // lambert shading 'lambert'
// colorMaterial: {} // color shading 'color'
light: {
// shading 'color'
main: {
// globe
color: '#fff', // [ default: #fff ]
intensity: 1.2, // [ default: 1 ]
shadow: false, //
// shadowQuality: 'high', // 'low', 'medium', 'high', 'ultra' [ default: 'medium' ]
alpha: 55, // x beta [ default: 40 ]
beta: 10 // y [ default: 40 ]
},
ambient: {
//
color: '#fff', // [ default: #fff ]
intensity: 0.5 // [ default: 0.2 ]
}
},
groundplane: {
show: false
},
viewControl: {
//distance: 150,//
//rotateSensitivity: 1,//
//zoomSensitivity: 1,//
projection: 'perspective',
autoRotate: false,
damping: 0,
rotateSensitivity: 2,//
rotateMouseButton: 'left', //使
zoomSensitivity:2, //
panSensitivity:2, //
panMouseButton: 'right', //使
distance:40, //
minDistance: 100,
maxDistance: 170,
minAlpha:30,
maxAlpha:80,
minBeta:-25,
maxBeta:45,
center:[0,0,0],
animation: true,
animationDurationUpdate: 1000,
animationEasingUpdate: 'cubicInOut'
},
},
],
};
this.mapEcharts.setOption(option);
},
setMapOption2(){
var option = {
geo: [
{
type: 'map',
map: 'china',
zlevel: 0,
zoom: 1,
aspectScale: 0.96,
layoutCenter: ['50%', '50.2%'],
layoutSize: '150%',
roam: false,
silent: true,
itemStyle: {
normal: {
borderColor: '#7BE7FC',
shadowColor: '#244AAF',
borderWidth: 2,
shadowOffsetY: 0,
shadowBlur: 50,
areaColor: '#458FD6',
},
},
},
{
type: 'map',
map: 'china',
zlevel: -1,
zoom: 1,
aspectScale: 0.96,
layoutCenter: ['50%', '51.4%'],
layoutSize: '150%',
roam: false,
silent: true,
itemStyle: {
normal: {
borderColor: 'rgba(44, 89, 199,1)',
shadowColor: 'rgba(195,26,59,0.5)',
shadowOffsetY: 0,
shadowBlur: 25,
areaColor: 'rgba(44, 89, 199,0.1)',
},
},
},
{
type: 'map',
map: 'china',
zlevel: -2,
zoom: 1,
aspectScale: 0.96,
layoutCenter: ['50%', '52.8%'],
layoutSize: '150%',
roam: false,
silent: true,
itemStyle: {
normal: {
borderColor: 'rgba(123, 231, 252,1)',
shadowColor: 'rgba(195,26,59,0.5)',
shadowOffsetY: 0,
shadowBlur: 20,
areaColor: 'rgba(5,21,35,0.1)',
},
},
},
{
type: 'map',
map: 'china',
zlevel: -3,
zoom: 1,
aspectScale: 0.96,
layoutCenter: ['50%', '54.2%'],
layoutSize: '150%',
roam: false,
silent: true,
itemStyle: {
normal: {
borderColor: 'rgba(123, 231, 252,1)',
shadowColor: 'rgba(195,26,59,0.8)',
shadowOffsetY: 0,
shadowBlur: 15,
areaColor: 'rgba(5,21,35,0.1)',
},
},
},
],
series: [
{
type: 'map',
mapType: 'china',
aspectScale: 0.96,
layoutCenter: ['50%', '50%'],
layoutSize: '150%',
zoom: 1,
roam: false,
label: {
normal: {
show: true,
textStyle: {
color: '#fff',
},
},
emphasis: {
textStyle: {
color: '#fff',
},
},
},
itemStyle: {
normal: {
areaColor: '#2C59C7',
borderColor: '#7BE7FC',
borderWidth: 2,
},
emphasis: {
areaColor: '#7BE7FC',
// areaColor: {
// type: 'linear',
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [
// {
// offset: 0,
// color: '#0C1D75', // 0%
// },
// {
// offset: 1,
// color: '#7BE7FC', // 100%
// },
// ],
// globalCoord: false, // false
// },
borderColor: '#7BE7FC',
label: {
show: true,
color: '#fff',
},
},
},
},
],
};
this.mapEcharts.setOption(option);
}
}
}
</script>
<style lang="less" scoped>
.centerTopPage {
width: 100%;
height: 627px;
// background:palegoldenrod;
margin-bottom: 2%;
padding: 0 10px;
position: relative;
box-sizing: border-box;
.iconMap {
display: block !important;
visibility: visible !important;
opacity: 1;
}
.buttonTop {
width: 100%;
display: flex;
justify-content: flex-start;
}
.buttom1 {
width: 110px;
height: 32px;
text-align: center;
line-height: 32px;
border-radius: 4px;
color: #55f3fb;
// background: url(../../assets/img/checked.png) no-repeat center;
background-size: 110px 32px;
margin-right: 12px;
cursor: pointer;
}
.buttom1.on {
color: #0095ff;
// background: url(../../assets/img/checked_on.png) no-repeat center;
background-size: 110px 32px;
}
.mapBox {
width: 100%;
height: 97%;
display: flex;
position: relative;
#mapEcharts {
width: 100%;
height: 100%;
}
#mapEcharts2 {
width: 100%;
height: 100%;
}
z-index: 1000;
}
.label-box {
position: absolute;
bottom: 0px;
left: 40px;
// background: url('../../assets/img/home/labelBg.png') no-repeat;
background-size: 100% 100%;
padding: 10px 15px;
.item {
font-size: 14px;
line-height: 22px;
color: #fff;
position: relative;
padding-left: 15px;
font-size: 16px;
}
.item:before {
content: '';
width: 10px;
height: 10px;
background: #06bbf2;
position: absolute;
top: 6px;
left: 0px;
}
.itemColor1:before {
background: #06bbf2;
}
.itemColor2:before {
background: #2df0fe;
}
.itemColor3:before {
background: #10e0a5;
}
.itemColor4:before {
background: #dcef4e;
}
.itemColor5:before {
background: #f48413;
}
.itemColor6:before {
background: #fc5403;
}
}
}
</style>
<style>
.scrollTooltip::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.scrollTooltip::-webkit-scrollbar-thumb {
background-color: #1653a6;
border-radius: 10px;
-webkit-box-shadow: inset 1px 1px 0 #1653a6;
}
.itemColor {
position: relative;
padding-left: 15px;
line-height: 22px;
}
.itemColor:before {
content: '';
width: 10px;
height: 10px;
background: #06bbf2;
position: absolute;
top: 6px;
left: 0px;
}
.itemColor1:before {
background: #06bbf2;
}
.itemColor2:before {
background: #2df0fe;
}
.itemColor3:before {
background: #10e0a5;
}
.itemColor4:before {
background: #dcef4e;
}
.itemColor5:before {
background: #f48413;
}
.itemColor6:before {
background: #fc5403;
}
</style>

View File

@ -42,7 +42,7 @@ export default {
isCollapse: false,
newArrOne: [
{ name: '施工机具总保有量', value: 9999 },
{ url: GROUP, name: '工器具总保有量', value: 9999 },
// { url: GROUP, name: '', value: 9999 },
],
newArr: [
{ url: GROUP, name: '在库机具', value: 999 },
@ -75,7 +75,7 @@ export default {
getTotalOwnershipApi().then(res => {
this.newArrOne.push(
{ name: '施工机具总保有量', value: res.data[0].totalOwnershipNum },
{ url: GROUP, name: '工器具总保有量', value: res.data[1].totalOwnershipNum },
// { url: GROUP, name: '', value: res.data[1].totalOwnershipNum },
)
this.newArr.push(
{ url: GROUP, name: '在库机具', value: res.data[0].stockNum },
@ -83,11 +83,11 @@ export default {
{ url: GROUP, name: '在用机具', value: res.data[0].useNum },
{ url: GROUP, name: '在修机具', value: res.data[0].repairNum },
{ url: GROUP, name: '报废机具', value: res.data[0].scrapNum },
{ url: GROUP, name: '在库工器具', value: res.data[1].stockNum },
{ url: GROUP, name: '待入库工器具', value: res.data[1].storedNum },
{ url: GROUP, name: '在用工器具', value: res.data[1].useNum },
{ url: GROUP, name: '在修工器具', value: res.data[1].repairNum },
{ url: GROUP, name: '报废工器具', value: res.data[1].scrapNum },
// { url: GROUP, name: '', value: res.data[1].stockNum },
// { url: GROUP, name: '', value: res.data[1].storedNum },
// { url: GROUP, name: '', value: res.data[1].useNum },
// { url: GROUP, name: '', value: res.data[1].repairNum },
// { url: GROUP, name: '', value: res.data[1].scrapNum },
)
})
},

View File

@ -0,0 +1,209 @@
<!-- 各公司机具保有量 -->
<template>
<div class="access-rate-page">
<div class="access-rate-box">
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">各公司机具保有量</h5>
</div>
<div id="deviceInventory"></div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
import CountFlopOne from './countFlopOne.vue'
import { getTotalOwnershipByCompany } from "../../api/screen";
export default {
name: 'accessRatePage',
components: {
CountFlopOne
},
data() {
return {
nameList: [],
valueList2: [],
valueList: [],
maType: ''
}
},
mounted() {
this.$eventBus.$on('maType', (maType) => {
this.maType = maType
this.getScrapAnalysisByMonthApiPage()
});
setInterval(() => {
this.getScrapAnalysisByMonthApiPage()
}, 60 * 1000);
},
destroyed() {
this.$eventBus.$off('maType');
},
methods: {
getScrapAnalysisByMonthApiPage() {
// let params = {
// maType: this.maType
// }
this.nameList = []
this.valueList2 = []
this.valueList = []
getTotalOwnershipByCompany().then(res => {
if (res.code == 200) {
this.nameList = res.data.map(item => item.companyName)
this.valueList = res.data.map(item => item.totalOwnershipNum)
// this.nameList.push(item)
// })
// res.data.nameList.map(item => {
// this.nameList.push(item)
// })
// res.data.valueList.map(item => {
// this.valueList.push(item)
// })
// res.data.valueList2.map(item => {
// this.valueList2.push(item)
// })
this.getInitData();
}
})
},
getInitData() {
var echartOption = {
grid: {
left: "5%",
right: "5%",
bottom: "5%",
top: "10%",
containLabel: true,
},
// tooltip: {
// trigger: "axis",
// axisPointer: {
// type: "none",
// },
// formatter: function (params) {
// return (
// params[0].name +
// "<br/>" +
// "<span style='display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:rgba(36,207,233,0.9)'></span>" +
// params[0].seriesName +
// " : " +
// Number(
// (params[0].value.toFixed(4) / 10000).toFixed(2)
// ).toLocaleString() +
// "<br/>"
// );
// },
// },
xAxis: {
show: true,
type: "value",
splitLine: {
show: false,
},
},
yAxis: [
{
type: "category",
inverse: true,
axisLabel: {
show: true,
textStyle: {
color: "#fff",
},
},
splitLine: {
show: false,
},
axisTick: {
show: false,
},
axisLine: {
show: false,
},
data: this.nameList,
},
{
type: "category",
inverse: true,
axisTick: "none",
axisLine: "none",
show: true,
axisLabel: {
textStyle: {
color: "#ffffff",
fontSize: "12",
},
formatter: function (value) {
if (value >= 10000) {
return (value / 10000).toLocaleString() +'万';
} else {
return value.toLocaleString();
}
},
},
data: this.valueList,
},
],
series: [
{
name: "保有量",
type: "bar",
zlevel: 1,
itemStyle: {
normal: {
barBorderRadius: 0,
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{
offset: 0,
color: "#133062",
},
{
offset: 1,
color: "#60CBF9",
},
]),
},
},
barWidth: 20,
data: this.valueList,
},
],
};
let myCharts = echarts.init(document.querySelector('#deviceInventory'));
myCharts.setOption(echartOption)
}
}
}
</script>
<style lang="scss" scoped>
.access-rate-page {
margin-bottom: 31px;
.access-rate-box {
.access-rate-box-title-bg {
width: 433px;
height: 50px;
background: url(../../assets/img/myImage/title_left.png) no-repeat center;
background-size: 100% 100%;
position: relative;
.access-rate-box-title {
position: absolute;
left: 6%;
top: 28%;
font-size: 20px;
font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
font-weight: 500;
color: #ffffff;
line-height: 23px;
letter-spacing: 2px;
}
}
#deviceInventory {
width: 433px;
height: 500px;
}
}
}
</style>

View File

@ -4,10 +4,10 @@
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">领料数据</h5>
</div>
<CountFlopOne :val="num" sonTitle="施工具今日出库"></CountFlopOne>
<div class="access-rate-box-top">
<CountFlopOne :val="num" sonTitle="施工具今日出库"></CountFlopOne>
<!-- <div class="access-rate-box-top">
<CountFlopOne :val="num2" sonTitle="工器具今日出库"></CountFlopOne>
</div>
</div> -->
</div>
</div>
</template>

View File

@ -4,10 +4,10 @@
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">退料数据</h5>
</div>
<CountFlopTwo :val="num" sonTitle="施工机具今日退库"></CountFlopTwo>
<div class="access-rate-box-top">
<CountFlopTwo :val="num" sonTitle="施工机具今日库"></CountFlopTwo>
<!-- <div class="access-rate-box-top">
<CountFlopTwo :val="num2" sonTitle="工器具今日退料"></CountFlopTwo>
</div>
</div> -->
</div>
</div>
</template>

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,9 @@
<div class="leftModuleBox">
<LeftOne></LeftOne>
<LeftTwo></LeftTwo>
<LeftThree></LeftThree>
<!-- <LeftThree></LeftThree> -->
<LeftFour></LeftFour>
</div>
<!-- 中间3D效果展示 -->
@ -17,12 +19,15 @@
<CenterFold></CenterFold>
</div>
<div class="center-top">
<CountryMap></CountryMap>
<!-- 宁夏地图 -->
<!-- <CountryMap></CountryMap> -->
<!-- 重庆地图 -->
<Center3DMap></Center3DMap>
</div>
<div class="center-bottom">
<CenterBottom></CenterBottom>
</div>
<div class="buttom-box">
<!-- <div class="buttom-box">
<div class="buttonTop">
<div
:class="maType == 1 ? 'on' : ''"
@ -39,14 +44,15 @@
工器具
</div>
</div>
</div>
</div> -->
</div>
<!-- 右侧数据模块列表 -->
<div class="rightModuleBox">
<RightOne></RightOne>
<rightTwo></rightTwo>
<rightThree></rightThree>
<RightFour></RightFour>
<LeftThree></LeftThree>
<!-- <RightFour></RightFour> -->
</div>
</div>
<!-- 获取天气 -->
@ -83,12 +89,14 @@
import LeftOne from '../../components/home/leftOne.vue'
import LeftTwo from '../../components/home/leftTwo.vue'
import LeftThree from '../../components/home/leftThree.vue'
import LeftFour from '../../components/home/leftFour.vue'
import RightOne from '../../components/home/rightOne.vue'
import rightTwo from '../../components/home/rightTwo.vue'
import rightThree from '../../components/home/rightThree.vue'
import RightFour from '../../components/home/rightFour.vue'
import CenterBottom from '../../components/home/centerBottom.vue'
import CenterTop from '../../components/home/centerTop.vue'
import Center3DMap from '../../components/home/Center3DMap.vue'
import CountryMap from '../../components/home/countryMap.vue'
import CenterFold from '../../components/home/centerFold.vue'
import { getMaintenanceWarningApi } from "../../api/screen";
@ -97,11 +105,13 @@ export default {
LeftOne,
LeftTwo,
LeftThree,
LeftFour,
RightOne,
rightTwo,
rightThree,
RightFour,
CenterBottom,
Center3DMap,
CenterTop,
CountryMap,
CenterFold

View File

@ -2,11 +2,17 @@ import request from '@/utils/request'
/* 日志列表 */
export const getLogsListApi = (data) => {
return request.get('/bm_num_logs/list', data)
export const getLogsListApi = (params) => {
return request.get('/system/bm_num_logs/list', {
params:params
})
}
/* 日志详情 */
export const getLogsDetailsApi = (id) => {
return request.get(`/bm_num_logs/selectByPrimaryKey/${id}`)
return request.get(`/system/bm_num_logs/selectByPrimaryKey`, {
params: {
id
}
})
}

View File

@ -562,7 +562,7 @@
getUnitData,
getProData,
getAgreementInfoById,
getUseNumByTypeId
// getUseNumByTypeId
} from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogForm.vue'
import Tree from './tree.vue'
@ -690,7 +690,7 @@
selectDrop(value) {
this.queryParams.typeId = value
},
/** 查询字典类型列表 startTime,结束日期endTime */
async getList() {
this.loading = true
@ -888,12 +888,12 @@
getViewByApply(params).then((res) => {
console.log(res)
this.loadingList = res.data.rows
this.loadingList.forEach(item=>{
/* this.loadingList.forEach(item=>{
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{
item.useNum = res.data
})
})
})*/
this.loadingTotal = res.data.total
})
},
@ -954,7 +954,7 @@
this.dialogQueryParams.keyWord = ''
this.getDialogList()
},
},
}
</script>

View File

@ -341,11 +341,11 @@
align="center"
class-name="small-padding fixed-width"
width="200"
prop="num"
prop="preNum"
>
<template slot-scope="scope">
<el-input
v-model.number="scope.row.num"
v-model.number="scope.row.preNum"
placeholder="请输入退料数量"
type="number"
min="1"

View File

@ -76,7 +76,16 @@
</el-table-column>
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
<el-table-column label="申请数量" align="center" prop="preNum" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>
{{
(scope.row.partNum =
scope.row.manageType == 0 || scope.row.manageType == 1 ? scope.row.num : scope.row.partNum)
}}
</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope">
<el-button
@ -306,7 +315,7 @@
</div>
</template>
<script>
<script>
import {
receiveView,
getBackMachine,
@ -512,21 +521,24 @@ export default {
this.dialogIsView = true
this.numList = res.data.rows
this.numList.forEach(item => {
if (item.backStatus == '1') {
item.qualifiedNum = item.backNum
item.serviceNum = 0
item.scrapNum = 0
}
if (item.backStatus == '2') {
item.serviceNum = item.backNum
item.qualifiedNum = 0
item.scrapNum = 0
}
if (item.backStatus == '3') {
item.scrapNum = item.backNum
item.qualifiedNum = 0
item.serviceNum = 0
}
item.qualifiedNum = item.hgNum
item.serviceNum = item.wxNum
item.scrapNum = item.bfNum
// if (item.backStatus == '1') {
// item.qualifiedNum = item.backNum
// item.serviceNum = 0
// item.scrapNum = 0
// }
// if (item.backStatus == '2') {
// item.serviceNum = item.backNum
// item.qualifiedNum = 0
// item.scrapNum = 0
// }
// if (item.backStatus == '3') {
// item.scrapNum = item.backNum
// item.qualifiedNum = 0
// item.serviceNum = 0
// }
})
}
})
@ -554,18 +566,18 @@ export default {
this.dialogData.maTypeDetails.map(itemA => {
const matchingItemB = res.data.rows.find(itemB => itemA.modelId === itemB.modelId)
if (matchingItemB) {
switch (matchingItemB.backStatus) {
case '1':
itemA.qualifiedNum = matchingItemB.backNum
break
case '2':
itemA.serviceNum = matchingItemB.backNum
break
case '3':
itemA.scrapNum = matchingItemB.backNum
break
default:
}
// switch (matchingItemB.backStatus) {
// case '1':
itemA.qualifiedNum = matchingItemB.hgNum
// break
// case '2':
itemA.serviceNum = matchingItemB.wxNum
// break
// case '3':
itemA.scrapNum = matchingItemB.bfNum
// break
// default:
// }
}
})
}
@ -806,11 +818,12 @@ export default {
},
}
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.clickText {
color: #02a7f0;
cursor: pointer;

View File

@ -1,218 +1,173 @@
<template>
<!-- 库存日志 -->
<div class="app-container">
<el-row>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
>
<!-- <el-form-item label="模块名称" prop="userName">
<el-input
placeholder="请输入模块名称"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="请求方式" prop="phonenumber">
<el-input
placeholder="请输入请求方式"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="status">
<el-select
placeholder="创建人"
clearable
filterable
style="width: 200px"
>
</el-select>
</el-form-item>
<el-form-item label="请求时间">
<el-date-picker
style="width: 200px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></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-form-item> -->
</el-form>
</el-row>
<!-- 库存日志 -->
<div class="app-container">
<el-row>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="模块名称" prop="modelTitle">
<el-input
v-model="queryParams.modelTitle"
placeholder="请输入模块名称"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="机具类型" prop="typeName">
<el-cascader
placeholder="请选择机具类型"
:options="deviceTypeTree"
:props="{ checkStrictly: true, value: 'label' }"
@change="handleBaseValue"
clearable
filterable
:show-all-levels="false"
/>
</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-form-item>
</el-form>
</el-row>
<el-table :data="tableList" border>
<el-table-column
align="center"
label="序号"
type="index"
width="60"
/>
<el-table-column
align="center"
prop="modelTitle"
label="模块名称"
/>
<el-table-column align="center" prop="method" label="请求方式" />
<el-table-column align="center" prop="task" label="实例" />
<el-table-column align="center" prop="id" label="机具名称" />
<el-table-column align="center" prop="typeId" label="机具规格" />
<el-table-column align="center" prop="description" label="描述" />
<el-table-column align="center" prop="time" label="日期" />
<el-table-column align="center" label="状态">
<template slot-scope="{ row }">
<el-tag size="mini" type="success" v-if="row.status == 0"
>正常</el-tag
>
<el-tag size="mini" type="warning" v-else>异常</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="creator" label="创建人" />
<el-table-column align="center" prop="remark" label="备注" />
<el-table-column align="center" label="操作">
<template slot-scope="{ row }">
<el-button
size="mini"
type="text"
@click="previewLogsDetails(row.id)"
>详情</el-button
>
</template>
</el-table-column>
</el-table>
<el-table :data="tableList" border>
<el-table-column align="center" label="序号" type="index" width="60" />
<el-table-column align="center" prop="modelTitle" label="模块名称" show-overflow-tooltip />
<el-table-column show-overflow-tooltip align="center" prop="method" label="请求方式" />
<el-table-column show-overflow-tooltip align="center" prop="requestMethod" label="请求地址" />
<el-table-column show-overflow-tooltip align="center" prop="task" label="实例" />
<el-table-column show-overflow-tooltip align="center" prop="typeParentName" label="机具类型" />
<el-table-column show-overflow-tooltip align="center" prop="typeName" label="机具规格" />
<el-table-column show-overflow-tooltip align="center" prop="description" label="描述" />
<el-table-column show-overflow-tooltip align="center" prop="time" label="日期" />
<el-table-column align="center" label="状态">
<template slot-scope="{ row }">
<el-tag size="mini" type="success" v-if="row.status == 0">正常</el-tag>
<el-tag size="mini" type="warning" v-else>异常</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="creator" label="创建人" />
<el-table-column align="center" prop="remark" label="备注" />
<el-table-column align="center" label="操作">
<template slot-scope="{ row }">
<el-button size="mini" type="text" @click="previewLogsDetails(row)">详情</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="日志详情"
:visible.sync="logsDetailsDialogVisible"
width="60%"
>
<el-descriptions
class="margin-top"
:column="3"
size="medium"
border
:labelStyle="commonStyle"
:contentStyle="commonStyle"
>
<el-descriptions-item
v-for="(item, v) in detailsLabelList"
:key="v"
>
<template slot="label"> {{ item.label }} </template>
{{ logsDetailsInfoDemo[item.content] || '' }}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
<!-- 详情弹框 -->
<el-dialog title="日志详情" :visible.sync="logsDetailsDialogVisible" width="60%">
<el-descriptions
class="margin-top"
:column="3"
size="medium"
border
:labelStyle="commonStyle"
:contentStyle="commonStyle"
>
<el-descriptions-item v-for="(item, v) in detailsLabelList" :key="v">
<template slot="label">{{ item.label }}</template>
{{ logsDetailsInfo[item.content] || '' }}
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</template>
<script>
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
export default {
name: 'myInventoryLogs',
data() {
return {
queryParams: {
pageNum: 5,
pageSize: 1,
},
tableList: [{ id: 1 }, { id: 2 }],
total: 5,
logsDetailsInfo: null /* 日志详情 */,
logsDetailsDialogVisible: false,
commonStyle: {
'text-align': 'center',
},
/* 日志详情label以及内容 */
detailsLabelList: [
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
{ label: '占位', content: 'vdDemo' },
],
logsDetailsInfoDemo: {
vdDemo: '123',
},
}
},
methods: {
/* 查询列表 */
async getList() {
const { data: res } = await getLogsListApi()
this.tableList = res.rows
this.total = res.total
console.log(res, '=======日志列表')
},
/* 搜索按钮 */
handleQuery() {
this.getList()
},
/* 重置按钮 */
resetQuery() {
this.resetForm('queryForm')
this.getList()
},
/* 查看详情 */
async previewLogsDetails(id) {
// const { data: res } = await getLogsDetailsApi(id)
// console.log(res, '=======')
this.logsDetailsDialogVisible = true
// this.logsDetailsInfo = res
},
},
created() {
this.getList()
},
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
import { getDeviceTypeTree } from '@/api/claimAndRefund/receive'
export default {
name: 'myInventoryLogs',
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
modelTitle: '', //
typeName: '', //
},
tableList: [],
total: 5,
logsDetailsInfo: null /* 日志详情 */,
logsDetailsDialogVisible: false,
commonStyle: {
'text-align': 'center',
},
/* 日志详情label以及内容 */
detailsLabelList: [
{ label: '创建人', content: 'creator' },
{ label: '请求方式', content: 'method' },
{ label: '模块名称', content: 'modelTitle' },
{ label: '请求地址', content: 'requestMethod' },
{ label: '机具名称', content: 'typeParentName' },
{ label: '机具规格', content: 'typeName' },
{ label: '日期', content: 'time' },
{ label: '实例', content: 'task' },
],
logsDetailsInfo: {},
deviceTypeTree: [], //
}
},
methods: {
/* 查询列表 */
async getList() {
const res = await getLogsListApi(this.queryParams)
this.tableList = res.rows
this.total = res.total
},
/* 搜索按钮 */
handleQuery() {
this.getList()
},
/* 重置按钮 */
resetQuery() {
this.resetForm('queryForm')
this.queryParams.pageNum = 1
this.queryParams.pageSize = 10
this.queryParams.typeName = ''
this.getList()
},
/* 查看详情 */
async previewLogsDetails(row) {
console.log(row, '列表id')
const res = await getLogsDetailsApi(row.id)
this.logsDetailsInfo = res
this.logsDetailsDialogVisible = true
},
async GetDeviceTypeTree() {
const params = {
level: 4,
}
const res = await getDeviceTypeTree(params)
this.deviceTypeTree = res.data
},
/* 获取最后一级 */
handleBaseValue(val) {
this.queryParams.typeName = val[val.length - 1]
}
},
created() {
this.getList()
this.GetDeviceTypeTree()
},
}
</script>
<style scoped>
.el-table :empty::before {
content: '-';
color: gray;
}
.margin-top {
margin-top: -15px;
}
.el-table :empty::before {
content: '-';
color: gray;
}
.margin-top {
margin-top: -15px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,282 +1,125 @@
<template>
<el-dialog
v-dialogDrag
v-loading.fullscreen.lock="fullscreenLoading"
:before-close="cancel"
:title="dialogTitle"
:visible.sync="dialogShowFlag"
append-to-body
width="600px"
>
<el-dialog v-dialogDrag v-loading.fullscreen.lock="fullscreenLoading" :before-close="cancel" :title="dialogTitle"
:visible.sync="dialogShowFlag" append-to-body width="600px">
<div class="form_box_one">
<el-form
ref="dynamicValidateForm"
:model="dynamicValidateForm"
class="demo-dynamic"
label-width="90px"
>
<div
v-for="(domain, index) in dynamicValidateForm.premiumList"
:key="domain.key"
class="bor_box"
>
<el-form ref="dynamicValidateForm" :model="dynamicValidateForm" class="demo-dynamic" label-width="90px">
<div v-for="(domain, index) in dynamicValidateForm.premiumList" :key="domain.key" class="bor_box">
<p class="form_box_title">编码管理设备</p>
<div class="form_box_line"></div>
<div class="form_box_item">
<el-form-item
:prop="'premiumList.' + index + '.partId'"
label="选择配件:"
>
<treeselect
v-model="domain.partId"
style="width: 350px"
:options="deptList"
:normalizer="normalizer"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
placeholder="选择上级"
:disable-branch-nodes="true"
/>
<el-form-item :prop="'premiumList.' + index + '.partId'" label="选择配件:">
<treeselect v-model="domain.partId" style="width: 350px" :options="deptList" :normalizer="normalizer"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果" placeholder="请选择配件"
:disable-branch-nodes="true" />
</el-form-item>
<el-form-item
v-if="index == 0"
:prop="'premiumListTwo.' + index + '.repairer'"
label="维修人:"
>
<el-select
v-model="domain.repairer"
placeholder="请选择"
size="small" filterable
style="width: 350px"
>
<el-option
v-for="dict in userSelectList"
:key="dict.userId"
:label="dict.nickName"
:value="dict.userId"
/>
<el-form-item v-if="index == 0" :prop="'premiumListTwo.' + index + '.repairer'" label="维修人:">
<el-select v-model="domain.repairer" placeholder="请选择" size="small" filterable style="width: 350px">
<el-option v-for="dict in userSelectList" :key="dict.userId" :label="dict.nickName"
:value="dict.userId" />
</el-select>
</el-form-item>
<el-form-item
:prop="'premiumList.' + index + '.partType'"
label="是否收费:"
>
<el-form-item :prop="'premiumList.' + index + '.partType'" label="是否收费:" required
:rules="{ required: true, message: '请选择是否收费', trigger: 'blur', }">
<el-radio-group style="width: 350px" v-model="domain.partType">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<!-- { required: true, message: '配件数量不能为空', trigger: 'blur' }, -->
<el-form-item
:prop="'premiumList.' + index + '.partNum'"
label="配件数量:"
:rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.partNum"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item :prop="'premiumList.' + index + '.partNum'" label="配件数量:" :rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.partNum" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
:prop="'premiumList.' + index + '.partCost'"
label="配件费用:"
:rules="{
required: false,
validator: meneyIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.partCost"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item :prop="'premiumList.' + index + '.partCost'" label="配件费用:" :rules="{
required: false,
validator: meneyIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.partCost" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
:prop="'premiumList.' + index + '.repairContent'"
label="维修内容:"
>
<el-input
v-model="domain.repairContent"
maxlength="100"
placeholder="请输入"
show-word-limit
size="small"
style="width: 350px"
type="textarea"
></el-input>
<el-form-item :prop="'premiumList.' + index + '.repairContent'" label="维修内容:">
<el-input v-model="domain.repairContent" maxlength="100" placeholder="请输入" show-word-limit size="small"
style="width: 350px" type="textarea"></el-input>
</el-form-item>
</div>
<!-- <el-button @click.prevent="removeDomain(domain, index)"-->
<!-- >删除-->
<!-- </el-button>-->
<div class="add_box">
<el-button
icon="el-icon-plus"
size="mini"
type="success"
@click="addDomainOne"
>添加配件
<el-button icon="el-icon-plus" size="mini" type="success" @click="addDomainOne">添加配件
</el-button>
<el-button size="mini" icon="el-icon-delete" @click="delDomain(domain, 1)" v-show="index > 0">删除</el-button>
</div>
</div>
</el-form>
<div
slot="footer"
class="dialog-footer"
v-if="rowObj.code !== null && rowObj.code !== ''"
>
<div slot="footer" class="dialog-footer" v-if="rowObj.code !== null && rowObj.code !== ''">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submit">保存</el-button>
</div>
</div>
<div class="form_box_two">
<el-form
ref="dynamicValidateFormTwo"
:model="dynamicValidateFormTwo"
class="demo-dynamic"
label-width="100px"
>
<div
v-for="(domain, index) in dynamicValidateFormTwo.premiumListTwo"
:key="domain.key"
class="bor_box"
>
<el-form ref="dynamicValidateFormTwo" :model="dynamicValidateFormTwo" class="demo-dynamic" label-width="100px">
<div v-for="(domain, index) in dynamicValidateFormTwo.premiumListTwo" :key="domain.key" class="bor_box">
<p class="form_box_title">数量管理设备</p>
<div class="form_box_line"></div>
<div class="form_box_item">
<el-form-item
v-if="index == 0"
:prop="'premiumListTwo.' + index + '.repairNum'"
label="维修数量:"
:rules="{
required: true,
validator: numberIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.repairNum"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item v-if="index == 0" :prop="'premiumListTwo.' + index + '.repairNum'" label="维修数量:" :rules="{
required: true,
validator: numberIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.repairNum" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
v-if="index == 0"
:prop="'premiumListTwo.' + index + '.repairer'"
label="维修人:"
>
<el-select
v-model="domain.repairer"
placeholder="请选择"
size="small" filterable
style="width: 350px"
>
<el-option
v-for="dict in userSelectList"
:key="dict.userId"
:label="dict.nickName"
:value="dict.userId"
/>
<el-form-item v-if="index == 0" :prop="'premiumListTwo.' + index + '.repairer'" label="维修人:">
<el-select v-model="domain.repairer" placeholder="请选择" size="small" filterable style="width: 350px">
<el-option v-for="dict in userSelectList" :key="dict.userId" :label="dict.nickName"
:value="dict.userId" />
</el-select>
</el-form-item>
<el-form-item
:prop="'premiumList.' + index + '.partId'"
label="选择配件:"
>
<treeselect
style="width: 350px"
v-model="domain.partId"
:options="deptList"
:normalizer="normalizer"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
placeholder="选择上级"
:disable-branch-nodes="true"
/>
<el-form-item :prop="'premiumList.' + index + '.partId'" label="选择配件:">
<treeselect style="width: 350px" v-model="domain.partId" :options="deptList" :normalizer="normalizer"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果" placeholder="选择上级"
:disable-branch-nodes="true" />
</el-form-item>
<el-form-item
:prop="'premiumListTwo.' + index + '.partType'"
label="是否收费:"
>
<el-form-item :prop="'premiumListTwo.' + index + '.partType'" label="是否收费:" required
:rules="{ required: true, message: '请选择是否收费', trigger: 'blur', }">
<el-radio-group style="width: 350px" v-model="domain.partType">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:prop="'premiumListTwo.' + index + '.partNum'"
label="配件数量:"
:rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.partNum"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item :prop="'premiumListTwo.' + index + '.partNum'" label="配件数量:" :rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.partNum" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
:prop="'premiumListTwo.' + index + '.partCost'"
label="配件费用:"
:rules="{
required: false,
validator: meneyIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.partCost"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item :prop="'premiumListTwo.' + index + '.partCost'" label="配件费用:" :rules="{
required: false,
validator: meneyIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.partCost" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
:prop="'premiumListTwo.' + index + '.repairContent'"
label="维修内容:"
>
<el-input
v-model="domain.repairContent"
maxlength="100"
placeholder="请输入"
show-word-limit
size="small"
style="width: 350px"
type="textarea"
></el-input>
<el-form-item :prop="'premiumListTwo.' + index + '.repairContent'" label="维修内容:">
<el-input v-model="domain.repairContent" maxlength="100" placeholder="请输入" show-word-limit size="small"
style="width: 350px" type="textarea"></el-input>
</el-form-item>
</div>
<!-- <el-button @click.prevent="removeDomain(domain, index)"-->
<!-- >删除-->
<!-- </el-button>-->
<div class="add_box">
<el-button
icon="el-icon-plus"
size="mini"
type="success"
@click="addDomainTwo"
>添加配件
<el-button icon="el-icon-plus" size="mini" type="success" @click="addDomainTwo">添加配件
</el-button>
<el-button size="mini" icon="el-icon-delete" @click="delDomain(domain, 2)" v-show="index > 0">删除</el-button>
</div>
</div>
</el-form>
<div
slot="footer"
class="dialog-footer"
v-if="rowObj.code == null || rowObj.code == ''"
>
<div slot="footer" class="dialog-footer" v-if="rowObj.code == null || rowObj.code == ''">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submitTwo">保存</el-button>
</div>
@ -394,11 +237,11 @@ export default {
},
//--
numberIntegerValidator(rule, value, callback) {
const reg = /^\+?[1-9][0-9]*$/;
if (value === '' || reg.test(value)) {
callback();
const reg = /^\+?[1-9][0-9]*$/
if ((value === '' || reg.test(value)) && value <= this.rowObj.repairNum) {
callback()
} else {
callback(new Error('请输入大于0的正整数'));
callback(new Error('请输入大于0的并且小于维修总量的正整数'))
}
},
getTree() {
@ -472,6 +315,13 @@ export default {
key: Date.now()
});
},
delDomain(domain, type) {
if (type == 1) {
this.dynamicValidateForm.premiumList = this.dynamicValidateForm.premiumList.filter(item => item.key != domain.key);
} else {
this.dynamicValidateFormTwo.premiumListTwo = this.dynamicValidateFormTwo.premiumListTwo.filter(item => item.key != domain.key);
}
},
addDomainTwo() {
this.dynamicValidateFormTwo.premiumListTwo.push({
selected: "N",
@ -571,6 +421,7 @@ export default {
width: 100%;
border-bottom: 2px solid #1a1c22;
}
.form_box_item {
width: 100%;
display: flex;
@ -602,6 +453,7 @@ export default {
width: 100%;
border-bottom: 2px solid #1a1c22;
}
.form_box_item {
width: 100%;
display: flex;
@ -616,6 +468,7 @@ export default {
margin-right: 3%;
}
}
.dialog-footer {
display: flex;
justify-content: flex-end;

View File

@ -1,13 +1,6 @@
<template>
<el-dialog
v-dialogDrag
v-loading.fullscreen.lock="fullscreenLoading"
:before-close="cancel"
:title="dialogTitle"
:visible.sync="dialogShowFlag"
append-to-body
width="600px"
>
<el-dialog v-dialogDrag v-loading.fullscreen.lock="fullscreenLoading" :before-close="cancel" :title="dialogTitle"
:visible.sync="dialogShowFlag" append-to-body width="600px">
<div class="form_box_one" v-if="!isShow">
<el-form ref="dynamicValidateForm" :model="dynamicValidateForm" class="demo-dynamic" label-width="90px">
<div class="bor_box">
@ -15,13 +8,8 @@
<div class="form_box_line"></div>
<div class="form_box_item">
<el-form-item label="报废原因:">
<el-input
v-model="dynamicValidateForm.scrapReason"
placeholder="请输入"
size="small"
maxlength="50"
style="width: 350px"
></el-input>
<el-input v-model="dynamicValidateForm.scrapReason" placeholder="请输入" size="small" maxlength="50"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item label="损坏原因:">
<el-radio-group style="width: 350px" v-model="dynamicValidateForm.scrapType">
@ -39,18 +27,9 @@
:isShowTip="isShowTip"
@fileListChange="fileListChange"
></uploadImage> -->
<upload
style="width: 350px"
:file-list="fileList"
:action-url="actionUrl"
:limit="3"
:multiple="true"
@remove="handleRemove"
@preview="handlePreview"
@exceed="handleExceed"
@before-remove="beforeRemove"
@success="handleSuccess"
>
<upload style="width: 350px" :file-list="fileList" :action-url="actionUrl" :limit="3" :multiple="true"
@remove="handleRemove" @preview="handlePreview" @before-remove="beforeRemove"
@success="handleSuccess">
<el-button size="small" type="primary">点击上传</el-button>
</upload>
</el-form-item>
@ -67,31 +46,17 @@
<p class="form_box_title">数量管理设备</p>
<div class="form_box_line"></div>
<div class="form_box_item">
<el-form-item
label="报废数量:"
prop="scrapNum"
:rules="{
required: true,
validator: numberIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="dynamicValidateFormTwo.scrapNum"
placeholder="请输入"
size="small"
maxlength="10"
style="width: 350px"
></el-input>
<el-form-item label="报废数量:" prop="scrapNum" :rules="{
required: true,
validator: numberIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="dynamicValidateFormTwo.scrapNum" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item label="报废原因:">
<el-input
v-model="dynamicValidateFormTwo.scrapReason"
placeholder="请输入"
size="small"
maxlength="50"
style="width: 350px"
></el-input>
<el-input v-model="dynamicValidateFormTwo.scrapReason" placeholder="请输入" size="small" maxlength="50"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item label="损坏原因:">
<el-radio-group style="width: 350px" v-model="dynamicValidateFormTwo.scrapType">
@ -110,18 +75,9 @@
:isShowTip="isShowTip"
@fileListChange="fileListChange"
></uploadImage> -->
<upload
style="width: 350px"
:file-list="fileList"
:action-url="actionUrl"
:limit="3"
:multiple="true"
@remove="handleRemove"
@preview="handlePreview"
@exceed="handleExceed"
@before-remove="beforeRemove"
@success="handleSuccess"
>
<upload style="width: 350px" :file-list="fileList" :action-url="actionUrl" :limit="3" :multiple="true"
@remove="handleRemove" @preview="handlePreview" @before-remove="beforeRemove"
@success="handleSuccess">
<el-button size="small" type="primary">点击上传</el-button>
</upload>
</el-form-item>
@ -220,11 +176,6 @@ export default {
handlePreview(file) {
console.log('file')
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`
)
},
beforeRemove(file, fileList) {
// return this.$confirm(` ${file.name}`);
},
@ -237,10 +188,10 @@ export default {
//--
numberIntegerValidator(rule, value, callback) {
const reg = /^\+?[1-9][0-9]*$/
if (value === '' || reg.test(value)) {
if ((value === '' || reg.test(value)) && value <= this.rowObj.repairNum) {
callback()
} else {
callback(new Error('请输入大于0的正整数'))
callback(new Error('请输入大于0的并且小于维修总量的正整数'))
}
},
getList() {
@ -410,6 +361,7 @@ export default {
width: 100%;
border-bottom: 2px solid #1a1c22;
}
.form_box_item {
width: 100%;
display: flex;
@ -441,6 +393,7 @@ export default {
width: 100%;
border-bottom: 2px solid #1a1c22;
}
.form_box_item {
width: 100%;
display: flex;
@ -455,6 +408,7 @@ export default {
margin-right: 3%;
}
}
.dialog-footer {
display: flex;
justify-content: flex-end;

View File

@ -1,25 +1,9 @@
<template>
<el-dialog
v-dialogDrag
v-loading.fullscreen.lock="fullscreenLoading"
:before-close="cancel"
:title="dialogTitle"
:visible.sync="dialogShowFlag"
append-to-body
width="600px"
>
<el-dialog v-dialogDrag v-loading.fullscreen.lock="fullscreenLoading" :before-close="cancel" :title="dialogTitle"
:visible.sync="dialogShowFlag" append-to-body width="600px">
<div class="form_box_one">
<el-form
ref="dynamicValidateForm"
:model="dynamicValidateForm"
class="demo-dynamic"
label-width="100px"
>
<div
v-for="(domain, index) in dynamicValidateForm.premiumList"
:key="domain.key"
class="bor_box"
>
<el-form ref="dynamicValidateForm" :model="dynamicValidateForm" class="demo-dynamic" label-width="100px">
<div v-for="(domain, index) in dynamicValidateForm.premiumList" :key="domain.key" class="bor_box">
<p class="form_box_title">编码管理设备</p>
<div class="form_box_line"></div>
<div class="form_box_item">
@ -29,48 +13,25 @@
trigger: 'blur',
}"
label="选择配件:" -->
<el-form-item
:prop="'premiumList.' + index + '.partName'"
label="配件名称:"
>
<el-input
v-model="domain.partName"
placeholder="请输入"
size="small" maxlength="50"
style="width: 350px"
></el-input>
<el-form-item :prop="'premiumList.' + index + '.partName'" label="配件名称:">
<el-input v-model="domain.partName" placeholder="请输入" size="small" maxlength="50"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
:prop="'premiumList.' + index + '.partType'"
label="是否收费:"
>
<el-form-item :prop="'premiumList.' + index + '.partType'" label="是否收费:" required
:rules="{ required: true, message: '请选择是否收费', trigger: 'blur', }">
<el-radio-group style="width: 350px" v-model="domain.partType">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="index == 0"
:prop="'premiumList.' + index + '.supplierId'"
label="选择厂家:"
:rules="{
message: '请选择厂家',
required: true,
trigger: 'blur',
}"
>
<el-select
v-model="domain.supplierId"
placeholder="请选择"
size="small" filterable
style="width: 350px"
>
<el-option
v-for="dict in supplierSelectList"
:key="dict.supplierId"
:label="dict.supplier"
:value="dict.supplierId"
/>
<el-form-item v-if="index == 0" :prop="'premiumList.' + index + '.supplierId'" label="选择厂家:" :rules="{
message: '请选择厂家',
required: true,
trigger: 'blur',
}">
<el-select v-model="domain.supplierId" placeholder="请选择" size="small" filterable style="width: 350px">
<el-option v-for="dict in supplierSelectList" :key="dict.supplierId" :label="dict.supplier"
:value="dict.supplierId" />
</el-select>
</el-form-item>
<!-- <el-form-item
@ -83,72 +44,33 @@
trigger: 'blur',
}"
> -->
<el-form-item
:prop="'premiumList.' + index + '.partPrice'"
label="配件单价(元)"
label-width="120px"
>
<el-input
v-model="domain.partPrice"
placeholder="请输入"
size="small" maxlength="10"
style="width: 330px"
></el-input>
<el-form-item :prop="'premiumList.' + index + '.partPrice'" label="配件单价(元)" label-width="120px">
<el-input v-model="domain.partPrice" placeholder="请输入" size="small" maxlength="10"
style="width: 330px"></el-input>
</el-form-item>
<el-form-item
:prop="'premiumList.' + index + '.partNum'"
label="配件数量:"
:rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.partNum"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item :prop="'premiumList.' + index + '.partNum'" label="配件数量:" :rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.partNum" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
:prop="'premiumList.' + index + '.repairContent'"
label="维修内容:"
>
<el-input
v-model="domain.repairContent"
maxlength="100"
placeholder="请输入"
show-word-limit
size="small"
style="width: 350px"
type="textarea"
></el-input>
<el-form-item :prop="'premiumList.' + index + '.repairContent'" label="维修内容:">
<el-input v-model="domain.repairContent" maxlength="100" placeholder="请输入" show-word-limit size="small"
style="width: 350px" type="textarea"></el-input>
</el-form-item>
</div>
</div>
</el-form>
<div
slot="footer"
class="dialog-footer"
v-if="rowObj.code !== null && rowObj.code !== ''"
>
<div slot="footer" class="dialog-footer" v-if="rowObj.code !== null && rowObj.code !== ''">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submit">保存</el-button>
</div>
</div>
<div class="form_box_two">
<el-form
ref="dynamicValidateFormTwo"
:model="dynamicValidateFormTwo"
class="demo-dynamic"
label-width="100px"
>
<div
v-for="(domain, index) in dynamicValidateFormTwo.premiumListTwo"
:key="domain.key"
class="bor_box"
>
<el-form ref="dynamicValidateFormTwo" :model="dynamicValidateFormTwo" class="demo-dynamic" label-width="100px">
<div v-for="(domain, index) in dynamicValidateFormTwo.premiumListTwo" :key="domain.key" class="bor_box">
<p class="form_box_title">数量管理设备</p>
<div class="form_box_line"></div>
<div class="form_box_item">
@ -158,62 +80,32 @@
trigger: 'blur',
}"
label="选择配件:" -->
<el-form-item
:prop="'premiumListTwo.' + index + '.repairNum'"
label="维修数量:"
:rules="{
required: true,
validator: numberIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.repairNum"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item :prop="'premiumListTwo.' + index + '.repairNum'" label="维修数量:" :rules="{
required: true,
validator: numberIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.repairNum" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
label="配件名称:"
>
<el-input
v-model="domain.partName"
placeholder="请输入"
size="small" maxlength="50"
style="width: 350px"
></el-input>
<el-form-item label="配件名称:">
<el-input v-model="domain.partName" placeholder="请输入" size="small" maxlength="50"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
label="是否收费:"
>
<el-form-item label="是否收费:" required :rules="{ required: true, message: '请选择是否收费', trigger: 'blur', }">
<el-radio-group style="width: 350px" v-model="domain.partType">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="index == 0"
:prop="'premiumListTwo.' + index + '.supplierId'"
label="选择厂家:"
:rules="{
message: '请选择厂家',
required: true,
trigger: 'blur',
}"
>
<el-select
v-model="domain.supplierId"
placeholder="请选择"
size="small" filterable
style="width: 350px"
>
<el-option
v-for="dict in supplierSelectList"
:key="dict.supplierId"
:label="dict.supplier"
:value="dict.supplierId"
/>
<el-form-item v-if="index == 0" :prop="'premiumListTwo.' + index + '.supplierId'" label="选择厂家:" :rules="{
message: '请选择厂家',
required: true,
trigger: 'blur',
}">
<el-select v-model="domain.supplierId" placeholder="请选择" size="small" filterable style="width: 350px">
<el-option v-for="dict in supplierSelectList" :key="dict.supplierId" :label="dict.supplier"
:value="dict.supplierId" />
</el-select>
</el-form-item>
<!-- <el-form-item
@ -226,45 +118,22 @@
trigger: 'blur',
}"
> -->
<el-form-item
label="配件单价(元)"
label-width="120px"
>
<el-input
v-model="domain.partPrice"
placeholder="请输入"
size="small" maxlength="10"
style="width: 330px"
></el-input>
<el-form-item label="配件单价(元)" label-width="120px">
<el-input v-model="domain.partPrice" placeholder="请输入" size="small" maxlength="10"
style="width: 330px"></el-input>
</el-form-item>
<el-form-item
label="配件数量:"
:rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}"
>
<el-input
v-model="domain.partNum"
placeholder="请输入"
size="small" maxlength="10"
style="width: 350px"
></el-input>
<el-form-item label="配件数量:" :rules="{
required: false,
validator: numberIntegerValidator,
trigger: 'blur',
}">
<el-input v-model="domain.partNum" placeholder="请输入" size="small" maxlength="10"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item
label="维修内容:"
>
<el-input
v-model="domain.repairContent"
maxlength="100"
placeholder="请输入"
show-word-limit
size="small"
style="width: 350px"
type="textarea"
></el-input>
<el-form-item label="维修内容:">
<el-input v-model="domain.repairContent" maxlength="100" placeholder="请输入" show-word-limit size="small"
style="width: 350px" type="textarea"></el-input>
</el-form-item>
</div>
@ -282,11 +151,7 @@
</div> -->
</div>
</el-form>
<div
slot="footer"
class="dialog-footer"
v-if="rowObj.code == null || rowObj.code == ''"
>
<div slot="footer" class="dialog-footer" v-if="rowObj.code == null || rowObj.code == ''">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submitTwo">保存</el-button>
</div>
@ -406,10 +271,10 @@ export default {
//--
numberIntegerValidator(rule, value, callback) {
const reg = /^\+?[1-9][0-9]*$/;
if (value === '' || reg.test(value)) {
if (reg.test(value) && value <= this.rowObj.repairNum) {
callback();
} else {
callback(new Error('请输入大于0的正整数'));
callback(new Error('请输入大于0的并且小于维修总量的正整数'));
}
},
getTree() {
@ -499,7 +364,7 @@ export default {
submit() {
this.$refs["dynamicValidateForm"].validate(valid => {
if (valid) {
this.dynamicValidateForm.premiumList.forEach(item=>{
this.dynamicValidateForm.premiumList.forEach(item => {
item.partCost = item.partPrice;
})
// this.dynamicValidateForm.premiumList[0].partCost = this.dynamicValidateForm.premiumList[0].partPrice;
@ -537,7 +402,7 @@ export default {
this.$refs["dynamicValidateFormTwo"].validate(valid => {
if (valid) {
// this.dynamicValidateFormTwo.premiumListTwo[0].partCost = this.dynamicValidateFormTwo.premiumListTwo[0].partPrice;
this.dynamicValidateFormTwo.premiumListTwo.forEach(item=>{
this.dynamicValidateFormTwo.premiumListTwo.forEach(item => {
item.partCost = item.partPrice;
})
@ -591,6 +456,7 @@ export default {
width: 100%;
border-bottom: 2px solid #1a1c22;
}
.form_box_item {
width: 100%;
display: flex;
@ -622,6 +488,7 @@ export default {
width: 100%;
border-bottom: 2px solid #1a1c22;
}
.form_box_item {
width: 100%;
display: flex;

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,7 @@
<template>
<el-upload
class="upload-demo"
:action="actionUrl"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:multiple="multiple"
:limit="limit"
:on-exceed="handleExceed"
:file-list="fileList"
:headers="headers"
:on-success="handleSuccess"
:data="uploadData"
:before-upload="beforeUpload"
>
<el-upload class="upload-demo" :action="actionUrl" :on-preview="handlePreview" :on-remove="handleRemove"
:before-remove="beforeRemove" :multiple="multiple" :limit="limit" :on-exceed="handleExceed" :file-list="fileList"
:headers="headers" :on-success="handleSuccess" :data="uploadData" :before-upload="beforeUpload">
<slot name="default">
<el-button size="small" type="primary">点击上传</el-button>
</slot>

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +1,18 @@
<template>
<div class="app-container" id="repairWarehousing">
<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
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable maxlength="50" style="width: 240px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="维修时间">
<el-date-picker
v-model="queryParams.wxTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="date"
range-separator="-"
placeholder="维修时间"
></el-date-picker>
<el-date-picker v-model="queryParams.wxTime" style="width: 240px" value-format="yyyy-MM-dd" type="date"
range-separator="-" placeholder="维修时间"></el-date-picker>
</el-form-item>
<el-form-item label="设备类型" prop="deviceTypeId">
<el-select
v-model="queryParams.deviceTypeId"
placeholder="请选择设备类型"
clearable
filterable
style="width: 240px"
>
<el-option
v-for="typeItem in typeList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"
/>
<el-select v-model="queryParams.deviceTypeId" placeholder="请选择设备类型" clearable filterable style="width: 240px">
<el-option v-for="typeItem in typeList" :key="typeItem.typeId" :label="typeItem.typeName"
:value="typeItem.typeId" />
</el-select>
</el-form-item>
<!-- <el-form-item label="规格型号" prop="modelId">
@ -109,12 +80,7 @@
<el-table v-loading="loading" :data="tableList">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="维修单号" align="center" prop="repairCode" />
<el-table-column
label="工机具类型"
align="center"
prop="maTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column label="工机具类型" align="center" prop="maTypeName" :show-overflow-tooltip="true" />
<el-table-column label="维修人员" align="center" prop="wxName" :show-overflow-tooltip="true" />
<el-table-column label="维修时间" align="center" prop="wxTime" :show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="退料单号" align="center" prop="dictName" :show-overflow-tooltip="true" />
@ -131,13 +97,8 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" icon="el-icon-zoom-in" @click="handleView(scope.row)">查看</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == '入库进行中'"
>审核</el-button>
<el-button size="mini" type="primary" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == '入库进行中'">审核</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
@ -149,33 +110,15 @@
</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="query"
ref="query"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="query" ref="query" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="query.keyWord"
placeholder="请输入关键字"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-input v-model="query.keyWord" placeholder="请输入关键字" clearable maxlength="50" style="width: 240px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<!-- <el-form-item label="状态" prop="status"> -->
<!-- <el-select -->
@ -192,17 +135,9 @@
<!-- </el-form-item> -->
<el-form-item label="机具类型" prop="typeId">
<treeselect
v-model="query.typeId"
default-expand-all
:options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
style="width: 240px"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
/>
<treeselect v-model="query.typeId" default-expand-all :options="equipmentTypeList" placeholder="请选择规格型号"
:disable-branch-nodes="true" style="width: 240px" noChildrenText="没有数据了" noOptionsText="没有数据"
noResultsText="没有搜索结果" />
</el-form-item>
<!-- <el-form-item label="设备类型" prop="deviceTypeId"> -->
@ -260,34 +195,18 @@
<!-- >导出</el-button>-->
<!-- </el-col>-->
</el-row>
<el-table
v-loading="loading"
:data="detailTableList"
@selection-change="handleSelectionChange"
height="400"
>
<el-table v-loading="loading" :data="detailTableList" @selection-change="handleSelectionChange" height="400">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
label="设备类型"
align="center"
prop="typeName2"
:show-overflow-tooltip="true"
/>
<el-table-column label="设备类型" align="center" prop="typeName2" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="repairNum" :show-overflow-tooltip="true" />
<el-table-column label="编号" align="center" prop="maCode" :show-overflow-tooltip="true" />
<el-table-column
label="提交入库人员"
align="center"
prop="updateBy"
:show-overflow-tooltip="true"
width="100"
/>
<el-table-column label="提交入库人员" align="center" prop="updateBy" :show-overflow-tooltip="true" width="100" />
<el-table-column label="提交入库时间" align="center" prop="updateTime" width="100"></el-table-column>
<el-table-column label="状态" align="center" prop="status">
@ -298,25 +217,11 @@
</template>-->
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
v-if="showHandle"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="showHandle">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="pass(scope.row)"
v-if="scope.row.status == '进行中'"
>通过</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status == '进行中'"
@click="refused(scope.row)"
>不通过</el-button>
<el-button size="mini" type="text" @click="pass(scope.row)" v-if="scope.row.status == '进行中'">通过</el-button>
<el-button size="mini" type="text" v-if="scope.row.status == '进行中'"
@click="refused(scope.row)">不通过</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
@ -328,13 +233,8 @@
</el-table-column>
</el-table>
<pagination
v-show="dialogTotal > 0"
:total="dialogTotal"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getDialogTable"
/>
<pagination v-show="dialogTotal > 0" :total="dialogTotal" :page.sync="query.pageNum" :limit.sync="query.pageSize"
@pagination="getDialogTable" />
</el-dialog>
</div>
</template>
@ -396,6 +296,8 @@ export default {
query: {
pageNum: 1,
pageSize: 10,
keyWord: '',
typeId: ''
},
//
form: {},
@ -498,6 +400,7 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
// this.reset();
this.query.keyWord = ''
this.query.taskId = row.id
this.getDialogTable()
this.open = true
@ -506,6 +409,7 @@ export default {
},
//
handleView(row) {
this.query.keyWord = ''
this.query.taskId = row.id
this.getDialogTable()
this.open = true
@ -613,7 +517,7 @@ export default {
},
/** 提交按钮 */
submitForm: function() {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {

View File

@ -226,7 +226,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.queryParams.time = []
this.resetForm('queryForm')
this.handleQuery()
},

View File

@ -194,7 +194,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.queryParams.time = [];
this.queryParams.unitId = ''
this.queryParams.proId = ''
this.resetForm("queryForm");

View File

@ -205,7 +205,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.queryParams.time = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -238,7 +238,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.queryParams.time = [];
this.queryParams.unitId = ''
this.queryParams.proId = ''
this.resetForm("queryForm");

View File

@ -243,7 +243,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.queryParams.time = [];
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -217,7 +217,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = []
this.queryParams.time = []
this.queryParams.unitId = ''
this.queryParams.proId = ''
this.resetForm('queryForm')

View File

@ -241,7 +241,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.queryParams.time = [];
this.queryParams.unitId = ''
this.queryParams.proId = ''
this.resetForm("queryForm");

View File

@ -115,7 +115,12 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="岗位编号" type="index" align="center" width="80" />
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="岗位编号" prop="postId" align="center" width="80" /> -->
<el-table-column label="岗位编码" align="center" prop="postCode" />
<el-table-column label="岗位名称" align="center" prop="postName" />
<!-- <el-table-column label="岗位排序" align="center" prop="postSort" /> -->

View File

@ -15,7 +15,6 @@ const port = process.env.port || process.env.npm_config_port || 80 // 端口
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
// 这里只列一部分,具体配置参考文档
module.exports = {
// 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上