瀏覽代碼

处理科研房屋折旧费用分配表研发分摊率问题、处理每月实际参研人员人员列表问题

ljb 9 月之前
父節點
當前提交
675315800a

+ 1 - 0
src/option/yfCostManage/yfCostStatistics/hourseDepreAllocation.js

@@ -132,6 +132,7 @@ export default {
       prop: 'yanfaFenTanLv',
       type: 'number',
       span: 24,
+      min: 0,
       minWidth: 90,
       align: 'center',
       showOverflowTooltip: true,

+ 4 - 10
src/views/tech-person/month-cjcyry.vue

@@ -40,11 +40,11 @@
       </template>
 
       <template slot="xmIdForm">
-        <project-select placeholder="请选择项目名称" v-model="form.xmId" :params="{ yearAndMonth: params.yearAndMonth }" :noDetail="true" @change="handleProjectChange"></project-select>
+        <project-select placeholder="请选择项目名称" v-model="form.xmId" :params="{ yearAndMonth: params.yearAndMonth }" :noDetail="true"></project-select>
       </template>
 
       <template slot="unicodeForm">
-        <project-person-select v-model="form.unicode" :startDate="projectStartMonth" :disabled="!form.xmId" />
+        <person-select v-model="form.unicode" :yearAndMonth="params.yearAndMonth" />
       </template>
       
     </avue-crud>
@@ -69,7 +69,7 @@ import 'nprogress/nprogress.css';
 import {getToken} from "@/util/auth";
 import {downloadXls} from "@/util/util";
 import projectSelect from "@/components/project-select";
-import projectPersonSelect from "@/components/project-person-select";
+import personSelect from "@/components/person-select";
 import {yyysbmd} from "@/api/techPerson/monthSjcyry"
 
 
@@ -77,7 +77,7 @@ export default window.$crudCommon({
   components: {
     YearMonthSelect,
     projectSelect,
-    projectPersonSelect
+    personSelect
   },
   data() {
     return {
@@ -89,9 +89,6 @@ export default window.$crudCommon({
 
       wideTableColumns: [],
       printTitle: "",
-
-      // 项目开始月份
-      projectStartMonth: ''
     };
   },
   watch: {
@@ -134,9 +131,6 @@ export default window.$crudCommon({
         }
       });
     },
-    handleProjectChange(data) {
-      this.projectStartMonth = moment(data.xmkssj).format('yyyyMM');
-    },
     handleExport() {
       this.$confirm("是否导出吗?", "提示", {
         confirmButtonText: "确定",

+ 6 - 1
src/views/yf-cost-manage/yf-cost-statistics/zjfy-cost-statistics/hourse-depre-allocation.vue

@@ -107,6 +107,9 @@ export default window.$crudCommon({
 
       return newParams;
     },
+    getFormData() {
+      return { ...this.form, yanfaFenTanLv: new Decimal(this.form.yanfaFenTanLv || 0).div(new Decimal(100)).toFixed(2) };
+    },
     handleExport() {
       exportBlob(`/api/kd-scientific/lease/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `${this.params.yearAndMonth}科研房屋建筑物折旧费用分配表.xlsx`);
@@ -129,6 +132,7 @@ export default window.$crudCommon({
   name: 'yfCostManage/yfCostStatistics/hourseDepreAllocation',
   res: ({ data }) => {
     data.records = data.records.map(item => {
+      let yanfaFenTanLvDec = new Decimal(item.yanfaFenTanLv || 0);
       item.zcbm = item.asset ? item.asset.zcbm : '';
       item.zcmc = item.asset ? item.asset.zcmc : '';
       item.zclb = item.asset ? item.asset.zclb : '';
@@ -136,7 +140,8 @@ export default window.$crudCommon({
       item.zcyz = item.asset ? item.asset.zcyz : '';
       item.jcz = new Decimal(item.asset.jcz || 0).mul(new Decimal(100));
       item.yzje = item.asset ? item.asset.yzje : '';
-      item.yanfaTanXiao = Number(new Decimal(item.yzje || 0).mul(item.yanfaFenTanLv || 0) / 100).toFixed(2);
+      item.yanfaFenTanLv = yanfaFenTanLvDec.mul(new Decimal(100));
+      item.yanfaTanXiao = new Decimal(item.yzje || 0).mul(yanfaFenTanLvDec).toFixed(2);
       return item;
     });