update code

dev
haha 2024-05-07 22:39:09 +08:00
parent 7a22ca579b
commit 88a1861846
7 changed files with 55 additions and 26 deletions

View File

@ -52,6 +52,13 @@ const workerOnDuty=(data)=>{
params:data params:data
}) })
} }
const queryWorkerByState=(data)=>{
return request({
url:"bgscreen/attendance/queryWorkerByState",
method:"get",
params:data
})
}
const groupByWorkerOnDuty=(data)=>{ const groupByWorkerOnDuty=(data)=>{
return request({ return request({
@ -60,6 +67,15 @@ const groupByWorkerOnDuty=(data)=>{
params:data params:data
}) })
} }
const groupByWorkerState=(data)=>{
return request({
url:"bgscreen/attendance/groupByWorkerState",
method:"get",
params:data
})
}
const selectList=(data,pageNum,pageSize)=>{ const selectList=(data,pageNum,pageSize)=>{
return request({ return request({
url: `bgscreen/attendance/selectList?pageNum=${pageNum}&pageSize=${pageSize}`, url: `bgscreen/attendance/selectList?pageNum=${pageNum}&pageSize=${pageSize}`,
@ -76,5 +92,7 @@ export default{
groupAllByComany, groupAllByComany,
listAttendance, listAttendance,
workerOnDuty, workerOnDuty,
groupByWorkerOnDuty groupByWorkerOnDuty,
groupByWorkerState,
queryWorkerByState
} }

View File

@ -60,7 +60,7 @@
<div class="header-btn-list-item" style=""> <div class="header-btn-list-item" style="">
<div class="header-btn-list-padding" style="text-align: left;"> <div class="header-btn-list-padding" style="text-align: left;">
<button type="button" :class="nav == 71 ? 'active' : ''" class="sub-btn" <button type="button" :class="nav == 71 ? 'active' : ''" class="sub-btn"
@click="pageJump(71, '#/enginAuditing')">工程审</button> @click="pageJump(71, '#/enginAuditing')">工程审</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
<template> <template>
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" class="today-attendance-detail"> <MyDialog v-if="show" v-model="show" width="1600px" height="850px" class="today-attendance-detail">
<template v-if="isGroup"> <template v-if="isGroup">
<template slot="title">在岗人数({{ total }})</template> <template slot="title">{{jobType==0?'在岗':'离岗'}}人数({{ total }})</template>
<el-table :data="tableData" class="mytable" max-height="750" style="width: 100%;background: transparent;" <el-table :data="tableData" class="mytable" max-height="750" style="width: 100%;background: transparent;"
ref="fbsubordinateUnit" :show-summary="tableData.length > 1"> ref="fbsubordinateUnit" :show-summary="tableData.length > 1">
<el-table-column label="项目名称" align="left" prop="prjName" /> <el-table-column label="项目名称" align="left" prop="prjName" />
@ -76,6 +76,7 @@ export default {
size: 10, size: 10,
index: 1, index: 1,
total: 0, total: 0,
jobType:0,
nav: 101, nav: 101,
indexData: { indexData: {
total: 0, total: 0,
@ -106,6 +107,7 @@ export default {
return tmps.length > 0 ? tmps[0].cnt : 0; return tmps.length > 0 ? tmps[0].cnt : 0;
} }
this.indexData.total = data.total; this.indexData.total = data.total;
this.jobType=data.type;
this.indexData.data101 = getData("101"); this.indexData.data101 = getData("101");
this.indexData.data102 = getData("102"); this.indexData.data102 = getData("102");
this.indexData.data103 = getData("103"); this.indexData.data103 = getData("103");
@ -123,7 +125,7 @@ export default {
this.show = true this.show = true
}, },
loadGroupData() { loadGroupData() {
this.$api.attendance.groupByWorkerOnDuty({ deptId: this.deptId }).then(d => { this.$api.attendance.groupByWorkerState({ deptId: this.deptId,state:this.jobType==0?0:1 }).then(d => {
const getTypeId = (id) => { const getTypeId = (id) => {
let typeId = { "101": [1, 6], "102": [8], "103": [0, 2, 3, 4, 5] } let typeId = { "101": [1, 6], "102": [8], "103": [0, 2, 3, 4, 5] }
for (let k in typeId) { for (let k in typeId) {
@ -177,11 +179,12 @@ export default {
projectId: this.projectId, projectId: this.projectId,
pageSize: this.size, pageSize: this.size,
pageNum: this.index, pageNum: this.index,
id: this.nav id: this.nav,
state:this.jobType==0?0:1
} }
this.tableData = []; this.tableData = [];
this.loading = true; this.loading = true;
this.$api.attendance.workerOnDuty(postData).then(d => { this.$api.attendance.queryWorkerByState(postData).then(d => {
this.total = d.total || 0; this.total = d.total || 0;
this.tableData = (d.rows || []).map(it => { this.tableData = (d.rows || []).map(it => {
it.scanPhoto = it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0 ? "/jhapi" + it.scanPhoto : it.scanPhoto; it.scanPhoto = it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0 ? "/jhapi" + it.scanPhoto : it.scanPhoto;

View File

@ -37,7 +37,7 @@
<div class="active">合同总金额(万元)</div> <div class="active">合同总金额(万元)</div>
</div> </div>
<people-number :number="numberWithCommas((sumCost.data1 * 1.0 || 0).toFixed(2)) || '0.00'" <people-number :number="((sumCost.data1 * 1.0 || 0).toFixed(2)) || '0.00'"
unit=""></people-number> unit=""></people-number>
</el-col> </el-col>
@ -46,7 +46,7 @@
<div class="active">建安费总金额(万元)</div> <div class="active">建安费总金额(万元)</div>
</div> </div>
<people-number :number="numberWithCommas((sumCost.data2 * 1.0 || 0).toFixed(2)) || '0.00'" <people-number :number="((sumCost.data2 * 1.0 || 0).toFixed(2)) || '0.00'"
unit=""></people-number> unit=""></people-number>
</el-col> </el-col>
@ -58,7 +58,7 @@
<div class="active">总计付款(万元)</div> <div class="active">总计付款(万元)</div>
</div> </div>
<people-number :number="numberWithCommas((sumCost.data3 * 1.0 || 0).toFixed(2)) || '0.00'" <people-number :number="((sumCost.data3 * 1.0 || 0).toFixed(2)) || '0.00'"
unit=""></people-number> unit=""></people-number>
</el-col> </el-col>
@ -83,14 +83,14 @@
<div class="active">进度款已支付(万元)</div> <div class="active">进度款已支付(万元)</div>
</div> </div>
<people-number :number="numberWithCommas((sumCost.data4 * 1.0 || 0).toFixed(2)) || '0.00'" <people-number :number="((sumCost.data4 * 1.0 || 0).toFixed(2)) || '0.00'"
unit=""></people-number> unit=""></people-number>
<div class="warning-info-title"> <div class="warning-info-title">
<div class="active">安措费已支付(万元)</div> <div class="active">安措费已支付(万元)</div>
</div> </div>
<people-number :number="numberWithCommas((sumCost.data5 * 1.0 || 0).toFixed(2)) || '0.00'" <people-number :number="((sumCost.data5 * 1.0 || 0).toFixed(2)) || '0.00'"
unit=""></people-number> unit=""></people-number>
</el-col> </el-col>
@ -99,7 +99,7 @@
<div class="active">挂账总金额(万元)</div> <div class="active">挂账总金额(万元)</div>
</div> </div>
<people-number :number="numberWithCommas((sumCost.data6 * 1.0 || 0).toFixed(2)) || '0.00'" <people-number :number="((sumCost.data6 * 1.0 || 0).toFixed(2)) || '0.00'"
unit=""></people-number> unit=""></people-number>
</el-col> </el-col>
@ -180,11 +180,11 @@
</module-one-3-1> </module-one-3-1>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<module-one-1-1 label="劳务单位资质审批" style="position: relative;"> <module-one-1-1 label="分包单位资质审批" style="position: relative;">
<enginChart :class="'show-chart'" ref="chart2" :height="300"> <enginChart :class="'show-chart'" ref="chart2" :height="300">
</enginChart> </enginChart>
</module-one-1-1> </module-one-1-1>
<module-one-2-1 label="劳务单位资质审批明细" style="position: relative;"> <module-one-2-1 label="分包单位资质审批明细" style="position: relative;">
<template v-if="dataList4.length > 0"> <template v-if="dataList4.length > 0">
<div class="data-list3 scroll"> <div class="data-list3 scroll">
@ -241,8 +241,8 @@ export default {
}, },
data() { data() {
return { return {
label1: "审批进度", label1: "工程审批进度",
label2: "项目审批排名", label2: "工程审批排名",
prjs: [], prjs: [],
project: {}, project: {},
dept: {}, dept: {},
@ -387,7 +387,7 @@ export default {
chartData.push([this.addBr(o.title), o.total, o.uncomp, o.comp]) chartData.push([this.addBr(o.title), o.total, o.uncomp, o.comp])
}) })
this.chart1Data = chartData; this.chart1Data = chartData;
this.label1 = `审批进度 (${sum})`; this.label1 = `工程审批进度 (${sum})`;
this.elChart2++; this.elChart2++;
}, },
showFlowList2(res) { showFlowList2(res) {

View File

@ -171,7 +171,7 @@
<div class="labour-education"> <div class="labour-education">
<div style="transform: scale(0.8);margin-left:-20px"> <div style="transform: scale(0.8);margin-left:-20px">
<people-number <people-number
:number="numberWithCommas((sumCost.totalMonth * 1.0 || 0).toFixed(2)) || '0.00'" :number="((sumCost.totalMonth * 1.0 || 0).toFixed(2)) || '0.00'"
unit="万元"></people-number> unit="万元"></people-number>
</div> </div>
<div class="survey_content" style="position: absolute;right: 15px;top: -36px;"> <div class="survey_content" style="position: absolute;right: 15px;top: -36px;">
@ -192,7 +192,7 @@
<div class="labour-education"> <div class="labour-education">
<div style="transform: scale(0.8);margin-left:-20px"> <div style="transform: scale(0.8);margin-left:-20px">
<people-number <people-number
:number="numberWithCommas((sumCost.curYear * 1.0 || 0).toFixed(2)) || '0.00'" :number="((sumCost.curYear * 1.0 || 0).toFixed(2)) || '0.00'"
unit="万元"></people-number> unit="万元"></people-number>
</div> </div>
</div> </div>
@ -201,7 +201,7 @@
<div class="labour-education"> <div class="labour-education">
<div style="transform: scale(0.8);margin-left:-20px"> <div style="transform: scale(0.8);margin-left:-20px">
<people-number <people-number
:number="numberWithCommas((sumCost.curMonth * 1.0 || 0).toFixed(2)) || '0.00'" :number="((sumCost.curMonth * 1.0 || 0).toFixed(2)) || '0.00'"
unit="万元"></people-number> unit="万元"></people-number>
</div> </div>
</div> </div>
@ -532,11 +532,12 @@ export default {
projectId:this.prj.id||0, projectId:this.prj.id||0,
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD") attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD")
} }
if(this.infoNav == 1){ if(this.infoNav == 2){
this.$refs.attDetailDlg.showDialog(data); this.$refs.attDetailDlg.showDialog(data);
}else{ }else{
this.$refs.jobWorkerdlg.showDialog({ this.$refs.jobWorkerdlg.showDialog({
...data, ...data,
type:this.infoNav,
total:this.laborPersonnelTotal, total:this.laborPersonnelTotal,
datas:this.laborPersonnelData.map(it=>{ datas:this.laborPersonnelData.map(it=>{
return { return {
@ -600,6 +601,12 @@ export default {
year: dt.$y, year: dt.$y,
month: dt.$M + 1 month: dt.$M + 1
}; };
if(postData.month==1){
postData.year--;
postData.month=12
}else{
postData.month--;
}
if (this.prj && this.prj.id > 0) { if (this.prj && this.prj.id > 0) {
postData.projectId = this.prj.id; postData.projectId = this.prj.id;

View File

@ -982,11 +982,12 @@ export default {
projectId: id || 0, projectId: id || 0,
attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD"), attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD"),
}; };
if (this.infoNav == 1) { if (this.infoNav == 2) {
this.$refs.attDetailDlg.showDialog(data); this.$refs.attDetailDlg.showDialog(data);
} else { } else {
this.$refs.jobWorkerdlg.showDialog({ this.$refs.jobWorkerdlg.showDialog({
...data, ...data,
type:this.infoNav,
total: this.laborPersonnelTotal, total: this.laborPersonnelTotal,
datas: this.laborPersonnelData.map((it) => { datas: this.laborPersonnelData.map((it) => {
return { return {

View File

@ -120,7 +120,7 @@
<i class="el-icon-caret-right" style="color: #63f8bc;font-size:24px;"></i> <i class="el-icon-caret-right" style="color: #63f8bc;font-size:24px;"></i>
<span style="display:inline-block;margin-right:4px;">合计</span> <span style="display:inline-block;margin-right:4px;">合计</span>
<people-number <people-number
:number="numberWithCommas((commTotal * 1.0 || 0).toFixed(2)) || '0.00'" :number="((commTotal * 1.0 || 0).toFixed(2)) || '0.00'"
unit="万元"></people-number> unit="万元"></people-number>
</div> </div>
@ -136,7 +136,7 @@
</div> </div>
<div class="equipment-list-data"> <div class="equipment-list-data">
<div style="text-align: center;"> <div style="text-align: center;">
<span style="font-size:20px;">{{numberWithCommas((it.id * 1.0 || 0).toFixed(2)) || '0.00' }}</span> <span style="font-size:20px;">{{((it.id * 1.0 || 0).toFixed(2)) || '0.00' }}</span>
</div> </div>
<p style="font-size: 12px;text-align: center;">{{ it.costName}}(万元)</p> <p style="font-size: 12px;text-align: center;">{{ it.costName}}(万元)</p>
</div> </div>