20200205LLJV7创建外购单导出

This commit is contained in:
liulujia@meswork.com
2020-02-05 18:31:32 +08:00
parent 75e884a0fc
commit 9d4d389ed1

View File

@@ -88,7 +88,7 @@
<el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">
<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 50px" @click="saveMateriel">保存</el-button>
<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 140px" @click="saveMateriel">保存</el-button>
</el-tooltip>
</div>
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="200px" size="mini" highlight-current-row @row-click="searchTable3">
@@ -105,13 +105,13 @@
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="购计划单名称" prop="采购单名称" align="center" width="120">
<el-table-column label="购计划单名称" prop="采购单名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<!--<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="200" show-overflow-tooltip>-->
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="230" show-overflow-tooltip>
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -232,7 +232,7 @@
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="购计划单名称" prop="采购计划单名称">
<el-form-item label="购计划单名称" prop="采购计划单名称">
<el-input v-model="form2.采购单名称" size="small"/>
</el-form-item>
</el-col>
@@ -269,13 +269,13 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建购计划单'"
v-show="title2==='创建购计划单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitAddPurchaseOrder">确定</el-button>
<el-button
v-show="title2==='编辑购计划单'"
v-show="title2==='编辑购计划单'"
type="primary"
size="small"
icon="el-icon-check"
@@ -466,7 +466,7 @@ export default {
},
created() {
this.searchRawMaterial()
this.searchTable1()
// this.searchTable1()
// this.searchTable2()
},
methods: {
@@ -604,7 +604,7 @@ export default {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '创建购计划单'
this.title2 = '创建购计划单'
this.form2.supplierNameValue = ''
this.form2.供应商名称 = ''
this.form2.计划完成日期 = ''
@@ -683,18 +683,18 @@ export default {
},
exportExcel2(row) {
this.searchTable3(row).then(val => {
console.log(val)
console.log(row, 11111)
console.log(this.tableData4)
if (this.tableData4.length !== 0) {
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['备料状态', '物料编码', '零件名称', '材料', '数量', '成品尺寸', '单位', '备注']
const filterVal = ['备料状态', '物料零件编码', '零件名称', '材料', '采购数量', '成品尺寸', '备注1']
const filterVal = ['备料状态', '物料零件编码', '零件名称', '材料', '数量', '成品尺寸', '单位', '备注1']
const list = this.tableData4
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '详情',
filename: row.采购单名称 + '-' + row.计划完成日期,
autoWidth: true,
bookType: 'xlsx'
})