Browse Source

科研仪器设备折旧费用分配表和科研房屋建筑物折旧费用分配表接口联调

ljb 9 months ago
parent
commit
0b55781405

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

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

+ 3 - 23
src/api/yfCostManage/yfCostStatistics/hourseDepreAllocation.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/api/kd-scientific/lease/page',
+    url: '/api/kd-scientific/asset/kyfwjzwzjfyfpb',
     method: 'get',
     params: {
       ...params,
@@ -12,30 +12,10 @@ 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',
+    url: '/api/kd-scientific/asset/kyfwjzwzjfyfpb',
+    method: 'put',
     data: row
   })
 }
-
-
-export const remove = (ids) => {
-  return request({
-    url: '/api/kd-scientific/lease/remove',
-    method: 'post',
-    params: {
-      ids
-    }
-  })
-}

+ 8 - 8
src/option/yfCostManage/yfCostStatistics/devDepreAllocation.js

@@ -28,7 +28,7 @@ export default {
       label: '研发项目编号',
       prop: 'xmbh',
       span: 24,
-      width: 100,
+      width: 90,
       align: 'center',
       showOverflowTooltip: true,
     },
@@ -110,7 +110,7 @@ export default {
     },
     {
       label: '月折旧额(每台/套)',
-      prop: 'ytxe',
+      prop: 'yzje',
       type: 'number',
       span: 24,
       minWidth: 90,
@@ -119,8 +119,8 @@ export default {
       showOverflowTooltip: true,
     },
     {
-      label: '月使用工时',
-      prop: 'sygs',
+      label: '月工时',
+      prop: 'attendanceHours',
       type: 'number',
       span: 24,
       minWidth: 70,
@@ -130,7 +130,7 @@ export default {
     },
     {
       label: '月研发工时',
-      prop: 'yfgs',
+      prop: 'workHours',
       type: 'number',
       span: 24,
       minWidth: 70,
@@ -140,7 +140,7 @@ export default {
     },
     {
       label: '研发分摊率(%)',
-      prop: 'yzje',
+      prop: 'yanfaFenTanLv',
       type: 'number',
       span: 24,
       minWidth: 90,
@@ -148,8 +148,8 @@ export default {
       showOverflowTooltip: true,
     },
     {
-      label: '研发折旧',
-      prop: 'yfzj',
+      label: '研发折旧费用',
+      prop: 'yanfaTanXiao',
       type: 'number',
       span: 24,
       minWidth: 70,

+ 22 - 13
src/option/yfCostManage/yfCostStatistics/hourseDepreAllocation.js

@@ -7,11 +7,11 @@ export default {
   border: true,
   index: true,
   addBtn: false,
-  menu: false,
+  delBtn: false,
   selection: true,
   searchLabelWidth: 140,
-  labelWidth: 140,
-  menuWidth: 290,
+  labelWidth: 110,
+  menuWidth: 80,
   dialogClickModal: false,
   dialogWidth: 500,
   dialogType: "drawer",
@@ -22,14 +22,16 @@ export default {
       span: 24,
       width: 60,
       align: 'center',
+      display: false,
       showOverflowTooltip: true,
     },
     {
       label: '研发项目编号',
       prop: 'xmbh',
       span: 24,
-      width: 100,
+      width: 90,
       align: 'center',
+      display: false,
       showOverflowTooltip: true,
     },
     {
@@ -38,6 +40,7 @@ export default {
       span: 24,
       width: 120,
       search: true,
+      display: false,
       showOverflowTooltip: true,
     },
     {
@@ -45,8 +48,9 @@ export default {
       prop: 'zcbm',
       type: 'input',
       span: 24,
-      width: 100,
+      width: 90,
       align: 'center',
+      display: false,
       showOverflowTooltip: true,
     },
     {
@@ -56,6 +60,7 @@ export default {
       span: 24,
       minWidth: 120,
       search: true,
+      display: false,
       showOverflowTooltip: true,
     },
     {
@@ -70,6 +75,7 @@ export default {
       span: 24,
       width: 90,
       align: 'center',
+      display: false,
       showOverflowTooltip: true,
       search: true,
     },
@@ -86,6 +92,7 @@ export default {
       span: 24,
       width: 65,
       align: 'center',
+      display: false,
       showOverflowTooltip: true,
     },
     {
@@ -96,6 +103,7 @@ export default {
       width: 90,
       align: 'center',
       search: true,
+      display: false,
       showOverflowTooltip: true,
     },
     {
@@ -106,21 +114,23 @@ export default {
       width: 70,
       align: 'center',
       search: true,
+      display: false,
       showOverflowTooltip: true,
     },
     {
       label: '月折旧额(每台/套)',
-      prop: 'ytxe',
+      prop: 'yzje',
       type: 'number',
       span: 24,
       minWidth: 90,
       align: 'center',
       search: true,
+      display: false,
       showOverflowTooltip: true,
     },
     {
       label: '研发分摊率(%)',
-      prop: 'yzje',
+      prop: 'yanfaFenTanLv',
       type: 'number',
       span: 24,
       minWidth: 90,
@@ -128,21 +138,20 @@ export default {
       showOverflowTooltip: true,
     },
     {
-      label: '分摊率确定依据',
-      prop: 'ftlqdyj',
-      type: 'textarea',
+      label: '分摊确定依据',
+      prop: 'fenTanLvQueDingYiJu',
       span: 24,
-      minWidth: 100,
-      align: 'center',
+      minWidth: 120,
       showOverflowTooltip: true,
     },
     {
       label: '研发折旧',
-      prop: 'yfzj',
+      prop: 'yanfaTanXiao',
       type: 'number',
       span: 24,
       minWidth: 70,
       align: 'center',
+      display: false,
       showOverflowTooltip: true,
     },
   ],

+ 84 - 1
src/views/basic-resource/comp-basic-info/comp-info-setting.vue

@@ -1,18 +1,37 @@
 <template>
   <basic-container>
+
+    <basic-card title="LOGO设置">
+      <avue-form :option="logoOption" v-model="logoForm" style="width: 320px; margin: 0;"></avue-form>
+    </basic-card>
+
     <year-month-select v-model="yearAndMonth" :showMonth="false" style="width: 120px;"></year-month-select>
+
+    <basic-card title="企业基础信息表">
+      <comp-info-table :yearAndMonth="yearAndMonth"></comp-info-table>
+    </basic-card>
+
     <basic-card title="所属二级单位/部门">
       <div style="width: 680px;">
         <comp-dept-list :yearAndMonth="yearAndMonth"></comp-dept-list>
       </div>
       
     </basic-card>
+
+    <basic-card title="高企证书上传">
+      <avue-form :option="picOption" v-model="picForm" style="width: 320px; margin: 0;"></avue-form>
+    </basic-card>
+
+    <basic-card title="出勤时间设置">
+      <avue-form :option="attendOption" v-model="attendForm" style="width: 320px; margin: 0;"></avue-form>
+    </basic-card>
   </basic-container>
 </template>
 
 <script>
 import YearMonthSelect from "@/components/year-month-select";
 import basicCard from "@/components/basic-card";
+import compInfoTable from "./components/comp-info-table.vue";
 import compDeptList from "./components/comp-dept-list.vue";
 import moment from "moment";
 
@@ -20,11 +39,75 @@ export default {
   components: {
     YearMonthSelect,
     basicCard,
-    compDeptList
+    compDeptList,
+    compInfoTable
   },
   data() {
     return {
       yearAndMonth: moment(new Date()).format('YYYY'),
+
+      logoForm: {},
+      logoOption: {
+        submitText: '保存',
+        emptyBtn: false,
+        column: [
+          {
+            label: "企业LOGO",
+            prop: "attachment",
+            type: "upload",
+            listType: "picture-img",
+            span: 24,
+            fileType: "img", //img/video/audio
+            accept: "image/png, image/jpeg",
+            propsHttp: {
+              res: "data",
+            },
+            tip: "注:上传LOGO图片,尺寸推荐:20*20,显示在系统左上角。",
+            action: "https://api.avuejs.com/imgupload",
+          },
+        ],
+      },
+
+      picForm: {
+        attachment: [],
+      },
+      picOption: {
+        submitText: '保存',
+        emptyBtn: false,
+        column: [
+          {
+            label: "高企证书",
+            prop: "attachment",
+            type: "upload",
+            listType: "picture-card",
+            span: 24,
+            fileType: "img", //img/video/audio
+            accept: "image/png, image/jpeg",
+            limit: 5,
+            propsHttp: {
+              res: "data",
+            },
+            tip: "请上传当前年度的高企证书",
+            action: "https://api.avuejs.com/imgupload",
+          },
+        ],
+      },
+
+      attendForm: {},
+      attendOption: {
+        submitText: '保存',
+        emptyBtn: false,
+        column: [
+         {
+            label: '作息时间',
+            prop: 'num',
+            type: 'number',
+            span: 24,
+            min: 0,
+            precision: 1,
+         }
+        ]
+      }
     }
   },
 }

+ 67 - 0
src/views/basic-resource/comp-basic-info/components/comp-info-table.vue

@@ -0,0 +1,67 @@
+<template>
+  <div class="comp-info-table">
+    <div class="top-btn">
+      <el-button type="primary" size="small">保存</el-button>
+      <el-button type="primary" plain size="small">读取上年度数据</el-button>
+    </div>
+    <div class="table-wrap">
+      <table>
+        <tr>
+          <td class="label">本年度营业收入(万元)</td>
+          <td></td>
+          <td class="label">本年度研发费用(万元)</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td class="label">上年度营业收入(万元)</td>
+          <td></td>
+          <td class="label">上年度研发费用(万元)</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td class="label">上上年度营业收入(万元)</td>
+          <td></td>
+          <td class="label">上上年度研发费用(万元)</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td class="label">高新领域</td>
+          <td></td>
+          <td class="label">其他说明</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td class="label">高企认定年度</td>
+          <td></td>
+          <td class="label">高企编号</td>
+          <td></td>
+        </tr>
+      </table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  
+}
+</script>
+
+<style lang="scss" scoped>
+table {
+  width: 100%;
+  border: 1px solid #EBEEF5;
+  margin-top: 10px;
+  font-size: 14px;
+  tr td {
+    border: 1px solid #EBEEF5;
+    padding: 12px 10px;
+  }
+  .label {
+    width: 200px;
+    background-color: #fafafa;
+    color: rgba(0,0,0,.85);
+    text-align: right;
+  }
+}
+</style>

+ 22 - 25
src/views/yf-cost-manage/yf-cost-statistics/zjfy-cost-statistics/dev-depre-allocation.vue

@@ -23,61 +23,48 @@
         </div>
       </template>
 
-      <template slot="rqSearch">
-        <el-date-picker
-          v-model="params.rq"
-          type="daterange"
-          range-separator="至"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          value-format="yyyy-MM-dd"
-          style="width: 220px !important;"
-        >
-        </el-date-picker>
-      </template>
-
       <template slot="jczSearch">
         <div style="display: flex; align-items: center;">
           <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>
-          <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>
       </template>
 
       <template slot="zcyzSearch">
         <div style="display: flex; align-items: center;">
           <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>
-          <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>
       </template>
 
       <template slot="ytxeSearch">
         <div style="display: flex; align-items: center;">
           <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>
-          <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>
       </template>
 
       <template slot="ysygsSearch">
         <div style="display: flex; align-items: center;">
           <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>
-          <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>
       </template>
 
       <template slot="yyfgsSearch">
         <div style="display: flex; align-items: center;">
           <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>
-          <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>
       </template>
       
@@ -127,9 +114,8 @@ export default window.$crudCommon({
     }
   },
   methods: {
-    loadData() {},
     handleExport() {
-      exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+      exportBlob(`/api/kd-scientific/asset/kyyqsbzjfyfpb?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `${this.params.yearAndMonth}科研仪器设备折旧费用分配表.xlsx`);
       });
     },
@@ -149,6 +135,17 @@ export default window.$crudCommon({
   // 模块路径
   name: 'yfCostManage/yfCostStatistics/devDepreAllocation',
   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.yt = item.asset ? item.asset.yt : '';
+      item.zcyz = item.asset ? item.asset.zcyz : '';
+      item.jcz = item.asset ? item.asset.jcz : '';
+      item.yzje = item.asset ? item.asset.yzje : '';
+      item.yanfaTanXiao = Number(new Decimal(item.yzje || 0).mul(item.yanfaFenTanLv || 0)).toFixed(2);
+      return item;
+    });
     return data;
   },
 });

+ 19 - 39
src/views/yf-cost-manage/yf-cost-statistics/zjfy-cost-statistics/hourse-depre-allocation.vue

@@ -23,61 +23,30 @@
         </div>
       </template>
 
-      <template slot="rqSearch">
-        <el-date-picker
-          v-model="params.rq"
-          type="daterange"
-          range-separator="至"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          value-format="yyyy-MM-dd"
-          style="width: 220px !important;"
-        >
-        </el-date-picker>
-      </template>
-
       <template slot="jczSearch">
         <div style="display: flex; align-items: center;">
           <span>净残值:</span>
-          <avue-input-number v-model="params.jczStart" :min="0" style="width: 100px !important;"></avue-input-number>
+          <avue-input-number v-model="params.ysysmMin" :min="0" style="width: 100px !important;"></avue-input-number>
           <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>
       </template>
 
       <template slot="zcyzSearch">
         <div style="display: flex; align-items: center;">
           <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>
-          <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>
       </template>
 
-      <template slot="ytxeSearch">
+      <template slot="yzjeSearch">
         <div style="display: flex; align-items: center;">
           <span>月折旧额:</span>
-          <avue-input-number v-model="params.ytxeStart" :min="0" style="width: 100px !important;"></avue-input-number>
-          <span style="width: 20px; text-align: center;">至</span>
-          <avue-input-number v-model="params.ytxeEnd" :min="0" style="width: 100px !important;"></avue-input-number>
-        </div>
-      </template>
-
-      <template slot="ysygsSearch">
-        <div style="display: flex; align-items: center;">
-          <span>月使用工时:</span>
-          <avue-input-number v-model="params.ysygsStart" :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>
-          <avue-input-number v-model="params.ysygsEnd" :min="0" style="width: 100px !important;"></avue-input-number>
-        </div>
-      </template>
-
-      <template slot="yyfgsSearch">
-        <div style="display: flex; align-items: center;">
-          <span>已研发工时:</span>
-          <avue-input-number v-model="params.yyfgsStart" :min="0" style="width: 100px !important;"></avue-input-number>
-          <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.yzjeMax" :min="0" style="width: 100px !important;"></avue-input-number>
         </div>
       </template>
       
@@ -127,7 +96,6 @@ export default window.$crudCommon({
     }
   },
   methods: {
-    loadData() {},
     handleExport() {
       exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `${this.params.yearAndMonth}科研房屋建筑物折旧费用分配表.xlsx`);
@@ -149,6 +117,18 @@ export default window.$crudCommon({
   // 模块路径
   name: 'yfCostManage/yfCostStatistics/hourseDepreAllocation',
   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.yt = item.asset ? item.asset.yt : '';
+      item.zcyz = item.asset ? item.asset.zcyz : '';
+      item.jcz = item.asset ? item.asset.jcz : '';
+      item.yzje = item.asset ? item.asset.yzje : '';
+      item.yanfaTanXiao = Number(new Decimal(item.yzje || 0).mul(item.yanfaFenTanLv || 0)).toFixed(2);
+      return item;
+    });
+
     return data;
   },
 });