Browse Source

新增导出功能

flowtest
zhouhaibin 3 months ago
parent
commit
59d56975db
  1. 36
      src/modules/costManagement/api/index.ts
  2. 11
      src/modules/costManagement/view/costTable/index.vue
  3. 34
      src/modules/productManagement/view/companyProducts/index.vue
  4. 34
      src/modules/productManagement/view/personProducts/index.vue
  5. 48
      src/modules/productManagement/view/supplierProducts/index.vue

36
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 })
}
})
// 字典类型

11
src/modules/costManagement/view/costTable/index.vue

@ -44,6 +44,14 @@
>
</template>
</el-popconfirm>
<el-button
type="primary"
text
icon="el-icon-download"
@click="exportData(row)"
v-permission="pageCode + 'remove'"
>导出</el-button
>
</template>
</avue-crud>
<AddPage ref="addPage" @refresh="onLoad" />
@ -185,6 +193,9 @@ function searchChange(val, done) {
onLoad()
done()
}
function exportData(row) {
api.exportData(row.id)
}
</script>
<style>
.el-input,

34
src/modules/productManagement/view/companyProducts/index.vue

@ -105,6 +105,10 @@ option.value = {
labelWidth: 120,
prop: 'productName', //sProductName
search: true,
html:true,
formatter:(val)=>{
return val.productName
},
searchLabelWidth: 120
},
{
@ -144,8 +148,38 @@ option.value = {
labelWidth: 120,
prop: 'productSpecifications',
//editDisabled: true //
html:true,
formatter:(val)=>{
return val.productSpecifications
},
display: false //
},
{
label: '图片',
labelWidth: 120,
prop: 'image',
type: 'img',
},
{
label: '品牌',
labelWidth: 120,
prop: 'brand',
},
{
label: '单位',
labelWidth: 120,
prop: 'unit',
},
{
label: '除税价格',
labelWidth: 120,
prop: 'exTaxPrice',
},
{
label: '税率',
labelWidth: 120,
prop: 'taxrate',
},
{
label: '信息来源',
labelWidth: 120,

34
src/modules/productManagement/view/personProducts/index.vue

@ -105,6 +105,10 @@ option.value = {
labelWidth: 120,
prop: 'productName', //sProductName
search: true,
html:true,
formatter:(val)=>{
return val.productName
},
searchLabelWidth: 120
},
{
@ -144,8 +148,38 @@ option.value = {
labelWidth: 120,
prop: 'productSpecifications',
//editDisabled: true //
html:true,
formatter:(val)=>{
return val.productSpecifications
},
display: false //
},
{
label: '图片',
labelWidth: 120,
prop: 'image',
type: 'img',
},
{
label: '品牌',
labelWidth: 120,
prop: 'brand',
},
{
label: '单位',
labelWidth: 120,
prop: 'unit',
},
{
label: '除税价格',
labelWidth: 120,
prop: 'exTaxPrice',
},
{
label: '税率',
labelWidth: 120,
prop: 'taxrate',
},
{
label: '信息来源',
labelWidth: 120,

48
src/modules/productManagement/view/supplierProducts/index.vue

@ -57,7 +57,7 @@
<template #modelId-form="{}">
<product-model-components v-model="formData.modelId" :module-param="moduleParam" />
</template>
</avue-crud>
</avue-crud>
</template>
<script setup>
import { ref, getCurrentInstance, reactive } from 'vue'
@ -107,7 +107,11 @@ option.value = {
labelWidth: 120,
prop: 'productName', //sProductName
search: true,
overHidden: true,
// overHidden: true,
html:true,
formatter:(val)=>{
return val.productName
},
searchLabelWidth: 120
},
{
@ -146,8 +150,13 @@ option.value = {
label: '产品规格',
labelWidth: 120,
prop: 'productSpecifications',
search: true,
//editDisabled: true //
overHidden: true,
// overHidden: true,
html:true,
formatter:(val)=>{
return val.productSpecifications
},
display: false //
},
{
@ -178,39 +187,6 @@ option.value = {
},
// {
// label: '',
// labelWidth: 120,
// prop: 'image',
// hide: true
// },
// {
// label: '',
// labelWidth: 120,
// prop: 'brand',
// hide: true
// },
// {
// label: '',
// labelWidth: 120,
// prop: 'unit',
// hide: true
// },
// {
// label: '',
// labelWidth: 120,
// prop: 'exTaxPrice',
// hide: true
// },
// {
// label: '',
// labelWidth: 120,
// prop: 'taxrate',
// hide: true
// },
{
label: '信息来源',

Loading…
Cancel
Save