From ad0a536bd7534a8eaf477d41294de21c7d7b25df Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 21 Dec 2023 11:50:54 +0800
Subject: [PATCH] 维修基金审核
---
src/views/work/process/maintenanceFundApply/detail.vue | 325 ++++++++
src/views/flow/manager.vue | 115 +-
src/views/work/process/maintenanceFundApply/form.vue | 267 ++++++
src/router/views/index.js | 31
src/views/property/propertyCapitalApply.vue | 816 ++++++++++----------
src/views/work/start.vue | 367 ++++----
src/views/work/process/maintenanceFundApply/handle.vue | 413 ++++++++++
7 files changed, 1,692 insertions(+), 642 deletions(-)
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 383242e..71d0fb4 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -103,4 +103,33 @@
component: () =>
import( /* webpackChunkName: "views" */ '@/views/work/process/leave/detail')
}]
-}]
+}, {
+ path: '/work/process/maintenanceFundApply',
+ component: Layout,
+ redirect: '/work/process/maintenanceFundApply/form',
+ children: [{
+ path: 'form/:processDefinitionId',
+ name: '维修基金申请',
+ meta: {
+ i18n: 'work'
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/work/process/maintenanceFundApply/form')
+ }, {
+ path: 'handle/:taskId/:processInstanceId/:businessId',
+ name: '处理维修基金申请',
+ meta: {
+ i18n: 'work'
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/work/process/maintenanceFundApply/handle')
+ }, {
+ path: 'detail/:processInstanceId/:businessId',
+ name: '维修基金申请详情',
+ meta: {
+ i18n: 'work'
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/work/process/maintenanceFundApply/detail')
+ }]
+}]
\ No newline at end of file
diff --git a/src/views/flow/manager.vue b/src/views/flow/manager.vue
index 33b4a7f..8e48430 100644
--- a/src/views/flow/manager.vue
+++ b/src/views/flow/manager.vue
@@ -1,19 +1,9 @@
<template>
<basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :permission="permissionList"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" :page.sync="page"
+ :permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad">
<template slot="menuLeft">
<el-radio-group v-model="mode" size="small">
<el-radio-button label="1">通用流程</el-radio-button>
@@ -21,75 +11,59 @@
</el-radio-group>
</template>
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- icon="el-icon-refresh"
- v-if="permission.flow_manager_state"
- @click.stop="handleState(scope.row,scope.index)">变更状态
+ <el-button type="text" size="small" icon="el-icon-refresh" v-if="permission.flow_manager_state"
+ @click.stop="handleState(scope.row,scope.index)">变更状态
</el-button>
- <el-button type="text"
- size="small"
- icon="el-icon-search"
- v-if="permission.flow_manager_image"
- @click.stop="handleImage(scope.row,scope.index)">流程图
+ <el-button type="text" size="small" icon="el-icon-search" v-if="permission.flow_manager_image"
+ @click.stop="handleImage(scope.row,scope.index)">流程图
</el-button>
- <el-button type="text"
- size="small"
- icon="el-icon-delete"
- v-if="permission.flow_manager_remove"
- @click.stop="handleSlotDelete(scope.row,scope.index)">删除
+ <el-button type="text" size="small" icon="el-icon-delete" v-if="permission.flow_manager_remove"
+ @click.stop="handleSlotDelete(scope.row,scope.index)">删除
</el-button>
</template>
- <template slot-scope="{row}"
- slot="tenantId">
+ <template slot-scope="{row}" slot="tenantId">
<el-tag>{{row.tenantId===''?'通用':row.tenantId}}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="version">
+ <template slot-scope="{row}" slot="version">
<el-tag>v{{row.version}}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="suspensionState">
+ <template slot-scope="{row}" slot="suspensionState">
<el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="category">
+ <template slot-scope="{row}" slot="category">
<el-tag>{{row.categoryName}}</el-tag>
</template>
</avue-crud>
<flow-design is-dialog :is-display.sync="flowBox" :process-definition-id="processDefinitionId"></flow-design>
- <el-dialog title="流程变更"
- append-to-body
- :visible.sync="stateBox"
- width="20%">
- <el-form :model="form"
- ref="form"
- label-width="80px">
+ <el-dialog title="流程变更" append-to-body :visible.sync="stateBox" width="20%">
+ <el-form :model="form" ref="form" label-width="80px">
<el-form-item label="流程状态">
<el-select v-model="flowState" placeholder="请选择" value="">
- <el-option
- v-for="item in stateOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value">
+ <el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="stateBox = false">关 闭</el-button>
- <el-button type="primary"
- @click="handleDoState">确 定</el-button>
+ <el-button type="primary" @click="handleDoState">确 定</el-button>
</span>
</el-dialog>
</basic-container>
</template>
<script>
- import {mapGetters} from "vuex";
- import {managerList, changeState, deleteDeployment} from "@/api/flow/flow";
- import {flowCategory} from "@/util/flow";
+ import {
+ mapGetters
+ } from "vuex";
+ import {
+ managerList,
+ changeState,
+ deleteDeployment
+ } from "@/api/flow/flow";
+ import {
+ flowCategory
+ } from "@/util/flow";
export default {
data() {
@@ -132,8 +106,7 @@
dialogWidth: 900,
menuWidth: 250,
dialogClickModal: false,
- column: [
- {
+ column: [{
label: '租户编号',
prop: 'tenantId',
slot: true,
@@ -152,6 +125,7 @@
{
label: '流程名称',
prop: 'name',
+ search: true,
width: 150,
},
{
@@ -166,7 +140,7 @@
dataType: "number",
slot: true,
prop: "category",
- search: true,
+ // search: true,
width: 100,
},
{
@@ -242,10 +216,10 @@
return;
}
this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
.then(() => {
return deleteDeployment(this.deploymentIds);
})
@@ -260,10 +234,10 @@
},
handleSlotDelete(row) {
this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
.then(() => {
return deleteDeployment(row.deploymentId);
})
@@ -288,7 +262,10 @@
});
return;
}
- changeState({processId: this.selectionId, state: this.flowState}).then(res => {
+ changeState({
+ processId: this.selectionId,
+ state: this.flowState
+ }).then(res => {
const data = res.data;
if (data.success) {
this.$message({
@@ -335,4 +312,4 @@
}
}
};
-</script>
+</script>
\ No newline at end of file
diff --git a/src/views/property/propertyCapitalApply.vue b/src/views/property/propertyCapitalApply.vue
index d3b76ca..0a5b5cf 100644
--- a/src/views/property/propertyCapitalApply.vue
+++ b/src/views/property/propertyCapitalApply.vue
@@ -18,426 +18,456 @@
</template>
<script>
-import { getList, remove, update, add, getPropertyCapitalApply } from "@/api/property/propertyCapitalApply";
-import { mapGetters } from "vuex";
-import website from '@/config/website';
-import func from "@/util/func";
-export default {
- data() {
- return {
- form: {
- // constructionSchemeUrls:[]
- },
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- datetime: "",
- selectionList: [],
- option: {
- height: "auto",
- calcHeight: 54,
- dialogWidth: 1150,
- tip: false,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 350,
- border: true,
- //stripe:true,
- index: true,
- viewBtn: true,
- selection: true,
- dialogClickModal: false,
- column: [
- {
- label: "小区",
- prop: "districtId",
- searchSpan: 5,
- search: true,
- type: 'tree',
- dicUrl: `/api/blade-district/district/getDistrictTree`,
- props: {
- label: "name",
- value: "id"
- },
- defaultExpandedKeys: ["361102003"],
- span: 12,
- labelWidth: 120,
- width: 220,
- overHidden: true,
- rules: [
- {
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getPropertyCapitalApply
+ } from "@/api/property/propertyCapitalApply";
+ import {
+ mapGetters
+ } from "vuex";
+ import website from '@/config/website';
+ import func from "@/util/func";
+ export default {
+ data() {
+ return {
+ form: {
+ // constructionSchemeUrls:[]
+ },
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 1150,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 350,
+ border: true,
+ //stripe:true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [{
+ label: "小区",
+ prop: "districtId",
+ searchSpan: 5,
+ search: true,
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ span: 12,
+ labelWidth: 120,
+ width: 220,
+ overHidden: true,
+ rules: [{
required: true,
message: "请选择小区",
trigger: "blur",
- },
- ],
- },
- {
- label: '维修项目名称',
- prop: 'name',
- searchLabelWidth: 120,
- searchSpan: 5,
- search: true,
- span: 12,
- labelWidth: 140,
- rules: [
- {
+ }, ],
+ },
+ {
+ label: '维修项目名称',
+ prop: 'name',
+ searchLabelWidth: 120,
+ searchSpan: 5,
+ search: true,
+ span: 12,
+ labelWidth: 140,
+ rules: [{
required: true,
message: "请输入维修项目名称",
trigger: "blur",
- },
- ],
- },
- {
- label: "预计开工时间",
- prop: "runTime",
- span: 12,
- labelWidth: 140,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [
- {
+ }, ],
+ },
+ {
+ label: "预计开工时间",
+ prop: "runTime",
+ span: 12,
+ labelWidth: 140,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
required: true,
message: "请选择合同开始时间",
trigger: "blur",
- },
- ],
- },
- {
- label: "预计竣工时间",
- prop: "completedTime",
- labelWidth: 140,
- span: 12,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [
- {
+ }, ],
+ },
+ {
+ label: "预计竣工时间",
+ prop: "completedTime",
+ labelWidth: 140,
+ span: 12,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
required: true,
message: "请选择合同结束时间",
trigger: "blur",
- },
- ],
- },
- {
- label: "项目分摊方式",
- prop: "allocationWay",
- labelWidth: 140,
- value:'按建筑面积分摊',
- span: 14,
- row: true,
- },
- {
- label: '联系人',
- prop: 'linkman',
- span: 12,
- labelWidth: 120,
- search: true,
- searchSpan: 4,
- rules: [
- {
+ }, ],
+ },
+ {
+ label: "项目分摊方式",
+ prop: "allocationWay",
+ labelWidth: 140,
+ value: '按建筑面积分摊',
+ span: 14,
+ row: true,
+ },
+ {
+ label: '联系人',
+ prop: 'linkman',
+ span: 12,
+ labelWidth: 120,
+ search: true,
+ searchSpan: 4,
+ rules: [{
required: true,
message: "请输入联系人",
trigger: "blur",
- },
- ],
- },
- {
- label: '联系方式',
- prop: 'linkPhone',
- span: 12,
- labelWidth: 140,
- rules: [
- {
+ }, ],
+ },
+ {
+ label: '联系方式',
+ prop: 'linkPhone',
+ span: 12,
+ labelWidth: 140,
+ rules: [{
required: true,
message: "请输入联系方式",
trigger: "blur",
- },
- ],
- },
- {
- label: "项目预算总金额(元)",
- prop: "budgetAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "实际预算金额(元)",
- prop: "actualAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "自筹金额(元)",
- prop: "selfAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "预算应拨付金额(元)",
- prop: "budgetAppropriateAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "项目摘要",
- span: 24,
- hide: true,
- prop: "projectDigest",
- placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
- labelWidth: 140,
- type: "textarea"
- },
- {
- label: "项目进度描述",
- span: 24,
- hide: true,
- prop: "projectDescribe",
- labelWidth: 140,
- type: "textarea"
- },
- {
- label: '施工方案附件',
- prop: 'constructionSchemeUrls',
- type: 'upload',
- span: 24,
- hide:true,
- labelWidth: 140,
- multiple: true,
- // showFileList: true,
- propsHttp: {
- res: 'data',
- name: "originalName",
- url: "link"
+ }, ],
},
- action: '/api/blade-resource/oss/endpoint/put-file-attach',
- rules: [
- {
+ {
+ label: '申请时间',
+ prop: 'applyTime',
+ span: 12,
+ labelWidth: 160,
+ display: false,
+ }, {
+ label: '审核进度',
+ prop: 'applyStatus',
+ span: 12,
+ labelWidth: 140,
+ display: false,
+ dicData: [{
+ label: "待审核",
+ value: 0,
+ }, {
+ label: "业委会",
+ value: 1,
+ }, {
+ label: "街道",
+ value: 2,
+ }, {
+ label: "住建局",
+ value: 3,
+ }, {
+ label: "调整申请",
+ value: 4,
+ }, {
+ label: "审核通过",
+ value: 5,
+ }, {
+ label: "审核不通过",
+ value: 6,
+ }]
+ },
+ {
+ label: "项目预算总金额(元)",
+ prop: "budgetAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "实际预算金额(元)",
+ prop: "actualAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "自筹金额(元)",
+ prop: "selfAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "预算应拨付金额(元)",
+ prop: "budgetAppropriateAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "项目摘要",
+ span: 24,
+ hide: true,
+ prop: "projectDigest",
+ placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
+ labelWidth: 140,
+ type: "textarea"
+ },
+ {
+ label: "项目进度描述",
+ span: 24,
+ hide: true,
+ prop: "projectDescribe",
+ labelWidth: 140,
+ type: "textarea"
+ },
+ {
+ label: '施工方案附件',
+ prop: 'constructionSchemeUrls',
+ type: 'upload',
+ span: 24,
+ hide: true,
+ labelWidth: 140,
+ multiple: true,
+ // showFileList: true,
+ propsHttp: {
+ res: 'data',
+ name: "originalName",
+ url: "link"
+ },
+ action: '/api/blade-resource/oss/endpoint/put-file-attach',
+ rules: [{
required: true,
message: "请上传施工方案",
trigger: "blur",
- },
- ],
- }
- ],
- },
- data: [],
- };
- },
- watch: {
- },
- computed: {
- ...mapGetters(["permission", "userInfo"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.propertyCapitalApply_add, true),
- viewBtn: this.vaildData(this.permission.propertyCapitalApply_view, true),
- delBtn: this.vaildData(this.permission.propertyCapitalApply_delete, true),
- editBtn: this.vaildData(this.permission.propertyCapitalApply_edit, true),
+ }, ],
+ }
+ ],
+ },
+ data: [],
};
},
- ids() {
- let ids = [];
- this.selectionList.forEach((ele) => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- },
- methods: {
- rowSave(row, done, loading) {
- row.constructionSchemeUrls = func.join(row.constructionSchemeUrls)
- if (row.constructionSchemeUrls.length > 0) {
- var urls = []
- var split = row.constructionSchemeUrls.split(",");
- split.forEach(url => {
- var names = url.split("jczz/");
- urls.push(names[1])
- })
- row.constructionSchemeUrls = urls.join(",")
- }
- add(row).then(
- () => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- rowUpdate(row, index, done, loading) {
- if (row.constructionSchemeUrls.length > 0) {
- var urls = []
- var split = row.constructionSchemeUrls.split(",");
- split.forEach(url => {
- var names = url.split("jczz/");
- urls.push(names[1])
- })
- row.constructionSchemeUrls = urls.join(",")
- }
- update(row).then(
- () => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- });
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getPropertyCapitalApply(this.form.id).then((res) => {
- this.form = res.data.data;
- if (this.form.constructionSchemeUrls.length > 0) {
- var urls = []
- var names = this.form.constructionSchemeUrls.split(",");
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- this.form.constructionSchemeUrls = urls.join(",")
- }
- });
- }
- // con
- done();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const { dateTime } = this.query;
- let values = {
- ...params,
- };
- if (dateTime) {
- values = {
- ...params,
- startTime: dateTime[0],
- endTime: dateTime[1],
- ...this.query,
+ watch: {},
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.propertyCapitalApply_add, true),
+ viewBtn: this.vaildData(this.permission.propertyCapitalApply_view, true),
+ delBtn: this.vaildData(this.permission.propertyCapitalApply_delete, true),
+ editBtn: this.vaildData(this.permission.propertyCapitalApply_edit, true),
};
- values.dateTime = null;
- }
- this.loading = true;
- getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.data.forEach(item => {
- if (item.constructionSchemeUrls.length > 0) {
- var urls = []
- var names = item.constructionSchemeUrls.split(",");
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- item.constructionSchemeUrls = urls.join(",")
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ methods: {
+ rowSave(row, done, loading) {
+ row.constructionSchemeUrls = func.join(row.constructionSchemeUrls)
+ if (row.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var split = row.constructionSchemeUrls.split(",");
+ split.forEach(url => {
+ var names = url.split("jczz/");
+ urls.push(names[1])
+ })
+ row.constructionSchemeUrls = urls.join(",")
+ }
+ add(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
}
- })
- this.loading = false;
- this.selectionClear();
- });
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ if (row.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var split = row.constructionSchemeUrls.split(",");
+ split.forEach(url => {
+ var names = url.split("jczz/");
+ urls.push(names[1])
+ })
+ row.constructionSchemeUrls = urls.join(",")
+ }
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getPropertyCapitalApply(this.form.id).then((res) => {
+ this.form = res.data.data;
+ this.form.propertyFlag = 1;
+ if (this.form.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var names = this.form.constructionSchemeUrls.split(",");
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.constructionSchemeUrls = urls.join(",")
+ }
+ });
+ }
+ // con
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query;
+ let values = {
+ ...params,
+ };
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ };
+ values.dateTime = null;
+ }
+ this.loading = true;
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.data.forEach(item => {
+ if (item.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var names = item.constructionSchemeUrls.split(",");
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.constructionSchemeUrls = urls.join(",")
+ }
+ })
+ this.loading = false;
+ this.selectionClear();
+ });
+ }
}
- }
-};
+ };
</script>
<style>
-.avue-upload__icon {
- line-height: 6;
-}
-</style>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/work/process/maintenanceFundApply/detail.vue b/src/views/work/process/maintenanceFundApply/detail.vue
new file mode 100644
index 0000000..1083a92
--- /dev/null
+++ b/src/views/work/process/maintenanceFundApply/detail.vue
@@ -0,0 +1,325 @@
+<template>
+ <basic-container>
+ <el-form ref="form" :model="form" label-width="80px">
+ <el-row type="flex" class="row-bg" justify="end">
+ <el-form-item>
+ <el-button @click="handleCancel">关闭</el-button>
+ </el-form-item>
+ </el-row>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>审批信息</span>
+ </div>
+ <avue-form :option="option" :value="form"></avue-form>
+ <!-- <el-form-item label="申请人">
+ <el-input :disabled="true" v-model="form.flow.assigneeName" />
+ </el-form-item>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="开始时间">
+ <el-input :disabled="true" v-model="form.startTime" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="结束时间">
+ <el-input :disabled="true" v-model="form.endTime" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-form-item label="请假理由">
+ <el-input :disabled="true" type="textarea" v-model="form.reason" />
+ </el-form-item> -->
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程信息</span>
+ </div>
+ <el-row type="flex" class="row-bg">
+ <el-timeline>
+ <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
+ <el-card shadow="hover">
+ <p>{{flow.assigneeName}} 在 [{{flow.createTime}}] 开始处理 [{{flow.historyActivityName}}] 环节</p>
+ <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{flow.historyActivityDurationTime}}]</p>
+ <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p>
+ <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p>
+ </el-card>
+ </el-timeline-item>
+ </el-timeline>
+ </el-row>
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程跟踪</span>
+ </div>
+ <el-row class="row-bg">
+ <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design>
+ </el-row>
+ </el-card>
+ </el-form>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ historyFlowList,
+ leaveDetail
+ } from "@/api/work/process";
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getPropertyCapitalApply
+ } from "@/api/property/propertyCapitalApply";
+
+ export default {
+ data() {
+ return {
+ businessId: '',
+ processInstanceId: '',
+ src: '',
+ flowList: [],
+ form: {
+ flow: {
+ assigneeName: '',
+ },
+ startTime: '',
+ endTime: '',
+ reason: '',
+ },
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 1150,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 350,
+ border: true,
+ //stripe:true,
+ submitBtn: false,
+ emptyBtn: false,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [{
+ label: "小区",
+ prop: "districtId",
+ searchSpan: 5,
+ search: true,
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ span: 12,
+ labelWidth: 120,
+ width: 220,
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请选择小区",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: '维修项目名称',
+ prop: 'name',
+ searchLabelWidth: 120,
+ searchSpan: 5,
+ search: true,
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入维修项目名称",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "预计开工时间",
+ prop: "runTime",
+ span: 12,
+ labelWidth: 140,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同开始时间",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "预计竣工时间",
+ prop: "completedTime",
+ labelWidth: 140,
+ span: 12,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同结束时间",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "项目分摊方式",
+ prop: "allocationWay",
+ labelWidth: 140,
+ value: '按建筑面积分摊',
+ span: 14,
+ row: true,
+ disabled: true
+ },
+ {
+ label: '联系人',
+ prop: 'linkman',
+ span: 12,
+ labelWidth: 120,
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入联系人",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: '联系方式',
+ prop: 'linkPhone',
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入联系方式",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "项目预算总金额(元)",
+ prop: "budgetAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "实际预算金额(元)",
+ prop: "actualAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "自筹金额(元)",
+ prop: "selfAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "预算应拨付金额(元)",
+ prop: "budgetAppropriateAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "项目摘要",
+ span: 24,
+ hide: true,
+ prop: "projectDigest",
+ placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
+ labelWidth: 140,
+ type: "textarea",
+ disabled: true
+ },
+ {
+ label: "项目进度描述",
+ span: 24,
+ hide: true,
+ prop: "projectDescribe",
+ labelWidth: 140,
+ type: "textarea",
+ disabled: true
+ },
+ // {
+ // label: '施工方案附件',
+ // prop: 'constructionSchemeUrls',
+ // type: 'upload',
+ // span: 24,
+ // hide: true,
+ // labelWidth: 140,
+ // multiple: true,
+ // // showFileList: true,
+ // propsHttp: {
+ // res: 'data',
+ // name: "originalName",
+ // url: "link"
+ // },
+ // action: '/api/blade-resource/oss/endpoint/put-file-attach',
+ // rules: [{
+ // required: true,
+ // message: "请上传施工方案",
+ // trigger: "blur",
+ // }, ],
+ // }
+ ],
+ }
+ }
+ },
+ created() {
+ this.init();
+ },
+ methods: {
+ init() {
+ this.processInstanceId = this.$route.params.processInstanceId;
+ this.businessId = this.$route.params.businessId;
+ historyFlowList(this.processInstanceId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.flowList = data.data;
+ }
+ })
+ getPropertyCapitalApply(this.businessId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.form = data.data;
+ }
+ })
+ },
+ handleCancel() {
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({
+ path: `/work/start`
+ });
+ }
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/work/process/maintenanceFundApply/form.vue b/src/views/work/process/maintenanceFundApply/form.vue
new file mode 100644
index 0000000..2428fd3
--- /dev/null
+++ b/src/views/work/process/maintenanceFundApply/form.vue
@@ -0,0 +1,267 @@
+<template>
+ <div>
+ <basic-container>
+ <avue-form :option="option" v-model="form" @submit="handleSubmit" />
+ </basic-container>
+ <basic-container>
+ <flow-design :is-display="true" :process-definition-id="processDefinitionId"></flow-design>
+ </basic-container>
+ </div>
+</template>
+
+<script>
+ import {
+ leaveProcess
+ } from "@/api/work/process";
+
+ export default {
+ data() {
+ return {
+ processDefinitionId: '',
+ form: {},
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 1150,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 350,
+ border: true,
+ //stripe:true,
+ // submitBtn: false,
+ // emptyBtn: false,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [{
+ label: "小区",
+ prop: "districtId",
+ searchSpan: 5,
+ search: true,
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ span: 12,
+ labelWidth: 120,
+ width: 220,
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请选择小区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: '维修项目名称',
+ prop: 'name',
+ searchLabelWidth: 120,
+ searchSpan: 5,
+ search: true,
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入维修项目名称",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "预计开工时间",
+ prop: "runTime",
+ span: 12,
+ labelWidth: 140,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同开始时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "预计竣工时间",
+ prop: "completedTime",
+ labelWidth: 140,
+ span: 12,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同结束时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "项目分摊方式",
+ prop: "allocationWay",
+ labelWidth: 140,
+ value: '按建筑面积分摊',
+ span: 14,
+ row: true,
+ },
+ {
+ label: '联系人',
+ prop: 'linkman',
+ span: 12,
+ labelWidth: 120,
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入联系人",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: '联系方式',
+ prop: 'linkPhone',
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入联系方式",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "项目预算总金额(元)",
+ prop: "budgetAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ },
+ {
+ label: "实际预算金额(元)",
+ prop: "actualAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ },
+ {
+ label: "自筹金额(元)",
+ prop: "selfAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ },
+ {
+ label: "预算应拨付金额(元)",
+ prop: "budgetAppropriateAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ },
+ {
+ label: "项目摘要",
+ span: 24,
+ hide: true,
+ prop: "projectDigest",
+ placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
+ labelWidth: 140,
+ type: "textarea",
+ },
+ {
+ label: "项目进度描述",
+ span: 24,
+ hide: true,
+ prop: "projectDescribe",
+ labelWidth: 140,
+ type: "textarea",
+ },
+ {
+ label: '施工方案附件',
+ prop: 'constructionSchemeUrls',
+ type: 'upload',
+ span: 24,
+ hide: true,
+ labelWidth: 140,
+ multiple: true,
+ // showFileList: true,
+ propsHttp: {
+ res: 'data',
+ name: "originalName",
+ url: "link"
+ },
+ action: '/api/blade-resource/oss/endpoint/put-file-attach',
+ rules: [{
+ required: true,
+ message: "请上传施工方案",
+ trigger: "blur",
+ }, ],
+ }
+ ],
+ },
+
+ }
+ },
+ created() {
+ this.processDefinitionId = this.$route.params.processDefinitionId;
+ },
+ methods: {
+ handleSubmit(form, done, loading) {
+ form.constructionSchemeUrls = func.join(form.constructionSchemeUrls)
+ if (form.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var split = form.constructionSchemeUrls.split(",");
+ split.forEach(url => {
+ var names = url.split("jczz/");
+ urls.push(names[1])
+ })
+ form.constructionSchemeUrls = urls.join(",")
+ }
+ add(form).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ handleSubmit() {
+ const params = {
+ processDefinitionId: this.$route.params.processDefinitionId,
+ ...this.form,
+ };
+ leaveProcess(params).then(resp => {
+ const data = resp.data;
+ if (data.success) {
+ this.$message.success(data.msg);
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({
+ path: `/work/start`
+ });
+ } else {
+ this.$message.error(data.msg || '提交失败');
+ }
+ });
+ }
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/work/process/maintenanceFundApply/handle.vue b/src/views/work/process/maintenanceFundApply/handle.vue
new file mode 100644
index 0000000..ff20c8c
--- /dev/null
+++ b/src/views/work/process/maintenanceFundApply/handle.vue
@@ -0,0 +1,413 @@
+<template>
+ <basic-container>
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+ <el-row type="flex" class="row-bg" justify="end">
+ <el-form-item>
+ <el-button type="primary" @click="handleAgree">同意</el-button>
+ <el-button type="danger" @click="handleDisagree">驳回</el-button>
+ <el-button @click="handleCancel">关闭</el-button>
+ </el-form-item>
+ </el-row>
+
+
+
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>审批信息</span>
+ </div>
+ <avue-form :option="option" :value="form"></avue-form>
+ <!-- <el-form-item label="申请人">
+ <el-input :disabled="true" v-model="form.flow.assigneeName" />
+ </el-form-item>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="开始时间">
+ <el-input :disabled="true" v-model="form.startTime" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="结束时间">
+ <el-input :disabled="true" v-model="form.endTime" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-form-item label="请假理由">
+ <el-input :disabled="true" type="textarea" v-model="form.reason" />
+ </el-form-item>
+ <el-form-item label="批复意见">
+ <el-input type="textarea" v-model="form.comment" />
+ </el-form-item> -->
+ </el-card>
+
+
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程信息</span>
+ </div>
+ <el-row type="flex" class="row-bg">
+ <el-timeline>
+ <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
+ <el-card shadow="hover">
+ <p>{{flow.assigneeName}} 在 [{{flow.createTime}}] 开始处理 [{{flow.historyActivityName}}] 环节</p>
+ <p v-if="flow.historyActivityDurationTime!==''">任务历时 [{{flow.historyActivityDurationTime}}]</p>
+ <p v-if="flow.comment!==''">批复意见: [{{flow.comment}}]</p>
+ <p v-if="flow.endTime!==''">结束时间: [{{flow.endTime}}]</p>
+ </el-card>
+ </el-timeline-item>
+ </el-timeline>
+ </el-row>
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程跟踪</span>
+ </div>
+ <el-row class="row-bg">
+ <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design>
+ </el-row>
+ </el-card>
+ </el-form>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ historyFlowList,
+ leaveDetail
+ } from "@/api/work/process";
+
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getPropertyCapitalApply
+ } from "@/api/property/propertyCapitalApply";
+ import {
+ completeTask
+ } from "@/api/work/work";
+
+ export default {
+ data() {
+ return {
+ taskId: '',
+ businessId: '',
+ processInstanceId: '',
+ src: '',
+ flowList: [],
+ form: {
+ flow: {
+ assigneeName: '',
+ },
+ startTime: '',
+ endTime: '',
+ reason: '',
+ comment: '',
+ },
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 1150,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 350,
+ border: true,
+ //stripe:true,
+ submitBtn: false,
+ emptyBtn: false,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [{
+ label: "小区",
+ prop: "districtId",
+ searchSpan: 5,
+ search: true,
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ span: 12,
+ labelWidth: 120,
+ width: 220,
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请选择小区",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: '维修项目名称',
+ prop: 'name',
+ searchLabelWidth: 120,
+ searchSpan: 5,
+ search: true,
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入维修项目名称",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "预计开工时间",
+ prop: "runTime",
+ span: 12,
+ labelWidth: 140,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同开始时间",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "预计竣工时间",
+ prop: "completedTime",
+ labelWidth: 140,
+ span: 12,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同结束时间",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "项目分摊方式",
+ prop: "allocationWay",
+ labelWidth: 140,
+ value: '按建筑面积分摊',
+ span: 14,
+ row: true,
+ disabled: true
+ },
+ {
+ label: '联系人',
+ prop: 'linkman',
+ span: 12,
+ labelWidth: 120,
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入联系人",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: '联系方式',
+ prop: 'linkPhone',
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入联系方式",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "项目预算总金额(元)",
+ prop: "budgetAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "实际预算金额(元)",
+ prop: "actualAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "自筹金额(元)",
+ prop: "selfAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "预算应拨付金额(元)",
+ prop: "budgetAppropriateAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "项目摘要",
+ span: 24,
+ hide: true,
+ prop: "projectDigest",
+ placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
+ labelWidth: 140,
+ type: "textarea",
+ disabled: true
+ },
+ {
+ label: "项目进度描述",
+ span: 24,
+ hide: true,
+ prop: "projectDescribe",
+ labelWidth: 140,
+ type: "textarea",
+ disabled: true
+ }, {
+ label: "批复意见",
+ span: 24,
+ hide: true,
+ prop: "comment",
+ labelWidth: 140,
+ type: "textarea",
+ rules: [{
+ required: true,
+ message: "请输入批复意见",
+ trigger: "blur",
+ }, ],
+ },
+ // {
+ // label: '施工方案附件',
+ // prop: 'constructionSchemeUrls',
+ // type: 'upload',
+ // span: 24,
+ // hide: true,
+ // labelWidth: 140,
+ // multiple: true,
+ // // showFileList: true,
+ // propsHttp: {
+ // res: 'data',
+ // name: "originalName",
+ // url: "link"
+ // },
+ // action: '/api/blade-resource/oss/endpoint/put-file-attach',
+ // rules: [{
+ // required: true,
+ // message: "请上传施工方案",
+ // trigger: "blur",
+ // }, ],
+ // }
+ ],
+ }
+ }
+ },
+ created() {
+ this.init();
+ },
+ beforeRouteUpdate(to, from, next) {
+ // 在当前路由改变,但是该组件被复用时调用
+ // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
+ // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
+ // 可以访问组件实例 `this`
+ if (to.fullPath !== from.fullPath) {
+ next();
+ this.init();
+ }
+ },
+ methods: {
+ init() {
+ this.taskId = this.$route.params.taskId;
+ this.processInstanceId = this.$route.params.processInstanceId;
+ this.businessId = this.$route.params.businessId;
+ historyFlowList(this.processInstanceId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.flowList = data.data;
+ }
+ })
+ getPropertyCapitalApply(this.businessId).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.form = data.data;
+ }
+ })
+ },
+ handleAgree() {
+ this.form.comment = '同意'
+ if (!this.form.comment) {
+ this.$message.warning('请先填写批复意见');
+ return;
+ }
+ const params = {
+ taskId: this.taskId,
+ processInstanceId: this.processInstanceId,
+ flag: 'ok',
+ comment: this.form.comment,
+ };
+ completeTask(params).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.$message.success(data.msg);
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({
+ path: `/work/todo`
+ });
+ } else {
+ this.$message.error(data.msg || '提交失败');
+ }
+ })
+ },
+ handleDisagree() {
+ this.form.comment = '不同意'
+ if (!this.form.comment) {
+ this.$message.warning('请先填写批复意见');
+ return;
+ }
+ const params = {
+ taskId: this.taskId,
+ processInstanceId: this.processInstanceId,
+ comment: this.form.comment,
+ };
+ completeTask(params).then(res => {
+ const data = res.data;
+ if (data.success) {
+ this.$message.success(data.msg);
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({
+ path: `/work/todo`
+ });
+ } else {
+ this.$message.error(data.msg || '提交失败');
+ }
+ })
+ },
+ handleCancel() {
+ this.$router.$avueRouter.closeTag();
+ this.$router.push({
+ path: `/work/todo`
+ });
+ }
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/views/work/start.vue b/src/views/work/start.vue
index 99b5c04..d53c1fe 100644
--- a/src/views/work/start.vue
+++ b/src/views/work/start.vue
@@ -1,194 +1,203 @@
<template>
- <basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" v-model="form" ref="crud"
- @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
- @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
- <template slot="menuLeft">
- <el-radio-group v-model="mode" size="small">
- <el-radio-button label="1">通用流程</el-radio-button>
- <el-radio-button label="2">定制流程</el-radio-button>
- </el-radio-group>
- </template>
- <template slot-scope="scope" slot="menu">
- <el-button type="text" size="small" icon="el-icon-video-play" v-if="permission.work_start_flow"
- @click.stop="handleStart(scope.row)">发起
- </el-button>
- <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_start_image"
- @click.stop="handleImage(scope.row, scope.index)">流程图
- </el-button>
- </template>
- <template slot-scope="{row}" slot="tenantId">
- <el-tag>{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>
- </template>
- <template slot-scope="{row}" slot="version">
- <el-tag>v{{ row.version }}</el-tag>
- </template>
- <template slot-scope="{row}" slot="suspensionState">
- <el-tag>{{ row.suspensionState === 1 ? '激活' : '挂起' }}</el-tag>
- </template>
- <template slot-scope="{row}" slot="category">
- <el-tag>{{ row.categoryName }}</el-tag>
- </template>
- </avue-crud>
- <flow-design is-dialog :is-display.sync="flowBox" :process-definition-id="processDefinitionId"></flow-design>
- </basic-container>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" v-model="form" ref="crud"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-radio-group v-model="mode" size="small">
+ <el-radio-button label="1">通用流程</el-radio-button>
+ <el-radio-button label="2">定制流程</el-radio-button>
+ </el-radio-group>
+ </template>
+ <template slot-scope="scope" slot="menu">
+ <el-button type="text" size="small" icon="el-icon-video-play" v-if="permission.work_start_flow"
+ @click.stop="handleStart(scope.row)">发起
+ </el-button>
+ <el-button type="text" size="small" icon="el-icon-search" v-if="permission.work_start_image"
+ @click.stop="handleImage(scope.row, scope.index)">流程图
+ </el-button>
+ </template>
+ <template slot-scope="{row}" slot="tenantId">
+ <el-tag>{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>
+ </template>
+ <template slot-scope="{row}" slot="version">
+ <el-tag>v{{ row.version }}</el-tag>
+ </template>
+ <template slot-scope="{row}" slot="suspensionState">
+ <el-tag>{{ row.suspensionState === 1 ? '激活' : '挂起' }}</el-tag>
+ </template>
+ <template slot-scope="{row}" slot="category">
+ <el-tag>{{ row.categoryName }}</el-tag>
+ </template>
+ </avue-crud>
+ <flow-design is-dialog :is-display.sync="flowBox" :process-definition-id="processDefinitionId"></flow-design>
+ </basic-container>
</template>
<script>
-import { mapGetters } from "vuex"
-import { startList } from "@/api/work/work"
-import { flowCategory, flowRoute } from "@/util/flow"
+ import {
+ mapGetters
+ } from "vuex"
+ import {
+ startList
+ } from "@/api/work/work"
+ import {
+ flowCategory,
+ flowRoute
+ } from "@/util/flow"
-export default {
- data () {
- return {
- form: {},
- mode: '1',
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
+ export default {
+ data() {
+ return {
+ form: {},
+ mode: '1',
+ selectionId: '',
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ processDefinitionId: '',
+ flowBox: false,
+ workBox: false,
+ option: {
+ height: 'auto',
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ menuWidth: 280,
+ dialogWidth: 900,
+ dialogClickModal: false,
+ column: [{
+ label: '租户编号',
+ prop: 'tenantId',
+ slot: true,
+ width: 120,
},
- processDefinitionId: '',
- flowBox: false,
- workBox: false,
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- menuWidth: 280,
- dialogWidth: 900,
- dialogClickModal: false,
- column: [
- {
- label: '租户编号',
- prop: 'tenantId',
- slot: true,
- width: 120,
- },
- {
- label: "流程分类",
- type: "select",
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- width: 100,
- },
- {
- label: '流程标识',
- prop: 'key',
- },
- {
- label: '流程名称',
- prop: 'name',
- search: true,
- },
- {
- label: '流程版本',
- prop: 'version',
- slot: true,
- width: 80,
- },
- {
- label: '状态',
- prop: 'suspensionState',
- slot: true,
- width: 80,
- },
- {
- label: '部署时间',
- prop: 'deploymentTime',
- width: 165,
- },
- ]
+ {
+ label: "流程分类",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ width: 100,
},
- data: []
- }
+ {
+ label: '流程标识',
+ prop: 'key',
+ },
+ {
+ label: '流程名称',
+ prop: 'name',
+ search: true,
+ },
+ {
+ label: '流程版本',
+ prop: 'version',
+ slot: true,
+ width: 80,
+ },
+ {
+ label: '状态',
+ prop: 'suspensionState',
+ slot: true,
+ width: 80,
+ },
+ {
+ label: '部署时间',
+ prop: 'deploymentTime',
+ width: 165,
+ },
+ ]
+ },
+ data: []
+ }
},
watch: {
- 'mode' () {
- this.onLoad(this.page)
- }
+ 'mode'() {
+ this.onLoad(this.page)
+ }
},
computed: {
- ...mapGetters(["permission", "flowRoutes"]),
- ids () {
- let ids = []
- this.selectionList.forEach(ele => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
+ ...mapGetters(["permission", "flowRoutes"]),
+ ids() {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
},
methods: {
- searchReset () {
- this.query = {}
- this.onLoad(this.page)
- },
- searchChange (params, done) {
- this.query = params
- this.page.currentPage = 1
- this.onLoad(this.page, params)
- done()
- },
- selectionChange (list) {
- this.selectionList = list
- },
- selectionClear () {
- this.selectionList = []
- this.$refs.crud.toggleSelection()
- },
- handleStart (row) {
- this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}` })
- },
- handleImage (row) {
- this.processDefinitionId = row.id
- this.flowBox = true
- },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- const query = {
- ...this.query,
- category: (params.category) ? flowCategory(params.category) : null,
- mode: this.mode
- }
- this.loading = true
- startList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data
- this.page.total = data.total
- this.data = data.records
- this.loading = false
- this.selectionClear()
- })
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleStart(row) {
+ // console.log("+++++++++++++++++" + `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`)
+ this.$router.push({
+ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`
+ })
+ },
+ handleImage(row) {
+ this.processDefinitionId = row.id
+ this.flowBox = true
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const query = {
+ ...this.query,
+ category: (params.category) ? flowCategory(params.category) : null,
+ mode: this.mode
}
+ this.loading = true
+ startList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.loading = false
+ this.selectionClear()
+ })
+ }
}
-}
-</script>
+ }
+</script>
\ No newline at end of file
--
Gitblit v1.9.3