导出询价单
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="150">
|
||||
@@ -628,7 +628,30 @@ export default {
|
||||
})
|
||||
},
|
||||
exportInquirySheet(row) { // 导出询价单
|
||||
alert('do not done')
|
||||
this.$confirm('确认导出询价单' + row.询价单编号 + '?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
import('@/vendor/Export2Excelcjn').then(excel => {
|
||||
const tHeader = ['询价单编号', '供应商名称', '物料名称', '物料规格', '物料型号', '数量', '单价', '备注'] // 表头内容
|
||||
const filterVal = ['询价单编号', '供应商名称', '物料名称', '物料规格', '物料型号', '零件数量'] // tableData3里的属性名
|
||||
const list = this.tableData3
|
||||
const data = list.map(v => filterVal.map(j => v[j]))
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: row.询价单编号 + '_' + row.供应商名称,
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) { // 表1多选
|
||||
console.log(val)
|
||||
|
||||
Reference in New Issue
Block a user