|
@@ -1,123 +1,47 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <el-dialog
|
|
|
|
- title="物料编码选择"
|
|
|
|
- width="1000px"
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
- :append-to-body="true"
|
|
|
|
- v-dialogDrag
|
|
|
|
- class="userDialog"
|
|
|
|
- :visible.sync="visible"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dialog title="物料编码选择" width="1000px" :close-on-click-modal="false" :append-to-body="true" v-dialogDrag
|
|
|
|
+ class="userDialog" :visible.sync="visible">
|
|
<el-container style="height: 500px">
|
|
<el-container style="height: 500px">
|
|
<el-container>
|
|
<el-container>
|
|
<el-header style="text-align: left; font-size: 12px; height: 30px">
|
|
<el-header style="text-align: left; font-size: 12px; height: 30px">
|
|
- <el-form
|
|
|
|
- size="small"
|
|
|
|
- :inline="true"
|
|
|
|
- ref="searchForm"
|
|
|
|
- :model="searchForm"
|
|
|
|
- @keyup.enter.native="refreshList()"
|
|
|
|
- @submit.native.prevent
|
|
|
|
- >
|
|
|
|
|
|
+ <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()"
|
|
|
|
+ @submit.native.prevent>
|
|
<el-form-item prop="code">
|
|
<el-form-item prop="code">
|
|
- <el-input
|
|
|
|
- size="small"
|
|
|
|
- v-model="searchForm.code"
|
|
|
|
- placeholder="请输入物料编号查询"
|
|
|
|
- clearable
|
|
|
|
- ></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-model="searchForm.code" placeholder="请输入物料编号查询" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item prop="name">
|
|
<el-form-item prop="name">
|
|
- <el-input
|
|
|
|
- size="small"
|
|
|
|
- v-model="searchForm.name"
|
|
|
|
- placeholder="请输入物料名称查询"
|
|
|
|
- clearable
|
|
|
|
- ></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-model="searchForm.name" placeholder="请输入物料名称查询" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- @click="refreshList()"
|
|
|
|
- size="small"
|
|
|
|
- icon="el-icon-search"
|
|
|
|
- >查询</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- @click="resetSearch()"
|
|
|
|
- size="small"
|
|
|
|
- icon="el-icon-refresh-right"
|
|
|
|
- >重置</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
|
|
|
|
+ <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</el-header>
|
|
</el-header>
|
|
<el-main>
|
|
<el-main>
|
|
- <el-table
|
|
|
|
- :data="dataList"
|
|
|
|
- v-loading="loading"
|
|
|
|
- size="small"
|
|
|
|
- border
|
|
|
|
- ref="contractTable"
|
|
|
|
- @row-click="rowSelect"
|
|
|
|
- @select="handleSelectionChange"
|
|
|
|
- height="calc(100% - 40px)"
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
- <el-table-column
|
|
|
|
- type="selection"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- width="50"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable" @row-click="rowSelect"
|
|
|
|
+ @select="handleSelectionChange" height="calc(100% - 40px)" style="width: 100%">
|
|
|
|
+ <el-table-column type="selection" header-align="center" align="center" width="50">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="code"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- sortable="custom"
|
|
|
|
- min-width="90"
|
|
|
|
- label="物料编码"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="code" header-align="center" align="center" sortable="custom" min-width="90"
|
|
|
|
+ label="物料编码">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="name"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- sortable="custom"
|
|
|
|
- min-width="90"
|
|
|
|
- label="物料名称"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="name" header-align="center" align="center" sortable="custom" min-width="90"
|
|
|
|
+ label="物料名称">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
- <el-pagination
|
|
|
|
- @size-change="sizeChangeHandle"
|
|
|
|
- @current-change="currentChangeHandle"
|
|
|
|
- :current-page="searchForm.pageNo"
|
|
|
|
- :page-sizes="[5, 10, 15, 20]"
|
|
|
|
- :page-size="searchForm.pageSize"
|
|
|
|
- :total="total"
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
|
|
|
+ :current-page="searchForm.pageNo" :page-sizes="[5, 10, 15, 20]" :page-size="searchForm.pageSize"
|
|
|
|
+ :total="total" layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</el-main>
|
|
</el-main>
|
|
</el-container>
|
|
</el-container>
|
|
</el-container>
|
|
</el-container>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button
|
|
|
|
- size="small"
|
|
|
|
- @click="visible = false"
|
|
|
|
- icon="el-icon-circle-close"
|
|
|
|
- >关闭</el-button
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- size="small"
|
|
|
|
- type="primary"
|
|
|
|
- icon="el-icon-circle-check"
|
|
|
|
- @click="doSubmit()"
|
|
|
|
- >确定</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
|
|
|
|
+ <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -177,8 +101,13 @@ export default {
|
|
// // orders: this.orders,
|
|
// // orders: this.orders,
|
|
// // ...this.searchForm,
|
|
// // ...this.searchForm,
|
|
// },
|
|
// },
|
|
- getMaterialList(this.searchForm).then(({ data }) => {
|
|
|
|
- console.log('data',data)
|
|
|
|
|
|
+ let params = {
|
|
|
|
+ ...this.searchForm,
|
|
|
|
+ // 默认查询已启用
|
|
|
|
+ isEnable: '0'
|
|
|
|
+ }
|
|
|
|
+ getMaterialList(params).then(({ data }) => {
|
|
|
|
+ console.log('data', data)
|
|
this.dataList = data.tableBody.rows;
|
|
this.dataList = data.tableBody.rows;
|
|
this.total = data.tableBody.total;
|
|
this.total = data.tableBody.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -234,7 +163,7 @@ export default {
|
|
},
|
|
},
|
|
doSubmit() {
|
|
doSubmit() {
|
|
this.visible = false;
|
|
this.visible = false;
|
|
- console.log('选择的数据?',this.dataListAllSelections)
|
|
|
|
|
|
+ console.log('选择的数据?', this.dataListAllSelections)
|
|
this.$emit("doSubmit", this.dataListAllSelections);
|
|
this.$emit("doSubmit", this.dataListAllSelections);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -248,8 +177,10 @@ export default {
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
word-break: break-all;
|
|
word-break: break-all;
|
|
}
|
|
}
|
|
|
|
+
|
|
.el-main {
|
|
.el-main {
|
|
padding: 20px 20px 5px 20px;
|
|
padding: 20px 20px 5px 20px;
|
|
|
|
+
|
|
.el-pagination {
|
|
.el-pagination {
|
|
margin-top: 5px;
|
|
margin-top: 5px;
|
|
}
|
|
}
|