|
@@ -1,70 +1,930 @@
|
|
|
<template>
|
|
|
- <section>
|
|
|
- <el-empty>待完善</el-empty>
|
|
|
- </section>
|
|
|
+ <section>
|
|
|
+ <div style=" display: flex;">
|
|
|
+ <div ref="sidebars" style="width: 200px;display: block;background: #fff;border-right: 1px solid #E6E6E6;">
|
|
|
+ <div ref="abbisd" style="width: 200px;overflow: hidden;">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-menu
|
|
|
+ :default-active="defaultActive"
|
|
|
+ class="el-menu-vertical-demo"
|
|
|
+ @select="staffs"
|
|
|
+ background-color="#ffffff"
|
|
|
+ text-color="#666666"
|
|
|
+ active-text-color="#20A0FF"
|
|
|
+ style="width:200px">
|
|
|
+ <el-submenu index="1">
|
|
|
+ <template slot="title">
|
|
|
+ <i class="iconfont firerock-iconbaobiao"></i>
|
|
|
+ <span>{{ $t('navigation.projectReportingService') }}</span>
|
|
|
+ </template>
|
|
|
+ <el-menu-item index="1-1" @click="ssl(0)"><p>{{'人员工时工价表'}}</p></el-menu-item>
|
|
|
+ <el-menu-item index="1-2" @click="ssl(1)"><p>{{'计划实时进度表'}}</p></el-menu-item>
|
|
|
+ </el-submenu>
|
|
|
+ </el-menu>
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
+ <div class="side" @click="side" ref="sid" style="left: 400px">
|
|
|
+ <div class="spans" ref="side" style="left: -19px;"><i ref="sideI" class="el-icon-arrow-left"></i></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 内容主体区域 -->
|
|
|
+ <div class="contents">
|
|
|
+ <div class="headine headConCon" ref="headine" :style="'width:'+(windowWidth - 400)+'px'">
|
|
|
+ <h3 ref="headHe" style="padding-left: 10px;float:left;width:15%">{{shuz[ins]}}</h3>
|
|
|
+ <div class="headScreen" :style="'width:72%'">
|
|
|
+ <!-- 部门筛选 -->
|
|
|
+ <el-cascader v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"
|
|
|
+ :props="{ checkStrictly: true,expandTrigger: 'hover',multiple: ins == 6 ? true : false }" collapse-tags :show-all-levels="false" clearable
|
|
|
+ @change="selcts()" size="small" style="margin-left:10px"
|
|
|
+ ></el-cascader>
|
|
|
+
|
|
|
+ <!-- 人员筛选 -->
|
|
|
+ <el-select v-model="userId" :placeholder="$t('pleaseselectpersonnel')" @change="selcts()" clearable filterable size="small" style="width:100px">
|
|
|
+ <el-option v-for="(item, index) in selUserList" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ <!-- 时间段筛选 -->
|
|
|
+ <template>
|
|
|
+ <span>
|
|
|
+ <span class="demonstration" style="color:#999;padding:0 10px">
|
|
|
+ {{ ins == 15 ? $t('xiang-mu-chuang-jian-shi-jian-duan') : $t('message.period') }}
|
|
|
+ </span>
|
|
|
+ <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" :placeholder="$t('selectstartdate')" @change="picks()" :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')" :end-placeholder="$t('time.endDate')" style="width:300px" :clearable="ins == 15" size="small"> </el-date-picker>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <p :style="`${ins == 9 ? 'width:20%' : ins == 14 ? 'width: 20%' : 'width: 10%'}`" class="tableRightBtn">
|
|
|
+ <el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
|
|
|
+ </p>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div ref="staff" style="margin: 5px 0px 0px 10px; width: 98%">
|
|
|
+ <div class="staff" ref="tabless" :style="'width:'+(windowWidth - 430)+'px'">
|
|
|
+ <!-- 人员工时工价表 -->
|
|
|
+ <el-table v-if="ins == 0" key="19" border :data="personWorkHoursWagesList" highlight-current-row v-loading="listLoading" :height="+tableHeight - 1" style="width: 100%;">
|
|
|
+ <el-table-column align="center" prop="departmentCascade" label="部门名称" min-width="150"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="name" label="人员" min-width="250"></el-table-column>
|
|
|
+ <el-table-column v-for="(item, index) in personWorkHoursWagesHead" :key="index" :label="item" align="center" min-width="250">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-for="(items, indexs) in scope.row.personWorkHoursWages" :key="indexs" @click="showReportDetail(scope.row)" class="colorText">
|
|
|
+ <div v-if="items.crateDate == item">
|
|
|
+ {{items.workTime}}分钟 {{items.cost}}元
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="totalResult" label="合计" min-width="250"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <!-- 计划实时进度表 -->
|
|
|
+ <el-table v-if="ins == 1" key="19" border :data="fTEDataList" highlight-current-row v-loading="listLoading" :height="+tableHeight - 1" style="width: 100%;">
|
|
|
+ <el-table-column align="center" prop="projectCode" label="排除计划" min-width="150"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="projectName" label="工序" min-width="250"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="workTime" label="人员" min-width="150"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="FTE" label="计划工时" min-width="250"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="FTE" label="当前工时" min-width="250"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="FTE" label="进度" min-width="250"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <!--工具条-->
|
|
|
+ <el-col :span="24" class="toolbar" v-if="ins != 6">
|
|
|
+ <el-pagination
|
|
|
+ v-if="ins == 12"
|
|
|
+ @size-change="groupSizeChange"
|
|
|
+ @current-change="groupPageChange"
|
|
|
+ :current-page="groupPage"
|
|
|
+ :page-sizes="[20 , 50 , 80 , 100]"
|
|
|
+ :page-size="groupSize"
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
+ :total="groupTotal"
|
|
|
+ style="float:left;"
|
|
|
+ ></el-pagination>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="page"
|
|
|
+ :page-sizes="[20 , 50 , 80 , 100]"
|
|
|
+ :page-size="size"
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ style="float:right;"
|
|
|
+ ></el-pagination>
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-dialog :title="'详情'" :visible.sync="reportDetailDialog" width="800px">
|
|
|
+ <div>
|
|
|
+ 日期:<el-select v-model="simpleDateChoose" placeholder="请选择" @change="getPersonWorkHoursWagesDetail()">
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in personWorkHoursWagesHead"
|
|
|
+ :key="index"
|
|
|
+ :label="item"
|
|
|
+ :value="item"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ 总计:<span>{{this.totalWorkingTime}}分钟 {{this.totalCost}}元</span>
|
|
|
+ </div>
|
|
|
+ <!-- 循环盒子 -->
|
|
|
+ <div v-for="(item,index) in personWorkHoursWagesDetail" :key="index" :label="item">
|
|
|
+ <div>{{item.productName}}</div>
|
|
|
+ <div>{{item.planStartDate}}-{{item.planEndDate}}</div>
|
|
|
+ <div>
|
|
|
+ <div style="padding:10px;border:1px solid #000">
|
|
|
+ <div style="display:flex;align-item:middle">
|
|
|
+ <div style="width:50%">
|
|
|
+ <span v-if="item.planType==0">{{item.procedureName}}</span>
|
|
|
+ <span v-else>{{item.taskName}}</span>
|
|
|
+ </div>
|
|
|
+ <div style="text-align:right;width:50%">{{item.working_time}}分钟</div>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;align-item:middle">
|
|
|
+ <div style="width:25% ;color:#20A0F7">{{!item.progress?0:item.progress}}%</div>
|
|
|
+ <div style="width:25% ;color:#20A0F7">{{item.cost}}</div>
|
|
|
+ <div style="width:25% ;color:#20A0F7">{{item.checkType}}</div>
|
|
|
+ <div style="width:25% ;color:#20A0F7">{{item.checkerName}}</div>
|
|
|
+ </div>
|
|
|
+ <div style="display:flex;align-item:middle">
|
|
|
+ <div style="width:25%">进度</div>
|
|
|
+ <div style="width:25%">工钱</div>
|
|
|
+ <div style="width:25%">质检方式</div>
|
|
|
+ <div style="width:25%">质检人</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ </section>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// 引入自定义组件
|
|
|
- import selectCat from "@/components/select.vue"
|
|
|
- //引入自定义级联组件
|
|
|
- import vueCascader from "@/components/cascader.vue"
|
|
|
-
|
|
|
- import util from "../../common/js/util";
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- selectCat,
|
|
|
- vueCascader
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
-
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
-
|
|
|
+
|
|
|
+// 自定义select组件
|
|
|
+import selectCat from "@/components/select.vue"
|
|
|
+// 引入自定义级联组件
|
|
|
+import vueCascader from "@/components/cascader.vue"
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "expense",
|
|
|
+ components: {
|
|
|
+ selectCat,
|
|
|
+ vueCascader
|
|
|
+ },
|
|
|
+ props: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ permissions: JSON.parse(sessionStorage.getItem("permissions")),
|
|
|
+ stages:[],
|
|
|
+ firstStages: [],
|
|
|
+ stageNames: [],
|
|
|
+ addFormVisible:false,
|
|
|
+ title:'',
|
|
|
+ childrenList:[],
|
|
|
+ listLoading:false,
|
|
|
+ tableHeight:0,
|
|
|
+ listArr1:[],
|
|
|
+ listArr2:[],
|
|
|
+ listPosition1:0,
|
|
|
+ listPosition2:0,
|
|
|
+ windowHeight: document.documentElement.clientHeight,
|
|
|
+ windowWidth: document.documentElement.clientWidth,
|
|
|
+
|
|
|
+ list3HeadList: [],
|
|
|
+ total:0,
|
|
|
+ users: [], // 人员信息
|
|
|
+ displayTable: false,
|
|
|
+ getLists: [],
|
|
|
+ ProjectList: [], // 项目列表
|
|
|
+ page: 1,
|
|
|
+ size:20,
|
|
|
+ z : null,
|
|
|
+ value: null,
|
|
|
+ dialog: false, // 单据查看展示
|
|
|
+ shuz: ['人员工时工价表', '计划实时进度表'],
|
|
|
+
|
|
|
+ shuzArr: ['人员工时工价表', '计划实时进度表'],
|
|
|
+
|
|
|
+ ins: 10000,
|
|
|
+ user: JSON.parse(sessionStorage.user),
|
|
|
+
|
|
|
+ createDate: '2020-01-01',
|
|
|
+ rangeDatas: this.getCurrentRangeTime(),
|
|
|
+ userId: '',
|
|
|
+ userList: [],
|
|
|
+
|
|
|
+ simpleDateChoose:'',
|
|
|
+ detailUserId:'',
|
|
|
+ personWorkHoursWagesDetail:[],
|
|
|
+ totalCost:0,
|
|
|
+ totalWorkingTime:0,
|
|
|
+
|
|
|
+
|
|
|
+ personWorkHoursWagesList:[],
|
|
|
+ planRealTimeProgressList:[],
|
|
|
+ personWorkHoursWagesHead:[],
|
|
|
+
|
|
|
+ reportDetailDialog:false,
|
|
|
+
|
|
|
+ auditRateList: [],
|
|
|
+ departmentList: [],
|
|
|
+ departmentIdArray: [],
|
|
|
+ selUserList: [],
|
|
|
+
|
|
|
+ allWrong: true,
|
|
|
+ defaultActive: '1-1',
|
|
|
+
|
|
|
+ groupPage: 1,
|
|
|
+ groupSize: 20,
|
|
|
+ groupTotal: 0,
|
|
|
+
|
|
|
+ stateKey: 1,
|
|
|
+
|
|
|
+ monthPersonnel: '',
|
|
|
+ exportLoading: false,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ watch: {},
|
|
|
+ created() {
|
|
|
+ let height = window.innerHeight;
|
|
|
+ this.ins=0
|
|
|
+ this.tableHeight = height - 170;
|
|
|
+ const that = this;
|
|
|
+ window.onresize = function temp() {
|
|
|
+ that.tableHeight = window.innerHeight - 175;
|
|
|
+ };
|
|
|
+ },
|
|
|
+
|
|
|
+ mounted() {
|
|
|
+ this.getUserList()
|
|
|
+ this.getDepartmentList()
|
|
|
+ this.authorityToJudge()
|
|
|
+ var myDate = new Date();
|
|
|
+ let year = myDate.getFullYear();
|
|
|
+ let month = +myDate.getMonth() + 1
|
|
|
+ let yue = month >= 10 ? yue = month : yue = '0' + month
|
|
|
+ this.monthPersonnel = year + '-' + yue
|
|
|
+ this.ssl(this.ins)
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ numberToCurrency(value) {
|
|
|
+ if (value == undefined || !value) return '0.00'
|
|
|
+ value = value.toFixed(2)
|
|
|
+ const intPart = Math.trunc(value)
|
|
|
+ const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
|
|
|
+ let floatPart = '.00'
|
|
|
+ const valueArray = value.toString().split('.')
|
|
|
+ if (valueArray.length === 2) { // 有小数部分
|
|
|
+ floatPart = valueArray[1].toString() // 取得小数部分
|
|
|
+ return intPartFormat + '.' + floatPart
|
|
|
+ }
|
|
|
+ return intPartFormat + floatPart
|
|
|
+ },
|
|
|
+ decimalPoint(value) {
|
|
|
+ var f = parseFloat(value);
|
|
|
+ if (isNaN(f)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ var f = Math.round(f*100)/100;
|
|
|
+ var s = f.toString();
|
|
|
+ var rs = s.indexOf('.');
|
|
|
+ if (rs < 0) {
|
|
|
+ rs = s.length;
|
|
|
+ s += '.';
|
|
|
+ } 15
|
|
|
+ while (s.length <= rs + 1) {
|
|
|
+ s += '0';
|
|
|
+ }
|
|
|
+ return s;
|
|
|
+ },
|
|
|
+ personWorkHoursWorkTime(value) {
|
|
|
+ let val = +((value ? value : 0) * 60).toFixed(2) + 0
|
|
|
+ return val
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ showReportDetail(item){
|
|
|
+ console.log(item)
|
|
|
+ this.reportDetailDialog=true
|
|
|
+ this.detailUserId=item.id
|
|
|
+ this.getPersonWorkHoursWagesDetail()
|
|
|
+ },
|
|
|
+ authorityToJudge() {
|
|
|
+ // if(this.permissions.reportProject || this.permissions.reportAllProject) {this.ssl(0);this.defaultActive = '1-1';return} else
|
|
|
+ // if(this.permissions.reportTask || this.permissions.reportAllTask) {this.ssl(1);this.defaultActive = '1-2';return} else
|
|
|
+ // {this.allWrong = false}
|
|
|
+ },
|
|
|
+ rowspan(spanArr,position,spanName){
|
|
|
+ this.list1.forEach((item,index) => {
|
|
|
+ if(index == 0){
|
|
|
+ spanArr.push(1)
|
|
|
+ position = 0
|
|
|
+ }else {
|
|
|
+ if(this.list1[index][spanName] == this.list1[index-1][spanName]){
|
|
|
+ spanArr[position] += 1
|
|
|
+ spanArr.push(0)
|
|
|
+ }else {
|
|
|
+ spanArr.push(1)
|
|
|
+ position = index
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }){
|
|
|
+ if(columnIndex == 0){
|
|
|
+ const _row = this.listArr1[rowIndex]
|
|
|
+ const _col = _row > 0 ? 1 : 0
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(columnIndex == 1){
|
|
|
+ const _row = this.listArr2[rowIndex]
|
|
|
+ const _col = _row > 0 ? 1 : 0
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ getUserList() {
|
|
|
+ this.http.post('/user/getSimpleActiveUserList', {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.userList = res.data;
|
|
|
+ this.selUserList = this.userList
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getDepartmentList() {
|
|
|
+ this.http.post( this.port.manage.depList, {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ let dptlist = JSON.parse(JSON.stringify(res.data));
|
|
|
+ this.departmentList = this.changeArr(dptlist);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //人员工时工价表数据
|
|
|
+ getPersonWorkHoursWagesList(){
|
|
|
+ this.http.post( "/report/getPersonWorkHoursWagesList", {
|
|
|
+ startDate:this.rangeDatas[0],
|
|
|
+ endDate:this.rangeDatas[1],
|
|
|
+ pageIndex: this.page,
|
|
|
+ pageSize: this.size,
|
|
|
+ deptId:this.departmentIdArray[0],
|
|
|
+ userId:this.userId
|
|
|
},
|
|
|
- created() {
|
|
|
- this.myChart = null
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.personWorkHoursWagesList=res.data.records
|
|
|
+ this.personWorkHoursWagesHead=res.data.header
|
|
|
+ this.simpleDateChoose=this.personWorkHoursWagesHead[0]
|
|
|
+ this.total=res.data.total
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //点击详情(人员工时工价表)
|
|
|
+ getPersonWorkHoursWagesDetail(){
|
|
|
+ this.http.post( "/report/getPersonWorkHoursWagesDetail", {
|
|
|
+ date: this.simpleDateChoose.substring(0,4)+"-"+this.simpleDateChoose.substring(4,6)+"-"+this.simpleDateChoose.substring(6,this.simpleDateChoose.length),
|
|
|
+ userId:this.detailUserId
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.containerHeight = window.innerHeight - 200
|
|
|
- // this.containerHeight = window.innerHeight - 130
|
|
|
- const that = this;
|
|
|
- window.onresize = function temp() {
|
|
|
- this.containerHeight = window.innerHeight - 130
|
|
|
- // this.containerHeight = window.innerHeight - 200
|
|
|
- };
|
|
|
-
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.personWorkHoursWagesDetail=res.data.record
|
|
|
+ this.totalCost=res.data.totalCost
|
|
|
+ this.totalWorkingTime=res.data.totalWorkingTime
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //计划实际工时表
|
|
|
+ getPlanRealTimeProgressList(){
|
|
|
+ this.http.post( "/report/getPlanRealTimeProgressList", {
|
|
|
+ startDate:this.rangeDatas[0],
|
|
|
+ endDate:this.rangeDatas[1],
|
|
|
+ pageIndex: this.page,
|
|
|
+ pageSize: this.size,
|
|
|
+ deptId:this.departmentIdArray[0],
|
|
|
+ userId:this.userId
|
|
|
},
|
|
|
- beforeDestroy () {
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.planRealTimeProgressList=res.data.records
|
|
|
+ this.total=res.data.total
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeArr(arr) {
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if(arr[i].id != -1 && arr[i].id != 0) {
|
|
|
+ if (arr[i].children != null && arr[i].children.length>0) {
|
|
|
+ arr[i].children = this.changeArr(arr[i].children);
|
|
|
+ }
|
|
|
+ arr[i].id && (arr[i].value = arr[i].id);
|
|
|
+ delete arr[i].id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(var i in arr) {
|
|
|
+ if(arr[i].id == -1 || arr[i].id == 0) {
|
|
|
+ arr.splice(i,1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ getSummaries(param) {
|
|
|
+ const { columns, data } = param;
|
|
|
+ const sums = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = this.$t('other.totals');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(index === 5) {
|
|
|
+ const values = data.map(item => Number(item[column.property]));
|
|
|
+ if (!values.every(value => isNaN(value))) {
|
|
|
+ sums[index] = values.reduce((prev, curr) => {
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
+ }, 0);
|
|
|
+ var zhi = +sums[index] + 0
|
|
|
+ var sl = zhi.toFixed(2)
|
|
|
+ sl += this.$t('yuan');
|
|
|
+ } else {
|
|
|
+ sums[index] = 'N/A';
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sums[index] = 'N/A';
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ this.$nextTick(()=>{ this.$refs.tab.doLayout()})
|
|
|
+ return sums;
|
|
|
+ },
|
|
|
+ expandRow(row, index) {
|
|
|
+ this.title = this.$t('ke-hu')+':'+row.customerName;
|
|
|
+ this.childrenList = row.children;
|
|
|
+ this.addFormVisible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ //分页
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.page = val;
|
|
|
+ this.getList(true);
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.size = val;
|
|
|
+ this.page = 1
|
|
|
+ this.getList(true);
|
|
|
+ },
|
|
|
+ groupSizeChange(val){
|
|
|
+ this.groupSize = val
|
|
|
+ this.groupPage = 1
|
|
|
+ this.groupWorktimeList.left = []
|
|
|
+ this.getGroupWorktimeAll()
|
|
|
+ },
|
|
|
+ groupPageChange(val){
|
|
|
+ this.groupPage = val;
|
|
|
+ this.groupWorktimeList.left = []
|
|
|
+ this.getGroupWorktimeAll()
|
|
|
+ },
|
|
|
+ getList(e) {
|
|
|
+ if(this.ins==0){
|
|
|
+ this.getPersonWorkHoursWagesList()
|
|
|
+ }else if(this.ins==1){
|
|
|
+ this.getPlanRealTimeProgressList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ exportExcel() {
|
|
|
+ var url = "/report";
|
|
|
+ var fName = "";
|
|
|
+ var sl = {}
|
|
|
+ if (this.ins == 0) {
|
|
|
+ fName = '人员工时工价表_' + '.xlsx';
|
|
|
+ url += "/exportPersonWorkHoursWorkTime";
|
|
|
+ sl.startDate=this.rangeDatas[0];
|
|
|
+ sl.endDate=this.rangeDatas[1];
|
|
|
+ sl.deptId=this.departmentIdArray[0];
|
|
|
+ sl.userId=this.userId;
|
|
|
+ } else if (this.ins == 1) {
|
|
|
+ fName = this.$t('projectTaskReport') + '.xlsx';
|
|
|
+ url += "/exportProjectTask";
|
|
|
+ if(this.taskTypeId != 'null' && this.taskTypeId != null && this.taskTypeId != '') {
|
|
|
+ sl.taskType = this.taskTypeId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.http.post(url, sl,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ var filePath = res.data;
|
|
|
+ const a = document.createElement('a'); // 创建a标签
|
|
|
+ a.setAttribute('download', fName);// download属性
|
|
|
+ a.setAttribute('href', filePath);// href链接
|
|
|
+ a.click(); //自执行点击事件
|
|
|
+ a.remove();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
- };
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ ssl(index) {
|
|
|
+ this.z = index
|
|
|
+ this.ins = index;
|
|
|
+ this.list = [];
|
|
|
+ this.page = 1;
|
|
|
+ this.size = 20;
|
|
|
+ this.$forceUpdate()
|
|
|
+ this.userId = null
|
|
|
+ this.getUserList()
|
|
|
+ this.selUserList = this.userList
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ // 点击侧边栏事件
|
|
|
+ side() {
|
|
|
+ if(this.$refs.side.style.left < '1px') {
|
|
|
+ this.$refs.sidebars.style.width = '1px'
|
|
|
+ this.$refs.sid.style.left = '201px'
|
|
|
+ this.$refs.side.style.left = '1px'
|
|
|
+ this.$refs.sideI.className = 'el-icon-arrow-right'
|
|
|
+ this.$refs.staff.style.margin = '5px 0px 0px 5px'
|
|
|
+ this.$refs.staff.style.width = '100%'
|
|
|
+ this.$refs.headHe.style.paddingLeft = '10px'
|
|
|
+ this.$refs.headine.style.width = (this.windowWidth - 200)+'px'
|
|
|
+ this.$refs.tabless.style.width = (this.windowWidth - 200)+'px'
|
|
|
+ } else {
|
|
|
+ this.$refs.sidebars.style.width = '200px'
|
|
|
+ this.$refs.sid.style.left = '400px'
|
|
|
+ this.$refs.side.style.left = '-19px'
|
|
|
+ this.$refs.sideI.className = 'el-icon-arrow-left'
|
|
|
+ this.$refs.staff.style.margin = '5px 0px 0px 10px'
|
|
|
+ this.$refs.staff.style.width = '98%'
|
|
|
+ this.$refs.headHe.style.paddingLeft = '10px'
|
|
|
+ this.$refs.headine.style.width = (this.windowWidth - 400)+'px'
|
|
|
+ this.$refs.tabless.style.width = (this.windowWidth - 400)+'px'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ picks() {
|
|
|
+ if(this.ins == 0){
|
|
|
+ //TODO: 获取数据
|
|
|
+ this.getPersonWorkHoursWagesList()
|
|
|
+ }
|
|
|
+ if(this.ins == 1){
|
|
|
+ //TODO: 获取数据
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 日期
|
|
|
+ getCurrentRangeTime() {
|
|
|
+ var _this = this;
|
|
|
+ let yy = new Date().getFullYear();
|
|
|
+ let mm = new Date().getMonth()+1;
|
|
|
+ let dd = new Date().getDate();
|
|
|
+ let time1 = yy + '-' + (mm < 10 ? '0' + mm : mm) + '-' + '01'
|
|
|
+ let time2 = yy + '-' + (mm < 10 ? '0' + mm : mm) + '-' + (dd < 10 ? '0' + dd : dd)
|
|
|
+ _this.gettime = [time1 , time2];
|
|
|
+ return _this.gettime
|
|
|
+ },
|
|
|
+ selcts(e) {
|
|
|
+ this.page = 1
|
|
|
+ if(this.ins == 12){
|
|
|
+ this.groupWorktimeList.right = []
|
|
|
+ this.getGroupWorktimeList()
|
|
|
+ }else if(this.ins == 15){
|
|
|
+ this.getDepartmentsInvolved()
|
|
|
+ }else{
|
|
|
+ if(e == 9){
|
|
|
+ console.log(this.departmentIdArray);
|
|
|
+ this.userId = null
|
|
|
+ if(this.departmentIdArray.length != 0){
|
|
|
+ let deptid = []
|
|
|
+ for(let i in this.departmentIdArray){
|
|
|
+ deptid.push(this.departmentIdArray[i][this.departmentIdArray[i].length - 1])
|
|
|
+ }
|
|
|
+ // let deptid = this.departmentIdArray[this.departmentIdArray.length - 1]
|
|
|
+ this.selUserList = this.userList.filter(item => {
|
|
|
+ let boo = false
|
|
|
+ for(let i in deptid){
|
|
|
+ if(item.departmentId == deptid[i]){
|
|
|
+ boo = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return boo
|
|
|
+ // item.departmentId == deptid
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.selUserList = this.userList
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(e == 10){
|
|
|
+ this.proJuctId = ''
|
|
|
+ this.departmentIdArray = []
|
|
|
+ this.selUserList = this.userList
|
|
|
+ this.userId = ''
|
|
|
+ }
|
|
|
+ console.log(this.userId,'==============')
|
|
|
+ this.getList(true)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 自定义点击事件
|
|
|
+ selectCal(obj) {
|
|
|
+ if(obj.distinction == 1) {
|
|
|
+ this.userId = obj.id
|
|
|
+ this.selcts()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ vueCasader(obj) {
|
|
|
+ if(obj.distinction == 1) {
|
|
|
+ let arr = []
|
|
|
+ arr.push(obj.id)
|
|
|
+ this.departmentIdArray = arr
|
|
|
+ this.selcts(9)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
+<style scoped>
|
|
|
+.tableRightBtn {
|
|
|
+ float: right;
|
|
|
+ margin-left: 15px !important;
|
|
|
+}
|
|
|
+.headConCon {
|
|
|
+ position: fixed;
|
|
|
+ /* width: 99%; */
|
|
|
+ top: 60px;
|
|
|
+}
|
|
|
+.headine {
|
|
|
+ /* width: 100%; */
|
|
|
+ /* height: 46.4px; */
|
|
|
+ /* line-height: 46.4px; */
|
|
|
+ background: #fff;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ z-index: 2;
|
|
|
+}
|
|
|
+.headine h3 {
|
|
|
+ margin: 0;
|
|
|
+ display: inline-block;
|
|
|
+ box-sizing: border-box;
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+.headine p {
|
|
|
+ display: inline-block;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+/* 头部筛选 */
|
|
|
+.headScreen{
|
|
|
+ float: left;
|
|
|
+ display: flex;
|
|
|
+ height: 46.4px;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ /* padding-left: 60px; */
|
|
|
+}
|
|
|
+/* /费用报销标题 */
|
|
|
+.sidebars {
|
|
|
+ height: 100%;
|
|
|
+ position: absolute;
|
|
|
+ border-right: 1px solid #E6E6E6;
|
|
|
+ z-index: 2;
|
|
|
+ top: 0;
|
|
|
+}
|
|
|
+.sidebars h3 {
|
|
|
+ margin: 0;
|
|
|
+ line-height: 45px;
|
|
|
+ background: #ffffff;
|
|
|
+ font-weight: normal;
|
|
|
+ color: #666;
|
|
|
+ padding-left: 20px;
|
|
|
+}
|
|
|
+.sidebars .el-col-12 {
|
|
|
+ width: 100%
|
|
|
+}
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
- #container {
|
|
|
- // display: inline-block;
|
|
|
- display: block;
|
|
|
- position: absolute;
|
|
|
- // width: 100% !important;
|
|
|
- margin-top: 60px;
|
|
|
- }
|
|
|
- .ryuans {
|
|
|
- top: -50px;
|
|
|
- }
|
|
|
- .prompt {
|
|
|
- position: absolute;
|
|
|
- right: 10px;
|
|
|
- top: 0;
|
|
|
- }
|
|
|
- .poss {
|
|
|
- position: fixed;
|
|
|
- bottom: 10px;
|
|
|
- right: 1%;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
-</style>
|
|
|
+.public {
|
|
|
+ height: 230px;
|
|
|
+ border-bottom: 1px solid #ddd;
|
|
|
+}
|
|
|
+.public .el-form-item {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+.pu_button {
|
|
|
+ text-align: right;
|
|
|
+ width: 100%;
|
|
|
+ padding: 24px 30px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+.pu_bu_x .pu_bu_t {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+.pu_bu_x {
|
|
|
+ margin-right: 20px;
|
|
|
+ color: #20A0F7;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.pu_bu_t {
|
|
|
+ color: #20A0F7;
|
|
|
+ cursor: pointer;
|
|
|
+ display: block;
|
|
|
+ float: right;
|
|
|
+ position:
|
|
|
+ relative;
|
|
|
+ top: -20px;
|
|
|
+ right: 63px;
|
|
|
+}
|
|
|
+.pu_table {
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+.pu_bu_t:hover {
|
|
|
+ color: #7bbcff;
|
|
|
+}
|
|
|
+.pu_bu_x:hover {
|
|
|
+ color: #7bbcff;
|
|
|
+}
|
|
|
+
|
|
|
+/* 我的单据报销凭证 */
|
|
|
+.staff{
|
|
|
+ border-left: 1px solid #fff;
|
|
|
+ border-top: 1px solid #fff;
|
|
|
+ border-right: 1px solid #fff;
|
|
|
+ background: #fff;
|
|
|
+ position: fixed;
|
|
|
+ top: 110px;
|
|
|
+}
|
|
|
+
|
|
|
+.colorText {
|
|
|
+ color: #02a7f0;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+/* */
|
|
|
+.sdat{
|
|
|
+ display: inline-block;
|
|
|
+ width: 260px;
|
|
|
+ margin-left: 13px;
|
|
|
+}
|
|
|
+.messages .el-form-item{
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+.messages .el-date-editor.el-input, .el-date-editor.el-input__inner{
|
|
|
+ width: 190px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 我的报销单据 */
|
|
|
+.search {
|
|
|
+ position: relative;
|
|
|
+ top: 20px;
|
|
|
+ left: 20px;
|
|
|
+}
|
|
|
+.tables {
|
|
|
+ margin-top: 50px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+.informant .el-form-item {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+/* 侧边栏收索 */
|
|
|
+.side {
|
|
|
+ position: absolute;
|
|
|
+ z-index: 2;
|
|
|
+ border-right: 2px solid #DDDDDD;
|
|
|
+ height: 100%;
|
|
|
+ top: 0;
|
|
|
+ width: 0;
|
|
|
+}
|
|
|
+.side .spans {
|
|
|
+ width: 20px;
|
|
|
+ height: 30px;
|
|
|
+ border: 1px solid #DDDDDD;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ margin-top: -50%;
|
|
|
+ text-align: center;
|
|
|
+ z-index: 1;
|
|
|
+ background: #fff;
|
|
|
+}
|
|
|
+.side .spans i{
|
|
|
+ margin-top: 7px;
|
|
|
+ color: #C0BFBF
|
|
|
+}
|
|
|
+.side:hover {
|
|
|
+ border-right: 2px solid #20A0FF;
|
|
|
+}
|
|
|
+.side:hover .spans {
|
|
|
+ border: 1px solid #20A0FF;
|
|
|
+ background: #20A0FF;
|
|
|
+}
|
|
|
+.side:hover .spans i{
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
|
|
|
-<style lang="scss">
|
|
|
-</style>
|
|
|
+/* 右边整体页面 */
|
|
|
+.contents {
|
|
|
+ height: 100%;
|
|
|
+ width: 100%;
|
|
|
+ /* padding: 30px; */
|
|
|
+ background: #F7F7F7;
|
|
|
+ /* position: absolute; */
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.submits {
|
|
|
+ margin-left: 50%;
|
|
|
+
|
|
|
+}
|
|
|
+.flsx {
|
|
|
+ display: flex;
|
|
|
+ margin: 20px 0;
|
|
|
+}
|
|
|
+.bianju {
|
|
|
+
|
|
|
+}
|
|
|
+.bianju span {
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 20px;
|
|
|
+}
|
|
|
+.warntext{
|
|
|
+ color:red;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|