|
|
@@ -102,7 +102,7 @@
|
|
|
<el-table-column label="工单编号" width="100">
|
|
|
<template #default="{ row, $index }">
|
|
|
<el-input v-model="row.sczl_gdbh" placeholder="Enter回车"
|
|
|
- @keyup.enter="handleEnter($index, row)" />
|
|
|
+ @keyup.enter="handleEnter($index, row)" @keyup ="movefous($event,row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
@@ -150,13 +150,14 @@
|
|
|
|
|
|
<el-table-column label="来源" width="100">
|
|
|
<template #default="{ row }">
|
|
|
- <el-input v-model="row.sczl_Jtbh1" />
|
|
|
+ <el-input v-model="row.sczl_Jtbh1"
|
|
|
+ @keyup ="movefous2($event,row)"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="定额代号" width="130">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <el-input v-model="row.sczl_dedh"
|
|
|
+ <el-input id="input" v-model="row.sczl_dedh"
|
|
|
@keyup.enter="getDedhsubmit($index, row)" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -668,7 +669,7 @@ const SelectClickBz = (row, column, event) => {
|
|
|
dialogFormVisible.value = true
|
|
|
}
|
|
|
|
|
|
- if (type.value === '新增' || type.value === '编辑') {
|
|
|
+ if (type.value === '新增' || type.value === '查改') {
|
|
|
detailData.UniqId = id
|
|
|
dialogFormVisible.value = true
|
|
|
|
|
|
@@ -1059,9 +1060,8 @@ const SelectClickBz = (row, column, event) => {
|
|
|
const _index = ref(null)
|
|
|
// 定额代号回车事件
|
|
|
const getDedhsubmit = async (index, row) => {
|
|
|
- if(detailData.table[index].sczl_dedh == '030002002'){
|
|
|
- return
|
|
|
- }
|
|
|
+ // const tree = this.$refs.dedhTree;
|
|
|
+ // console.log(tree);
|
|
|
_index.value = index
|
|
|
dedhsearchModel.value = true;
|
|
|
const getPieceWorks = await getDedh();
|
|
|
@@ -1126,12 +1126,15 @@ const SelectClickBz = (row, column, event) => {
|
|
|
let flag_Bz = true
|
|
|
let formElements
|
|
|
const moveFocus = (event) => {
|
|
|
+ // console.log(formElements);
|
|
|
const index = Array.from(formElements).indexOf(event.target);
|
|
|
const key = event.key;
|
|
|
+ // console.log(detailData);
|
|
|
+ const currentInputValue = formElements[index].value;
|
|
|
event.preventDefault();
|
|
|
switch (index) {
|
|
|
case 0:
|
|
|
- if (key === 'ArrowRight') {
|
|
|
+ if (key === 'ArrowRight' ) {
|
|
|
formElements[1].focus();
|
|
|
formElements[1].select();
|
|
|
} else if (key === 'ArrowLeft') {
|
|
|
@@ -1142,7 +1145,6 @@ const SelectClickBz = (row, column, event) => {
|
|
|
formElements[1].select();
|
|
|
}
|
|
|
break;
|
|
|
-
|
|
|
case 1:
|
|
|
if (key === 'ArrowRight') {
|
|
|
formElements[3].focus();
|
|
|
@@ -1157,6 +1159,7 @@ const SelectClickBz = (row, column, event) => {
|
|
|
|
|
|
case 3:
|
|
|
if (key === 'ArrowRight') {
|
|
|
+
|
|
|
formElements[4].focus();
|
|
|
formElements[4].select();
|
|
|
} else if (key === 'ArrowLeft') {
|
|
|
@@ -1195,7 +1198,22 @@ const SelectClickBz = (row, column, event) => {
|
|
|
break;
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+ const movefous2 = (event,row,index)=>{
|
|
|
+ const index2 = Array.from(formElements).indexOf(event.target)
|
|
|
+ if (row.sczl_dedh != '' & event.key === "ArrowRight"){
|
|
|
+ event.stopPropagation();
|
|
|
+ formElements[index2+2].focus();
|
|
|
+ formElements[index2+2].select();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const movefous = (event,row,index)=>{
|
|
|
+ const index2 = Array.from(formElements).indexOf(event.target)
|
|
|
+ if (row.sczl_dedh != '' & event.key === "ArrowLeft"){
|
|
|
+ event.stopPropagation();
|
|
|
+ formElements[index2-2].focus();
|
|
|
+ formElements[index2-2].select();
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|