|
|
@@ -3,7 +3,7 @@
|
|
|
<div style="margin-top: 6px;">
|
|
|
<el-form :inline="true">
|
|
|
<el-form-item label="研发项目名称">
|
|
|
- <project-select v-model="currProjectId" @change="handleProjectChange"></project-select>
|
|
|
+ <project-select v-model="params.xmId" @change="handleProjectChange"></project-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="研发项目编号">
|
|
|
{{ selProject.xmbh }}
|
|
|
@@ -71,6 +71,7 @@ import UploadExcelDialog from "@/components/upload-excel-dialog";
|
|
|
import projectSelect from "@/components/project-select";
|
|
|
import {getToken} from "@/util/auth";
|
|
|
import {downloadXls} from "@/util/util";
|
|
|
+import Decimal from "decimal.js";
|
|
|
|
|
|
|
|
|
export default window.$crudCommon({
|
|
|
@@ -83,7 +84,9 @@ export default window.$crudCommon({
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- currProjectId: '',
|
|
|
+ params: {
|
|
|
+ xmId: ''
|
|
|
+ },
|
|
|
selProject: {},
|
|
|
|
|
|
wideTableColumns: [],
|
|
|
@@ -91,12 +94,13 @@ export default window.$crudCommon({
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.currProjectId = this.projectId;
|
|
|
+ this.params.xmId = this.projectId;
|
|
|
this.option.height = window.innerHeight - 340;
|
|
|
},
|
|
|
methods: {
|
|
|
handleProjectChange(data) {
|
|
|
this.selProject = data;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
handleImport() {
|
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
|
@@ -127,6 +131,17 @@ export default window.$crudCommon({
|
|
|
// 模块路径
|
|
|
name: 'projectManage/personCost',
|
|
|
res: ({ data }) => {
|
|
|
+ data.records = data.records.map(item => {
|
|
|
+ let zzsc = new Decimal(item.zzsc || 0);
|
|
|
+ let pjrgfy = new Decimal(item.pjrgfy || 0);
|
|
|
+
|
|
|
+ item.name = item.technician.name;
|
|
|
+ item.number = item.technician.number;
|
|
|
+ item.identityCard = item.technician.identityCard;
|
|
|
+ item.total = zzsc.mul(pjrgfy);
|
|
|
+ item.isWp = item.nature === '在职' ? '是' : '否';
|
|
|
+ return item;
|
|
|
+ });
|
|
|
return data;
|
|
|
},
|
|
|
});
|