| | |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <el-date-picker |
| | | v-model="query.planStartDate" |
| | | clearable |
| | | placeholder="请选择计划开始日期" |
| | | style="width: 185px" |
| | | class="filter-item" |
| | | value-format="yyyy-MM-dd" |
| | | @keyup.enter.native="crud.toQuery" |
| | | /> |
| | | <el-date-picker |
| | | v-model="query.planEndDate" |
| | | clearable |
| | | placeholder="请选择计划结束日期" |
| | | style="width: 185px" |
| | | class="filter-item" |
| | | value-format="yyyy-MM-dd" |
| | | @keyup.enter.native="crud.toQuery" |
| | | /> |
| | | <el-select v-model="query.projectStatus" clearable filterable placeholder="请选择项目状态" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery"> |
| | | <el-option |
| | | v-for="item in dict[projectStatus]" |
| | |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-date-picker |
| | | v-model="query.planStartDate" |
| | | type="daterange" |
| | | range-separator=":" |
| | | value-format="yyyy-MM-dd" |
| | | class="filter-item" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | @keyup.enter.native="crud.toQuery" |
| | | /> |
| | | <el-date-picker |
| | | v-model="query.planEndDate" |
| | | type="daterange" |
| | | range-separator=":" |
| | | value-format="yyyy-MM-dd" |
| | | class="filter-item" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | @keyup.enter.native="crud.toQuery" |
| | | /> |
| | | <rrOperation :crud="crud" /> |
| | | </div> |
| | | <!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
| | |
| | | <!--表格渲染--> |
| | | <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 150%;" @selection-change="crud.selectionChangeHandler"> |
| | | <el-table-column type="selection" width="55" fixed="left" /> |
| | | <el-table-column prop="name" label="名称" show-overflow-tooltip fixed="left" width="150" /> |
| | | <el-table-column prop="projectTypeName" label="项目类型" width="150"> |
| | | <el-table-column prop="name" label="名称" show-overflow-tooltip fixed="left" width="130" /> |
| | | <el-table-column prop="projectTypeName" label="项目类型" width="130"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.projectTypeName }} |
| | | <el-tag>{{ scope.row.projectTypeName }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="projectDistinguish" label="项目区分" width="150"> |
| | | <el-table-column prop="projectDistinguish" label="项目区分" width="130"> |
| | | <template slot-scope="scope"> |
| | | <el-tag>{{ dict.label[projectDistinguish][scope.row.projectDistinguish] }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="requirement" label="需求说明" show-overflow-tooltip width="150" /> |
| | | <el-table-column prop="unitCurrency" label="单价币种" width="150"> |
| | | <el-table-column prop="unitCurrency" label="单价币种" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-tag>{{ dict.label[standardUnitCurrency][scope.row.unitCurrency] }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unitPrice" label="单价金额" width="150" /> |
| | | <el-table-column prop="totalPrice" label="报价金额" width="150" /> |
| | | <el-table-column prop="liableUserName" label="责任人" width="150"> |
| | | <el-table-column prop="unitPrice" label="单价金额" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ crud.toMoney(scope.row.unitPrice) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="totalPrice" label="报价金额" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ crud.toMoney(scope.row.totalPrice) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="liableUserName" label="责任人" width="80"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.liableUserName }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="planStartDate" label="计划开始日期" width="150"> |
| | | <el-table-column prop="planStartDate" label="计划开始日期" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ crud.toDate(scope.row.planStartDate) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="planEndDate" label="计划结束日期" width="150"> |
| | | <el-table-column prop="planEndDate" label="计划结束日期" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ crud.toDate(scope.row.planEndDate) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="projectStatus" label="项目状态" width="150"> |
| | | <el-table-column prop="projectStatus" label="项目状态" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-tag>{{ dict.label[projectStatus][scope.row.projectStatus] }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="approveStatus" label="批准状态" width="150"> |
| | | <el-table-column prop="approveStatus" label="批准状态" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-tag>{{ dict.label[approveStatus][scope.row.approveStatus] }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remarks" label="备注" show-overflow-tooltip width="150" /> |
| | | <el-table-column prop="createTime" label="创建时间" width="150" /> |
| | | <el-table-column v-if="checkPer(['admin','project:edit','project:del'])" label="操作" width="225px" align="center"> |
| | | <el-table-column prop="createTime" label="创建时间" width="140" /> |
| | | <el-table-column v-if="checkPer(['admin','project:edit','project:del'])" label="操作" width="225px" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <udOperation |
| | | :data="scope.row" |
| | | :permission="permission" |
| | | > |
| | | <el-button |
| | | slot="right" |
| | | <el-popover |
| | | slot="left" |
| | | :ref="`popover_${scope.row.id}`" |
| | | v-permission="permission.admit" |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-share" |
| | | @click="projectAdmit(scope.row)" |
| | | /> |
| | | width="160" |
| | | placement="top" |
| | | > |
| | | <p>确定承认此项目吗?</p> |
| | | <div style="text-align: right; margin: 0"> |
| | | <el-button size="mini" type="text" @click="canel(scope.row)">取消</el-button> |
| | | <el-button type="primary" size="mini" @click="projectAdmit(scope.row)">确定</el-button> |
| | | </div> |
| | | <el-button slot="reference" type="primary" icon="el-icon-share" size="mini" /> |
| | | </el-popover> |
| | | </udOperation> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | { required: true, message: '项目类型不能为空', trigger: 'change' } |
| | | ], |
| | | projectDistinguish: [ |
| | | { required: true, message: '项目区分不能为空', trigger: 'blur' }, |
| | | { min: 1, max: 100, message: '最大长度 100 个字符', trigger: 'blur' } |
| | | { required: true, message: '项目区分不能为空', trigger: 'change' } |
| | | ], |
| | | unitCurrency: [ |
| | | { required: true, message: '单价币种不能为空', trigger: 'change' } |
| | |
| | | [CRUD.HOOK.afterToCU](crud, form) { |
| | | // 随机数 |
| | | this.random = Math.random() |
| | | this.getPackageTypeAll() |
| | | }, |
| | | // 获取项目类型 |
| | | getPackageTypeAll() { |
| | |
| | | this.random = Math.random() |
| | | }) |
| | | }, |
| | | // 取消 |
| | | canel(data) { |
| | | this.$refs[`popover_${data.id}`].showPopper = false |
| | | }, |
| | | // 项目承认 |
| | | projectAdmit(row) { |
| | | this.ids = [] |
| | | // 判断是多个项目承认还是单个项目承认 |
| | | if (row.id !== undefined) { |
| | | this.$refs[`popover_${row.id}`].showPopper = false |
| | | this.ids.push(row.id) |
| | | // 项目承认 |
| | | crudProject.editAdmit(this.ids).then(res => { |
| | | // 刷新数据 |
| | | this.crud.refresh() |
| | | }) |
| | | } else { |
| | | for (let i = 0; i < row.length; i++) { |
| | | this.ids.push(row[i].id) |
| | | } |
| | | this.$confirm('此操作将承认' + row.length + '个项目, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'success' |
| | | }).then(() => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '项目已承认!' |
| | | }) |
| | | for (let i = 0; i < row.length; i++) { |
| | | this.ids.push(row[i].id) |
| | | } |
| | | // 项目承认 |
| | | crudProject.editAdmit(this.ids).then(res => { |
| | | // 刷新数据 |
| | | this.crud.refresh() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消项目承认' |
| | | }) |
| | | }) |
| | | } |
| | | // 项目承认 |
| | | crudProject.editAdmit(this.ids).then(res => { |
| | | // 刷新数据 |
| | | this.crud.refresh() |
| | | }) |
| | | } |
| | | } |
| | | } |