|
|
@@ -0,0 +1,177 @@
|
|
|
+<template>
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud :option="option"
|
|
|
+ :data="dataList"
|
|
|
+ ref="crud"
|
|
|
+ v-model="form"
|
|
|
+ :page.sync="page"
|
|
|
+ :search.sync="search"
|
|
|
+ :table-loading="loading"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="searchReset"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @on-load="onLoad">
|
|
|
+ <template slot="flagSearch">
|
|
|
+ <el-select v-model="search.flag" placeholder="" >
|
|
|
+ <el-option
|
|
|
+ v-for="item in flagOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="small"
|
|
|
+ :disabled="scope.row.billType === '申请' && scope.row.settlementAmount != 0"
|
|
|
+ @click.stop=""
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import option from "./config/mainList.json";
|
|
|
+ import { performanceAnalysis } from "@/api/workManagement/mainProject";
|
|
|
+ import _ from "lodash";
|
|
|
+
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ loading : false,
|
|
|
+ form: {},
|
|
|
+ search:{},
|
|
|
+ detailData:{},
|
|
|
+ option: option,
|
|
|
+ parentId:0,
|
|
|
+ dataList: [],
|
|
|
+ flagOptions:[{
|
|
|
+ value: '1',
|
|
|
+ label: '制单人'
|
|
|
+ }, {
|
|
|
+ value: '2',
|
|
|
+ label: '客户'
|
|
|
+ }],
|
|
|
+ page: {
|
|
|
+ pageSize: 10,
|
|
|
+ pagerCount: 5,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
+ query:{},
|
|
|
+ configuration:{
|
|
|
+ multipleChoices:false,
|
|
|
+ multiple:false,
|
|
|
+ disabled:false,
|
|
|
+ searchShow:true,
|
|
|
+ collapseTags:false,
|
|
|
+ clearable:true,
|
|
|
+ placeholder:'请点击右边按钮选择',
|
|
|
+ dicData:[]
|
|
|
+ },
|
|
|
+ breakConfiguration:{
|
|
|
+ multipleChoices:false,
|
|
|
+ multiple:false,
|
|
|
+ disabled:false,
|
|
|
+ searchShow:true,
|
|
|
+ collapseTags:false,
|
|
|
+ clearable:true,
|
|
|
+ placeholder:'请点击右边按钮选择',
|
|
|
+ dicData:[]
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.option.column.forEach(item =>{
|
|
|
+ if(item.prop == "corpNames" || item.prop == "countCreateUser" ) {
|
|
|
+ item.hide = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // option.height = window.innerHeight - 200 ;
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //新单打开
|
|
|
+ addReceipt(row){
|
|
|
+ console.log(1)
|
|
|
+ },
|
|
|
+ //编辑打开
|
|
|
+ editOpen(row){
|
|
|
+ console.log(1)
|
|
|
+ },
|
|
|
+ searchReset() {
|
|
|
+ console.log('1')
|
|
|
+ },
|
|
|
+ selectionChange() {
|
|
|
+ console.log('1')
|
|
|
+ },
|
|
|
+ sizeChange() {
|
|
|
+ console.log('1')
|
|
|
+ },
|
|
|
+ currentChange(val) {
|
|
|
+ this.page.currentPage = val
|
|
|
+ },
|
|
|
+ refreshChange(params) {
|
|
|
+ this.onLoad(this.page,params);
|
|
|
+ },
|
|
|
+ //点击搜索按钮触发
|
|
|
+ searchChange(params, done) {
|
|
|
+ this.query = params;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, params);
|
|
|
+ done()
|
|
|
+ },
|
|
|
+
|
|
|
+ paramsAdjustment(params) {
|
|
|
+ params = Object.assign({}, this.search);
|
|
|
+ if(params.flag == 1){
|
|
|
+ this.option.column.forEach(item =>{
|
|
|
+ if(item.prop == "corpNames" || item.prop == "countCreateUser" ) {
|
|
|
+ item.hide = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.option.column.forEach(item =>{
|
|
|
+ if(item.prop == "createUserName" || item.prop == "countCorp" ) {
|
|
|
+ item.hide = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.option.column.forEach(item =>{
|
|
|
+ if(item.prop == "createUserName" || item.prop == "countCorp" ) {
|
|
|
+ item.hide = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.option.column.forEach(item =>{
|
|
|
+ if(item.prop == "corpNames" || item.prop == "countCreateUser" ) {
|
|
|
+ item.hide = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return params
|
|
|
+ },
|
|
|
+
|
|
|
+ onLoad(page, params) {
|
|
|
+ this.loading = true;
|
|
|
+ params = this.paramsAdjustment(params)
|
|
|
+ performanceAnalysis(page.currentPage, page.pageSize,params).then(res=>{
|
|
|
+ this.dataList = res.data.data
|
|
|
+ // this.page.total = res.data.data
|
|
|
+ }).finally(()=>{
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|