|
|
@@ -22,6 +22,7 @@
|
|
|
</div>
|
|
|
|
|
|
<el-button v-else type="primary" size="small" icon="el-icon-upload2" plain @click="uploadFile">导入</el-button>
|
|
|
+ <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
|
|
<el-button size="small" :disabled="selection.length == 0" icon="el-icon-thumb" class="ele-btn-icon"
|
|
|
@click="moveTo()">
|
|
|
设置采购员
|
|
|
@@ -172,7 +173,8 @@
|
|
|
import {
|
|
|
getMaterialList,
|
|
|
removeMaterial,
|
|
|
- importCategorySparePart
|
|
|
+ importCategorySparePart,
|
|
|
+ exportFile
|
|
|
} from '@/api/material/list.js';
|
|
|
|
|
|
import { getBomGetById } from '@/api/material/BOM.js';
|
|
|
@@ -281,7 +283,7 @@ export default {
|
|
|
total: 0
|
|
|
},
|
|
|
bomShow: false,
|
|
|
-
|
|
|
+ whereData:{},
|
|
|
pageShow: false,
|
|
|
|
|
|
// 表格列配置
|
|
|
@@ -566,12 +568,25 @@ export default {
|
|
|
...where,
|
|
|
categoryLevelId: this.currentId
|
|
|
});
|
|
|
+ this.whereData = {
|
|
|
+ pageNum: page,
|
|
|
+ size: limit,
|
|
|
+ ...this.sort,
|
|
|
+ ...where,
|
|
|
+ categoryLevelId: this.currentId
|
|
|
+ };
|
|
|
let a = await labs;
|
|
|
|
|
|
return labs;
|
|
|
},
|
|
|
/* 刷新表格 */
|
|
|
reload(where) {
|
|
|
+ let labs = {
|
|
|
+ page: 1,
|
|
|
+ where: where,
|
|
|
+ categoryLevelId: this.currentId
|
|
|
+ }
|
|
|
+ this.whereData = labs;
|
|
|
this.$refs.table.reload({
|
|
|
page: 1,
|
|
|
where: where,
|
|
|
@@ -698,7 +713,20 @@ export default {
|
|
|
|
|
|
uploadFile() {
|
|
|
this.$refs.importDialogRef.open();
|
|
|
- }
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+
|
|
|
+ exportFile(this.whereData);
|
|
|
+ console.log(this.whereData, 'whereForm')
|
|
|
+
|
|
|
+ },
|
|
|
+ /** 下载模板操作 */
|
|
|
+ importTemplate() {
|
|
|
+ importTemplate(this.whereForm).then(res => {
|
|
|
+ this.$message.success("模板下载成功");
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
// 监听物料组id变化
|