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'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
<span>{{ formData.specialFund }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<baseTitle title="征集说明"></baseTitle>
|
||||
<el-form-item>
|
||||
<el-card style="width: 100%">
|
||||
<div v-html="formData.collectExplain">
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -30,6 +30,16 @@ const router = createRouter({
|
||||
name: 'projectDetailMobile',
|
||||
component: () => import('@/views/project-management/mobledetail/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/fund/mobile',
|
||||
name: 'specialFundDetailMobile',
|
||||
component: () => import('@/views/project-management/mobledetail/SpecialFundDetailMobile.vue')
|
||||
},
|
||||
{
|
||||
path: '/share/mobile',
|
||||
name: 'shareDetailMobile',
|
||||
component: () => import('@/views/project-management/mobledetail/ShareDetailMobile.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'}],
|
||||
apportionmentMonth: [{required: true, message: '请选择月份', trigger: 'blur'}],
|
||||
projectId: [{required: true, message: '请选择项目名称', trigger: 'blur'}],
|
||||
// researchPersonnel: [{required: true, message: '请选择研发人员', trigger: 'blur'}],
|
||||
wagesPayable: [{required: true, message: '请输入应发工资', trigger: 'blur'}],
|
||||
performance: [{required: true, message: '请输入绩效', trigger: 'blur'}],
|
||||
reserveFund: [{required: true, message: '请输入公积金', trigger: 'blur'}],
|
||||
socialSecurity: [{required: true, message: '请输入社保', trigger: 'blur'}],
|
||||
annuity: [{required: true, message: '请输入年金', trigger: 'blur'}],
|
||||
workday: [{required: true, message: '请输入工作日', trigger: 'blur'}],
|
||||
researchDuration: [{required: true, message: '请输入研发时长', trigger: 'blur'}],
|
||||
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']}],
|
||||
})
|
||||
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,12 +283,22 @@ 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,
|
||||
@@ -318,21 +330,45 @@ const handleResubmit = (instance) => {
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
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 = {
|
||||
projectId: item.projectId,
|
||||
projectName: item.projectName,
|
||||
researchPersonnel: item.researchPersonnel,
|
||||
wagesPayable: item.wagesPayable,
|
||||
performance: item.performance,
|
||||
reserveFund: item.reserveFund,
|
||||
socialSecurity: item.socialSecurity,
|
||||
annuity: item.annuity,
|
||||
workday: item.workday,
|
||||
researchDuration: item.researchDuration,
|
||||
}
|
||||
newUsrAllocationsObjArray.push(newUsrAllocationsObj)
|
||||
})
|
||||
if (!researchPersonnel) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择研发人员',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
allocationId: formData.value.allocationId,
|
||||
shareName: formData.value.shareName,
|
||||
apportionmentMonth: formData.value.apportionmentMonth,
|
||||
usrAllocations: formData.value.tableData,
|
||||
usrAllocations: newUsrAllocationsObjArray,
|
||||
deploymentId: processInstanceData.value.deploymentId,
|
||||
}
|
||||
console.log('params', params)
|
||||
const {code, msg} = await editAllocation(params)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
<baseTitle title="基础信息"></baseTitle>
|
||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||
<el-button @click="exportExcelHandler">导出</el-button>
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" @selectionChange="selectionChange">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
@@ -89,7 +88,8 @@ const formDataArray = ref([
|
||||
prop: 'projectCompletionRate',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
component: ()=><span>{tableData.value.projectCompletionRate}%</span>
|
||||
},
|
||||
{
|
||||
label: '已完成工作量',
|
||||
@@ -99,7 +99,6 @@ const formDataArray = ref([
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const tableData = ref({})
|
||||
const schema = computed(() => {
|
||||
if (JSON.stringify(tableData.value) !== '{}') {
|
||||
@@ -111,7 +110,8 @@ const schema = computed(() => {
|
||||
const baseForm = ref()
|
||||
const tableIns = ref()
|
||||
const btns = ref([
|
||||
{name: '表格更新', key: 'update', color: '#DED0B2', auth: ''}
|
||||
{name: '表格更新', key: 'update', color: '#DED0B2', auth: ''},
|
||||
{name: '导出', key: 'export', color: '#DED0B2', auth: ''}
|
||||
])
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
@@ -173,6 +173,10 @@ const searchConfig = reactive([
|
||||
])
|
||||
const tableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
type: 'selection',
|
||||
prop: 'selection'
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
type: 'index',
|
||||
@@ -234,6 +238,11 @@ const tableConfig = reactive({
|
||||
if (route.query.state !== '4') {
|
||||
btns.value.push({name: '上传费用', key: 'add', color: '#DED0B2', auth: ''})
|
||||
}
|
||||
const exportIds=ref([])
|
||||
const selectionChange=(data)=>{
|
||||
console.log('data',data)
|
||||
console.log(' data.forEach(item=>item.id)', data.forEach(item=>item.id))
|
||||
}
|
||||
const handleUpdateTable = () => {
|
||||
router.push({
|
||||
name: 'Implementation/update',
|
||||
@@ -259,6 +268,9 @@ const headBtnClick = (key) => {
|
||||
case 'update':
|
||||
handleUpdateTable()
|
||||
break;
|
||||
case 'export':
|
||||
exportExcelHandler()
|
||||
break;
|
||||
}
|
||||
}
|
||||
const handleUploadFee = () => {
|
||||
@@ -271,6 +283,7 @@ const handleUploadFee = () => {
|
||||
}
|
||||
|
||||
const exportExcelHandler = () => {
|
||||
console.log('exportIds.value',exportIds.value)
|
||||
let data = {
|
||||
projectId: 113
|
||||
}
|
||||
|
||||
@@ -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'}" :scrollbar-always-on="true">
|
||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||
<el-table-column prop="projectName" label="项目名称" align="center" min-width="170"/>
|
||||
<el-table-column prop="projectCost" label="费用性质" align="center" min-width="100">
|
||||
<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" min-width="100">
|
||||
<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>
|
||||
247
src/views/project-management/mobledetail/ExpenseDetailMobile.vue
Normal file
247
src/views/project-management/mobledetail/ExpenseDetailMobile.vue
Normal file
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<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"
|
||||
:width="(column.prop === 'totalSeparation' || column.prop === 'totalSeparationCost') ? 160:130">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {getResearchUser, getAllocationDetails} from "@/api/expense-manage";
|
||||
import {exportExcel} from "@/utils/export-excel";
|
||||
|
||||
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 => {
|
||||
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>
|
||||
@@ -12,7 +12,7 @@ import {ElNotification} from 'element-plus';
|
||||
import {agreeTask, rejectTask} from "@/api/project-demand/index.js";
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
// const tagsViewStore = useTagsView()
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const props = defineProps({
|
||||
@@ -141,8 +141,9 @@ const handleReject = async () => {
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
location.reload()
|
||||
// back()
|
||||
}
|
||||
|
||||
const handleAgree = async () => {
|
||||
@@ -158,8 +159,9 @@ const handleAgree = async () => {
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
back()
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
location.reload()
|
||||
// back()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<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-dialog title="前置流程" v-model="showPreTable" width="80%" style="margin-top: 6vh">
|
||||
<el-form :model="preProcessForm" inline>
|
||||
<el-form-item label="请求名称">
|
||||
<el-input v-model="preProcessForm.requestName" placeholder="请输入请求名称" clearable>
|
||||
@@ -62,19 +62,20 @@
|
||||
<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="lastOperateTime" label="最后操作时间" width="165px"></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">
|
||||
<el-table-column prop="createTime" label="创建时间" width="165px"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="90px">
|
||||
<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"/>
|
||||
<el-pagination layout="prev, pager, next" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange"/>
|
||||
<!-- <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>
|
||||
@@ -148,7 +149,7 @@ const pageInfo = reactive({
|
||||
const rules = reactive({
|
||||
requestName: [{required: true, message: '请选择前置流程', trigger: 'blur'}],
|
||||
})
|
||||
const tagsViewStore = useTagsView()
|
||||
// const tagsViewStore = useTagsView()
|
||||
const processStore = useProcessStore()
|
||||
const otherFileList = ref([])
|
||||
const localFormData = ref({
|
||||
@@ -212,7 +213,7 @@ const getPreProcessList = () => {
|
||||
})
|
||||
total.value = searchArray.length
|
||||
currentList.value = searchArray
|
||||
preProcessList.value = currentList.value.slice(0, 10)
|
||||
preProcessList.value = currentList.value.slice(0, 5)
|
||||
})
|
||||
}
|
||||
const choosePreProcess = () => {
|
||||
@@ -360,20 +361,21 @@ const handleSubmit = async () => {
|
||||
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'
|
||||
})
|
||||
}
|
||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
location.reload()
|
||||
// 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 () => {
|
||||
@@ -426,4 +428,10 @@ onMounted(async () => {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
:deep(.el-upload-list) {
|
||||
width: auto;
|
||||
}
|
||||
:deep(.el-overlay-dialog ){
|
||||
left: 0!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
138
src/views/project-management/mobledetail/ShareDetailMobile.vue
Normal file
138
src/views/project-management/mobledetail/ShareDetailMobile.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<baseTitle title="费用分摊详情"></baseTitle>
|
||||
<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">
|
||||
<expense-detail-mobile/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分摊汇总" name="second" v-loading="loading">
|
||||
<allocation-summary-detail-mobile/>
|
||||
</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-moblie v-if="shareData.taskId" :formData="shareData.formData" :taskId="shareData.taskId"
|
||||
v-model:value="auditOpinion"></opinion-moblie>
|
||||
</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 OpinionMoblie from "./OpinionMoblie.vue";
|
||||
import AllocationSummaryDetailMobile from "./AllocationSummaryDetailMobile.vue";
|
||||
import ExpenseDetailMobile from "./ExpenseDetailMobile.vue";
|
||||
|
||||
const changeDiagram = ref(false)
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const shareData = ref({})
|
||||
const formData = ref({})
|
||||
const auditOpinion = ref('')
|
||||
const shareProcessViewer = ref(true)
|
||||
const loading = ref(false)
|
||||
const activeName = ref('first')
|
||||
// const activeName = ref('second')
|
||||
|
||||
const getDetail = async () => {
|
||||
const id = route.query.id
|
||||
shareProcessViewer.value = false
|
||||
const {code, data, msg} = await getAllocationDetail(id)
|
||||
if (code === 1000) {
|
||||
shareData.value = data
|
||||
formData.value = data.formData
|
||||
processStore.setDesign(data)
|
||||
processStore.runningList.value = data.runningList;
|
||||
processStore.endList.value = data.endList;
|
||||
processStore.noTakeList.value = data.noTakeList;
|
||||
processStore.refuseList.value = data.refuseList;
|
||||
processStore.passList.value = data.passList;
|
||||
nextTick(() => {
|
||||
shareProcessViewer.value = true
|
||||
})
|
||||
} else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleClick = (tab) => {
|
||||
if (tab.index == 0) {
|
||||
getDetail()
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table--fit ) {
|
||||
width: 100%;
|
||||
height: 479px !important;
|
||||
}
|
||||
|
||||
:deep(.el-tabs__nav-scroll) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.el-tabs__nav {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.el-tabs__item {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.is-active {
|
||||
color: black;
|
||||
//background-color: #DED0B2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,242 @@
|
||||
<template>
|
||||
<!-- <special-fund-detail :formData="fundData.formData" :data="fundData" :showTable="showTable" :processViewer="fundProcessViewer"-->
|
||||
<!-- :loading="loading"/>-->
|
||||
|
||||
<div v-loading="loading">
|
||||
<baseTitle title="专项资金详情"></baseTitle>
|
||||
<el-form :model="formData" ref="form" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="专项名称">
|
||||
<span>{{ formData.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="金额(元)">
|
||||
<span>{{ toThousands(formData.fundAmount) }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="剩余金额(元)">
|
||||
<span>{{ toThousands(formData.residualAmount) }}</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.introduce">
|
||||
</div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="关联项目"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height:300px" v-if="showTable" :tableConfig="projectTable"
|
||||
:data="formData.projects" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<baseTitle title="附件列表"></baseTitle>
|
||||
<el-col :span="24">
|
||||
<el-form-item>
|
||||
<fvTable style="width: 100%;max-height: 300px;" v-if="showTable" :tableConfig="fileTable"
|
||||
:data="formData.files" :isSettingCol="false" :pagination="false">
|
||||
<template #empty>
|
||||
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||
</template>
|
||||
</fvTable>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div v-if="fundData.taskId">
|
||||
<baseTitle title="审核意见"></baseTitle>
|
||||
<el-form-item prop="auditOpinion">
|
||||
<el-input
|
||||
v-model="formData.auditOpinion"
|
||||
: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="fundProcessViewer && fundData.operationList && fundData.operationList.length > 0&&!changeDiagram"
|
||||
:operation-list="fundData.operationList"
|
||||
:state="fundData.state"/>
|
||||
<process-diagram-viewer v-if="fundProcessViewer&&changeDiagram" id-name="fundProcess"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<opinion-moblie v-if="fundData.taskId" :formData="formData" :taskId="fundData.taskId"
|
||||
v-model:value="formData.auditOpinion"></opinion-moblie>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import OperationRender from '@/views/workflow/common/OperationRender.vue'
|
||||
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
|
||||
import {downloadFile} from "@/api/project-demand";
|
||||
import {ElNotification} from "element-plus";
|
||||
import {useProcessStore} from '@/stores/processStore.js';
|
||||
import {getFundDetailProcess} from "@/api/special-fund";
|
||||
import OpinionMoblie from "./OpinionMoblie.vue";
|
||||
const processStore = useProcessStore()
|
||||
const route = useRoute()
|
||||
const changeDiagram = ref(false)
|
||||
const fundData = ref({})
|
||||
const formData = ref({})
|
||||
const fundProcessViewer = ref(true)
|
||||
const showTable = ref(true)
|
||||
const loading = ref(false)
|
||||
const projectTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'projectName',
|
||||
label: '项目名称',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'specialFundAmount',
|
||||
label: '项目金额',
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.specialFundAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
label: '项目时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<el-button type="primary" link onClick={() => handleView(row)}>查看</el-button>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const fileTable = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
type: 'index',
|
||||
label: '序号',
|
||||
align: 'center',
|
||||
width: '80',
|
||||
},
|
||||
{
|
||||
prop: 'originalFileName',
|
||||
label: '文件名',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
prop: 'tag',
|
||||
label: '标签',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'size',
|
||||
label: '文件大小',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => (parseInt(row.size / 1024) + 'KB')
|
||||
},
|
||||
{
|
||||
prop: 'oper',
|
||||
label: '操作',
|
||||
align: 'center',
|
||||
currentRender: ({row, index}) => {
|
||||
return (
|
||||
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
const handleView=(row)=>{
|
||||
router.push({
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId,
|
||||
projectId: row.projectId,
|
||||
// step: '40'
|
||||
}
|
||||
})
|
||||
}
|
||||
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()
|
||||
})
|
||||
}
|
||||
const getDetail = async () => {
|
||||
const specialFundId = route.query.id
|
||||
showTable.value = false
|
||||
loading.value = true
|
||||
fundProcessViewer.value = false
|
||||
const {code, data, msg} = await getFundDetailProcess(specialFundId)
|
||||
|
||||
if (code === 1000) {
|
||||
fundData.value = data
|
||||
formData.value = data.formData
|
||||
loading.value = false
|
||||
if(data.operationList==null)return;
|
||||
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(() => {
|
||||
fundProcessViewer.value = true
|
||||
showTable.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getDetail()
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -36,7 +36,7 @@
|
||||
:processViewer="commonProvessViewer"
|
||||
:fileListShow="fileListShow"
|
||||
v-model:value="auditOpinion"/>
|
||||
<ProjectApply :title="applyTitle"
|
||||
<project-apply-moblie :title="applyTitle"
|
||||
v-if="editShow"
|
||||
:mode="mode"
|
||||
:step="showActive"
|
||||
@@ -44,8 +44,7 @@
|
||||
:formData="detailData.formData"/>
|
||||
</template>
|
||||
</StepsMoblie>
|
||||
<div style="width: 100%;height: 30px"></div>
|
||||
<Opinion v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
<opinion-moblie v-if="detailData.taskId" :formData="detailData.formData" :taskId="detailData.taskId"
|
||||
v-model:value="auditOpinion"/>
|
||||
</template>
|
||||
|
||||
@@ -56,9 +55,10 @@ 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';
|
||||
import {getMapProjectStateInfo} from "./api";
|
||||
import OpinionMoblie from "./OpinionMoblie.vue";
|
||||
import ProjectApplyMoblie from "./ProjectApplyMoblie.vue";
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
@@ -70,7 +70,6 @@ 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)
|
||||
@@ -167,4 +166,4 @@ const stepChange = (data) => {
|
||||
//}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -19,11 +19,6 @@ const getDetail = async () => {
|
||||
loading.value = true
|
||||
fundProcessViewer.value = false
|
||||
const {code, data, msg} = await getFundDetailProcess(specialFundId)
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (code === 1000) {
|
||||
fundData.value = data
|
||||
loading.value = false
|
||||
@@ -39,6 +34,11 @@ const getDetail = async () => {
|
||||
showTable.value = true
|
||||
})
|
||||
}else {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
@@ -75,11 +77,14 @@ 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({
|
||||
@@ -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()
|
||||
|
||||
@@ -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