工程机具使用查询需求修改
This commit is contained in:
parent
80dcaa3f84
commit
34e8b050cc
|
|
@ -49,6 +49,17 @@ public class ProjUsingRecord {
|
|||
@ApiModelProperty(value = "工程Id")
|
||||
private Integer proId;
|
||||
|
||||
/**
|
||||
* 库管员id
|
||||
*/
|
||||
@ApiModelProperty(value = "库管员id")
|
||||
private Integer userId;
|
||||
/**
|
||||
* 库管员名字
|
||||
*/
|
||||
@ApiModelProperty(value = "库管员名字")
|
||||
private String typeKeepName;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
subquery1.typeName,
|
||||
subquery1.typeModelName,
|
||||
subquery1.unit,
|
||||
subquery3.typeKeepName,
|
||||
IFNULL(subquery1.outNum, 0) as outNum,
|
||||
IFNULL(subquery2.backNum, 0) as backNum,
|
||||
CASE
|
||||
|
|
@ -122,5 +123,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
GROUP BY bai.agreement_id,
|
||||
mt.type_id) AS subquery2 ON subquery1.type_id = subquery2.type_id
|
||||
AND subquery1.agreement_id = subquery2.agreement_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
mkt.type_id,
|
||||
GROUP_CONCAT( su.nick_name SEPARATOR ', ' ) AS typeKeepName,
|
||||
GROUP_CONCAT( su.user_id SEPARATOR ', ' ) AS userIds
|
||||
FROM
|
||||
ma_type_keeper mkt
|
||||
LEFT JOIN sys_user su ON mkt.user_id = su.user_id
|
||||
GROUP BY
|
||||
mkt.type_id
|
||||
) AS subquery3 ON subquery3.type_id = subquery1.type_id
|
||||
<if test="userId != null and userId != ''">
|
||||
WHERE LOCATE(#{userId}, subquery3.userIds) > 0
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -95,7 +95,24 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="库管员" prop="userId">
|
||||
<el-select
|
||||
v-model="queryParams.userId"
|
||||
filterable
|
||||
clearable
|
||||
@change="keepUserChange"
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in keepIdList"
|
||||
:key="item.userId"
|
||||
:label="item.userName"
|
||||
:value="item.userId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
|
@ -172,15 +189,15 @@
|
|||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="租赁数量"
|
||||
align="center"
|
||||
prop="outNum"
|
||||
:show-overflow-tooltip="true"
|
||||
label="库管员"
|
||||
align="center"
|
||||
prop="typeKeepName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="归还数量"
|
||||
label="历史租赁总数"
|
||||
align="center"
|
||||
prop="backNum"
|
||||
prop="outNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -189,6 +206,12 @@
|
|||
prop="usNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="历史归还总数"
|
||||
align="center"
|
||||
prop="backNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column label="在用总价值(元)" align="center" prop="xxx" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="投入总价值(元)" align="center" prop="sss" :show-overflow-tooltip="true" /> -->
|
||||
</el-table>
|
||||
|
|
@ -210,6 +233,7 @@ import {
|
|||
getProData,
|
||||
usingRecord,
|
||||
} from '@/api/stquery/projUsingRecord'
|
||||
import {getTypeKeeper} from "@/api/stquery/deviceStatusRecord";
|
||||
|
||||
export default {
|
||||
name: 'backRecord',
|
||||
|
|
@ -247,6 +271,7 @@ export default {
|
|||
types: 1, // 1申请列表 2审核列表
|
||||
},
|
||||
unitList: [], //来往单位集合
|
||||
keepIdList: [], //库管员id集合
|
||||
proList: [], //工程集合
|
||||
}
|
||||
},
|
||||
|
|
@ -254,6 +279,7 @@ export default {
|
|||
this.getList()
|
||||
this.getUnitList()
|
||||
this.getProList()
|
||||
this.getKeepIdList()
|
||||
},
|
||||
methods: {
|
||||
// 获取 申请列表
|
||||
|
|
@ -263,6 +289,7 @@ export default {
|
|||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
userId: this.queryParams.userId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
// agreementCode:this.queryParams.agreementCode,
|
||||
typeName: this.queryParams.typeName,
|
||||
|
|
@ -279,6 +306,16 @@ export default {
|
|||
this.leaseAuditList = res.data.rows
|
||||
this.total = res.data.total
|
||||
},
|
||||
// 获取 库管员列表
|
||||
async getKeepIdList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
}
|
||||
const res = await getTypeKeeper(params)
|
||||
console.log('机具状态', res)
|
||||
this.loading = false
|
||||
this.keepIdList = res.data
|
||||
},
|
||||
|
||||
// 获取 来往单位 列表数据
|
||||
async getUnitList() {
|
||||
|
|
@ -335,6 +372,19 @@ export default {
|
|||
unitChange(val) {
|
||||
this.getProList(val)
|
||||
},
|
||||
keepUserChange(val) {
|
||||
this.getTypeKeeper(val)
|
||||
},
|
||||
// 获取 库管员
|
||||
async getTypeKeeper() {
|
||||
const params = {
|
||||
}
|
||||
const res = await getTypeKeeper(params)
|
||||
this.keepIdList = res.data
|
||||
console.log('GetProData ======================', res)
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue