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

View File

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

View File

@ -1,7 +1,7 @@
<template>
<MyDialog v-if="show" v-model="show" width="1600px" height="850px" class="today-attendance-detail">
<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;"
ref="fbsubordinateUnit" :show-summary="tableData.length > 1">
<el-table-column label="项目名称" align="left" prop="prjName" />
@ -76,6 +76,7 @@ export default {
size: 10,
index: 1,
total: 0,
jobType:0,
nav: 101,
indexData: {
total: 0,
@ -100,12 +101,13 @@ export default {
this.index = 1;
this.loadData();
},
showDialog(data) {
showDialog(data) {
const getData = id => {
var tmps = data.datas.filter(d => d.text == id);
return tmps.length > 0 ? tmps[0].cnt : 0;
}
this.indexData.total = data.total;
this.jobType=data.type;
this.indexData.data101 = getData("101");
this.indexData.data102 = getData("102");
this.indexData.data103 = getData("103");
@ -123,7 +125,7 @@ export default {
this.show = true
},
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) => {
let typeId = { "101": [1, 6], "102": [8], "103": [0, 2, 3, 4, 5] }
for (let k in typeId) {
@ -177,11 +179,12 @@ export default {
projectId: this.projectId,
pageSize: this.size,
pageNum: this.index,
id: this.nav
id: this.nav,
state:this.jobType==0?0:1
}
this.tableData = [];
this.loading = true;
this.$api.attendance.workerOnDuty(postData).then(d => {
this.$api.attendance.queryWorkerByState(postData).then(d => {
this.total = d.total || 0;
this.tableData = (d.rows || []).map(it => {
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>
<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>
</el-col>
@ -46,7 +46,7 @@
<div class="active">建安费总金额(万元)</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>
</el-col>
@ -58,7 +58,7 @@
<div class="active">总计付款(万元)</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>
</el-col>
@ -83,14 +83,14 @@
<div class="active">进度款已支付(万元)</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>
<div class="warning-info-title">
<div class="active">安措费已支付(万元)</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>
</el-col>
@ -99,7 +99,7 @@
<div class="active">挂账总金额(万元)</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>
</el-col>
@ -180,11 +180,11 @@
</module-one-3-1>
</el-col>
<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>
</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">
<div class="data-list3 scroll">
@ -241,8 +241,8 @@ export default {
},
data() {
return {
label1: "审批进度",
label2: "项目审批排名",
label1: "工程审批进度",
label2: "工程审批排名",
prjs: [],
project: {},
dept: {},
@ -387,7 +387,7 @@ export default {
chartData.push([this.addBr(o.title), o.total, o.uncomp, o.comp])
})
this.chart1Data = chartData;
this.label1 = `审批进度 (${sum})`;
this.label1 = `工程审批进度 (${sum})`;
this.elChart2++;
},
showFlowList2(res) {

View File

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

View File

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

View File

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