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