From f92228f3bf419e124e3eb5e4a264f10670d09bcf Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 08 九月 2022 09:40:59 +0800
Subject: [PATCH] 1.点检记录静态页面
---
src/views/scgl/gdplgb.vue | 88 ++++++++++++++++++++++++++-----------------
1 files changed, 53 insertions(+), 35 deletions(-)
diff --git a/src/views/scgl/gdplgb.vue b/src/views/scgl/gdplgb.vue
index 4b6b910..f8a791c 100644
--- a/src/views/scgl/gdplgb.vue
+++ b/src/views/scgl/gdplgb.vue
@@ -40,16 +40,16 @@
<el-form-item label="浜у搧缂栫爜" style=" display: flex;">
<el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="浜у搧鍚嶇О" style=" display: flex;">
<el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="浜у搧瑙勬牸" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
<el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
<el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
- <el-form-item label="鍒涘缓鏃堕棿" style=" display: flex;">
+ <el-form-item v-show="isExpandForm" label="鍒涘缓鏃堕棿" style=" display: flex;">
<el-input v-model="form.createdate" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
</div>
@@ -59,15 +59,22 @@
</div>
</el-form>
</div>
-
- <div class="elTableDiv">
+ <div
+ class="bodyTopFormExpand"
+ @click="isExpandForm=!isExpandForm"
+ >
+ <i
+ :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'"
+ :style="{color:'#42B983'}"
+ /></div>
+ <div class="elTableDiv" style="margin-top: 0">
<el-table
ref="multipleTable"
:data="tableData"
- :height="tableHeight+'px'"
+ :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
border
:row-class-name="tableRowClassName"
- :style="{width: 100+'%',height:tableHeight+'px',}"
+ :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@@ -326,6 +333,7 @@
},
data() {
return {
+ isExpandForm: false,
mainHeight: 0,
tableHeight: 0,
form: {
@@ -428,40 +436,50 @@
data.push({ wo_code: item.wo_code })
}
})
- this.$confirm('鏄惁纭鎵归噺鍏冲崟?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- MesOrderBitchClosedSeave({ dt: data }).then(res => {
- if (res.code === '200') {
- this.$message.success('鎵归噺鍏冲崟鎴愬姛锛�')
- this.$refs.multipleTable.clearSelection()
- }
+ if (data.length > 0) {
+ this.$confirm('鏄惁纭鎵归噺鍏冲崟?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ MesOrderBitchClosedSeave(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('鎵归噺鍏冲崟鎴愬姛锛�')
+ this.$refs.multipleTable.clearSelection()
+ this.getMesOrderBitchClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堟壒閲忓叧鍗曪紒')
})
- }).catch(() => {
- this.$message.info('宸插彇娑堟壒閲忓叧鍗曪紒')
- })
+ } else if (data.length === 0) {
+ this.$message.info('鏃犵鍚堝彲鍏抽棴鐨勫伐鍗曪紒')
+ }
} else if (val === 'noClose') {
this.multipleSelection.forEach(item => {
if (item.status === 'CLOSED') {
data.push({ wo_code: item.wo_code })
}
})
- this.$confirm('鏄惁纭鎵归噺鍙嶅叧鍗�?', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- MesOrderBitchAntiClosedSeave({ dt: data }).then(res => {
- if (res.code === '200') {
- this.$message.success('鎵归噺鍙嶅叧鍗曟垚鍔燂紒')
- this.$refs.multipleTable.clearSelection()
- }
+ if (data.length > 0) {
+ this.$confirm('鏄惁纭鎵归噺鍙嶅叧鍗�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ MesOrderBitchAntiClosedSeave(data).then(res => {
+ if (res.code === '200') {
+ this.$message.success('鎵归噺鍙嶅叧鍗曟垚鍔燂紒')
+ this.$refs.multipleTable.clearSelection()
+ this.getMesOrderBitchClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$message.info('宸插彇娑堟壒閲忓弽鍏冲崟锛�')
})
- }).catch(() => {
- this.$message.info('宸插彇娑堟壒閲忓弽鍏冲崟锛�')
- })
+ } else if (data.length === 0) {
+ this.$message.info('鏃犵鍚堝彲鍙嶅叧闂殑宸ュ崟锛�')
+ }
}
},
@@ -469,7 +487,7 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 240
+ this.tableHeight = this.mainHeight - 250
})
},
tableRowClassName({ row, rowIndex }) {
--
Gitblit v1.9.3