Merge pull request 'dj' (#237) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/237
This commit is contained in:
2024-05-28 04:05:49 +00:00
15 changed files with 299 additions and 155 deletions

View File

@@ -55,7 +55,22 @@ export const getProjectCheckProcess = (projectId) => {
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) => {
return request({
@@ -84,3 +99,4 @@ export const getProjectConclusionProcess = () => {
method: "get"
});
};

View File

@@ -165,41 +165,13 @@ const handleView = (row) => {
id: row.targetId
}
})
}
else if(row.targetState=='10'&&row.targetId){
router.push({
name: 'Summary/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
}
})
}else if(row.targetState=='20'&&row.targetId){
router.push({
name: 'Initiation/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
}
})
}else if(row.targetState=='40'&&row.targetId){
} else{
router.push({
name: 'Implementation/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
}
})
}else if(row.targetState=='50'&&row.targetId){
router.push({
name: 'Filing/detail',
query: {
id: row.targetId,
projectId: row.projectId,
state: row.state
projectId: row.targetId,
state: row.state,
step: row.targetState
}
})
}

View File

@@ -235,6 +235,7 @@ const submitParam = (item) => {
item.fileList.forEach(item => {
let obj = {
fileId: item.fileId,
tag: item.tag
}
files.push(obj)
})

View File

@@ -11,7 +11,7 @@
import {useAuthStore} from '@/stores/userstore.js'
import Tag from '@/components/Tag.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";
const authStore = useAuthStore()
@@ -140,20 +140,27 @@ const tableConfig = reactive({
params: {}
})
console.log('userInfo', userInfo.value.userName)
const search = (val) => {
tableConfig.params = {...val}
tableIns.value.refresh()
}
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) => {
router.push({

View File

@@ -316,7 +316,8 @@ const getOtherFile = (val) => {
}
const getFileParam = (item) => {
return {
fileId: item.fileId
fileId: item.fileId,
tag: item.tag
}
}
const handleSubmit = async (instance) => {

View File

@@ -123,6 +123,7 @@ const tableConfig = reactive({
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
console.log('buttons',buttons.has("details"))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
}

View File

@@ -121,7 +121,8 @@ const getOtherFile = (val) => {
const getFileParam = (item) => {
return {
fileId: item.fileId
fileId: item.fileId,
tag: item.tag
}
}
const handleSubmit = (instance) => {

View File

@@ -11,7 +11,7 @@
const searchConfig = reactive([
{
label: '名称',
prop: 'requirementName',
prop: 'projectName',
component: 'el-input',
props: {
placeholder: '请输入名称查询',
@@ -22,7 +22,7 @@ const searchConfig = reactive([
},
{
label: '项目费用',
prop: 'requirementName',
prop: 'projectCost',
component: 'el-input',
props: {
placeholder: '请输入项目费用查询',
@@ -33,7 +33,7 @@ const searchConfig = reactive([
},
{
label: '起始时间',
prop: 'datetime',
prop: 'time',
component: 'el-date-picker',
props: {
placeholder: '请选择起始时间',
@@ -48,41 +48,48 @@ const tableConfig = reactive({
prop: 'name',
type: 'index',
label: '序号',
width:'80'
width:'80',
align: 'center'
},
{
prop: 'name',
prop: 'projectName',
label: '项目名称',
align: 'center'
},{
prop: 'time',
label: '时间',
align: 'center'
},
{
prop: 'projectType',
prop: 'projectCost',
label: '项目费用',
align: 'center'
},
{
prop: 'productMainBody',
prop: 'researchStage',
label: '研发阶段',
align: 'center'
},
{
prop: 'projectEffect',
prop: 'digest',
label: '摘要',
align: 'center'
},
{
prop: 'survey',
prop: 'afterTax',
label: '税后余额(元)',
align: 'center'
}
],
api: '',
api: '/workflow/mosr/expense/ledger',
params: {},
btns: [
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''}
]
})
const router = useRouter()
const route = useRoute()
const tableIns=ref()
const headBtnClick = (key) => {
switch (key) {
case 'add':
@@ -93,9 +100,17 @@ const headBtnClick = (key) => {
const handleUploadFee = () => {
router.push({
name: 'Implementation/uploadFee',
query: {}
query: {
id:route.query.id
}
})
}
const search = (val) => {
console.log('val',val)
tableConfig.params = {...val}
tableIns.value.refresh()
}
</script>
<style scoped>

View File

@@ -1,7 +1,22 @@
<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%">
<file-upload @getFile="getOtherFile" :showFileList="true"/>
<fvTable style="width: 100%;max-height: 250px" v-if="showTable" :tableConfig="tableConfig"
:data="otherFileList" :isSettingCol="false" :pagination="false">
<template #empty>
@@ -12,22 +27,17 @@
</template>
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {shallowRef} from "vue";
import {downloadFile} from "@/api/project-demand";
import {getImplementationAttachment} from "@/api/project-manage";
import {ElNotification} from "element-plus";
const searchConfig = reactive([
{
label: '标签',
prop: 'collectType',
component: shallowRef(fvSelect),
props: {
placeholder: '请选择标签',
clearable: true,
filterable: true,
}
}
])
const route = useRoute()
const router = useRouter()
const attachment=reactive({
tag:''
})
const tagsOption = ref([])
const tableConfig = reactive({
columns: [
{
@@ -70,8 +80,31 @@ const tableConfig = reactive({
})
const showTable=ref(true)
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) => {
downloadFile(row.fileId).then(res => {
@@ -82,6 +115,7 @@ const handleDownload = (row) => {
a.click()
})
}
getTagsOption()
</script>
<style scoped>

View File

@@ -75,7 +75,8 @@ const getOtherFile = (val) => {
const getFileParam = (item) => {
return {
fileId: item.fileId
fileId: item.fileId,
tag: item.tag
}
}
const handleSubmit = (instance) => {

View File

@@ -50,6 +50,7 @@ const summaryProcessViewer = ref(true)
const processStore = useProcessStore()
const companyOption = ref([])
const cuurentStep = ref()
route.query.step == '10' && (cuurentStep.value = 1)
route.query.step == '20' && (cuurentStep.value = 2)
route.query.step == '40' && (cuurentStep.value = 3)
route.query.step == '50' && (cuurentStep.value = 4)

View File

@@ -146,7 +146,7 @@ const tableConfig = reactive({
label: '状态',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) =>{
currentRender: ({row, index}) => {
if (row.state !== null) {
return (<Tag dictType={'project_initiation'} value={row.state}/>)
} else {
@@ -166,22 +166,22 @@ const tableConfig = reactive({
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
}
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")) {
btn.push({label: '编辑',prem: ['mosr:requirement:del'], 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'})
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("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")) {
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 (
<div style={{width: '100%'}}>
@@ -216,7 +216,7 @@ const search = (val) => {
const handleDetail = (row) => {
router.push({
name:'Implementation/detail',
name: 'Implementation/detail',
query: {
id: row.requirementId,
projectId: row.projectId,
@@ -247,7 +247,7 @@ const handleStandingBook = (row) => {
router.push({
name: 'Implementation/account',
query: {
id: row.requirementId
id: row.projectId
}
})
}

View 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>

View File

@@ -1,84 +1,120 @@
<template>
<el-form :model="formData" ref="demandForm" label-width="auto">
<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>
<baseTitle title="上传费用"></baseTitle>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="date" label="时间" width="180" >
<el-table-column prop="projectName" label="项目名称">
<template #default="scope">
<el-input v-model="scope.row.uqName" placeholder="请输入时间" clearable>
</el-input>
<el-input v-model="scope.row.projectName" placeholder="请输入项目名称" clearable>
</el-input>
</template>
</el-table-column>
<el-table-column prop="name" label="项目费用" width="180" />
<el-table-column prop="address" label="研发阶段" />
<el-table-column prop="address" label="摘要" />
<el-table-column prop="address" label="税后余额(元)" />
<el-table-column prop="address" label="操作" >
<el-table-column prop="time" label="时间" width="250">
<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>
</el-table-column>
</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>
<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 tableData = [
const tableData = ref([
{
date: '2016-05-03',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
{
date: '2016-05-02',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
{
date: '2016-05-04',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
{
date: '2016-05-01',
name: 'Tom',
address: 'No. 189, Grove St, Los Angeles',
},
]
projectId: route.query.id,
projectName: '',
time: '',
projectCost: '',
researchStage: '',
digest: '',
afterTax: ''
}
])
const handleAdd = () => {
let row = {
projectId: route.query.id,
projectName: '',
time: '',
projectCost: '',
researchStage: '',
digest: '',
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>
<style scoped>
</style>

View File

@@ -118,7 +118,8 @@ const getOtherFile = (val) => {
}
const getFileParam = (item) => {
return {
fileId: item.fileId
fileId: item.fileId,
tag: item.tag
}
}
const handleSubmit = (instance) => {