|
@@ -55,7 +55,7 @@
|
|
|
<el-row :gutter="24">
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="5">
|
|
<el-col :span="5">
|
|
|
<el-form-item label="日期">
|
|
<el-form-item label="日期">
|
|
|
- <el-input type="date" max="9999-12-31" v-model="detailData.qczl_rq" @keydown="ent1($event)" @focus="rqHandleFocus()"
|
|
|
|
|
|
|
+ <el-input type="date" max="9999-12-31" v-model="detailData.qczl_rq" id = '日期' @keydown="ent1($event)" @focus="rqHandleFocus()"
|
|
|
style="width: 130px;" />
|
|
style="width: 130px;" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -141,7 +141,6 @@
|
|
|
<el-input v-model="row.fp_lb" @keydown="ent1($event)" @blur="handleFplbEnter($index, row)" />
|
|
<el-input v-model="row.fp_lb" @keydown="ent1($event)" @blur="handleFplbEnter($index, row)" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-
|
|
|
|
|
<el-table-column label="数量" width="100">
|
|
<el-table-column label="数量" width="100">
|
|
|
<template #default="{ row, $index }">
|
|
<template #default="{ row, $index }">
|
|
|
<el-input v-model="row.fp_sl" @keydown="ent1($event)" @blur="handleFpslEnter($index, row)" />
|
|
<el-input v-model="row.fp_sl" @keydown="ent1($event)" @blur="handleFpslEnter($index, row)" />
|
|
@@ -170,7 +169,6 @@
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
-
|
|
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="closeDialog">取 消</el-button>
|
|
<el-button @click="closeDialog">取 消</el-button>
|
|
@@ -180,20 +178,18 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <!-- 废品类别弹出选项框 -->
|
|
|
|
|
|
|
+ <!-- 废品类别弹出 -->
|
|
|
<el-dialog v-model="dialogSelectVisible1" id="tableFplb" @keydown="ent($event)" @opened="focusFirstNode">
|
|
<el-dialog v-model="dialogSelectVisible1" id="tableFplb" @keydown="ent($event)" @opened="focusFirstNode">
|
|
|
<el-form>
|
|
<el-form>
|
|
|
- <div>
|
|
|
|
|
- <el-form-item label="废品类别 :" class="mab" prop="keyOrder"></el-form-item>
|
|
|
|
|
- <div style="border:1px solid #eee; width:100%; height: 400px; overflow-y: auto">
|
|
|
|
|
|
|
+ <el-form-item label="废品类别" class="mab" prop="keyOrder"></el-form-item>
|
|
|
|
|
+ <div style="border:1px solid #eee; width:100%; height: 500px; overflow-y: auto">
|
|
|
<el-tree :data="selecTreeData" ref="table_fplb"
|
|
<el-tree :data="selecTreeData" ref="table_fplb"
|
|
|
|
|
+ @keydown="handleTreeKeydown"
|
|
|
:props="{ children: 'children',label: 'label'}"
|
|
:props="{ children: 'children',label: 'label'}"
|
|
|
node-key="id" @node-click="handleFplbClick">
|
|
node-key="id" @node-click="handleFplbClick">
|
|
|
</el-tree>
|
|
</el-tree>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
|
-
|
|
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 弹出选项框 数量 -->
|
|
<!-- 弹出选项框 数量 -->
|
|
@@ -245,7 +241,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<!-- 弹出选项框 工单 -->
|
|
<!-- 弹出选项框 工单 -->
|
|
|
<el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="1000px"
|
|
<el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="1000px"
|
|
|
@keydown="selectGX($event)">
|
|
@keydown="selectGX($event)">
|
|
@@ -740,17 +735,25 @@ const gd_lcdCancel = async () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //tree中data数据
|
|
|
const selecTreeData = ref([])
|
|
const selecTreeData = ref([])
|
|
|
const table_fplb = ref()
|
|
const table_fplb = ref()
|
|
|
- // 废品类别回车
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 废品类别回车弹出分类页面
|
|
|
const handleFplbEnter = async(index, row) => {
|
|
const handleFplbEnter = async(index, row) => {
|
|
|
|
|
+
|
|
|
//上个弹窗还未关闭或者值为空
|
|
//上个弹窗还未关闭或者值为空
|
|
|
if(dialogSelectVisible2.value || !row.fp_lb){
|
|
if(dialogSelectVisible2.value || !row.fp_lb){
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ //打开弹窗
|
|
|
|
|
+ dialogSelectVisible1.value = true
|
|
|
|
|
+
|
|
|
let flag = true
|
|
let flag = true
|
|
|
-
|
|
|
|
|
- //查询废品类别
|
|
|
|
|
|
|
+ //查询废品类别接口
|
|
|
const res = await getWastInfo()
|
|
const res = await getWastInfo()
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
const obj = res.data
|
|
const obj = res.data
|
|
@@ -772,7 +775,6 @@ const gd_lcdCancel = async () => {
|
|
|
})
|
|
})
|
|
|
j++
|
|
j++
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
children.push({
|
|
children.push({
|
|
|
id: i,
|
|
id: i,
|
|
|
label: subCategory,
|
|
label: subCategory,
|
|
@@ -781,31 +783,11 @@ const gd_lcdCancel = async () => {
|
|
|
i++
|
|
i++
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(!flag){
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(!flag){return}
|
|
|
//渲染数据
|
|
//渲染数据
|
|
|
selecTreeData.value = children
|
|
selecTreeData.value = children
|
|
|
selectIndex = index
|
|
selectIndex = index
|
|
|
- dialogSelectVisible1.value = true
|
|
|
|
|
- // nextTick(() => {
|
|
|
|
|
- // // 手动设置选中节点,如果默认选中不生效,可以使用此方法
|
|
|
|
|
- // if (table_fplb.value) {
|
|
|
|
|
- // const tree = table_fplb.value?.$el; // 访问组件实例的 $el
|
|
|
|
|
- // if (tree) {
|
|
|
|
|
- // const node = tree.querySelector('[data-key="0"]');
|
|
|
|
|
- // if (node) {
|
|
|
|
|
- // node.scrollIntoView();
|
|
|
|
|
- // node.focus(); // 尝试聚焦
|
|
|
|
|
- // console.log(document.activeElement === node); // 输出检查
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handleFplbClick = (node, check) => {
|
|
const handleFplbClick = (node, check) => {
|
|
@@ -818,13 +800,25 @@ const gd_lcdCancel = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let selectData = [] // 将const改为let
|
|
|
|
|
|
|
+ const handleTreeKeydown = (event) => {
|
|
|
|
|
+ console.log("event",event.keyCode)
|
|
|
|
|
+ if(event.keyCode === 13){
|
|
|
|
|
+ console.log("回车打开")
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ let selectData = [] // 将const改为let
|
|
|
const handleFpslEnter = async (index, row) => {
|
|
const handleFpslEnter = async (index, row) => {
|
|
|
selectIndex = index
|
|
selectIndex = index
|
|
|
- if(dialogSelectVisible1.value){
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if(dialogSelectVisible1.value){return}
|
|
|
if (row.fp_sl == '0' || row.fp_sl == '') {
|
|
if (row.fp_sl == '0' || row.fp_sl == '') {
|
|
|
detailData.table[index].fp_gxmc = ''
|
|
detailData.table[index].fp_gxmc = ''
|
|
|
detailData.table[index].fp_bz = ''
|
|
detailData.table[index].fp_bz = ''
|
|
@@ -1138,6 +1132,13 @@ const gd_lcdCancel = async () => {
|
|
|
// 新增数据
|
|
// 新增数据
|
|
|
const handleShowAdd = async () => {
|
|
const handleShowAdd = async () => {
|
|
|
type.value = '新增'
|
|
type.value = '新增'
|
|
|
|
|
+ dialogFormVisible.value = true
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ const inputElement = document.getElementById('日期');
|
|
|
|
|
+ if (inputElement) {
|
|
|
|
|
+ inputElement.focus();
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 100);
|
|
|
if (currentRow.value == undefined) {
|
|
if (currentRow.value == undefined) {
|
|
|
// 循环13行数据
|
|
// 循环13行数据
|
|
|
const table = []
|
|
const table = []
|
|
@@ -1248,6 +1249,12 @@ const gd_lcdCancel = async () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const ent1 = (event) => {
|
|
const ent1 = (event) => {
|
|
|
const inputs = document.getElementsByTagName('input');
|
|
const inputs = document.getElementsByTagName('input');
|
|
|
const currentIndex = Array.from(inputs).indexOf(event.target);
|
|
const currentIndex = Array.from(inputs).indexOf(event.target);
|