|
@@ -2,14 +2,64 @@
|
|
|
<div class="page">
|
|
|
<el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
|
|
|
<!-- 搜索框-->
|
|
|
- <el-form-item prop="type">
|
|
|
- <el-input size="small" v-model="searchForm.type" placeholder="请输入项目类型名称" clearable></el-input>
|
|
|
+ <el-form-item label="项目名称" prop="name">
|
|
|
+ <el-input size="small" v-model="searchForm.name" placeholder="请输入项目名称" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="项目编号" prop="no">
|
|
|
+ <el-input size="small" v-model="searchForm.no" placeholder="请输入项目编号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="登记人" prop="createBy">
|
|
|
+ <SelectUserTree
|
|
|
+ ref="companyTree"
|
|
|
+ :props="{
|
|
|
+ value: 'id', // ID字段名
|
|
|
+ label: 'name', // 显示名称
|
|
|
+ children: 'children' // 子级字段名
|
|
|
+ }"
|
|
|
+ :url="`/sys/user/treeUserDataAllOffice?type=2`"
|
|
|
+ :value="searchForm.createBy"
|
|
|
+ :clearable="true"
|
|
|
+ :accordion="true"
|
|
|
+ @getValue="(value) => {searchForm.createBy=value}"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="项目经理" prop="projectManager">
|
|
|
+ <el-input size="small" v-model="searchForm.projectManager" placeholder="请输入项目经理" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="合同名称" prop="contractName">
|
|
|
+ <el-input size="small" v-model="searchForm.contractName" placeholder="请输入合同名称" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="委托方" prop="client">
|
|
|
+ <el-input size="small" v-model="searchForm.client" placeholder="请输入委托方" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建时间" prop="createDates">
|
|
|
+ <el-date-picker
|
|
|
+ placement="bottom-start"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ v-model="searchForm.createDates"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-select v-model="searchForm.status" placeholder="请选择" style="width:100%;">
|
|
|
+ <el-option
|
|
|
+ v-for="item in $dictUtils.getDictList('program_project_list_info_status')"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
|
|
|
<el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+
|
|
|
<div class="bg-white top" style="">
|
|
|
<vxe-toolbar :refresh="{query: refreshList}" custom>
|
|
|
<template #buttons>
|
|
@@ -37,12 +87,31 @@
|
|
|
:checkbox-config="{}">
|
|
|
<vxe-column type="seq" width="40"></vxe-column>
|
|
|
<vxe-column type="checkbox" width="40" ></vxe-column>
|
|
|
- <vxe-column width="180" title="项目类型名称" field="type" align="left" tree-node></vxe-column>
|
|
|
- <vxe-column width="180" title="序号" field="sort"></vxe-column>
|
|
|
- <vxe-column title="备注" field="remarks"></vxe-column>
|
|
|
+ <vxe-column width="180" title="项目名称" field="name" align="left">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link type="primary" :underline="false" v-if="hasPermission('program:registered:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
|
|
|
+ <el-link type="primary" :underline="false" v-else-if="hasPermission('program:registered:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
|
|
|
+ <span v-else>{{scope.row.name}}</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column width="100" title="项目编号" field="no"></vxe-column>
|
|
|
+ <vxe-column width="180" title="合同名称" field="contractName">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link type="primary" :underline="false" v-if="hasPermission('program:registered:view')" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>
|
|
|
+ <el-link type="primary" :underline="false" v-else-if="hasPermission('program:registered:view')" @click="viewContract(scope.row.contractId)">{{scope.row.contractName}}</el-link>
|
|
|
+ <span v-else>{{scope.row.name}}</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column width="100" title="项目经理" field="projectManager"></vxe-column>
|
|
|
+ <vxe-column width="180" title="委托方" field="client"></vxe-column>
|
|
|
+ <vxe-column width="100" title="创建日期" field="createDate"></vxe-column>
|
|
|
+ <vxe-column width="120px" title="状态" field="status" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("approval_type", scope.row.status, '-')}} </el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
<vxe-column title="操作" width="230px" fixed="right" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.parentId === '0'" type="text" icon="el-icon-plus" size="small" @click="addChild(scope.row.id)">新建子类型</el-button>
|
|
|
<el-button v-if="hasPermission('program:configuration:type:edit')" type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
|
|
|
<el-button v-if="hasPermission('program:configuration:type:del')" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
</template>
|
|
@@ -61,18 +130,27 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<ProjectForm ref="projectForm" @refreshDataList="refreshList"></ProjectForm>
|
|
|
+ <WorkContractForm2 ref="workContractForm2" @refreshDataList="refreshList"></WorkContractForm2>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import ProgramTypeDictService from '@/api/program/ProgramTypeDictService'
|
|
|
+ import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
|
|
|
import ProjectForm from './ProjectForm'
|
|
|
+ import WorkContractForm2 from '../../sys/workContract/WorkContractForm2'
|
|
|
+ import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
- type: '',
|
|
|
- sort: ''
|
|
|
+ name: '',
|
|
|
+ no: '',
|
|
|
+ createBy: '',
|
|
|
+ projectManager: '',
|
|
|
+ contractName: '',
|
|
|
+ client: '',
|
|
|
+ createDates: [],
|
|
|
+ status: ''
|
|
|
},
|
|
|
dataList: [],
|
|
|
tablePage: {
|
|
@@ -84,12 +162,14 @@
|
|
|
loading: false
|
|
|
}
|
|
|
},
|
|
|
- programTypeDictService: null,
|
|
|
+ programProjectListInfoService: null,
|
|
|
created () {
|
|
|
- this.programTypeDictService = new ProgramTypeDictService()
|
|
|
+ this.programProjectListInfoService = new ProgramProjectListInfoService()
|
|
|
},
|
|
|
components: {
|
|
|
- ProjectForm
|
|
|
+ ProjectForm,
|
|
|
+ WorkContractForm2,
|
|
|
+ SelectUserTree
|
|
|
},
|
|
|
mounted () {
|
|
|
this.refreshList()
|
|
@@ -115,17 +195,17 @@
|
|
|
},
|
|
|
// 获取数据列表
|
|
|
refreshList () {
|
|
|
- // this.loading = true
|
|
|
- // this.programTypeDictService.list({
|
|
|
- // 'current': this.tablePage.currentPage,
|
|
|
- // 'size': this.tablePage.pageSize,
|
|
|
- // 'orders': this.tablePage.orders,
|
|
|
- // ...this.searchForm
|
|
|
- // }).then(({data}) => {
|
|
|
- // this.dataList = data.records
|
|
|
- // this.tablePage.total = data.total
|
|
|
- // this.loading = false
|
|
|
- // })
|
|
|
+ this.loading = true
|
|
|
+ this.programProjectListInfoService.list({
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
+ ...this.searchForm
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.dataList = data.records
|
|
|
+ this.tablePage.total = data.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
// 当前页
|
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
@@ -152,7 +232,7 @@
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.loading = true
|
|
|
- this.programTypeDictService.delete(ids).then(({data}) => {
|
|
|
+ this.programProjectListInfoService.delete(ids).then(({data}) => {
|
|
|
this.$message.success(data)
|
|
|
this.refreshList()
|
|
|
this.loading = false
|
|
@@ -162,6 +242,9 @@
|
|
|
resetSearch () {
|
|
|
this.$refs.searchForm.resetFields()
|
|
|
this.refreshList()
|
|
|
+ },
|
|
|
+ viewContract (id) {
|
|
|
+ this.$refs.workContractForm2.init('view', id)
|
|
|
}
|
|
|
}
|
|
|
}
|