From 9b825939b7f0a7439d704b379812362dd95697fc Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 11 七月 2022 17:49:26 +0800
Subject: [PATCH] 1.优化代码2.修改实施部提出的bug3.生产开报工外协列表自动弹窗实现部分
---
src/views/wlgl/kwdy.vue | 37 +++++++++++++++++++++++++++----------
1 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/src/views/wlgl/kwdy.vue b/src/views/wlgl/kwdy.vue
index 67b4574..a5b7c9b 100644
--- a/src/views/wlgl/kwdy.vue
+++ b/src/views/wlgl/kwdy.vue
@@ -23,7 +23,13 @@
<el-input v-model="form.createuser" style="width: 200px" placeholder="璇疯緭鍏�" />
</el-form-item>
<el-form-item label="鎵�灞炰粨搴�" style=" display: flex;">
- <el-select v-model="form.stockcode" :popper-append-to-body="false" style="width: 200px" placeholder="璇烽�夋嫨">
+ <el-select
+ v-model="form.stockcode"
+ :popper-append-to-body="false"
+ style="width: 200px"
+ placeholder="璇烽�夋嫨"
+ @focus="getWareHouseSelect"
+ >
<el-option
v-for="item in stockArr"
:key="item.code"
@@ -50,7 +56,7 @@
:data="tableData"
border
stripe
- :height="tableHeight"
+ :height="tableHeight+'px'"
:style="{width: 100+'%',height:tableHeight+'px',}"
highlight-current-row
:header-cell-style="this.$headerCellStyle"
@@ -124,7 +130,7 @@
<el-dialog
:title="operation==='add'?'鏂板':'缂栬緫'"
:visible.sync="dialogVisible"
- width="50%"
+ width="800px"
:close-on-click-modal="false"
top="15vh"
@closed="handleClose"
@@ -132,20 +138,22 @@
>
<el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
<el-form-item label="搴撲綅缂栫爜" prop="storagecode">
- <el-input v-model="dialogForm.storagecode" :disabled="operation!=='add'" style="width: 220px" />
+ <el-input v-model="dialogForm.storagecode" :disabled="operation!=='add'" style="width: 200px" />
</el-form-item>
<el-form-item label="搴撲綅鍚嶇О" prop="storagename">
- <el-input v-model="dialogForm.storagename" style="width: 220px" />
+ <el-input v-model="dialogForm.storagename" style="width: 200px" />
</el-form-item>
<el-form-item label="鎵�灞炲簱浣�" prop="stockcode">
<el-select
v-model="dialogForm.stockcode"
+ filterable
:popper-append-to-body="false"
- style="width: 220px"
+ style="width: 200px"
placeholder="璇烽�夋嫨"
+ @focus="getWareHouseSelect2"
>
<el-option
- v-for="item in stockArr"
+ v-for="item in stockArr2"
:key="item.code"
:label="item.name"
:value="item.code"
@@ -153,7 +161,7 @@
</el-select>
</el-form-item>
<el-form-item label="搴撲綅鎻忚堪">
- <el-input v-model="dialogForm.description" type="textarea" style="width: 220px" />
+ <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -172,7 +180,7 @@
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
- name: 'Zzjg',
+ name: 'KWDY',
components: {
Pagination
},
@@ -204,6 +212,7 @@
},
total: 10,
stockArr: [], // 鎵�灞炰粨搴撴暟缁�
+ stockArr2: [], // 鎵�灞炰粨搴撴暟缁勫璇濇
tableData: [],
dialogVisible: false,
dialogForm: {
@@ -231,7 +240,7 @@
},
created() {
this.getStorageDefSearch()
- this.getWareHouseSelect()
+ // this.getWareHouseSelect()
},
mounted() {
window.addEventListener('resize', this.getHeight)
@@ -246,6 +255,11 @@
async getWareHouseSelect() {
const { data: res } = await WareHouseSelect()
this.stockArr = res
+ },
+ // 瀵硅瘽妗嗕腑鐨�
+ async getWareHouseSelect2() {
+ const { data: res } = await WareHouseSelect()
+ this.stockArr2 = res
},
// 鎺掑簭鏀瑰彉鏃�
sortChange({ column, prop, order }) {
@@ -352,6 +366,9 @@
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 250
this.tableHeight = this.mainHeight - 100
+ if (window.innerHeight < 800) {
+ this.tableHeight = this.tableHeight - 50
+ }
})
}
}
--
Gitblit v1.9.3