Browse Source

研发费用汇总表接口联调

ljb 9 months ago
parent
commit
6f430b1188

+ 3 - 35
src/api/yfCostManage/yfCostStatistics/yfCostSummaryList.js

@@ -1,41 +1,9 @@
 import request from '@/router/axios';
 
-export const getList = (current, size, params) => {
+export const getList = (params) => {
   return request({
-    url: '/api/kd-scientific/lease/page',
+    url: '/api/kd-scientific/cost/summary',
     method: 'get',
-    params: {
-      ...params,
-      current,
-      size,
-    }
-  })
-}
-
-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
-    }
+    params
   })
 }

+ 45 - 21
src/option/yfCostManage/yfCostStatistics/yfCostSummaryList.js

@@ -1,5 +1,4 @@
 export default {
-  height: 'auto',
   calcHeight: 30,
   tip: false,
   searchShow: true,
@@ -17,7 +16,44 @@ export default {
   showSummary: true,
   sumColumnList: [
     {
-      name: 'price',
+      label: '合计:',
+      name: 'ryrgfy',
+      type: 'sum',
+    },
+    {
+      name: 'zjtrfy',
+      type: 'sum',
+    },
+    {
+      name: 'zjfyycqdtfy',
+      type: 'sum',
+    },
+    {
+      name: 'sjfy',
+      type: 'sum',
+    },
+    {
+      name: 'wxzctxfy',
+      type: 'sum',
+    },
+    {
+      name: 'zbtsfyysyfy',
+      type: 'sum',
+    },
+    {
+      name: 'qtfy',
+      type: 'sum',
+    },
+    {
+      name: 'wwfy',
+      type: 'sum',
+    },
+    {
+      name: 'wwfyAdjust',
+      type: 'sum',
+    },
+    {
+      name: 'total',
       type: 'sum',
     },
   ],
@@ -31,7 +67,7 @@ export default {
     },
     {
       label: '人员人工费用',
-      prop: 'ryrg',
+      prop: 'ryrgfy',
       type: 'number',
       span: 24,
       minWidth: 120,
@@ -42,7 +78,7 @@ export default {
     },
     {
       label: '直接投入费用',
-      prop: 'zjtr',
+      prop: 'zjtrfy',
       type: 'number',
       span: 24,
       minWidth: 120,
@@ -53,7 +89,7 @@ export default {
     },
     {
       label: '折旧费用和长期待摊费用',
-      prop: 'zjfy',
+      prop: 'zjfyycqdtfy',
       type: 'number',
       span: 24,
       minWidth: 120,
@@ -75,7 +111,7 @@ export default {
     },
     {
       label: '无形资产摊销费用',
-      prop: 'wxzcfy',
+      prop: 'wxzctxfy',
       type: 'number',
       span: 24,
       minWidth: 120,
@@ -86,7 +122,7 @@ export default {
     },
     {
       label: '装备调试费用与试验费用',
-      prop: 'zbtsfy',
+      prop: 'zbtsfyysyfy',
       type: 'number',
       span: 24,
       minWidth: 120,
@@ -123,7 +159,7 @@ export default {
         },
         {
           label: '经调整后的委外研发费用',
-          prop: 'tzhwwfy',
+          prop: 'wwfyAdjust',
           type: 'number',
           span: 24,
           minWidth: 120,
@@ -136,7 +172,7 @@ export default {
     },
     {
       label: '合计',
-      prop: 'amount',
+      prop: 'total',
       type: 'number',
       span: 24,
       minWidth: 120,
@@ -145,17 +181,5 @@ export default {
       precision: 2,
       showOverflowTooltip: true,
     },
-    {
-      label: '费用区间(元)',
-      prop: 'costRange',
-      type: 'number',
-      span: 24,
-      width: 100,
-      align: 'center',
-      min: 0,
-      precision: 2,
-      hide: true,
-      search: true,
-    },
   ],
 };

+ 12 - 38
src/views/yf-cost-manage/yf-cost-statistics/wxzc-cost-statistics/yf-cost-summary-list.vue

@@ -4,7 +4,6 @@
       v-bind="bindVal"
       v-on="onEvent"
       v-model="form"
-      :page.sync="page"
     >
       <template slot="menuLeft">
         <el-button
@@ -16,34 +15,16 @@
         >
           导出
         </el-button>
-        <!-- <print-table-btn @click="printTable" /> -->
         
         <div style="display: flex; align-items: center;">
           <year-month-select v-model="params.yearAndMonth" :showAllYear="false"></year-month-select>
         </div>
       </template>
-
-      <template slot="costRangeSearch">
-        <div style="display: flex; align-items: center;">
-          <span>费用区间(元):</span>
-          <avue-input-number v-model="params.startSysm" :min="0" style="width: 100px !important;"></avue-input-number>
-          <span style="width: 20px; text-align: center;">至</span>
-          <avue-input-number v-model="params.endSysm" :min="0" style="width: 100px !important;"></avue-input-number>
-        </div>
-      </template>
       
     </avue-crud>
 
     <upload-excel-dialog ref="uploadExcelDialog" :uploadAfter="uploadAfter"/>
 
-    <WideTablePrinter
-      ref="printWideTable"
-      :columns="wideTableColumns"
-      :data="data"
-      :print-title="printTitle"
-      :rows-per-page="30"
-      :default-landscape="true"
-    />
   </basic-container>
 </template>
 
@@ -53,7 +34,6 @@ import {exportBlob} from "@/api/common";
 import {getToken} from "@/util/auth";
 import {downloadXls} from "@/util/util";
 import moment from "moment";
-import Decimal from "decimal.js";
 
 
 export default window.$crudCommon({
@@ -72,35 +52,29 @@ export default window.$crudCommon({
     };
   },
   watch: {
-    'params.yearAndMonth'(newVal) {
-      this.page.currentPage = 1;
-      this.getList(this.page);
+    'params.yearAndMonth'() {
+      this.getList();
     }
   },
   methods: {
-    loadData() {},
+    loadData() {
+        this.loading = true;
+        this.api[this.option.list || 'getList'](this.getSearchParams()).then(res => {
+          if (res.data.code == 200) {
+            this.data = res.data.data;
+          }
+          
+          this.loading = false;
+        });
+      },
     handleExport() {
       exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `研发费用汇总表${this.params.yearAndMonth}.xlsx`);
       });
     },
-    /**
-     * 打印表格
-     * @param isLandscape 是否横向打印
-     */
-    printTable(isLandscape) {
-      this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `研发费用汇总表${this.params.yearAndMonth}`;
-      this.$nextTick(() => {
-        this.$refs.printWideTable.printTable(isLandscape);
-      })
-    },
   },
 }, {
   // 模块路径
   name: 'yfCostManage/yfCostStatistics/yfCostSummaryList',
-  res: ({ data }) => {
-    return data;
-  },
 });
 </script>