|
@@ -2451,6 +2451,22 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+<!-- 班组选择弹窗 -->
|
|
|
|
|
+<el-dialog v-model="dialogSelectVisible_Bz" title="班组选择" @keydown="select_bzmc($event)"
|
|
|
|
|
+ destroy-on-close width="400px" style="margin-top: 10%;">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ tooltip-effect="dark"
|
|
|
|
|
+ :data="selectData_Bz"
|
|
|
|
|
+ ref="table_BZMC"
|
|
|
|
|
+ row-key="code"
|
|
|
|
|
+ highlight-current-row
|
|
|
|
|
+ border
|
|
|
|
|
+ style="width:100%"
|
|
|
|
|
+ @row-dblclick="handleSelectClick_Bz">
|
|
|
|
|
+ <el-table-column prop="name" label="班组名称" width="380" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+</el-dialog>
|
|
|
|
|
+
|
|
|
<Shebeizhuangtai
|
|
<Shebeizhuangtai
|
|
|
v-if="dialogSbyxgl"
|
|
v-if="dialogSbyxgl"
|
|
|
v-model="dialogSbyxgl"
|
|
v-model="dialogSbyxgl"
|
|
@@ -3923,6 +3939,10 @@ const JPentedit = async (event,key,val) => {
|
|
|
getDedhsubmitedit();
|
|
getDedhsubmitedit();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (event.target.id === 'bzdh') {
|
|
|
|
|
+ console.log('检品修改选择班组')
|
|
|
|
|
+ openBanzuDialog()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -4470,6 +4490,10 @@ const JPent = async (event,key,val) => {
|
|
|
getDedhsubmit();
|
|
getDedhsubmit();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (event.target.id === 'bzdh') {
|
|
|
|
|
+ console.log('检品新增选择班组')
|
|
|
|
|
+ openBanzuDialog()
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const inputs = document.getElementsByTagName('input');
|
|
const inputs = document.getElementsByTagName('input');
|
|
@@ -6220,7 +6244,7 @@ const addBz = async() => {
|
|
|
let hasEmptyBefore = false; // 标记是否已经出现过空项
|
|
let hasEmptyBefore = false; // 标记是否已经出现过空项
|
|
|
|
|
|
|
|
// 按1-10的顺序验证
|
|
// 按1-10的顺序验证
|
|
|
- for (let i = 1; i <= 10; i++) {
|
|
|
|
|
|
|
+ for (let i = 1; i <= 7; i++) {
|
|
|
const codeKey = `code${i}`;
|
|
const codeKey = `code${i}`;
|
|
|
const percentageKey = `percentage${i}`;
|
|
const percentageKey = `percentage${i}`;
|
|
|
|
|
|
|
@@ -8018,6 +8042,65 @@ if(selected.value==='难度调整系数'){
|
|
|
hesuanVisible.value = false
|
|
hesuanVisible.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 班组选择相关变量
|
|
|
|
|
+const dialogSelectVisible_Bz = ref(false)
|
|
|
|
|
+const selectData_Bz = reactive([
|
|
|
|
|
+ { code: 'A 班', name: 'A 班' },
|
|
|
|
|
+ { code: 'B 班', name: 'B 班' }
|
|
|
|
|
+])
|
|
|
|
|
+const currentBzIndex = ref(0)
|
|
|
|
|
+const table_BZMC = ref()
|
|
|
|
|
+
|
|
|
|
|
+// 打开班组选择弹窗
|
|
|
|
|
+const openBanzuDialog = () => {
|
|
|
|
|
+ dialogSelectVisible_Bz.value = true
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ currentBzIndex.value = 0
|
|
|
|
|
+ setCurrent_BZMC(selectData_Bz[0])
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 处理班组选择
|
|
|
|
|
+const handleSelectClick_Bz = (row) => {
|
|
|
|
|
+ formdata3.value.bzdh = row.code
|
|
|
|
|
+ JPformdata['bzdh'] = row.code
|
|
|
|
|
+ JPformdataedit['bzdh'] = row.code
|
|
|
|
|
+// formdata3.value.bzmc = row.name
|
|
|
|
|
+ dialogSelectVisible_Bz.value = false
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 班组键盘选择
|
|
|
|
|
+const select_bzmc = (event) => {
|
|
|
|
|
+ if (event.keyCode === 40) { // 向下箭头
|
|
|
|
|
+ if (currentBzIndex.value < selectData_Bz.length - 1) {
|
|
|
|
|
+ currentBzIndex.value++
|
|
|
|
|
+ setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
|
|
|
|
|
+ } else {
|
|
|
|
|
+ currentBzIndex.value = 0
|
|
|
|
|
+ setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (event.keyCode === 38) { // 向上箭头
|
|
|
|
|
+ if (currentBzIndex.value > 0) {
|
|
|
|
|
+ currentBzIndex.value--
|
|
|
|
|
+ setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
|
|
|
|
|
+ } else {
|
|
|
|
|
+ currentBzIndex.value = selectData_Bz.length - 1
|
|
|
|
|
+ setCurrent_BZMC(selectData_Bz[currentBzIndex.value])
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (event.keyCode === 13) { // 回车键
|
|
|
|
|
+ if (selectData_Bz[currentBzIndex.value]) {
|
|
|
|
|
+ handleSelectClick_Bz(selectData_Bz[currentBzIndex.value])
|
|
|
|
|
+ }
|
|
|
|
|
+ dialogSelectVisible_Bz.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 设置当前选中班组
|
|
|
|
|
+const setCurrent_BZMC = (row) => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ table_BZMC.value?.setCurrentRow(row)
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const ent1 = async (event) => {
|
|
const ent1 = async (event) => {
|
|
|
const inputs = document.getElementsByTagName('input');
|
|
const inputs = document.getElementsByTagName('input');
|
|
@@ -8040,6 +8123,9 @@ if(selected.value==='难度调整系数'){
|
|
|
}else{
|
|
}else{
|
|
|
FJPgetDedhsubmit();
|
|
FJPgetDedhsubmit();
|
|
|
}
|
|
}
|
|
|
|
|
+ }else if (event.target.id === 'bzdh') {
|
|
|
|
|
+ console.log('选择班组')
|
|
|
|
|
+ openBanzuDialog()
|
|
|
}
|
|
}
|
|
|
let nextIndex = currentIndex + 1;
|
|
let nextIndex = currentIndex + 1;
|
|
|
while (nextIndex < inputs.length) {
|
|
while (nextIndex < inputs.length) {
|