From 59d56975db205d1122af494dbbb9cd0589f35798 Mon Sep 17 00:00:00 2001 From: zhouhaibin Date: Tue, 11 Jun 2024 09:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=87=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/costManagement/api/index.ts | 36 +++++++------- .../costManagement/view/costTable/index.vue | 11 +++++ .../view/companyProducts/index.vue | 34 +++++++++++++ .../view/personProducts/index.vue | 34 +++++++++++++ .../view/supplierProducts/index.vue | 48 +++++-------------- 5 files changed, 109 insertions(+), 54 deletions(-) diff --git a/src/modules/costManagement/api/index.ts b/src/modules/costManagement/api/index.ts index 047fb8d..bae0ef1 100644 --- a/src/modules/costManagement/api/index.ts +++ b/src/modules/costManagement/api/index.ts @@ -20,39 +20,39 @@ const moduleName = 'costManagement' // } // } - - // 造价表 export const costTable = Object.assign({}, COMMON_METHOD, { serveUrl: '/' + moduleName + '/' + 'costTable' + '/', - // 新增 - addCostTable(itemList) { - return request.post({ url: this.serveUrl + 'addCostTable', data: itemList }) - }, - // 查询数据 - getCostTableDetail(id) { + // 新增 + addCostTable(itemList) { + return request.post({ url: this.serveUrl + 'addCostTable', data: itemList }) + }, + // 查询数据 + getCostTableDetail(id) { return request.get({ url: this.serveUrl + 'getCostTableDetail/' + id }) }, - modifyCostTable(params){ + modifyCostTable(params) { return request.put({ url: this.serveUrl + 'modifyCostTable', data: params }) - + }, + // 导出数据 + exportData(id) { + return request.download({ url: this.serveUrl + 'exportData/'+id }) } }) // 造价明细 export const costItemDetail = Object.assign({}, COMMON_METHOD, { serveUrl: '/' + moduleName + '/' + 'costItemDetail' + '/', - // 全产品造价 - getProductsPageByType(params) { - return request.get({ url: this.serveUrl + 'getProductsPageByType', params }) - }, - // 查询数据 - getCostTableDetail(id) { + // 全产品造价 + getProductsPageByType(params) { + return request.get({ url: this.serveUrl + 'getProductsPageByType', params }) + }, + // 查询数据 + getCostTableDetail(id) { return request.get({ url: this.serveUrl + 'getCostTableDetail/' + id }) }, - modifyCostTable(params){ + modifyCostTable(params) { return request.put({ url: this.serveUrl + 'modifyCostTable', data: params }) - } }) // 字典类型 diff --git a/src/modules/costManagement/view/costTable/index.vue b/src/modules/costManagement/view/costTable/index.vue index b0945ec..f7584f4 100644 --- a/src/modules/costManagement/view/costTable/index.vue +++ b/src/modules/costManagement/view/costTable/index.vue @@ -44,6 +44,14 @@ > + 导出 @@ -185,6 +193,9 @@ function searchChange(val, done) { onLoad() done() } +function exportData(row) { + api.exportData(row.id) +}