|
|
@ -59,6 +59,7 @@ |
|
|
class="el-button el-button--primary el-button--medium"> |
|
|
class="el-button el-button--primary el-button--medium"> |
|
|
{{ "导出" }} |
|
|
{{ "导出" }} |
|
|
</download-excel> |
|
|
</download-excel> |
|
|
|
|
|
<el-button type="primary" @click="exportMaterialArchive">导出物料档案</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
@ -357,6 +358,7 @@ |
|
|
searchHsCodeList,searchPalletList,searchPackageList |
|
|
searchHsCodeList,searchPalletList,searchPackageList |
|
|
}from "@/api/ecss/ecss.js" |
|
|
}from "@/api/ecss/ecss.js" |
|
|
import {} from "@/api/sysLanguage.js" |
|
|
import {} from "@/api/sysLanguage.js" |
|
|
|
|
|
import ExportUtil from "@/utils/export" |
|
|
import {getBuList}from '@/api/factory/site.js' |
|
|
import {getBuList}from '@/api/factory/site.js' |
|
|
import orderAttribute from "./orderProperties" |
|
|
import orderAttribute from "./orderProperties" |
|
|
import partHsCodeImport from "./partHsCodeImport" |
|
|
import partHsCodeImport from "./partHsCodeImport" |
|
|
@ -939,6 +941,30 @@ |
|
|
|
|
|
|
|
|
finishDownload () {}, |
|
|
finishDownload () {}, |
|
|
|
|
|
|
|
|
|
|
|
exportMaterialArchive () { |
|
|
|
|
|
if (!this.searchData.buNo) { |
|
|
|
|
|
this.$alert('请先选择BU再导出物料档案!', '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
const selectedBu = this.buList.find(item => item.buNo === this.searchData.buNo) |
|
|
|
|
|
const buName = this.resolveMaterialArchiveBuName(selectedBu, this.searchData.buNo) |
|
|
|
|
|
const params = Object.assign({}, this.searchData, { |
|
|
|
|
|
userName: this.$store.state.user.name |
|
|
|
|
|
}) |
|
|
|
|
|
const fileName = buName + '物料档案.xlsx' |
|
|
|
|
|
ExportUtil.export('/ecss/coDel/downloadPartMaterialArchive', params, fileName) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
resolveMaterialArchiveBuName (buItem, buNo) { |
|
|
|
|
|
const rawBuName = buItem && buItem.buDesc |
|
|
|
|
|
? String(buItem.buDesc).trim() |
|
|
|
|
|
: String(buNo || '').trim() |
|
|
|
|
|
const normalized = rawBuName.indexOf('-') > -1 ? rawBuName.split('-').pop().trim() : rawBuName |
|
|
|
|
|
return normalized.replace(/[\\/:*?"<>|]/g, '') || 'BU' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
fields () { |
|
|
fields () { |
|
|
let json = '{' |
|
|
let json = '{' |
|
|
this.columnList.forEach((item, index) => { |
|
|
this.columnList.forEach((item, index) => { |
|
|
|