|
|
@@ -389,56 +389,29 @@
|
|
|
:before-close="closeDialog"
|
|
|
:title="type === 'create' ? '新增' : '修改'"
|
|
|
destroy-on-close
|
|
|
- width="1200px"
|
|
|
- >
|
|
|
+ width="1200px" >
|
|
|
<!-- <el-scrollbar height="500px"> -->
|
|
|
- <el-form
|
|
|
- :model="formData"
|
|
|
- label-position="right"
|
|
|
- ref="elFormRef"
|
|
|
- label-width="120px"
|
|
|
- :rules="rule"
|
|
|
- >
|
|
|
+ <el-form :model="formData" label-position="right" ref="elFormRef" label-width="120px" :rules="rule" >
|
|
|
<el-row :gutter="24">
|
|
|
+
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="工单编号:" prop="flatFeed" class="mab">
|
|
|
- <el-input
|
|
|
- v-model="formData.sczl_gdbh"
|
|
|
- id="工单编号"
|
|
|
- placeholder="Enter回车"
|
|
|
- @blur="getCPMCsubmit()"
|
|
|
- @keydown="ent1($event)"
|
|
|
- :clearable="true"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.sczl_gdbh" id="工单编号" placeholder="Enter回车" @blur="getCPMCsubmit()" @keydown="ent1($event)" :clearable="true" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="18">
|
|
|
- <el-form-item
|
|
|
- label="产品名称:"
|
|
|
- prop="perTenThousand"
|
|
|
- class="mab"
|
|
|
- label-width="150"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="formData.Gd_cpmc"
|
|
|
- id="产品名称"
|
|
|
- @keydown="ent1($event)"
|
|
|
- :clearable="true"
|
|
|
- />
|
|
|
+ <el-form-item label="产品名称:" prop="perTenThousand" class="mab" label-width="150" >
|
|
|
+ <el-input v-model="formData.Gd_cpmc" id="产品名称" @keydown="ent1($event)" :clearable="true"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <!-- @blur="getYJMCsubmit()" -->
|
|
|
</el-row>
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="印件号:" prop="flatFeed" class="mab">
|
|
|
- <el-input
|
|
|
- v-model="formData.sczl_yjno"
|
|
|
- id="印件号"
|
|
|
- @focus="yjnoHandleFocus()"
|
|
|
- @blur="getYJMCsubmit()"
|
|
|
- @keydown="ent1($event)"
|
|
|
- :clearable="true"
|
|
|
- />
|
|
|
+ <el-input v-model="formData.sczl_yjno" id="印件号" @focus="yjnoHandleFocus()"
|
|
|
+ @keydown="ent1($event,'印件号')" :clearable="true" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="18">
|
|
|
@@ -457,7 +430,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
+<!-- @blur="getGXsubmit()" -->
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="14">
|
|
|
<el-form-item label="工序名称:" prop="flatFeed" class="mab">
|
|
|
@@ -465,8 +438,8 @@
|
|
|
v-model="formData.sczl_gxmc"
|
|
|
id="工序名称"
|
|
|
@focus="gxmcHandleFocus()"
|
|
|
- @blur="getGXsubmit()"
|
|
|
- @keydown="ent1($event)"
|
|
|
+
|
|
|
+ @keydown="ent1($event,'工序名称')"
|
|
|
:clearable="true"
|
|
|
style="width: 350px"
|
|
|
/>
|
|
|
@@ -511,25 +484,27 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <!-- @blur="getJtbhsubmit()" -->
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="机器:" prop="flatFeed" class="mab">
|
|
|
<el-input
|
|
|
v-model="formData.sczl_jtbh"
|
|
|
id="机器"
|
|
|
- @keydown="ent1($event)"
|
|
|
- @blur="getJtbhsubmit()"
|
|
|
+ @keydown="ent1($event,'机器')"
|
|
|
+
|
|
|
:clearable="true"
|
|
|
style="width: 100px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <!-- @blur="getBzsubmit()" -->
|
|
|
<el-col :span="10">
|
|
|
<el-form-item label="组别:" prop="flatFeed" class="mab">
|
|
|
<el-input
|
|
|
v-model="formData.sczl_bzdh"
|
|
|
id="组别"
|
|
|
- @keydown="ent1($event)"
|
|
|
- @blur="getBzsubmit()"
|
|
|
+ @keydown="ent1($event,'组别')"
|
|
|
+
|
|
|
:clearable="true"
|
|
|
style="width: 200px"
|
|
|
/>
|
|
|
@@ -564,7 +539,7 @@
|
|
|
@keydown="ent1($event)"
|
|
|
@blur="mult()"
|
|
|
style="width: 50px"
|
|
|
- />X
|
|
|
+ />
|
|
|
<el-input
|
|
|
v-model="mult2"
|
|
|
id="mult2"
|
|
|
@@ -1098,22 +1073,14 @@
|
|
|
</el-aside>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- v-model="GXVisible"
|
|
|
- title="选择"
|
|
|
- destroy-on-close
|
|
|
- width="800px"
|
|
|
- >
|
|
|
+ <el-dialog v-model="GXVisible" title="选择" destroy-on-close width="800px" @keydown="selectGxmc($event)">
|
|
|
<el-table
|
|
|
- ref="tableRef"
|
|
|
tooltip-effect="dark"
|
|
|
:data="selectData"
|
|
|
- row-key="ID"
|
|
|
- highlight-current-row="true"
|
|
|
- border
|
|
|
- style="width: 100%"
|
|
|
- @row-dblclick="SelectClick"
|
|
|
- >
|
|
|
+ row-key="ID" highlight-current-row="true"
|
|
|
+ border style="width: 100%"
|
|
|
+ ref="tablesczl_gxmc"
|
|
|
+ @row-dblclick="SelectClick" >
|
|
|
<el-table-column prop="sczl_gxmc" label="工序名称" width="750" />
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
@@ -1123,6 +1090,7 @@
|
|
|
title="选择"
|
|
|
destroy-on-close
|
|
|
width="800px"
|
|
|
+ @keydown="selectSb($event)"
|
|
|
>
|
|
|
<el-table
|
|
|
tooltip-effect="dark"
|
|
|
@@ -1132,6 +1100,7 @@
|
|
|
border
|
|
|
style="width: 100%"
|
|
|
@row-dblclick="SelectClickJtbh"
|
|
|
+ ref="tablesb"
|
|
|
>
|
|
|
<el-table-column prop="jtbh" label="设备编号" width="150" />
|
|
|
<el-table-column prop="设备名称" label="设备名称" width="600" />
|
|
|
@@ -1559,36 +1528,31 @@ const handleNodeClick = (node, check) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-//键盘 input框跳转
|
|
|
-// const ent = (event,id1,id2,id3) => {
|
|
|
-// if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
|
|
|
-// if(id3!=''){
|
|
|
-// document.getElementById(id3).focus()
|
|
|
-// }
|
|
|
-// } else if (event.keyCode === 38) { // 向上箭头
|
|
|
-// if(id1!=''){
|
|
|
-// document.getElementById(id1).focus()
|
|
|
-// }
|
|
|
-// }else if (event.keyCode === 8) { // 删除箭头
|
|
|
-// if(id1!='' && document.getElementById(id2).value===''){
|
|
|
-// document.getElementById(id1).focus()
|
|
|
-// }
|
|
|
-// }else if (event.keyCode === 37) { // 向左箭头
|
|
|
-// if(id1!='' && document.getElementById(id2).selectionStart==0){
|
|
|
-// document.getElementById(id1).focus()
|
|
|
-// }
|
|
|
-// }else if (event.keyCode === 39) { // 向右箭头
|
|
|
-// if(id3!='' && document.getElementById(id2).selectionStart == document.getElementById(id2).value.length){
|
|
|
-// document.getElementById(id3).focus()
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-const ent1 = (event) => {
|
|
|
+//新增键盘事件
|
|
|
+const ent1 = (event,id) => {
|
|
|
const inputs = document.getElementsByTagName("input");
|
|
|
const currentIndex = Array.from(inputs).indexOf(event.target);
|
|
|
- // if(event.keyCode === 13 || inputs =='印件号'){
|
|
|
- // console.log(123213)
|
|
|
- // }
|
|
|
+ // console.log(inputs)
|
|
|
+ if(event.keyCode === 13 && id ==='印件号'){
|
|
|
+ console.log("回车印件号")
|
|
|
+ //调用印件号选择方法
|
|
|
+ getYJMCsubmit()
|
|
|
+ }
|
|
|
+ if(event.keyCode === 13 && id ==='工序名称'){
|
|
|
+ console.log("回车工序名称")
|
|
|
+ //调用工序选择方法
|
|
|
+ getGXsubmit()
|
|
|
+ }
|
|
|
+ if(event.keyCode === 13 && id ==='组别'){
|
|
|
+ console.log("回车组别")
|
|
|
+ //调用工序选择方法
|
|
|
+ getBzsubmit()
|
|
|
+ }
|
|
|
+ if(event.keyCode === 13 && id ==='机器'){
|
|
|
+ console.log("回车机器")
|
|
|
+ //调用工序选择方法
|
|
|
+ getJtbhsubmit()
|
|
|
+ }
|
|
|
if (event.keyCode === 13 || event.keyCode === 40) {
|
|
|
// Enter 或向下箭头
|
|
|
for (let i = currentIndex + 1; i < inputs.length; i++) {
|
|
|
@@ -1699,30 +1663,45 @@ const getCPMCsubmit = () => {
|
|
|
|
|
|
//印件号数组
|
|
|
const yjnoArr = ref([0]);
|
|
|
-//印件号获得焦点事件
|
|
|
-// const yjnoHandleFocus = () => {
|
|
|
-// if (yjnoArr.value[0] == 0) {
|
|
|
-// formData.value.sczl_yjno = 1;
|
|
|
-// } else {
|
|
|
-// formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
-// }
|
|
|
-// };
|
|
|
-
|
|
|
//印件号弹窗
|
|
|
const selectDataYjh = reactive([]);
|
|
|
-const YjhVisible = ref(false);
|
|
|
-// const selectYjh = (event) => {
|
|
|
-// if (event.keyCode === 40) {
|
|
|
-// // Enter 或向下箭头
|
|
|
-// setCurrents(selectDataYjh[1]);
|
|
|
-// } else if (event.keyCode === 38) {
|
|
|
-// setCurrents(selectDataYjh[0]);
|
|
|
-// } else if (event.keyCode === 13) {
|
|
|
-// YjhVisible.value = false;
|
|
|
-// }
|
|
|
-// };
|
|
|
-
|
|
|
+const YjhVisible = ref(false);
|
|
|
const currentIndex = ref(0);
|
|
|
+
|
|
|
+// 工序名称选择
|
|
|
+const currentIndexgx = ref(0);
|
|
|
+const selectGxmc = (event) => {
|
|
|
+ console.log(event)
|
|
|
+ if (event.keyCode === 40) {
|
|
|
+ // 向下箭头
|
|
|
+ currentIndexgx.value = (currentIndexgx.value + 1) % selectData.length;
|
|
|
+ setCurrentgxmc(selectData[currentIndexgx.value]);
|
|
|
+ } else if (event.keyCode === 38) {
|
|
|
+ // 向上箭头
|
|
|
+ currentIndexgx.value = (currentIndexgx.value - 1) % selectData.length;
|
|
|
+ setCurrentgxmc(selectData[currentIndexgx.value]);
|
|
|
+ } else if (event.keyCode === 13) {
|
|
|
+ // Enter 键
|
|
|
+ GXVisible.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+const tablesczl_gxmc = ref();
|
|
|
+const setCurrentgxmc = (row) => {
|
|
|
+ console.log(row)
|
|
|
+ console.log(123)
|
|
|
+ setTimeout(() => {
|
|
|
+ tablesczl_gxmc.value?.setCurrentRow(row);
|
|
|
+ const { sczl_gxmc } = row;
|
|
|
+ formData.value.sczl_type = row.sczl_type;
|
|
|
+ formData.value.sczl_gxmc = row.sczl_gxmc;
|
|
|
+ formData.value.sczl_gxh = row.sczl_gxh;
|
|
|
+ formData.value.sczl_ls = row.sczl_ls;
|
|
|
+ // console.log(row);
|
|
|
+ // YjhVisible.value = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
const selectYjh = (event) => {
|
|
|
if (event.keyCode === 40) {
|
|
|
// 向下箭头
|
|
|
@@ -1741,16 +1720,24 @@ const selectYjh = (event) => {
|
|
|
yjno: formData.value.sczl_yjno,
|
|
|
}).then((response) => {
|
|
|
if (response.code === 0) {
|
|
|
+ console.log(response)
|
|
|
+ console.log(666)
|
|
|
formData.value.yj_yjmc = response.data.yj_yjmc;
|
|
|
- gxmc.value = response.data.gxmc;
|
|
|
- formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
+ if(formData.value.sczl_gxmc === ''){
|
|
|
+ gxmc.value = response.data.gxmc;
|
|
|
+ formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
+ // formData.value.sczl_gxmc = '01';
|
|
|
+ }
|
|
|
+ // gxmc.value = response.data.gxmc;
|
|
|
+ // formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
+ // formData.value.sczl_gxmc = '01';
|
|
|
setColorReadonly("印件名称");
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
type: "error",
|
|
|
message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",
|
|
|
});
|
|
|
- // formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
+ formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
formData.value.yj_yjmc = "";
|
|
|
gxmc.value = "";
|
|
|
}
|
|
|
@@ -1760,13 +1747,14 @@ const selectYjh = (event) => {
|
|
|
type: "error",
|
|
|
message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",
|
|
|
});
|
|
|
- // formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
- // formData.value.yj_yjmc = "";
|
|
|
- // gxmc.value = "";
|
|
|
+ formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
+ formData.value.yj_yjmc = "";
|
|
|
+ gxmc.value = "";
|
|
|
}
|
|
|
YjhVisible.value = false;
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
const tablesczl_yjno = ref();
|
|
|
const setCurrents = (row) => {
|
|
|
setTimeout(() => {
|
|
|
@@ -1790,14 +1778,15 @@ const SelectClickYjh = (row, column, event) => {
|
|
|
|
|
|
//印件号失去焦点事件
|
|
|
const getYJMCsubmit = async () => {
|
|
|
- const response = await productionGdmc({gdbh:formData.value.sczl_gdbh})
|
|
|
- console.log(response)
|
|
|
- YjhVisible.value = true;
|
|
|
- // 将数组转换为对象数组
|
|
|
- const formattedData = response.data.yjno.map(item => ({ yjno: item }));
|
|
|
- selectDataYjh.splice(0, selectDataYjh.length, ...formattedData);
|
|
|
-
|
|
|
- if (formData.value.sczl_gdbh != "" && formData.value.sczl_yjno != "") {
|
|
|
+ if (formData.value.sczl_gdbh != "") {
|
|
|
+ const response = await productionGdmc({gdbh:formData.value.sczl_gdbh})
|
|
|
+ console.log(response)
|
|
|
+ YjhVisible.value = true;
|
|
|
+ // 将数组转换为对象数组
|
|
|
+ const formattedData = response.data.yjno.map(item => ({ yjno: item }));
|
|
|
+ selectDataYjh.splice(0, selectDataYjh.length, ...formattedData);
|
|
|
+ }
|
|
|
+ if (formData.value.sczl_gdbh != "" && formData.value.sczl_yjno != "") {
|
|
|
//获取印件名称
|
|
|
productionYjmc({
|
|
|
gdbh: formData.value.sczl_gdbh,
|
|
|
@@ -1805,27 +1794,25 @@ const getYJMCsubmit = async () => {
|
|
|
}).then((response) => {
|
|
|
if (response.code === 0) {
|
|
|
formData.value.yj_yjmc = response.data.yj_yjmc;
|
|
|
- gxmc.value = response.data.gxmc;
|
|
|
- formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
+ // gxmc.value = response.data.gxmc;
|
|
|
+ // formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
setColorReadonly("印件名称");
|
|
|
} else {
|
|
|
- ElMessage({
|
|
|
- type: "error",
|
|
|
- message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",
|
|
|
- });
|
|
|
- // formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
+ // ElMessage({ type: "error", message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",});
|
|
|
+ formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
formData.value.yj_yjmc = "";
|
|
|
gxmc.value = "";
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
- ElMessage({
|
|
|
- type: "error",
|
|
|
- message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",
|
|
|
- });
|
|
|
- // formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
- // formData.value.yj_yjmc = "";
|
|
|
- // gxmc.value = "";
|
|
|
+ // ElMessage({
|
|
|
+ // type: "error",
|
|
|
+ // message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",
|
|
|
+ // });
|
|
|
+ formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
+ formData.value.yj_yjmc = "";
|
|
|
+ formData.value.sczl_yjno = "";
|
|
|
+ gxmc.value = "";
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -1837,13 +1824,13 @@ const tableRef = ref();
|
|
|
//工序数组
|
|
|
const gxArr = ref({});
|
|
|
//工序名称获得焦点事件
|
|
|
-const gxmcHandleFocus = () => {
|
|
|
- if (gxmc.value != "") {
|
|
|
- formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
- } else {
|
|
|
- formData.value.sczl_gxmc = "";
|
|
|
- }
|
|
|
-};
|
|
|
+// const gxmcHandleFocus = () => {
|
|
|
+// if (gxmc.value != "") {
|
|
|
+// formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
+// } else {
|
|
|
+// formData.value.sczl_gxmc = "";
|
|
|
+// }
|
|
|
+// };
|
|
|
|
|
|
//工序失去焦点事件
|
|
|
const getGXsubmit = () => {
|
|
|
@@ -1864,6 +1851,23 @@ const getGXsubmit = () => {
|
|
|
unsetColorReadonly("打样补产工时");
|
|
|
unsetColorReadonly("通电时间");
|
|
|
} else {
|
|
|
+ //弹出选择
|
|
|
+ productionGx({
|
|
|
+ gdbh: formData.value.sczl_gdbh,
|
|
|
+ yjno: formData.value.sczl_yjno,
|
|
|
+ }).then((response) => {
|
|
|
+ if (response.code === 0) {
|
|
|
+ selectData.splice(0, selectData.length, ...response.data);
|
|
|
+ GXVisible.value = true;
|
|
|
+ // nextTick(()=>{
|
|
|
+ // console.log(tableRef)
|
|
|
+ // console.log(selectData)
|
|
|
+ // tableRef.value.setCurrentRow(selectData[0]);
|
|
|
+ // tableRef.value.focus();
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
//工序名称为印件默认值
|
|
|
if (formData.value.sczl_gxmc == gxmc.value.sczl_gxmc) {
|
|
|
formData.value.sczl_gxh = gxmc.value.sczl_gxh;
|
|
|
@@ -1888,7 +1892,6 @@ const getGXsubmit = () => {
|
|
|
setColorReadonly("打样总工时");
|
|
|
setColorReadonly("打样补产工时");
|
|
|
setColorReadonly("通电时间");
|
|
|
-
|
|
|
//显示联拼
|
|
|
showFormItems.value = true;
|
|
|
} else {
|
|
|
@@ -1976,11 +1979,44 @@ const rqHandleFocus = () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+//=============机台选择===============
|
|
|
+const selectDataJtbh = reactive([]);
|
|
|
+const JtbhVisible = ref(false);
|
|
|
+//鼠标点击选择
|
|
|
+const SelectClickJtbh = (row, column, event) => {
|
|
|
+ const { jtbh, 设备编号 } = row;
|
|
|
+ formData.value.sczl_jtbh = row.jtbh;
|
|
|
+ JtbhVisible.value = false;
|
|
|
+};
|
|
|
+// 机器上下选择
|
|
|
+const tablesb = ref();
|
|
|
+const currentIndexsb = ref(0);
|
|
|
+const selectSb = (event) => {
|
|
|
+ if (event.keyCode === 40) {
|
|
|
+ // 向下箭头
|
|
|
+ currentIndexsb.value = (currentIndexsb.value + 1) % selectDataJtbh.length;
|
|
|
+ setCurrentsb(selectDataJtbh[currentIndexsb.value]);
|
|
|
+ } else if (event.keyCode === 38) {
|
|
|
+ // 向上箭头
|
|
|
+ currentIndexsb.value = (currentIndexsb.value - 1 + selectDataJtbh.length) % selectDataJtbh.length;
|
|
|
+ setCurrentsb(selectDataJtbh[currentIndexsb.value]);
|
|
|
+ } else if (event.keyCode === 13) {
|
|
|
+ // Enter键【关闭机器弹窗】
|
|
|
+ JtbhVisible.value = false;
|
|
|
+ }
|
|
|
+};
|
|
|
+const setCurrentsb = (row) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ tablesb.value?.setCurrentRow(row);
|
|
|
+ const { sczl_jtbh } = row;
|
|
|
+ formData.value.sczl_jtbh = row.jtbh;
|
|
|
+ });
|
|
|
+};
|
|
|
//机台失去焦点事件
|
|
|
const getJtbhsubmit = () => {
|
|
|
- if (BzVisible.value) {
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if (BzVisible.value) {return false;}
|
|
|
//弹出选择
|
|
|
reportGetJtbh({
|
|
|
sczl_type: formData.value.sczl_type,
|
|
|
@@ -1998,27 +2034,12 @@ const getJtbhsubmit = () => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-//机台选择
|
|
|
-const selectDataJtbh = reactive([]);
|
|
|
-const JtbhVisible = ref(false);
|
|
|
-const SelectClickJtbh = (row, column, event) => {
|
|
|
- const { jtbh, 设备编号 } = row;
|
|
|
-
|
|
|
- formData.value.sczl_jtbh = row.jtbh;
|
|
|
-
|
|
|
- JtbhVisible.value = false;
|
|
|
-};
|
|
|
-
|
|
|
-//班组失去焦点事件
|
|
|
+//==============班组弹窗============
|
|
|
const getBzsubmit = () => {
|
|
|
- //弹出选择
|
|
|
+ //班组弹出选择
|
|
|
const data = [
|
|
|
- {
|
|
|
- sczl_bzdh: "A班",
|
|
|
- },
|
|
|
- {
|
|
|
- sczl_bzdh: "B班",
|
|
|
- },
|
|
|
+ {sczl_bzdh: "A班",},
|
|
|
+ {sczl_bzdh: "B班",},
|
|
|
];
|
|
|
selectDataBz.splice(0, selectDataBz.length, ...data);
|
|
|
if (!JtbhVisible.value) {
|
|
|
@@ -2026,31 +2047,25 @@ const getBzsubmit = () => {
|
|
|
setCurrent(selectDataBz[0]);
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
//班组选择
|
|
|
const selectDataBz = reactive([]);
|
|
|
const BzVisible = ref(false);
|
|
|
const SelectClickBz = (row, column, event) => {
|
|
|
const { sczl_bzdh } = row;
|
|
|
-
|
|
|
formData.value.sczl_bzdh = row.sczl_bzdh;
|
|
|
-
|
|
|
BzVisible.value = false;
|
|
|
};
|
|
|
const table2 = ref();
|
|
|
const setCurrent = (row) => {
|
|
|
setTimeout(() => {
|
|
|
table2.value?.setCurrentRow(row);
|
|
|
- // SelectClick(row)
|
|
|
- // console.log(row)
|
|
|
- // console.log(table)
|
|
|
const { sczl_bzdh } = row;
|
|
|
formData.value.sczl_bzdh = row.sczl_bzdh;
|
|
|
console.log(row);
|
|
|
});
|
|
|
};
|
|
|
+// 班组弹窗
|
|
|
const selectBZ = (event) => {
|
|
|
- // console.log(selectDataBz.length);
|
|
|
if (event.keyCode === 40) {
|
|
|
// Enter 或向下箭头
|
|
|
setCurrent(selectDataBz[1]);
|