综合查询在用可以点击查看编码设备
This commit is contained in:
parent
38a7bc7336
commit
4fcd53e0e9
|
|
@ -40,6 +40,9 @@ public class MaType extends BaseEntity {
|
|||
/** 规格型号 */
|
||||
@ApiModelProperty(value = "机具编码")
|
||||
private String maCode;
|
||||
/** 工程名称 */
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String proName;
|
||||
|
||||
/** 类型ID */
|
||||
@ApiModelProperty(value = "类型ID,用作组织树筛选")
|
||||
|
|
|
|||
|
|
@ -70,5 +70,15 @@ public class StorageStatusController extends BaseController {
|
|||
List<MaType> list = storageStatusMapper.getMaCodeList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
/**
|
||||
* 查询机具编码
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--查询在用设备详情")
|
||||
@GetMapping("/getUserRecords")
|
||||
public AjaxResult getUserRecords(StorageStatus bean) {
|
||||
startPage();
|
||||
List<MaType> list = storageStatusMapper.getUserRecords(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,4 +23,6 @@ public interface StorageStatusMapper {
|
|||
List<StorageStatus> getStorageStatusList(StorageStatus bean);
|
||||
|
||||
List<MaType> getMaCodeList(StorageStatus bean);
|
||||
|
||||
List<MaType> getUserRecords(StorageStatus bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,4 +185,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and mm.ma_code like concat('%',#{maCode},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getUserRecords" resultType="com.bonus.sgzb.base.api.domain.MaType">
|
||||
SELECT
|
||||
bpl.lot_name proName,
|
||||
mt.type_name modelName,
|
||||
mt2.type_name typeName,
|
||||
mm.ma_code
|
||||
FROM
|
||||
slt_agreement_info sai
|
||||
LEFT JOIN bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id
|
||||
LEFT JOIN ma_type mt on mt.type_id = sai.type_id
|
||||
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm on mm.ma_id = sai.ma_id
|
||||
WHERE
|
||||
sai.type_id = #{typeId}
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -54,6 +54,14 @@ export function getUseMaCode(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
// 获取 在用机具设备
|
||||
export function getUserRecords(query) {
|
||||
return request({
|
||||
url: '/material/storageStatus/getUserRecords',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@
|
|||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- 当 manageType 为 '编码' 时,使用可点击的 span -->
|
||||
<span
|
||||
v-if="scope.row.manageType === '编码'"
|
||||
class="clickText"
|
||||
|
|
@ -184,7 +185,14 @@
|
|||
align="center"
|
||||
prop="usNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
class="clickText"
|
||||
@click="openUserRecords(scope.row)"
|
||||
>{{ scope.row.usNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="在修数量"
|
||||
align="center"
|
||||
|
|
@ -232,7 +240,7 @@
|
|||
:page-sizes="[5, 10, 15, 20, 30]"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 在用编码设备弹窗-->
|
||||
<!-- 在库编码设备弹窗-->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openRecord"
|
||||
|
|
@ -252,7 +260,7 @@
|
|||
v-model="dialogQuery.maCode"
|
||||
placeholder="请输入机具编码"
|
||||
clearable
|
||||
:maxlength="20"
|
||||
:maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleDialogQuery"
|
||||
/>
|
||||
|
|
@ -265,12 +273,6 @@
|
|||
size="mini"
|
||||
@click="handleDialogQuery"
|
||||
>查询</el-button>
|
||||
|
||||
<!-- <el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetDialogQuery"
|
||||
>重置</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
|
@ -282,11 +284,6 @@
|
|||
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="类型名称"
|
||||
|
|
@ -316,6 +313,87 @@
|
|||
@pagination="getUseMaCodeList"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 在用编码设备弹窗-->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openUseRecord"
|
||||
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-form-item>
|
||||
</el-form>-->
|
||||
|
||||
<el-table v-loading="loading" :data="UserRecords">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="80"
|
||||
type="index"
|
||||
:index="indexContinuation(dialogQuery.pageNum, dialogQuery.pageSize)"
|
||||
>
|
||||
</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-column
|
||||
label="所在工程"
|
||||
align="center"
|
||||
prop="proName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="dialogTotal > 0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="dialogQuery.pageNum"
|
||||
:limit.sync="dialogQuery.pageSize"
|
||||
@pagination="getUserRecords"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -325,6 +403,7 @@ import {
|
|||
exportList,
|
||||
getUnitData,getUseMaCode,
|
||||
getProData, getTypeKeeper,
|
||||
getUserRecords,
|
||||
} from '@/api/stquery/deviceStatusRecord'
|
||||
import {getRecords} from "@/api/claimAndRefund/secondStore";
|
||||
|
||||
|
|
@ -369,6 +448,7 @@ export default {
|
|||
},
|
||||
//记录弹窗
|
||||
openRecord: false,
|
||||
openUseRecord: false,
|
||||
dialogQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
|
@ -376,7 +456,8 @@ export default {
|
|||
maCode: undefined,
|
||||
},
|
||||
unitList: [], //来往单位集合
|
||||
dialogList: [],
|
||||
dialogList: [], //在库编码设备列表
|
||||
UserRecords: [], //在用设备列表
|
||||
keepIdList: [], //库管员id集合
|
||||
proList: [], //工程集合
|
||||
dialogTotal: 0,
|
||||
|
|
@ -499,6 +580,13 @@ export default {
|
|||
this.dialogQuery.typeId= row.typeId
|
||||
this.getUseMaCodeList()
|
||||
},
|
||||
|
||||
//查看在用设备
|
||||
openUserRecords(row) {
|
||||
this.openUseRecord = true
|
||||
this.dialogQuery.typeId= row.typeId
|
||||
this.getUserRecords()
|
||||
},
|
||||
/** 查询编码机具列表 */
|
||||
getUseMaCodeList() {
|
||||
getUseMaCode(this.dialogQuery).then((response) => {
|
||||
|
|
@ -506,6 +594,13 @@ export default {
|
|||
this.dialogTotal = response.data.total
|
||||
})
|
||||
},
|
||||
/** 查询在用设备列表 */
|
||||
getUserRecords() {
|
||||
getUserRecords(this.dialogQuery).then((response) => {
|
||||
this.UserRecords = response.data.rows
|
||||
this.dialogTotal = response.data.total
|
||||
})
|
||||
},
|
||||
// 表单合并行
|
||||
/* mergeRow ({ row, column, rowIndex, columnIndex}) {
|
||||
if (rowIndex == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue