|
@@ -20,19 +20,11 @@
|
|
@keyup.enter.native="refreshList()"
|
|
@keyup.enter.native="refreshList()"
|
|
@submit.native.prevent
|
|
@submit.native.prevent
|
|
>
|
|
>
|
|
- <el-form-item prop="code">
|
|
|
|
|
|
+ <el-form-item prop="param" label="名称/编号" >
|
|
<el-input
|
|
<el-input
|
|
size="small"
|
|
size="small"
|
|
- v-model="searchForm.code"
|
|
|
|
- placeholder="编号"
|
|
|
|
- clearable
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item prop="name">
|
|
|
|
- <el-input
|
|
|
|
- size="small"
|
|
|
|
- v-model="searchForm.name"
|
|
|
|
- placeholder="名称"
|
|
|
|
|
|
+ v-model="searchForm.param"
|
|
|
|
+ placeholder="输入名称/编号查询"
|
|
clearable
|
|
clearable
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -60,6 +52,7 @@
|
|
border
|
|
border
|
|
ref="contractTable"
|
|
ref="contractTable"
|
|
@select="handleSelectionChange"
|
|
@select="handleSelectionChange"
|
|
|
|
+ @row-click="rowSelect"
|
|
height="calc(100% - 40px)"
|
|
height="calc(100% - 40px)"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
@@ -73,7 +66,7 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="code"
|
|
prop="code"
|
|
header-align="center"
|
|
header-align="center"
|
|
- align="left"
|
|
|
|
|
|
+ align="center"
|
|
sortable="custom"
|
|
sortable="custom"
|
|
min-width="90"
|
|
min-width="90"
|
|
label="code"
|
|
label="code"
|
|
@@ -82,46 +75,19 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="name"
|
|
prop="name"
|
|
header-align="center"
|
|
header-align="center"
|
|
- align="left"
|
|
|
|
|
|
+ align="center"
|
|
sortable="custom"
|
|
sortable="custom"
|
|
min-width="90"
|
|
min-width="90"
|
|
label="名称"
|
|
label="名称"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- <el-table-column
|
|
|
|
- prop="contractAmount"
|
|
|
|
- header-align="center"
|
|
|
|
- align="left"
|
|
|
|
- sortable="custom"
|
|
|
|
- min-width="110"
|
|
|
|
- label="合同金额"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="oppositeCompany"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- sortable="custom"
|
|
|
|
- min-width="110"
|
|
|
|
- label="对方单位"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="signDate"
|
|
|
|
- header-align="center"
|
|
|
|
- align="left"
|
|
|
|
- sortable="custom"
|
|
|
|
- min-width="110"
|
|
|
|
- label="签订时间"
|
|
|
|
- >
|
|
|
|
- </el-table-column> -->
|
|
|
|
</el-table>
|
|
</el-table>
|
|
<el-pagination
|
|
<el-pagination
|
|
@size-change="sizeChangeHandle"
|
|
@size-change="sizeChangeHandle"
|
|
@current-change="currentChangeHandle"
|
|
@current-change="currentChangeHandle"
|
|
- :current-page="pageNo"
|
|
|
|
|
|
+ :current-page="searchForm.pageNo"
|
|
:page-sizes="[5, 10, 15, 20]"
|
|
:page-sizes="[5, 10, 15, 20]"
|
|
- :page-size="pageSize"
|
|
|
|
|
|
+ :page-size="searchForm.pageSize"
|
|
:total="total"
|
|
:total="total"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
>
|
|
>
|
|
@@ -154,14 +120,13 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
searchForm: {
|
|
searchForm: {
|
|
- code: '',
|
|
|
|
- name: ''
|
|
|
|
|
|
+ param: '',
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 10,
|
|
},
|
|
},
|
|
dataListAllSelections: [], // 所有选中的数据包含跨页数据
|
|
dataListAllSelections: [], // 所有选中的数据包含跨页数据
|
|
idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
|
|
idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
|
|
dataList: [],
|
|
dataList: [],
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
total: 0,
|
|
total: 0,
|
|
orders: [],
|
|
orders: [],
|
|
loading: false,
|
|
loading: false,
|
|
@@ -192,14 +157,10 @@ export default {
|
|
// 获取数据列表
|
|
// 获取数据列表
|
|
refreshList() {
|
|
refreshList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- getUnit({
|
|
|
|
- pageNo: 1,
|
|
|
|
- size: this.pageSize
|
|
|
|
- }).then(({ data }) => {
|
|
|
|
|
|
+ getUnit(this.searchForm).then(({ data }) => {
|
|
console.log('data',data)
|
|
console.log('data',data)
|
|
this.dataList = data.tableBody;
|
|
this.dataList = data.tableBody;
|
|
- this.total = data.tableBody.length;
|
|
|
|
- this.pageNo = data.current;
|
|
|
|
|
|
+ this.total = data.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.setSelectRow();
|
|
this.setSelectRow();
|
|
@@ -208,22 +169,29 @@ export default {
|
|
},
|
|
},
|
|
// 每页数
|
|
// 每页数
|
|
sizeChangeHandle(val) {
|
|
sizeChangeHandle(val) {
|
|
- this.pageSize = val;
|
|
|
|
- this.pageNo = 1;
|
|
|
|
|
|
+ this.searchForm.pageSize = val;
|
|
this.refreshList();
|
|
this.refreshList();
|
|
},
|
|
},
|
|
// 当前页
|
|
// 当前页
|
|
currentChangeHandle(val) {
|
|
currentChangeHandle(val) {
|
|
- this.pageNo = val;
|
|
|
|
|
|
+ this.searchForm.pageNo = val;
|
|
this.refreshList();
|
|
this.refreshList();
|
|
},
|
|
},
|
|
// 排序
|
|
// 排序
|
|
resetSearch() {
|
|
resetSearch() {
|
|
- this.$refs.searchForm.resetFields();
|
|
|
|
|
|
+ this.$refs['searchForm'].resetFields();
|
|
|
|
+ this.searchForm.pageNo = 1;
|
|
this.refreshList();
|
|
this.refreshList();
|
|
},
|
|
},
|
|
|
|
+ // 表格选中数据
|
|
|
|
+ rowSelect(row, column, event) {
|
|
|
|
+ this.$refs.contractTable.clearSelection();
|
|
|
|
+ this.$refs.contractTable.toggleRowSelection(row);
|
|
|
|
+ this.dataListAllSelections = this.single ? [row] : selection
|
|
|
|
+ },
|
|
// 选中数据
|
|
// 选中数据
|
|
handleSelectionChange(selection, row) {
|
|
handleSelectionChange(selection, row) {
|
|
|
|
+ console.log('selection11', selection)
|
|
if (this.single && selection.length > 1) {
|
|
if (this.single && selection.length > 1) {
|
|
this.$refs.contractTable.clearSelection();
|
|
this.$refs.contractTable.clearSelection();
|
|
this.$refs.contractTable.toggleRowSelection(row);
|
|
this.$refs.contractTable.toggleRowSelection(row);
|