导出整理
This commit is contained in:
@@ -295,12 +295,12 @@
|
||||
{{ scope.row.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<el-table-column label="数量" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="询价单编号" align="center" min-width="70">
|
||||
<el-table-column label="询价单编号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.询价单编号 }}
|
||||
</template>
|
||||
@@ -313,6 +313,37 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<div id="inquirySheet" style="width: 1000px;margin: 0 auto;display:none">
|
||||
<table class="inquirySheet" cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<tr>
|
||||
<th style="border: none;text-align:left;font-size: 30px;font-weight: bold" colspan="3"><div style="margin: 10px;">GAOJING</div></th>
|
||||
<th style="border: none;text-align:center;font-size: 30px;font-weight: bold" colspan="8"><div style="margin: 10px;">采购询价单</div></th>
|
||||
<th style="border: none;" colspan="3"/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: none;" colspan="2">询价单编号:</td>
|
||||
<td id="inquirySheetNum" style="border: none;" colspan="4"/>
|
||||
<td style="border: none;" colspan="2">供应商名称:</td>
|
||||
<td id="supplier" style="border: none;" colspan="6"/>
|
||||
</tr>
|
||||
<tr id="tablehead">
|
||||
<td width="8.3%">序号</td>
|
||||
<td width="16.6%" colspan="2">图号</td>
|
||||
<td width="16.6%" colspan="2">名称</td>
|
||||
<td width="16.6%" colspan="2">规格</td>
|
||||
<td width="16.6%" colspan="2">数量</td>
|
||||
<td width="16.6%" colspan="2">单价</td>
|
||||
<td colspan="3">备注</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">合计</td>
|
||||
<td colspan="5"/>
|
||||
<td colspan="4"/>
|
||||
<td colspan="3"/>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
|
||||
<el-row>
|
||||
@@ -494,6 +525,7 @@
|
||||
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
|
||||
export default {
|
||||
name: '', // 创建询价单
|
||||
@@ -765,20 +797,34 @@ export default {
|
||||
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(() => {
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementsByClassName('inquirySheet')[0]
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
let length = 0
|
||||
this.tableData3.length < 15 ? length = 15 : length = this.tableData3.length
|
||||
for (let i = 0; i < length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
|
||||
document.getElementById('tablehead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.tableData3.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.tableData3[j].物料型号 || this.tableData3[j].零件图号
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.tableData3[j].物料名称 || this.tableData3[j].零件名称
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料规格 || this.tableData3[j].规格
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
|
||||
}
|
||||
document.getElementById('inquirySheetNum').innerHTML = row.询价单编号
|
||||
document.getElementById('supplier').innerHTML = row.供应商名称
|
||||
exportExcelMethod('inquirySheet', '采购询价单', '采购询价单sheet')
|
||||
}).catch(res => {
|
||||
console.log(res)
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
@@ -946,7 +992,7 @@ export default {
|
||||
this.materialOldValue = row.物料流水号
|
||||
},
|
||||
partChange(row) { // 零件变更 基本件
|
||||
alert('没有基本件库,你想替换啥?')
|
||||
alert('没有基本件库')
|
||||
console.log(row)
|
||||
},
|
||||
searchMaterial() {
|
||||
@@ -988,6 +1034,10 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.inquirySheet td{
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user