Browse Source

直接投入费用接口联调

ljb 10 months ago
parent
commit
3a530eac97

+ 8 - 6
src/api/yfCostManage/basicDataSetting/projectZjtrCost.js

@@ -2,7 +2,7 @@ import request from '@/router/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/api/kd-scientific/technician/page',
+    url: '/api/kd-scientific/direct-cost/page',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const add = (row) => {
   return request({
-    url: '/api/kd-scientific/technician/save',
+    url: '/api/kd-scientific/direct-cost/submit',
     method: 'post',
     data: row
   })
@@ -23,17 +23,19 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/api/kd-scientific/technician/update',
+    url: '/api/kd-scientific/direct-cost/submit',
     method: 'post',
     data: row
   })
 }
 
 
-export const remove = (data) => {
+export const remove = (ids) => {
   return request({
-    url: '/api/kd-scientific/technician/remove',
+    url: '/api/kd-scientific/direct-cost/remove',
     method: 'post',
-    data
+    params: {
+      ids
+    }
   })
 }

+ 16 - 9
src/option/yfCostManage/basicDataSetting/projectZjtrCost.js

@@ -16,20 +16,19 @@ export default {
   showSummary: true,
   sumColumnList: [
     {
-      name: 'je',
+      name: 'amount',
       type: 'sum',
     },
   ],
   column: [
     {
       label: '日期',
-      prop: 'rq',
+      prop: 'useDate',
       type: 'date',
       valueFormat: 'yyyy-MM-dd',
       span: 24,
-      width: 100,
+      width: 90,
       align: 'center',
-      search: true,
       showOverflowTooltip: true,
       rules: [
         {
@@ -52,12 +51,19 @@ export default {
     },
     {
       label: '研发项目名称',
-      prop: 'xmId',
-      type: 'select',
+      prop: 'xmmc',
       span: 24,
       minWidth: 160,
       search: true,
       showOverflowTooltip: true,
+      display: false
+    },
+    {
+      label: '研发项目名称',
+      prop: 'xmId',
+      type: 'select',
+      span: 24,
+      showOverflowTooltip: true,
       rules: [
         {
           required: true,
@@ -65,15 +71,16 @@ export default {
           trigger: 'blur',
         },
       ],
+      hide: true,
     },
     {
       label: '直投费用类型',
-      prop: 'zlzclx',
+      prop: 'type',
       type: 'select',
       span: 24,
       minWidth: 260,
       search: true,
-      dicUrl: '/api/kd-system/dict-biz/dictionary?code=renyuanleixing',
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=zhitoufeiyong_lx',
       props: {
         label: 'dictValue',
         value: 'dictKey',
@@ -89,7 +96,7 @@ export default {
     },
     {
       label: '单价(元)',
-      prop: 'je',
+      prop: 'amount',
       type: 'number',
       span: 24,
       width: 100,

+ 1 - 1
src/views/yf-cost-manage/basic-data-setting/picking-detail.vue

@@ -63,7 +63,7 @@
 <script>
 import YearMonthSelect from "@/components/year-month-select";
 import UploadExcelDialog from "@/components/upload-excel-dialog";
-import {exportBloByPost} from "@/api/common";
+import {exportBlob} from "@/api/common";
 import {getToken} from "@/util/auth";
 import {downloadXls} from "@/util/util";
 import projectSelect from "@/components/project-select";

+ 8 - 2
src/views/yf-cost-manage/basic-data-setting/project-zjtl-cost.vue

@@ -64,6 +64,9 @@
 import YearMonthSelect from "@/components/year-month-select";
 import UploadExcelDialog from "@/components/upload-excel-dialog";
 import projectSelect from "@/components/project-select";
+import {exportBlob} from "@/api/common";
+import {getToken} from "@/util/auth";
+import {downloadXls} from "@/util/util";
 import moment from "moment";
 
 
@@ -91,16 +94,19 @@ export default window.$crudCommon({
     }
   },
   methods: {
+    getFormData() {
+      return { ...this.form, yearAndMonth: this.params.yearAndMonth };
+    },
     handleImport() {
       let excelParams = { yearAndMonth: this.params.yearAndMonth };
-      this.$refs.uploadExcelDialog.open('/api/kd-scientific/technician/import', excelParams);
+      this.$refs.uploadExcelDialog.open('/api/kd-scientific/direct-cost/import', excelParams);
     },
     uploadAfter() {
       this.page.currentPage = 1;
       this.getList(this.page);
     },
     handleExport() {
-      exportBloByPost(`/api/kd-scientific/technician/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+      exportBlob(`/api/kd-scientific/direct-cost/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
         downloadXls(res.data, `项目直接投入费用表${this.params.yearAndMonth}.xlsx`);
       });
     },