feat: 成品库导出功能
This commit is contained in:
parent
48ea04138b
commit
dce7e72d8f
|
|
@ -41,6 +41,7 @@
|
|||
row-key="id"
|
||||
stripe
|
||||
:params="params"
|
||||
:hExportExcel="hExportExcel"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="批次" prop="batch">
|
||||
|
|
@ -101,6 +102,7 @@
|
|||
row-key="id"
|
||||
:params="paramsWm"
|
||||
stripe
|
||||
:hExportExcel="hExportExcel2"
|
||||
>
|
||||
<el-table-column label="批次" prop="batch">
|
||||
</el-table-column>
|
||||
|
|
@ -156,6 +158,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import printDialog from "./../template/printmaterial.vue";
|
||||
import { dataToExcel } from "@/utils/exportExcel";
|
||||
export default {
|
||||
name: "halfgood",
|
||||
components: {
|
||||
|
|
@ -227,6 +230,64 @@ export default {
|
|||
this.$refs.printmaterial.open();
|
||||
})
|
||||
},
|
||||
hExportExcel(tdata) {
|
||||
let cols = [{
|
||||
header: "批次",
|
||||
key: "batch"
|
||||
}, {
|
||||
header: "物料名",
|
||||
key: "material_.name"
|
||||
}, {
|
||||
header: "规格",
|
||||
key: "material_.specification"
|
||||
}, {
|
||||
header: "型号",
|
||||
key: "material_.model"
|
||||
}, {
|
||||
header: "已完成工序",
|
||||
key: "material_.process_name"
|
||||
}, {
|
||||
header: "所在仓库",
|
||||
key: "warehouse_name"
|
||||
}, {
|
||||
header: "存量",
|
||||
key: "count"
|
||||
}, {
|
||||
header: "更新时间",
|
||||
key: "update_time"
|
||||
}
|
||||
]
|
||||
dataToExcel(cols, tdata, "成品库库存")
|
||||
},
|
||||
hExportExcel2(tdata) {
|
||||
let cols = [{
|
||||
header: "批次",
|
||||
key: "batch"
|
||||
}, {
|
||||
header: "物料名",
|
||||
key: "material_.name"
|
||||
}, {
|
||||
header: "规格",
|
||||
key: "material_.specification"
|
||||
}, {
|
||||
header: "型号",
|
||||
key: "material_.model"
|
||||
}, {
|
||||
header: "已完成工序",
|
||||
key: "material_.process_name"
|
||||
}, {
|
||||
header: "所在车间",
|
||||
key: "belong_dept_name"
|
||||
}, {
|
||||
header: "存量",
|
||||
key: "count"
|
||||
}, {
|
||||
header: "更新时间",
|
||||
key: "update_time"
|
||||
}
|
||||
]
|
||||
dataToExcel(cols, tdata, "车间成品库存")
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue