This commit is contained in:
zhouzy062 2024-03-27 09:08:31 +08:00
commit 7d8f9d9bee
13 changed files with 811 additions and 87 deletions

View File

@ -268,7 +268,7 @@ public class SysLoginService {
}
// 生成一个随length位数密码
// 生成一个随length位数密码
public static String generateRandomPassword(int length) {
String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
Random random = new Random();

View File

@ -46,7 +46,7 @@ public class SysPasswordService {
retryCount = 0;
}
if (retryCount >= Integer.valueOf(maxRetryCount).intValue()) {
if (retryCount >= maxRetryCount) {
String errMsg = String.format("密码输入错误%s次帐户锁定%s分钟", maxRetryCount, lockTime);
recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, errMsg);
throw new ServiceException(errMsg);

View File

@ -660,7 +660,7 @@ public class DateTimeHelper {
Date now = new Date();
System.out.println("当前时间:" + sdf.format(now));
//30分钟
long time = 30 * 60 * 1000;
int time = 30 * 60 * 1000;
//30分钟后的时间
Date afterDate = new Date(now.getTime() + time);
System.out.println(sdf.format(afterDate));

View File

@ -40,6 +40,18 @@ public class SecondaryWarehouse {
*/
@Excel(name = "单位名称")
private String unitName;
/**
* 工程id
*/
private String proId;
/**
* 工程名称
*/
@Excel(name = "工程")
private String proName;
/**
* 工程名称
*/
@ -90,5 +102,5 @@ public class SecondaryWarehouse {
private String nuitName;
private String keyword;
}

View File

@ -32,15 +32,25 @@ public class TeamLeaseInfo {
*/
private String startTime;
private String endTime;
/**
*
*/
private String companyId;
/**
* 协议id
*/
private String agreementId;
/**
* 单位名称
*/
@Excel(name = "单位名称")
private String unitName;
/**
* 工程id
*/
private String proId;
/**
* 工程名称
*/
@Excel(name = "工程名称")
private String proName;
/**
* 工程名称
*/

View File

@ -25,4 +25,11 @@ public interface SecondaryWarehouseMapper {
List<TeamLeaseInfo> getRecordsThree(TeamLeaseInfo bean);
List<TeamLeaseInfo> getRecordsFour(TeamLeaseInfo bean);
/**
* 查看退库操作详情
* @param bean
* @return
*/
List<TeamLeaseInfo> getRecordsFive(TeamLeaseInfo bean);
}

View File

@ -44,13 +44,20 @@ public class SecondaryWarehouseServiceImpl implements SecondaryWarehouseService
public List<TeamLeaseInfo> getRecords(TeamLeaseInfo bean) {
List<TeamLeaseInfo> list = new ArrayList<>();
if (STRING_1.equals(bean.getQueryType())){
//进场数量
list = mapper.getRecordsOne(bean);
} else if (STRING_2.equals(bean.getQueryType())) {
//退场数量
list = mapper.getRecordsTwo(bean);
} else if (STRING_3.equals(bean.getQueryType())) {
//场内库存
list = mapper.getRecordsThree(bean);
} else if (STRING_4.equals(bean.getQueryType())) {
//已出库数量
list = mapper.getRecordsFour(bean);
} else if (STRING_5.equals(bean.getQueryType())) {
//已退库数量
list = mapper.getRecordsFive(bean);
} else {
throw new ServiceException("查询出错");
}

View File

@ -703,7 +703,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bagi.agreement_id as agreementId,
bai.`status` as `status`,
bad.id as detailsId,
bad.pre_num AS num
bad.pre_num AS num,
IFNULL( aa.num, 0 ) AS useNum
FROM
back_apply_details bad
LEFT JOIN back_apply_info bai ON bai.id = bad.parent_id
@ -713,6 +714,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN bm_project_lot lot ON lot.lot_id = bagi.project_id
LEFT JOIN bm_unit_info unit ON unit.unit_id = bagi.unit_id
LEFT JOIN ma_type mt ON mt.type_id = bad.type_id
LEFT JOIN (
SELECT
SUM( sai.num ) AS num, sai.type_id FROM slt_agreement_info sai
WHERE
sai.`status` = '0'
<if test = "agreementId!=null and agreementId!=''" >
AND sai.agreement_id = #{agreementId}
</if>
GROUP BY sai.type_id
) aa ON aa.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt1.type_id = bad.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id

View File

@ -4,36 +4,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.sgzb.material.mapper.SecondaryWarehouseMapper">
<insert id="addOperate">
insert into team_lease_info (type_id,team_name,lease_man,phone,num,create_by,create_time,type)
values (#{typeId},#{teamName},#{leaseMan},#{phone},#{num},#{createBy},now(),#{type});
insert into team_lease_info (agreement_id,type_id,team_name,lease_man,phone,num,create_by,create_time,type)
values (#{agreementId},#{typeId},#{teamName},#{leaseMan},#{phone},#{num},#{createBy},now(),#{type});
</insert>
<select id="getList" resultType="com.bonus.sgzb.material.domain.SecondaryWarehouse">
SELECT
bui.unit_id as unitId,
bui.unit_name AS unitName,
mt1.type_name AS typeName,
mt.type_name AS modelName,
mt.unit_name as nuitName,
sai.type_id as typeId,
SUM( sai.num ) AS jcNum,
SUM(CASE WHEN sai.`status` = '1' then sai.num ELSE 0 end) as tcNum,
SUM(CASE WHEN sai.`status` = '0' then sai.num ELSE 0 end) as kcNum,
SUM(CASE WHEN tli.num is null then 0 ELSE tli.num end) AS ckNum,
SUM(CASE WHEN sai.`status` = '0' THEN sai.num ELSE 0 END) - SUM(CASE WHEN tli.num IS NULL THEN 0 ELSE tli.num END) AS zkNum
bui.unit_id AS unitId,
sai.agreement_id AS agreementId,
bui.unit_name AS unitName,
bp.lot_name AS proName,
mt1.type_name AS typeName,
mt.type_name AS modelName,
mt.unit_name AS nuitName,
sai.type_id AS typeId,
SUM( sai.num ) AS jcNum,
SUM( CASE WHEN sai.`status` = '1' THEN sai.num ELSE 0 END ) AS tcNum,
SUM( CASE WHEN sai.`status` = '0' THEN sai.num ELSE 0 END ) - IFNULL( tli.num, 0 ) + IFNULL( tli2.num, 0 ) AS kcNum,
IFNULL( tli.num, 0 ) AS ckNum,
IFNULL( tli2.num, 0 ) AS zkNum
FROM
slt_agreement_info sai
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
LEFT JOIN bm_unit_person bup ON bui.unit_id = bup.unit_id
LEFT JOIN team_lease_info tli ON bup.user_id = tli.create_by and sai.type_id = tli.type_id and tli.type = '1'
where 1=1
slt_agreement_info sai
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
LEFT JOIN ( SELECT SUM( num ) AS num, agreement_id, type_id FROM team_lease_info WHERE type = '1' GROUP BY agreement_id, type_id ) tli ON tli.agreement_id = sai.agreement_id
AND tli.type_id = sai.type_id
LEFT JOIN ( SELECT SUM( num ) AS num, agreement_id, type_id FROM team_lease_info WHERE type = '2' GROUP BY agreement_id, type_id ) tli2 ON tli2.agreement_id = sai.agreement_id
AND tli2.type_id = sai.type_id
WHERE 1=1
<if test="unitId != null and unitId != ''">
and bui.unit_id = #{unitId}
</if>
<if test="proId != null and proId != ''">
and bp.lot_id = #{proId}
</if>
<if test="typeId != null and typeId != ''">
and mt1.type_id = #{typeId}
</if>
@ -42,32 +49,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="keyword != null and keyword != ''">
and (bui.unit_name like concat('%', #{keyword}, '%') or
bp.lot_name like concat('%', #{keyword}, '%') or
mt1.type_name like concat('%', #{keyword}, '%') or
mt.type_name like concat('%', #{keyword}, '%')
)
</if>
GROUP BY
bui.unit_id,
sai.type_id
sai.agreement_id,
sai.type_id
</select>
<select id="getOperateList" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
select bui.unit_name AS unitName,
mt1.type_name AS typeName,
mt.type_name AS modelName,
tli.num,
tli.lease_man as leaseMan,
su.nick_name as createBy,
tli.create_time as createTime
from team_lease_info tli
LEFT JOIN bm_unit_person bup ON tli.create_by = bup.user_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bup.unit_id
SELECT
bui.unit_name AS unitName,
bp.lot_name AS proName,
mt1.type_name AS typeName,
mt.type_name AS modelName,
tli.num,
tli.lease_man AS leaseMan,
su.nick_name AS createBy,
tli.create_time AS createTime
FROM
team_lease_info tli
LEFT JOIN bm_agreement_info bai ON tli.agreement_id = bai.agreement_id
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
LEFT JOIN ma_type mt ON tli.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
left join sys_user su on su.user_id = tli.create_by
LEFT JOIN sys_user su ON su.user_id = tli.create_by
where tli.type = #{type}
<if test="unitId != null and unitId != ''">
and bui.unit_id = #{unitId}
</if>
<if test="proId != null and proId != ''">
and bp.lot_id = #{proId}
</if>
<if test="typeId != null and typeId != ''">
and mt1.type_id = #{typeId}
</if>
@ -76,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="keyword != null and keyword != ''">
and (bui.unit_name like concat('%', #{keyword}, '%') or
bp.lot_name like concat('%', #{keyword}, '%') or
mt1.type_name like concat('%', #{keyword}, '%') or
mt.type_name like concat('%', #{keyword}, '%') or
tli.lease_man like concat('%', #{keyword}, '%') or
@ -92,11 +108,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sai.start_time as startTime
FROM
slt_agreement_info sai
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
where bui.unit_id = #{unitId} and mt.type_id = #{typeId}
where mt.type_id = #{typeId} and sai.agreement_id=#{agreementId}
<if test="startTime != null and startTime != ''">
and DATE(sai.start_time) = #{startTime}
</if>
@ -111,11 +125,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sai.end_time as startTime
FROM
slt_agreement_info sai
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
where bui.unit_id = #{unitId} and mt.type_id = #{typeId} and sai.status = '1'
where sai.agreement_id=#{agreementId} and mt.type_id = #{typeId} and sai.status = '1'
<if test="startTime != null and startTime != ''">
and DATE(sai.end_time) = #{startTime}
</if>
@ -130,11 +142,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sai.start_time as startTime
FROM
slt_agreement_info sai
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
LEFT JOIN ma_type mt ON sai.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
where bui.unit_id = #{unitId} and mt.type_id = #{typeId} and sai.status = '0'
where sai.agreement_id=#{agreementId} and mt.type_id = #{typeId} and sai.status = '0'
<if test="startTime != null and startTime != ''">
and DATE(sai.start_time) = #{startTime}
</if>
@ -148,12 +158,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
su.nick_name as createBy,
tli.create_time as startTime
from team_lease_info tli
LEFT JOIN bm_unit_person bup ON tli.create_by = bup.user_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bup.unit_id
LEFT JOIN ma_type mt ON tli.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
left join sys_user su on su.user_id = tli.create_by
where bui.unit_id = #{unitId} and mt.type_id = #{typeId}
where tli.agreement_id=#{agreementId} and mt.type_id = #{typeId} and tli.type = '1'
<if test="startTime != null and startTime != ''">
and DATE(tli.create_time) = #{startTime}
</if>
</select>
<select id="getRecordsFive" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
select tli.team_name as teamName,
mt1.type_name AS typeName,
mt.type_name AS modelName,
tli.num,
su.nick_name as createBy,
tli.create_time as startTime
from team_lease_info tli
LEFT JOIN ma_type mt ON tli.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
left join sys_user su on su.user_id = tli.create_by
where tli.agreement_id=#{agreementId} and mt.type_id = #{typeId} and tli.type = '2'
<if test="startTime != null and startTime != ''">
and DATE(tli.create_time) = #{startTime}
</if>

View File

@ -0,0 +1,64 @@
import request from '@/utils/request'
//机具退料入库
export function getReturnOfMaterialsInfoAll(query) {
return request({
url: '/material/returnOfMaterialsInfo/getReturnOfMaterialsInfoAll',
method: 'get',
params: query
})
}
//机具退料入库--机具类型,规格型号下拉数据
export function getTypeList(query) {
return request({
url: '/material/returnOfMaterialsInfo/getTypeList',
method: 'get',
params: query
})
}
//修试后入库--列表
export function getRepairedList(data) {
return request({
url: '/material/RepairTestInput/getRepairedList',
method: 'get',
params: data
})
}
//修试后入库--详情
export function getRepairedDetailList(data) {
return request({
url: '/material//RepairTestInput/getRepairedDetailList',
method: 'get',
params: data
})
}
//修试后入库--审核
export function inputByType(data) {
return request({
url: '/material/RepairTestInput/inputByType',
method: 'post',
data: data
})
}

View File

@ -13,16 +13,16 @@
<el-form-item label="单位名称" prop="unitId">
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
<el-option
v-for="item in unitList" filterable
:key="item.id" :label="item.name" :value="item.id"
v-for="item in unitList" filterable
:key="item.id" :label="item.name" :value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="proId">
<el-select v-model="queryParams.proId" placeholder="请选择工程名称" clearable>
<el-option
v-for="item in proList" filterable
:key="item.id" :label="item.name" :value="item.id"
v-for="item in proList" filterable
:key="item.id" :label="item.name" :value="item.id"
></el-option>
</el-select>
</el-form-item>
@ -42,13 +42,13 @@
</el-select>
</el-form-item>
<el-form-item label="规格型号" prop="modelId">
<treeselect
v-model="queryParams.modelId"
default-expand-all :options="equipmentTypeList"
placeholder="请选择规格型号"
<treeselect
v-model="queryParams.modelId"
default-expand-all :options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
style="width: 240px;"
style="width: 240px;"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"/>
@ -91,17 +91,21 @@
<span class="clickText" @click="openRecords(scope.row,2)">{{scope.row.tcNUm}}</span>
</template>
</el-table-column>
<el-table-column label="场内库存量" align="center" prop="kcNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="clickText" @click="openRecords(scope.row,3)">{{scope.row.kcNum}}</span>
</template>
</el-table-column>
<el-table-column label="场内库存量" align="center" prop="kcNum" :show-overflow-tooltip="true"/>
<!-- <template slot-scope="scope">-->
<!-- <span class="clickText" @click="openRecords(scope.row,3)">{{scope.row.kcNum}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="已出库数量" align="center" prop="ckNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="clickText" @click="openRecords(scope.row,4)">{{scope.row.ckNum}}</span>
</template>
</el-table-column>
<el-table-column label="在库数量" align="center" prop="zkNum" :show-overflow-tooltip="true" />
<el-table-column label="已退库数量" align="center" prop="zkNum" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span class="clickText" @click="openRecords(scope.row,5)">{{scope.row.zkNum}}</span>
</template>
</el-table-column>
<el-table-column label="计量单位" align="center" prop="nuitName" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -136,8 +140,8 @@
<el-form-item label="规格型号" prop="modelName">
<el-input v-model="form.modelName" placeholder="请输入规格型号" disabled/>
</el-form-item>
<el-form-item label="在库数量" prop="zkNum">
<el-input v-model="form.zkNum" placeholder="请输入在库数量" disabled/>
<el-form-item label="在库数量" prop="kcNum">
<el-input v-model="form.kcNum" placeholder="请输入在库数量" disabled/>
</el-form-item>
<el-form-item label="出库数量" prop="num">
@ -216,16 +220,16 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dialogList">
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="记录时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
<el-table-column label="操作类型" align="center" prop="" :show-overflow-tooltip="true" />
</el-table>
<pagination
@ -285,7 +289,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
unitId: undefined,
modelId: undefined,
typeId: undefined
@ -331,7 +335,7 @@ export default {
this.getUnitList();
this.getProList();
this.equipmentType();
this.getList();
},
methods: {
@ -363,7 +367,7 @@ export default {
if(item2.children.length>0){
item2.children.forEach(item3=>{
if(item3.children.length>0){
item3.children.forEach(item4=>{
item3.children.forEach(item4=>{
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
// item4.purchasePrice = 1
@ -398,11 +402,11 @@ export default {
//
reset() {
this.form = {
};
this.resetForm("form");
this.nform = {
};
this.resetForm("nform");
},
@ -429,7 +433,7 @@ export default {
this.ids = selection.map(item => item.dictId)
this.single = selection.length!=1
this.multiple = !selection.length
},
},
/** 按钮操作 */
handleOut(row) {//1
this.reset();
@ -442,6 +446,7 @@ export default {
this.$set(this.form,'typeName',row.typeName)
this.$set(this.form,'modelName',row.modelName)
this.$set(this.form,'zkNum',row.zkNum)
this.$set(this.form,'kcNum',row.kcNum)
// console.log(this.form)
this.openOut = true;
this.title = "出库";
@ -449,7 +454,7 @@ export default {
handleIn(row) {//2
this.reset();
// this.nform = row;
this.$set(this.form,'agreementId',row.agreementId)
this.$set(this.nform,'agreementId',row.agreementId)
this.$set(this.nform,'unitId',row.unitId)
this.$set(this.nform,'typeId',row.typeId)
this.$set(this.nform,'unitName',row.unitName)
@ -495,10 +500,11 @@ export default {
this.openRecord = true;
this.queryType = type
this.dialogQuery.typeName = row.typeName;
this.dialogQuery.agreementId = row.agreementId;
this.dialogQuery.modelName = row.modelName;
this.dialogQuery.unitId = row.unitId;
this.dialogQuery.typeId = row.typeId;
this.getDialogList();
},
/** 查询列表 */
@ -526,4 +532,4 @@ export default {
color: #02A7F0;
cursor: pointer;
}
</style>
</style>

View File

@ -0,0 +1,583 @@
<template>
<div class="app-container" id="devicesWarehousing">
<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-form-item>
<!-- <el-form-item label="提交入库时间">
<el-date-picker
v-model="queryParams.submitStorageTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="date"
range-separator="-"
placeholder="提交入库时间"
></el-date-picker>
</el-form-item>
<el-form-item label="设备类型" prop="typeId">
<el-select
v-model="queryParams.typeId"
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">
<el-select
v-model="queryParams.modelId"
placeholder="请选择规格型号"
clearable filterable
style="width: 240px"
>
<el-option
v-for="model in modelList"
:key="model.typeId"
:label="model.typeName"
:value="model.typeId"
/>
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleNumberAdd">数量盘点</el-button>
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleCodeAdd">编号盘点</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
:disabled="single"
@click="handleAdd"
v-hasPermi="['system:dict:add']"
>入库审核</el-button>
</el-col> -->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:dict:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:dict:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="returnList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="入库来源" align="center" prop="code" />
<el-table-column label="工程名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="退料单位" align="center" prop="lotName" :show-overflow-tooltip="true" />
<el-table-column label="单号" align="center" prop="kindName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="设备/物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库人" align="center" prop="modelName" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="入库日期" align="center" prop="inputNum" :show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="退料时间" align="center" prop="returnTime" width="180"></el-table-column>
<el-table-column label="提交入库人员" align="center" prop="submitToStoragePersonnel" :show-overflow-tooltip="true" />
<el-table-column label="提交入库时间" align="center" prop="submitStorageTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column> -->
<!-- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']"
>审核</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"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="codeOpen" width="95%" append-to-body>
<el-form :model="codeForm" :rules="codeFormRules" ref="codeForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="入库来源" label-width="auto" prop="codeInStoreSource">
<!-- <el-input
v-model="queryParams.dictName"
placeholder="请输入关键字"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/> -->
<el-select
v-model="codeForm.codeInStoreSource"
placeholder="请选择入库来源"
clearable filterable
style="width: 160px"
>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备/物资类型" label-width="auto" prop="codeDeviceType">
<el-input
v-model="codeForm.codeDeviceType"
placeholder="请输入设备/物资类型"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="待入库总数" label-width="auto" prop="codeWaitInSum">
<el-input
v-model="codeForm.codeWaitInSum"
placeholder="请输入待入库总数"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="前缀" label-width="auto" prop="codePrefix">
<el-input
v-model="codeForm.codePrefix"
placeholder="请输入前缀"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="后缀范围" label-width="auto" prop="codeSuffixStart">
<el-input
v-model="codeForm.codeSuffixStart"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="~" label-width="auto" prop="codeSuffixEnd">
<el-input
v-model="codeForm.codeSuffixEnd"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单价" label-width="auto" prop="codeSinglePrice">
<el-input
v-model="codeForm.codeSinglePrice"
placeholder="请输入单价"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="选择厂家" label-width="auto" prop="codeFactory">
<el-select
v-model="codeForm.codeFactory"
placeholder="请选择厂家"
clearable filterable
style="width: 160px"
>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="检修时间" label-width="auto" prop="codeCheckFixTime">
<el-input
v-model="codeForm.codeCheckFixTime"
placeholder="请输入检修时间"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="下次检修时间" label-width="auto" prop="codeNextCheckFixTime">
<el-input
v-model="codeForm.codeNextCheckFixTime"
placeholder="请输入下次检修时间"
clearable
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备注" label-width="auto" prop="codeNote">
<el-input
v-model="codeForm.codeNote"
type="textarea"
style="width: 260px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-edit" size="mini" @click="fillCodeForm">点击填充</el-button>
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
</el-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
:disabled="multiple"
>批量通过</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
:disabled="multiple"
>批量不通过</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button>
</el-col>
</el-row> -->
<el-table v-loading="loading" :data="returnList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="dictId" />
<el-table-column label="设备类型" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="编号" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="不通过原因" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
>通过</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>不通过</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:dict:remove']"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="codeForm.pageNum"
:limit.sync="codeForm.pageSize"
@pagination="getList"
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancelCode"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { getReturnOfMaterialsInfoAll,getTypeList } from "@/api/store/warehousing";
export default {
name: "DevicesWarehousing",
dicts: ['sys_normal_disable'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
typeList: [],
modelList: [],
//
returnList: [],
//
title: "",
//
numberOpen: false,
codeOpen: false,
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined,
},
//
numberForm: {},
codeForm: {
codeInStoreSource: undefined,
codeNote: undefined,
codeDeviceType: undefined,
codeWaitInSum: undefined,
codePrefix: undefined,
codeSuffixStart: undefined,
codeSuffixEnd: undefined,
codeSinglePrice: undefined,
codeFactory: undefined,
codeCheckFixTime: undefined,
codeNextCheckFixTime: undefined,
pageNum: 1,
pageSize: 10,
},
//
rules: {
dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" }
],
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
]
},
codeFormRules: {
codeInStoreSource: [
{ required: true, message: "入库来源不能为空", trigger: "blur" }
],
codeDeviceType: [
{ required: true, message: "设备/物资类型不能为空", trigger: "blur" }
],
codeWaitInSum: [
{ required: true, message: "待入库总数不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getTypeList();
},
methods: {//
/** 查询字典类型列表 */
getTypeList() {
getTypeList({level:'3'}).then(response => {
this.typeList = response.data;
}
);
getTypeList({level:'4'}).then(response => {
this.modelList = response.data;
}
);
},
/** 查询字典类型列表 */
getList() {
this.loading = true;
getReturnOfMaterialsInfoAll(this.queryParams).then(response => {
this.returnList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
//
cancelCode() {
this.codeOpen = false;
this.reset();
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 填充编码盘点表单 */
fillCodeForm() {
console.log(this.codeForm)
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增数量盘点按钮操作 */
handleNumberAdd() {
this.reset();
this.numberOpen = true;
this.title = "数量盘点入库";
},
/** 新增编号盘点按钮操作 */
handleCodeAdd() {
this.reset();
this.codeOpen = true;
this.title = "编码盘点入库";
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictId)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dictId = row.dictId || this.ids
getType(dictId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改字典类型";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const dictIds = row.dictId || this.ids;
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
return delType(dictIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('material/returnOfMaterialsInfo/export', {
...this.queryParams
}, `机具退料入库_${new Date().getTime()}.xlsx`)
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
this.$store.dispatch('dict/cleanDict');
});
}
}
};
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
</style>

View File

@ -49,7 +49,7 @@ module.exports = {
//******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址;
//qrUrl:'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode='
//更改 utils/globalUrl.js 内qrUrl地址
//2.打开view文件夹根目录dashboard.vue 更换大屏项目发布的跳转地址打开大屏项目config/index.js更改请求地址大屏打包node<16.0.0;
//3.只有南网项目产线gl发布打包时候需要注意
// 将 assetsDir:'static' 改为 assetsDir:'gl/static',还有env.development和env.production中的VUE_APP_BASE_API改为'/gl/dev-api';登录跳转地址从/login换成/gl/;