Browse Source

Merge branch 'kd-dev' of https://gitee.com/zhoulisky/kd-web into kd-dev

zhoulisky 9 months ago
parent
commit
ceebca5e8d

+ 11 - 0
src/api/externalReports/jjkcAuxiliaryDetails.js

@@ -0,0 +1,11 @@
+import request from '@/router/axios';
+
+export const getList = (params) => {
+  return request({
+    url: '/api/kd-scientific/xm/cost/details/deduction-list',
+    method: 'get',
+    params: {
+      ...params,
+    }
+  })
+}

+ 14 - 0
src/option/yfCostManage/basicDataSetting/yfCostBill.js

@@ -78,6 +78,13 @@ export default {
       width: 120,
       align: 'center',
       showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入凭证字号',
+          trigger: 'blur',
+        },
+      ],
     },
     {
       label: '摘要',
@@ -87,6 +94,13 @@ export default {
       width: 140,
       align: 'center',
       showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入摘要',
+          trigger: 'blur',
+        },
+      ],
     },
     {
       label: '科目名称',

+ 2 - 14
src/option/yfCostManage/yfCostStatistics/zjtlCostSummaryList.js

@@ -16,6 +16,7 @@ export default {
   showSummary: true,
   sumColumnList: [
     {
+      label: '合计',
       name: 'cailiaofy',
       type: 'sum',
     },
@@ -73,7 +74,7 @@ export default {
       prop: 'cailiaofy',
       type: 'number',
       span: 24,
-      minWidth: 60,
+      minWidth: 100,
       align: 'center',
       min: 0,
       precision: 2,
@@ -167,18 +168,5 @@ export default {
       precision: 2,
       showOverflowTooltip: true,
     },
-    {
-      label: '费用区间',
-      prop: 'costRange',
-      type: 'number',
-      span: 24,
-      minWidth: 70,
-      align: 'center',
-      min: 0,
-      precision: 2,
-      search: true,
-      showOverflowTooltip: true,
-      hide: true
-    },
   ],
 };

+ 8 - 8
src/page/index/top/index.vue

@@ -27,14 +27,14 @@
           <top-color></top-color>
         </div>
       </el-tooltip>
-      <el-tooltip v-if="showDebug"
+      <!-- <el-tooltip v-if="showDebug"
                   effect="dark"
                   :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"
                   placement="bottom">
         <div class="top-bar__item">
           <top-logs></top-logs>
         </div>
-      </el-tooltip>
+      </el-tooltip> -->
       <el-tooltip v-if="showLock"
                   effect="dark"
                   :content="$t('navbar.lock')"
@@ -51,20 +51,20 @@
           <top-theme></top-theme>
         </div>
       </el-tooltip>
-      <el-tooltip effect="dark"
+      <!-- <el-tooltip effect="dark"
                   :content="$t('navbar.notice')"
                   placement="bottom">
         <div class="top-bar__item top-bar__item--show">
           <top-notice></top-notice>
         </div>
-      </el-tooltip>
-      <el-tooltip effect="dark"
+      </el-tooltip> -->
+      <!-- <el-tooltip effect="dark"
                   :content="$t('navbar.language')"
                   placement="bottom">
         <div class="top-bar__item top-bar__item--show">
           <top-lang></top-lang>
         </div>
-      </el-tooltip>
+      </el-tooltip> -->
       <el-tooltip v-if="showFullScren"
                   effect="dark"
                   :content="isFullScren?$t('navbar.screenfullF'):$t('navbar.screenfull')"
@@ -88,8 +88,8 @@
           <el-dropdown-item>
             <router-link to="/info/index"><i class="icon-yonghu" /> {{$t('navbar.userinfo')}}</router-link>
           </el-dropdown-item>
-          <el-dropdown-item @click.native="switchDept"><i class="icon-guanlianshebei" /> {{$t('navbar.switch')}}
-          </el-dropdown-item>
+          <!-- <el-dropdown-item @click.native="switchDept"><i class="icon-guanlianshebei" /> {{$t('navbar.switch')}}
+          </el-dropdown-item> -->
           <el-dropdown-item @click.native="logout" divided><i class="icon-tuichu" /> {{$t('navbar.logOut')}}
           </el-dropdown-item>
         </el-dropdown-menu>

+ 259 - 0
src/views/external-reports/jjkc-standards/components/common-list.vue

@@ -0,0 +1,259 @@
+<template>
+  <div>
+    <div style="width: 100%; display: flex; align-items: center; justify-content: space-between;">
+      <div class="left" style="display: flex;">
+        <div style="margin-right: 50px;">研发项目编号:{{ data[0].xmbh }}</div>
+        <div style="margin-right: 50px;">项目项目名称:{{ data[0].xmmc }}</div>
+        <div style="margin-right: 50px;">支出类型:<span style="color: #409EFF;">{{ getCostName }}</span></div>
+        <div>金额单位:元</div>
+      </div>
+      <div class="right">
+        <el-button
+          type="warning"
+          size="small"
+          plain
+          icon="el-icon-download"
+          @click="handleExport"
+          style="margin-right: 10px;"
+        >
+          导出
+        </el-button>
+      </div>
+    </div>
+    <avue-crud class="common-crud" :option="options" :data="data">
+    </avue-crud>
+  </div>
+</template>
+
+<script>
+import {exportBlob} from "@/api/common";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
+
+export default {
+  props: {
+    // 支出类型
+    costType: [String, Number],
+    data: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      options: {
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        addBtn: false,
+        selection: true,
+        searchLabelWidth: 140,
+        labelWidth: 100,
+        menuWidth: 180,
+        menu: false,
+        dialogClickModal: false,
+        refreshBtn: false,
+        columnBtn: false,
+        gridBtn: false,
+        dialogWidth: 500,
+        dialogType: "drawer",
+        showSummary: true,
+        sumColumnList: [
+          {
+            label: '合计',
+            name: 'kjpzje',
+            type: 'sum'
+          },
+          {
+            name: 'amount',
+            type: 'sum',
+          },
+          {
+            name: 'ryrgfy',
+            type: 'sum',
+          },
+          {
+            name: 'zjtrfy',
+            type: 'sum'
+          },
+          {
+            name: 'zjfy',
+            type: 'sum'
+          },
+          {
+            name: 'wxzctx',
+            type: 'sum'
+          },
+          {
+            name: 'xcpsjfd',
+            type: 'sum'
+          },
+          {
+            name: 'qtxgfy',
+            type: 'sum'
+          },
+          {
+            name: 'wtjnjgfy',
+            type: 'sum'
+          },
+          {
+            name: 'wtjwjgfy',
+            type: 'sum'
+          },
+        ],
+        column: [
+          {
+            label: '凭证信息',
+            align: 'center',
+            children: [
+              {
+                label: '日期',
+                prop: 'recordDate',
+                width: 85,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+               {
+                label: '种类',
+                prop: 'type',
+                width: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '号数',
+                prop: 'voucherNumber',
+                width: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '摘要',
+                prop: 'digest',
+                width: 100,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+            ]
+          },
+          {
+            label: '会计凭证记载金额',
+            prop: 'kjpzje',
+            width: 120,
+            align: 'center',
+            showOverflowTooltip: true,
+          },
+          {
+            label: '税法规定的归集金额',
+            prop: 'amount',
+            width: 130,
+            align: 'center',
+            showOverflowTooltip: true,
+          },
+          {
+            label: '费用明细(税法规定)',
+            align: 'center',
+            children: [
+              {
+                label: '人员人工费用',
+                prop: 'ryrgfy',
+                span: 24,
+                minWidth: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '直接投入费用',
+                prop: 'zjtrfy',
+                span: 24,
+                minWidth: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '折旧费用',
+                prop: 'zjfy',
+                span: 24,
+                minWidth: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '无形资产摊销',
+                prop: 'wxzctx',
+                span: 24,
+                minWidth: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '新产品设计费等',
+                prop: 'xcpsjfd',
+                span: 24,
+                minWidth: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '其他相关费用',
+                prop: 'qtxgfy',
+                span: 24,
+                minWidth: 90,
+                align: 'center',
+                showOverflowTooltip: true,
+              },
+              {
+                label: '委托外部费用',
+                align: 'center',
+                children: [
+                  {
+                    label: '委托境内机构或个人进行研发活动所发生的费用',
+                    prop: 'wtjnjgfy',
+                    span: 24,
+                    minWidth: 110,
+                    align: 'center',
+                    showOverflowTooltip: true,
+                  },
+                  {
+                    label: '委托境外机构进行研发活动所发生的费用',
+                    prop: 'wtjwjgfy',
+                    span: 24,
+                    minWidth: 110,
+                    align: 'center',
+                    showOverflowTooltip: true,
+                  },
+                ]
+              },
+            ]
+          },
+        ],
+      },
+    };
+  },
+  computed: {
+    getCostName() {
+      let costTypeObj = {1: '费用化', 2: '资本化'};
+      return costTypeObj[this.costType];
+    }
+  },
+  methods: {
+    handleExport() {
+      this.$message.error("暂未开发");
+      // exportBlob(`/api/kd-scientific/goods/yanfalingliaodan/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+      //   downloadXls(res.data, `${this.params.yearAndMonth}${title}.xlsx`);
+      // });
+    },
+  }
+};
+</script>
+
+<style lang="scss">
+.common-crud {
+  .avue-crud__header {
+    min-height: 0;
+  }
+}
+</style>

+ 119 - 0
src/views/external-reports/jjkc-standards/jjkc-auxiliary-details.vue

@@ -0,0 +1,119 @@
+<template>
+  <basic-container v-loading="loading">
+    <avue-form ref="searchForm" v-model="params" :option="searchOption" class="cl-search-form">
+      <template slot-scope="{size}" slot="menuForm">
+        <el-button type="primary" :size="size" icon="el-icon-search" @click="handleSearchBtn">查询</el-button>
+        <el-button :size="size" icon="el-icon-delete" @click="handleResetBtn">清空</el-button>
+      </template>
+    </avue-form>
+    <div>
+    </div>
+    <div style="display: flex; align-items: center;">
+      <year-month-select v-model="yearAndMonth" :showMonth="false" style="margin: 6px 0 20px;"></year-month-select>
+      <el-radio-group v-model="costType" size="mini" style="margin: 8px 0 20px 8px;">
+        <el-radio-button :label="1">费用化明细表</el-radio-button>
+        <el-radio-button :label="2">资本化明细表</el-radio-button>
+      </el-radio-group>
+    </div>
+    <template v-if="listData.length">
+      <common-list v-for="(item, index) of listData" :data="item" :cost-type="costType" :key="index" style="margin-bottom: 25px;"></common-list>
+    </template>
+    <el-empty v-else description="暂无数据"></el-empty>
+  </basic-container>
+</template>
+
+<script>
+import YearMonthSelect from "@/components/year-month-select";
+import commonList from "./components/common-list.vue";
+import { getList } from "@/api/externalReports/jjkcAuxiliaryDetails";
+import moment from "moment";
+
+export default {
+  components: {
+    YearMonthSelect,
+    commonList
+  },
+  data() {
+    return {
+      loading: false,
+      searchOption: {
+        submitBtn:false,
+        emptyBtn:false,
+        column: [{
+          label: '项目名称',
+          prop: 'xmmc',
+          type: 'input',
+        }]
+      },
+      listData: [],
+
+      yearAndMonth: moment(new Date()).format('YYYYMM'),
+      params: {},
+
+      costType: 1
+    }
+  },
+  watch: {
+    yearAndMonth() {
+      this.loadData();
+    },
+    costType() {
+      this.loadData();
+    }
+  },
+  mounted() {
+    this.loadData();
+  },
+  methods: {
+    loadData() {
+      let params = { ...this.params, type: this.costType };
+      this.loading = true;
+      getList({
+        ...params,
+        yearAndMonth: this.yearAndMonth,
+      }).then(({ data }) => {
+        this.loading = false;
+        if (data.code == 200) {
+          let allList = data.data.map(item => {
+            let childArr = item.costList.map(costItem => {
+              return { xmmc: item.xmmc, xmbh: item.xmbh, ...costItem, kjpzje: costItem.amount };
+            });
+            return childArr;
+          });
+
+
+          this.listData = allList;
+        }
+      }).catch(() => {
+        this.loading = false;
+      });
+    },
+    handleSearchBtn() {
+      this.loadData();
+    },
+    handleResetBtn() {
+      this.params = {};
+      this.$refs.searchForm.resetForm();
+      this.loadData();
+    },
+  },
+}
+</script>
+
+<style lang="scss">
+.cl-search-form {
+  .el-form-item--small .el-form-item__label {
+    display: none;
+  }
+  .el-form-item--small .el-form-item__content {
+    margin-left: 8px !important;
+  }
+  .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item  {
+    margin-bottom: 6px;
+  }
+  .avue-form__group .el-col {
+    width: auto !important;
+    padding-top: 0 !important;
+  }
+}
+</style>

+ 4 - 0
src/views/project-manage/components/design-cost.vue

@@ -124,6 +124,10 @@ export default window.$crudCommon({
       this.selProject = data;
     },
     handleImport() {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
       let excelParams = { xmId: this.params.xmId };
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-sjfy/import', excelParams);
     },

+ 4 - 0
src/views/project-manage/components/outsourcing-cost.vue

@@ -126,6 +126,10 @@ export default window.$crudCommon({
       this.selProject = data;
     },
     handleImport() {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
       let excelParams = { xmId: this.params.xmId };
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-wtwbyjkffy/import', excelParams);
     },

+ 5 - 1
src/views/project-manage/components/person-cost.vue

@@ -119,7 +119,7 @@ export default window.$crudCommon({
       this.option.column.forEach(item => {
         if (item.prop == "technicianId") {
           let startDate = this.selProject.xmkssj || new Date();
-          let endDate = this.selProject.xmjssj || new Date();
+          let endDate = this.selProject.xmkssj || new Date();
           item.dicUrl = '/api/kd-scientific/technician/page/date-interval';
           item.dicQuery.startDate = moment(startDate).format("yyyyMM");
           item.dicQuery.endDate = moment(endDate).format("yyyyMM");
@@ -141,6 +141,10 @@ export default window.$crudCommon({
       this.selProject = data;
     },
     handleImport() {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
       let excelParams = {xmId: this.params.xmId };
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-ryrgfy/import', excelParams);
     },

+ 4 - 0
src/views/project-manage/components/wxzctx-cost.vue

@@ -185,6 +185,10 @@ export default window.$crudCommon({
       this.selProject = data;
     },
     handleImport() {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
       let excelParams = { xmId: this.params.xmId };
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-wxzctxfy/import', excelParams);
     },

+ 4 - 0
src/views/project-manage/components/zb-cost.vue

@@ -126,6 +126,10 @@ export default window.$crudCommon({
       this.selProject = data;
     },
     handleImport() {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
       let excelParams = { xmId: this.params.xmId };
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-zbtsysyfy/import', excelParams);
     },

+ 4 - 0
src/views/project-manage/components/zjfyycqdtfy-cost.vue

@@ -185,6 +185,10 @@ export default window.$crudCommon({
       this.selProject = data;
     },
     handleImport() {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
       let excelParams = { xmId: this.params.xmId };
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-zjfyycqdtfy/import', excelParams);
     },

+ 4 - 0
src/views/project-manage/components/zztl-cost.vue

@@ -125,6 +125,10 @@ export default window.$crudCommon({
       this.selProject = data;
     },
     handleImport() {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
       let excelParams = { xmId: this.params.xmId };
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-zjtrfy/import', excelParams);
     },

+ 1 - 1
src/views/tech-person/month-cjcyry.vue

@@ -139,7 +139,7 @@ export default window.$crudCommon({
     handleProjectChange(data) {
       this.technicianList = [];
       let startDate = moment(data.xmkssj).format('yyyyMM');
-      let endDate = moment(data.xmjssj).format('yyyyMM');
+      let endDate = moment(data.xmkssj).format('yyyyMM');
 
       getListByProDate(startDate, endDate).then(({ data }) => {
         if (data.code == 200) {

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

@@ -17,7 +17,7 @@
         >
           导出
         </el-button>
-        <print-table-btn @click="printTable" />
+        <!-- <print-table-btn @click="printTable" /> -->
         
         <div style="display: flex; align-items: center;">
           <year-month-select v-model="params.yearAndMonth" :showAllYear="false"></year-month-select>

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

@@ -16,7 +16,7 @@
         >
           导出
         </el-button>
-        <print-table-btn @click="printTable" />
+        <!-- <print-table-btn @click="printTable" /> -->
         
         <div style="display: flex; align-items: center;">
           <year-month-select v-model="params.yearAndMonth" :showAllYear="false"></year-month-select>

+ 3 - 3
src/views/yf-cost-manage/yf-cost-statistics/zjtl-cost-statistics/zjtl-cost-summary-list.vue.vue

@@ -15,21 +15,21 @@
         >
           导出
         </el-button>
-        <print-table-btn @click="printTable" />
+        <!-- <print-table-btn @click="printTable" /> -->
         
         <div style="display: flex; align-items: center;">
           <year-month-select v-model="params.yearAndMonth"></year-month-select>
         </div>
       </template>
 
-      <template slot="costRangeSearch">
+      <!-- <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>
+      </template> -->
       
     </avue-crud>