Merge pull request 'prod' (#1105) from prod into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1105
This commit is contained in:
@@ -13,6 +13,9 @@ a {
|
||||
html, body, #app, .el-container, .el-aside, .el-main {
|
||||
height: 100%;
|
||||
}
|
||||
.el-date-editor--year{
|
||||
width: 100%!important;
|
||||
}
|
||||
|
||||
.el-breadcrumb__item {
|
||||
line-height: 65px;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 15px"></fvSearchForm>
|
||||
<div style="float: left">
|
||||
<import-cost-excel @success="importTheExpenseLedger"/>
|
||||
<import-cost-excel @success="importTheExpenseLedger"/>
|
||||
</div>
|
||||
<fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick" :changeExportPosition="true">
|
||||
<fvTable ref="tableIns" class="tablte" :tableConfig="tableConfig" @headBtnClick="headBtnClick"
|
||||
:changeExportPosition="true">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
@@ -21,10 +22,36 @@ import {
|
||||
getMasterProjectNameOption,
|
||||
getSubprojectNameOption
|
||||
} from "@/api/project-demand/summary/index.js";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const searchConfig = ref([
|
||||
|
||||
{
|
||||
label: '年份',
|
||||
prop: 'rdYear',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择年份',
|
||||
clearable: true,
|
||||
type: 'year',
|
||||
format: 'YYYY',
|
||||
valueFormat: 'YYYY',
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '月份',
|
||||
prop: 'rdMonth',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择月份',
|
||||
clearable: true,
|
||||
type: 'month',
|
||||
format: 'M',
|
||||
valueFormat: 'M',
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
@@ -35,10 +62,12 @@ const searchConfig = ref([
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
console.log('val',val)
|
||||
if(val){
|
||||
await getMasterProjectName( val)
|
||||
remoteMethod: async (val) => {
|
||||
console.log('val', val)
|
||||
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = JSON.parse(localStorage.getItem("masterProjectNameOption"))
|
||||
|
||||
if (val) {
|
||||
await getMasterProjectName(val)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -54,9 +83,11 @@ const searchConfig = ref([
|
||||
filterable: true,
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
if(val){
|
||||
await getSubprojectName(val)
|
||||
remoteMethod: async (val) => {
|
||||
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = JSON.parse(localStorage.getItem("subprojectNameOption"))
|
||||
|
||||
if (val) {
|
||||
await getSubprojectName(val)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -96,19 +127,7 @@ const searchConfig = ref([
|
||||
// },
|
||||
// colProps: {}
|
||||
// },
|
||||
// {
|
||||
// label: '归档时间',
|
||||
// prop: 'filingTime',
|
||||
// component: 'el-date-picker',
|
||||
// props: {
|
||||
// placeholder: '请选择归档时间',
|
||||
// clearable: true,
|
||||
// type:'date',
|
||||
// format: 'YYYY-MM-DD HH:mm',
|
||||
// valueFormat:'YYYY-MM-DD HH:mm',
|
||||
// },
|
||||
// colProps: {}
|
||||
// },
|
||||
|
||||
])
|
||||
const tableIns = ref()
|
||||
const tableConfig = reactive({
|
||||
@@ -217,40 +236,46 @@ const tableConfig = reactive({
|
||||
{name: '模板下载', key: 'down', color: '#DED0B2'},
|
||||
// {name: '导入', key: 'import', color: '#DED0B2'}
|
||||
],
|
||||
export:{
|
||||
open :true,
|
||||
fileName:`研发费用明细表`
|
||||
export: {
|
||||
open: true,
|
||||
fileName: `研发费用明细表`
|
||||
}
|
||||
})
|
||||
|
||||
const getMasterProjectName =async (val) => {
|
||||
const res=await getExpenseMasterProjectNameOption(val)
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
const getMasterProjectName = async (val) => {
|
||||
const res = await getExpenseMasterProjectNameOption(val)
|
||||
if (res.code == 1000) {
|
||||
let optionObj = {}
|
||||
let optionsMap = new Map();
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item.label,
|
||||
label:item.label
|
||||
res.data.forEach(item => {
|
||||
optionObj = {
|
||||
value: item.label,
|
||||
label: item.label
|
||||
}
|
||||
optionsMap.set(optionObj.value, optionObj);
|
||||
})
|
||||
if (!val) {
|
||||
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||
}
|
||||
// 将 Map 转换为数组
|
||||
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
|
||||
}
|
||||
}
|
||||
const getSubprojectName =async (val) => {
|
||||
const res=await getExpenseSubprojectNameOption(val)
|
||||
if(res.code==1000){
|
||||
let optionObj={}
|
||||
const getSubprojectName = async (val) => {
|
||||
const res = await getExpenseSubprojectNameOption(val)
|
||||
if (res.code == 1000) {
|
||||
let optionObj = {}
|
||||
let optionsMap = new Map();
|
||||
res.data.forEach(item=>{
|
||||
optionObj={
|
||||
value:item.label,
|
||||
label:item.label
|
||||
res.data.forEach(item => {
|
||||
optionObj = {
|
||||
value: item.label,
|
||||
label: item.label
|
||||
}
|
||||
optionsMap.set(optionObj.value, optionObj);
|
||||
})
|
||||
if (!val) {
|
||||
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||
}
|
||||
// 将 Map 转换为数组
|
||||
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
|
||||
}
|
||||
@@ -259,7 +284,15 @@ getMasterProjectName()
|
||||
getSubprojectName()
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
// 去除 rdMonth 前置0
|
||||
|
||||
let param={
|
||||
...val
|
||||
}
|
||||
if (param.rdMonth) {
|
||||
param.rdMonth = parseInt(param.rdMonth, 10).toString();
|
||||
}
|
||||
tableConfig.params = {...param}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
|
||||
@@ -282,23 +315,23 @@ const exportTable = () => {
|
||||
exportExcel($table, (5 + (Object.keys(tableData.value[0]).length - 5) * 5), "四川省国有资产经营投资管理有限责任公司科技创新项目人工成本分摊明细表", 2)
|
||||
}
|
||||
//导入模板下载
|
||||
const handleImportTemplateDownload=()=>{
|
||||
const handleImportTemplateDownload = () => {
|
||||
costTemplateDownload().then(res => {
|
||||
let link = document.createElement('a')
|
||||
try {
|
||||
let blob = new Blob([res.data],{type: 'application/vnd.ms-excel'});
|
||||
let blob = new Blob([res.data], {type: 'application/vnd.ms-excel'});
|
||||
let _fileName = "研发费用明细表模板.xlsx"//文件名,中文无法解析的时候会显示 _(下划线),生产环境获取不到
|
||||
link.style.display='none';
|
||||
link.style.display = 'none';
|
||||
// 兼容不同浏览器的URL对象
|
||||
const url = window.URL || window.webkitURL || window.moxURL;
|
||||
link.href=url.createObjectURL(blob);
|
||||
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_')+1))
|
||||
link.href = url.createObjectURL(blob);
|
||||
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
url.revokeObjectURL(link.href);//销毁url对象
|
||||
}catch (e) {
|
||||
console.log('下载的文件出错',e)
|
||||
} catch (e) {
|
||||
console.log('下载的文件出错', e)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -307,9 +340,10 @@ const importTheExpenseLedger = () => {
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-form-item__label-wrap){
|
||||
margin-left: 0!important;
|
||||
:deep(.el-form-item__label-wrap) {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__header) {
|
||||
.is-leaf:first-child {
|
||||
.cell {
|
||||
@@ -325,7 +359,8 @@ const importTheExpenseLedger = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-date-editor--month){
|
||||
|
||||
:deep(.el-date-editor--month) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,32 @@ const router = useRouter()
|
||||
const route = useRoute()
|
||||
const searchConfig = ref(
|
||||
[
|
||||
|
||||
{
|
||||
label: '年份',
|
||||
prop: 'paymentYear',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择年份',
|
||||
clearable: true,
|
||||
type: 'year',
|
||||
format: 'YYYY',
|
||||
valueFormat: 'YYYY',
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '月份',
|
||||
prop: 'paymentMonth',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择月份',
|
||||
clearable: true,
|
||||
type: 'month',
|
||||
format: 'M',
|
||||
valueFormat: 'M',
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
@@ -33,6 +58,8 @@ const searchConfig = ref(
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
console.log('val',val)
|
||||
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options= JSON.parse(localStorage.getItem("masterProjectNameOption"))
|
||||
|
||||
if(val){
|
||||
await getMasterProjectName( val)
|
||||
}
|
||||
@@ -50,6 +77,7 @@ const searchConfig = ref(
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
searchConfig.value.find(item => item.prop == 'subProjectName').props.options= JSON.parse(localStorage.getItem("subprojectNameOption"))
|
||||
if(val){
|
||||
await getSubprojectName(val)
|
||||
}
|
||||
@@ -229,6 +257,9 @@ const getMasterProjectName =async (val) => {
|
||||
}
|
||||
optionsMap.set(optionObj.value, optionObj);
|
||||
})
|
||||
if(!val){
|
||||
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||
}
|
||||
// 将 Map 转换为数组
|
||||
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
|
||||
}
|
||||
@@ -245,6 +276,9 @@ const getSubprojectName =async (val) => {
|
||||
}
|
||||
optionsMap.set(optionObj.value, optionObj);
|
||||
})
|
||||
if(!val){
|
||||
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||
}
|
||||
// 将 Map 转换为数组
|
||||
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
|
||||
}
|
||||
@@ -252,7 +286,13 @@ const getSubprojectName =async (val) => {
|
||||
getMasterProjectName()
|
||||
getSubprojectName()
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
let param={
|
||||
...val
|
||||
}
|
||||
if (param.paymentMonth) {
|
||||
param.paymentMonth = parseInt(param.paymentMonth, 10).toString();
|
||||
}
|
||||
tableConfig.params = {...param}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const init = async () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
|
||||
<fvSearchForm :searchConfig="searchConfig" @search="search" ></fvSearchForm>
|
||||
<!-- <el-button color="#DED0B2" style="float: left;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>-->
|
||||
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" style="margin-top: 15px" @selectionChange="selectionChange">
|
||||
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" @selectionChange="selectionChange">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
@@ -24,7 +24,32 @@ import {
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const searchConfig = ref([
|
||||
|
||||
{
|
||||
label: '年份',
|
||||
prop: 'paymentYear',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择年份',
|
||||
clearable: true,
|
||||
type: 'year',
|
||||
format: 'YYYY',
|
||||
valueFormat: 'YYYY',
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '月份',
|
||||
prop: 'paymentMonth',
|
||||
component: 'el-date-picker',
|
||||
props: {
|
||||
placeholder: '请选择月份',
|
||||
clearable: true,
|
||||
type: 'month',
|
||||
format: 'M',
|
||||
valueFormat: 'M',
|
||||
},
|
||||
colProps: {}
|
||||
},
|
||||
{
|
||||
label: '主项目',
|
||||
prop: 'masterProjectName',
|
||||
@@ -37,6 +62,8 @@ const searchConfig = ref([
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
console.log('val',val)
|
||||
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options= JSON.parse(localStorage.getItem("masterProjectNameOption"))
|
||||
|
||||
if(val){
|
||||
|
||||
await getMasterProjectName( val)
|
||||
@@ -55,6 +82,8 @@ const searchConfig = ref([
|
||||
options: [],
|
||||
remote: true,
|
||||
remoteMethod:async (val)=>{
|
||||
searchConfig.value.find(item => item.prop == 'subProjectName').props.options= JSON.parse(localStorage.getItem("subprojectNameOption"))
|
||||
|
||||
if(val){
|
||||
await getSubprojectName(val)
|
||||
|
||||
@@ -190,6 +219,9 @@ const getMasterProjectName =async (val) => {
|
||||
}
|
||||
optionsMap.set(optionObj.value, optionObj);
|
||||
})
|
||||
if(!val){
|
||||
localStorage.setItem('masterProjectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||
}
|
||||
// 将 Map 转换为数组
|
||||
searchConfig.value.find(item => item.prop == 'masterProjectName').props.options = Array.from(optionsMap.values())
|
||||
}
|
||||
@@ -206,6 +238,9 @@ const getSubprojectName =async (val) => {
|
||||
}
|
||||
optionsMap.set(optionObj.value, optionObj);
|
||||
})
|
||||
if(!val){
|
||||
localStorage.setItem('subprojectNameOption', JSON.stringify(Array.from(optionsMap.values())))
|
||||
}
|
||||
// 将 Map 转换为数组
|
||||
searchConfig.value.find(item => item.prop == 'subProjectName').props.options = Array.from(optionsMap.values())
|
||||
}
|
||||
@@ -214,7 +249,13 @@ getMasterProjectName()
|
||||
getSubprojectName()
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
let param={
|
||||
...val
|
||||
}
|
||||
if (param.paymentMonth) {
|
||||
param.paymentMonth = parseInt(param.paymentMonth, 10).toString();
|
||||
}
|
||||
tableConfig.params = {...param}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const headBtnClick = (key) => {
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
</div>
|
||||
<div style="width: 100%;height: 30px"></div>
|
||||
<div class="oper-page-btn">
|
||||
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'" @click="handleSubmit(demandForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit(demandForm)">重新提交</el-button>
|
||||
<el-button color="#DED0B2" v-if="routerName==='Requirement/add'&&formData.state=='3'" @click="handleSubmit(demandForm)">提交</el-button>
|
||||
<el-button color="#DED0B2" v-else-if="routerName==='Requirement/edit'&&formData.state=='3'" @click="handleResubmit(demandForm)">重新提交</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
<company-picker :multiple="true" ref="companyRef" title="请选择征集公司" @ok="sureSelectedCompany" @cancelOrClear="cancelSelectedCompany"
|
||||
@@ -180,6 +180,7 @@ const formData = ref({
|
||||
collectType: '科技创新与信息化系统建设',
|
||||
deadline: '',
|
||||
collectExplain: '',
|
||||
state: '',
|
||||
fileList: [],
|
||||
isSpecialFund: false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user