Browse Source

无形资产摊销费用分配表接口联调

ljb 9 months ago
parent
commit
a5c3f003fe

+ 1 - 29
src/api/yfCostManage/yfCostStatistics/amortizeCostSummaryList.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/lease/page',
+    url: '/api/kd-scientific/asset/kywxzctxfyfpb',
     method: 'get',
     method: 'get',
     params: {
     params: {
       ...params,
       ...params,
@@ -11,31 +11,3 @@ export const getList = (current, size, params) => {
     }
     }
   })
   })
 }
 }
-
-export const add = (row) => {
-  return request({
-    url: '/api/kd-scientific/lease/submit',
-    method: 'post',
-    data: row
-  })
-}
-
-
-export const update = (row) => {
-  return request({
-    url: '/api/kd-scientific/lease/submit',
-    method: 'post',
-    data: row
-  })
-}
-
-
-export const remove = (ids) => {
-  return request({
-    url: '/api/kd-scientific/lease/remove',
-    method: 'post',
-    params: {
-      ids
-    }
-  })
-}

+ 5 - 5
src/option/yfCostManage/yfCostStatistics/amortizeCostSummaryList.js

@@ -34,7 +34,7 @@ export default {
     },
     },
     {
     {
       label: '研发项目名称',
       label: '研发项目名称',
-      prop: 'xmbh',
+      prop: 'xmmc',
       span: 24,
       span: 24,
       width: 120,
       width: 120,
       search: true,
       search: true,
@@ -130,7 +130,7 @@ export default {
     },
     },
     {
     {
       label: '月使用工时(L)',
       label: '月使用工时(L)',
-      prop: 'ysygs',
+      prop: 'attendanceHours',
       type: 'number',
       type: 'number',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
@@ -140,7 +140,7 @@ export default {
     },
     },
     {
     {
       label: '月研发工时(M)',
       label: '月研发工时(M)',
-      prop: 'yyfgs',
+      prop: 'workHours',
       type: 'number',
       type: 'number',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
@@ -150,7 +150,7 @@ export default {
     },
     },
     {
     {
       label: '研发分摊率(%)(N)',
       label: '研发分摊率(%)(N)',
-      prop: 'yzje',
+      prop: 'yanfaFenTanLv',
       type: 'number',
       type: 'number',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,
@@ -159,7 +159,7 @@ export default {
     },
     },
     {
     {
       label: '研发摊销',
       label: '研发摊销',
-      prop: 'yzje',
+      prop: 'yanfaTanXiao',
       type: 'number',
       type: 'number',
       span: 24,
       span: 24,
       minWidth: 90,
       minWidth: 90,

+ 29 - 15
src/views/yf-cost-manage/yf-cost-statistics/wxzc-cost-statistics/amortize-cost-summary-list.vue

@@ -39,45 +39,45 @@
       <template slot="jczSearch">
       <template slot="jczSearch">
         <div style="display: flex; align-items: center;">
         <div style="display: flex; align-items: center;">
           <span>净残值:</span>
           <span>净残值:</span>
-          <avue-input-number v-model="params.jczStart" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.jczMin" :min="0" style="width: 100px !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.jczEnd" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.jczMax" :min="0" style="width: 100px !important;"></avue-input-number>
         </div>
         </div>
       </template>
       </template>
 
 
       <template slot="zcyzSearch">
       <template slot="zcyzSearch">
         <div style="display: flex; align-items: center;">
         <div style="display: flex; align-items: center;">
           <span>资产原值:</span>
           <span>资产原值:</span>
-          <avue-input-number v-model="params.zcyzStart" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.zcyzMin" :min="0" style="width: 100px !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.zcyzEnd" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.zcyzMax" :min="0" style="width: 100px !important;"></avue-input-number>
         </div>
         </div>
       </template>
       </template>
 
 
       <template slot="ytxeSearch">
       <template slot="ytxeSearch">
         <div style="display: flex; align-items: center;">
         <div style="display: flex; align-items: center;">
           <span>月摊销额:</span>
           <span>月摊销额:</span>
-          <avue-input-number v-model="params.ytxeStart" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.yzjeMin" :min="0" style="width: 100px !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.ytxeEnd" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.yzjeMax" :min="0" style="width: 100px !important;"></avue-input-number>
         </div>
         </div>
       </template>
       </template>
 
 
-      <template slot="ysygsSearch">
+      <template slot="attendanceHoursSearch">
         <div style="display: flex; align-items: center;">
         <div style="display: flex; align-items: center;">
           <span>月使用工时:</span>
           <span>月使用工时:</span>
-          <avue-input-number v-model="params.ysygsStart" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.attendanceHoursMin" :min="0" style="width: 100px !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.ysygsEnd" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.attendanceHoursMax" :min="0" style="width: 100px !important;"></avue-input-number>
         </div>
         </div>
       </template>
       </template>
 
 
-      <template slot="yyfgsSearch">
+      <template slot="workHoursSearch">
         <div style="display: flex; align-items: center;">
         <div style="display: flex; align-items: center;">
           <span>已研发工时:</span>
           <span>已研发工时:</span>
-          <avue-input-number v-model="params.yyfgsStart" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.workHoursMin" :min="0" style="width: 100px !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.yyfgsEnd" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.workHoursMax" :min="0" style="width: 100px !important;"></avue-input-number>
         </div>
         </div>
       </template>
       </template>
       
       
@@ -127,10 +127,9 @@ export default window.$crudCommon({
     }
     }
   },
   },
   methods: {
   methods: {
-    loadData() {},
     handleExport() {
     handleExport() {
       exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
       exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `研发费用汇总表${this.params.yearAndMonth}.xlsx`);
+        downloadXls(res.data, `无形资产摊销费用分配表${this.params.yearAndMonth}.xlsx`);
       });
       });
     },
     },
     /**
     /**
@@ -139,7 +138,7 @@ export default window.$crudCommon({
      */
      */
     printTable(isLandscape) {
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `研发费用汇总表${this.params.yearAndMonth}`;
+      this.printTitle = `无形资产摊销费用分配表${this.params.yearAndMonth}`;
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       })
       })
@@ -149,6 +148,21 @@ export default window.$crudCommon({
   // 模块路径
   // 模块路径
   name: 'yfCostManage/yfCostStatistics/amortizeCostSummaryList',
   name: 'yfCostManage/yfCostStatistics/amortizeCostSummaryList',
   res: ({ data }) => {
   res: ({ data }) => {
+    data.records = data.records.map(item => {
+      item.zcbm = item.asset ? item.asset.zcbm : '';
+      item.zcmc = item.asset ? item.asset.zcmc : '';
+      item.zclb = item.asset ? item.asset.zclb : '';
+      item.gl = item.asset ? item.asset.gl : '';
+      item.yt = item.asset ? item.asset.yt : '';
+      item.zcyz = item.asset ? item.asset.zcyz : '';
+      item.jcz = item.asset ? item.asset.jcz : '';
+      item.ytxe = item.asset ? item.asset.yzje : '';
+      item.attendanceHours = (item.attendanceHours || 0).toFixed(1);
+      item.workHours = (item.workHours || 0).toFixed(1);
+      item.yanfaFenTanLv = (item.yanfaFenTanLv * 100).toFixed(2);
+      item.yanfaTanXiao = (item.yanfaTanXiao || 0).toFixed(2);
+      return item;
+    });
     return data;
     return data;
   },
   },
 });
 });