Browse Source

导出物料档案

master
han\hanst 6 days ago
parent
commit
531f82975c
  1. 26
      src/views/modules/ecss/partHsCode.vue
  2. 4
      src/views/modules/sampleTracking/projectProofTracking.vue

26
src/views/modules/ecss/partHsCode.vue

@ -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) => {

4
src/views/modules/sampleTracking/projectProofTracking.vue

@ -154,9 +154,9 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="230" align="center">
<el-table-column label="操作" fixed="right" width="130" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<a class="action-link" @click="syncToNpi(scope.row)">同步NPI</a>
<!-- <a class="action-link" @click="syncToNpi(scope.row)">同步NPI</a>-->
<a @click="openCreateProofDialog(scope.row)">新增打样</a> <a @click="openCreateProofDialog(scope.row)">新增打样</a>
<a class="action-link end-link" v-if="scope.row.proofingStatus !== '打样完成'" @click="finishProof(scope.row)">打样完成</a> <a class="action-link end-link" v-if="scope.row.proofingStatus !== '打样完成'" @click="finishProof(scope.row)">打样完成</a>
</template> </template>

Loading…
Cancel
Save