日计划接口调试

This commit is contained in:
BianLzhaoMin 2024-10-30 20:28:51 +08:00
parent 619af5ef7e
commit a0a6e3e19c
6 changed files with 3111 additions and 2 deletions

350
api/workPlan/dayPlan.js Normal file
View File

@ -0,0 +1,350 @@
import request_yn from '@/utils/request_new_yn'
// 获取工程列表 (其一)
export function getProjectList_1Api(data) {
return request_yn({
url: '/ynPlanApp/select/getProsByState',
method: 'post',
data: data
})
}
// 获取工程列表 (其二)
export function getProjectList_2Api(data) {
return request_yn({
url: '/ynPlanApp/select/getProsForPro',
method: 'get',
params: data
})
}
// 获取风险等级
export function getRiskLevelListApi(data) {
return request_yn({
url: '/ynPlanApp/select/getFXDJ',
method: 'get',
params: data
})
}
// 获取管控层级
export function getControlLevelListApi(data) {
return request_yn({
url: '/ynPlanApp/select/getGKCJ',
method: 'get',
params: data
})
}
// 月计划填报提交 --基建
export function setMonthPlanApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/addInfPlan',
method: 'post',
data: data
})
}
// 月计划-查看报表 --基建
export function getMonthPlanDataApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getPlanDetail',
method: 'post',
data: data
})
}
// 月计划-导入计划 --基建
export function getWorkPlanContentApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/isPlan',
method: 'post',
data: data
})
}
// 月计划-查看数据 --基建
export function getViewDataListApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getViewData',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情 --基建
export function getPlanDetailApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getPlanDetail',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划撤回 --基建
export function revokePlanApi(data) {
return request_yn({
url: '/ynPlanApp/infMonth/backPlan',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划删除 --基建
export function deletePlanApi(data) {
return request_yn({
url: '/ynPlanApp/infMonth/deletePlan',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划修改 --基建
export function updateInfPlanContentApi(data) {
return request_yn({
url: '/ynPlanApp/infMonth/updateInfPlanContent',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划提交 --基建
export function submitPlanApi(data) {
return request_yn({
url: '/ynPlanApp/infMonth/submitPlan',
method: 'post',
data: data
})
}
// 月计划-工作待办-列表 --基建
export function getWorkWaitListApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getViewReport',
method: 'post',
data: data
})
}
// 月计划-工作待办-工程信息 --基建
export function getWorkWaitProjectApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getViewReportForPro',
method: 'post',
data: data
})
}
// 月计划-工作待办-审核不通过 --基建
export function setAuditingRejectApi(data) {
return request_yn({
url: '/ynPlanApp/infMonth/rejectPlan',
method: 'post',
data: data
})
}
// 月计划-查看报表 --基建
export function getReportFormListApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getViewReport',
method: 'post',
data: data
})
}
// 月计划-导入计划 --基建
export function getImportMonthPlanApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getPrevPlan',
method: 'post',
data: data
})
}
/**
* 生产月计划
*/
// 获取作业类型
export function getWorkTypeProApi(data) {
return request_yn({
url: '/ynPlanApp/select/getGZLX',
method: 'get',
params: data
})
}
// 获取管控方式
export function getControlModeProApi(data) {
return request_yn({
url: '/ynPlanApp/select/getGKFS',
method: 'get',
params: data
})
}
// 月计划填报提交 --生产
export function setMonthPlanProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/addInfPlan',
method: 'post',
data: data
})
}
// 月计划-查看报表 --生产
export function getMonthPlanDataProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getPlanDetail',
method: 'post',
data: data
})
}
// 月计划-查看数据 --生产
export function getViewDataListProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getViewData',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情 --生产
export function getPlanDetailProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getPlanDetail',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划撤回 --生产
export function revokePlanProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/backPlan',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划删除 --生产
export function deletePlanProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/deletePlan',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划修改 --生产
export function updateInfPlanContentProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/updateInfPlanContent',
method: 'post',
data: data
})
}
// 月计划-查看数据-详情-计划提交 --生产
export function submitPlanProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/submitPlan',
method: 'post',
data: data
})
}
// 月计划-查看数据-审核流程
export function getAUditingProcessApi(data) {
return request_yn({
url: '/ynPlanApp/infMonth/getCheckDetail',
method: 'post',
data: data
})
}
// 月计划-上报人-获取审核人信息
export function getAUditingUserInfoApi(data) {
return request_yn({
url: '/ynPlanApp/select/getSelectUser',
method: 'post',
data: data
})
}
// 月计划-查看当前工程 当前月计划是否上传 - 基建
export function getIsPlanApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/isPlan',
method: 'post',
data: data
})
}
// 月计划-查看当前工程 当前月计划是否上传 - 生产
export function getIsPlanProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/isPlan',
method: 'post',
data: data
})
}
// 月计划-工作待办-列表 - 生产
export function getWorkWaitListProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getViewReport',
method: 'post',
data: data
})
}
// 月计划-工作待办-工程信息- - 生产
// export function getWorkWaitProjectProApi(data) {
// return request_yn({
// url: '/ynPlanApp/proMonth/getViewReportForPro',
// method: 'post',
// data: data
// })
// }
// 月计划-工作待办-审核不通过 - 生产
export function setAuditingRejectProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/rejectPlan',
method: 'post',
data: data
})
}
// 月计划-工作待办-列表 --生产
// export function getWorkWaitListProApi(data) {
// return request_yn({
// url: '/ynPlanApp/proMonth/getViewReport',
// method: 'post',
// data: data
// })
// }
// 月计划-工作待办-工程信息 --生产
export function getWorkWaitProjectProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getViewReportForPro',
method: 'post',
data: data
})
}
// 月计划-工作待办-审核不通过 --生产
// export function setAuditingRejectProApi(data) {
// return request_yn({
// url: '/ynPlanApp/proMonth/rejectPlan',
// method: 'post',
// data: data
// })
// }
// 月计划-查看报表 --生产
export function getReportFormListProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getViewReport',
method: 'post',
data: data
})
}
// 月计划-导入计划 --基建
export function getImportMonthPlanProApi(data) {
return request_yn({
url: '/ynPlanApp/proMonth/getPrevPlan',
method: 'post',
data: data
})
}
/* 获取分包人员信息 */
export function getSubUserInfoListApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getSelectUser',
method: 'post',
data: data
})
}
/* 获取班组信息 */
export function getUserTeamInfoListApi(data) {
return request_yn({
url: '/ynPlanApp/infDay/getUserTeamName',
method: 'post',
data: data
})
}

View File

@ -767,8 +767,16 @@
"navigationStyle": "custom"
}
},
/* */
{
"path": "pages/workPlan/dayPlan/index",
"path": "pages/workPlan/dayPlan/inf-index",
"style": {
"navigationStyle": "custom"
}
},
/* - */
{
"path": "pages/workPlan/dayPlan/sub-user/index",
"style": {
"navigationStyle": "custom"
}

File diff suppressed because it is too large Load Diff

View File

View File

@ -0,0 +1,511 @@
<template>
<view>
<u-navbar
class="u-navbar"
title="新增分包人员"
placeholder
@leftClick="leftClick"
leftIconColor="#fff"
bgColor="#00337A"
:titleStyle="{ color: '#FFF', fontSize: '32rpx' }"
/>
<view class="sub-user-container">
<view class="sub-header">
<view style="width: 85%">
<uni-easyinput
suffixIcon="search"
@iconClick="iconClick"
placeholder="请输入人员姓名"
v-model="subQueryParams.keyWord"
/>
</view>
<view style="width: 15%" @tap="onOpenPopup()">搜索</view>
</view>
<view class="select-btn">
<view>已选择 {{ onAlreadySelect }}</view>
<view @tap="onUserSubmit">保存</view>
</view>
<view class="tb-th">
<view style="width: 15%">序号</view>
<view style="width: 15%">
<label v-if="subUserList.length > 0">
<checkbox
color="#fff"
borderColor="#ccc"
backgroundColor="#fff"
:checked="isAllChecked"
activeBorderColor="#003778"
activeBackgroundColor="#003778"
style="transform: scale(0.7)"
@tap="onCheckBoxChangeAll()"
/>
</label>
</view>
<view style="width: 30%">姓名</view>
<view style="width: 30%">人员状态</view>
</view>
<scroll-view scroll-y class="tb-content">
<view class="tb-content-box" v-for="(item, index) in subUserList" :key="item.idNumber">
<view style="width: 15%">{{ index + 1 }}</view>
<view style="width: 15%">
<label>
<checkbox
color="#fff"
borderColor="#ccc"
backgroundColor="#fff"
:checked="item.isChecked"
activeBorderColor="#003778"
activeBackgroundColor="#003778"
style="transform: scale(0.7)"
@tap="onCheckBoxChange(item)"
/>
</label>
</view>
<view style="width: 30%">{{ item.name }}</view>
<view style="width: 30%">
<uni-tag text="固定人员" type="success" size="small" v-if="item.userState == 1" />
<uni-tag text="临时人员" type="primary" size="small" v-if="item.userState == 2" />
<uni-tag text="暂退人员" type="warning" size="small" v-if="item.userState == 3" />
</view>
</view>
</scroll-view>
</view>
<view class="pagination">
<uni-pagination
:total="totalAmount"
title="标题文字"
prev-text="上一页"
next-text="下一页"
@change="onPagination"
/>
</view>
<!-- 弹框 -->
<uni-popup ref="popup" background-color="#fff">
<view class="popup-right-container">
<h1>条件筛选</h1>
<h2>班组选择</h2>
<view class="team-list">
<view
:class="{ active: reamList.includes(item.name) }"
v-for="(item, index) in teamList"
:key="index"
@tap="onTeamSelect(item.name)"
>
{{ item.name }}
</view>
</view>
<h2>人员选择</h2>
<view class="btn-list">
<view
v-for="item in userType_1"
:key="item.id"
@click="onSelectUserType(item.id)"
:class="{ active: activeList.includes(item.id) }"
>
{{ item.title }}
</view>
</view>
<h2>人员选中状态</h2>
<view class="btn-list">
<view @tap="onSelectUserType_1(1)" :class="{ active: activeTypeList.includes(1) }">已选择</view>
<view @tap="onSelectUserType_1(2)" :class="{ active: activeTypeList.includes(2) }">未选择</view>
</view>
<view class="btn-bottom">
<view @tap="onReset">重置</view>
<view @tap="onSubmit" class="active">确定</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import { getSubUserInfoListApi, getUserTeamInfoListApi } from '../../../../api/workPlan/dayPlan'
export default {
data() {
return {
subQueryParams: {
proName: '', //
keyWord: '',
planContentId: '',
day: '',
teamName: '', //
userState: '' //
},
subUserList: [],
subUserListAll: [],
teamList: [],
totalAmount: 0,
activeList: [],
reamList: [],
activeTypeList: [],
userType_1: [
{ title: '固定人员', id: '1' },
{ title: '临时人员', id: '2' },
{ title: '暂退人员', id: '3' }
],
tempUserInfoList: []
}
},
methods: {
leftClick() {
uni.navigateBack()
},
iconClick() {
this.getSubUserInfoList()
},
async getSubUserInfoList() {
// console.log(this.subQueryParams, 'this.subQueryParams')
// if (this.subUserListAll.length > 0) {
// this.tempUserInfoList = []
// this.tempUserInfoList = this.subUserListAll.filter(e => e.isChecked === true)
// }
// if (this.subUserListAll.length > 0) {
// this.tempUserInfoList = []
// this.tempUserInfoList = this.subUserListAll.filter(e => e.isChecked === true)
// }
const res = await getSubUserInfoListApi(this.subQueryParams)
// console.log('', res)
this.subUserListAll = res.obj
this.subUserListAll.forEach(e => {
this.$set(e, 'isChecked', false)
})
if (this.activeTypeList.length == 1) {
const isActiveType = this.activeTypeList[0]
if (isActiveType === 1) {
if (this.tempUserInfoList.length == 0) {
this.subUserList = []
} else {
this.subUserList = this.tempUserInfoList
}
}
if (isActiveType === 2) {
//
}
}
this.subUserList = this.subUserListAll.slice(0, 10)
this.totalAmount = res.obj.length
},
onPagination(e) {
this.subUserList = []
if (e.current === 1) {
this.subUserList = this.subUserListAll.slice(0, 10)
} else {
this.subUserList = this.subUserListAll.slice((e.current - 1) * 10, e.current * 10)
}
},
onCheckBoxChange(item) {
item.isChecked = !item.isChecked
try {
this.subUserListAll.forEach(e => {
if (e.idNumber == item.idNumber) {
e.isChecked = !eisChecked
throw new Error()
}
})
} catch (error) {}
},
async getUserTeamInfoList() {
const res = await getUserTeamInfoListApi({ proName: this.subQueryParams.proName })
console.log('班组信息', res)
this.teamList = res.obj
},
onOpenPopup() {
this.$refs.popup.open('right')
},
//
onSelectUserType(type) {
// this.activeList.push(type)
const isActive = this.activeList.includes(type)
if (!isActive) {
this.activeList.push(type)
} else {
this.activeList = this.activeList.filter(e => e != type)
}
console.log('this.activeList', this.activeList)
},
//
onSelectUserType_1(type) {
// this.activeList.push(type)
const isActive = this.activeTypeList.includes(type)
if (!isActive) {
this.activeTypeList.push(type)
} else {
this.activeTypeList = this.activeTypeList.filter(e => e != type)
}
},
//
onTeamSelect(type) {
// this.activeList.push(type)
const isActive = this.reamList.includes(type)
if (!isActive) {
this.reamList.push(type)
} else {
this.reamList = this.reamList.filter(e => e != type)
}
console.log('this.activeList', this.reamList)
},
onReset() {
this.activeList = []
this.reamList = []
this.activeTypeList = []
this.subQueryParams.teamName = ''
this.subQueryParams.userState = ''
this.getSubUserInfoList()
this.$refs.popup.close()
},
onSubmit() {
if (this.reamList.length > 0) {
this.subQueryParams.teamName = this.reamList.join(',')
}
if (this.activeList.length > 0) {
this.subQueryParams.userState = this.activeList.join(',')
}
this.getSubUserInfoList()
this.$refs.popup.close()
},
//
onUserSubmit() {
const isSelect = this.subUserListAll.some(e => e.isChecked === true)
if (!isSelect) {
uni.showToast({
title: '请勾选人员数据',
icon: 'none'
})
return
} else {
const userInfo = this.subUserListAll.filter(e => e.isChecked === true)
uni.navigateBack({
delta: 1,
success() {
uni.$emit('updateUser', userInfo)
}
})
}
},
//
onCheckBoxChangeAll() {
this.subUserList.forEach(e => {
e.isChecked = !e.isChecked
})
}
},
onLoad(options) {
this.subQueryParams.proName = options.proName
this.getSubUserInfoList()
this.getUserTeamInfoList()
},
computed: {
onAlreadySelect() {
let amount = 0
if (this.subUserListAll.length > 0) {
this.subUserListAll.forEach(e => {
if (e.isChecked) {
amount++
}
})
}
return amount
},
isAllChecked() {
let isCheckedAll = false
if (this.subUserListAll.length > 0) {
isCheckedAll = this.subUserListAll.every(e => e.isChecked === true)
}
return isCheckedAll
}
}
}
</script>
<style lang="scss" scoped>
.sub-user-container {
width: 100%;
// height: 100vh;
padding: 20rpx 0;
// background-color: #f5eeee;
.sub-header,
.select-btn {
width: 96%;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.select-btn {
margin: 40rpx auto;
}
.select-btn view:first-child {
color: #1e79d3;
font-size: 26rpx;
}
.select-btn view:last-child {
margin-right: 90rpx;
width: 130rpx;
height: 58rpx;
border-radius: 12rpx;
background-color: #1e79d3;
color: #fff;
line-height: 58rpx;
text-align: center;
}
.tb-th {
width: 96%;
box-sizing: border-box;
border: 1px solid #ccc;
margin: 0 auto;
display: flex;
view {
padding: 20rpx 0;
text-align: center;
border-left: 1px solid #ccc;
}
}
.tb-th view:first-child {
border: none;
}
.tb-content {
width: 96%;
// height: 300rpx;
// height: 50vh;
margin: 0 auto;
.tb-content-box {
width: 100%;
display: flex;
box-sizing: border-box;
border: 1px solid #ccc;
border-top: none;
view {
padding: 15rpx 0;
text-align: center;
border-left: 1px solid #ccc;
font-size: 22rpx;
}
}
.tb-content-box view:first-child {
border: none;
}
}
.pagination {
margin-top: 20rpx;
width: 96%;
margin: 0 auto;
}
}
.popup-right-container {
height: 100vh;
width: 70vw;
position: relative;
.btn-bottom {
position: absolute;
width: 100%;
bottom: 0;
left: 0;
display: flex;
view {
width: 50%;
height: 110rpx;
line-height: 110rpx;
text-align: center;
color: #1e79d3;
font-size: 32rpx;
border-top: 1px solid #ccc;
}
}
h1 {
padding: 26rpx;
text-align: center;
font-weight: normal;
font-size: 36rpx;
border-bottom: 1px solid #ccc;
}
h2 {
padding-left: 40rpx;
padding: 20rpx 0 20rpx 40rpx;
font-size: 30rpx;
border-bottom: 1px solid #ccc;
}
.team-list {
width: 96%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
view {
margin-left: 3%;
margin-top: 22rpx;
padding: 12rpx 30rpx;
// height: 58rpx;
background-color: #eee;
border: 1px solid #ccc;
border-radius: 10rpx;
text-align: center;
// line-height: 58rpx;
box-sizing: border-box;
color: #898787;
}
}
.btn-list {
width: 96%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
view {
margin-left: 3%;
margin-top: 22rpx;
width: 31%;
height: 58rpx;
background-color: #eee;
border: 1px solid #ccc;
border-radius: 10rpx;
text-align: center;
line-height: 58rpx;
box-sizing: border-box;
color: #898787;
}
}
.btn-list view:nth-child(3n + 1) {
margin: 0;
margin-top: 22rpx;
}
.active {
background-color: #1e79d3 !important;
border: none;
color: #fff !important;
}
}
</style>

View File

@ -24,7 +24,7 @@ export default {
iconList: [
{
icon_title: '日计划',
url: '/pages/workPlan/dayPlan/index',
url: '/pages/workPlan/dayPlan/inf-index',
img_src: require('../../../../static/images/workPlan/day_plan.png'),
isShow: ['22', '23', '24', '25']
},