Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -185,3 +185,17 @@ export const unbindAllUserByPost = (postId) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const bindAccount=(data)=>{
|
||||
return request({
|
||||
url: '/admin/mosr/user/bind/account',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export const getBindAccount=(userId)=>{
|
||||
return request({
|
||||
url: `/admin/mosr/user/bind/account/info/${userId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules">
|
||||
<el-form :model="formData" ref="applyForm" label-width="auto" :rules="rules" label-position="top">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="label" prop="attachment">
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<el-button @click="getList()">搜索</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
|
||||
<fvCheckbox style="margin-left: 10px" :options="checkOptions" v-model="checkList" @change="checkBoxChange"/>
|
||||
<!-- 人员选择 -->
|
||||
<el-empty :image-size="100" description="似乎没有数据" v-show="dataList.length === 0"/>
|
||||
@@ -88,7 +89,6 @@ const props = defineProps({
|
||||
type: Boolean
|
||||
}
|
||||
});
|
||||
const isChooseAll = ref(true);
|
||||
let selectItem = reactive({
|
||||
type: -1,
|
||||
value: "0"
|
||||
@@ -135,32 +135,14 @@ const checkBoxChange = (val) => {
|
||||
isExpand.value = '展开'
|
||||
}
|
||||
}
|
||||
const matterTree = (list, flag) => {
|
||||
list.forEach(item => {
|
||||
if (!flag&&item.value!==-1) {
|
||||
tree.value.setChecked(item, false)
|
||||
}
|
||||
if (item.children !== undefined) {
|
||||
matterTree(item.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
// const cancelAll = () => {
|
||||
// isChooseAll.value = true
|
||||
// tree.value.setCheckedNodes([])
|
||||
// }
|
||||
// const chooseAll = () => {
|
||||
// isChooseAll.value = false
|
||||
// matterTree(dataList.value)
|
||||
// }
|
||||
const getList = () => {
|
||||
getSubCompOpt().then(res => {
|
||||
dataList.value = [
|
||||
{
|
||||
label: "全选",
|
||||
label: "所有公司",
|
||||
value: -1,
|
||||
children: res.data
|
||||
}
|
||||
},
|
||||
...res.data
|
||||
]
|
||||
});
|
||||
};
|
||||
@@ -175,15 +157,36 @@ const filterNode = (value, data) => {
|
||||
const show = () => {
|
||||
//用于弹开部门选择
|
||||
visible.value = true;
|
||||
console.log('_value.value', _value.value, selectList.value)
|
||||
// if(selectList.value.length==0){
|
||||
// selectList.value=[]
|
||||
// defaultChecked.value =[]
|
||||
// }else {
|
||||
selectList.value = _value.value
|
||||
defaultChecked.value = _value.value.map(item => item.value)
|
||||
// }
|
||||
getList()
|
||||
};
|
||||
|
||||
const updateTreeCheck = (item, flag) => {
|
||||
// list.forEach(item => {
|
||||
tree.value.setChecked(item, flag)
|
||||
if (item.children !== undefined) {
|
||||
updateTreeCheck(item.children, flag)
|
||||
}
|
||||
// })
|
||||
}
|
||||
const handleChange = (data, checked) => {
|
||||
if (data.value == -1&&checked) {
|
||||
// tree.value.setCheckedNodes(['-1'])
|
||||
matterTree(dataList.value, false)
|
||||
// return;
|
||||
if (data.value == -1) {
|
||||
if(checked){
|
||||
for (const item of dataList.value) {
|
||||
if (item.value !== -1) {
|
||||
console.log('item',item)
|
||||
updateTreeCheck(item, false)
|
||||
}
|
||||
}
|
||||
tree.value.setChecked(data,true);
|
||||
}
|
||||
}
|
||||
// 左侧有选择框 + 多选
|
||||
if (props.multiple) {
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser, getAllocationDetails} from "@/api/expense-manage";
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const tableIns = ref()
|
||||
@@ -159,6 +160,13 @@ const concatColumn = (columnIndex, length, rowIndex) => {
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
getAllocationDetails(route.query.id).then(res => {
|
||||
if(res.code!==1000){
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
columnInfo.value = res.data.columns
|
||||
let tableDataLet = res.data.tableData;
|
||||
let personInfoKey = []
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'">
|
||||
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="processViewer" :tableConfig="tableConfig"
|
||||
:data="_value" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
<el-form :label-position="labelAlign">
|
||||
<el-form-item :label="title" v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" :label-position="labelAlign">
|
||||
<file-upload @getFile="getOtherFile" v-if="fileListShow === 'EDIT'"/>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="processViewer" :tableConfig="tableConfig"
|
||||
:data="_value" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
@@ -35,6 +37,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
labelAlign: {
|
||||
type: String,
|
||||
default: 'left'
|
||||
}
|
||||
})
|
||||
const emit = defineEmits(['update:value'])
|
||||
const tableConfig = reactive({
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<div class="right-bar">
|
||||
<!-- <bell-socket/>-->
|
||||
<div class="user-box">
|
||||
<div>
|
||||
<div @click.stop="handleVisitedP">
|
||||
<el-avatar>{{ userInfo.nickName }}</el-avatar>
|
||||
<div @click.stop="handleVisitedP">{{ userInfo.nickName }}
|
||||
<div>{{ userInfo.nickName }}
|
||||
<el-icon style="margin-left: 5px">
|
||||
<ArrowDownBold/>
|
||||
</el-icon>
|
||||
|
||||
@@ -40,6 +40,21 @@ const router = createRouter({
|
||||
name: 'shareDetailMobile',
|
||||
component: () => import('@/views/project-management/mobledetail/ShareDetailMobile.vue')
|
||||
},
|
||||
{
|
||||
path: '/projectDemand/requirement/moblie',
|
||||
name: 'projectDemandRequirementMoblie',
|
||||
component: () => import('@/views/project-demand/requirement/moblieDetail/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/expenseManagement/share/moblie',
|
||||
name: 'expenseManagementMoblie',
|
||||
component: () => import('@/views/expense-management/share/moblieDetail/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/phase/detail/moblie',
|
||||
name: 'phaseDetailMoblie',
|
||||
component: () => import('@/views/project-management/phaseDetailMoblie/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
name: 'layout',
|
||||
|
||||
@@ -160,17 +160,17 @@ import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
const userList = ref([])
|
||||
const changeDiagram = ref(false)
|
||||
const rules = reactive({
|
||||
shareName: [{required: true, message: '请输入分摊名称', trigger: ['blur', 'change']}],
|
||||
apportionmentMonth: [{required: true, message: '请选择月份', trigger: ['blur', 'change']}],
|
||||
projectId: [{required: true, message: '请选择项目名称', trigger: ['blur', 'change']}],
|
||||
shareName: [{required: true, message: '请输入分摊名称', trigger: ['blur', 'change']}],
|
||||
apportionmentMonth: [{required: true, message: '请选择月份', trigger: ['blur', 'change']}],
|
||||
projectId: [{required: true, message: '请选择项目名称', trigger: ['blur', 'change']}],
|
||||
// researchPersonnel: [{required: true, message: '请选择研发人员', trigger: ['blur', 'change']}],
|
||||
wagesPayable: [{required: true, message: '请输入应发工资', trigger: ['blur', 'change']}],
|
||||
performance: [{required: true, message: '请输入绩效', trigger: ['blur', 'change']}],
|
||||
reserveFund: [{required: true, message: '请输入公积金', trigger: ['blur', 'change']}],
|
||||
socialSecurity: [{required: true, message: '请输入社保', trigger: ['blur', 'change']}],
|
||||
annuity: [{required: true, message: '请输入年金', trigger: ['blur', 'change']}],
|
||||
workday: [{required: true, message: '请输入工作日', trigger: ['blur', 'change']}],
|
||||
researchDuration: [{required: true, message: '请输入研发时长', trigger: ['blur', 'change']}],
|
||||
wagesPayable: [{required: true, message: '请输入应发工资', trigger: ['blur', 'change']}],
|
||||
performance: [{required: true, message: '请输入绩效', trigger: ['blur', 'change']}],
|
||||
reserveFund: [{required: true, message: '请输入公积金', trigger: ['blur', 'change']}],
|
||||
socialSecurity: [{required: true, message: '请输入社保', trigger: ['blur', 'change']}],
|
||||
annuity: [{required: true, message: '请输入年金', trigger: ['blur', 'change']}],
|
||||
workday: [{required: true, message: '请输入工作日', trigger: ['blur', 'change']}],
|
||||
researchDuration: [{required: true, message: '请输入研发时长', trigger: ['blur', 'change']}],
|
||||
})
|
||||
const processStore = useProcessStore()
|
||||
const opentionData = ref()
|
||||
@@ -243,6 +243,7 @@ const handleAdd = () => {
|
||||
projectId: '',
|
||||
projectName: '',
|
||||
researchPersonnel: '',
|
||||
researchPersonnelName: '',
|
||||
wagesPayable: null,
|
||||
performance: null,
|
||||
reserveFund: null,
|
||||
@@ -251,6 +252,7 @@ const handleAdd = () => {
|
||||
workday: '21.75',
|
||||
researchDuration: null,
|
||||
}
|
||||
currentReachPerson.value.name=''
|
||||
formData.value.tableData.push(row)
|
||||
}
|
||||
const handleCopy = (row) => {
|
||||
@@ -281,19 +283,29 @@ const handleSubmit = (instance) => {
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
let researchPersonnel = ''
|
||||
formData.value.tableData.forEach(item => {
|
||||
item.projectName = getProjectName(item.projectId)
|
||||
researchPersonnel = item.researchPersonnel
|
||||
if (item.performance == 0) {
|
||||
item.performance = null
|
||||
}
|
||||
})
|
||||
if (!researchPersonnel) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择研发人员',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
shareName: formData.value.shareName,
|
||||
apportionmentMonth: formData.value.apportionmentMonth,
|
||||
usrAllocations: formData.value.tableData,
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
}
|
||||
// console.log('params', params, formData.value.tableData)
|
||||
console.log('params', params, formData.value.tableData)
|
||||
const {code, msg} = await addAllocation(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
@@ -318,17 +330,19 @@ const handleResubmit = (instance) => {
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
let newUsrAllocationsObj={}
|
||||
let newUsrAllocationsObjArray=[]
|
||||
let newUsrAllocationsObj = {}
|
||||
let newUsrAllocationsObjArray = []
|
||||
let researchPersonnel = ''
|
||||
formData.value.tableData.forEach(item => {
|
||||
item.allocationId = formData.value.allocationId
|
||||
item.projectName = getProjectName(item.projectId)
|
||||
researchPersonnel = item.researchPersonnel
|
||||
if (item.performance == 0) {
|
||||
item.performance = null
|
||||
}
|
||||
newUsrAllocationsObj={
|
||||
newUsrAllocationsObj = {
|
||||
projectId: item.projectId,
|
||||
projectName:item.projectName,
|
||||
projectName: item.projectName,
|
||||
researchPersonnel: item.researchPersonnel,
|
||||
wagesPayable: item.wagesPayable,
|
||||
performance: item.performance,
|
||||
@@ -340,6 +354,14 @@ const handleResubmit = (instance) => {
|
||||
}
|
||||
newUsrAllocationsObjArray.push(newUsrAllocationsObj)
|
||||
})
|
||||
if (!researchPersonnel) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择研发人员',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
allocationId: formData.value.allocationId,
|
||||
shareName: formData.value.shareName,
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true" border
|
||||
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
|
||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||
<el-table-column prop="projectName" label="项目名称" align="center"/>
|
||||
<el-table-column prop="projectCost" label="费用性质" align="center">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.projectCost !== null">
|
||||
<Tag dictType="project_cost" :value="scope.row.projectCost"/>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="researchStage" label="项目阶段" align="center">
|
||||
<template #default="scope">
|
||||
<div
|
||||
v-if="scope.row.researchStage !== null && scope.row.researchStage !== null && scope.row.researchStage !== undefined">
|
||||
<Tag dictType="research_stage" :value="scope.row.researchStage"/>
|
||||
</div>
|
||||
<div v-else>--</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="afterTax" label="分摊金额" align="center">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.afterTax !== null">
|
||||
<!-- {{ toThousands(scope.row.afterTax) }}-->
|
||||
{{ scope.row.afterTax }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {getAllocationSummaryDetails} from "@/api/expense-manage";
|
||||
|
||||
const tableData = ref([{
|
||||
id: '12987122',
|
||||
name: 'Tom',
|
||||
amount1: '234',
|
||||
amount2: '3.2',
|
||||
amount3: 10,
|
||||
},
|
||||
{
|
||||
id: '12987123',
|
||||
name: 'Tom',
|
||||
amount1: '165',
|
||||
amount2: '4.43',
|
||||
amount3: 12,
|
||||
}])
|
||||
const loading = ref(false)
|
||||
const table = ref()
|
||||
const route = useRoute()
|
||||
const getSummaries = (param) => {
|
||||
const {columns, data} = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '小计'
|
||||
} else if (index === 4) {
|
||||
const values = data.map((item) => Number(item[column.property]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
sums[index] = `${values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)}`
|
||||
// sums[index] = toThousands(sums[index])
|
||||
} else {
|
||||
sums[index] = '-'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
const exportTable = () => {
|
||||
const $e = table.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目费用分摊表",2)
|
||||
}
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
let params = {
|
||||
allocationId: route.query.id
|
||||
}
|
||||
getAllocationSummaryDetails(params).then(res => {
|
||||
tableData.value = res.data
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<div style="width: 375px; overflow-x: scroll;">
|
||||
<el-table ref="reportTable" :data="tableData" style="width: 100%;height: 479px"
|
||||
:span-method="objectSpanMethod" v-loading="loading">
|
||||
<!-- <el-table-column label="四川省国有资产经营投资管理有限责任公司-->
|
||||
<!-- 科技创新项目人工成本分摊明细表" align="center">-->
|
||||
<el-table-column v-for="column in columnInfo" :prop="column.prop" :label="column.label" align="center">
|
||||
<template #default="scope">
|
||||
<template v-if="column.children">
|
||||
<el-table-column v-for="childColumn in column.children"
|
||||
:prop="column.prop + '.'+ childColumn.prop"
|
||||
:label="childColumn.label"
|
||||
:width="childColumn.prop === 'subtotal' ? 160 : 130">
|
||||
<template #default="columnScope">
|
||||
<template v-if="(tableData.length -1) !== columnScope.$index">
|
||||
{{
|
||||
columnScope.row[column.prop][childColumn.prop] ? columnScope.row[column.prop][childColumn.prop] : '/'
|
||||
}}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ columnScope.row[column.prop][childColumn.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--分摊金额合计与分摊金额总计计算-->
|
||||
<template
|
||||
v-if="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') && (tableData.length -1) !== scope.$index">
|
||||
{{ getTotalSeparation(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template
|
||||
v-else-if="(tableData.length -1) === scope.$index && (column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost')">
|
||||
{{ getTotalSummary(scope.row, column.prop) }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row[column.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser, getAllocationDetails} from "@/api/expense-manage";
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const route = useRoute()
|
||||
const tableIns = ref()
|
||||
const reportTable = ref({});
|
||||
const columnInfo = ref([])
|
||||
const monthConcat = new Map()
|
||||
const tableData = ref([])
|
||||
const loading = ref(false)
|
||||
const researchOptions = ref([])
|
||||
|
||||
const objectSpanMethod = ({row, column, rowIndex, columnIndex}) => {
|
||||
if (columnIndex === 0) {
|
||||
if (monthConcat.has(rowIndex)) {
|
||||
return {
|
||||
rowspan: monthConcat.get(rowIndex),
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let length = Object.keys(row).length
|
||||
console.log(length)
|
||||
if (length > 5) {
|
||||
if (concatColumn(columnIndex, length, rowIndex)) {
|
||||
if (rowIndex % 5 === 0) {
|
||||
return {
|
||||
rowspan: 5,
|
||||
colspan: 1,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSeparation = (row, prop) => {
|
||||
let totalSeparation = 0.00
|
||||
for (let key of Object.keys(row)) {
|
||||
if (key.startsWith('personInfo')) {
|
||||
let value = prop === 'totalSeparation' ? (row[key].separationAmount ? row[key].separationAmount : 0) : row[key].subtotal
|
||||
if ("/" !== value) {
|
||||
try {
|
||||
totalSeparation += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (totalSeparation !== 0) {
|
||||
return totalSeparation.toFixed(2);
|
||||
} else {
|
||||
return "/"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const getTotalSummary = (row, prop) => {
|
||||
let key;
|
||||
if (prop === 'totalSeparation') {
|
||||
key = 'separationAmount'
|
||||
} else {
|
||||
key = 'subtotal'
|
||||
}
|
||||
let result = 0
|
||||
for (const rowKey of Object.keys(row)) {
|
||||
if (rowKey.startsWith('personInfo')) {
|
||||
let value = row[rowKey][key]
|
||||
if (value && "/" !== value) {
|
||||
try {
|
||||
result += parseFloat(value)
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toFixed(2);
|
||||
}
|
||||
|
||||
const concatColumn = (columnIndex, length, rowIndex) => {
|
||||
if (rowIndex === tableData.value.length - 1) {
|
||||
return false
|
||||
}
|
||||
let columnLength = 5 + (length - 5) * 5
|
||||
if (columnIndex === 1
|
||||
|| columnIndex === columnLength - 1) {
|
||||
return true;
|
||||
}
|
||||
for (let i = 0; i < length - 5; i++) {
|
||||
if (columnIndex === 4 + (i * 5)
|
||||
|| columnIndex === 5 + (i * 5)
|
||||
|| columnIndex === 7 + (i * 5)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const init = () => {
|
||||
loading.value = true
|
||||
getAllocationDetails(route.query.id).then(res => {
|
||||
if(res.code!==1000){
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
columnInfo.value = res.data.columns
|
||||
let tableDataLet = res.data.tableData;
|
||||
let personInfoKey = []
|
||||
columnInfo.value.forEach(item => {
|
||||
if (item.prop.startsWith('personInfo')) {
|
||||
personInfoKey.push(item.prop)
|
||||
}
|
||||
})
|
||||
tableData.value = []
|
||||
let rowIndex = 0;
|
||||
let summary = {
|
||||
month: "",
|
||||
salaryType: '',
|
||||
projectName: "合计",
|
||||
totalSeparation: 10,
|
||||
totalSeparationCost: 10
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key] = {
|
||||
researchDuration: "",
|
||||
separationAmount: 0,
|
||||
subtotal: 0,
|
||||
wagesPayable: "",
|
||||
workday: "",
|
||||
}
|
||||
}
|
||||
tableDataLet.forEach((tableDatum) => {
|
||||
let rowspan = tableDatum.rows.length * 5
|
||||
monthConcat.set(rowIndex, rowspan)
|
||||
rowIndex += rowspan
|
||||
for (const tableDatumElement of tableDatum.rows) {
|
||||
tableData.value = tableData.value.concat(tableDatumElement)
|
||||
let row = tableDatumElement[0]
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].subtotal && '/' !== row[key].subtotal) {
|
||||
summary[key].subtotal += parseFloat(row[key].subtotal)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
for (const row of tableData.value) {
|
||||
for (const key of personInfoKey) {
|
||||
try {
|
||||
if (row[key].separationAmount && '/' !== row[key].separationAmount) {
|
||||
summary[key].separationAmount += parseFloat(row[key].separationAmount)
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const key of personInfoKey) {
|
||||
summary[key].subtotal = summary[key].subtotal.toFixed(2)
|
||||
summary[key].separationAmount = summary[key].separationAmount.toFixed(2)
|
||||
}
|
||||
monthConcat.set(rowIndex, 1)
|
||||
tableData.value.push(summary)
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const getResearchOptions = async () => {
|
||||
const res = await getResearchUser()
|
||||
researchOptions.value = res.data
|
||||
}
|
||||
const search = (val) => {
|
||||
tableConfig.params = {
|
||||
allocationId: route.query.id,
|
||||
...val
|
||||
}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
getResearchOptions()
|
||||
init()
|
||||
|
||||
|
||||
const exportTable = () => {
|
||||
const $e = reportTable.value.$el
|
||||
let $table = $e.querySelector('.el-table__fixed')
|
||||
if (!$table) {
|
||||
$table = $e
|
||||
}
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
||||
}
|
||||
</script>
|
||||
138
src/views/expense-management/share/moblieDetail/index.vue
Normal file
138
src/views/expense-management/share/moblieDetail/index.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px;">
|
||||
<el-form :model="formData" ref="form" class="query-form" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分摊名称">
|
||||
<span>{{ formData.shareName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分摊月份">
|
||||
<span>{{ formData.apportionmentMonth }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="分摊明细" name="first">
|
||||
<ExpenseDetailMoblie/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分摊汇总" name="second" v-loading="loading">
|
||||
<AllocationSummaryDetailMoblie/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-if="shareData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="auditOpinion"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render
|
||||
v-if="shareProcessViewer&& shareData.operationList && shareData.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="shareData.operationList"
|
||||
:state="shareData.state"/>
|
||||
<process-diagram-viewer v-if="shareProcessViewer&&changeDiagram" id-name="shareProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
<opinion v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId"
|
||||
v-model:value="auditOpinion"></opinion>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getAllocationDetail} from "@/api/expense-manage";
|
||||
import AllocationSummaryDetailMoblie from './AllocationSummaryDetailMoblie.vue'
|
||||
import ExpenseDetailMoblie from './ExpenseDetailMoblie.vue'
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const shareData = ref({})
|
||||
const formData = ref({})
|
||||
const auditOpinion = ref('')
|
||||
const shareProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const activeName = ref('first')
|
||||
// const activeName = ref('second')
|
||||
|
||||
const getDetail = async () => {
|
||||
const id = route.query.id
|
||||
shareProcessViewer.value = false
|
||||
const {code, data, msg} = await getAllocationDetail(id)
|
||||
if (code === 1000) {
|
||||
shareData.value = data
|
||||
formData.value = data.formData
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
shareProcessViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleClick = (tab) => {
|
||||
if (tab.index == 0) {
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table--fit ) {
|
||||
width: 100%;
|
||||
height: 479px !important;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
//background-color: #DED0B2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -105,7 +105,7 @@ const todoNum = ref(0)
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'processName',
|
||||
prop: 'targetName',
|
||||
label: '流程名称',
|
||||
align: 'center',
|
||||
},
|
||||
@@ -116,7 +116,7 @@ const tableConfig = reactive({
|
||||
},
|
||||
{
|
||||
prop: 'targetState',
|
||||
label: '类型',
|
||||
label: '流程类型',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="征集类型" prop="collectType">
|
||||
<el-select v-model="formData.collectType" placeholder="征集类型" clearable filterable>
|
||||
<el-form-item label="科技创新与信息化系统建设" prop="collectType">
|
||||
<el-select v-model="formData.collectType" placeholder="科技创新与信息化系统建设" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('collect_type')"
|
||||
:key="item.value"
|
||||
@@ -21,26 +21,30 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="截止时间" prop="deadline">
|
||||
<el-form-item label="需求上报截止时间" prop="deadline">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
v-model="formData.deadline"
|
||||
type="date"
|
||||
placeholder="截止时间"
|
||||
placeholder="需求上报截止时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属公司" prop="companyIds" class="tree-select">
|
||||
<div v-if="route.query.id" :class="showExpendClass(showMoreCompany)">{{ selectedCompanyList }}</div>
|
||||
<el-form-item label="征集公司" prop="companyIds" class="tree-select">
|
||||
<div style="width: 100%">
|
||||
<el-button color="#DED0B2" @click="showCompany">{{ selectedCompanyList.length === 0 ? '请选择征集公司' : '更改' }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="route.query.id" :class="showExpendClass(showMoreCompany)">{{ getName(selectedCompanyList) }}</div>
|
||||
<div v-else :class="showExpendClass(showMoreCompany)">{{ getName(selectedCompanyList) }}</div>
|
||||
<div style="color: #2a99ff;text-align: center;width: 100%;font-size: 15px;cursor: pointer"
|
||||
@click="handleExpend">{{ showExpendText }}
|
||||
@click="handleExpend">
|
||||
{{ showExpendText }}
|
||||
|
||||
</div>
|
||||
<el-button color="#DED0B2" @click="showCompany">{{ selectedCompanyList.length === 0 ? '请选择所属公司' : '更改' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -52,7 +56,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<el-form-item label="专项资金名称" prop="specialFundId">
|
||||
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in specialFundOption"
|
||||
@@ -98,7 +102,8 @@
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
<company-picker :multiple="true" ref="companyRef" title="请选择所属公司" @ok="selected"/>
|
||||
<company-picker :multiple="true" ref="companyRef" title="请选择所属公司" @ok="selected"
|
||||
v-model:value="selectedCompanyList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -220,24 +225,16 @@ const showExpendClass = (showMoreCompany) => {
|
||||
if (!showMoreCompany) {
|
||||
if (selectedCompanyList.value.length === 0) {
|
||||
showExpendText.value = ''
|
||||
return ''
|
||||
} else if (selectedCompanyList.value.length>14) {
|
||||
return ''
|
||||
} else if (selectedCompanyList.value.length > 14) {
|
||||
showExpendText.value = '展开'
|
||||
return 'company-style'
|
||||
return 'company-style'
|
||||
}
|
||||
} else {
|
||||
showExpendText.value = '收缩'
|
||||
return ''
|
||||
return ''
|
||||
}
|
||||
}
|
||||
const getCompanyOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, companyOption.value, item)
|
||||
})
|
||||
}
|
||||
return companyNameArray.value.join(',');
|
||||
}
|
||||
const getName = (list) => {
|
||||
return list.map(item => item.label).join(',')
|
||||
}
|
||||
@@ -403,6 +400,25 @@ const handleResubmit = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getCompanyOptionItem = (val) => {
|
||||
let newObj = {}
|
||||
let newArray = []
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, companyOption.value, item)
|
||||
companyNameArray.value.forEach(companyItem => {
|
||||
newObj = {
|
||||
label: companyItem,
|
||||
value: item
|
||||
}
|
||||
newArray.push(newObj)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
return newArray;
|
||||
}
|
||||
const getDetailInfo = async () => {
|
||||
getFormInfo(route.query.id).then(res => {
|
||||
if (res.code === 1000) {
|
||||
|
||||
@@ -63,7 +63,11 @@ const init = async () => {
|
||||
}
|
||||
loading.value = false
|
||||
let data = res.data
|
||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||
if(data.formData.companyIds[0]==-1){
|
||||
data.formData.companyIds = ['所有公司']
|
||||
}else {
|
||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||
}
|
||||
collectData.value = data
|
||||
formData.value = data.formData;
|
||||
if (data.formData.specialFund) {
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="type==='singleDetail'">
|
||||
<el-form-item label="征集名称">
|
||||
<span>{{ formData.requirementName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="征集类型">
|
||||
<span>{{ formData.collectType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="截止时间">
|
||||
<span>{{ formData.deadline }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="type==='singleDetail'">
|
||||
<el-form-item label="所属公司">
|
||||
<span :class="showExpendClass(showMoreCompany,formData.companyIds)">{{
|
||||
getCompanyName(formData.companyIds)
|
||||
}}</span>
|
||||
<div style="color: #2a99ff;text-align: center;width: 100%;font-size: 15px;cursor: pointer"
|
||||
@click="handleExpend">{{ showExpendText }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="formData.isSpecialFund">
|
||||
<el-form-item label="专项资金">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle v-if="fileListShow === 'READ' || fileListShow === 'EDIT'" title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<file-component title="" tag="需求征集"
|
||||
v-model:value="formData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" id-name="collectionProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const showExpendText = ref('')
|
||||
const showMoreCompany = ref(false)
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
companyOption: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const changeDiagram = ref(false)
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const getCompanyName = (data) => {
|
||||
if (data) {
|
||||
return data.join(',')
|
||||
}
|
||||
}
|
||||
const handleExpend = () => {
|
||||
showMoreCompany.value = !showMoreCompany.value;
|
||||
showExpendClass(showMoreCompany.value, props.formData.companyIds)
|
||||
}
|
||||
const showExpendClass = (showMoreCompany, data) => {
|
||||
if (!showMoreCompany) {
|
||||
if (data && data.length > 14) {
|
||||
showExpendText.value = '展开'
|
||||
return 'company-style'
|
||||
}
|
||||
} else {
|
||||
showExpendText.value = '收缩'
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
const handleDownload = (row) => {
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
})
|
||||
}
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
|
||||
watch(() => props.processViewer, (newVal) => {
|
||||
props.processViewer = newVal
|
||||
}, {deep: true})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.company-style {
|
||||
//width: 98%;
|
||||
min-height: 30px;
|
||||
max-height: 60px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
||||
<div class="oper-page-btn">
|
||||
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from 'element-plus';
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
taskId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const form = ref()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '',
|
||||
prop: 'auditOpinion',
|
||||
component: 'el-input',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
props: {
|
||||
placeholder: '请输入审核意见',
|
||||
type: 'textarea',
|
||||
rows: 3
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
const back = () => {
|
||||
switch (route.name) {
|
||||
case 'Initiation/detail':
|
||||
router.push({name: 'Initiation'})
|
||||
break;
|
||||
case 'Filing/detail':
|
||||
router.push({name: 'Filing'})
|
||||
break;
|
||||
case 'Implementation/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
if (route.query.step === '10') {
|
||||
router.push({name: 'Summary'})
|
||||
} else if (route.query.step === '20') {
|
||||
router.push({name: 'Initiation'})
|
||||
} else if (route.query.step === '40') {
|
||||
router.push({name: 'Implementation'})
|
||||
} else if (route.query.step === '50') {
|
||||
router.push({name: 'Filing'})
|
||||
} else if (route.query.step === '00') {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'Summary/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Summary'})
|
||||
}
|
||||
break;
|
||||
case 'Requirement/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Requirement'})
|
||||
}
|
||||
break;
|
||||
case 'Fund/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Fund'})
|
||||
}
|
||||
break;
|
||||
case 'Share/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Expense/share'})
|
||||
}
|
||||
break;
|
||||
case 'Phase/detail':
|
||||
if (route.query.source === 'home') {
|
||||
router.push('/home')
|
||||
} else {
|
||||
router.push({name: 'Implementation'})
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 驳回
|
||||
const handleReject = async () => {
|
||||
// const values = form.value.getValues()
|
||||
if (!_value.value) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请填写审核意见',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
// ...values
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
// console.log('params', params)
|
||||
const res = await rejectTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
}
|
||||
|
||||
const handleAgree = async () => {
|
||||
// const values = form.value.getValues()
|
||||
const params = {
|
||||
taskId: props.taskId,
|
||||
formData: props.formData,
|
||||
auditOpinion: _value.value
|
||||
}
|
||||
const res = await agreeTask(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
141
src/views/project-demand/requirement/moblieDetail/index.vue
Normal file
141
src/views/project-demand/requirement/moblieDetail/index.vue
Normal file
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px;">
|
||||
<baseTitle title="需求征集详情"></baseTitle>
|
||||
<CollectionDetailMoblie :formData="collectData.formData" :data="collectData" type="singleDetail"
|
||||
:fileListShow="fileListShow"
|
||||
:processViewer="processViewer" :loading="loading" v-model:value="auditOpinion"/>
|
||||
<OpinionMoblie v-if="collectData.taskId" :formData="formData" :taskId="collectData.taskId" v-model:value="auditOpinion"></OpinionMoblie>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {useProcessStore} from '@/stores/processStore.js'
|
||||
import {getInfo} from "@/api/project-demand/index.js";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {getFundOption} from "@/api/special-fund";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import {matterTree} from "@/utils/matterTree";
|
||||
import CollectionDetailMoblie from './CollectionDetailMoblie.vue'
|
||||
import OpinionMoblie from './OpinionMoblie.vue'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const form = ref();
|
||||
const loading = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const specialFundOption = ref([])
|
||||
const processInstanceData = ref({})
|
||||
const fileListShow = ref("READ")
|
||||
const showTable = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const processViewer = ref(false)
|
||||
const processTree = ref()
|
||||
const collectData = ref([])
|
||||
const formData = ref({})
|
||||
const companyOption = ref([])
|
||||
const companyNameArray = ref([])
|
||||
const getFundOptions = async () => {
|
||||
const res = await getFundOption()
|
||||
specialFundOption.value = res.data
|
||||
}
|
||||
|
||||
const getCompanyOption = async () => {
|
||||
const res = await getSubCompOpt()
|
||||
companyOption.value = res.data
|
||||
}
|
||||
const getCompanyOptionItem = (val) => {
|
||||
if (val !== undefined) {
|
||||
val.forEach(item => {
|
||||
matterTree(companyNameArray.value, companyOption.value, item)
|
||||
})
|
||||
}
|
||||
return companyNameArray.value
|
||||
}
|
||||
const init = async () => {
|
||||
if (!route.query.id) return;
|
||||
await getFundOptions()
|
||||
await getCompanyOption()
|
||||
getInfo(route.query.id).then(res => {
|
||||
if (res.code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
loading.value = false
|
||||
let data = res.data
|
||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||
collectData.value = data
|
||||
formData.value = data.formData;
|
||||
if (data.formData.specialFund) {
|
||||
specialFundOption.value.forEach(item => {
|
||||
if (data.formData.specialFund == item.value) {
|
||||
data.formData.specialFund = item.label
|
||||
}
|
||||
})
|
||||
}
|
||||
processInstanceData.value = data
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
processViewer.value = true
|
||||
showTable.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
onMounted(async () => {
|
||||
loading.value = true
|
||||
await init()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-empty__description) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
|
||||
.detail-block {
|
||||
overflow: hidden;
|
||||
padding-right: 10px;
|
||||
|
||||
//.info {
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
//
|
||||
// > div {
|
||||
// width: 350px;
|
||||
// margin-bottom: 15px;
|
||||
// margin-right: 10px;
|
||||
//
|
||||
// > span:first-child {
|
||||
// color: black;
|
||||
// font-size: 16px;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//.approval-record {
|
||||
// padding-bottom: 30px;
|
||||
//
|
||||
// .process {
|
||||
// position: relative;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="detail-block" v-loading="loading">
|
||||
<baseTitle title="需求上报"></baseTitle>
|
||||
<el-form :model="formData" ref="summaryForm" :rules="rules">
|
||||
<el-form :model="formData" ref="summaryForm" :rules="rules" label-width="140">
|
||||
<el-row gutter="50">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入项目名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" v-if="!route.query.id">
|
||||
<el-col :span="6" v-if="!route.query.id">
|
||||
<el-form-item label="是否专项资金" prop="isSpecialFund">
|
||||
<el-radio-group v-model="formData.isSpecialFund" @change="specialFundChange">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -16,7 +16,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="route.query.id && formData.isSpecialFund">
|
||||
<el-col :span="5" v-if="route.query.id && formData.isSpecialFund">
|
||||
<el-form-item label="专项资金" prop="specialFundId">
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
@@ -33,7 +33,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-config-provider>
|
||||
<el-date-picker
|
||||
@@ -47,7 +47,7 @@
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结束时间" prop="endTime"
|
||||
:title="!formData.startTime?'请先选择开始时间!':''">
|
||||
<el-config-provider>
|
||||
@@ -64,7 +64,7 @@
|
||||
</el-config-provider>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目类型" prop="projectType">
|
||||
<el-select v-model="formData.projectType" placeholder="请选择项目类型" clearable filterable>
|
||||
<el-option
|
||||
@@ -76,7 +76,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="研发主体" prop="rdSubject">
|
||||
<el-select v-model="formData.rdSubject" placeholder="请选择研发主体" clearable filterable>
|
||||
<el-option
|
||||
@@ -148,7 +148,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="产学研联合" prop="industryUniversityResearch">
|
||||
<el-radio-group v-model="formData.industryUniversityResearch">
|
||||
<el-radio v-for="item in cacheStore.getDict('industry_university')"
|
||||
@@ -158,7 +158,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开展政府申报" prop="governmentDeclaration">
|
||||
<el-radio-group v-model="formData.governmentDeclaration">
|
||||
<el-radio v-for="item in cacheStore.getDict('government_declaration')"
|
||||
@@ -189,7 +189,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实用性新型专利(项)" prop="newPatent">
|
||||
<el-form-item label="实用性新型专利(项)" prop="newPatent" label-width="145">
|
||||
<el-input-number v-model="formData.newPatent" placeholder="请输入实用性新型专利" :controls="false"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -214,7 +214,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="formData.isSpecialFund!==false">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount">
|
||||
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount" label-width="280">
|
||||
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -225,7 +225,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="研发项目关键内容描述" prop="contentDescription">
|
||||
<el-form-item label="研发项目关键内容描述" prop="contentDescription" label-width="140">
|
||||
<el-input v-model="formData.contentDescription" placeholder="请输入研发项目关键内容描述" rows="4" type="textarea"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -81,9 +81,6 @@ const handleClick = (tab) => {
|
||||
}
|
||||
|
||||
const search = async (param) => {
|
||||
if (activeName.value === '00') {
|
||||
param.requirementId = requirementId.value
|
||||
}
|
||||
param.targetId = projectId.value
|
||||
param.targetState = activeName.value
|
||||
searchFileList(param).then(res => {
|
||||
|
||||
@@ -209,7 +209,7 @@ const tableConfig = reactive({
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
if (row.researchStage && row.researchStage !== null && row.researchStage !== undefined) {
|
||||
return (<Tag dictType={'research_stage'} value={row.researchStage}/>)
|
||||
return (<Tag dictType={'fee_stage'} value={row.researchStage}/>)
|
||||
} else {
|
||||
return '--'
|
||||
}
|
||||
@@ -285,7 +285,7 @@ const handleUploadFee = () => {
|
||||
const exportExcelHandler = () => {
|
||||
console.log('exportIds.value',exportIds.value)
|
||||
let data = {
|
||||
projectId: 113
|
||||
projectId: route.query.id
|
||||
}
|
||||
exportExcel(data).then(res => {
|
||||
console.log(res)
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
<div v-loading="loading">
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<file-component :title="getTagName(type)+'附件'" :tag="getTagName(type)"
|
||||
v-model:value="formData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
<file-component
|
||||
:title="getTagName(type)+'附件'"
|
||||
:tag="getTagName(type)"
|
||||
v-model:value="formData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-form>
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
|
||||
@@ -132,9 +132,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<file-component title="需求上报附件" tag="需求上报"
|
||||
v-model:value="localFormData.fileList" :processViewer="processViewer"
|
||||
:file-list-show="fileListShow"/>
|
||||
<file-component
|
||||
title="需求上报附件"
|
||||
tag="需求上报"
|
||||
v-model:value="localFormData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="data.taskId">
|
||||
|
||||
@@ -1,51 +1,53 @@
|
||||
<template>
|
||||
<StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
|
||||
:reportType="route.query.id==='-1'?'direct':''">
|
||||
<template #content>
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-show="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
<div style="padding: 0 10px;">
|
||||
<StepsMoblie :active="route.query.id==='-1'?currentStep-1:currentStep" @setDetail="setDetail" @stepChange="stepChange"
|
||||
:reportType="route.query.id==='-1'?'direct':''">
|
||||
<template #content>
|
||||
<collection-detail :formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
v-show="showActive == '00'"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"
|
||||
/>
|
||||
<summary-detail v-show="showActive == '10'"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval"
|
||||
v-if="showActive == '20'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="execute"
|
||||
v-if="showActive == '40'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist"
|
||||
v-show="showActive == '50'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply-moblie :title="applyTitle"
|
||||
v-if="editShow"
|
||||
:mode="mode"
|
||||
:step="showActive"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="approval"
|
||||
v-if="showActive == '20'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="execute"
|
||||
v-if="showActive == '40'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ApprovalDetail type="archivist"
|
||||
v-show="showActive == '50'&&!editShow"
|
||||
:formData="detailData.formData"
|
||||
:data="detailData"
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<project-apply-moblie :title="applyTitle"
|
||||
v-if="editShow"
|
||||
:mode="mode"
|
||||
:step="showActive"
|
||||
:data="detailData"
|
||||
:formData="detailData.formData"/>
|
||||
</template>
|
||||
</StepsMoblie>
|
||||
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
v-model:value="auditOpinion"/>
|
||||
:formData="detailData.formData"/>
|
||||
</template>
|
||||
</StepsMoblie>
|
||||
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
v-model:value="auditOpinion"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>
|
||||
<el-form :model="formData" label-width="auto">
|
||||
<file-component
|
||||
:title="getTagName(type)+'附件'"
|
||||
:tag="getTagName(type)"
|
||||
v-model:value="formData.fileList"
|
||||
:processViewer="processViewer"
|
||||
:file-list-show="fileListShow"
|
||||
labelAlign="top"
|
||||
/>
|
||||
</el-form>
|
||||
<div v-if="data.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="_value">
|
||||
<el-input
|
||||
v-model="_value"
|
||||
:rows="3"
|
||||
type="textarea"
|
||||
placeholder="请输入审核意见"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="approval-record">
|
||||
<div class="approval-title">
|
||||
<baseTitle title="审批记录"></baseTitle>
|
||||
<div class="diagram">
|
||||
<div class="base-title">流程图</div>
|
||||
<el-switch
|
||||
v-model="changeDiagram"
|
||||
style="--el-switch-on-color: #13ce66; --el-switch-off-color:#BEA266"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="process">
|
||||
<operation-render v-if="processViewer && data.operationList && data.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="data.operationList"
|
||||
:state="data.state"/>
|
||||
<process-diagram-viewer v-if="processViewer&&changeDiagram" :id-name="idName?idName:type"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue';
|
||||
import {ElLoading} from 'element-plus';
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
data: {
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
processViewer: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
companyOption: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
fileListShow: {
|
||||
type: String,
|
||||
default: 'READ'
|
||||
},
|
||||
// approval 立项, execute 实施, 归档 archivist
|
||||
type: {
|
||||
type: String,
|
||||
default: 'approval'
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
idName: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const form = ref()
|
||||
const schema = computed(() => {
|
||||
let arr
|
||||
if (props.type == 'approval') {
|
||||
arr = [
|
||||
{
|
||||
label: '前置流程',
|
||||
prop: 'preProcess',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.preProcess ? props.formData.preProcess.map(item => {
|
||||
return <span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
href={props.formData.preProcessBaseUrl + item.requestId}>{item.requestName}</a> </span>
|
||||
}) : <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目立项附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else if (props.type == 'execute') {
|
||||
arr = [
|
||||
{
|
||||
label: '前置流程',
|
||||
prop: 'preProcess',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.preProcess ? props.formData.preProcess.map(item => {
|
||||
return <span><a target="_blank" style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
href={props.formData.preProcessBaseUrl + item.requestId}>{item.requestName}</a> </span>
|
||||
}) : <span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: '项目验收附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else if (props.type == 'archivist') {
|
||||
arr = [
|
||||
{
|
||||
label: '项目归档附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
} else if (props.type == 'phase') {
|
||||
arr = [
|
||||
{
|
||||
label: '阶段变更附件',
|
||||
prop: 'singleFile',
|
||||
colProps: {
|
||||
span: 24
|
||||
},
|
||||
component: () => (
|
||||
<div>
|
||||
{
|
||||
props.formData.singleFile?.originalFileName ?
|
||||
<span
|
||||
style={{color: '#409EFF', cursor: 'pointer'}}
|
||||
onClick={() => handleDownload(props.formData.singleFile)}
|
||||
>
|
||||
{props.formData.singleFile?.originalFileName}
|
||||
</span> :
|
||||
<span>{'--'}</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
)
|
||||
},
|
||||
]
|
||||
}
|
||||
return arr
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:value'])
|
||||
const _value = computed({
|
||||
get() {
|
||||
return props.value;
|
||||
},
|
||||
set(val) {
|
||||
emit("update:value", val);
|
||||
}
|
||||
})
|
||||
|
||||
const getTagName = (type) => {
|
||||
switch (type) {
|
||||
case 'approval':
|
||||
return '项目立项'
|
||||
case 'execute':
|
||||
return '项目实施'
|
||||
case 'archivist':
|
||||
return '项目归档'
|
||||
case 'phase':
|
||||
return '阶段变更'
|
||||
}
|
||||
}
|
||||
const handleDownload = (row) => {
|
||||
const loading = ElLoading.service({fullscreen: true})
|
||||
downloadFile(row.fileId).then(res => {
|
||||
const blob = new Blob([res])
|
||||
let a = document.createElement('a')
|
||||
a.href = URL.createObjectURL(blob)
|
||||
a.download = row.originalFileName
|
||||
a.click()
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
watchEffect(() => {
|
||||
Object.keys(props.formData).length && (form.value?.setValues(props.formData))
|
||||
})
|
||||
|
||||
watch(() => props.loading, (newVal) => {
|
||||
props.loading = newVal
|
||||
}, {deep: true})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
96
src/views/project-management/phaseDetailMoblie/index.vue
Normal file
96
src/views/project-management/phaseDetailMoblie/index.vue
Normal file
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<div style="padding: 0 10px; box-sizing: border-box;">
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<baseTitle title="阶段变更详情"></baseTitle>
|
||||
<div style="color: #606266;font-size: 14px">抄送人:{{copyName}}</div>
|
||||
<ApprovalDetailMoblie :formData="summaryData.formData" :data="summaryData" type="phase"
|
||||
:processViewer="summaryProcessViewer" :loading="loading" :fileListShow="fileListShow" v-model:value="auditOpinion"/>
|
||||
<opinion v-if="summaryData.taskId" :formData="summaryData.formData" :taskId="summaryData.taskId" v-model:value="auditOpinion"></opinion>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getPhaseDetail} from "@/api/project-manage";
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import ApprovalDetailMoblie from './ApprovalDetailMoblie.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const summaryData = ref({})
|
||||
const summaryProcessViewer = ref(true)
|
||||
const processStore = useProcessStore()
|
||||
const loading = ref(false)
|
||||
const auditOpinion = ref('')
|
||||
const copyName = ref('')
|
||||
const fileListShow = ref('READ')
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const baseForm = ref()
|
||||
const getBaseInfo = async () => {
|
||||
try {
|
||||
const {code, data} = await getBaseInfoApi(route.query.projectId)
|
||||
baseForm.value.setValues(data)
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const getInfo = async () => {
|
||||
fileListShow.value = 'READ'
|
||||
const projectId = route.query.projectId
|
||||
summaryProcessViewer.value = false
|
||||
loading.value = true
|
||||
const {code, data, msg} = await getPhaseDetail(projectId)
|
||||
if (code === 1000) {
|
||||
summaryData.value = data;
|
||||
copyName.value= data.formData.userInfoList?.map(item=>item.name).join(',')
|
||||
loading.value = false
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
summaryProcessViewer.value = true
|
||||
if (data.formPermMap["fileList"]) {
|
||||
fileListShow.value = data.formPermMap["fileList"].perm
|
||||
}
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
if (msg === '查询结果为空') {
|
||||
summaryData.value = []
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -16,6 +16,7 @@ import { useTagsView } from '@/stores/tagsview.js'
|
||||
import { useAuthStore } from '@/stores/userstore.js'
|
||||
import { useCacheStore } from "@/stores/cache.js";
|
||||
import { getDeptOpt, getSubCompOpt, getRolesOpt, getJobOpt, getUserDetail } from '@/api/user/user.js'
|
||||
import { onBeforeMount } from 'vue';
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const authStore = useAuthStore()
|
||||
@@ -183,22 +184,17 @@ const getInstance = (e) => {
|
||||
}
|
||||
|
||||
const init = async () => {
|
||||
const { data } = await getDeptOpt()
|
||||
localData.departmentIdOpt = data
|
||||
const res = await getSubCompOpt()
|
||||
localData.subCompanyIdOpt = res.data
|
||||
const roleRes = await getRolesOpt()
|
||||
localData.roleOpt = roleRes.data
|
||||
const jobRes = await getJobOpt()
|
||||
localData.jobOpt = jobRes.data
|
||||
// const reqList = [
|
||||
// getDeptOpt(),
|
||||
// getSubCompOpt(),
|
||||
// getRolesOpt(),
|
||||
// getJobOpt()
|
||||
// ]
|
||||
// const resAll = await Promise.all(reqList)
|
||||
// console.log("🚀 ~ init ~ resAll:", resAll)
|
||||
const reqList = [
|
||||
getDeptOpt(),
|
||||
getSubCompOpt(),
|
||||
getRolesOpt(),
|
||||
getJobOpt()
|
||||
]
|
||||
const resAll = await Promise.all(reqList)
|
||||
localData.departmentIdOpt = resAll[0].data
|
||||
localData.subCompanyIdOpt = resAll[1].data
|
||||
localData.roleOpt = resAll[2].data
|
||||
localData.jobOpt = resAll[3].data
|
||||
}
|
||||
|
||||
const getInfo = async () => {
|
||||
@@ -209,7 +205,9 @@ const getInfo = async () => {
|
||||
const res = await getDeptOpt({subCompanyId: data.subCompanyId})
|
||||
localData.departmentIdOpt = res.data
|
||||
}
|
||||
form.value.setValues(data)
|
||||
nextTick(()=>{
|
||||
form.value.setValues(data)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<template>
|
||||
<fvSearchForm ref="form" :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick"></fvTable>
|
||||
<user-picker :multiple="true" ref="userPicker" title="请选择研发人员" v-model:value="userList" @ok="selected"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import Tag from '@/components/Tag.vue'
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
import { useAuthStore } from '@/stores/userstore.js'
|
||||
import { getDeptOpt, getSubCompOpt } from '../../../api/user/user.js';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { getDeptOpt, getSubCompOpt,bindAccount,getBindAccount } from '@/api/user/user.js';
|
||||
import {ElMessageBox, ElNotification} from 'element-plus';
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
@@ -45,8 +47,8 @@ const searchConfig = ref([
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '用户账号',
|
||||
prop: 'userName',
|
||||
label: '用户名称',
|
||||
prop: 'nickName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入',
|
||||
@@ -54,8 +56,8 @@ const searchConfig = ref([
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '用户昵称',
|
||||
prop: 'nickName',
|
||||
label: '用户账号',
|
||||
prop: 'userName',
|
||||
component: 'el-input',
|
||||
props: {
|
||||
placeholder: '请输入',
|
||||
@@ -75,23 +77,26 @@ const searchConfig = ref([
|
||||
])
|
||||
|
||||
const tableIns = ref()
|
||||
|
||||
const currentId = ref('')
|
||||
const userList = ref([])
|
||||
const userPicker = ref()
|
||||
const auths = {
|
||||
edit: ['admin:user:edit'],
|
||||
del: ['admin:user:del'],
|
||||
add: ['admin:user:add'],
|
||||
bindUser: ['admin:bind:account'],
|
||||
}
|
||||
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'userName',
|
||||
label: '用户名称',
|
||||
label: '用户账号',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'nickName',
|
||||
label: '用户昵称',
|
||||
label: '用户名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
@@ -118,12 +123,14 @@ const tableConfig = reactive({
|
||||
prop: 'accountType',
|
||||
label: '主子账号',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'account_type'} value={row.accountType} />)
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => (<Tag dictType={'normal_disable'} value={row.state} />)
|
||||
},
|
||||
{
|
||||
@@ -137,6 +144,7 @@ const tableConfig = reactive({
|
||||
fixed: 'right',
|
||||
width: '150',
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<div>
|
||||
@@ -146,7 +154,11 @@ const tableConfig = reactive({
|
||||
<el-button type="danger" v-perm={auths.del} link onClick={()=>handleDel(row)}>删除</el-button> :
|
||||
null
|
||||
}
|
||||
|
||||
{
|
||||
row.accountType == 0 ?
|
||||
<el-button type="primary" v-perm={auths.bindUser} link onClick={()=>handleBindAccount(row)}>绑定账号</el-button> :
|
||||
null
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -207,7 +219,46 @@ const handleDel = (row) => {
|
||||
// const { code } = await
|
||||
}).catch(()=>{})
|
||||
}
|
||||
|
||||
const handleBindAccount=(row)=>{
|
||||
currentId.value = row.userId
|
||||
getBindAccount(row.userId).then(res=>{
|
||||
if(res.code != 1000){
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
})
|
||||
}else {
|
||||
userList.value = res.data
|
||||
nextTick(()=>{
|
||||
userPicker.value.showUserPicker()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const selected = (select) => {
|
||||
let userInfoList = []
|
||||
for (let val of select) {
|
||||
let userInfo = {
|
||||
id: val.id,
|
||||
name: val.name
|
||||
}
|
||||
userInfoList.push(userInfo)
|
||||
}
|
||||
userList.value = userInfoList
|
||||
let ids=userList.value.map(item=>item.id)
|
||||
let params={
|
||||
id:currentId.value,
|
||||
ids:ids
|
||||
}
|
||||
bindAccount(params).then(res=>{
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
})
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
switch(key) {
|
||||
case 'add': handleAdd()
|
||||
|
||||
@@ -13,19 +13,22 @@
|
||||
</div>
|
||||
<div class="card">
|
||||
<div v-for="(user,index) in operation.userInfo" :key="index" class="avatar_name">
|
||||
<div>
|
||||
<div class="avatar-block">
|
||||
<name-circle :user="user"/>
|
||||
<span>{{ user.name }}</span>
|
||||
<div class="name">
|
||||
<span>{{ user.name }}</span>
|
||||
<span>{{ user.jobActivityDesc }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="remark">{{ operation.remark }}</div>
|
||||
<div>
|
||||
<div>审批人:</div>
|
||||
<div>{{ user.name }}</div>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <div>审批人:</div>-->
|
||||
<!-- <div>{{ user.name }}</div>-->
|
||||
<!-- </div>-->
|
||||
<div v-if="user.auditOpinion">
|
||||
<div style="margin-bottom: 10px;color: #909399">{{ user.operationTime }}</div>
|
||||
<div class="username">
|
||||
<div class="username">
|
||||
<span style="font-weight: bold">审批意见:</span>
|
||||
<el-text v-text="user.auditOpinion" style="word-break: break-all">
|
||||
</el-text>
|
||||
@@ -274,16 +277,25 @@ init()
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
> div:first-child {
|
||||
.avatar-block {
|
||||
display: flex;
|
||||
|
||||
|
||||
> span {
|
||||
width: 100px;
|
||||
color: #2a99ff;
|
||||
.name {
|
||||
width:130px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 10px;
|
||||
margin-right: 20px;
|
||||
margin-right: 20px;
|
||||
|
||||
> span:first-child {
|
||||
color: #2a99ff;
|
||||
}
|
||||
>span:last-child{
|
||||
margin-top: 5px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
> div:nth-child(2) {
|
||||
|
||||
@@ -192,8 +192,12 @@ const showUserPicker = () => {
|
||||
value: "0"
|
||||
};
|
||||
dataList.value = [];
|
||||
console.log('_value.value',_value.value)
|
||||
if(props.setNullToSelectList){
|
||||
selectList.value = []
|
||||
}else {
|
||||
|
||||
selectList.value =_value.value
|
||||
}
|
||||
chooseId.value = 0;
|
||||
radio.value = 0;
|
||||
|
||||
Reference in New Issue
Block a user