Merge remote-tracking branch 'origin/master'
# Conflicts: # src/views/expense-management/share/add.vue
This commit is contained in:
@@ -25,9 +25,9 @@ steps:
|
|||||||
- npm -v
|
- npm -v
|
||||||
- mkdir -p ./node_modules
|
- mkdir -p ./node_modules
|
||||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||||
- npm config set registry https://registry.npmmirror.com
|
# - npm config set registry https://registry.npmmirror.com
|
||||||
- set NODE_OPTIONS=--openssl-legacy-provider
|
# - set NODE_OPTIONS=--openssl-legacy-provider
|
||||||
- npm install
|
# - npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
- ls /app/build/$DRONE_REPO_NAME/
|
- ls /app/build/$DRONE_REPO_NAME/
|
||||||
- echo $NODE_MODULES_PATH
|
- echo $NODE_MODULES_PATH
|
||||||
|
|||||||
@@ -145,3 +145,16 @@ export const getPreProcess= () => {
|
|||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const updateLedger = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/expense/ledger/replenishment',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const searchUpdateLedgerData = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/mosr/expense/ledger/${projectId}`,
|
||||||
|
method: "get"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function getDepartmentTree() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getMosrDept(params) {
|
export function getMosrUser(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/admin/mosr/user/choose',
|
url: '/admin/mosr/user/choose',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
<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"
|
<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'}">
|
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
|
||||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||||
<el-table-column prop="projectName" label="项目名称" align="center"/>
|
<el-table-column prop="projectName" label="项目名称" align="center"/>
|
||||||
@@ -24,7 +24,8 @@
|
|||||||
<el-table-column prop="afterTax" label="分摊金额" align="center">
|
<el-table-column prop="afterTax" label="分摊金额" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.afterTax !== null">
|
<div v-if="scope.row.afterTax !== null">
|
||||||
{{ toThousands(scope.row.afterTax) }}
|
<!-- {{ toThousands(scope.row.afterTax) }}-->
|
||||||
|
{{ scope.row.afterTax }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -70,7 +71,7 @@ const getSummaries = (param) => {
|
|||||||
return prev
|
return prev
|
||||||
}
|
}
|
||||||
}, 0)}`
|
}, 0)}`
|
||||||
sums[index] = toThousands(sums[index])
|
// sums[index] = toThousands(sums[index])
|
||||||
} else {
|
} else {
|
||||||
sums[index] = '-'
|
sums[index] = '-'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,15 +14,27 @@
|
|||||||
:label="childColumn.label"
|
:label="childColumn.label"
|
||||||
:width="childColumn.prop === 'subtotal' ? 160 : 130">
|
:width="childColumn.prop === 'subtotal' ? 160 : 130">
|
||||||
<template #default="columnScope">
|
<template #default="columnScope">
|
||||||
{{ columnScope.row[column.prop][childColumn.prop] }}
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
<!--分摊金额合计与分摊金额总计计算-->
|
||||||
<template
|
<template
|
||||||
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length- 1) !== scope.$index">
|
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length -1) !== scope.$index">
|
||||||
{{ getTotalSeparation(scope.row, column.prop) }}
|
{{ getTotalSeparation(scope.row, column.prop) }}
|
||||||
</template>
|
</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>
|
<template v-else>
|
||||||
{{ scope.row[column.prop] }}
|
{{ scope.row[column.prop] }}
|
||||||
</template>
|
</template>
|
||||||
@@ -33,12 +45,10 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
|
||||||
import {getResearchUser, getAllocationDetailList, getAllocationDetails} from "@/api/expense-manage";
|
|
||||||
import {ElNotification} from "element-plus";
|
|
||||||
import {exportExcel} from "@/utils/export-excel";
|
|
||||||
|
|
||||||
import {toThousands} from '@/utils/changePrice.js'
|
<script setup lang="jsx">
|
||||||
|
import {getResearchUser, getAllocationDetails} from "@/api/expense-manage";
|
||||||
|
import {exportExcel} from "@/utils/export-excel";
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const tableIns = ref()
|
const tableIns = ref()
|
||||||
@@ -49,93 +59,6 @@ const tableData = ref([])
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const researchOptions = ref([])
|
const researchOptions = ref([])
|
||||||
|
|
||||||
// const getSummaries = (param) => {
|
|
||||||
// const {columns, data} = param
|
|
||||||
// const sums = []
|
|
||||||
// columns.forEach((column, index) => {
|
|
||||||
// if (index === 1) {
|
|
||||||
// sums[index] = '合计'
|
|
||||||
// }
|
|
||||||
// // else if (index == (columns.length - 1)) {//分摊金额总计
|
|
||||||
// // const values = data.map((item) => {
|
|
||||||
// // // Number()
|
|
||||||
// // console.log('column.property',column.property)
|
|
||||||
// // console.log('item]',item)
|
|
||||||
// // })
|
|
||||||
// // 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] = '-'
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// // else if (index == (columns.length - 2)) {//分摊金额合计
|
|
||||||
// // const values = data.map((item) => Number(item[column.property]))
|
|
||||||
// // console.log('values',values)
|
|
||||||
// // 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] = '-'
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// const parts = column.property.split('.');
|
|
||||||
// if (column.property.startsWith('personInfo') && parts[1] === 'separationAmount') {
|
|
||||||
// console.log('column',column,index)
|
|
||||||
// const values = data.map((item) => {
|
|
||||||
// // console.log('parts[0]',parts)
|
|
||||||
// // console.log(item[parts[0]])
|
|
||||||
// })
|
|
||||||
// // console.log('values',values)
|
|
||||||
// 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] = '-'
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// if (column.property.startsWith('personInfo') && parts[1] === 'subtotal') {
|
|
||||||
// const values = data.map((item) => Number(item[parts[0]].subtotal))
|
|
||||||
// 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 objectSpanMethod = ({row, column, rowIndex, columnIndex}) => {
|
const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
if (monthConcat.has(rowIndex)) {
|
if (monthConcat.has(rowIndex)) {
|
||||||
@@ -151,8 +74,9 @@ const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let length = Object.keys(row).length
|
let length = Object.keys(row).length
|
||||||
|
console.log(length)
|
||||||
if (length > 5) {
|
if (length > 5) {
|
||||||
if (concatColumn(columnIndex, length)) {
|
if (concatColumn(columnIndex, length, rowIndex)) {
|
||||||
if (rowIndex % 5 === 0) {
|
if (rowIndex % 5 === 0) {
|
||||||
return {
|
return {
|
||||||
rowspan: 5,
|
rowspan: 5,
|
||||||
@@ -174,7 +98,7 @@ const getTotalSeparation = (row, prop) => {
|
|||||||
let totalSeparation = 0.00
|
let totalSeparation = 0.00
|
||||||
for (let key of Object.keys(row)) {
|
for (let key of Object.keys(row)) {
|
||||||
if (key.startsWith('personInfo')) {
|
if (key.startsWith('personInfo')) {
|
||||||
let value = prop === 'totalSeparation' ? row[key].separationAmount : row[key].subtotal
|
let value = prop === 'totalSeparation' ? (row[key].separationAmount ? row[key].separationAmount : 0) : row[key].subtotal
|
||||||
if ("/" !== value) {
|
if ("/" !== value) {
|
||||||
try {
|
try {
|
||||||
totalSeparation += parseFloat(value)
|
totalSeparation += parseFloat(value)
|
||||||
@@ -190,7 +114,33 @@ const getTotalSeparation = (row, prop) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const concatColumn = (columnIndex, length) => {
|
|
||||||
|
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
|
let columnLength = 5 + (length - 5) * 5
|
||||||
if (columnIndex === 1
|
if (columnIndex === 1
|
||||||
|| columnIndex === columnLength - 1) {
|
|| columnIndex === columnLength - 1) {
|
||||||
@@ -205,22 +155,69 @@ const concatColumn = (columnIndex, length) => {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
getAllocationDetails(route.query.id).then(res => {
|
getAllocationDetails(route.query.id).then(res => {
|
||||||
columnInfo.value = res.data.columns
|
columnInfo.value = res.data.columns
|
||||||
let tableDataLet = res.data.tableData;
|
let tableDataLet = res.data.tableData;
|
||||||
|
let personInfoKey = []
|
||||||
|
columnInfo.value.forEach(item => {
|
||||||
|
if (item.prop.startsWith('personInfo')) {
|
||||||
|
personInfoKey.push(item.prop)
|
||||||
|
}
|
||||||
|
})
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
let rowIndex = 0;
|
let rowIndex = 0;
|
||||||
tableDataLet.forEach((tableDatum, index) => {
|
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
|
let rowspan = tableDatum.rows.length * 5
|
||||||
monthConcat.set(rowIndex, rowspan)
|
monthConcat.set(rowIndex, rowspan)
|
||||||
rowIndex += rowspan
|
rowIndex += rowspan
|
||||||
for (const tableDatumElement of tableDatum.rows) {
|
for (const tableDatumElement of tableDatum.rows) {
|
||||||
tableData.value = tableData.value.concat(tableDatumElement)
|
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
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -229,17 +226,6 @@ const getResearchOptions = async () => {
|
|||||||
const res = await getResearchUser()
|
const res = await getResearchUser()
|
||||||
researchOptions.value = res.data
|
researchOptions.value = res.data
|
||||||
}
|
}
|
||||||
const getResearchName = (id) => {
|
|
||||||
let label = ''
|
|
||||||
if (id !== undefined) {
|
|
||||||
researchOptions.value.forEach(item => {
|
|
||||||
if (item.value == id) {
|
|
||||||
label = item.label
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return label
|
|
||||||
}
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {
|
tableConfig.params = {
|
||||||
allocationId: route.query.id,
|
allocationId: route.query.id,
|
||||||
@@ -257,6 +243,6 @@ const exportTable = () => {
|
|||||||
if (!$table) {
|
if (!$table) {
|
||||||
$table = $e
|
$table = $e
|
||||||
}
|
}
|
||||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表",2)
|
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ const handleVisitedP = () => {
|
|||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
accountList.value = res.data
|
accountList.value = res.data
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ const router = createRouter({
|
|||||||
name: 'casLogin',
|
name: 'casLogin',
|
||||||
component: () => import('@/views/cas-login/index.vue'),
|
component: () => import('@/views/cas-login/index.vue'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/projectdetail/mobile',
|
||||||
|
name: 'projectDetailMobile',
|
||||||
|
component: () => import('@/views/project-management/mobledetail/index.vue')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'layout',
|
name: 'layout',
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ import XLSX from "xlsx-style-vite";
|
|||||||
* @param $table 表格html dom元素
|
* @param $table 表格html dom元素
|
||||||
* @param columnLength 列长度
|
* @param columnLength 列长度
|
||||||
* @param excelName 导出文件名称
|
* @param excelName 导出文件名称
|
||||||
|
* @param bigWidthIndex 更宽列的索引
|
||||||
*/
|
*/
|
||||||
export function exportExcel($table, columnLength, excelName,bigWidth) {
|
export function exportExcel($table, columnLength, excelName, bigWidthIndex) {
|
||||||
//从el-table表生成工作簿对象
|
//从el-table表生成工作簿对象
|
||||||
//使用原始的格式,保留表格中的格式如%、小数末尾的0等
|
//使用原始的格式,保留表格中的格式如%、小数末尾的0等
|
||||||
let workbook = utils.table_to_book($table, {
|
let workbook = utils.table_to_book($table, {
|
||||||
@@ -16,7 +17,7 @@ export function exportExcel($table, columnLength, excelName,bigWidth) {
|
|||||||
});
|
});
|
||||||
//列宽,需要导出的表格有多少列这里的i就小于多少
|
//列宽,需要导出的表格有多少列这里的i就小于多少
|
||||||
for (let i = 1; i < columnLength; i++) {
|
for (let i = 1; i < columnLength; i++) {
|
||||||
if(i==bigWidth){
|
if (i === bigWidthIndex) {
|
||||||
workbook.Sheets.Sheet1["!cols"].push({wpx: 300});
|
workbook.Sheets.Sheet1["!cols"].push({wpx: 300});
|
||||||
}
|
}
|
||||||
workbook.Sheets.Sheet1["!cols"].push({wpx: 100});
|
workbook.Sheets.Sheet1["!cols"].push({wpx: 100});
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<el-form :model="formData" ref="form" class="query-form" :rules="rules">
|
<el-form :model="formData" ref="form" class="query-form" :rules="rules">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="分摊名称" prop="time">
|
<el-form-item label="分摊名称" prop="shareName">
|
||||||
<el-input v-model="formData.shareName" placeholder="请输入分摊名称" clearable>
|
<el-input v-model="formData.shareName" placeholder="请输入分摊名称" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="分摊月份" prop="time">
|
<el-form-item label="分摊月份" prop="apportionmentMonth">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.apportionmentMonth"
|
v-model="formData.apportionmentMonth"
|
||||||
type="month"
|
type="month"
|
||||||
@@ -38,20 +38,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="researchPersonnel" label="研发人员" width="230">
|
<el-table-column prop="researchPersonnel" label="研发人员" width="230">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item prop="time" :rules="scope.row.researchPersonnel?'1':rules.researchPersonnel">
|
<el-form-item prop="researchPersonnel">
|
||||||
{{ chooseUserInfo() }}
|
{{ scope.row.researchPersonnelName ? scope.row.researchPersonnelName : currentReachPerson.name }}
|
||||||
<el-button @click="showPersonnelPicker(scope.row,scope.$index)">
|
<el-button @click="showPersonnelPicker(scope.row,scope.$index)">
|
||||||
{{ chooseUserInfo() == null ? '请选择研发人员' : '更改' }}
|
{{ scope.row.researchPersonnelName || currentReachPerson.name ? '更改' : '请选择研发人员' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-select v-model="scope.row.researchPersonnel" placeholder="请选择研发人员" clearable>-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="item in researchOptions"-->
|
|
||||||
<!-- :key="item.value"-->
|
|
||||||
<!-- :label="item.label"-->
|
|
||||||
<!-- :value="item.value"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- </el-option>-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -65,7 +56,7 @@
|
|||||||
<el-table-column prop="performance" label="绩效" width="175">
|
<el-table-column prop="performance" label="绩效" width="175">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item prop="time">
|
<el-form-item prop="time">
|
||||||
<el-input-number v-model="scope.row.performance" placeholder="请输入绩效" :controls="false" min="0"/>
|
<el-input-number v-model="scope.row.performance" placeholder="请输入绩效" :controls="false"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -113,7 +104,8 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<user-picker :multiple="false" ref="userPicker" title="请选择研发人员" @ok="selected" :setNullToSelectList="true"/>
|
<user-picker :multiple="false" ref="userPicker" title="请选择研发人员" v-model:value="userList" @ok="selected"
|
||||||
|
:setNullToSelectList="true"/>
|
||||||
|
|
||||||
<div style="width:100%;text-align: center;padding: 10px">
|
<div style="width:100%;text-align: center;padding: 10px">
|
||||||
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
||||||
@@ -161,22 +153,24 @@ import {
|
|||||||
import {useProcessStore} from '@/stores/processStore.js';
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
|
import {ref} from "vue";
|
||||||
|
|
||||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||||
|
|
||||||
const userList = ref([])
|
const userList = ref([])
|
||||||
const changeDiagram = ref(false)
|
const changeDiagram = ref(false)
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
shareName: [{required: true, message: '请输入分摊名称', trigger: ['blur', 'change']}],
|
shareName: [{required: true, message: '请输入分摊名称', trigger: 'blur'}],
|
||||||
apportionmentMonth: [{required: true, message: '请选择月份', trigger: ['blur', 'change']}],
|
apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}],
|
||||||
projectId: [{required: true, message: '请选择项目名称', trigger: ['blur', 'change']}],
|
projectId: [{required: true, message: '请选择项目名称', trigger: 'blur'}],
|
||||||
researchPersonnel: [{required: true, message: '请选择研发人员', trigger: ['blur', 'change']}],
|
// researchPersonnel: [{required: true, message: '请选择研发人员', trigger: 'blur'}],
|
||||||
wagesPayable: [{required: true, message: '请输入应发工资', trigger: ['blur', 'change']}],
|
wagesPayable: [{required: true, message: '请输入应发工资', trigger: 'blur'}],
|
||||||
performance: [{required: true, message: '请输入绩效', trigger: ['blur', 'change']}],
|
performance: [{required: true, message: '请输入绩效', trigger: 'blur'}],
|
||||||
reserveFund: [{required: true, message: '请输入公积金', trigger: ['blur', 'change']}],
|
reserveFund: [{required: true, message: '请输入公积金', trigger: 'blur'}],
|
||||||
socialSecurity: [{required: true, message: '请输入社保', trigger: ['blur', 'change']}],
|
socialSecurity: [{required: true, message: '请输入社保', trigger: 'blur'}],
|
||||||
annuity: [{required: true, message: '请输入年金', trigger: ['blur', 'change']}],
|
annuity: [{required: true, message: '请输入年金', trigger: 'blur'}],
|
||||||
workday: [{required: true, message: '请输入工作日', trigger: ['blur', 'change']}],
|
workday: [{required: true, message: '请输入工作日', trigger: 'blur'}],
|
||||||
researchDuration: [{required: true, message: '请输入研发时长', trigger: ['blur', 'change']}],
|
researchDuration: [{required: true, message: '请输入研发时长', trigger: 'blur'}],
|
||||||
})
|
})
|
||||||
const processStore = useProcessStore()
|
const processStore = useProcessStore()
|
||||||
const opentionData = ref()
|
const opentionData = ref()
|
||||||
@@ -206,29 +200,26 @@ const formData = ref({
|
|||||||
})
|
})
|
||||||
const userPicker = ref()
|
const userPicker = ref()
|
||||||
const form = ref()
|
const form = ref()
|
||||||
|
const currentReachPerson = ref({})
|
||||||
const currentRow = ref()
|
const currentRow = ref()
|
||||||
const currentIndex= ref()
|
const currentIndex = ref()
|
||||||
const nameOptions = ref([])
|
const nameOptions = ref([])
|
||||||
const researchOptions = ref([])
|
const researchOptions = ref([])
|
||||||
const showPersonnelPicker = (row,index) => {
|
const showPersonnelPicker = (row, index) => {
|
||||||
currentRow.value=row
|
currentRow.value = row
|
||||||
currentIndex.value=index
|
currentIndex.value = index
|
||||||
userPicker.value.showUserPicker()
|
userPicker.value.showUserPicker()
|
||||||
}
|
}
|
||||||
const chooseUserInfo = () => {
|
|
||||||
if (userList.value.length > 0) {
|
|
||||||
return userList.value.map(item => {
|
|
||||||
return item.name
|
|
||||||
}).join(',')
|
|
||||||
} else {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const selected = (select) => {
|
const selected = (select) => {
|
||||||
console.log('select',select)
|
for (const selectElement of select) {
|
||||||
console.log('currentRow.value',currentRow.value)
|
currentReachPerson.value = selectElement
|
||||||
console.log('currentRow.value',currentIndex.value)
|
}
|
||||||
// userList.value = select
|
formData.value.tableData.forEach((item, index) => {
|
||||||
|
if (index == currentIndex.value) {
|
||||||
|
item.researchPersonnel = currentReachPerson.value.id
|
||||||
|
item.researchPersonnelName = currentReachPerson.value.name
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const getResearchOptions = async () => {
|
const getResearchOptions = async () => {
|
||||||
const res = await getResearchUser()
|
const res = await getResearchUser()
|
||||||
@@ -290,13 +281,8 @@ const handleSubmit = (instance) => {
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let researchPersonId = ''
|
|
||||||
userList.value.forEach(item => {
|
|
||||||
researchPersonId = item.id
|
|
||||||
})
|
|
||||||
formData.value.tableData.forEach(item => {
|
formData.value.tableData.forEach(item => {
|
||||||
item.projectName = getProjectName(item.projectId)
|
item.projectName = getProjectName(item.projectId)
|
||||||
item.researchPersonnel = researchPersonId
|
|
||||||
if (item.performance == 0) {
|
if (item.performance == 0) {
|
||||||
item.performance = null
|
item.performance = null
|
||||||
}
|
}
|
||||||
@@ -332,14 +318,9 @@ const handleResubmit = (instance) => {
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let researchPersonId = ''
|
|
||||||
userList.value.forEach(item => {
|
|
||||||
researchPersonId = item.id
|
|
||||||
})
|
|
||||||
formData.value.tableData.forEach(item => {
|
formData.value.tableData.forEach(item => {
|
||||||
item.allocationId = formData.value.allocationId
|
item.allocationId = formData.value.allocationId
|
||||||
item.projectName = getProjectName(item.projectId)
|
item.projectName = getProjectName(item.projectId)
|
||||||
item.researchPersonnel = researchPersonId
|
|
||||||
if (item.performance == 0) {
|
if (item.performance == 0) {
|
||||||
item.performance = null
|
item.performance = null
|
||||||
}
|
}
|
||||||
@@ -351,7 +332,7 @@ const handleResubmit = (instance) => {
|
|||||||
usrAllocations: formData.value.tableData,
|
usrAllocations: formData.value.tableData,
|
||||||
deploymentId: processInstanceData.value.deploymentId,
|
deploymentId: processInstanceData.value.deploymentId,
|
||||||
}
|
}
|
||||||
// console.log('params',params)
|
console.log('params', params)
|
||||||
const {code, msg} = await editAllocation(params)
|
const {code, msg} = await editAllocation(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
@@ -12,30 +12,107 @@
|
|||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {toThousands} from '@/utils/changePrice.js'
|
import {toThousands} from '@/utils/changePrice.js'
|
||||||
import {computed, ref} from "vue";
|
|
||||||
import {getBaseInfoApi} from "@/components/steps/api";
|
import {getBaseInfoApi} from "@/components/steps/api";
|
||||||
|
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const schema = computed(() => {
|
const formArray = ref([
|
||||||
return [
|
{
|
||||||
{
|
label: '征集名称',
|
||||||
label: '征集名称',
|
prop: 'requirementName',
|
||||||
prop: 'requirementName',
|
colProps: {
|
||||||
colProps: {
|
span: 12
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '项目名称',
|
|
||||||
prop: 'projectName',
|
|
||||||
colProps: {
|
|
||||||
span: 12
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
{
|
||||||
|
label: '项目名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
const formDataArray = ref([
|
||||||
|
{
|
||||||
|
label: '征集名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目负责人',
|
||||||
|
prop: 'projectChargePerson',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目开始时间',
|
||||||
|
prop: 'startTime',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目预计持续时间',
|
||||||
|
prop: 'endTime',
|
||||||
|
colProps: {
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目开展方式',
|
||||||
|
prop: 'projectDevelopmentWay',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目预算',
|
||||||
|
prop: 'projectBudgetDescription',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目总体完成率(%)',
|
||||||
|
prop: 'projectCompletionRate',
|
||||||
|
colProps: {
|
||||||
|
span: 6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '已完成工作量',
|
||||||
|
prop: 'completeWork',
|
||||||
|
colProps: {
|
||||||
|
span: 18
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const tableData = ref({})
|
||||||
|
const schema = computed(() => {
|
||||||
|
if (JSON.stringify(tableData.value) !== '{}') {
|
||||||
|
return formDataArray.value
|
||||||
|
} else {
|
||||||
|
return formArray.value
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const baseForm = ref()
|
const baseForm = ref()
|
||||||
|
const tableIns = ref()
|
||||||
|
const btns = ref([
|
||||||
|
{name: '表格更新', key: 'update', color: '#DED0B2', auth: ''}
|
||||||
|
])
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '时间',
|
label: '时间',
|
||||||
@@ -146,17 +223,25 @@ const tableConfig = reactive({
|
|||||||
currentRender: ({row}) => {
|
currentRender: ({row}) => {
|
||||||
return <span>{toThousands(row.afterTax)}</span>
|
return <span>{toThousands(row.afterTax)}</span>
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
api: '/workflow/mosr/expense/ledger',
|
api: '/workflow/mosr/expense/ledger',
|
||||||
params: {
|
params: {
|
||||||
projectId: route.query.id
|
projectId: route.query.id
|
||||||
},
|
},
|
||||||
btns: [
|
btns: btns.value
|
||||||
{name: '上传费用', key: 'add', color: '#DED0B2', auth: ''}
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
const tableIns = ref()
|
if (route.query.state !== '4') {
|
||||||
|
btns.value.push({name: '上传费用', key: 'add', color: '#DED0B2', auth: ''})
|
||||||
|
}
|
||||||
|
const handleUpdateTable = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/update',
|
||||||
|
query: {
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
const getBaseInfo = async () => {
|
const getBaseInfo = async () => {
|
||||||
try {
|
try {
|
||||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||||
@@ -171,6 +256,9 @@ const headBtnClick = (key) => {
|
|||||||
case 'add':
|
case 'add':
|
||||||
handleUploadFee()
|
handleUploadFee()
|
||||||
break;
|
break;
|
||||||
|
case 'update':
|
||||||
|
handleUpdateTable()
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleUploadFee = () => {
|
const handleUploadFee = () => {
|
||||||
@@ -186,6 +274,21 @@ const search = (val) => {
|
|||||||
tableConfig.params = {...val, projectId: route.query.id}
|
tableConfig.params = {...val, projectId: route.query.id}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
|
const init = async () => {
|
||||||
|
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||||
|
if (data) {
|
||||||
|
tableData.value = data
|
||||||
|
baseForm.value.setValues(data)
|
||||||
|
}
|
||||||
|
// if (code !== 1000) {
|
||||||
|
// ElNotification({
|
||||||
|
// title: '提示',
|
||||||
|
// message: msg,
|
||||||
|
// type: 'error'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
init()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -344,11 +344,11 @@ const handleEdit = (row) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleStandingBook = (row) => {
|
const handleStandingBook = (row) => {
|
||||||
localStorage.setItem('projectName', row.projectName)
|
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/account',
|
name: 'Implementation/account',
|
||||||
query: {
|
query: {
|
||||||
id: row.projectId
|
id: row.projectId,
|
||||||
|
state:row.state
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
163
src/views/project-management/implementation/updateTable.vue
Normal file
163
src/views/project-management/implementation/updateTable.vue
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
<template>
|
||||||
|
<baseTitle title="表格更新"></baseTitle>
|
||||||
|
<el-form :model="tableForm" ref="form">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item prop="projectName" label="项目名称">
|
||||||
|
<span>{{ tableForm.projectName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item prop="projectChargePerson" label="项目负责人">
|
||||||
|
{{tableForm.projectChargePerson?tableForm.projectChargePerson: currentPerson.name }}
|
||||||
|
<el-button @click="showPersonnelPicker">
|
||||||
|
{{ tableForm.projectChargePerson||currentPerson.name ? '更改' : '请选择研发人员' }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="startTime" label="项目开始时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="tableForm.startTime"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择项目开始时间"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="endTime" label="项目预计持续时间" :title="!tableForm.startTime?'请先选择项目开始时间!':''">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="tableForm.endTime"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择项目预计持续时间"
|
||||||
|
:disabled="!tableForm.startTime"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item prop="projectDevelopmentWay" label="项目开展方式" style="width: 100%">
|
||||||
|
<el-input v-model="tableForm.projectDevelopmentWay" placeholder="请输入项目开展方式" clearable>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item prop="projectBudgetDescription" label="项目预算" style="width: 100%">
|
||||||
|
<el-input v-model="tableForm.projectBudgetDescription" placeholder="请输入项目预算" clearable>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item prop="projectCompletionRate" label="项目总体完成率(%)">
|
||||||
|
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" :controls="false" style="width: 200px">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16" :offset="1">
|
||||||
|
<el-form-item prop="completeWork" label="已完成工作量">
|
||||||
|
<el-input v-model="tableForm.completeWork" placeholder="请输入已完成工作量" clearable>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<user-picker :multiple="false" ref="userPicker" title="请选择项目负责人" @ok="selected"/>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
<el-button @click="handleBack">返回</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {ElMessage, ElNotification} from "element-plus";
|
||||||
|
import {updateLedger} from "@/api/project-manage";
|
||||||
|
import {getBaseInfoApi} from "@/components/steps/api";
|
||||||
|
import {ref} from "vue";
|
||||||
|
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||||
|
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||||
|
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const baseForm = ref()
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const currentPerson = ref({})
|
||||||
|
const tableForm = ref({
|
||||||
|
projectName: '',
|
||||||
|
completeWork: '',
|
||||||
|
endTime: '',
|
||||||
|
projectBudgetDescription: '',
|
||||||
|
projectChargePerson: '',
|
||||||
|
projectCompletionRate: '',
|
||||||
|
projectDevelopmentWay: '',
|
||||||
|
projectId: '',
|
||||||
|
startTime: '',
|
||||||
|
})
|
||||||
|
const userPicker = ref()
|
||||||
|
const selected = (select) => {
|
||||||
|
for (const selectElement of select) {
|
||||||
|
currentPerson.value = selectElement
|
||||||
|
tableForm.value.projectChargePerson = selectElement.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const disabledDate = (time) => {
|
||||||
|
return time.getTime() < new Date(tableForm.value.startTime).getTime();
|
||||||
|
}
|
||||||
|
const handleBack = () => {
|
||||||
|
history.back()
|
||||||
|
}
|
||||||
|
const showPersonnelPicker = () => {
|
||||||
|
userPicker.value.showUserPicker()
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
let params = {
|
||||||
|
...tableForm.value,
|
||||||
|
projectId: route.query.id
|
||||||
|
}
|
||||||
|
updateLedger(params).then(res => {
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/account',
|
||||||
|
query: {
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getBaseInfo = async () => {
|
||||||
|
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||||
|
tableForm.value.projectName = data.projectName
|
||||||
|
}
|
||||||
|
getBaseInfo()
|
||||||
|
const init = async () => {
|
||||||
|
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||||
|
tableForm.value = data
|
||||||
|
if (code !== 1000) {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
init()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -56,8 +56,8 @@
|
|||||||
<el-table-column prop="afterTax" label="税后余额(元)" width="220">
|
<el-table-column prop="afterTax" label="税后余额(元)" width="220">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item prop="afterTax" :rules="scope.row.afterTax?'1':rules.afterTax">
|
<el-form-item prop="afterTax" :rules="scope.row.afterTax?'1':rules.afterTax">
|
||||||
<el-input v-model="scope.row.afterTax" placeholder="请输入税后余额" clearable>
|
<el-input-number v-model="scope.row.afterTax" placeholder="请输入税后余额" :controls="false">
|
||||||
</el-input>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -127,7 +127,7 @@ const tableForm = reactive({
|
|||||||
projectCost: '',
|
projectCost: '',
|
||||||
researchStage: '',
|
researchStage: '',
|
||||||
digest: '',
|
digest: '',
|
||||||
afterTax: ''
|
afterTax: null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@@ -148,7 +148,7 @@ const handleAdd = () => {
|
|||||||
projectCost: '',
|
projectCost: '',
|
||||||
researchStage: '',
|
researchStage: '',
|
||||||
digest: '',
|
digest: '',
|
||||||
afterTax: ''
|
afterTax: null
|
||||||
}
|
}
|
||||||
tableForm.tableData.push(row)
|
tableForm.tableData.push(row)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,272 @@
|
|||||||
|
<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"/>
|
||||||
|
</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>
|
||||||
@@ -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>
|
||||||
|
<baseTitle title="征集说明"></baseTitle>
|
||||||
|
<el-col :span="24">
|
||||||
|
<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>
|
||||||
168
src/views/project-management/mobledetail/OpinionMoblie.vue
Normal file
168
src/views/project-management/mobledetail/OpinionMoblie.vue
Normal file
@@ -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>
|
||||||
429
src/views/project-management/mobledetail/ProjectApplyMoblie.vue
Normal file
429
src/views/project-management/mobledetail/ProjectApplyMoblie.vue
Normal file
@@ -0,0 +1,429 @@
|
|||||||
|
<template>
|
||||||
|
<div class="apply-block">
|
||||||
|
<el-form :model="localFormData" ref="formRef" label-width="auto" :rules="rules" v-if="step!=='50'">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="前置流程" :required="preProcessRequired" prop="requestName">
|
||||||
|
<div v-for="item in localFormData.preProcess" :key="item.requestId">
|
||||||
|
<a :href="item.baseUrl" target="_blank"
|
||||||
|
style="color: #2a99ff;margin-right: 10px;cursor: pointer">{{ item.requestName }}</a>
|
||||||
|
</div>
|
||||||
|
<el-button color="#DED0B2" @click="handleShowPreTable">
|
||||||
|
{{ localFormData.preProcess ? '更改' : '请选择' }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<AttachmentUpload ref="attachment" :label="getTitleName(title)+'附件'" :showTable="showTable"
|
||||||
|
:otherFileList="otherFileList"
|
||||||
|
@getAttachment="getAttachment"
|
||||||
|
@getOtherFile="getOtherFile" :showFileList="true" :formData="localFormData"
|
||||||
|
:preview="mode == 'resubmit'"/>
|
||||||
|
<div>
|
||||||
|
<div class="approval-record">
|
||||||
|
<div class="approval-title">
|
||||||
|
<baseTitle title="审批记录" v-if="mode === 'resubmit'"></baseTitle>
|
||||||
|
<div v-else></div>
|
||||||
|
<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="mode === 'resubmit'&&!changeDiagram" :operation-list="data.operationList"
|
||||||
|
:state="data.state"/>
|
||||||
|
<process-diagram-viewer mode="view" :idName="title" v-if="processDiagramViewer&&changeDiagram"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" v-if="mode === 'submit'" @click="handleSubmit">提交</el-button>
|
||||||
|
<el-button color="#DED0B2" v-else-if="mode === 'resubmit'" @click="handleSubmit">重新提交</el-button>
|
||||||
|
<el-button @click="handleBack">返回</el-button>
|
||||||
|
</div>
|
||||||
|
<el-dialog title="前置流程" v-model="showPreTable" width="80%">
|
||||||
|
<el-form :model="preProcessForm" inline>
|
||||||
|
<el-form-item label="请求名称">
|
||||||
|
<el-input v-model="preProcessForm.requestName" placeholder="请输入请求名称" clearable>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button color="#DED0B2" @click="searchPreProcess">搜索</el-button>
|
||||||
|
<el-button @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="preProcessList" stripe v-loading="loading"
|
||||||
|
@select="handleSelect" row-key="requestId">
|
||||||
|
<el-table-column type="selection" width="55" :reserve-selection="true"/>
|
||||||
|
<el-table-column prop="requestId" label="请求id"></el-table-column>
|
||||||
|
<el-table-column prop="requestName" label="请求名称"></el-table-column>
|
||||||
|
<el-table-column prop="lastOperatorName" label="最后操作人名称"></el-table-column>
|
||||||
|
<el-table-column prop="lastOperateTime" label="最后操作时间"></el-table-column>
|
||||||
|
<el-table-column prop="currentNodeName" label="当前节点"></el-table-column>
|
||||||
|
<el-table-column prop="creatorName" label="创建人"></el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="创建时间"></el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <el-button type="primary" @click="choosePreProcess(scope.row)" link>选择</el-button>-->
|
||||||
|
<a :href="scope.row.baseUrl" target="_blank" style="color: #2a99ff;margin-left: 10px">查看流程</a>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<paging :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :page-sizes="[10, 20, 30, 40,50]"
|
||||||
|
:total="total" @changeSize="handleSizeChange" @goPage="handleCurrentChange"/>
|
||||||
|
<div class="oper">
|
||||||
|
<el-button color="#DED0B2" @click="choosePreProcess">确定</el-button>
|
||||||
|
<el-button @click="handleCancel">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</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 {
|
||||||
|
getApplyProcess,
|
||||||
|
getPreProcess,
|
||||||
|
getProjectCheckProcess,
|
||||||
|
getProjectConclusionProcess,
|
||||||
|
projectApply,
|
||||||
|
projectCheck,
|
||||||
|
projectConclusion,
|
||||||
|
resubmitApply,
|
||||||
|
resubmitCheck,
|
||||||
|
resubmitConclusion
|
||||||
|
} from "@/api/project-manage";
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import Paging from "@/components/pagination/index.vue";
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const changeDiagram = ref(false)
|
||||||
|
const emit = defineEmits(["getAttachment", "getOtherFile"])
|
||||||
|
const props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: 'apply'
|
||||||
|
},
|
||||||
|
showTable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
mode: {
|
||||||
|
type: String,
|
||||||
|
default: "view"
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
step: {
|
||||||
|
type: String,
|
||||||
|
default: "20"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const preProcessList = ref([])
|
||||||
|
//暂存数据
|
||||||
|
const currentList = ref([])
|
||||||
|
const preProcessRequired = ref(false)
|
||||||
|
const total = ref(0)
|
||||||
|
const preProcessForm = reactive({
|
||||||
|
requestName: ''
|
||||||
|
})
|
||||||
|
const pageInfo = reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
})
|
||||||
|
const rules = reactive({
|
||||||
|
requestName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const localFormData = ref({
|
||||||
|
preProcess: [
|
||||||
|
// {
|
||||||
|
// requestId: null,
|
||||||
|
// requestName: '',
|
||||||
|
// baseUrl: ''
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const attachment = ref()
|
||||||
|
const deploymentData = ref({})
|
||||||
|
const showPreTable = ref(false)
|
||||||
|
const showTable = ref(true)
|
||||||
|
const loading = ref(false)
|
||||||
|
const processDiagramViewer = ref(false)
|
||||||
|
const name = ref(router.currentRoute.value.name)
|
||||||
|
const deploymentId = ref()
|
||||||
|
const selectRows = ref([])
|
||||||
|
const projectId = ref(route.query.projectId)
|
||||||
|
const getPreProcessUrl = (list) => {
|
||||||
|
// list.map(item => {
|
||||||
|
// item.baseUrl = getPreProcessUrl(item.preProcess)
|
||||||
|
// })
|
||||||
|
// let baseUrl=
|
||||||
|
// list.forEach(item => {
|
||||||
|
// baseUrl=item.baseUrl
|
||||||
|
// })
|
||||||
|
// return baseUrl
|
||||||
|
}
|
||||||
|
const handleSelect = async (selection) => {
|
||||||
|
selectRows.value = selection
|
||||||
|
}
|
||||||
|
const handleCancel = () => {
|
||||||
|
showPreTable.value = false
|
||||||
|
}
|
||||||
|
const searchPreProcess = () => {
|
||||||
|
getPreProcessList()
|
||||||
|
|
||||||
|
}
|
||||||
|
const handleReset = () => {
|
||||||
|
preProcessForm.requestName = ''
|
||||||
|
getPreProcessList()
|
||||||
|
}
|
||||||
|
const handleShowPreTable = () => {
|
||||||
|
showPreTable.value = true
|
||||||
|
getPreProcessList()
|
||||||
|
}
|
||||||
|
const getPreProcessList = () => {
|
||||||
|
loading.value = true
|
||||||
|
getPreProcess().then(res => {
|
||||||
|
loading.value = false
|
||||||
|
let searchArray = []
|
||||||
|
let regexPattern = ("%" + preProcessForm.requestName + "%").replace(/%/g, '.*').replace(/_/g, '.');
|
||||||
|
let regex = new RegExp('^' + regexPattern + '$');
|
||||||
|
res.data.filter((item) => {
|
||||||
|
if (regex.test(item.requestName)) {
|
||||||
|
searchArray.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
total.value = searchArray.length
|
||||||
|
currentList.value = searchArray
|
||||||
|
preProcessList.value = currentList.value.slice(0, 10)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const choosePreProcess = () => {
|
||||||
|
let preProcessObj = {}
|
||||||
|
let preProcessArray = []
|
||||||
|
selectRows.value.forEach((item) => {
|
||||||
|
preProcessObj = {
|
||||||
|
requestId: item.requestId,
|
||||||
|
requestName: item.requestName,
|
||||||
|
baseUrl: item.baseUrl
|
||||||
|
}
|
||||||
|
preProcessArray.push(preProcessObj)
|
||||||
|
})
|
||||||
|
localFormData.value.preProcess = preProcessArray
|
||||||
|
// console.log('localFormData.value.preProcess', localFormData.value.preProcess)
|
||||||
|
showPreTable.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
//切换每页显示条数
|
||||||
|
const handleSizeChange = (val) => {
|
||||||
|
pageInfo.pageSize = val;
|
||||||
|
preProcessList.value = currentList.value.slice((pageInfo.pageNum - 1) * val, pageInfo.pageNum * val)
|
||||||
|
};
|
||||||
|
|
||||||
|
//点击页码进行分页功能
|
||||||
|
const handleCurrentChange = (val) => {
|
||||||
|
pageInfo.pageNum = val;
|
||||||
|
preProcessList.value = currentList.value.slice((val - 1) * pageInfo.pageSize, val * pageInfo.pageSize)
|
||||||
|
};
|
||||||
|
const getTitleName = (type) => {
|
||||||
|
switch (type) {
|
||||||
|
case 'apply':
|
||||||
|
return '项目立项'
|
||||||
|
case 'check':
|
||||||
|
return '项目验收'
|
||||||
|
case 'filing':
|
||||||
|
return '项目归档'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleBack = () => {
|
||||||
|
history.back()
|
||||||
|
}
|
||||||
|
const compositeParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.id,
|
||||||
|
size: item.size,
|
||||||
|
originalFileName: item.originalFilename,
|
||||||
|
fileType: item.fileType,
|
||||||
|
url: item.url,
|
||||||
|
newFile: true,
|
||||||
|
tag: getTitleName(props.title)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getAttachment = (val) => {
|
||||||
|
// console.log('上传文件getAttachment', val)
|
||||||
|
localFormData.value.singleFile = compositeParam(val)
|
||||||
|
}
|
||||||
|
const getOtherFile = (val) => {
|
||||||
|
// console.log('上传文件getOtherFile', val)
|
||||||
|
showTable.value = false
|
||||||
|
let fileObj = compositeParam(val)
|
||||||
|
otherFileList.value.push(fileObj)
|
||||||
|
nextTick(() => {
|
||||||
|
showTable.value = true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getFileParam = (item) => {
|
||||||
|
return {
|
||||||
|
fileId: item.fileId,
|
||||||
|
tag: item.tag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
if (deploymentData.value.deploymentName === '重大项目立项' || deploymentData.value.deploymentName === '重大项目验收') {
|
||||||
|
if (localFormData.value.preProcess === undefined) {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请选择前置流程!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let files = []
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
attachment.value.allFileList.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
otherFileList.value.forEach(item => {
|
||||||
|
files.push(getFileParam(item))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// if (localFormData.value.singleFile !== undefined) {
|
||||||
|
// localFormData.value.singleFile = getFileParam(localFormData.value.singleFile)
|
||||||
|
// }
|
||||||
|
// console.log('attachment.value.singleFile', attachment.value, attachment.value.singleFile)
|
||||||
|
// if (localFormData.value.singleFile) {
|
||||||
|
//
|
||||||
|
// } else {
|
||||||
|
if (attachment.value.singleFile == null) {
|
||||||
|
attachment.value.validate()
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请上传附件',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
attachment.value.clearValidate()
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
requirementId: route.query.id,
|
||||||
|
fileList: files,
|
||||||
|
singleFile: attachment.value.singleFile,
|
||||||
|
projectId: projectId.value,
|
||||||
|
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||||
|
}
|
||||||
|
// console.log('params', params)
|
||||||
|
let res
|
||||||
|
if (props.step === '20') {
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
res = await resubmitApply(params)
|
||||||
|
} else {
|
||||||
|
res = await projectApply(params)
|
||||||
|
}
|
||||||
|
} else if (props.step === '40') {
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
res = await resubmitCheck(params)
|
||||||
|
} else {
|
||||||
|
res = await projectCheck(params)
|
||||||
|
}
|
||||||
|
} else if (props.step === '50') {
|
||||||
|
if (props.mode === 'resubmit') {
|
||||||
|
res = await resubmitConclusion(params)
|
||||||
|
} else {
|
||||||
|
res = await projectConclusion(params)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
if (props.step === '20') {
|
||||||
|
await router.push({
|
||||||
|
name: 'Initiation'
|
||||||
|
})
|
||||||
|
} else if (props.step === '40') {
|
||||||
|
await router.push({
|
||||||
|
name: 'Implementation'
|
||||||
|
})
|
||||||
|
} else if (props.step === '50') {
|
||||||
|
await router.push({
|
||||||
|
name: 'Filing'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const init = async () => {
|
||||||
|
let id = projectId.value
|
||||||
|
if (!id) return;
|
||||||
|
processDiagramViewer.value = false
|
||||||
|
let res
|
||||||
|
if (props.step === '20') {
|
||||||
|
res = await getApplyProcess(id)
|
||||||
|
} else if (props.step === '40') {
|
||||||
|
res = await getProjectCheckProcess(id)
|
||||||
|
} else if (props.step === '50') {
|
||||||
|
res = await getProjectConclusionProcess(id)
|
||||||
|
}
|
||||||
|
if (res.code === 1000) {
|
||||||
|
let data = res.data
|
||||||
|
deploymentId.value = data.deploymentId
|
||||||
|
deploymentData.value = data
|
||||||
|
preProcessRequired.value = data.deploymentName === '重大项目立项' || data.deploymentName === '重大项目验收';
|
||||||
|
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(() => {
|
||||||
|
processDiagramViewer.value = true
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||||
|
})
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await init()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.oper {
|
||||||
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
314
src/views/project-management/mobledetail/StepsMoblie.vue
Normal file
314
src/views/project-management/mobledetail/StepsMoblie.vue
Normal file
@@ -0,0 +1,314 @@
|
|||||||
|
<template>
|
||||||
|
<baseTitle title="基础信息"></baseTitle>
|
||||||
|
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||||
|
<baseTitle title="各流程信息"></baseTitle>
|
||||||
|
<div class="steps-box">
|
||||||
|
<el-steps :active="localActive" finish-status="success">
|
||||||
|
<el-step
|
||||||
|
v-for="(item, index) in localSteps"
|
||||||
|
:key="item.key"
|
||||||
|
:title="item.title"
|
||||||
|
:class="stepClass(index)"
|
||||||
|
@click="handleStep(item.key, index)"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-steps>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 步骤内容 -->
|
||||||
|
<div>
|
||||||
|
<slot name="content" :localActive="localActive"></slot>
|
||||||
|
<!-- <template v-for="(item, index) in stepList" :key="item.key">
|
||||||
|
<component v-if="localActive == index" v-bind="item.props || {}" :is="item.component" />
|
||||||
|
</template> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {ElLoading, ElNotification} from 'element-plus';
|
||||||
|
import {computed, reactive, ref, watchEffect} from 'vue';
|
||||||
|
import {useRoute} from 'vue-router';
|
||||||
|
import {getBaseInfoApi} from './api';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 步骤对应内容list
|
||||||
|
stepList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
// 当前显示步骤
|
||||||
|
active: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
// 已完成的工作流步骤
|
||||||
|
stepSuccess: {
|
||||||
|
type: Array,
|
||||||
|
default: ['00']
|
||||||
|
},
|
||||||
|
//直接上报/需求征集
|
||||||
|
reportType: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
const emits = defineEmits(['stepChange', 'setDetail'])
|
||||||
|
|
||||||
|
const localData = reactive({})
|
||||||
|
|
||||||
|
const localActive = ref(0) // 当前激活步骤
|
||||||
|
|
||||||
|
const localSteps = ref([
|
||||||
|
{
|
||||||
|
title: '需求征集',
|
||||||
|
key: 'collect',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '需求上报',
|
||||||
|
key: 'report',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目立项',
|
||||||
|
key: 'approve',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目实施',
|
||||||
|
key: 'execute',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '项目归档',
|
||||||
|
key: 'archivist',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '项目结项',
|
||||||
|
// key: 'end',
|
||||||
|
// },
|
||||||
|
])
|
||||||
|
|
||||||
|
const baseForm = ref()
|
||||||
|
|
||||||
|
const schema = computed(() => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
label: '征集名称',
|
||||||
|
prop: 'requirementName',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属公司',
|
||||||
|
prop: 'affiliatedCompany',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
colProps: {
|
||||||
|
span: 24
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
const localStepSuccess = ref([])
|
||||||
|
|
||||||
|
// 格式化详情步骤条
|
||||||
|
const formatProcedure = (data) => {
|
||||||
|
let arr = []
|
||||||
|
if (data instanceof Array) {
|
||||||
|
data.forEach(item => {
|
||||||
|
if (props.reportType === 'direct') {
|
||||||
|
switch (item) {
|
||||||
|
case '10':
|
||||||
|
arr.push(0)
|
||||||
|
break
|
||||||
|
case '20':
|
||||||
|
arr.push(1)
|
||||||
|
break
|
||||||
|
case '40':
|
||||||
|
arr.push(2)
|
||||||
|
break
|
||||||
|
case '50':
|
||||||
|
arr.push(3)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (item) {
|
||||||
|
case '00':
|
||||||
|
arr.push(0)
|
||||||
|
break
|
||||||
|
case '10':
|
||||||
|
arr.push(1)
|
||||||
|
break
|
||||||
|
case '20':
|
||||||
|
arr.push(2)
|
||||||
|
break
|
||||||
|
case '40':
|
||||||
|
arr.push(3)
|
||||||
|
break
|
||||||
|
case '50':
|
||||||
|
arr.push(4)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
|
||||||
|
// 反向格式化
|
||||||
|
const formatReProcedure = (data) => {
|
||||||
|
let arr = []
|
||||||
|
if (data instanceof Array) {
|
||||||
|
data.forEach(item => {
|
||||||
|
switch (item) {
|
||||||
|
case 0:
|
||||||
|
arr.push('00')
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
arr.push('10')
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
arr.push('20')
|
||||||
|
break
|
||||||
|
// case 3: arr.push('30')
|
||||||
|
// break
|
||||||
|
case 3:
|
||||||
|
arr.push('40')
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
arr.push('50')
|
||||||
|
break
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatActive = (val) => {
|
||||||
|
let newVal
|
||||||
|
if (props.reportType === 'direct') {
|
||||||
|
newVal = val + 1
|
||||||
|
} else {
|
||||||
|
newVal = val
|
||||||
|
}
|
||||||
|
let active = ''
|
||||||
|
newVal == 0 && (active = '00')
|
||||||
|
newVal == 1 && (active = '10')
|
||||||
|
newVal == 2 && (active = '20')
|
||||||
|
// val == 3 && (active = '30')
|
||||||
|
newVal == 3 && (active = '40')
|
||||||
|
newVal == 4 && (active = '50')
|
||||||
|
return active
|
||||||
|
}
|
||||||
|
|
||||||
|
const stepClass = (val) => {
|
||||||
|
if (localStepSuccess.value.includes(val)) {
|
||||||
|
return 'step-success'
|
||||||
|
}
|
||||||
|
return 'step-error'
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleStep = (key, index) => {
|
||||||
|
if (localStepSuccess.value.includes(index)) {
|
||||||
|
let active = ''
|
||||||
|
localActive.value = index
|
||||||
|
if (props.reportType === 'direct') {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
active = '10'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
active = '20'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
active = '40'
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
active = '50'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
active = '00'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
active = '10'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
active = '20'
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
active = '40'
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
active = '50'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
emits('stepChange', {key, active})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '不能查看未完成的工作流信息',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getBaseInfo = async () => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
try {
|
||||||
|
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||||
|
// console.log('data.procedure',data.procedure,route.query.step)
|
||||||
|
if(route.query.step==='40'){
|
||||||
|
if(data.procedure.indexOf('40')==-1){
|
||||||
|
data.procedure.push('40')
|
||||||
|
}
|
||||||
|
}else if(route.query.step==='50'){
|
||||||
|
if(data.procedure.indexOf('50')==-1){
|
||||||
|
data.procedure.push('50')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
localStepSuccess.value = formatProcedure(data.procedure)
|
||||||
|
baseForm.value.setValues(data)
|
||||||
|
emits('setDetail', formatActive(localActive.value))
|
||||||
|
loading.close()
|
||||||
|
} catch {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getBaseInfo()
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
localActive.value = props.active
|
||||||
|
})
|
||||||
|
watchEffect(() => {
|
||||||
|
if (props.reportType === 'direct') {
|
||||||
|
localSteps.value = localSteps.value.slice(1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.steps-box {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-success {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-error {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
289
src/views/project-management/mobledetail/SummaryDetailMoblie.vue
Normal file
289
src/views/project-management/mobledetail/SummaryDetailMoblie.vue
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
<template>
|
||||||
|
<div class="detail-block" v-loading="loading">
|
||||||
|
<el-form :model="localFormData" ref="summaryForm" :rules="rules">
|
||||||
|
<el-row gutter="50">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
|
<span>{{ localFormData.projectName }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="专项资金" prop="specialFund" v-if="localFormData.isSpecialFund">
|
||||||
|
<span>{{localFormData.specialFundId===0?localFormData.specialFund:changeName(fundOption,localFormData.specialFundId) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
|
<span>{{ localFormData.startTime }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="结束时间" prop="endTime">
|
||||||
|
<span>{{ localFormData.endTime }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="项目类型" prop="projectType">
|
||||||
|
<span>{{ filterDict(cacheStore.getDict('project_type'), localFormData.projectType) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="研发主体" prop="rdSubject">
|
||||||
|
<span>{{ filterDict(cacheStore.getDict('rd_subject'), localFormData.rdSubject) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="出资类型" prop="investmentType">
|
||||||
|
<span>{{ filterDict(cacheStore.getDict('invest_type'), localFormData.investmentType) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="项目影响" prop="projectImpact">
|
||||||
|
<span>{{ filterDict(cacheStore.getDict('project_impact'), localFormData.projectImpact) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="所属业务板块" prop="businessSegment">
|
||||||
|
<span>{{ filterDict(cacheStore.getDict('business_segment'), localFormData.businessSegment) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="预期成果形式" prop="resultForm">
|
||||||
|
<span>{{ filterDict(cacheStore.getDict('result_form'), localFormData.resultForm) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="预期技术标准制定" prop="technicalStandard">
|
||||||
|
<span>{{ filterDict(cacheStore.getDict('technical_standard'), localFormData.technicalStandard) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||||
|
<span>{{
|
||||||
|
filterDict(cacheStore.getDict('industry_university'), localFormData.industryUniversityResearch)
|
||||||
|
}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||||
|
<span>{{
|
||||||
|
filterDict(cacheStore.getDict('government_declaration'), localFormData.governmentDeclaration)
|
||||||
|
}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="知识产权状况" prop="intellectualProperty">
|
||||||
|
<span>{{
|
||||||
|
filterDict(cacheStore.getDict('intellectual_property'), localFormData.intellectualProperty)
|
||||||
|
}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="发明专利(项)" prop="inventionPatent">
|
||||||
|
<span>{{ localFormData.inventionPatent }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="实用性新型专利(项)" prop="newPatent">
|
||||||
|
<span>{{ localFormData.newPatent }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="软件著作权(项)" prop="softwareCopyright">
|
||||||
|
<span>{{ localFormData.softwareCopyright }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="著作权(项)" prop="copyright">
|
||||||
|
<span>{{ localFormData.copyright }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="其他(项)" prop="other">
|
||||||
|
<span>{{ localFormData.other }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="经济概算(元)" prop="economicEstimate">
|
||||||
|
<span>{{toThousands( localFormData.economicEstimate )}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount"
|
||||||
|
v-if="localFormData.isSpecialFund">
|
||||||
|
<span>{{ toThousands(localFormData.specialFundAmount) }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="现有业务描述" prop="serviceDescription">
|
||||||
|
<span>{{ localFormData.serviceDescription }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||||
|
<span>{{ localFormData.contentDescription }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="需求上报申请书">
|
||||||
|
<el-button type="primary" link @click="handleDownload(localFormData.singleFile)" style="font-size: 16px">
|
||||||
|
{{ localFormData.singleFile?.originalFileName }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<file-component title="需求上报附件" tag="需求上报"
|
||||||
|
v-model:value="localFormData.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="summaryProcess"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {toThousands} from '@/utils/changePrice.js'
|
||||||
|
import {downloadFile, deleteFile} from "@/api/project-demand";
|
||||||
|
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||||
|
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {getFundOption} from "@/api/special-fund";
|
||||||
|
import {useCacheStore} from '@/stores/cache.js'
|
||||||
|
import {getSubCompOpt} from "@/api/user/user";
|
||||||
|
import FileComponent from "@/components/DetailComponent/FileComponent.vue";
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:value'])
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
|
const cacheStore = useCacheStore()
|
||||||
|
const props = defineProps({
|
||||||
|
formData: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
processViewer: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
fileListShow: {
|
||||||
|
type: String,
|
||||||
|
default: 'READ'
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const changeDiagram = ref(false)
|
||||||
|
const localFormData = ref({})
|
||||||
|
const router = useRouter()
|
||||||
|
const fundOption = ref([])
|
||||||
|
const companyOption = ref([])
|
||||||
|
const dictName = ref({})
|
||||||
|
const rules = reactive({
|
||||||
|
auditOpinion: [{required: true, message: '请输入审核意见', trigger: 'blur'}],
|
||||||
|
})
|
||||||
|
const _value = computed({
|
||||||
|
get() {
|
||||||
|
return props.value;
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
emit("update:value", val);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const filterDict = (data, value) => {
|
||||||
|
if (data === undefined || value === undefined) return;
|
||||||
|
let label = ''
|
||||||
|
if (data instanceof Array) {
|
||||||
|
data.find(item => {
|
||||||
|
if (item.value == value) {
|
||||||
|
label = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return label
|
||||||
|
}
|
||||||
|
const getFundOptions = async () => {
|
||||||
|
const resFund = await getFundOption()
|
||||||
|
fundOption.value = resFund.data
|
||||||
|
const res = await getSubCompOpt()
|
||||||
|
companyOption.value = res.data
|
||||||
|
}
|
||||||
|
const changeName = (option, value) => {
|
||||||
|
let name = ''
|
||||||
|
option.forEach(item => {
|
||||||
|
if (item.value == value) {
|
||||||
|
name = item.label
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return name
|
||||||
|
}
|
||||||
|
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.processViewer, (newVal) => {
|
||||||
|
props.processViewer = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
|
||||||
|
watch(() => props.loading, (newVal) => {
|
||||||
|
props.loading = newVal
|
||||||
|
}, {deep: true})
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
return Object.keys(props.formData).length && (localFormData.value = props.formData)
|
||||||
|
})
|
||||||
|
|
||||||
|
getFundOptions()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.detail-block {
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
15
src/views/project-management/mobledetail/api/index.js
Normal file
15
src/views/project-management/mobledetail/api/index.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export const getBaseInfoApi = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/details/info/'+projectId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getMapProjectStateInfo = (projectId, state) => {
|
||||||
|
return request({
|
||||||
|
url: `/workflow/details/${projectId}/${state}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
170
src/views/project-management/mobledetail/index.vue
Normal file
170
src/views/project-management/mobledetail/index.vue
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
<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"
|
||||||
|
: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"/>
|
||||||
|
<ProjectApply :title="applyTitle"
|
||||||
|
v-if="editShow"
|
||||||
|
:mode="mode"
|
||||||
|
:step="showActive"
|
||||||
|
:data="detailData"
|
||||||
|
:formData="detailData.formData"/>
|
||||||
|
</template>
|
||||||
|
</StepsMoblie>
|
||||||
|
<div style="width: 100%;height: 30px"></div>
|
||||||
|
<Opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||||
|
v-model:value="auditOpinion"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
import {useProcessStore} from '@/stores/processStore.js';
|
||||||
|
import {ElLoading, ElNotification} from "element-plus";
|
||||||
|
import ApprovalDetail from './ApprovalDetailMoblie.vue';
|
||||||
|
import CollectionDetail from './CollectionDetailMoblie.vue';
|
||||||
|
import SummaryDetail from './SummaryDetailMoblie.vue';
|
||||||
|
import Opinion from './OpinionMoblie.vue';
|
||||||
|
import StepsMoblie from './StepsMoblie.vue';
|
||||||
|
import ProjectApply from './ProjectApplyMoblie.vue';
|
||||||
|
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const editShow = ref(false)
|
||||||
|
const applyTitle = ref('apply')
|
||||||
|
const loading = ref(false)
|
||||||
|
const processStore = useProcessStore()
|
||||||
|
const fileListShow = ref('READ')
|
||||||
|
const mode = ref('')
|
||||||
|
const currentStep = ref()
|
||||||
|
const auditOpinion = ref('')
|
||||||
|
// const step = ref(route.query.step)
|
||||||
|
route.query.step == '10' && (currentStep.value = 1)
|
||||||
|
route.query.step == '20' && (currentStep.value = 2)
|
||||||
|
route.query.step == '40' && (currentStep.value = 3)
|
||||||
|
route.query.step == '50' && (currentStep.value = 4)
|
||||||
|
const showActive = ref()
|
||||||
|
const detailData = ref({})
|
||||||
|
const commonProvessViewer = ref(true)
|
||||||
|
|
||||||
|
const getAllInfo = async (state) => {
|
||||||
|
const loading = ElLoading.service({fullscreen: true})
|
||||||
|
try {
|
||||||
|
fileListShow.value = 'READ'
|
||||||
|
commonProvessViewer.value = false
|
||||||
|
const {data, code, msg} = await getMapProjectStateInfo(route.query.projectId, state)
|
||||||
|
if (code === 1000) {
|
||||||
|
data.formData.preProcess = data.formData.preProcess ? JSON.parse(data.formData.preProcess) : undefined
|
||||||
|
detailData.value = data
|
||||||
|
mode.value = data.formData.mode
|
||||||
|
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(() => {
|
||||||
|
commonProvessViewer.value = true
|
||||||
|
if (data.formPermMap && data.formPermMap["fileList"]) {
|
||||||
|
fileListShow.value = data.formPermMap["fileList"].perm
|
||||||
|
}
|
||||||
|
})
|
||||||
|
changeModel(state, mode.value)
|
||||||
|
loading.close()
|
||||||
|
} else {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: msg,
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
if (msg === '查询结果为空') {
|
||||||
|
detailData.value = []
|
||||||
|
detailData.value.formData = {}
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const changeModel = (active, mode) => {
|
||||||
|
editShow.value = false
|
||||||
|
nextTick(() => {
|
||||||
|
editShow.value = mode === 'submit' || mode === 'resubmit';
|
||||||
|
if (route.query.step === '20' && active === '20') {
|
||||||
|
applyTitle.value = 'apply'
|
||||||
|
} else if (route.query.step === '40' && active === '40') {
|
||||||
|
applyTitle.value = 'check'
|
||||||
|
} else if (route.query.step === '50' && active === '50') {
|
||||||
|
applyTitle.value = 'filing'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const setDetail = (active) => {
|
||||||
|
showActive.value = active
|
||||||
|
getAllInfo(active)
|
||||||
|
}
|
||||||
|
|
||||||
|
const stepChange = (data) => {
|
||||||
|
showActive.value = data.active
|
||||||
|
getAllInfo(data.active)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail-block {
|
||||||
|
padding-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
: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>
|
||||||
@@ -70,9 +70,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, defineProps, defineExpose} from "vue";
|
|
||||||
import {ElMessageBox} from "element-plus";
|
import {ElMessageBox} from "element-plus";
|
||||||
import {getMosrDept} from "@/api/workflow/process-user";
|
import {getMosrUser} from "@/api/workflow/process-user";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: {
|
value: {
|
||||||
@@ -155,8 +154,7 @@ const getList = (flag) => {
|
|||||||
chooseName: filterText.value
|
chooseName: filterText.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getMosrDept(params).then(res => {
|
getMosrUser(params).then(res => {
|
||||||
console.log('selectItem.type', selectItem.type)
|
|
||||||
// if (res.data) {
|
// if (res.data) {
|
||||||
if (selectItem.type === -1) {
|
if (selectItem.type === -1) {
|
||||||
dataList.value = res.data;
|
dataList.value = res.data;
|
||||||
|
|||||||
Reference in New Issue
Block a user