空管耐用品库存管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

205 lines
4.6 KiB

5 months ago
<template>
<div>
<basic-container>
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
ref="crud"
v-model="form"
:page.sync="page"
@search-change="searchChange"
@search-reset="searchReset"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
5 months ago
<template slot-scope="scope" slot="menu">
<el-button type="text" size="small" @click.stop="handleLog(scope.row)"
>记录
5 months ago
</el-button>
</template>
</avue-crud>
</basic-container>
<!-- 记录 -->
4 months ago
<recordDialog
v-if="recordShow"
:showDialog="recordShow"
@closeDialog="closeDialog"
:rowData="rowData"
></recordDialog>
5 months ago
</div>
</template>
<script>
import { getList } from "@/api/secondOrder/list.js";
4 months ago
import recordDialog from "./components/recordDialog.vue";
5 months ago
export default {
4 months ago
components: {
recordDialog,
},
5 months ago
data() {
return {
4 months ago
recordShow: false, //记录弹窗
rowData: {}, //行数据
5 months ago
form: {},
selectionList: [],
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
5 months ago
},
option: {
height: "auto",
5 months ago
calcHeight: 30,
tip: false,
searchShow: true,
4 months ago
searchMenuSpan: 12,
5 months ago
border: true,
index: true,
selection: true,
viewBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
5 months ago
dialogClickModal: false,
menu: true,
selection: false,
printBtn: false,
refreshBtn: false,
gridBtn: false,
gridBackgroundImage: false,
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
menuWidth: 80,
5 months ago
column: [
{
5 months ago
label: "部门",
prop: "department",
5 months ago
search: true,
headerAlign: "center",
align: "center",
5 months ago
},
{
4 months ago
label: "存货编号",
prop: "materialCode",
headerAlign: "center",
align: "center",
5 months ago
},
{
4 months ago
label: "存货名称",
prop: "materialName",
headerAlign: "center",
align: "center",
5 months ago
search: true,
},
{
label: "规格型号",
prop: "model",
headerAlign: "center",
align: "center",
5 months ago
},
{
label: "类别",
prop: "type",
type: "select",
headerAlign: "center",
align: "center",
dicData: [
{
label: "易耗品",
value: "YH",
},
{
label: "耐用品",
value: "NY",
},
],
5 months ago
},
{
label: "计量单位",
prop: "unit",
headerAlign: "center",
align: "center",
5 months ago
},
{
label: "数量",
prop: "num",
headerAlign: "center",
align: "center",
5 months ago
},
{
label: "单价",
prop: "unitPrice",
headerAlign: "center",
align: "center",
5 months ago
},
{
label: "金额",
prop: "amount",
headerAlign: "center",
align: "center",
},
],
5 months ago
},
data: [],
};
},
4 months ago
mounted() {},
5 months ago
methods: {
4 months ago
// 记录弹框关闭
closeDialog() {
this.recordShow = false;
5 months ago
},
4 months ago
handleLog(row) {
this.recordShow = true;
this.rowData = row;
5 months ago
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
).then((res) => {
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;
});
this.loading = false;
5 months ago
},
},
5 months ago
};
</script>
<style></style>