From d38a28af8dd63fc7cf6008fae5a078bdccdf8025 Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期五, 19 七月 2024 09:12:20 +0800
Subject: [PATCH] 角色管理表格操作后刷新当前页数不变
---
src/components/view/b1-expenses.vue | 70 ++++++++++++++++++++++++++++++----
1 files changed, 61 insertions(+), 9 deletions(-)
diff --git a/src/components/view/b1-expenses.vue b/src/components/view/b1-expenses.vue
index 786e791..67596ee 100644
--- a/src/components/view/b1-expenses.vue
+++ b/src/components/view/b1-expenses.vue
@@ -65,10 +65,18 @@
</el-date-picker>
</div>
</div>
- <div class="search_thing">
+ <div class="search_thing" style="width: 340px">
<div class="search_label">濮旀墭鍗曚綅锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="componentData.entity.company" @keyup.enter.native="refreshTable()"></el-input></div>
+ <div class="search_input">
+<!-- <el-input size="small" placeholder="璇疯緭鍏�" clearable-->
+<!-- @keyup.enter.native="refreshTable()"></el-input>-->
+ <el-select @focus="getCompanyOptions" @change="refreshTable()" clearable
+ size="small" v-model="componentData.entity.company" style="width: 100%">
+ <el-option v-for="item in companyOptions" :key="item.value"
+ :label="item.label" :value="item.label">
+ </el-option>
+ </el-select>
+ </div>
</div>
<div class="search_thing" style="padding-left: 30px;">
<el-button size="small" @click="refresh()">閲� 缃�</el-button>
@@ -78,7 +86,7 @@
</div>
<div class="table">
<ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" :key="upIndex"
- @handleWeave="handleWeave" />
+ @handleWeave="handleWeave" :column-min-width="'140'"/>
</div>
</div>
<el-dialog title="鍦ㄧ嚎缂栧埗" :visible.sync="claimVisible" width="70%" :modal-append-to-body="false">
@@ -106,7 +114,7 @@
company: null,
dates: null,
orderBy: {
- field: 'id,ins_sample_id',
+ field: 'id',
order: 'asc'
}
},
@@ -127,6 +135,14 @@
name: 'entrustCode',
index: 2
},
+ /* {
+ name: 'sample',
+ index: 3
+ },
+ {
+ name: 'model',
+ index: 4
+ }, */
{
name: 'company',
index: 8
@@ -137,8 +153,8 @@
},
],
// 鐗规畩鐨勫悎骞惰锛屾牴鎹甿ain鍜宺ows鐨刵ame鏉ュ悎骞�
- special: {
- main: 'insSampleId',
+ /* special: {
+ main: 'entrustCode',
rows: [{
name: 'sample',
index: 3
@@ -156,7 +172,7 @@
index: 6
},
]
- }
+ } */
},
tagField: {
type: {
@@ -187,7 +203,18 @@
claimVisible: false,
dates: [],
index2: 0,
- total: 0
+ total: 0,
+ companyOptions: [], // 濮旀墭鍗曚綅鏋氫妇鍊�
+ entity: {
+ orderBy: {
+ field: 'id',
+ order: 'asc'
+ }
+ },
+ page: {
+ current: -1,
+ size: -1,
+ },
}
},
mounted() {
@@ -226,6 +253,31 @@
this.index2++
this.componentData.entity.dates = `["${startDate}","${endDate}"]`
},
+ getCompanyOptions () {
+ this.$axios.post(this.$api.user.selectCustomPageList, {
+ page: this.page,
+ entity: this.entity
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }
+ ).then(res => {
+ if (res.code === 200) {
+ const list = res.data.body.records
+ this.companyOptions = []
+ list.map((item) => {
+ const obj = Object.assign({
+ value: item.id,
+ label: item.company,
+ })
+ this.companyOptions.push(obj)
+ })
+ }
+ }).catch(e => {
+ this.$message.error('鏌ヨ澶辫触')
+ })
+ },
refreshTable() {
this.$refs['ValueTable'].selectList()
this.getTotal()
--
Gitblit v1.9.3