Commit 3f7285f6 authored by xinzhedeai's avatar xinzhedeai

企业 经营信息字段修改

parent 0af78bc3
...@@ -876,7 +876,7 @@ var reqApis = function(){ ...@@ -876,7 +876,7 @@ var reqApis = function(){
<input type="checkbox" id="updateJYYN" value="yes"> 是否更新已存在企业经营信息数据(同年份同企业) <input type="checkbox" id="updateJYYN" value="yes"> 是否更新已存在企业经营信息数据(同年份同企业)
</div> </div>
</div> </div>
<div style="color:red;">仅允许导入xls、xlsx格式文件</div>hjoz <div style="color:red;">仅允许导入xls、xlsx格式文件</div>
</div> </div>
<div class="el-dialog__footer"><div class="dialog-footer"><button type="button" class="el-button el-button--text el-button--small cancel">取消</button><button type="button" class="el-button el-button--primary el-button--small confirm">确认</button></div></div> <div class="el-dialog__footer"><div class="dialog-footer"><button type="button" class="el-button el-button--text el-button--small cancel">取消</button><button type="button" class="el-button el-button--primary el-button--small confirm">确认</button></div></div>
</div> </div>
...@@ -1062,6 +1062,10 @@ var reqApis = function(){ ...@@ -1062,6 +1062,10 @@ var reqApis = function(){
"revenueLastYear": {name:"上年营收收入(万元)", must:true}, "revenueLastYear": {name:"上年营收收入(万元)", must:true},
"netProfit": {name:"净利润(万元)", must:true}, "netProfit": {name:"净利润(万元)", must:true},
"taxesPaid": {name:"上缴税费(万元)"}, "taxesPaid": {name:"上缴税费(万元)"},
"grossIncome": {name:"总收入(万元)", table:0,},
"researchInput": {name:"研发投入(万元)"},
"investmentProportion": {name:"研发投入占比", disabled:true},
}, },
selectList: { selectList: {
incubatorId: function () { incubatorId: function () {
......
...@@ -48,6 +48,7 @@ export default { ...@@ -48,6 +48,7 @@ export default {
background-color:#00154e; background-color:#00154e;
height:100%; height:100%;
.common-page{margin-top:75px;} .common-page{margin-top:75px;}
box-sizing: border-box;
} }
//.page-inline{height:100%;width:100%;display:flex;} //.page-inline{height:100%;width:100%;display:flex;}
......
<template> <template>
<div class="common-page page-t1 iframe-ctn scrolling4"> <div class="common-page page-t1 iframe-ctn scrolling4">
<div class="option page-row"> <div class="option page-row">
<table-filter <table-filter
ref="filter" ref="filter"
:form="form" :form="form"
:Dict="Dict" :Dict="Dict"
:rules="rules" :rules="rules"
:config="form.config" :config="form.config"
:loadData="loadData" :loadData="loadData"
/> />
</div> </div>
<div class="panel-bottom page-row"> <div class="panel-bottom page-row">
<div class="ctin-box"> <div class="ctin-box">
<div class="content-within"> <div class="content-within">
<div class="content-fix"> <div class="content-fix">
<div class="toolbar"> <div class="toolbar">
<div> <div>
<el-button v-for="(item, key) in form.config.otherBtn" size="mini" :type="item.type" :icon="item.icon" @click="item.callback.call(_self, $event)">{{item.name}}</el-button> <el-button
</div> v-for="(item, key) in form.config.otherBtn"
<div> size="mini"
<el-button v-for="(item, key) in form.config.rightBtn" size="mini" :type="item.type" :icon="item.icon" @click="item.callback.call(_self, $event)">{{item.name}}</el-button> :type="item.type"
</div> :icon="item.icon"
</div> @click="item.callback.call(_self, $event)"
<!-- 表格渲染 --> >{{ item.name }}</el-button
<cu-table >
ref="cuTable" </div>
:table="table" <div>
:Dict="Dict" <el-button
:config="form.config" v-for="(item, key) in form.config.rightBtn"
:loadData="loadData" size="mini"
/> :type="item.type"
</div> :icon="item.icon"
</div> @click="item.callback.call(_self, $event)"
</div> >{{ item.name }}</el-button
</div> >
</div>
</div>
<!-- 表格渲染 -->
<cu-table
ref="cuTable"
:table="table"
:Dict="Dict"
:config="form.config"
:loadData="loadData"
/>
</div>
</div>
</div>
</div>
<!-- 表单渲染 --> <!-- 表单渲染 -->
<cu-form <cu-form
ref="cuForm" ref="cuForm"
:form="form" :form="form"
:Dict="Dict" :Dict="Dict"
:rules="rules" :rules="rules"
:submit="submitForm" :submit="submitForm"
:cancel="cancelForm" :cancel="cancelForm"
:watchKeys="['paperfilename']" :watchKeys="['paperfilename']"
/> />
</div> </div>
</template> </template>
<script> <script>
import { reqApi, Config } from '@/assets/js/httpApi.js'; import { reqApi, Config } from "@/assets/js/httpApi.js";
import { Tools } from '@/assets/js/common.js'; import { Tools } from "@/assets/js/common.js";
import DateRangePicker from '@/components/DateRangePicker'; import DateRangePicker from "@/components/DateRangePicker";
import TableFilter from '@/components/TableFilter'; import TableFilter from "@/components/TableFilter";
import cuForm from '@/components/cuForm'; import cuForm from "@/components/cuForm/index2";
import cuTable from '@/components/cuTable'; import cuTable from "@/components/cuTable";
export default { export default {
name: 'Dashboard', name: "Dashboard",
components: { components: {
DateRangePicker, TableFilter, cuForm, cuTable DateRangePicker,
}, TableFilter,
data() { cuForm,
return { cuTable,
Dict:{selectList:[]}, },
table:{ data() {
page: 1, return {
size: 10, Dict: { selectList: [] },
total: 0, table: {
loading: false, page: 1,
dataList:[], size: 10,
}, total: 0,
rules: {}, loading: false,
form: { dataList: [],
title:'', visible:false, reqType:'add', historyDialog:false, },
status:{cu:0}, rules: {},
query:{}, form: {
search:{}, title: "",
item:{}, visible: false,
file:0, reqType: "add",
config:{}, historyDialog: false,
}, status: { cu: 0 },
} query: {},
}, search: {},
created(){ item: {},
// 获取基本信息 file: 0,
this.pageApi = Config.getModuleInfo(this); config: {},
this.Dict = this.pageApi.Dict; },
this.form.config = this.pageApi.config; };
this.rules = reqApi.getRules(this.Dict.baseInfo) || (this.Dict.rules || {}); },
this.pageApi.created && this.pageApi.created(); created() {
}, // 获取基本信息
mounted() { this.pageApi = Config.getModuleInfo(this);
this.$nextTick(() => { this.Dict = this.pageApi.Dict;
var search = new URLSearchParams(window.location.search); this.form.config = this.pageApi.config;
var companyId = this.companyId = search.get('companyId'); this.rules = reqApi.getRules(this.Dict.baseInfo) || this.Dict.rules || {};
this.baseParams = companyId ? {exact:{companyId:companyId}} : void 0; this.pageApi.created && this.pageApi.created();
this.loadData(this.baseParams); },
//window.onMessage = function(filename){}; watch: {
}); "form.item.grossIncome": {
handler(newValue) {
this.form.item.investmentProportion = this.calculatePercentage(this.form.item.researchInput, newValue)
},
immediate: true, // 立即调用处理函数
},
"form.item.researchInput": {
handler(newValue) {
this.form.item.investmentProportion = this.calculatePercentage(newValue, this.form.item.grossIncome)
},
immediate: true, // 立即调用处理函数
},
},
mounted() {
this.$nextTick(() => {
var search = new URLSearchParams(window.location.search);
var companyId = (this.companyId = search.get("companyId"));
this.baseParams = companyId
? { exact: { companyId: companyId } }
: void 0;
this.loadData(this.baseParams);
//window.onMessage = function(filename){};
});
// 获取选择列表字典 // 获取选择列表字典
var selectList = this.Dict.selectList; var selectList = this.Dict.selectList;
Tools.asyncLoop.call(this, selectList, function(key, value, next){ Tools.asyncLoop.call(this, selectList, function (key, value, next) {
if(typeof value === 'function'){ if (typeof value === "function") {
value.call(this.Dict).then(function(res){ value.call(this.Dict).then(function (res) {
selectList[key] = res; next(); selectList[key] = res;
}) next();
}else{next()}; });
}); } else {
}, next();
methods: { }
loadData:reqApi.common.getRequst, });
cancelForm(){ },
this.form.visible = false; methods: {
}, calculatePercentage(expense, totalIncome) {
submitForm(form, item){ console.log('')
item.companyId && (item.companyId = this.companyId) if(!expense || !totalIncome){
reqApi.common.submitForm.call(this, form, item); return ''
}, }
} if (expense*0!==0) {
} return 0; // 避免除以零
}
if (totalIncome*0!==0) {
return 0; // 避免除以零
}
return ((expense / totalIncome) * 100).toFixed(2);
},
loadData: reqApi.common.getRequst,
cancelForm() {
this.form.visible = false;
},
submitForm(form, item) {
item.companyId && (item.companyId = this.companyId);
reqApi.common.submitForm.call(this, form, item);
},
},
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scope> <style rel="stylesheet/scss" lang="scss" scope>
#app{position:relative;display:flex;} #app {
.iframe-ctn{ position: relative;
height:100%;overflow-y:auto; display: flex;
} }
.scrolling4::-webkit-scrollbar{width:6px;height:8px;cursor:pointer;} .iframe-ctn {
height: 100%;
overflow-y: auto;
}
.scrolling4::-webkit-scrollbar {
width: 6px;
height: 8px;
cursor: pointer;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment