|
@@ -1,84 +1,125 @@
|
|
|
<template>
|
|
|
<section>
|
|
|
+ <div class="budgetReviewHeader">
|
|
|
+ <div class="budgetReviewHeader_Form">
|
|
|
+ <!-- 日期 -->
|
|
|
+ <div class="budgetReviewHeader_FormItem">
|
|
|
+ <el-date-picker size="small" v-model="screeningConditionForm.dateRange" :editable="false"
|
|
|
+ format="yyyy-MM-dd" value-format="yyyy-MM-dd" :clearable="false" :range-separator="'至'"
|
|
|
+ type="daterange" :start-placeholder="'开始日期'" :end-placeholder="'结束日期'" style="width: 260px"
|
|
|
+ @change="getList"></el-date-picker>
|
|
|
+ </div>
|
|
|
+ <!-- 项目 -->
|
|
|
+ <div class="budgetReviewHeader_FormItem">
|
|
|
+ <div class="budgetReviewHeader_FormItemText">项目:</div>
|
|
|
+ <el-select v-model="screeningConditionForm.projectId" filterable placeholder="请选择项目" clearable
|
|
|
+ size="small" @change="getList">
|
|
|
+ <el-option v-for="item in projectList" :key="item.id"
|
|
|
+ :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
|
|
|
+ <span class="selectProRight">{{ item.projectCode }}</span>
|
|
|
+ <span class="selectProleft">{{ item.projectName }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <!-- 审核人 -->
|
|
|
+ <div class="budgetReviewHeader_FormItem">
|
|
|
+ <div class="budgetReviewHeader_FormItemText">审核人:</div>
|
|
|
+ <el-select v-model="screeningConditionForm.submitUserId" filterable placeholder="请选择审核人" clearable
|
|
|
+ size="small" v-if="user.userNameNeedTranslate != 1" style="width: 130px;" @change="getList">
|
|
|
+ <el-option v-for="item in usersList" :key="item.id" :label="item.name + '\u3000' + item.jobNumber"
|
|
|
+ :value="item.id">
|
|
|
+ <span class="selectProRight">{{ item.jobNumber }}</span>
|
|
|
+ <span class="selectProleft">{{ item.name }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <selectCat :size="'small'" :subject="usersList" :subjectId="screeningConditionForm.submitUserId"
|
|
|
+ :clearable="true" :filterable="true" :searchBoxTop="1" stinction="'1'" @selectCal="selectCal"
|
|
|
+ v-if="user.userNameNeedTranslate == 1" :widthStr="'130'"></selectCat>
|
|
|
+ </div>
|
|
|
+ <!-- 审核状态 -->
|
|
|
+ <div class="budgetReviewHeader_FormItem">
|
|
|
+ <div class="budgetReviewHeader_FormItemText">审核状态:</div>
|
|
|
+ <el-select v-model="screeningConditionForm.status" filterable placeholder="请选择状态" clearable size="small"
|
|
|
+ style="width: 120px;" @change="getList">
|
|
|
+ <el-option v-for="item in auditStatus" :key="item.id" :label="item.label" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="budgetReviewHeader_btn">
|
|
|
+ <el-button type="primary" size="small" @click="exportReport" :loading="exporListLoading">导出</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!--列表-->
|
|
|
- <el-table :data="list" ref="multipleTable" v-if="showTable" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;"
|
|
|
- :default-expand-all="defaultExpandAllFlg" >
|
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column type="expand" :label="''">
|
|
|
- <!-- <template slot-scope="props">
|
|
|
- <el-timeline>
|
|
|
-
|
|
|
- </el-timeline>
|
|
|
- </template> -->
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column prop="projectName" :label="'项目名称'" sortable>
|
|
|
+ <el-table :data="list" ref="multipleTable" highlight-current-row v-loading="listLoading" :height="tableHeight"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-table-column prop="projectName" :label="'项目名称'" sortable min-width="200px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span>
|
|
|
- {{scope.row.projectName}}
|
|
|
+ {{ scope.row.projectName }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="groupName" :label="'分组名称'" sortable>
|
|
|
+ <el-table-column prop="groupName" :label="'分组名称'" sortable min-width="180px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span>
|
|
|
- {{scope.row.groupName}}
|
|
|
+ {{ scope.row.groupName }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column prop="creator" :label="'提交人'" sortable>
|
|
|
+
|
|
|
+ <el-table-column prop="creator" :label="'提交人'" sortable min-width="120px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span v-if="user.userNameNeedTranslate == '1'">
|
|
|
<ww-open-data type='userName' :openid='scope.row.creator'></ww-open-data>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
- {{scope.row.creator}}
|
|
|
+ {{ scope.row.creator }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="createTime" :label="'提交时间'" sortable>
|
|
|
+ <el-table-column prop="createTime" :label="'提交时间'" sortable min-width="120px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span>
|
|
|
- {{scope.row.createTime}}
|
|
|
+ {{ scope.row.createTime }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="oldManDay" :label="'变更前预估工时'" sortable>
|
|
|
+ <el-table-column prop="oldManDay" :label="'变更前预估工时'" sortable min-width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span>
|
|
|
- {{scope.row.oldManDay}}
|
|
|
+ {{ scope.row.oldManDay }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="changeManDay" :label="'预估工时变更'" sortable>
|
|
|
+ <el-table-column prop="changeManDay" :label="'预估工时变更'" sortable min-width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span>
|
|
|
- {{scope.row.changeManDay}}
|
|
|
+ {{ scope.row.changeManDay }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column prop="nowManDay" :label="'变更后预估工时'" sortable>
|
|
|
+ <el-table-column prop="nowManDay" :label="'变更后预估工时'" sortable min-width="150px">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<span>
|
|
|
- {{scope.row.nowManDay}}
|
|
|
+ {{ scope.row.nowManDay }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -89,428 +130,92 @@
|
|
|
<div>
|
|
|
<div v-if="scope.row.remark && scope.row.remark.length > 11">
|
|
|
<el-tooltip class="remarkClassItem" effect="dark" :content="scope.row.remark" placement="top">
|
|
|
- <div class="remarkClass">{{scope.row.remark}}</div>
|
|
|
+ <div class="remarkClass">{{ scope.row.remark }}</div>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- {{scope.row.remark}}
|
|
|
+ {{ scope.row.remark }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+
|
|
|
<el-table-column prop="status" :label="$t('state.states')" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.status == 0" style="color:#DAA520;">{{ '待审核'}}</span>
|
|
|
+ <span v-if="scope.row.status == 0" style="color:#DAA520;">{{ '待审核' }}</span>
|
|
|
<span v-else-if="scope.row.status == 1" style="color:#32CD32;">{{ $t('state.alreadyPassed') }}</span>
|
|
|
<span v-else-if="scope.row.status == 2" style="color:#FF0000;">{{ $t('state.rejected') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('operation')" width="220">
|
|
|
+ <el-table-column :label="$t('operation')" width="220" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="scope.row.status==0" type="primary" :loading="logining" size="small" @click="review(scope.row.id,1)">{{ $t('btn.through') }}</el-button>
|
|
|
- <el-button v-if="scope.row.status==0" type="danger" :loading="logining" size="small" @click="review(scope.row.id,2)">{{ $t('btn.rejected') }}</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 0" type="primary" :loading="logining" size="small"
|
|
|
+ @click="review(scope.row.id, 1)">{{ $t('btn.through') }}</el-button>
|
|
|
+ <el-button v-if="scope.row.status == 0" type="danger" :loading="logining" size="small"
|
|
|
+ @click="review(scope.row.id, 2)">{{ $t('btn.rejected') }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!--工具条-->
|
|
|
- <!-- <el-col v-if="search.value != -1" :span="24" class="toolbar">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :page-sizes="[20 , 50 , 80 , 100]"
|
|
|
- :page-size="20"
|
|
|
- layout="total, sizes, prev, pager, next"
|
|
|
- :total="total"
|
|
|
- style="float:right;"
|
|
|
- ></el-pagination>
|
|
|
- </el-col> -->
|
|
|
</section>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import util from "../../common/js/util";
|
|
|
-
|
|
|
- // 引入自定义组件
|
|
|
- import selectCat from "@/components/select.vue"
|
|
|
-
|
|
|
- // 引入自定义级联组件
|
|
|
- import vueCascader from "@/components/cascader.vue"
|
|
|
- import cascaderOption from "@/components/cascaderOption.vue"
|
|
|
+// 引入自定义组件
|
|
|
+import selectCat from "@/components/select.vue"
|
|
|
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- selectCat,
|
|
|
- vueCascader,
|
|
|
- cascaderOption
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- yuzhongCompId: 3385,
|
|
|
- roleList:[{value: 1,label: 'CRC&LM'},{value: 2,label: 'PM'}],
|
|
|
- batchDenyLoading: false,
|
|
|
- batchDenyDialog: false,
|
|
|
- batchDenyData: {ids:'',reason:''},
|
|
|
- batchApproveLoading: false,
|
|
|
- denyForm:null,
|
|
|
- denyReasonDialog:false,
|
|
|
- isAllSelect:false,
|
|
|
- user: JSON.parse(sessionStorage.getItem("user")),
|
|
|
- permissions: JSON.parse(sessionStorage.getItem("permissions")),
|
|
|
- search: {
|
|
|
- projectId:null,
|
|
|
- departmentIdArray: null,
|
|
|
- departmentId:null,
|
|
|
- // date: null,
|
|
|
- startDate: null,
|
|
|
- endDate: null,
|
|
|
- state:0,
|
|
|
- userId: null,
|
|
|
- userIdArray: []
|
|
|
- },
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ selectCat,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ list: [],
|
|
|
+ tableHeight: 0,
|
|
|
+ listLoading: false,
|
|
|
+ defaultExpandAllFlg: false,
|
|
|
+ exporListLoading: false,
|
|
|
+ user: JSON.parse(sessionStorage.getItem("user")),
|
|
|
|
|
|
- users: [],
|
|
|
- option:[],
|
|
|
- tableHeight: 0,
|
|
|
- listLoading: false,
|
|
|
- total: 0,
|
|
|
- page: 1,
|
|
|
- size: 20,
|
|
|
- list: [],
|
|
|
- logining: false,
|
|
|
- multipleSelection: [],
|
|
|
- usersList: [],
|
|
|
- searchUsersList: [],
|
|
|
- dataTime: [],
|
|
|
- recordDialogVisible: false,
|
|
|
- recordLists: [],
|
|
|
- totals: 0,
|
|
|
- pageIndexList: 1,
|
|
|
- pageSizeList: 20,
|
|
|
- undoForm: {
|
|
|
- // reason: '',
|
|
|
- // userId: '',
|
|
|
- // createDate: ''
|
|
|
- },
|
|
|
- undoFormDialog: false,
|
|
|
- detailsDialog: false,
|
|
|
- idx: 0, // 详情索引
|
|
|
- detailsList: [],
|
|
|
- undoFormLoading: false,
|
|
|
+ usersList: [],
|
|
|
+ searchUsersList: [],
|
|
|
+ projectList: [],
|
|
|
+ auditStatus: [
|
|
|
+ { id: 0, label: '待审核' },
|
|
|
+ { id: 1, label: '审核通过' },
|
|
|
+ { id: 2, label: '驳回' }
|
|
|
+ ],
|
|
|
|
|
|
- approveinData: null,
|
|
|
- approveinDialog: false,
|
|
|
- isbatch: false,
|
|
|
- defaultExpandAllFlg: false,
|
|
|
- showTable: true
|
|
|
- };
|
|
|
- },
|
|
|
- filters: {
|
|
|
- // 过滤
|
|
|
- amounts(value) {
|
|
|
- var zhi = +value + 0
|
|
|
- return zhi.toFixed(1)
|
|
|
+ screeningConditionForm: {
|
|
|
+ projectId: '',
|
|
|
+ dateRange: '',
|
|
|
+ submitUserId: '',
|
|
|
+ status: ''
|
|
|
}
|
|
|
- },
|
|
|
- methods: {
|
|
|
- viewOneReport(r) {
|
|
|
- this.http.post("/report/getAuditWorkflowList", {reportId:r.id},
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.$set(r,'auditorList', res.data);
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.undoFormLoading = false
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- expandChange(row, expandedRows) {
|
|
|
- var reportList = row.data;
|
|
|
- for (var i=0;i<reportList.length; i++) {
|
|
|
- var r = reportList[i];
|
|
|
- if (r.auditorList) continue;
|
|
|
- this.http.post("/report/getAuditWorkflowList", {reportId:r.id},
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.$set(r,'auditorList', res.data);
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.undoFormLoading = false
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- detailsClick(item, i) {
|
|
|
- this.detailsDialog = true
|
|
|
- this.detailsList = item.membdateList
|
|
|
- this.idx = i
|
|
|
- },
|
|
|
- // 审核记录撤销点击确定
|
|
|
- clickCancel() {
|
|
|
- this.undoFormLoading = true
|
|
|
- this.http.post('/report/denyHisReport', this.undoForm,
|
|
|
- res => {
|
|
|
- this.undoFormLoading = false
|
|
|
- if (res.code == "ok") {
|
|
|
- this.$message({
|
|
|
- message: this.$t('Revocationofsuccess'),
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- this.undoFormDialog = false
|
|
|
- this.recordList()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.undoFormLoading = false
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- undoCli(item, i) {
|
|
|
- // console.log(item)
|
|
|
- this.undoFormDialog = true
|
|
|
- this.undoForm = {reason: ''}
|
|
|
- // this.undoForm.reason = ''
|
|
|
- if(i){
|
|
|
- this.undoForm.hisId = item.id
|
|
|
- }else{
|
|
|
- this.undoForm.hisId = item.membdateList[0].id
|
|
|
- }
|
|
|
-
|
|
|
- this.ioss = i
|
|
|
- // if(i == 0) {
|
|
|
- // this.undoForm.createDate = item.indate.split(' ')[0]
|
|
|
- // this.undoForm.userId = item.userId
|
|
|
- // } else {
|
|
|
- // this.undoForm.hisId = item.id
|
|
|
- // }
|
|
|
- },
|
|
|
- // 获取审核记录
|
|
|
- recordList() {
|
|
|
- // this.recordDialogVisible = true
|
|
|
- // return
|
|
|
- this.http.post( '/report-audit-log/getProjectReportAuditLog', {
|
|
|
- companyId: this.user.companyId,
|
|
|
- pageIndex: this.pageIndexList,
|
|
|
- pageSize: this.pageSizeList
|
|
|
- },
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- for (var i in res.data.records) {
|
|
|
- res.data.records[i].result.indexOf(this.$t('btn.through')) == '-1' ? res.data.records[i].flg = false : res.data.records[i].flg = true
|
|
|
- }
|
|
|
- this.recordLists = res.data.records
|
|
|
- this.totals = res.data.total
|
|
|
- if(this.recordLists.length != 0){
|
|
|
- this.detailsList = this.recordLists[this.idx].membdateList
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // 获取部门列表
|
|
|
- getDepartment() {
|
|
|
- this.http.post( this.port.manage.depList, {},
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- var list1 = JSON.parse(JSON.stringify(res.data));
|
|
|
-
|
|
|
- this.option = this.changeArr(list1);
|
|
|
- console.log(this.option, '部门')
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.multipleSelection = val;
|
|
|
- },
|
|
|
- batchApprove(isPass) {
|
|
|
- var ids = '';
|
|
|
- for (var i=0;i<this.multipleSelection.length; i++) {
|
|
|
- var line = this.multipleSelection[i];
|
|
|
- var array = line.data;
|
|
|
- if (this.user.company.companyName == '成都明夷电子科技有限公司') {
|
|
|
- ids += line.reportIds+',';
|
|
|
- } else {
|
|
|
- for (var m=0;m<array.length; m++) {
|
|
|
- ids += array[m].id+',';
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (ids.length > 0) {
|
|
|
- ids = ids.substring(0, ids.length-1);
|
|
|
- }
|
|
|
- //等待
|
|
|
- if(isPass){
|
|
|
- this.isbatch = true
|
|
|
- this.approveinData = {
|
|
|
- ids: ids
|
|
|
- }
|
|
|
- if(this.user.timeType.needEvaluate == 1){
|
|
|
- this.$set(this.approveinData,'evaluate','')
|
|
|
- this.approveinDialog = true
|
|
|
- }else{
|
|
|
- this.batchApproveLoading = true
|
|
|
- this.listLoading = true;
|
|
|
- this.batchApproveinfun()
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.batchDenyDialog = true
|
|
|
- this.batchDenyData.ids = ids
|
|
|
- this.batchDenyData.reason = ''
|
|
|
- }
|
|
|
- },
|
|
|
- batchApproveinfun(){
|
|
|
- this.http.post('/report/batchApproveReport', this.approveinData,
|
|
|
- res => {
|
|
|
- this.batchApproveLoading = false
|
|
|
- this.listLoading = false;
|
|
|
- if (res.code == "ok") {
|
|
|
- this.approveinDialog = false
|
|
|
- this.getList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.listLoading = false;
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- batchDenyClick(){
|
|
|
- this.batchDenyLoading = true
|
|
|
- this.listLoading = true;
|
|
|
- this.http.post('/report/batchDenyReport', this.batchDenyData,
|
|
|
- res => {
|
|
|
- this.batchDenyLoading = false;
|
|
|
- this.batchDenyDialog = false
|
|
|
- this.listLoading = false;
|
|
|
- if (res.code == "ok") {
|
|
|
- this.getList();
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.listLoading = false;
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- //分页
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.page = val;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
-
|
|
|
- handleSizeChange(val) {
|
|
|
- this.size = val;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
-
|
|
|
- //分页
|
|
|
- handleCurrentChangeList(val) {
|
|
|
- this.pageIndexList = val;
|
|
|
- this.recordList();
|
|
|
- },
|
|
|
-
|
|
|
- handleSizeChangeList(val) {
|
|
|
- this.pageSizeList = val;
|
|
|
- this.recordList();
|
|
|
- },
|
|
|
-
|
|
|
- test(){
|
|
|
- console.log(this.search.userId);
|
|
|
- },
|
|
|
- searchUserIds(deptId){
|
|
|
- this.searchUsersList = this.usersList.filter(item => deptId == item.departmentId)
|
|
|
- },
|
|
|
- usersSearch(e){
|
|
|
- if(e == false){
|
|
|
- this.getList()
|
|
|
- }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ manHourText(value) {
|
|
|
+ return value == 0 ? 0 : value + 'h';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //获取待审核的数据列表
|
|
|
+ getList() {
|
|
|
+ this.listLoading = true;
|
|
|
+ const { projectId, dateRange, submitUserId, status } = this.screeningConditionForm;
|
|
|
+ const params = {
|
|
|
+ ...(projectId && { projectId }),
|
|
|
+ ...(dateRange && { startTime: dateRange[0], endTime: dateRange[1] }),
|
|
|
+ ...(submitUserId && { submitUserId }),
|
|
|
+ ...(status && { status }),
|
|
|
+ };
|
|
|
+ this.http.post("/group-budget-review/list", {
|
|
|
+ ...params
|
|
|
},
|
|
|
- //获取待审核的数据列表
|
|
|
- getList(e) {
|
|
|
- this.listLoading = true;
|
|
|
- this.http.post("/group-budget-review/list",{},
|
|
|
res => {
|
|
|
this.listLoading = false;
|
|
|
if (res.code == "ok") {
|
|
|
this.list = res.data;
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.listLoading = false;
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- review(id,checkType){
|
|
|
- this.http.post("/group-budget-review/check", {id:id,checkType:checkType},
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.$message({
|
|
|
- message:"操作成功",
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- this.getList();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -519,24 +224,19 @@
|
|
|
}
|
|
|
},
|
|
|
error => {
|
|
|
+ this.listLoading = false;
|
|
|
this.$message({
|
|
|
message: error,
|
|
|
type: "error"
|
|
|
});
|
|
|
});
|
|
|
- },
|
|
|
-
|
|
|
- approveinfun(){
|
|
|
- this.http.post(this.port.report.approve, this.approveinData,
|
|
|
+ },
|
|
|
+ //获取项目列表
|
|
|
+ getProjectList() {
|
|
|
+ this.http.post(this.port.project.list, {},
|
|
|
res => {
|
|
|
- this.logining = false;
|
|
|
if (res.code == "ok") {
|
|
|
- this.approveinDialog = false
|
|
|
- this.$message({
|
|
|
- message: this.$t('message.Reviewsucceeded'),
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- this.getList();
|
|
|
+ this.projectList = res.data;
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -545,38 +245,19 @@
|
|
|
}
|
|
|
},
|
|
|
error => {
|
|
|
- this.logining = false;
|
|
|
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;
|
|
|
- },
|
|
|
-
|
|
|
- //获取项目列表
|
|
|
- getProjectList() {
|
|
|
- this.http.post( this.port.project.list, {},
|
|
|
+ },
|
|
|
+ // 获取所有人员
|
|
|
+ getUsers() {
|
|
|
+ this.http.post('/user/getSimpleActiveUserList', {},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
- this.projectList = res.data;
|
|
|
+ this.usersList = res.data;
|
|
|
+ this.searchUsersList = this.usersList
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -590,35 +271,46 @@
|
|
|
type: "error"
|
|
|
});
|
|
|
});
|
|
|
+ },
|
|
|
+ selectCal(obj) {
|
|
|
+ console.log(obj, '过来的数据')
|
|
|
+ if (obj.distinction == 1) {
|
|
|
+ this.screeningConditionForm.submitUserId = obj.id
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取当月第一天到现在的日期
|
|
|
+ getNowMonth() {
|
|
|
+ let date = new Date();
|
|
|
+ let year = date.getFullYear();
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
+ let day = date.getDate();
|
|
|
+ let now = year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day);
|
|
|
+ let firstDay = year + '-' + (month < 10 ? '0' + month : month) + '-01';
|
|
|
+ this.screeningConditionForm.dateRange = [firstDay, now]
|
|
|
+ },
|
|
|
+ // 导出
|
|
|
+ exportReport() {
|
|
|
+ const { projectId, dateRange, submitUserId, status } = this.screeningConditionForm;
|
|
|
+ const params = {
|
|
|
+ ...(projectId && { projectId }),
|
|
|
+ ...(dateRange && { startTime: dateRange[0], endTime: dateRange[1] }),
|
|
|
+ ...(submitUserId && { submitUserId }),
|
|
|
+ ...(status && { status }),
|
|
|
+ };
|
|
|
+ this.exporListLoading = true;
|
|
|
+ this.http.post('group-budget-review/export', {
|
|
|
+ ...params
|
|
|
},
|
|
|
- showDenyDialog(id,i, date, item) {
|
|
|
- this.denyReasonDialog = true;
|
|
|
- var ids = '';
|
|
|
- if (this.user.company.companyName == '成都明夷电子科技有限公司') {
|
|
|
- ids = item.reportIds;
|
|
|
- } else {
|
|
|
- var data = item.data;
|
|
|
- data.forEach(element => {
|
|
|
- ids +=(element.id+',');
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- this.denyForm = {id: id ,i:i, date: date, reportIds: ids, reason:null};
|
|
|
- },
|
|
|
-
|
|
|
- // 未通过日报
|
|
|
- deny() {
|
|
|
- this.logining = true;
|
|
|
- this.http.post( this.port.report.deny, this.denyForm,
|
|
|
res => {
|
|
|
- this.logining = false;
|
|
|
+ this.exporListLoading = false
|
|
|
if (res.code == "ok") {
|
|
|
- this.$message({
|
|
|
- message: this.denyForm.i==0?this.$t('message.rejectedsuccessfully'):this.$t('Revocationofsuccess'),
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- this.getList();
|
|
|
- this.denyReasonDialog = false;
|
|
|
+ var filePath = res.data;
|
|
|
+ const a = document.createElement('a'); // 创建a标签
|
|
|
+ a.setAttribute('download', '预估工时审核');// download属性
|
|
|
+ a.setAttribute('href', filePath);// href链接
|
|
|
+ a.click(); //自执行点击事件
|
|
|
+ a.remove();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -627,103 +319,29 @@
|
|
|
}
|
|
|
},
|
|
|
error => {
|
|
|
- this.logining = false;
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // 获取所有人员
|
|
|
- getUsers() {
|
|
|
- // this.http.post(this.port.manage.list, {
|
|
|
- // departmentId: -1,
|
|
|
- // pageIndex: 1,
|
|
|
- // // pageSize: 99999
|
|
|
- // pageSize: -1
|
|
|
- // },
|
|
|
- this.http.post('/user/getSimpleActiveUserList', {},
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.usersList = res.data;
|
|
|
- this.searchUsersList = this.usersList
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
+ this.exporListLoading = false
|
|
|
this.$message({
|
|
|
message: error,
|
|
|
type: "error"
|
|
|
});
|
|
|
});
|
|
|
- },
|
|
|
- // 选择日期后触发
|
|
|
- dataTimes() {
|
|
|
- // console.log(this.dataTime)
|
|
|
- if(this.dataTime){
|
|
|
- this.search.startDate = this.dataTime[0]
|
|
|
- this.search.endDate = this.dataTime[1]
|
|
|
- }else{
|
|
|
- this.search.startDate = null
|
|
|
- this.search.endDate = null
|
|
|
- }
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- // 自定义部门选择
|
|
|
- vueCasader(obj) {
|
|
|
- console.log(obj, '组件传过来的')
|
|
|
- if(obj.distinction == '1') {
|
|
|
- if(obj.id != '') {
|
|
|
- let arr = []
|
|
|
- arr.push(obj.id)
|
|
|
- this.search.departmentIdArray = arr
|
|
|
- } else {
|
|
|
- this.search.departmentIdArray = []
|
|
|
- }
|
|
|
- this.getList(1)
|
|
|
- }
|
|
|
- },
|
|
|
- selectCal(obj) {
|
|
|
- console.log(obj, '过来的数据')
|
|
|
- // search.userIdArray
|
|
|
- let userListId = obj.arrUserList
|
|
|
- let arr = []
|
|
|
- for(var i in userListId) {
|
|
|
- arr.push(userListId[i].id)
|
|
|
- }
|
|
|
- this.search.userIdArray = arr
|
|
|
- console.log(this.search.userIdArray, '数据看看')
|
|
|
- this.usersSearch(false)
|
|
|
- },
|
|
|
- defaultExpandAllFlgCli() {
|
|
|
- this.defaultExpandAllFlg = !this.defaultExpandAllFlg
|
|
|
- this.list = JSON.parse(JSON.stringify(this.list))
|
|
|
- this.$nextTick(()=>{this.$refs.multipleTable.doLayout()})
|
|
|
- this.showTable = false
|
|
|
- this.$nextTick(() => {
|
|
|
- this.showTable = true
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- let height = window.innerHeight;
|
|
|
- this.tableHeight = height - 125;
|
|
|
- const that = this;
|
|
|
- window.onresize = function temp() {
|
|
|
- that.tableHeight = window.innerHeight - 125;
|
|
|
- };
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.getList();
|
|
|
- // this.getDepartment();
|
|
|
- // this.getProjectList();
|
|
|
- // this.getUsers()
|
|
|
}
|
|
|
- };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ let height = window.innerHeight;
|
|
|
+ this.tableHeight = height - 125;
|
|
|
+ const that = this;
|
|
|
+ window.onresize = function temp() {
|
|
|
+ that.tableHeight = window.innerHeight - 125;
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getNowMonth()
|
|
|
+ this.getUsers();
|
|
|
+ this.getProjectList()
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -731,9 +349,45 @@
|
|
|
display: inline-block;
|
|
|
padding-left: 20px;
|
|
|
}
|
|
|
+
|
|
|
.remarkClass {
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
+
|
|
|
+.selectProRight {
|
|
|
+ float: right;
|
|
|
+ color: #8492a6;
|
|
|
+ font-size: 13px;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.selectProleft {
|
|
|
+ float: left;
|
|
|
+}
|
|
|
+
|
|
|
+.budgetReviewHeader {
|
|
|
+ padding: 10px 20px;
|
|
|
+ background: #F2F2F2;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+
|
|
|
+.budgetReviewHeader_Form {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .budgetReviewHeader_FormItem {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: 20px;
|
|
|
+
|
|
|
+ .budgetReviewHeader_FormItemText {
|
|
|
+ margin-right: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|