Browse Source

设计费用接口调试

ljb 10 months ago
parent
commit
b2ac8179fe

+ 4 - 4
src/api/yfCostManage/basicDataSetting/sjzbsyCostLedger.js

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

+ 26 - 5
src/option/yfCostManage/basicDataSetting/sjzbsyCostLedger.js

@@ -57,12 +57,12 @@ export default {
     },
     },
     {
     {
       label: '费用类型',
       label: '费用类型',
-      prop: 'type',
+      prop: 'costType',
       type: 'select',
       type: 'select',
       span: 24,
       span: 24,
       minWidth: 260,
       minWidth: 260,
       search: true,
       search: true,
-      dicUrl: '/api/kd-system/dict-biz/dictionary?code',
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=design_cost_type',
       props: {
       props: {
         label: 'dictValue',
         label: 'dictValue',
         value: 'dictKey',
         value: 'dictKey',
@@ -78,7 +78,7 @@ export default {
     },
     },
     {
     {
       label: '日期',
       label: '日期',
-      prop: 'rq',
+      prop: 'recordDate',
       type: 'date',
       type: 'date',
       valueFormat: 'yyyy-MM-dd',
       valueFormat: 'yyyy-MM-dd',
       span: 24,
       span: 24,
@@ -86,16 +86,30 @@ export default {
       align: 'center',
       align: 'center',
       search: true,
       search: true,
       showOverflowTooltip: true,
       showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请选择日期',
+          trigger: 'blur',
+        },
+      ],
     },
     },
     {
     {
       label: '合同名称',
       label: '合同名称',
-      prop: 'htmc',
+      prop: 'contractName',
       span: 24,
       span: 24,
       minWidth: 160,
       minWidth: 160,
       showOverflowTooltip: true,
       showOverflowTooltip: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入合同名称',
+          trigger: 'blur',
+        },
+      ],
     },
     },
     {
     {
-      label: '单价(元)',
+      label: '金额(元)',
       prop: 'amount',
       prop: 'amount',
       type: 'number',
       type: 'number',
       span: 24,
       span: 24,
@@ -105,6 +119,13 @@ export default {
       precision: 2,
       precision: 2,
       showOverflowTooltip: true,
       showOverflowTooltip: true,
       search: true,
       search: true,
+      rules: [
+        {
+          required: true,
+          message: '请输入金额',
+          trigger: 'blur',
+        },
+      ],
     },
     },
   ],
   ],
 };
 };

+ 18 - 9
src/views/yf-cost-manage/basic-data-setting/sjzbsy-cost-ledger.vue

@@ -44,9 +44,9 @@
         </div>
         </div>
       </template>
       </template>
 
 
-      <template slot="rqSearch">
+      <template slot="recordDateSearch">
         <el-date-picker
         <el-date-picker
-          v-model="params.rq"
+          v-model="params.recordDateRange"
           type="daterange"
           type="daterange"
           range-separator="至"
           range-separator="至"
           start-placeholder="开始日期"
           start-placeholder="开始日期"
@@ -60,9 +60,9 @@
       <template slot="amountSearch">
       <template slot="amountSearch">
         <div style="display: flex; align-items: center;">
         <div style="display: flex; align-items: center;">
           <span>金额区间(元):</span>
           <span>金额区间(元):</span>
-          <avue-input-number v-model="params.amountStart" :min="0" style="width: 120px !important;"></avue-input-number>
+          <avue-input-number v-model="params.amountMin" :min="0" style="width: 120px !important;"></avue-input-number>
           <span style="width: 20px; text-align: center;">至</span>
           <span style="width: 20px; text-align: center;">至</span>
-          <avue-input-number v-model="params.amountEnd" :min="0" style="width: 120px !important;"></avue-input-number>
+          <avue-input-number v-model="params.amountMax" :min="0" style="width: 120px !important;"></avue-input-number>
         </div>
         </div>
       </template>
       </template>
 
 
@@ -134,21 +134,30 @@ export default window.$crudCommon({
     },
     },
   },
   },
   methods: {
   methods: {
-    loadData() {},
+    getSearchParams() {
+      const newParams = { ...this.params };
+      if (newParams.recordDateRange && newParams.recordDateRange.length) {
+        newParams.recordDateMin = newParams.recordDateRange[0];
+        newParams.recordDateMax = newParams.recordDateRange[1];
+      }
+
+      delete newParams.recordDateRange;
+      return newParams;
+    },
     getFormData() {
     getFormData() {
       return { ...this.form, yearAndMonth: this.params.yearAndMonth };
       return { ...this.form, yearAndMonth: this.params.yearAndMonth };
     },
     },
     handleImport() {
     handleImport() {
       let excelParams = { yearAndMonth: this.params.yearAndMonth };
       let excelParams = { yearAndMonth: this.params.yearAndMonth };
-      this.$refs.uploadExcelDialog.open('/api/kd-scientific/direct-cost/import', excelParams);
+      this.$refs.uploadExcelDialog.open('/api/kd-scientific/xm/design-cost/import', excelParams);
     },
     },
     uploadAfter() {
     uploadAfter() {
       this.page.currentPage = 1;
       this.page.currentPage = 1;
       this.getList(this.page);
       this.getList(this.page);
     },
     },
     handleExport() {
     handleExport() {
-      exportBlob(`/api/kd-scientific/direct-cost/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
-        downloadXls(res.data, `设计费用、装备调试费用与试验费用基本信息台账${this.params.yearAndMonth}.xlsx`);
+      exportBlob(`/api/kd-scientific/xm/design-cost/export-xmDesignCost?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
+        downloadXls(res.data, `${this.params.yearAndMonth}设计费用、装备调试费用与试验费用基本信息台账.xlsx`);
       });
       });
     },
     },
     /**
     /**
@@ -157,7 +166,7 @@ export default window.$crudCommon({
      */
      */
     printTable(isLandscape) {
     printTable(isLandscape) {
       this.wideTableColumns = this.$refs.crud.columnOption;
       this.wideTableColumns = this.$refs.crud.columnOption;
-      this.printTitle = `设计费用、装备调试费用与试验费用基本信息台账${this.params.yearAndMonth}`;
+      this.printTitle = `${this.params.yearAndMonth}设计费用、装备调试费用与试验费用基本信息台账`;
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.printWideTable.printTable(isLandscape);
         this.$refs.printWideTable.printTable(isLandscape);
       })
       })