Browse Source

新增导出功能

flowtest
zhouhaibin 3 months ago
parent
commit
59d56975db
  1. 8
      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. 46
      src/modules/productManagement/view/supplierProducts/index.vue

8
src/modules/costManagement/api/index.ts

@ -20,8 +20,6 @@ const moduleName = 'costManagement'
// } // }
// } // }
// 造价表 // 造价表
export const costTable = Object.assign({}, COMMON_METHOD, { export const costTable = Object.assign({}, COMMON_METHOD, {
serveUrl: '/' + moduleName + '/' + 'costTable' + '/', serveUrl: '/' + moduleName + '/' + 'costTable' + '/',
@ -35,7 +33,10 @@ export const costTable = Object.assign({}, COMMON_METHOD, {
}, },
modifyCostTable(params) { modifyCostTable(params) {
return request.put({ url: this.serveUrl + 'modifyCostTable', data: params }) return request.put({ url: this.serveUrl + 'modifyCostTable', data: params })
},
// 导出数据
exportData(id) {
return request.download({ url: this.serveUrl + 'exportData/'+id })
} }
}) })
@ -52,7 +53,6 @@ export const costItemDetail = Object.assign({}, COMMON_METHOD, {
}, },
modifyCostTable(params) { modifyCostTable(params) {
return request.put({ url: this.serveUrl + 'modifyCostTable', data: params }) return request.put({ url: this.serveUrl + 'modifyCostTable', data: params })
} }
}) })
// 字典类型 // 字典类型

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

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

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

@ -105,6 +105,10 @@ option.value = {
labelWidth: 120, labelWidth: 120,
prop: 'productName', //sProductName prop: 'productName', //sProductName
search: true, search: true,
html:true,
formatter:(val)=>{
return val.productName
},
searchLabelWidth: 120 searchLabelWidth: 120
}, },
{ {
@ -144,8 +148,38 @@ option.value = {
labelWidth: 120, labelWidth: 120,
prop: 'productSpecifications', prop: 'productSpecifications',
//editDisabled: true // //editDisabled: true //
html:true,
formatter:(val)=>{
return val.productSpecifications
},
display: false // 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: '信息来源', label: '信息来源',
labelWidth: 120, labelWidth: 120,

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

@ -105,6 +105,10 @@ option.value = {
labelWidth: 120, labelWidth: 120,
prop: 'productName', //sProductName prop: 'productName', //sProductName
search: true, search: true,
html:true,
formatter:(val)=>{
return val.productName
},
searchLabelWidth: 120 searchLabelWidth: 120
}, },
{ {
@ -144,8 +148,38 @@ option.value = {
labelWidth: 120, labelWidth: 120,
prop: 'productSpecifications', prop: 'productSpecifications',
//editDisabled: true // //editDisabled: true //
html:true,
formatter:(val)=>{
return val.productSpecifications
},
display: false // 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: '信息来源', label: '信息来源',
labelWidth: 120, labelWidth: 120,

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

@ -107,7 +107,11 @@ option.value = {
labelWidth: 120, labelWidth: 120,
prop: 'productName', //sProductName prop: 'productName', //sProductName
search: true, search: true,
overHidden: true, // overHidden: true,
html:true,
formatter:(val)=>{
return val.productName
},
searchLabelWidth: 120 searchLabelWidth: 120
}, },
{ {
@ -146,8 +150,13 @@ option.value = {
label: '产品规格', label: '产品规格',
labelWidth: 120, labelWidth: 120,
prop: 'productSpecifications', prop: 'productSpecifications',
search: true,
//editDisabled: true // //editDisabled: true //
overHidden: true, // overHidden: true,
html:true,
formatter:(val)=>{
return val.productSpecifications
},
display: false // 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: '信息来源', label: '信息来源',

Loading…
Cancel
Save