Merge pull request 'master' (#403) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/403
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules" label-position="top">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="label" prop="attachment">
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
|
||||
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="processViewer" :tableConfig="tableConfig"
|
||||
:data="_value" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
<el-form :label-position="labelAlign">
|
||||
<el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign">
|
||||
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="processViewer" :tableConfig="tableConfig"
|
||||
:data="_value" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -35,6 +37,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
labelAlign: {
|
||||
type: String,
|
||||
default: 'left'
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['update:value'])
|
||||
const tableConfig = reactive({
|
||||
|
||||
@@ -40,6 +40,21 @@ const router = createRouter({
|
||||
name: 'shareDetailMobile',
|
||||
component: () => import('@/views/project-management/mobledetail/ShareDetailMobile.vue')
|
||||
},
|
||||
{
|
||||
path: '/projectDemand/requirement/moblie',
|
||||
name: 'projectDemandRequirementMoblie',
|
||||
component: () => import('@/views/project-demand/requirement/moblieDetail/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/expenseManagement/share/moblie',
|
||||
name: 'expenseManagementMoblie',
|
||||
component: () => import('@/views/expense-management/share/moblieDetail/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/phase/detail/moblie',
|
||||
name: 'phaseDetailMoblie',
|
||||
component: () => import('@/views/project-management/phaseDetailMoblie/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
name: 'layout',
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true" border
|
||||
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
|
||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||
<el-table-column prop="projectName" label="项目名称" align="center"/>
|
||||
<el-table-column prop="projectCost" label="费用性质" align="center">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.projectCost !== null">
|
||||
<Tag dictType="project_cost" :value="scope.row.projectCost"/>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="项目阶段" align="center">
|
||||
<template #default="scope">
|
||||
<div
|
||||
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">
|
||||
<Tag dictType="research_stage" :value="scope.row.researchStage"/>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="afterTax" label="分摊金额" align="center">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.afterTax !== null">
|
||||
<!-- {{ toThousands(scope.row.afterTax) }}-->
|
||||
{{ scope.row.afterTax }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {getAllocationSummaryDetails} from "@/api/expense-manage";
|
||||
|
||||
const tableData = ref([{
|
||||
id: '12987122',
|
||||
name: 'Tom',
|
||||
amount1: '234',
|
||||
amount2: '3.2',
|
||||
amount3: 10,
|
||||
},
|
||||
{
|
||||
id: '12987123',
|
||||
name: 'Tom',
|
||||
amount1: '165',
|
||||
amount2: '4.43',
|
||||
amount3: 12,
|
||||
}])
|
||||
const loading = ref(false)
|
||||
const table = ref()
|
||||
const route = useRoute()
|
||||
const getSummaries = (param) => {
|
||||
const {columns, data} = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '小计'
|
||||
} else if (index === 4) {
|
||||
const values = data.map((item) => Number(item[column.property]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
sums[index] = `${values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)}`
|
||||
// sums[index] = toThousands(sums[index])
|
||||
} else {
|
||||
sums[index] = '-'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
const exportTable = () => {
|
||||
const $e = table.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目费用分摊表",2)
|
||||
}
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
let params = {
|
||||
allocationId: route.query.id
|
||||
}
|
||||
getAllocationSummaryDetails(params).then(res => {
|
||||
tableData.value = res.data
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<div style="width: 375px; overflow-x: scroll;">
|
||||
<el-table ref="reportTable" :data="tableData" style="width: 100%;height: 479px"
|
||||
:span-method="objectSpanMethod" v-loading="loading">
|
||||
<!-- <el-table-column label="四川省国有资产经营投资管理有限责任公司-->
|
||||
<!-- 科技创新项目人工成本分摊明细表" align="center">-->
|
||||
<el-table-column v-for="column in columnInfo" :prop="column.prop" :label="column.label" align="center">
|
||||
<template #default="scope">
|
||||
<template v-if="column.children">
|
||||
<el-table-column v-for="childColumn in column.children"
|
||||
:prop="column.prop + '.'+ childColumn.prop"
|
||||
:label="childColumn.label"
|
||||
:width="childColumn.prop === 'subtotal' ? 160 : 130">
|
||||
<template #default="columnScope">
|
||||
<template v-if="(tableData.length -1) !== columnScope.$index">
|
||||
{{
|
||||
columnScope.row[column.prop][childColumn.prop] ? columnScope.row[column.prop][childColumn.prop] : '/'
|
||||
}}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ columnScope.row[column.prop][childColumn.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--分摊金额合计与分摊金额总计计算-->
|
||||
<template
|
||||
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length -1) !== scope.$index">
|
||||
{{ getTotalSeparation(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template
|
||||
v-else-if="(tableData.length -1) === scope.$index && (column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost')">
|
||||
{{ getTotalSummary(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row[column.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser, getAllocationDetails} from "@/api/expense-manage";
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const tableIns = ref()
|
||||
const reportTable = ref({});
|
||||
const columnInfo = ref([])
|
||||
const monthConcat = new Map()
|
||||
const tableData = ref([])
|
||||
const loading = ref(false)
|
||||
const researchOptions = ref([])
|
||||
|
||||
const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => {
|
||||
if (columnIndex === 0) {
|
||||
if (monthConcat.has(rowIndex)) {
|
||||
return {
|
||||
rowspan: monthConcat.get(rowIndex),
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let length = Object.keys(row).length
|
||||
console.log(length)
|
||||
if (length > 5) {
|
||||
if (concatColumn(columnIndex, length, rowIndex)) {
|
||||
if (rowIndex % 5 === 0) {
|
||||
return {
|
||||
rowspan: 5,
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSeparation = (row, prop) => {
|
||||
let totalSeparation = 0.00
|
||||
for (let key of Object.keys(row)) {
|
||||
if (key.startsWith('personInfo')) {
|
||||
let value = prop === 'totalSeparation' ? (row[key].separationAmount ? row[key].separationAmount : 0) : row[key].subtotal
|
||||
if ("/" !== value) {
|
||||
try {
|
||||
totalSeparation += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (totalSeparation !== 0) {
|
||||
return totalSeparation.toFixed(2);
|
||||
} else {
|
||||
return "/"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSummary = (row, prop) => {
|
||||
let key;
|
||||
if (prop === 'totalSeparation') {
|
||||
key = 'separationAmount'
|
||||
} else {
|
||||
key = 'subtotal'
|
||||
}
|
||||
let result = 0
|
||||
for (const rowKey of Object.keys(row)) {
|
||||
if (rowKey.startsWith('personInfo')) {
|
||||
let value = row[rowKey][key]
|
||||
if (value && "/" !== value) {
|
||||
try {
|
||||
result += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toFixed(2);
|
||||
}
|
||||
|
||||
const concatColumn = (columnIndex, length, rowIndex) => {
|
||||
if (rowIndex === tableData.value.length - 1) {
|
||||
return false
|
||||
}
|
||||
let columnLength = 5 + (length - 5) * 5
|
||||
if (columnIndex === 1
|
||||
|| columnIndex === columnLength - 1) {
|
||||
return true;
|
||||
}
|
||||
for (let i = 0; i < length - 5; i++) {
|
||||
if (columnIndex === 4 + (i * 5)
|
||||
|| columnIndex === 5 + (i * 5)
|
||||
|| columnIndex === 7 + (i * 5)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
getAllocationDetails(route.query.id).then(res => {
|
||||
if(res.code!==1000){
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
columnInfo.value = res.data.columns
|
||||
let tableDataLet = res.data.tableData;
|
||||
let personInfoKey = []
|
||||
columnInfo.value.forEach(item => {
|
||||
if (item.prop.startsWith('personInfo')) {
|
||||
personInfoKey.push(item.prop)
|
||||
}
|
||||
})
|
||||
tableData.value = []
|
||||
let rowIndex = 0;
|
||||
let summary = {
|
||||
month: "",
|
||||
salaryType: '',
|
||||
projectName: "合计",
|
||||
totalSeparation: 10,
|
||||
totalSeparationCost: 10
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key] = {
|
||||
researchDuration: "",
|
||||
separationAmount: 0,
|
||||
subtotal: 0,
|
||||
wagesPayable: "",
|
||||
workday: "",
|
||||
}
|
||||
}
|
||||
tableDataLet.forEach((tableDatum) => {
|
||||
let rowspan = tableDatum.rows.length * 5
|
||||
monthConcat.set(rowIndex, rowspan)
|
||||
rowIndex += rowspan
|
||||
for (const tableDatumElement of tableDatum.rows) {
|
||||
tableData.value = tableData.value.concat(tableDatumElement)
|
||||
let row = tableDatumElement[0]
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].subtotal && '/' !== row[key].subtotal) {
|
||||
summary[key].subtotal += parseFloat(row[key].subtotal)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
for (const row of tableData.value) {
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].separationAmount && '/' !== row[key].separationAmount) {
|
||||
summary[key].separationAmount += parseFloat(row[key].separationAmount)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key].subtotal = summary[key].subtotal.toFixed(2)
|
||||
summary[key].separationAmount = summary[key].separationAmount.toFixed(2)
|
||||
}
|
||||
monthConcat.set(rowIndex, 1)
|
||||
tableData.value.push(summary)
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const search = (val) => {
|
||||
tableConfig.params = {
|
||||
allocationId: route.query.id,
|
||||
...val
|
||||
}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
getResearchOptions()
|
||||
init()
|
||||
|
||||
|
||||
const exportTable = () => {
|
||||
const $e = reportTable.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
||||
}
|
||||
</script>
|
||||
138
src/views/expense-management/share/moblieDetail/index.vue
Normal file
138
src/views/expense-management/share/moblieDetail/index.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px;">
|
||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分摊名称">
|
||||
<span>{{ formData.shareName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分摊月份">
|
||||
<span>{{ formData.apportionmentMonth }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="分摊明细" name="first">
|
||||
<ExpenseDetailMoblie/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分摊汇总" name="second" v-loading="loading">
|
||||
<AllocationSummaryDetailMoblie/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-if="shareData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render
|
||||
v-if="shareProcessViewer&& shareData.operationList && shareData.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="shareData.operationList"
|
||||
:state="shareData.state"/>
|
||||
<process-diagram-viewer v-if="shareProcessViewer&&changeDiagram" id-name="shareProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
<opinion v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId"
|
||||
v-model:value="auditOpinion"></opinion>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getAllocationDetail} from "@/api/expense-manage";
|
||||
import AllocationSummaryDetailMoblie from './AllocationSummaryDetailMoblie.vue'
|
||||
import ExpenseDetailMoblie from './ExpenseDetailMoblie.vue'
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const shareData = ref({})
|
||||
const formData = ref({})
|
||||
const auditOpinion = ref('')
|
||||
const shareProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const activeName = ref('first')
|
||||
// const activeName = ref('second')
|
||||
|
||||
const getDetail = async () => {
|
||||
const id = route.query.id
|
||||
shareProcessViewer.value = false
|
||||
const {code, data, msg} = await getAllocationDetail(id)
|
||||
if (code === 1000) {
|
||||
shareData.value = data
|
||||
formData.value = data.formData
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
shareProcessViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleClick = (tab) => {
|
||||
if (tab.index == 0) {
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table--fit ) {
|
||||
width: 100%;
|
||||
height: 479px !important;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
//background-color: #DED0B2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="type==='singleDetail'">
|
||||
<el-form-item label="征集名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="type==='singleDetail'">
|
||||
<el-form-item label="所属公司">
|
||||
<span :class="showExpendClass(showMoreCompany,formData.companyIds)">{{
|
||||
getCompanyName(formData.companyIds)
|
||||
}}</span>
|
||||
<div style="color: #2a99ff;text-align: center;width: 100%;font-size: 15px;cursor: pointer"
|
||||
@click="handleExpend">{{ showExpendText }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<file-component title="" tag="需求征集"
|
||||
v-model:value="formData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="collectionProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const showExpendText = ref('')
|
||||
const showMoreCompany = ref(false)
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
companyOption: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const changeDiagram = ref(false)
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const getCompanyName = (data) => {
|
||||
if (data) {
|
||||
return data.join(',')
|
||||
}
|
||||
}
|
||||
const handleExpend = () => {
|
||||
showMoreCompany.value = !showMoreCompany.value;
|
||||
showExpendClass(showMoreCompany.value, props.formData.companyIds)
|
||||
}
|
||||
const showExpendClass = (showMoreCompany, data) => {
|
||||
if (!showMoreCompany) {
|
||||
if (data && data.length > 14) {
|
||||
showExpendText.value = '展开'
|
||||
return 'company-style'
|
||||
}
|
||||
} else {
|
||||
showExpendText.value = '收缩'
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.company-style {
|
||||
//width: 98%;
|
||||
min-height: 30px;
|
||||
max-height: 60px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from 'element-plus';
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const form = ref()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '',
|
||||
prop: 'auditOpinion',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入审核意见',
|
||||
type: 'textarea',
|
||||
rows: 3
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const back = () => {
|
||||
switch (route.name) {
|
||||
case 'Initiation/detail':
|
||||
router.push({name: 'Initiation'})
|
||||
break;
|
||||
case 'Filing/detail':
|
||||
router.push({name: 'Filing'})
|
||||
break;
|
||||
case 'Implementation/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
if (route.query.step === '10') {
|
||||
router.push({name: 'Summary'})
|
||||
} else if (route.query.step === '20') {
|
||||
router.push({name: 'Initiation'})
|
||||
} else if (route.query.step === '40') {
|
||||
router.push({name: 'Implementation'})
|
||||
} else if (route.query.step === '50') {
|
||||
router.push({name: 'Filing'})
|
||||
} else if (route.query.step === '00') {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'Summary/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Summary'})
|
||||
}
|
||||
break;
|
||||
case 'Requirement/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
break;
|
||||
case 'Fund/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Fund'})
|
||||
}
|
||||
break;
|
||||
case 'Share/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Expense/share'})
|
||||
}
|
||||
break;
|
||||
case 'Phase/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Implementation'})
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
const handleReject = async () => {
|
||||
// const values = form.value.getValues()
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
// ...values
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
// console.log('params', params)
|
||||
const res = await rejectTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
}
|
||||
|
||||
const handleAgree = async () => {
|
||||
// const values = form.value.getValues()
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
formData: props.formData,
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
const res = await agreeTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
141
src/views/project-demand/requirement/moblieDetail/index.vue
Normal file
141
src/views/project-demand/requirement/moblieDetail/index.vue
Normal file
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px;">
|
||||
<baseTitle title="需求征集详情"></baseTitle>
|
||||
<CollectionDetailMoblie :formData="collectData.formData" :data="collectData" type="singleDetail"
|
||||
:fileListShow="fileListShow"
|
||||
:processViewer="processViewer" :loading="loading" v-model:value="auditOpinion"/>
|
||||
<OpinionMoblie v-if="collectData.taskId" :formData="formData" :taskId="collectData.taskId" v-model:value="auditOpinion"></OpinionMoblie>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useProcessStore} from '@/stores/processStore.js'
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import {matterTree} from "@/utils/matterTree";
|
||||
import CollectionDetailMoblie from './CollectionDetailMoblie.vue'
|
||||
import OpinionMoblie from './OpinionMoblie.vue'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const form = ref();
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const specialFundOption = ref([])
|
||||
const processInstanceData = ref({})
|
||||
const fileListShow = ref("READ")
|
||||
const showTable = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const processViewer = ref(false)
|
||||
const processTree = ref()
|
||||
const collectData = ref([])
|
||||
const formData = ref({})
|
||||
const companyOption = ref([])
|
||||
const companyNameArray = ref([])
|
||||
const getFundOptions = async () => {
|
||||
const res = await getFundOption()
|
||||
specialFundOption.value = res.data
|
||||
}
|
||||
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const getCompanyOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, companyOption.value, item)
|
||||
})
|
||||
}
|
||||
return companyNameArray.value
|
||||
}
|
||||
const init = async () => {
|
||||
if (!route.query.id) return;
|
||||
await getFundOptions()
|
||||
await getCompanyOption()
|
||||
getInfo(route.query.id).then(res => {
|
||||
if (res.code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
loading.value = false
|
||||
let data = res.data
|
||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||
collectData.value = data
|
||||
formData.value = data.formData;
|
||||
if (data.formData.specialFund) {
|
||||
specialFundOption.value.forEach(item => {
|
||||
if (data.formData.specialFund == item.value) {
|
||||
data.formData.specialFund = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processViewer.value = true
|
||||
showTable.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
loading.value = true
|
||||
await init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
|
||||
.detail-block {
|
||||
overflow: hidden;
|
||||
padding-right: 10px;
|
||||
|
||||
//.info {
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
//
|
||||
// > div {
|
||||
// width: 350px;
|
||||
// margin-bottom: 15px;
|
||||
// margin-right: 10px;
|
||||
//
|
||||
// > span:first-child {
|
||||
// color: black;
|
||||
// font-size: 16px;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//.approval-record {
|
||||
// padding-bottom: 30px;
|
||||
//
|
||||
// .process {
|
||||
// position: relative;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -2,9 +2,14 @@
|
||||
<div v-loading="loading">
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
|
||||
v-model:value="formData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
<file-component
|
||||
:title="getTagName(type)+'附件'"
|
||||
:tag="getTagName(type)"
|
||||
v-model:value="formData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-form>
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
|
||||
@@ -132,9 +132,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<file-component title="需求上报附件" tag="需求上报"
|
||||
v-model:value="localFormData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
<file-component
|
||||
title="需求上报附件"
|
||||
tag="需求上报"
|
||||
v-model:value="localFormData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="data.taskId">
|
||||
|
||||
@@ -1,51 +1,53 @@
|
||||
<template>
|
||||
<StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
|
||||
:reportType="route.query.id==='-1'?'direct':''">
|
||||
<template #content>
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-show="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
<div style="padding: 0 10px;">
|
||||
<StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
|
||||
:reportType="route.query.id==='-1'?'direct':''">
|
||||
<template #content>
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-show="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval"
|
||||
v-if="showActive == '20'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="execute"
|
||||
v-if="showActive == '40'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist"
|
||||
v-show="showActive == '50'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply-moblie :title="applyTitle"
|
||||
v-if="editShow"
|
||||
:mode="mode"
|
||||
:step="showActive"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval"
|
||||
v-if="showActive == '20'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="execute"
|
||||
v-if="showActive == '40'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist"
|
||||
v-show="showActive == '50'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply-moblie :title="applyTitle"
|
||||
v-if="editShow"
|
||||
:mode="mode"
|
||||
:step="showActive"
|
||||
:data="detailData"
|
||||
:formData="detailData.formData"/>
|
||||
</template>
|
||||
</StepsMoblie>
|
||||
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
v-model:value="auditOpinion"/>
|
||||
:formData="detailData.formData"/>
|
||||
</template>
|
||||
</StepsMoblie>
|
||||
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
v-model:value="auditOpinion"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<file-component
|
||||
:title="getTagName(type)+'附件'"
|
||||
:tag="getTagName(type)"
|
||||
v-model:value="formData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-form>
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElLoading} from 'element-plus';
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
companyOption: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: 'READ'
|
||||
},
|
||||
// approval 立项, execute 实施, 归档 archivist
|
||||
type: {
|
||||
type: String,
|
||||
default: 'approval'
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
idName: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const form = ref()
|
||||
const schema = computed(() => {
|
||||
let arr
|
||||
if (props.type == 'approval') {
|
||||
arr = [
|
||||
{
|
||||
label: '前置流程',
|
||||
prop: 'preProcess',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.preProcess ? props.formData.preProcess.map(item => {
|
||||
return <span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
href={props.formData.preProcessBaseUrl + item.requestId}>{item.requestName}</a> </span>
|
||||
}) : <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目立项附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else if (props.type == 'execute') {
|
||||
arr = [
|
||||
{
|
||||
label: '前置流程',
|
||||
prop: 'preProcess',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.preProcess ? props.formData.preProcess.map(item => {
|
||||
return <span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
href={props.formData.preProcessBaseUrl + item.requestId}>{item.requestName}</a> </span>
|
||||
}) : <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目验收附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else if (props.type == 'archivist') {
|
||||
arr = [
|
||||
{
|
||||
label: '项目归档附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else if (props.type == 'phase') {
|
||||
arr = [
|
||||
{
|
||||
label: '阶段变更附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
}
|
||||
return arr
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
|
||||
const getTagName = (type) => {
|
||||
switch (type) {
|
||||
case 'approval':
|
||||
return '项目立项'
|
||||
case 'execute':
|
||||
return '项目实施'
|
||||
case 'archivist':
|
||||
return '项目归档'
|
||||
case 'phase':
|
||||
return '阶段变更'
|
||||
}
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
watchEffect(() => {
|
||||
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
|
||||
})
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
96
src/views/project-management/phaseDetailMoblie/index.vue
Normal file
96
src/views/project-management/phaseDetailMoblie/index.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px; box-sizing: border-box;">
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<baseTitle title="阶段变更详情"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px">抄送人:{{copyName}}</div>
|
||||
<ApprovalDetailMoblie :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" v-model:value="auditOpinion"></opinion>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getPhaseDetail} from "@/api/project-manage";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import ApprovalDetailMoblie from './ApprovalDetailMoblie.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const copyName = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
baseForm.value.setValues(data)
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
const projectId = route.query.projectId
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList?.map(item=>item.name).join(',')
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
summaryData.value = []
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -16,6 +16,7 @@ import { useTagsView } from '@/stores/tagsview.js'
|
||||
import { useAuthStore } from '@/stores/userstore.js'
|
||||
import { useCacheStore } from "@/stores/cache.js";
|
||||
import { getDeptOpt, getSubCompOpt, getRolesOpt, getJobOpt, getUserDetail } from '@/api/user/user.js'
|
||||
import { onBeforeMount } from 'vue';
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const authStore = useAuthStore()
|
||||
@@ -183,22 +184,17 @@ const getInstance = (e) => {
|
||||
}
|
||||
|
||||
const init = async () => {
|
||||
const { data } = await getDeptOpt()
|
||||
localData.departmentIdOpt = data
|
||||
const res = await getSubCompOpt()
|
||||
localData.subCompanyIdOpt = res.data
|
||||
const roleRes = await getRolesOpt()
|
||||
localData.roleOpt = roleRes.data
|
||||
const jobRes = await getJobOpt()
|
||||
localData.jobOpt = jobRes.data
|
||||
// const reqList = [
|
||||
// getDeptOpt(),
|
||||
// getSubCompOpt(),
|
||||
// getRolesOpt(),
|
||||
// getJobOpt()
|
||||
// ]
|
||||
// const resAll = await Promise.all(reqList)
|
||||
// console.log("🚀 ~ init ~ resAll:", resAll)
|
||||
const reqList = [
|
||||
getDeptOpt(),
|
||||
getSubCompOpt(),
|
||||
getRolesOpt(),
|
||||
getJobOpt()
|
||||
]
|
||||
const resAll = await Promise.all(reqList)
|
||||
localData.departmentIdOpt = resAll[0].data
|
||||
localData.subCompanyIdOpt = resAll[1].data
|
||||
localData.roleOpt = resAll[2].data
|
||||
localData.jobOpt = resAll[3].data
|
||||
}
|
||||
|
||||
const getInfo = async () => {
|
||||
@@ -209,7 +205,9 @@ const getInfo = async () => {
|
||||
const res = await getDeptOpt({subCompanyId: data.subCompanyId})
|
||||
localData.departmentIdOpt = res.data
|
||||
}
|
||||
form.value.setValues(data)
|
||||
nextTick(()=>{
|
||||
form.value.setValues(data)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user