|
@@ -1,82 +1,58 @@
|
|
<template>
|
|
<template>
|
|
<div class="requisition" v-loading="failLoad">
|
|
<div class="requisition" v-loading="failLoad">
|
|
<div class="applyList" v-if="isList">
|
|
<div class="applyList" v-if="isList">
|
|
- <el-row :gutter="10" class="mb10">
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.billCode"
|
|
|
|
- size="small"
|
|
|
|
- placeholder="请输入单据编码查询"
|
|
|
|
- clearable
|
|
|
|
- style="width: 240px"
|
|
|
|
- />
|
|
|
|
- </el-col>
|
|
|
|
-
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.name"
|
|
|
|
- size="small"
|
|
|
|
- placeholder="请输入物料名称查询"
|
|
|
|
- clearable
|
|
|
|
- style="width: 240px"
|
|
|
|
- />
|
|
|
|
- </el-col>
|
|
|
|
-
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <span style="font-size: 14px;margin-right: 5px;">单据状态</span>
|
|
|
|
- <el-select
|
|
|
|
- v-model="queryParams.status"
|
|
|
|
- size="small"
|
|
|
|
- placeholder="请选择单据状态"
|
|
|
|
- clearable
|
|
|
|
- style="width: 240px">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in options"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
|
- <el-col :span="1.5">
|
|
+
|
|
- <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
|
|
+ <el-card>
|
|
- </el-col>
|
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
|
- <el-button type="primary" size="small" plain>高级查询</el-button>
|
|
|
|
- </el-col> -->
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button type="primary" size="small" plain @click="reset">重置</el-button>
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
|
- </el-row>
|
|
+ <el-super-search
|
|
|
|
+ v-model="params"
|
|
|
|
+ :size="size"
|
|
|
|
+ :dict="dict"
|
|
|
|
+ :columns="SearchColumns"
|
|
|
|
+ @reset="reset"
|
|
|
|
+ @submit="getList"
|
|
|
|
+ ></el-super-search>
|
|
|
|
|
|
- <el-row :gutter="10" class="mb10">
|
|
+ <el-row :gutter="10" class="mb10" type="flex" justify="end" style="margin-top: 15px;">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
- <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
|
|
+ <el-button type="primary" :size="size" plain @click="newAdd">新增</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
- <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
|
|
+ <el-button :size="size" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
- <el-button type="primary" size="small" plain
|
|
+ <el-button type="primary" :size="size" plain
|
|
@click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
|
|
@click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
- <el-button size="small" @click="handleImport">批量导入</el-button>
|
|
+ <el-button :size="size" @click="handleImport">批量导入</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <!-- <el-button :size="size" @click="handleBatchSubmit">批量提交</el-button> -->
|
|
</el-col>
|
|
</el-col>
|
|
<!-- 导入弹窗 -->
|
|
<!-- 导入弹窗 -->
|
|
- <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center
|
|
+ <el-dialog
|
|
- :before-close="handlefileDialogColse">
|
|
+ title="批量导入"
|
|
|
|
+ :visible.sync="importData.show"
|
|
|
|
+ width="35%"
|
|
|
|
+ center
|
|
|
|
+ :before-close="handlefileDialogColse"
|
|
|
|
+ >
|
|
<div class="mb-import">
|
|
<div class="mb-import">
|
|
- <el-upload class="upload-demo" accept=".xls, .xlsx" ref="upload" action="#" :on-remove="handleFileRemove"
|
|
+ <el-upload
|
|
- :file-list="importData.list" :auto-upload="false" :on-change="handleChangeFile" :limit="1">
|
|
+ accept=".xls, .xlsx"
|
|
|
|
+ ref="upload"
|
|
|
|
+ action="#"
|
|
|
|
+ :on-remove="handleFileRemove"
|
|
|
|
+ :file-list="importData.list"
|
|
|
|
+ :auto-upload="false"
|
|
|
|
+ :on-change="handleChangeFile"
|
|
|
|
+ :limit="1"
|
|
|
|
+ style="text-align: center;"
|
|
|
|
+ >
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
- <el-button style="margin-left: 10px;" size="small" type="success" @click="handleDownTemplate">下载模板
|
|
|
|
- </el-button>
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
|
|
<div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
|
|
</el-upload>
|
|
</el-upload>
|
|
|
|
|
|
@@ -86,75 +62,55 @@
|
|
<el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
|
|
<el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <!-- <el-col :span="1.5">
|
|
|
|
- <el-button type="primary" size="small" plain>导入</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button type="primary" size="small" plain>导出</el-button>
|
|
|
|
- </el-col> -->
|
|
|
|
- <!-- <el-col :span="1.5">
|
|
|
|
- <el-button type="primary" size="small" plain>批量提交</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button type="primary" size="small" plain>批量删除</el-button>
|
|
|
|
- </el-col> -->
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-card>
|
|
+
|
|
- <el-table
|
|
+ <el-super-table
|
|
- :data="tableList"
|
|
+ style="height: 600px;"
|
|
- class="request-table"
|
|
+ v-model="tableList"
|
|
- fit
|
|
+ :dict="dict"
|
|
- max-height="680"
|
|
+ :columns="TableColumns"
|
|
|
|
+ :size="size"
|
|
|
|
+ pagination
|
|
|
|
+ index
|
|
|
|
+ checkbox
|
|
|
|
+ convenitentOperation
|
|
|
|
+ :page="pageStatus"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ @row-dblclick="check"
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
@select="handleSelect"
|
|
@select="handleSelect"
|
|
>
|
|
>
|
|
- <el-table-column type="selection" width="45"></el-table-column>
|
|
+ <el-table-column
|
|
- <el-table-column label="序号" align="center" type="index" width="50"/>
|
|
|
|
- <el-table-column label="所属组织" align="center" width="200" prop="orgName"/>
|
|
|
|
- <el-table-column label="单据编码" align="center" width="200" prop="billCode"/>
|
|
|
|
- <el-table-column label="申请人" align="center" prop="createName"/>
|
|
|
|
- <el-table-column label="申请时间" align="center" width="150" prop="createTime"/>
|
|
|
|
- <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug"/>
|
|
|
|
- <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
|
|
|
|
- <el-table-column label="物料名称" align="center" width="150" prop="name"/>
|
|
|
|
- <el-table-column label="创建人" align="center" prop="createName"/>
|
|
|
|
- <el-table-column label="创建时间" align="center" width="150" prop="createTime"/>
|
|
|
|
- <el-table-column label="最后修改人" align="center" width="120" prop="updateName"/>
|
|
|
|
- <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime"/>
|
|
|
|
- <el-table-column
|
|
|
|
fixed="right"
|
|
fixed="right"
|
|
label="操作"
|
|
label="操作"
|
|
align="center"
|
|
align="center"
|
|
- width="180"
|
|
+ width="120"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
|
|
+ <el-button type="text" :size="size" @click="check(scope.row)">查看</el-button>
|
|
<el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
|
|
<el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
|
|
- size="small">编辑
|
|
+ :size="size">编辑
|
|
</el-button>
|
|
</el-button>
|
|
- <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
|
|
+ <el-button type="text" :size="size" @click="deleteRow(scope.row)"
|
|
- <el-button type="text" size="small" @click="deleteRow(scope.row)"
|
|
|
|
v-if="scope.row.status == 0 || scope.row.status == 3">删除
|
|
v-if="scope.row.status == 0 || scope.row.status == 3">删除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- </el-table>
|
|
+ </el-super-table>
|
|
|
|
|
|
- <el-pagination
|
|
|
|
- @size-change="handleSizeChange"
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- :page-sizes="[5, 10, 15, 20]"
|
|
|
|
- :page-size=queryParams.pageSize
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
- :total="total"
|
|
|
|
- style="text-align: center;">
|
|
|
|
- </el-pagination>
|
|
|
|
</el-card>
|
|
</el-card>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"
|
|
+ <component
|
|
- v-if="!isList"/>
|
|
+ :is="isComponent"
|
|
|
|
+ v-model="isList"
|
|
|
|
+ :pageStu="page"
|
|
|
|
+ :disable="disable"
|
|
|
|
+ :row="rowDetail"
|
|
|
|
+ @refresh="getList"
|
|
|
|
+ v-if="!isList
|
|
|
|
+ "/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -163,16 +119,28 @@
|
|
import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
|
|
import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
|
|
import {saveAs} from "file-saver";
|
|
import {saveAs} from "file-saver";
|
|
import { blobValidate } from "@/utils/ruoyi";
|
|
import { blobValidate } from "@/utils/ruoyi";
|
|
|
|
+ import { SearchColumns, TableColumns } from './columns';
|
|
|
|
+ import { initDicts } from "@/utils/init.js";
|
|
|
|
+
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'requisition',
|
|
name: 'requisition',
|
|
|
|
+ dicts:[...initDicts([...SearchColumns,...TableColumns])],
|
|
components: {
|
|
components: {
|
|
- addReq
|
|
+ addReq,
|
|
|
|
+ ElSuperTable: () => import("@/components/super-table/index.vue"),
|
|
|
|
+ ElSuperSearch: () => import("@/components/super-search/index.vue"),
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
|
|
+ const params = this.$init.params(SearchColumns);
|
|
return {
|
|
return {
|
|
failLoad: false,
|
|
failLoad: false,
|
|
tableList: [],
|
|
tableList: [],
|
|
|
|
+ size:'mini',
|
|
|
|
+ params:params,
|
|
|
|
+ SearchColumns:SearchColumns,
|
|
|
|
+ TableColumns:TableColumns,
|
|
|
|
+ pageStatus: { pageNum: 1, pageSize: 10, total: 0 },
|
|
queryParams: {
|
|
queryParams: {
|
|
billCode: '',
|
|
billCode: '',
|
|
name: '',
|
|
name: '',
|
|
@@ -211,11 +179,29 @@
|
|
this.getList(this.queryParams)
|
|
this.getList(this.queryParams)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 批量提交
|
|
|
|
+ handleBatchSubmit(){
|
|
|
|
+ let filterList = this.checkedList.filter(item => (item.status ==='0' ||item.status ==='3') )
|
|
|
|
+
|
|
|
|
+ console.log(filterList,'filterList');
|
|
|
|
+ if(filterList.length){
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ this.$notify.warning({
|
|
|
|
+ title: '警告',
|
|
|
|
+ message: '存在不符合提交条件数据或未选择数据!',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
reset() {
|
|
reset() {
|
|
- this.queryParams.billCode = ''
|
|
+ // this.queryParams.billCode = ''
|
|
- this.queryParams.name = ''
|
|
+ // this.queryParams.name = ''
|
|
- this.queryParams.status = ''
|
|
+ // this.queryParams.status = ''
|
|
- this.queryParams.pageNum = 1
|
|
+ // this.queryParams.pageNum = 1
|
|
|
|
+ this.pageStatus.pageNum = 1;
|
|
|
|
+ this.pageStatus.pageSize = 10;
|
|
|
|
+ this.params = this.$init.params(SearchColumns);
|
|
this.getList(this.queryParams)
|
|
this.getList(this.queryParams)
|
|
},
|
|
},
|
|
newAdd() {
|
|
newAdd() {
|
|
@@ -301,6 +287,10 @@
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ handlefileDialogColse(done){
|
|
|
|
+ this.importData.list = [];
|
|
|
|
+ done();
|
|
|
|
+ },
|
|
// Select框
|
|
// Select框
|
|
handleSelect(selection, row) {
|
|
handleSelect(selection, row) {
|
|
|
|
|
|
@@ -311,10 +301,12 @@
|
|
},
|
|
},
|
|
getList(val) {
|
|
getList(val) {
|
|
console.log('val', val)
|
|
console.log('val', val)
|
|
- getReqList(val).then(res => {
|
|
+
|
|
|
|
+ getReqList({...this.params,...this.pageStatus}).then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
- this.tableList = res.rows
|
|
+ this.tableList = res.rows;
|
|
- this.total = res.total
|
|
+ // this.total = res.total;
|
|
|
|
+ this.pageStatus.total = res.total;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.checkedList = [];
|
|
this.checkedList = [];
|
|
@@ -332,8 +324,8 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//
|
|
//
|
|
- handleSelectionChange() {
|
|
+ handleSelectionChange(selection) {
|
|
-
|
|
+ this.checkedList = selection;
|
|
},
|
|
},
|
|
check(row) {
|
|
check(row) {
|
|
console.log('查看详情', row)
|
|
console.log('查看详情', row)
|
|
@@ -388,7 +380,7 @@
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.requisition {
|
|
.requisition {
|
|
- height: calc(100vh - 84px);
|
|
+ // height: calc(100vh - 84px);
|
|
padding: 12px;
|
|
padding: 12px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
}
|