2023-11-07 10:08:37 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="content">
|
|
|
|
|
<view class="search card">
|
|
|
|
|
<u--input
|
|
|
|
|
prefixIcon="search"
|
|
|
|
|
placeholder="请输入关键字"
|
|
|
|
|
border="surround"
|
|
|
|
|
v-model="KEYWORDS"
|
|
|
|
|
clearable
|
|
|
|
|
shape="circle"
|
|
|
|
|
></u--input>
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<view class="bth-mini ml-10">
|
|
|
|
|
<u-button type="success" text="确定" @click="resetList"></u-button>
|
|
|
|
|
</view>
|
2024-07-27 15:13:42 +08:00
|
|
|
|
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
<u-popup :show="popupShow" @close="popupShow = false" mode="right" :customStyle="{width:'85vw'}">
|
|
|
|
|
<view class="card">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<view class="pl-10 pr-10">
|
|
|
|
|
<u--form labelPosition="left">
|
|
|
|
|
<u-form-item label="清单名称" borderBottom>
|
|
|
|
|
<u--input
|
|
|
|
|
inputAlign="right"
|
|
|
|
|
placeholder="请输入清单名称"
|
|
|
|
|
border="none"
|
|
|
|
|
v-model="KEYWORDS"
|
|
|
|
|
clearable
|
|
|
|
|
></u--input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="检查部门" borderBottom>
|
|
|
|
|
<u--text :text="DEPTNAME || '请选择'" @click="showTree"></u--text>
|
|
|
|
|
<tki-tree ref="tkitree" :range="deptRange" rangeKey="name" selectParent @confirm="confirmTree"/>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="检查人" borderBottom>
|
|
|
|
|
<u--text :text="USER_NAME || '请选择'" @click="userShow = true"></u--text>
|
|
|
|
|
<u-picker :show="userShow" :columns="userList" keyName="USERNAME"
|
|
|
|
|
@cancel="userShow = false"
|
|
|
|
|
@confirm="pickerConfirm($event,'user')"></u-picker>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="清单类型" borderBottom>
|
|
|
|
|
<u--text :text="TYPE_NAME || '请选择'" @click="typeShow = true"></u--text>
|
|
|
|
|
<u-picker :show="typeShow" :columns="typeList" keyName="NAME"
|
|
|
|
|
@cancel="typeShow = false"
|
|
|
|
|
@confirm="pickerConfirm($event,'type')"></u-picker>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="排查周期" borderBottom>
|
|
|
|
|
<u--text :text="PERIOD_NAME || '请选择'" @click="periodShow = true"></u--text>
|
|
|
|
|
<u-picker :show="periodShow" :columns="periodList" keyName="NAME"
|
|
|
|
|
@cancel="periodShow = false"
|
|
|
|
|
@confirm="pickerConfirm($event,'period')"></u-picker>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="开始时间" borderBottom>
|
|
|
|
|
<u--text :text="startDate || '请选择'"
|
|
|
|
|
@click="startDateShow = true"></u--text>
|
|
|
|
|
<u-datetime-picker :show="startDateShow"
|
|
|
|
|
mode="date"
|
|
|
|
|
:value="Number(new Date())"
|
|
|
|
|
@cancel="startDateShow = false"
|
|
|
|
|
@confirm="startDateConfirm"></u-datetime-picker>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="结束时间" borderBottom>
|
|
|
|
|
<u--text :text="endDate || '请选择'"
|
|
|
|
|
@click="endDateShow = true"></u--text>
|
|
|
|
|
<u-datetime-picker :show="endDateShow"
|
|
|
|
|
mode="date"
|
|
|
|
|
:value="Number(new Date())"
|
|
|
|
|
@cancel="endDateShow = false"
|
|
|
|
|
@confirm="endDateConfirm"></u-datetime-picker>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u--form>
|
|
|
|
|
</view>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
<view class="mt-10 flex-between">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<view class="flex1">
|
|
|
|
|
<u-button type="info" text="重置" @click="reset"></u-button>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="ml-10 flex1">
|
|
|
|
|
<u-button type="primary" text="查询" @click="resetList"></u-button>
|
|
|
|
|
</view>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
|
|
|
|
|
<u-list-item v-for="(item, index) in list" :key="index">
|
|
|
|
|
<view>
|
|
|
|
|
<view class="flex-between main-title">
|
|
|
|
|
<text>清单名称:{{ item.NAME }}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between mt-10 subtitle">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<text>清单类型:{{ item.TYPENAME }}</text>
|
|
|
|
|
<text>排查周期:{{ item.PERIODNAME }}</text>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between mt-10 subtitle">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<text>部门:{{ item.DEPARTMENT_NAME }}</text>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between mt-10 subtitle">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<text>岗位:{{ item.POST_NAME }}</text>
|
|
|
|
|
<text>人员:{{ item.USER_NAME }}</text>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="flex-between mt-10 subtitle">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<text>检查次数:{{ item.count }}</text>
|
|
|
|
|
<text>超期未检查次数:{{ item.OVERTIMENUM }}</text>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
2024-07-27 15:13:42 +08:00
|
|
|
|
<view class="flex-end mt-10 see_btn">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<u-button type="primary" text="查看" size="mini"
|
|
|
|
|
@click="fnNavigatorDetail(item.LISTMANAGER_ID)"></u-button>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-list-item>
|
|
|
|
|
</u-list>
|
|
|
|
|
<empty v-else></empty>
|
2024-10-10 10:14:31 +08:00
|
|
|
|
<fab-button type="search" @click="popupShow = true"/>
|
2023-11-07 10:08:37 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-10-10 10:14:31 +08:00
|
|
|
|
import {
|
|
|
|
|
getInspectionReportListManageList,
|
|
|
|
|
getDept,
|
|
|
|
|
getDeptUser,
|
|
|
|
|
getCorpDept,
|
|
|
|
|
getCheckCycle,
|
|
|
|
|
getListType,
|
|
|
|
|
getInspectedDepartment
|
|
|
|
|
} from "../../../api";
|
|
|
|
|
import FabButton from "@/components/fab_button/index.vue";
|
2023-11-07 10:08:37 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
2024-10-10 10:14:31 +08:00
|
|
|
|
components: {FabButton},
|
2023-11-07 10:08:37 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
CORPINFO_ID: '',
|
|
|
|
|
KEYWORDS: '',
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
totalPage: 0,
|
|
|
|
|
list: [],
|
|
|
|
|
popupShow: false,
|
|
|
|
|
DEPT: '',
|
|
|
|
|
DEPTNAME: '',
|
|
|
|
|
deptRange: [],
|
|
|
|
|
userList: [],
|
|
|
|
|
userShow: false,
|
2024-10-10 10:14:31 +08:00
|
|
|
|
USER_NAME: '',
|
|
|
|
|
USER_ID: '',
|
2023-11-07 10:08:37 +08:00
|
|
|
|
typeList: [],
|
|
|
|
|
typeShow: false,
|
2024-10-10 10:14:31 +08:00
|
|
|
|
TYPE_NAME: '',
|
|
|
|
|
TYPE_ID: '',
|
2023-11-07 10:08:37 +08:00
|
|
|
|
periodList: [],
|
|
|
|
|
periodShow: false,
|
2024-10-10 10:14:31 +08:00
|
|
|
|
PERIOD_NAME: '',
|
|
|
|
|
PERIOD_ID: '',
|
|
|
|
|
startDateShow: false,
|
|
|
|
|
startDate: '',
|
|
|
|
|
endDateShow: false,
|
|
|
|
|
endDate: '',
|
2023-11-07 10:08:37 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(event) {
|
|
|
|
|
this.CORPINFO_ID = event.CORPINFO_ID;
|
|
|
|
|
this.resetList()
|
|
|
|
|
this.getDept()
|
|
|
|
|
this.fnGetCheckCycle()
|
|
|
|
|
this.fnGetListType()
|
|
|
|
|
},
|
2024-10-10 10:14:31 +08:00
|
|
|
|
methods: {
|
2023-11-07 10:08:37 +08:00
|
|
|
|
async getDept() {
|
|
|
|
|
let resData = await getInspectedDepartment({'CORPINFO_ID': this.CORPINFO_ID});
|
|
|
|
|
this.deptRange = JSON.parse(resData.zTreeNodes)
|
|
|
|
|
},
|
|
|
|
|
async fnGetDeptUser(detpId) {
|
|
|
|
|
let resData = await getDeptUser({'DEPARTMENT_ID': detpId});
|
|
|
|
|
this.$set(this.userList, 0, resData.userList)
|
|
|
|
|
},
|
|
|
|
|
async fnGetCheckCycle() {
|
|
|
|
|
let resData = await getCheckCycle();
|
|
|
|
|
this.$set(this.periodList, 0, resData.list)
|
|
|
|
|
},
|
|
|
|
|
async fnGetListType() {
|
|
|
|
|
let resData = await getListType();
|
|
|
|
|
this.$set(this.typeList, 0, resData.list)
|
|
|
|
|
},
|
2024-10-10 10:14:31 +08:00
|
|
|
|
async getData() {
|
2023-11-07 10:08:37 +08:00
|
|
|
|
this.popupShow = false
|
|
|
|
|
let resData = await getInspectionReportListManageList({
|
|
|
|
|
CORPINFO_ID: this.CORPINFO_ID,
|
|
|
|
|
KEYWORDS: this.KEYWORDS,
|
|
|
|
|
DEPARTMENT_ID: this.DEPT,
|
|
|
|
|
USER_ID: this.USER_ID,
|
|
|
|
|
TYPE: this.TYPE_ID,
|
|
|
|
|
PERIOD: this.PERIOD_ID,
|
|
|
|
|
STARTTIME: this.startDate,
|
|
|
|
|
ENDTIME: this.endDate,
|
|
|
|
|
showCount: this.pageSize,
|
|
|
|
|
currentPage: this.currentPage,
|
|
|
|
|
});
|
2024-10-10 10:14:31 +08:00
|
|
|
|
this.list = [...this.list, ...resData.varList];
|
2023-11-07 10:08:37 +08:00
|
|
|
|
this.totalPage = resData.page.totalPage;
|
|
|
|
|
},
|
|
|
|
|
resetList() {
|
2024-10-10 10:14:31 +08:00
|
|
|
|
this.pageSize = 10
|
|
|
|
|
this.currentPage = 1
|
2023-11-07 10:08:37 +08:00
|
|
|
|
this.list = []
|
|
|
|
|
this.getData()
|
|
|
|
|
},
|
2024-10-10 10:14:31 +08:00
|
|
|
|
fnNavigatorDetail(LISTMANAGER_ID) {
|
2023-11-07 10:08:37 +08:00
|
|
|
|
uni.$u.route({
|
|
|
|
|
url: '/pages/branch-self-report/index/inspection-records-detail-list',
|
|
|
|
|
params: {
|
|
|
|
|
LISTMANAGER_ID,
|
|
|
|
|
CORPINFO_ID: this.CORPINFO_ID,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
scrolltolower() {
|
|
|
|
|
this.currentPage++;
|
2024-10-10 10:14:31 +08:00
|
|
|
|
if (this.totalPage >= this.currentPage) this.getData();
|
2023-11-07 10:08:37 +08:00
|
|
|
|
},
|
|
|
|
|
showTree() {
|
|
|
|
|
this.$refs.tkitree._show()
|
|
|
|
|
},
|
|
|
|
|
confirmTree(e) {
|
|
|
|
|
this.DEPT = e[0].id
|
|
|
|
|
this.DEPTNAME = e[0].name
|
|
|
|
|
this.fnGetDeptUser(e[0].id)
|
|
|
|
|
},
|
|
|
|
|
pickerConfirm(e, type) {
|
|
|
|
|
if (type === 'user') {
|
|
|
|
|
this.USER_ID = e.value[0].USER_ID
|
|
|
|
|
this.USER_NAME = e.value[0].USERNAME
|
|
|
|
|
this.userShow = false;
|
|
|
|
|
}
|
|
|
|
|
if (type === 'type') {
|
|
|
|
|
this.TYPE_ID = e.value[0].BIANMA
|
|
|
|
|
this.TYPE_NAME = e.value[0].NAME
|
|
|
|
|
this.typeShow = false;
|
|
|
|
|
}
|
|
|
|
|
if (type === 'period') {
|
|
|
|
|
this.PERIOD_ID = e.value[0].BIANMA
|
|
|
|
|
this.PERIOD_NAME = e.value[0].NAME
|
|
|
|
|
this.periodShow = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-10-10 10:14:31 +08:00
|
|
|
|
startDateConfirm(e) {
|
2023-11-07 10:08:37 +08:00
|
|
|
|
this.startDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
|
|
|
|
this.startDateShow = false
|
|
|
|
|
},
|
2024-10-10 10:14:31 +08:00
|
|
|
|
endDateConfirm(e) {
|
2023-11-07 10:08:37 +08:00
|
|
|
|
this.endDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
|
|
|
|
this.endDateShow = false
|
|
|
|
|
},
|
|
|
|
|
reset() {
|
|
|
|
|
this.popupShow = false
|
|
|
|
|
this.KEYWORDS = ''
|
|
|
|
|
this.DEPT = ''
|
|
|
|
|
this.DEPTNAME = ''
|
|
|
|
|
this.USER_ID = ''
|
|
|
|
|
this.USER_NAME = ''
|
|
|
|
|
this.TYPE_ID = ''
|
|
|
|
|
this.TYPE_NAME = ''
|
|
|
|
|
this.PERIOD_ID = ''
|
|
|
|
|
this.PERIOD_NAME = ''
|
|
|
|
|
this.startDate = ''
|
|
|
|
|
this.endDate = ''
|
|
|
|
|
this.resetList()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2024-07-27 15:13:42 +08:00
|
|
|
|
<style scoped lang="scss">
|
2024-10-10 10:14:31 +08:00
|
|
|
|
.search {
|
2024-07-27 15:13:42 +08:00
|
|
|
|
display: flex;
|
2024-10-10 10:14:31 +08:00
|
|
|
|
|
|
|
|
|
.ml-10 {
|
2024-07-27 15:13:42 +08:00
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
}
|
2024-10-10 10:14:31 +08:00
|
|
|
|
|
|
|
|
|
.bth-mini {
|
2024-07-27 15:13:42 +08:00
|
|
|
|
width: 100rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2024-10-10 10:14:31 +08:00
|
|
|
|
|
|
|
|
|
.see_btn {
|
2024-07-27 15:13:42 +08:00
|
|
|
|
width: 100rpx;
|
|
|
|
|
float: right;
|
|
|
|
|
}
|
2023-11-07 10:08:37 +08:00
|
|
|
|
|
|
|
|
|
</style>
|