|
@@ -26,10 +26,16 @@
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button :size="size" @click="handleImport">批量导入</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button>
|
|
|
+
|
|
|
+ <el-button-group >
|
|
|
+ <el-button :size="size" @click="handleImport">批量导入</el-button>
|
|
|
+ <el-button
|
|
|
+ :size="size"
|
|
|
+ @click="handleDownload"
|
|
|
+ v-hasPermi="['system:apply:export']"
|
|
|
+ >批量导出</el-button>
|
|
|
+ <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button>
|
|
|
+ </el-button-group>
|
|
|
</el-col>
|
|
|
<!-- 导入弹窗 -->
|
|
|
<el-dialog
|
|
@@ -143,10 +149,10 @@
|
|
|
name: 'requisition',
|
|
|
dicts:[...initDicts([...SearchColumns,...TableColumns])],
|
|
|
components: {
|
|
|
- addReq,
|
|
|
- ElSuperTable: () => import("@/components/super-table/index.vue"),
|
|
|
- ElSuperSearch: () => import("@/components/super-search/index.vue"),
|
|
|
- },
|
|
|
+ addReq,
|
|
|
+ ElSuperTable: () => import("@/components/super-table/index.vue"),
|
|
|
+ ElSuperSearch: () => import("@/components/super-search/index.vue"),
|
|
|
+},
|
|
|
data() {
|
|
|
const params = this.$init.params(SearchColumns);
|
|
|
return {
|
|
@@ -301,9 +307,16 @@
|
|
|
handleImport() {
|
|
|
this.importData.show = true
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ handleDownload(){
|
|
|
+ let params = {
|
|
|
+ ...this.params
|
|
|
+ };
|
|
|
+ this.download('/system/apply/material/export', {...params}, `物料申请单${new Date().getTime()}.xlsx`);
|
|
|
+ },
|
|
|
// 删除文件
|
|
|
handleFileRemove(file, fileList) {
|
|
|
- console.log('删除文件', file, 'file', fileList, 'fileList');
|
|
|
+ // console.log('删除文件', file, 'file', fileList, 'fileList');
|
|
|
this.importData.list = fileList;
|
|
|
},
|
|
|
// 文件发生改变
|
|
@@ -331,7 +344,7 @@
|
|
|
this.importData.list = [];
|
|
|
if (res.data.flag) {
|
|
|
this.failLoad = true;
|
|
|
- console.log(res.data.datas)
|
|
|
+ // console.log(res.data.datas)
|
|
|
let param = {failDatas: res.data.datas}
|
|
|
if (null != param) {
|
|
|
|
|
@@ -376,11 +389,11 @@
|
|
|
|
|
|
this.checkedList = selection;
|
|
|
|
|
|
- console.log(this.checkedList, 'this.checkedList');
|
|
|
+ // console.log(this.checkedList, 'this.checkedList');
|
|
|
|
|
|
},
|
|
|
getList(val) {
|
|
|
- console.log('val', val)
|
|
|
+ // console.log('val', val)
|
|
|
this.failLoad = true;
|
|
|
|
|
|
getReqList({...this.params,...this.pageStatus}).then(res => {
|
|
@@ -410,7 +423,7 @@
|
|
|
this.checkedList = selection;
|
|
|
},
|
|
|
check(row) {
|
|
|
- console.log('查看详情', row)
|
|
|
+ // console.log('查看详情', row)
|
|
|
this.isList = false
|
|
|
this.isComponent = 'addReq'
|
|
|
this.page = 'check'
|
|
@@ -418,7 +431,7 @@
|
|
|
this.disable = true
|
|
|
},
|
|
|
edit(row) {
|
|
|
- console.log('修改先加载详情', row)
|
|
|
+ // console.log('修改先加载详情', row)
|
|
|
this.isList = false
|
|
|
this.isComponent = 'addReq'
|
|
|
this.page = 'edit'
|
|
@@ -426,7 +439,7 @@
|
|
|
this.disable = false
|
|
|
},
|
|
|
commit(row) {
|
|
|
- console.log('row', row)
|
|
|
+ // console.log('row', row)
|
|
|
},
|
|
|
deleteRow(row) {
|
|
|
this.$confirm('是否删除此条数据?', '提示', {
|
|
@@ -446,16 +459,16 @@
|
|
|
}).catch(() => {
|
|
|
})
|
|
|
},
|
|
|
- handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
- this.queryParams.pageSize = val
|
|
|
- this.getList(this.queryParams)
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
- this.queryParams.pageNum = val
|
|
|
- this.getList(this.queryParams)
|
|
|
- }
|
|
|
+ // handleSizeChange(val) {
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
+ // this.queryParams.pageSize = val
|
|
|
+ // this.getList(this.queryParams)
|
|
|
+ // },
|
|
|
+ // handleCurrentChange(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ // this.queryParams.pageNum = val
|
|
|
+ // this.getList(this.queryParams)
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
</script>
|