From 8edfe5a740151978422bdba16b6b68b20f0706c7 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 24 三月 2025 13:32:29 +0800
Subject: [PATCH] 设备校准计划-新增设备赋值优化
---
src/views/business/materialOrder/index.vue | 105 ++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 85 insertions(+), 20 deletions(-)
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index a8837e7..a263e75 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -5,46 +5,46 @@
<el-form :model="entity" ref="entity" size="small" :inline="true">
<el-form-item label="鎵瑰彿" prop="updateBatchNo">
<el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable">
+ @keyup.enter.native="goSearch">
</el-input>
</el-form-item>
<el-form-item label="濮旀墭缂栧彿" prop="entrustCode" v-if="tabIndex !== 0">
<el-input v-model="entity.entrustCode" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable">
+ @keyup.enter.native="goSearch">
</el-input>
</el-form-item>
<el-form-item label="闆朵欢鍙�" prop="partNo">
<el-input v-model="entity.partNo" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable">
+ @keyup.enter.native="goSearch">
</el-input>
</el-form-item>
<el-form-item label="闆朵欢鎻忚堪" prop="partDesc">
<el-input v-model="entity.partDesc" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable">
+ @keyup.enter.native="goSearch">
</el-input>
</el-form-item>
<el-form-item>
<el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 4"
:icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text"
@click="more = !more">{{ !more ? '鏇村' : '鏀惰捣' }}</el-button>
- <el-button size="mini" type="primary" @click="refreshTable()">鏌ヨ</el-button>
+ <el-button size="mini" type="primary" @click="goSearch">鏌ヨ</el-button>
<el-button size="mini" @click="refresh()">閲嶇疆</el-button>
</el-form-item>
<el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName"
v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
<el-input v-model="entity.supplierName" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable">
+ @keyup.enter.native="goSearch">
</el-input>
</el-form-item>
<el-form-item label="鏍峰搧鍨嬪彿" prop="sampleModel"
v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
<el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable">
+ @keyup.enter.native="goSearch">
</el-input>
</el-form-item>
<el-form-item label="妫�楠岀姸鎬�" prop="inspectStatus"
v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
- <el-select v-model="entity.inspectStatus" clearable size="small" @change="refreshTable()">
+ <el-select v-model="entity.inspectStatus" clearable size="small" @change="goSearch">
<el-option v-for="(a, i) in inspectStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
</el-select>
</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>
@@ -109,8 +110,7 @@
<el-dialog :visible.sync="exemptionVisible" title="纭鍏嶆" width="42%">
<div style="display: flex">
<span style="width: 90px; line-height: 32px">瑙勬牸鍨嬪彿锛�</span>
- <el-input v-model="exemptionInfo.partDetail" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable"></el-input>
+ <el-input v-model="exemptionInfo.partDetail" clearable placeholder="璇疯緭鍏�" size="small"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-row>
@@ -247,7 +247,6 @@
{ label: '鎶ユ鏃堕棿', prop: 'declareDate' },
{
dataType: 'action',
- fixed: 'right',
label: '鎿嶄綔',
operation: [
{
@@ -276,7 +275,7 @@
],
page: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
tableData1: [],
@@ -357,7 +356,7 @@
],
page1: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
tableData2: [],
@@ -413,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',
@@ -516,7 +533,7 @@
],
page2: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
tableData3: [],
@@ -566,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',
@@ -622,7 +657,7 @@
],
page3: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
tableData4: [],
@@ -672,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',
@@ -745,7 +798,7 @@
],
page4: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
entity: {
@@ -830,8 +883,20 @@
mounted() {
this.refreshTable()
},
+ activated () {
+ this.refreshTable()
+ },
// 鏂规硶闆嗗悎
methods: {
+ // 鐐瑰嚮鏌ヨ鍥炶皟
+ goSearch() {
+ this.page.current = 1
+ this.page1.current = 1
+ this.page2.current = 1
+ this.page3.current = 1
+ this.page4.current = 1
+ this.refreshTable()
+ },
// 鏌ヨ鍥炶皟
refreshTable() {
if (this.tabIndex === 0) {
@@ -1194,7 +1259,7 @@
repealQuarterRawOrder({ quarterOrderId: this.insOrderRow.quarterOrderId }).then(res => {
if (res.code === 200) {
this.$message.success('鎾ら攢鎴愬姛')
- this.refreshTable('page')
+ this.refreshTable()
}
})
}).catch(() => { })
--
Gitblit v1.9.3