From a235a309cbb0290b2d929abe85d645cbfcd39f74 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 28 三月 2025 14:12:09 +0800 Subject: [PATCH] 全局修改-按回车搜索 --- src/views/business/materialOrder/index.vue | 77 +++++++++++++++++++++++++++++++++----- 1 files changed, 67 insertions(+), 10 deletions(-) diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue index 5eeca40..a307a3e 100644 --- a/src/views/business/materialOrder/index.vue +++ b/src/views/business/materialOrder/index.vue @@ -49,7 +49,7 @@ </el-select> </el-form-item> <el-form-item label="涓嬪彂鏃堕棿" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more"> - <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" + <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" @change="goSearch" range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="daterange" value-format="yyyy-MM-dd"> </el-date-picker> </el-form-item> @@ -76,6 +76,7 @@ <!--寰呬笅鍗�--> <div class="table"> <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination" + ref="tableData" :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'" key="tableData" :page="page" :tableLoading="tableLoading"></lims-table> </div> @@ -246,7 +247,6 @@ { label: '鎶ユ鏃堕棿', prop: 'declareDate' }, { dataType: 'action', - fixed: 'right', label: '鎿嶄綔', operation: [ { @@ -275,7 +275,7 @@ ], page: { total: 0, - size: 10, + size: 20, current: 1 }, tableData1: [], @@ -356,7 +356,7 @@ ], page1: { total: 0, - size: 10, + size: 20, current: 1 }, tableData2: [], @@ -412,7 +412,25 @@ { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, - { label: '鍏嶆', prop: 'isExemption' }, + { + dataType: 'tag', + label: '鍏嶆', + prop: 'isExemption', + formatData: (params) => { + if (params == 1) { + return '鍏嶆' + } else { + return null + } + }, + formatType: (params) => { + if (params == 1) { + return 'success' + } else { + return null + } + } + }, { label: '鏍峰搧鍚嶇О', prop: 'sampleName', @@ -515,7 +533,7 @@ ], page2: { total: 0, - size: 10, + size: 20, current: 1 }, tableData3: [], @@ -565,7 +583,25 @@ { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, - { label: '鍏嶆', prop: 'isExemption' }, + { + dataType: 'tag', + label: '鍏嶆', + prop: 'isExemption', + formatData: (params) => { + if (params == 1) { + return '鍏嶆' + } else { + return null + } + }, + formatType: (params) => { + if (params == 1) { + return 'success' + } else { + return null + } + } + }, { label: '鏍峰搧鍚嶇О', prop: 'sampleName', @@ -621,7 +657,7 @@ ], page3: { total: 0, - size: 10, + size: 20, current: 1 }, tableData4: [], @@ -671,7 +707,25 @@ { label: '闆朵欢鎻忚堪', prop: 'partDesc' }, { label: '渚涘簲鍟嗗悕绉�', prop: 'supplierName' }, { label: '涓嶅悎鏍兼弿杩�', prop: 'unqualifiedDesc' }, - { label: '鍏嶆', prop: 'isExemption' }, + { + dataType: 'tag', + label: '鍏嶆', + prop: 'isExemption', + formatData: (params) => { + if (params == 1) { + return '鍏嶆' + } else { + return null + } + }, + formatType: (params) => { + if (params == 1) { + return 'success' + } else { + return null + } + } + }, { label: '鏍峰搧鍚嶇О', prop: 'sampleName', @@ -744,7 +798,7 @@ ], page4: { total: 0, - size: 10, + size: 20, current: 1 }, entity: { @@ -829,6 +883,9 @@ mounted() { this.refreshTable() }, + activated () { + this.refreshTable() + }, // 鏂规硶闆嗗悎 methods: { // 鐐瑰嚮鏌ヨ鍥炶皟 -- Gitblit v1.9.3