From 99a010f21d278498bafd248217c584e101db2d8f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 01 九月 2022 17:27:17 +0800
Subject: [PATCH] 1.自动扫码回车功能接入
---
src/views/zlgl/qxdy.vue | 39 +++++++++++++++++++++++++++++++++------
1 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/src/views/zlgl/qxdy.vue b/src/views/zlgl/qxdy.vue
index 0e4f587..c0e5366 100644
--- a/src/views/zlgl/qxdy.vue
+++ b/src/views/zlgl/qxdy.vue
@@ -2,9 +2,9 @@
<div>
<div class="body" :style="{height:mainHeight+'px'}">
- <div class="bodyTopButtonGroup">
+ <div class="bodyTopButtonGroup" style="justify-content: space-between">
<el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
- <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
+ <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
</div>
<div class="bodyTopFormGroup">
<el-form
@@ -68,7 +68,12 @@
prop="descr"
label="缂洪櫡鎻忚堪"
sortable="custom"
- />
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.descr">{{ row.descr }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
<el-table-column
prop="lm_user"
label="鍒涘缓浜哄憳"
@@ -100,7 +105,6 @@
</div>
<!--鍒嗛〉-->
<pagination
- v-show="total>0"
:total="total"
:page.sync="form.page"
:limit.sync="form.rows"
@@ -138,18 +142,23 @@
</div>
</span>
</el-dialog>
+
+ <!--瀵煎叆缁勪欢-->
+ <import-picker ref="importPickerFunc" class="importPickerClass" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" />
+
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateDedect, DedectSearch, DeleteDedect } from '@/api/zlgl'
+import ImportPicker from '@/components/ImportPicker'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
name: 'QXDY',
components: {
- Pagination
+ Pagination, ImportPicker
},
data() {
const validateName = (rule, value, callback) => {
@@ -191,6 +200,16 @@
defectname: [
{ required: true, message: '璇疯緭鍏ョ己闄峰悕绉�', trigger: ['blur', 'change'] }
]
+ },
+ title_value: '鏁版嵁瀵煎叆 / 缂洪櫡瀹氫箟',
+ code: '18',
+ shows: false
+ }
+ },
+ watch: {
+ shows() {
+ if (!this.shows) {
+ this.getDedectSearch()
}
}
},
@@ -224,8 +243,13 @@
search() {
this.getDedectSearch()
},
+ // 瀵煎叆鎸夐挳
upload() {
-
+ this.shows = true
+ this.$refs.importPickerFunc.newDataFunc()
+ },
+ colos() {
+ this.shows = false
},
// 閲嶇疆
reset() {
@@ -260,6 +284,9 @@
DeleteDedect({ defectcode: row.code }).then(res => {
if (res.code === '200') {
this.$message.success('鍒犻櫎鎴愬姛!')
+ if (this.form.page > 1 && this.tableData.length === 1) {
+ this.form.page--
+ }
this.getDedectSearch()
}
})
--
Gitblit v1.9.3