综合查询在用可以点击查看编码设备
This commit is contained in:
parent
25282e7b17
commit
f15c1f9ba1
|
|
@ -34,6 +34,13 @@ public class MaType extends BaseEntity {
|
||||||
@Excel(name = "名称")
|
@Excel(name = "名称")
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
|
||||||
|
/** 规格型号 */
|
||||||
|
@ApiModelProperty(value = "规格型号")
|
||||||
|
private String modelName;
|
||||||
|
/** 规格型号 */
|
||||||
|
@ApiModelProperty(value = "机具编码")
|
||||||
|
private String maCode;
|
||||||
|
|
||||||
/** 类型ID */
|
/** 类型ID */
|
||||||
@ApiModelProperty(value = "类型ID,用作组织树筛选")
|
@ApiModelProperty(value = "类型ID,用作组织树筛选")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
package com.bonus.sgzb.material.controller;
|
package com.bonus.sgzb.material.controller;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.api.domain.MaType;
|
||||||
|
import com.bonus.sgzb.base.api.domain.MachIneDto;
|
||||||
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.log.annotation.Log;
|
import com.bonus.sgzb.common.log.annotation.Log;
|
||||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import com.bonus.sgzb.material.domain.StorageStatus;
|
import com.bonus.sgzb.material.domain.StorageStatus;
|
||||||
|
import com.bonus.sgzb.material.mapper.StorageStatusMapper;
|
||||||
import com.bonus.sgzb.material.service.StorageStatusService;
|
import com.bonus.sgzb.material.service.StorageStatusService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -30,6 +33,9 @@ public class StorageStatusController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private StorageStatusService storageStatusService;
|
private StorageStatusService storageStatusService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StorageStatusMapper storageStatusMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机具仓储状态查询列表
|
* 机具仓储状态查询列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -54,4 +60,15 @@ public class StorageStatusController extends BaseController {
|
||||||
util.exportExcel(response, list, "综合查询--工程机具使用");
|
util.exportExcel(response, list, "综合查询--工程机具使用");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询机具编码
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "综合查询--查询机具编码")
|
||||||
|
@GetMapping("/getMaCodeList")
|
||||||
|
public AjaxResult getMaCodeList(StorageStatus bean) {
|
||||||
|
startPage();
|
||||||
|
List<MaType> list = storageStatusMapper.getMaCodeList(bean);
|
||||||
|
return AjaxResult.success(getDataTable(list));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ public class StorageStatus {
|
||||||
@ApiModelProperty(value = "类型名称")
|
@ApiModelProperty(value = "类型名称")
|
||||||
@Excel(name = "机具名称")
|
@Excel(name = "机具名称")
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
/**
|
||||||
|
* 类型名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "机具编码")
|
||||||
|
private String maCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格ID
|
* 规格ID
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.bonus.sgzb.material.mapper;
|
package com.bonus.sgzb.material.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.api.domain.MaType;
|
||||||
import com.bonus.sgzb.material.domain.ProjUsingRecord;
|
import com.bonus.sgzb.material.domain.ProjUsingRecord;
|
||||||
import com.bonus.sgzb.material.domain.StorageStatus;
|
import com.bonus.sgzb.material.domain.StorageStatus;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
@ -20,4 +21,6 @@ public interface StorageStatusMapper {
|
||||||
* @return List<StorageStatus>
|
* @return List<StorageStatus>
|
||||||
*/
|
*/
|
||||||
List<StorageStatus> getStorageStatusList(StorageStatus bean);
|
List<StorageStatus> getStorageStatusList(StorageStatus bean);
|
||||||
|
|
||||||
|
List<MaType> getMaCodeList(StorageStatus bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,4 +171,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and mt.type_name like concat('%',#{typeModelName},'%')
|
and mt.type_name like concat('%',#{typeModelName},'%')
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getMaCodeList" resultType="com.bonus.sgzb.base.api.domain.MaType">
|
||||||
|
SELECT
|
||||||
|
mm.ma_code,
|
||||||
|
mt2.type_name typeName,
|
||||||
|
mt.type_name modelName
|
||||||
|
FROM
|
||||||
|
ma_machine mm
|
||||||
|
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||||
|
WHERE mm.ma_status = 15 and mm.type_id = #{typeId}
|
||||||
|
<if test="maCode != null and maCode != ''">
|
||||||
|
and mm.ma_code like concat('%',#{maCode},'%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -46,6 +46,15 @@ export function getTypeKeeper(params = {}){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取 机具编码
|
||||||
|
export function getUseMaCode(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/storageStatus/getMaCodeList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,14 @@
|
||||||
align="center"
|
align="center"
|
||||||
prop="num"
|
prop="num"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span
|
||||||
|
class="clickText"
|
||||||
|
@click="openRecords(scope.row)"
|
||||||
|
>{{ scope.row.num }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="在用数量"
|
label="在用数量"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -218,6 +225,90 @@
|
||||||
:page-sizes="[5, 10, 15, 20, 30]"
|
:page-sizes="[5, 10, 15, 20, 30]"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
<!-- 在用编码设备弹窗-->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="openRecord"
|
||||||
|
width="1200px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:model="dialogQuery"
|
||||||
|
ref="dialogQuery"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
label-width="80px"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-form-item label="机具编码" prop="maCode">
|
||||||
|
<el-input
|
||||||
|
v-model="dialogQuery.maCode"
|
||||||
|
placeholder="请输入机具编码"
|
||||||
|
clearable
|
||||||
|
:maxlength="20"
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleDialogQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleDialogQuery"
|
||||||
|
>查询</el-button>
|
||||||
|
|
||||||
|
<!-- <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"
|
||||||
|
width="80"
|
||||||
|
type="index"
|
||||||
|
:index="indexContinuation(dialogQuery.pageNum, dialogQuery.pageSize)"
|
||||||
|
>
|
||||||
|
<!-- <template slot-scope="scope">
|
||||||
|
<span>{{
|
||||||
|
(dialogQuery.pageNum - 1) * 10 + scope.$index + 1
|
||||||
|
}}</span>
|
||||||
|
</template> -->
|
||||||
|
</el-table-column>
|
||||||
|
<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="maCode"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="dialogTotal > 0"
|
||||||
|
:total="dialogTotal"
|
||||||
|
:page.sync="dialogQuery.pageNum"
|
||||||
|
:limit.sync="dialogQuery.pageSize"
|
||||||
|
@pagination="getUseMaCodeList"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -225,9 +316,10 @@
|
||||||
import {
|
import {
|
||||||
statusList,
|
statusList,
|
||||||
exportList,
|
exportList,
|
||||||
getUnitData,
|
getUnitData,getUseMaCode,
|
||||||
getProData, getTypeKeeper,
|
getProData, getTypeKeeper,
|
||||||
} from '@/api/stquery/deviceStatusRecord'
|
} from '@/api/stquery/deviceStatusRecord'
|
||||||
|
import {getRecords} from "@/api/claimAndRefund/secondStore";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'backRecord',
|
name: 'backRecord',
|
||||||
|
|
@ -238,6 +330,8 @@ export default {
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: '',
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
|
|
@ -257,6 +351,7 @@ export default {
|
||||||
dictName: undefined,
|
dictName: undefined,
|
||||||
dictType: undefined,
|
dictType: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
|
maCode: undefined,
|
||||||
|
|
||||||
time: null, //申请时间
|
time: null, //申请时间
|
||||||
unitId: null, //来往单位id
|
unitId: null, //来往单位id
|
||||||
|
|
@ -265,9 +360,19 @@ export default {
|
||||||
types: 1, // 1申请列表 2审核列表
|
types: 1, // 1申请列表 2审核列表
|
||||||
maType: '1', // 1机具 2调试
|
maType: '1', // 1机具 2调试
|
||||||
},
|
},
|
||||||
|
//记录弹窗
|
||||||
|
openRecord: false,
|
||||||
|
dialogQuery: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
typeId: undefined,
|
||||||
|
maCode: undefined,
|
||||||
|
},
|
||||||
unitList: [], //来往单位集合
|
unitList: [], //来往单位集合
|
||||||
|
dialogList: [],
|
||||||
keepIdList: [], //库管员id集合
|
keepIdList: [], //库管员id集合
|
||||||
proList: [], //工程集合
|
proList: [], //工程集合
|
||||||
|
dialogTotal: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -355,6 +460,11 @@ export default {
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
/** 搜索在用编码按钮操作 */
|
||||||
|
handleDialogQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getUseMaCodeList()
|
||||||
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.queryParams.time = []
|
this.queryParams.time = []
|
||||||
|
|
@ -375,7 +485,19 @@ export default {
|
||||||
unitChange(val) {
|
unitChange(val) {
|
||||||
this.getTypeKeeper(val)
|
this.getTypeKeeper(val)
|
||||||
},
|
},
|
||||||
|
//查看编码在库数据
|
||||||
|
openRecords(row) {
|
||||||
|
this.openRecord = true
|
||||||
|
this.dialogQuery.typeId= row.typeId
|
||||||
|
this.getUseMaCodeList()
|
||||||
|
},
|
||||||
|
/** 查询编码机具列表 */
|
||||||
|
getUseMaCodeList() {
|
||||||
|
getUseMaCode(this.dialogQuery).then((response) => {
|
||||||
|
this.dialogList = response.data.rows
|
||||||
|
this.dialogTotal = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
// 表单合并行
|
// 表单合并行
|
||||||
/* mergeRow ({ row, column, rowIndex, columnIndex}) {
|
/* mergeRow ({ row, column, rowIndex, columnIndex}) {
|
||||||
if (rowIndex == 0) {
|
if (rowIndex == 0) {
|
||||||
|
|
@ -393,4 +515,8 @@ export default {
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
.clickText {
|
||||||
|
color: #02a7f0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
|
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
|
|
||||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
||||||
|
|
@ -179,7 +179,7 @@
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column label="总保有量资产(万元)" align="center" prop="proName" :show-overflow-tooltip="true" /> -->
|
<!-- <el-table-column label="总保有量资产(万元)" align="center" prop="proName" :show-overflow-tooltip="true" /> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="是否计数"
|
label="管理模式"
|
||||||
align="center"
|
align="center"
|
||||||
prop="manageType"
|
prop="manageType"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue