fix : 修复项目实施中功能细节
This commit is contained in:
@@ -55,7 +55,22 @@ export const getProjectCheckProcess = (projectId) => {
|
|||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const getImplementationAttachment = (projectId) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/project/implementation/tags',
|
||||||
|
method: "get",
|
||||||
|
params:{
|
||||||
|
projectId:projectId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
export const addLedger = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/mosr/expense/ledger',
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
//项目归档
|
//项目归档
|
||||||
export const getConclusionDetail = (ProjectId) => {
|
export const getConclusionDetail = (ProjectId) => {
|
||||||
return request({
|
return request({
|
||||||
@@ -84,3 +99,4 @@ export const getProjectConclusionProcess = () => {
|
|||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,6 @@ const handleView = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/detail',
|
name: 'Implementation/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.targetId,
|
|
||||||
projectId: row.targetId,
|
projectId: row.targetId,
|
||||||
state: row.state,
|
state: row.state,
|
||||||
step: row.targetState
|
step: row.targetState
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ const submitParam = (item) => {
|
|||||||
item.fileList.forEach(item => {
|
item.fileList.forEach(item => {
|
||||||
let obj = {
|
let obj = {
|
||||||
fileId: item.fileId,
|
fileId: item.fileId,
|
||||||
|
tag: item.tag
|
||||||
}
|
}
|
||||||
files.push(obj)
|
files.push(obj)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
import {useAuthStore} from '@/stores/userstore.js'
|
import {useAuthStore} from '@/stores/userstore.js'
|
||||||
import Tag from '@/components/Tag.vue'
|
import Tag from '@/components/Tag.vue'
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage, ElNotification} from "element-plus";
|
||||||
import {deleteDemand} from "@/api/project-demand";
|
import {deleteDemand} from "@/api/project-demand";
|
||||||
|
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
@@ -140,20 +140,27 @@ const tableConfig = reactive({
|
|||||||
params: {}
|
params: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('userInfo', userInfo.value.userName)
|
|
||||||
|
|
||||||
const search = (val) => {
|
const search = (val) => {
|
||||||
tableConfig.params = {...val}
|
tableConfig.params = {...val}
|
||||||
tableIns.value.refresh()
|
tableIns.value.refresh()
|
||||||
}
|
}
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
|
try{
|
||||||
|
router.push({
|
||||||
|
name:'Requirement/add',
|
||||||
|
query: {
|
||||||
|
isAdd: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}catch (err){
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '该用户无新增权限',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
//新增
|
//新增
|
||||||
router.push({
|
|
||||||
name:'Requirement/add',
|
|
||||||
query: {
|
|
||||||
isAdd: 1
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
const handleEdit = (row) => {
|
const handleEdit = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
@@ -316,7 +316,8 @@ const getOtherFile = (val) => {
|
|||||||
}
|
}
|
||||||
const getFileParam = (item) => {
|
const getFileParam = (item) => {
|
||||||
return {
|
return {
|
||||||
fileId: item.fileId
|
fileId: item.fileId,
|
||||||
|
tag: item.tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ const tableConfig = reactive({
|
|||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
let btn = []
|
let btn = []
|
||||||
let buttons = new Set(Array.from(row.buttons))
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
|
console.log('buttons',buttons.has("details"))
|
||||||
if (buttons.has("details")) {
|
if (buttons.has("details")) {
|
||||||
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,8 @@ const getOtherFile = (val) => {
|
|||||||
|
|
||||||
const getFileParam = (item) => {
|
const getFileParam = (item) => {
|
||||||
return {
|
return {
|
||||||
fileId: item.fileId
|
fileId: item.fileId,
|
||||||
|
tag: item.tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '名称',
|
label: '名称',
|
||||||
prop: 'requirementName',
|
prop: 'projectName',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入名称查询',
|
placeholder: '请输入名称查询',
|
||||||
@@ -22,7 +22,7 @@ const searchConfig = reactive([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目费用',
|
label: '项目费用',
|
||||||
prop: 'requirementName',
|
prop: 'projectCost',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入项目费用查询',
|
placeholder: '请输入项目费用查询',
|
||||||
@@ -33,7 +33,7 @@ const searchConfig = reactive([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '起始时间',
|
label: '起始时间',
|
||||||
prop: 'datetime',
|
prop: 'time',
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择起始时间',
|
placeholder: '请选择起始时间',
|
||||||
@@ -48,41 +48,48 @@ const tableConfig = reactive({
|
|||||||
prop: 'name',
|
prop: 'name',
|
||||||
type: 'index',
|
type: 'index',
|
||||||
label: '序号',
|
label: '序号',
|
||||||
width:'80'
|
width:'80',
|
||||||
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'projectName',
|
||||||
|
label: '项目名称',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
|
prop: 'time',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectType',
|
prop: 'projectCost',
|
||||||
label: '项目费用',
|
label: '项目费用',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productMainBody',
|
prop: 'researchStage',
|
||||||
label: '研发阶段',
|
label: '研发阶段',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'projectEffect',
|
prop: 'digest',
|
||||||
label: '摘要',
|
label: '摘要',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'survey',
|
prop: 'afterTax',
|
||||||
label: '税后余额(元)',
|
label: '税后余额(元)',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '',
|
api: '/workflow/mosr/expense/ledger',
|
||||||
params: {},
|
params: {},
|
||||||
btns: [
|
btns: [
|
||||||
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''}
|
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
const tableIns=ref()
|
||||||
const headBtnClick = (key) => {
|
const headBtnClick = (key) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'add':
|
case 'add':
|
||||||
@@ -93,9 +100,17 @@ const headBtnClick = (key) => {
|
|||||||
const handleUploadFee = () => {
|
const handleUploadFee = () => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/uploadFee',
|
name: 'Implementation/uploadFee',
|
||||||
query: {}
|
query: {
|
||||||
|
id:route.query.id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const search = (val) => {
|
||||||
|
console.log('val',val)
|
||||||
|
tableConfig.params = {...val}
|
||||||
|
tableIns.value.refresh()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -1,7 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
<el-form :model="attachment" inline class="query-form" ref="queryForm">
|
||||||
|
<el-form-item label="标签" prop="tag">
|
||||||
|
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 200px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in tagsOption"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="handleSearch" color="#DED0B2" >搜索</el-button>
|
||||||
|
<el-button @click="handleUpload" color="#DED0B2" >上传附件</el-button>
|
||||||
|
<!-- <file-upload @getFile="getFile" :showFileList="true"/>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<el-card style="width: 100%">
|
<el-card style="width: 100%">
|
||||||
<file-upload @getFile="getOtherFile" :showFileList="true"/>
|
|
||||||
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
@@ -12,22 +27,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
|
||||||
import {shallowRef} from "vue";
|
|
||||||
import {downloadFile} from "@/api/project-demand";
|
import {downloadFile} from "@/api/project-demand";
|
||||||
|
import {getImplementationAttachment} from "@/api/project-manage";
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
|
||||||
const searchConfig = reactive([
|
const route = useRoute()
|
||||||
{
|
const router = useRouter()
|
||||||
label: '标签',
|
const attachment=reactive({
|
||||||
prop: 'collectType',
|
tag:''
|
||||||
component: shallowRef(fvSelect),
|
})
|
||||||
props: {
|
|
||||||
placeholder: '请选择标签',
|
const tagsOption = ref([])
|
||||||
clearable: true,
|
|
||||||
filterable: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
|
||||||
const tableConfig = reactive({
|
const tableConfig = reactive({
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -70,8 +80,31 @@ const tableConfig = reactive({
|
|||||||
})
|
})
|
||||||
const showTable=ref(true)
|
const showTable=ref(true)
|
||||||
const otherFileList = ref([])
|
const otherFileList = ref([])
|
||||||
const getOtherFile = () => {
|
|
||||||
|
|
||||||
|
const getTagsOption = (id=route.query.id) => {
|
||||||
|
if(!route.query.id) return
|
||||||
|
getImplementationAttachment(id).then(res => {
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if(res.code === 1000) {
|
||||||
|
tagsOption.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleSearch = () => {
|
||||||
|
console.log('attachment.tag',attachment.tag)
|
||||||
|
// getTagsOption()
|
||||||
|
}
|
||||||
|
const handleUpload=()=>{
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation/upload',
|
||||||
|
query: {
|
||||||
|
id: route.query.id
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const handleDownload = (row) => {
|
const handleDownload = (row) => {
|
||||||
downloadFile(row.fileId).then(res => {
|
downloadFile(row.fileId).then(res => {
|
||||||
@@ -82,6 +115,7 @@ const handleDownload = (row) => {
|
|||||||
a.click()
|
a.click()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
getTagsOption()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ const getOtherFile = (val) => {
|
|||||||
|
|
||||||
const getFileParam = (item) => {
|
const getFileParam = (item) => {
|
||||||
return {
|
return {
|
||||||
fileId: item.fileId
|
fileId: item.fileId,
|
||||||
|
tag: item.tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ const tableConfig = reactive({
|
|||||||
label: '状态',
|
label: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) =>{
|
currentRender: ({row, index}) => {
|
||||||
if (row.state !== null) {
|
if (row.state !== null) {
|
||||||
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
return (<Tag dictType={'project_initiation'} value={row.state}/>)
|
||||||
} else {
|
} else {
|
||||||
@@ -166,22 +166,22 @@ const tableConfig = reactive({
|
|||||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("check")) {
|
if (buttons.has("check")) {
|
||||||
btn.push({label: '验收',prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
|
btn.push({label: '验收', prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("edit")) {
|
if (buttons.has("edit")) {
|
||||||
btn.push({label: '编辑',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['mosr:requirement:info'], func: () => handleEdit(row), type: 'primary'})
|
||||||
}
|
|
||||||
if (buttons.has("standing")) {
|
|
||||||
btn.push({label: '台账',prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
|
||||||
}
|
|
||||||
if (buttons.has("attachments")) {
|
|
||||||
btn.push({label: '附件',prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
|
||||||
}
|
}
|
||||||
|
// if (buttons.has("standing")) {
|
||||||
|
btn.push({label: '台账', prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||||
|
// }
|
||||||
|
// if (buttons.has("attachments")) {
|
||||||
|
btn.push({label: '附件', prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||||
|
// }
|
||||||
if (buttons.has("viewAllocation")) {
|
if (buttons.has("viewAllocation")) {
|
||||||
btn.push({label: '查看分摊',prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
btn.push({label: '查看分摊', prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("phaseChange")) {
|
if (buttons.has("phaseChange")) {
|
||||||
btn.push({label: '阶段变更',prem: ['mosr:requirement:info'], func: () => handleChange(row), type: 'primary'})
|
btn.push({label: '阶段变更', prem: ['mosr:requirement:info'], func: () => handleChange(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
@@ -216,7 +216,7 @@ const search = (val) => {
|
|||||||
|
|
||||||
const handleDetail = (row) => {
|
const handleDetail = (row) => {
|
||||||
router.push({
|
router.push({
|
||||||
name:'Implementation/detail',
|
name: 'Implementation/detail',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId,
|
id: row.requirementId,
|
||||||
projectId: row.projectId,
|
projectId: row.projectId,
|
||||||
@@ -247,7 +247,7 @@ const handleStandingBook = (row) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Implementation/account',
|
name: 'Implementation/account',
|
||||||
query: {
|
query: {
|
||||||
id: row.requirementId
|
id: row.projectId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
57
src/views/project-management/implementation/upload.vue
Normal file
57
src/views/project-management/implementation/upload.vue
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<template>
|
||||||
|
<baseTitle title="标签名称"></baseTitle>
|
||||||
|
<el-input v-model="tagName" placeholder="请输入标签名称"/>
|
||||||
|
<el-card style="width: 100%;margin: 15px 0">
|
||||||
|
<file-upload @getFile="getOtherFile"/>
|
||||||
|
<fvTable style="width: 100%;max-height: 250px;height: 250px" v-if="showTable" :tableConfig="tableConfig"
|
||||||
|
:data="otherFileList" :isSettingCol="false" :pagination="false">
|
||||||
|
<template #empty>
|
||||||
|
<el-empty :image-size="90" description="暂无数据" style="padding: 0"/>
|
||||||
|
</template>
|
||||||
|
</fvTable>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="jsx">
|
||||||
|
const tagName = ref('')
|
||||||
|
const otherFileList = ref([])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'originalFileName',
|
||||||
|
label: '附件名称',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '标签',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tag',
|
||||||
|
label: '文件大小',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" link onClick={() => handleDownload(row)}>下载</el-button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const showTable = ref(true)
|
||||||
|
const getOtherFile = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,84 +1,120 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form :model="formData" ref="demandForm" label-width="auto">
|
<baseTitle title="上传费用"></baseTitle>
|
||||||
<baseTitle title="上传费用"></baseTitle>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目名称">
|
|
||||||
<span>{{ formData.requirementName }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目负责人">
|
|
||||||
<span>{{ formData.companyIds }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目开始时间">
|
|
||||||
<span>{{ formData.collectType }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目预计持续时间">
|
|
||||||
<span>{{ formData.deadline }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目开展方式">
|
|
||||||
<span>{{ formData.deadline }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目预算">
|
|
||||||
<span>{{ formData.deadline }}</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<el-table :data="tableData" style="width: 100%">
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column prop="date" label="时间" width="180" >
|
<el-table-column prop="projectName" label="项目名称">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.uqName" placeholder="请输入时间" clearable>
|
<el-input v-model="scope.row.projectName" placeholder="请输入项目名称" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="项目费用" width="180" />
|
<el-table-column prop="time" label="时间" width="250">
|
||||||
<el-table-column prop="address" label="研发阶段" />
|
|
||||||
<el-table-column prop="address" label="摘要" />
|
|
||||||
<el-table-column prop="address" label="税后余额(元)" />
|
|
||||||
<el-table-column prop="address" label="操作" >
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" size="mini" @click="handleDelete(scope.row)" link>删除</el-button>
|
<el-date-picker
|
||||||
|
v-model="scope.row.time"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
placeholder="选择时间"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="projectCost" label="项目费用">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.projectCost" placeholder="请输入项目费用" clearable>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="researchStage" label="研发阶段">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.researchStage" placeholder="请选择研发阶段" clearable>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="digest" label="摘要">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.digest" placeholder="请输入摘要" clearable>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="afterTax" label="税后余额(元)">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-model="scope.row.afterTax" placeholder="请输入税后余额" clearable>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="oper" label="操作">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" @click="handleDelete(scope.$index)" link style="font-size: 18px">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div style="width:100%;text-align: center;padding: 10px">
|
||||||
|
<el-button type="primary" @click="handleAdd" link style="font-size: 18px">添加一行</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="oper-page-btn">
|
||||||
|
<el-button color="#DED0B2" @click="handleSubmit">提交</el-button>
|
||||||
|
<el-button @click="handleBack">返回</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
|
import {ElNotification} from "element-plus";
|
||||||
|
import {addLedger} from "@/api/project-manage";
|
||||||
|
import {useTagsView} from '@/stores/tagsview.js'
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const tagsViewStore = useTagsView()
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const tableData = [
|
const tableData = ref([
|
||||||
{
|
{
|
||||||
date: '2016-05-03',
|
projectId: route.query.id,
|
||||||
name: 'Tom',
|
projectName: '',
|
||||||
address: 'No. 189, Grove St, Los Angeles',
|
time: '',
|
||||||
},
|
projectCost: '',
|
||||||
{
|
researchStage: '',
|
||||||
date: '2016-05-02',
|
digest: '',
|
||||||
name: 'Tom',
|
afterTax: ''
|
||||||
address: 'No. 189, Grove St, Los Angeles',
|
}
|
||||||
},
|
])
|
||||||
{
|
const handleAdd = () => {
|
||||||
date: '2016-05-04',
|
let row = {
|
||||||
name: 'Tom',
|
projectId: route.query.id,
|
||||||
address: 'No. 189, Grove St, Los Angeles',
|
projectName: '',
|
||||||
},
|
time: '',
|
||||||
{
|
projectCost: '',
|
||||||
date: '2016-05-01',
|
researchStage: '',
|
||||||
name: 'Tom',
|
digest: '',
|
||||||
address: 'No. 189, Grove St, Los Angeles',
|
afterTax: ''
|
||||||
},
|
}
|
||||||
]
|
tableData.value.push(row)
|
||||||
|
}
|
||||||
|
const handleDelete = (index) => {
|
||||||
|
tableData.value.splice(index, 1)
|
||||||
|
}
|
||||||
|
const handleSubmit = (instance) => {
|
||||||
|
// if (!instance) return
|
||||||
|
// instance.validate(async (valid) => {
|
||||||
|
// if (!valid) return
|
||||||
|
let params = {}
|
||||||
|
console.log('params', tableData.value)
|
||||||
|
const res = addLedger(tableData.value)
|
||||||
|
ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: res.msg,
|
||||||
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
|
})
|
||||||
|
if (res.code === 1000) {
|
||||||
|
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||||
|
router.push({
|
||||||
|
name: 'Implementation'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
const handleBack = () => {
|
||||||
|
history.back()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -118,7 +118,8 @@ const getOtherFile = (val) => {
|
|||||||
}
|
}
|
||||||
const getFileParam = (item) => {
|
const getFileParam = (item) => {
|
||||||
return {
|
return {
|
||||||
fileId: item.fileId
|
fileId: item.fileId,
|
||||||
|
tag: item.tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user