|
|
@@ -114,15 +114,15 @@
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="15">
|
|
|
<el-form-item label="流程单号">
|
|
|
- <el-input v-model="detailData.qczl_num" id='qczl_num' @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc1" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc2" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc3" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc4" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc5" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc6" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc7" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
- <el-input v-model="detailData.qczl_NumDesc8" @keydown="ent1($event)" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_num" id='qczl_num' @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc1" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc2" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc3" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc4" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc5" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc6" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc7" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
+ <el-input v-model="detailData.qczl_NumDesc8" @keydown="ent1($event,index,row,'流程单号')" style="width: 60px; margin-right: 5px;" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="9">
|
|
|
@@ -1345,7 +1345,90 @@ const gd_lcdCancel = async () => {
|
|
|
if (event.keyCode === 13 && title === '工序') {
|
|
|
getgxsubmit()
|
|
|
|
|
|
- }else if (event.keyCode === 13 && title === '废品类别') {
|
|
|
+ }else if (event.keyCode === 13 && title === '流程单号') {
|
|
|
+ console.log("流程单号");
|
|
|
+ // 获取所有相关的输入框值
|
|
|
+ const allValues = [
|
|
|
+ detailData.qczl_num,
|
|
|
+ detailData.qczl_NumDesc1,
|
|
|
+ detailData.qczl_NumDesc2,
|
|
|
+ detailData.qczl_NumDesc3,
|
|
|
+ detailData.qczl_NumDesc4,
|
|
|
+ detailData.qczl_NumDesc5,
|
|
|
+ detailData.qczl_NumDesc6,
|
|
|
+ detailData.qczl_NumDesc7,
|
|
|
+ detailData.qczl_NumDesc8,
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 获取当前输入框的值
|
|
|
+ const currentValue = event.target.value;
|
|
|
+
|
|
|
+ // 如果当前值为 0,不进行校验,直接跳转到下一个输入框
|
|
|
+ if (currentValue === "0") {
|
|
|
+ console.log("输入值为 0,无需校验");
|
|
|
+
|
|
|
+ // 跳转到下一个输入框
|
|
|
+ let nextIndex = currentIndex + 1;
|
|
|
+ let foundNext = false; // 标记是否找到下一个可用输入框
|
|
|
+ while (nextIndex < inputs.length) {
|
|
|
+ if (inputs[nextIndex].disabled) {
|
|
|
+ console.log("当前输入框为 disabled,跳过");
|
|
|
+ nextIndex++; // 跳过 disabled 的输入框
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (!inputs[nextIndex].readOnly) {
|
|
|
+ nextTick(() => {
|
|
|
+ inputs[nextIndex].focus();
|
|
|
+ inputs[nextIndex].select();
|
|
|
+ });
|
|
|
+ foundNext = true; // 找到下一个可用输入框
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ nextIndex++;
|
|
|
+ }
|
|
|
+ if (!foundNext) {
|
|
|
+ console.log("没有更多可用的输入框");
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 检查是否有重复的值
|
|
|
+ const isDuplicate = allValues.filter((val) => val === currentValue).length > 1;
|
|
|
+
|
|
|
+ if (isDuplicate) {
|
|
|
+ // 如果有重复值,提示用户并清空当前输入框
|
|
|
+ event.target.value = '';
|
|
|
+ ElMessage({
|
|
|
+ type: 'error',
|
|
|
+ message: '输入的值已存在,请重新输入'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ console.log('输入值无重复');
|
|
|
+
|
|
|
+ // 跳转到下一个输入框
|
|
|
+ let nextIndex = currentIndex + 1;
|
|
|
+ let foundNext = false; // 标记是否找到下一个可用输入框
|
|
|
+ while (nextIndex < inputs.length) {
|
|
|
+ if (inputs[nextIndex].disabled) {
|
|
|
+ console.log("当前输入框为 disabled,跳过");
|
|
|
+ nextIndex++; // 跳过 disabled 的输入框
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (!inputs[nextIndex].readOnly) {
|
|
|
+ nextTick(() => {
|
|
|
+ inputs[nextIndex].focus();
|
|
|
+ inputs[nextIndex].select();
|
|
|
+ });
|
|
|
+ foundNext = true; // 找到下一个可用输入框
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ nextIndex++;
|
|
|
+ }
|
|
|
+ if (!foundNext) {
|
|
|
+ console.log("没有更多可用的输入框");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}else if (event.keyCode === 13 && title === '废品类别') {
|
|
|
handleFplbEnter(event,index,row,title)
|
|
|
let nextIndex = currentIndex + 1;
|
|
|
let foundNext = false; // 标记是否找到下一个可用的输入框
|