Browse Source

科研预算模块联调

ljb 10 months ago
parent
commit
7f7c8b938b

+ 4 - 2
src/api/projectManage/designCost.js

@@ -30,10 +30,12 @@ export const update = (row) => {
 }
 
 
-export const remove = (data) => {
+export const remove = (ids) => {
   return request({
     url: '/api/kd-scientific/ys-sjfy/remove',
     method: 'post',
-    data
+    params: {
+      ids
+    }
   })
 }

+ 4 - 2
src/api/projectManage/otherCost.js

@@ -30,10 +30,12 @@ export const update = (row) => {
 }
 
 
-export const remove = (data) => {
+export const remove = (ids) => {
   return request({
     url: '/api/kd-scientific/ys-qtfy/remove',
     method: 'post',
-    data
+    params: {
+      ids,
+    }
   })
 }

+ 4 - 3
src/api/projectManage/outsourcingCost.js

@@ -29,11 +29,12 @@ export const update = (row) => {
   })
 }
 
-
-export const remove = (data) => {
+export const remove = (ids) => {
   return request({
     url: '/api/kd-scientific/ys-wtwbyjkffy/remove',
     method: 'post',
-    data
+    params: {
+      ids,
+    }
   })
 }

+ 4 - 2
src/api/projectManage/personCost.js

@@ -30,10 +30,12 @@ export const update = (row) => {
 }
 
 
-export const remove = (data) => {
+export const remove = (ids) => {
   return request({
     url: '/api/kd-scientific/ys-ryrgfy/remove',
     method: 'post',
-    data
+    params: {
+      ids,
+    }
   })
 }

+ 4 - 2
src/api/projectManage/zbCost.js

@@ -30,10 +30,12 @@ export const update = (row) => {
 }
 
 
-export const remove = (data) => {
+export const remove = (ids) => {
   return request({
     url: '/api/kd-scientific/ys-zbtsysyfy/remove',
     method: 'post',
-    data
+    params: {
+      ids
+    }
   })
 }

+ 2 - 0
src/option/projectManage/designCost.js

@@ -36,6 +36,8 @@ export default {
       width: 90,
       span: 24,
       align: 'center',
+      min: 0,
+      precision: 2,
       showOverflowTooltip: true,
       rules: [{
         required: true,

+ 3 - 1
src/option/projectManage/otherCost.js

@@ -18,7 +18,7 @@ export default {
   column: [
     {
       label: '费用内容',
-      prop: 'fyje',
+      prop: 'fynr',
       type: 'input',
       minWidth: 300,
       span: 24,
@@ -37,6 +37,8 @@ export default {
       span: 24,
       align: 'center',
       showOverflowTooltip: true,
+      min: 0,
+      precision: 2,
       rules: [{
         required: true,
         message: '请输入预算金额',

+ 4 - 1
src/option/projectManage/outsourcingCost.js

@@ -9,7 +9,7 @@ export default {
   viewBtn: true,
   selection: true,
   searchLabelWidth: 90,
-  labelWidth: 90,
+  labelWidth: 120,
   menuWidth: 220,
   dialogClickModal: false,
   dialogWidth: 500,
@@ -48,6 +48,9 @@ export default {
       type: 'number',
       width: 90,
       span: 24,
+      align: 'center',
+      min: 0,
+      precision: 2,
       showOverflowTooltip: true,
       rules: [{
         required: true,

+ 2 - 0
src/option/projectManage/personCost.js

@@ -69,6 +69,7 @@ export default {
       prop: 'zzsc',
       type: 'number',
       min: 0,
+      precision: 2,
       span: 24,
       minWidth: 90,
       align: 'center',
@@ -79,6 +80,7 @@ export default {
       prop: 'pjrgfy',
       type: 'number',
       min: 0,
+      precision: 2,
       span: 24,
       minWidth: 90,
       align: 'center',

+ 2 - 0
src/option/projectManage/zbCost.js

@@ -36,6 +36,8 @@ export default {
       width: 90,
       span: 24,
       align: 'center',
+      min: 0,
+      precision: 2,
       showOverflowTooltip: true,
       rules: [{
         required: true,

+ 22 - 8
src/option/projectManage/zztlCost.js

@@ -9,10 +9,10 @@ export default {
   viewBtn: true,
   selection: true,
   searchLabelWidth: 140,
-  labelWidth: 140,
+  labelWidth: 180,
   menuWidth: 220,
   dialogClickModal: false,
-  dialogWidth: 760,
+  dialogWidth: 500,
   dialogType: "drawer",
   height: '600',
   column: [
@@ -21,6 +21,8 @@ export default {
       prop: 'wzmc',
       type: 'input',
       width: 100,
+      span: 24,
+      span: 24,
       showOverflowTooltip: true,
       rules: [{
         required: true,
@@ -32,7 +34,10 @@ export default {
       label: '用量',
       prop: 'yl',
       type: 'number',
+      min: 0,
+      precision: 2,
       width: 90,
+      span: 24,
       align: 'center',
       showOverflowTooltip: true,
     },
@@ -41,7 +46,9 @@ export default {
       prop: 'dj',
       type: 'number',
       min: 0,
+      precision: 2,
       width: 100,
+      span: 24,
       align: 'center',
       showOverflowTooltip: true,
     },
@@ -50,18 +57,21 @@ export default {
       prop: 'zzsc',
       type: 'number',
       min: 0,
+      precision: 2,
       span: 12,
       width: 90,
+      span: 24,
       align: 'center',
       showOverflowTooltip: true,
+      display: false,
     },
     {
       label: '2-仪器设备名称',
       prop: 'yqsbmc',
       type: 'input',
-      min: 0,
       span: 12,
-      width: 120,
+      minWidth: 120,
+      span: 24,
       showOverflowTooltip: true,
     },
     {
@@ -69,8 +79,10 @@ export default {
       prop: 'ysje',
       type: 'number',
       min: 0,
+      precision: 2,
       span: 12,
-      width: 120,
+      minWidth: 140,
+      span: 24,
       align: 'center',
       showOverflowTooltip: true,
     },
@@ -78,9 +90,9 @@ export default {
       label: '3-固定资产名称(租赁)',
       prop: 'gdzcmc',
       type: 'input',
-      min: 0,
       span: 12,
-      width: 120,
+      minWidth: 110,
+      span: 24,
       showOverflowTooltip: true,
     },
     {
@@ -89,7 +101,9 @@ export default {
       type: 'number',
       min: 0,
       span: 12,
-      width: 100,
+      minWidth: 100,
+      span: 24,
+      precision: 2,
       align: 'center',
       showOverflowTooltip: true,
     },

+ 26 - 5
src/views/project-manage/components/design-cost.vue

@@ -3,7 +3,7 @@
     <div style="margin-top: 6px;">
       <el-form :inline="true">
         <el-form-item label="研发项目名称">
-          <project-select v-model="currProjectId" @change="handleProjectChange"></project-select>
+          <project-select v-model="params.xmId" @change="handleProjectChange"></project-select>
         </el-form-item>
         <el-form-item label="研发项目编号">
           {{ selProject.xmbh }}
@@ -83,7 +83,9 @@ export default window.$crudCommon({
   },
   data() {
     return {
-      currProjectId: '',
+      params: {
+        xmId: ''
+      },
       selProject: {},
 
       wideTableColumns: [],
@@ -91,12 +93,31 @@ export default window.$crudCommon({
     };
   },
   created() {
-    this.currProjectId = this.projectId;
+    this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
   },
   methods: {
+    handleBeforeOpen(done, type) {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
+
+      done();
+    },
+    getList() {
+      if (!this.params.xmId) {
+        return;
+      }
+      this.loadData();
+    },
+    getFormData() {
+      return { ...this.form, xmId: this.params.xmId }
+    },
     handleProjectChange(data) {
       this.selProject = data;
+      this.page.currentPage = 1;
+      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-sjfy/import');
@@ -107,7 +128,7 @@ export default window.$crudCommon({
     },
     handleExport() {
       exportBloByPost(`/api/kd-scientific/ys-sjfy/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `设计费用.xlsx`);
+        downloadXls(res.data, `${this.selProject.xmmc}设计费用.xlsx`);
       });
     },
     /**
@@ -116,7 +137,7 @@ export default window.$crudCommon({
      */
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `设计费用`;
+      this.printTitle = `${this.selProject.xmmc}设计费用`;
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
       })

+ 28 - 5
src/views/project-manage/components/other-cost.vue

@@ -3,7 +3,7 @@
     <div style="margin-top: 6px;">
       <el-form :inline="true">
         <el-form-item label="研发项目名称">
-          <project-select v-model="currProjectId" @change="handleProjectChange"></project-select>
+          <project-select v-model="params.xmId" @change="handleProjectChange"></project-select>
         </el-form-item>
         <el-form-item label="研发项目编号">
           {{ selProject.xmbh }}
@@ -17,6 +17,7 @@
       v-on="onEvent"
       v-model="form"
       :page.sync="page"
+      :before-open="handleBeforeOpen"
     >
       <template slot="menuLeft">
         <el-button
@@ -84,7 +85,9 @@ export default window.$crudCommon({
   },
   data() {
     return {
-      currProjectId: '',
+      params: {
+        xmId: ''
+      },
       selProject: {},
 
       wideTableColumns: [],
@@ -92,12 +95,32 @@ export default window.$crudCommon({
     };
   },
   created() {
-    this.currProjectId = this.projectId;
+    this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
   },
   methods: {
+    handleBeforeOpen(done, type) {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
+
+      done();
+    },
+    getList() {
+      if (!this.params.xmId) {
+        return;
+      }
+      console.log(this.params.xmId)
+      this.loadData();
+    },
+    getFormData() {
+      return { ...this.form, xmId: this.params.xmId }
+    },
     handleProjectChange(data) {
       this.selProject = data;
+      this.page.currentPage = 1;
+      this.getList(this.page);
     },
     uploadAfter() {
       this.page.currentPage = 1;
@@ -105,7 +128,7 @@ export default window.$crudCommon({
     },
     handleExport() {
       exportBloByPost(`/api/kd-scientific/ys-qtfy/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `其他费用.xlsx`);
+        downloadXls(res.data, `${this.selProject.xmmc}其他费用.xlsx`);
       });
     },
     /**
@@ -114,7 +137,7 @@ export default window.$crudCommon({
      */
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `其他费用`;
+      this.printTitle = `${this.selProject.xmmc}其他费用`;
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
       })

+ 27 - 5
src/views/project-manage/components/outsourcing-cost.vue

@@ -3,7 +3,7 @@
     <div style="margin-top: 6px;">
       <el-form :inline="true">
         <el-form-item label="研发项目名称">
-          <project-select v-model="currProjectId" @change="handleProjectChange"></project-select>
+          <project-select v-model="params.xmId" @change="handleProjectChange"></project-select>
         </el-form-item>
         <el-form-item label="研发项目编号">
           {{ selProject.xmbh }}
@@ -17,6 +17,7 @@
       v-on="onEvent"
       v-model="form"
       :page.sync="page"
+      :before-open="handleBeforeOpen"
     >
       <template slot="menuLeft">
         <el-button
@@ -84,7 +85,9 @@ export default window.$crudCommon({
   },
   data() {
     return {
-      currProjectId: '',
+      params: {
+        xmId: ''
+      },
       selProject: {},
 
       wideTableColumns: [],
@@ -92,12 +95,31 @@ export default window.$crudCommon({
     };
   },
   created() {
-    this.currProjectId = this.projectId;
+    this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
   },
   methods: {
+    handleBeforeOpen(done, type) {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
+
+      done();
+    },
+    getList() {
+      if (!this.params.xmId) {
+        return;
+      }
+      this.loadData();
+    },
+    getFormData() {
+      return { ...this.form, xmId: this.params.xmId }
+    },
     handleProjectChange(data) {
       this.selProject = data;
+      this.page.currentPage = 1;
+      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-wtwbyjkffy/import');
@@ -108,7 +130,7 @@ export default window.$crudCommon({
     },
     handleExport() {
       exportBloByPost(`/api/kd-scientific/ys-wtwbyjkffy/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `委托外部研究开发费用.xlsx`);
+        downloadXls(res.data, `${this.selProject.xmmc}委托外部研究开发费用.xlsx`);
       });
     },
     /**
@@ -117,7 +139,7 @@ export default window.$crudCommon({
      */
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `委托外部研究开发费用`;
+      this.printTitle = `${this.selProject.xmmc}委托外部研究开发费用`;
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
       })

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

@@ -131,7 +131,8 @@ export default window.$crudCommon({
     },
     handleProjectChange(data) {
       this.selProject = data;
-      this.getList();
+      this.page.currentPage = 1;
+      this.getList(this.page);
     },
     handleImport() {
       let excelParams = { yearAndMonth: this.params.yearAndMonth };

+ 27 - 5
src/views/project-manage/components/zb-cost.vue

@@ -3,7 +3,7 @@
     <div style="margin-top: 6px;">
       <el-form :inline="true">
         <el-form-item label="研发项目名称">
-          <project-select v-model="currProjectId" @change="handleProjectChange"></project-select>
+          <project-select v-model="params.xmId" @change="handleProjectChange"></project-select>
         </el-form-item>
         <el-form-item label="研发项目编号">
           {{ selProject.xmbh }}
@@ -17,6 +17,7 @@
       v-on="onEvent"
       v-model="form"
       :page.sync="page"
+      :before-open="handleBeforeOpen"
     >
       <template slot="menuLeft">
         <el-button
@@ -84,7 +85,9 @@ export default window.$crudCommon({
   },
   data() {
     return {
-      currProjectId: '',
+      params: {
+        xmId: ''
+      },
       selProject: {},
 
       wideTableColumns: [],
@@ -92,12 +95,31 @@ export default window.$crudCommon({
     };
   },
   created() {
-    this.currProjectId = this.projectId;
+    this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
   },
   methods: {
+    handleBeforeOpen(done, type) {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
+
+      done();
+    },
+    getList() {
+      if (!this.params.xmId) {
+        return;
+      }
+      this.loadData();
+    },
+    getFormData() {
+      return { ...this.form, xmId: this.params.xmId }
+    },
     handleProjectChange(data) {
       this.selProject = data;
+      this.page.currentPage = 1;
+      this.getList(this.page);
     },
     handleImport() {
       this.$refs.uploadExcelDialog.open('/api/kd-scientific/ys-zbtsysyfy/import');
@@ -108,7 +130,7 @@ export default window.$crudCommon({
     },
     handleExport() {
       exportBloByPost(`/api/kd-scientific/ys-zbtsysyfy/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `装备调试费用与试验费用.xlsx`);
+        downloadXls(res.data, `${this.selProject.xmmc}装备调试费用与试验费用.xlsx`);
       });
     },
     /**
@@ -117,7 +139,7 @@ export default window.$crudCommon({
      */
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `装备调试费用与试验费用`;
+      this.printTitle = `${this.selProject.xmmc}装备调试费用与试验费用`
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
       })

+ 27 - 5
src/views/project-manage/components/zztl-cost.vue

@@ -3,7 +3,7 @@
     <div style="margin-top: 6px;">
       <el-form :inline="true">
         <el-form-item label="研发项目名称">
-          <project-select v-model="currProjectId" @change="handleProjectChange"></project-select>
+          <project-select v-model="params.xmId" @change="handleProjectChange"></project-select>
         </el-form-item>
         <el-form-item label="研发项目编号">
           {{ selProject.xmbh }}
@@ -15,6 +15,7 @@
       v-on="onEvent"
       v-model="form"
       :page.sync="page"
+      :before-open="handleBeforeOpen"
     >
       <template slot="menuLeft">
         <el-button
@@ -82,7 +83,9 @@ export default window.$crudCommon({
   },
   data() {
     return {
-      currProjectId: '',
+      params: {
+        xmId: ''
+      },
       selProject: {},
 
       wideTableColumns: [],
@@ -90,12 +93,31 @@ export default window.$crudCommon({
     };
   },
   created() {
-    this.currProjectId = this.projectId;
+    this.params.xmId = this.projectId;
     this.option.height = window.innerHeight - 340;
   },
   methods: {
+    handleBeforeOpen(done, type) {
+      if (!this.params.xmId) {
+        this.$message.warning("请选择项目!");
+        return;
+      }
+
+      done();
+    },
+    getList() {
+      if (!this.params.xmId) {
+        return;
+      }
+      this.loadData();
+    },
+    getFormData() {
+      return { ...this.form, xmId: this.params.xmId }
+    },
     handleProjectChange(data) {
       this.selProject = data;
+      this.page.currentPage = 1;
+      this.getList(this.page);
     },
     handleImport() {
       let excelParams = { yearAndMonth: this.params.yearAndMonth };
@@ -107,7 +129,7 @@ export default window.$crudCommon({
     },
     handleExport() {
       exportBloByPost(`/api/kd-scientific/ys-zjtrfy/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `人员人工费用.xlsx`);
+        downloadXls(res.data, `${this.selProject.xmmc}直接投入费用.xlsx`);
       });
     },
     /**
@@ -116,7 +138,7 @@ export default window.$crudCommon({
      */
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `直接投入费用`;
+      this.printTitle = `${this.selProject.xmmc}直接投入费用`;
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
       })