Browse Source

人员人工统计接口联调

ljb 9 months ago
parent
commit
e3a318071c

+ 1 - 1
src/api/projectManage/projectList.js

@@ -45,7 +45,7 @@ export const add = (row) => {
 
 
 export const update = (row) => {
 export const update = (row) => {
   return request({
   return request({
-    url: '/api/kd-scientific/xm/update',
+    url: '/api/kd-scientific/xm/save',
     method: 'post',
     method: 'post',
     data: row
     data: row
   })
   })

+ 1 - 1
src/api/yfCostManage/yfCostStatistics/personAllocationList.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 
 export const getList = (current, size, params) => {
 export const getList = (current, size, params) => {
   return request({
   return request({
-    url: '/api/kd-scientific/page',
+    url: '/api/kd-scientific/technician/myyfryrgfyfpb',
     method: 'get',
     method: 'get',
     params: {
     params: {
       ...params,
       ...params,

+ 1 - 1
src/api/yfCostManage/yfCostStatistics/projectAllocationList.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 
 export const getList = (current, size, params) => {
 export const getList = (current, size, params) => {
   return request({
   return request({
-    url: '/api/kd-scientific/page',
+    url: '/api/kd-scientific/technician/myyfxmrgfyhzb',
     method: 'get',
     method: 'get',
     params: {
     params: {
       ...params,
       ...params,

+ 2 - 0
src/components/second-unit-cascader/index.vue

@@ -87,6 +87,8 @@ export default {
 
 
           this.list = this.loopData(treeData);
           this.list = this.loopData(treeData);
 
 
+          console.log(data.data, this.value)
+
           this.cascaderVal = this.value || [];
           this.cascaderVal = this.value || [];
         }
         }
       })
       })

+ 162 - 40
src/option/yfCostManage/yfCostStatistics/personAllocationList.js

@@ -15,6 +15,128 @@ export default {
   dialogClickModal: false,
   dialogClickModal: false,
   dialogWidth: 500,
   dialogWidth: 500,
   dialogType: "drawer",
   dialogType: "drawer",
+  showSummary: true,
+  sumColumnList: [
+    {
+      label:'合计:',
+      name: 'attendanceHours',
+      type: 'sum',
+    },
+    {
+      name: 'workHours',
+      type: 'sum',
+    },
+    {
+      name: 'yfzb',
+      type: 'sum',
+    },
+    {
+      name: 'averageMonthlySalary',
+      type: 'sum',
+    },
+    {
+      name: 'pensionInsurance',
+      type: 'sum',
+    },
+    {
+      name: 'medicalInsurance',
+      type: 'sum',
+    },
+    {
+      name: 'unemploymentInsurance',
+      type: 'sum',
+    },
+    {
+      name: 'injuryInsurance',
+      type: 'sum',
+    },
+    {
+      name: 'maternityInsurance',
+      type: 'sum',
+    },
+    {
+      name: 'socSecTotal',
+      type: 'sum',
+    },
+    {
+      name: 'providentFund',
+      type: 'sum',
+    },
+    {
+      name: 'bonus',
+      type: 'sum',
+    },
+    {
+      name: 'benefit',
+      type: 'sum',
+    },
+    {
+      name: 'pensionInsuranceBc',
+      type: 'sum',
+    },
+    {
+      name: 'medicalInsuranceBc',
+      type: 'sum',
+    },
+    {
+      name: 'amount',
+      type: 'sum',
+    },
+
+
+    {
+      name: 'averageMonthlySalaryXm',
+      type: 'sum',
+    },
+    {
+      name: 'pensionInsuranceXm',
+      type: 'sum',
+    },
+    {
+      name: 'medicalInsuranceXm',
+      type: 'sum',
+    },
+    {
+      name: 'unemploymentInsuranceXm',
+      type: 'sum',
+    },
+    {
+      name: 'injuryInsuranceXm',
+      type: 'sum',
+    },
+    {
+      name: 'maternityInsuranceXm',
+      type: 'sum',
+    },
+    {
+      name: 'socSecTotalXm',
+      type: 'sum',
+    },
+    {
+      name: 'providentFundXm',
+      type: 'sum',
+    },
+    {
+      name: 'bonusXm',
+      type: 'sum',
+    },
+    {
+      name: 'benefitXm',
+      type: 'sum',
+    },
+    {
+      name: 'pensionInsuranceBcXm',
+      type: 'sum',
+    },
+    {
+      name: 'medicalInsuranceBcXm',
+      type: 'sum',
+    },
+    {
+      name: 'amountXm',
+      type: 'sum',
+    },
+  ],
   column: [
   column: [
     {
     {
       label: '研发项目编号',
       label: '研发项目编号',
@@ -38,7 +160,7 @@ export default {
       prop: 'name',
       prop: 'name',
       span: 24,
       span: 24,
       search: true,
       search: true,
-      width: 90,
+      width: 80,
       align: 'center',
       align: 'center',
       type: 'input',
       type: 'input',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
@@ -48,7 +170,7 @@ export default {
       prop: 'number',
       prop: 'number',
       type: 'input',
       type: 'input',
       span: 24,
       span: 24,
-      width: 90,
+      width: 80,
       align: 'center',
       align: 'center',
       search: true,
       search: true,
       showOverflowTooltip: true,
       showOverflowTooltip: true,
@@ -80,31 +202,31 @@ export default {
     },
     },
     {
     {
       label: '本月出勤(小时)',
       label: '本月出勤(小时)',
-      prop: 'bycq',
+      prop: 'attendanceHours',
       span: 24,
       span: 24,
-      width: 80,
+      width: 100,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '研发出勤(小时)',
       label: '研发出勤(小时)',
-      prop: 'yfcq',
+      prop: 'workHours',
       span: 24,
       span: 24,
-      width: 80,
+      width: 100,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '研发占比(%)',
       label: '研发占比(%)',
-      prop: 'yfcq',
+      prop: 'yfzb',
       span: 24,
       span: 24,
-      width: 80,
+      width: 100,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '工资薪金',
       label: '工资薪金',
-      prop: 'gzxj',
+      prop: 'averageMonthlySalary',
       span: 24,
       span: 24,
       width: 80,
       width: 80,
       align: 'center',
       align: 'center',
@@ -112,7 +234,7 @@ export default {
     },
     },
     {
     {
       label: '养老保险单位部分',
       label: '养老保险单位部分',
-      prop: 'ylbx',
+      prop: 'pensionInsurance',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -120,7 +242,7 @@ export default {
     },
     },
     {
     {
       label: '医疗保险单位部分',
       label: '医疗保险单位部分',
-      prop: 'yiliaobx',
+      prop: 'medicalInsurance',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -128,7 +250,7 @@ export default {
     },
     },
     {
     {
       label: '失业保险单位部分',
       label: '失业保险单位部分',
-      prop: 'sybx',
+      prop: 'unemploymentInsurance',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -136,7 +258,7 @@ export default {
     },
     },
     {
     {
       label: '工伤保险单位部分',
       label: '工伤保险单位部分',
-      prop: 'gsbx',
+      prop: 'injuryInsurance',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -144,7 +266,7 @@ export default {
     },
     },
     {
     {
       label: '生育保险单位部分',
       label: '生育保险单位部分',
-      prop: 'sybx',
+      prop: 'maternityInsurance',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -152,47 +274,47 @@ export default {
     },
     },
     {
     {
       label: '社保合计',
       label: '社保合计',
-      prop: 'sbhj',
+      prop: 'socSecTotal',
       span: 24,
       span: 24,
-      width: 90,
+      width: 70,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '公积金',
       label: '公积金',
-      prop: 'gjj',
+      prop: 'providentFund',
       span: 24,
       span: 24,
-      width: 90,
+      width: 60,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '奖金',
       label: '奖金',
-      prop: 'jiangjin',
+      prop: 'bonus',
       span: 24,
       span: 24,
-      width: 90,
+      width: 60,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '福利费',
       label: '福利费',
-      prop: 'flf',
+      prop: 'benefit',
       span: 24,
       span: 24,
-      width: 90,
+      width: 60,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '补充养老保险',
       label: '补充养老保险',
-      prop: 'bcylbx',
+      prop: 'pensionInsuranceBc',
       span: 24,
       span: 24,
       width: 90,
       width: 90,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
-      label: '补充养老保险',
-      prop: 'bcyiliaobx',
+      label: '补充医疗保险',
+      prop: 'medicalInsuranceBc',
       span: 24,
       span: 24,
       width: 90,
       width: 90,
       align: 'center',
       align: 'center',
@@ -200,15 +322,15 @@ export default {
     },
     },
     {
     {
       label: '小计',
       label: '小计',
-      prop: 'xiaoji',
+      prop: 'amount',
       span: 24,
       span: 24,
-      width: 90,
+      width: 70,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
     },
     },
     {
     {
       label: '研发项目分配的工资薪金',
       label: '研发项目分配的工资薪金',
-      prop: 'yfxmfbdhzxj',
+      prop: 'averageMonthlySalaryXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -216,7 +338,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的养老保险单位部分',
       label: '研发项目分配的养老保险单位部分',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'pensionInsuranceXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -224,7 +346,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的医疗保险单位部分',
       label: '研发项目分配的医疗保险单位部分',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'medicalInsuranceXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -232,7 +354,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的失业保险单位部分',
       label: '研发项目分配的失业保险单位部分',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'unemploymentInsuranceXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -240,7 +362,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的工伤保险单位部分',
       label: '研发项目分配的工伤保险单位部分',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'injuryInsuranceXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -248,7 +370,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的生育保险单位部分',
       label: '研发项目分配的生育保险单位部分',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'maternityInsuranceXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -256,7 +378,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的社保合计',
       label: '研发项目分配的社保合计',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'socSecTotalXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -264,7 +386,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的公积金',
       label: '研发项目分配的公积金',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'providentFundXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -272,7 +394,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的奖金',
       label: '研发项目分配的奖金',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'bonusXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -280,7 +402,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的福利费',
       label: '研发项目分配的福利费',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'benefitXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -288,7 +410,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的补充养老保险',
       label: '研发项目分配的补充养老保险',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'pensionInsuranceBcXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -296,7 +418,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的补充医疗保险',
       label: '研发项目分配的补充医疗保险',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'pensionInsuranceBcXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',
@@ -304,7 +426,7 @@ export default {
     },
     },
     {
     {
       label: '研发费用合计(元)',
       label: '研发费用合计(元)',
-      prop: 'yfxmfpdylbxdwbf',
+      prop: 'amountXm',
       span: 24,
       span: 24,
       width: 100,
       width: 100,
       align: 'center',
       align: 'center',

+ 43 - 8
src/option/yfCostManage/yfCostStatistics/projectAllocationList.js

@@ -15,6 +15,42 @@ export default {
   dialogClickModal: false,
   dialogClickModal: false,
   dialogWidth: 500,
   dialogWidth: 500,
   dialogType: "drawer",
   dialogType: "drawer",
+  showSummary: true,
+  sumColumnList: [
+    {
+      label:'合计:',
+      name: 'averageMonthlySalary',
+      type: 'sum',
+    },
+    {
+      name: 'socSecTotal',
+      type: 'sum',
+    },
+    {
+      name: 'providentFund',
+      type: 'sum',
+    },
+    {
+      name: 'bonus',
+      type: 'sum',
+    },
+    {
+      name: 'benefit',
+      type: 'sum',
+    },
+    {
+      name: 'pensionInsuranceBc',
+      type: 'sum',
+    },
+    {
+      name: 'medicalInsuranceBc',
+      type: 'sum',
+    },
+    {
+      name: 'amount',
+      type: 'sum',
+    },
+  ],
   column: [
   column: [
     {
     {
       label: '研发项目编号',
       label: '研发项目编号',
@@ -35,7 +71,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的工资薪金',
       label: '研发项目分配的工资薪金',
-      prop: 'hzxj',
+      prop: 'averageMonthlySalary',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
@@ -43,7 +79,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的社保',
       label: '研发项目分配的社保',
-      prop: 'shebao',
+      prop: 'socSecTotal',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
@@ -51,7 +87,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的公积金',
       label: '研发项目分配的公积金',
-      prop: 'gjj',
+      prop: 'providentFund',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
@@ -59,7 +95,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的奖金',
       label: '研发项目分配的奖金',
-      prop: 'jiangjin',
+      prop: 'bonus',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
@@ -67,7 +103,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的福利费',
       label: '研发项目分配的福利费',
-      prop: 'flf',
+      prop: 'benefit',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
@@ -75,7 +111,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的补充养老保险',
       label: '研发项目分配的补充养老保险',
-      prop: 'ylbx',
+      prop: 'pensionInsuranceBc',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
@@ -83,7 +119,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目分配的补充医疗保险',
       label: '研发项目分配的补充医疗保险',
-      prop: 'ylbx',
+      prop: 'medicalInsuranceBc',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
@@ -96,7 +132,6 @@ export default {
       minWidth: 90,
       minWidth: 90,
       align: 'center',
       align: 'center',
       showOverflowTooltip: true,
       showOverflowTooltip: true,
-      search: true,
     },
     },
   ],
   ],
 };
 };

+ 7 - 2
src/views/basic-resource/basic-database/subject-setting.vue

@@ -125,7 +125,7 @@ export default {
           },
           },
           {
           {
             label: "高新研发费用科目",
             label: "高新研发费用科目",
-            prop: "isRdSubject",
+            prop: "rdSubjectEnable",
             type: "radio",
             type: "radio",
             dicData:[{
             dicData:[{
               label: '是',
               label: '是',
@@ -140,7 +140,7 @@ export default {
           },
           },
           {
           {
             label: "高新研发费用科目",
             label: "高新研发费用科目",
-            prop: "isAdSubject",
+            prop: "adSubjectEnable",
             type: "radio",
             type: "radio",
             dicData:[{
             dicData:[{
               label: '是',
               label: '是',
@@ -186,6 +186,11 @@ export default {
         item.disabled = level === 4 ? true : false;
         item.disabled = level === 4 ? true : false;
         item.hasChildren = item.children && item.children.length ? false : true;
         item.hasChildren = item.children && item.children.length ? false : true;
 
 
+        if (item.level === 4) {
+          item.rdSubject = item.rdSubjectEnable === 1 ? item.accSubject : '';
+          item.adSubject = item.adSubjectEnable === 1 ? item.accSubject : '';
+        }
+
         if (maxLevel) {
         if (maxLevel) {
           if (level >= maxLevel) {
           if (level >= maxLevel) {
             delete item.children;
             delete item.children;

+ 0 - 1
src/views/project-manage/components/apply-form.vue

@@ -336,7 +336,6 @@ export default {
         this.loading = false;
         this.loading = false;
         if (data.code == 200) {
         if (data.code == 200) {
           let beanData = { ...data.data };
           let beanData = { ...data.data };
-          console.log(beanData)
           beanData.xmfzr = String(beanData.xmfzr || '');
           beanData.xmfzr = String(beanData.xmfzr || '');
           beanData.yqcgxs = beanData.yqcgxs.split(",");
           beanData.yqcgxs = beanData.yqcgxs.split(",");
           beanData.xmjsjjmb = beanData.xmjsjjmb.split(",");
           beanData.xmjsjjmb = beanData.xmjsjjmb.split(",");

+ 1 - 1
src/views/project-manage/implement.vue

@@ -129,7 +129,7 @@ export default window.$crudCommon({
           item.xmmc = item.xmEntity ? item.xmEntity.xmmc : '';
           item.xmmc = item.xmEntity ? item.xmEntity.xmmc : '';
           item.xmbh = item.xmEntity ? item.xmEntity.xmbh : '';
           item.xmbh = item.xmEntity ? item.xmEntity.xmbh : '';
           item.xmsqdw = item.xmEntity ? item.xmEntity.xmsqdw : '';
           item.xmsqdw = item.xmEntity ? item.xmEntity.xmsqdw : '';
-          item.xmfzrxm = item.xmEntity ? item.xmEntity.xmfzrxm : '';
+          item.xmfzrxm = item.xmEntity && item.xmEntity.technicianEntity ? item.xmEntity.technicianEntity.name : '';
           return item;
           return item;
         });
         });
         this.loading = false;
         this.loading = false;

+ 45 - 1
src/views/yf-cost-manage/yf-cost-statistics/person-cost-statistics/person-allocation-list.vue

@@ -42,6 +42,7 @@ import {exportBlob} from "@/api/common";
 import {getToken} from "@/util/auth";
 import {getToken} from "@/util/auth";
 import {downloadXls} from "@/util/util";
 import {downloadXls} from "@/util/util";
 import moment from "moment";
 import moment from "moment";
+import Decimal from "decimal.js";
 
 
 
 
 export default window.$crudCommon({
 export default window.$crudCommon({
@@ -65,7 +66,6 @@ export default window.$crudCommon({
     }
     }
   },
   },
   methods: {
   methods: {
-    loadData() {},
     handleExport() {
     handleExport() {
       exportBlob(`/api/kd-scientific/attendance/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
       exportBlob(`/api/kd-scientific/attendance/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `${this.params.yearAndMonth}研发人工分配表.xlsx`);
         downloadXls(res.data, `${this.params.yearAndMonth}研发人工分配表.xlsx`);
@@ -93,6 +93,50 @@ export default window.$crudCommon({
   // 模块路径
   // 模块路径
   name: 'yfCostManage/yfCostStatistics/personAllocationList',
   name: 'yfCostManage/yfCostStatistics/personAllocationList',
   res: ({ data }) => {
   res: ({ data }) => {
+    data.records = data.records.map(item => {
+
+      // 研发占比
+      let yfzb = 0;
+      if (item.workHours) {
+        yfzb = new Decimal(item.workHours).div(new Decimal(item.attendanceHours));
+      }
+      item.yfzb = yfzb ? (yfzb * 100).toFixed(2) : 0;
+
+      // 社保合计
+      let socSecTotal = new Decimal(item.pensionInsurance || 0)
+      .add(new Decimal(item.medicalInsurance || 0))
+      .add(new Decimal(item.unemploymentInsurance || 0))
+      .add(new Decimal(item.injuryInsurance || 0))
+      .add(new Decimal(item.maternityInsurance || 0));
+      item.socSecTotal = socSecTotal.toFixed(2);
+
+      // 小计
+      let amount = new Decimal(item.averageMonthlySalary || 0)
+      .add(new Decimal(item.socSecTotal || 0))
+      .add(new Decimal(item.providentFund || 0))
+      .add(new Decimal(item.bonus || 0))
+      .add(new Decimal(item.benefit || 0))
+      .add(new Decimal(item.pensionInsuranceBc || 0))
+      .add(new Decimal(item.medicalInsuranceBc || 0));
+      item.amount = amount.toFixed(2);
+
+      // 研发项目部分
+      item.averageMonthlySalaryXm = (new Decimal(item.averageMonthlySalary).mul(new Decimal(yfzb))).toFixed(2);
+      item.pensionInsuranceXm = (new Decimal(item.pensionInsurance).mul(new Decimal(yfzb))).toFixed(2);
+      item.medicalInsuranceXm = (new Decimal(item.medicalInsurance).mul(new Decimal(yfzb))).toFixed(2);
+      item.unemploymentInsuranceXm = (new Decimal(item.unemploymentInsurance).mul(new Decimal(yfzb))).toFixed(2);
+      item.injuryInsuranceXm = (new Decimal(item.injuryInsurance).mul(new Decimal(yfzb))).toFixed(2);
+      item.maternityInsuranceXm = (new Decimal(item.maternityInsurance).mul(new Decimal(yfzb))).toFixed(2);
+      item.socSecTotalXm = (new Decimal(item.socSecTotal).mul(new Decimal(yfzb))).toFixed(2);
+      item.providentFundXm = (new Decimal(item.providentFund).mul(new Decimal(yfzb))).toFixed(2);
+      item.bonusXm = (new Decimal(item.bonus).mul(new Decimal(yfzb))).toFixed(2);
+      item.benefitXm = (new Decimal(item.benefit).mul(new Decimal(yfzb))).toFixed(2);
+      item.pensionInsuranceBcXm = (new Decimal(item.pensionInsuranceBc).mul(new Decimal(yfzb))).toFixed(2);
+      item.medicalInsuranceBcXm = (new Decimal(item.medicalInsuranceBc).mul(new Decimal(yfzb))).toFixed(2);
+      item.amountXm = (new Decimal(item.amount).mul(new Decimal(yfzb))).toFixed(2); 
+
+      return item;
+    })
     return data;
     return data;
   },
   },
 });
 });

+ 24 - 3
src/views/yf-cost-manage/yf-cost-statistics/person-cost-statistics/project-allocation-list.vue

@@ -23,14 +23,14 @@
         </div>
         </div>
       </template>
       </template>
 
 
-      <template slot="amountSearch">
+      <!-- <template slot="amountSearch">
         <div style="display: flex; align-items: center;">
         <div style="display: flex; align-items: center;">
           <span>研发费用:</span>
           <span>研发费用:</span>
           <avue-input-number v-model="params.amountMin" :min="0" style="width: 90px !important;"></avue-input-number>
           <avue-input-number v-model="params.amountMin" :min="0" style="width: 90px !important;"></avue-input-number>
           <span style="width: 20px; text-align: center;">至</span>
           <span style="width: 20px; text-align: center;">至</span>
           <avue-input-number v-model="params.amountMax" :min="0" style="width: 90px !important;"></avue-input-number>
           <avue-input-number v-model="params.amountMax" :min="0" style="width: 90px !important;"></avue-input-number>
         </div>
         </div>
-      </template>
+      </template> -->
       
       
     </avue-crud>
     </avue-crud>
 
 
@@ -51,6 +51,7 @@ import {exportBlob} from "@/api/common";
 import {getToken} from "@/util/auth";
 import {getToken} from "@/util/auth";
 import {downloadXls} from "@/util/util";
 import {downloadXls} from "@/util/util";
 import moment from "moment";
 import moment from "moment";
+import Decimal from "decimal.js";
 
 
 
 
 export default window.$crudCommon({
 export default window.$crudCommon({
@@ -74,7 +75,6 @@ export default window.$crudCommon({
     }
     }
   },
   },
   methods: {
   methods: {
-    loadData() {},
     handleExport() {
     handleExport() {
       exportBlob(`/api/kd-scientific/attendance/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
       exportBlob(`/api/kd-scientific/attendance/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `${this.params.yearAndMonth}研发项目人工分配汇总表.xlsx`);
         downloadXls(res.data, `${this.params.yearAndMonth}研发项目人工分配汇总表.xlsx`);
@@ -102,6 +102,27 @@ export default window.$crudCommon({
   // 模块路径
   // 模块路径
   name: 'yfCostManage/yfCostStatistics/projectAllocationList',
   name: 'yfCostManage/yfCostStatistics/projectAllocationList',
   res: ({ data }) => {
   res: ({ data }) => {
+    data.records = data.records.map(item => {
+      // 社保合计
+      let socSecTotal = new Decimal(item.pensionInsurance || 0)
+      .add(new Decimal(item.medicalInsurance || 0))
+      .add(new Decimal(item.unemploymentInsurance || 0))
+      .add(new Decimal(item.injuryInsurance || 0))
+      .add(new Decimal(item.maternityInsurance || 0));
+      item.socSecTotal = socSecTotal.toFixed(2);
+
+      // 合计
+      let amount = new Decimal(item.averageMonthlySalary || 0)
+      .add(new Decimal(item.socSecTotal || 0))
+      .add(new Decimal(item.providentFund || 0))
+      .add(new Decimal(item.bonus || 0))
+      .add(new Decimal(item.benefit || 0))
+      .add(new Decimal(item.pensionInsuranceBc || 0))
+      .add(new Decimal(item.medicalInsuranceBc || 0));
+      item.amount = amount.toFixed(2);
+
+      return item;
+    })
     return data;
     return data;
   },
   },
 });
 });