|
@@ -2,14 +2,14 @@
|
|
|
<div>
|
|
<div>
|
|
|
<!-- 左侧树形结构 -->
|
|
<!-- 左侧树形结构 -->
|
|
|
<el-container>
|
|
<el-container>
|
|
|
- <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px">
|
|
|
|
|
|
|
+ <layout-sider :resize-directions="['right']" :width="220">
|
|
|
<div class="JKWTree-tree" style="height: 70vh;width:100vh" >
|
|
<div class="JKWTree-tree" style="height: 70vh;width:100vh" >
|
|
|
<h3>机台生产日报表维护</h3>
|
|
<h3>机台生产日报表维护</h3>
|
|
|
<el-tree :data="treeData" highlight-current @node-click="handleNodeClick"/>
|
|
<el-tree :data="treeData" highlight-current @node-click="handleNodeClick"/>
|
|
|
</div>
|
|
</div>
|
|
|
</layout-sider>
|
|
</layout-sider>
|
|
|
|
|
|
|
|
- <el-container>
|
|
|
|
|
|
|
+ <!-- <el-container> -->
|
|
|
<el-main>
|
|
<el-main>
|
|
|
<!-- 按钮区域 -->
|
|
<!-- 按钮区域 -->
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
@@ -304,7 +304,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 弹出框 -->
|
|
<!-- 弹出框 -->
|
|
|
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type === 'create' ? '新增' : '修改'" destroy-on-close width="1200px" >
|
|
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type === 'create' ? '新增' : '修改'" destroy-on-close 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-row :gutter="24">
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
@@ -874,10 +873,18 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
- <div class="dialog-footer">
|
|
|
|
|
- <el-button @click="closeDialog">取 消</el-button>
|
|
|
|
|
- <el-button type="primary" @click="enterDialog" :disabled="!clickedlist">确 定</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <!-- 动态显示新增的提示信息 -->
|
|
|
|
|
+ <template v-if="addvalue >= 1">
|
|
|
|
|
+ <span style="color: red; font-size: 18px; margin-right: 20px;">
|
|
|
|
|
+ 当前成功新增第{{ addvalue }}张(关闭弹窗后重第一张开始)
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 按钮区域 -->
|
|
|
|
|
+ <el-button @click="closeDialog">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="enterDialog" :disabled="!clickedlist">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
@@ -903,30 +910,6 @@
|
|
|
<el-table-column prop="ygxm" label="员工姓名" width="200" />
|
|
<el-table-column prop="ygxm" label="员工姓名" width="200" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
-<!--
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- v-model="GetDedhVisible"
|
|
|
|
|
- title="选择"
|
|
|
|
|
- destroy-on-close
|
|
|
|
|
- width="600px"
|
|
|
|
|
- id="tableFplb"
|
|
|
|
|
- @keydown="ent($event)"
|
|
|
|
|
- @open="handleDialogOpen"
|
|
|
|
|
- >
|
|
|
|
|
- <el-aside width="250px">
|
|
|
|
|
- <div class="JKWTree-tree">
|
|
|
|
|
- <el-tree
|
|
|
|
|
- ref="treeRef"
|
|
|
|
|
- :data="GetDedhtreeData"
|
|
|
|
|
- :props="defaultProps"
|
|
|
|
|
- node-key="sys_bh"
|
|
|
|
|
- highlight-current="true"
|
|
|
|
|
- @node-click="GetDedhhandleNodeClick"
|
|
|
|
|
- @node-dblclick="handleNodeDoubleClick"
|
|
|
|
|
- ></el-tree>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-aside>
|
|
|
|
|
- </el-dialog> -->
|
|
|
|
|
|
|
|
|
|
<el-dialog v-model="GetDedhVisible" id="tableFplb" @keydown="ent($event)" style="margin-top: 5%;" >
|
|
<el-dialog v-model="GetDedhVisible" id="tableFplb" @keydown="ent($event)" style="margin-top: 5%;" >
|
|
|
<el-form>
|
|
<el-form>
|
|
@@ -1027,11 +1010,23 @@
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
</el-main>
|
|
</el-main>
|
|
|
- </el-container>
|
|
|
|
|
|
|
+ <!-- </el-container> -->
|
|
|
</el-container>
|
|
</el-container>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
|
|
+<script>
|
|
|
|
|
+//点击按钮显示下方表格
|
|
|
|
|
+export default {
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ addvalue: '',
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import {
|
|
import {
|
|
|
getproductionCount,
|
|
getproductionCount,
|
|
@@ -1344,34 +1339,12 @@ const handleCurrentChange = (val) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
//定位
|
|
//定位
|
|
|
-// const GetLocate = async () => {
|
|
|
|
|
-// const response = await productionlocate({
|
|
|
|
|
-// gdbh: params.gdbh,
|
|
|
|
|
-// page: page.value.toString(), limit: limit.value.toString(),
|
|
|
|
|
-// })
|
|
|
|
|
-// if (response.code === 0) {
|
|
|
|
|
-// console.log(response)
|
|
|
|
|
-// const processedData = response.data.rows.map(item => {
|
|
|
|
|
-// return {
|
|
|
|
|
-// ...item,
|
|
|
|
|
-// combinedProp: item.sczl_gdbh + '--'+item.yj_yjmc,
|
|
|
|
|
-// combinedProp2: item.sczl_yjgx + '-'+item.sczl_gxmc
|
|
|
|
|
-// };
|
|
|
|
|
-// });
|
|
|
|
|
-// total.value = response.data.total
|
|
|
|
|
-// tableData.splice(0, tableData.length, ...processedData);
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
const GetLocate = async () => {
|
|
const GetLocate = async () => {
|
|
|
- console.log(params.gdbh);
|
|
|
|
|
- console.log(page.value.toString());
|
|
|
|
|
- console.log(limit.value.toString());
|
|
|
|
|
const response = await productionlocate({
|
|
const response = await productionlocate({
|
|
|
gdbh: params.gdbh,
|
|
gdbh: params.gdbh,
|
|
|
page: page.value.toString(),
|
|
page: page.value.toString(),
|
|
|
limit: limit.value.toString(),
|
|
limit: limit.value.toString(),
|
|
|
});
|
|
});
|
|
|
- console.log(response);
|
|
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
const processedData = response.data.rows.map((item) => {
|
|
const processedData = response.data.rows.map((item) => {
|
|
|
return {
|
|
return {
|
|
@@ -1381,7 +1354,6 @@ const GetLocate = async () => {
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
total.value = parseInt(response.data.total);
|
|
total.value = parseInt(response.data.total);
|
|
|
- // limit.value=response.data.total
|
|
|
|
|
tableData.splice(0, tableData.length, ...processedData);
|
|
tableData.splice(0, tableData.length, ...processedData);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -1396,7 +1368,6 @@ const getTableData = async () => {
|
|
|
});
|
|
});
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
tableData.splice(0, tableData.length, ...response.data.rows);
|
|
tableData.splice(0, tableData.length, ...response.data.rows);
|
|
|
- console.log(tableData);
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -1416,33 +1387,22 @@ const handleNodeClick = (node, check) => {
|
|
|
const ent1 = (event,id,id2) => {
|
|
const ent1 = (event,id,id2) => {
|
|
|
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);
|
|
|
- // console.log(inputs)
|
|
|
|
|
if(event.keyCode === 13 && id ==='工单编号'){
|
|
if(event.keyCode === 13 && id ==='工单编号'){
|
|
|
- //调用印件号选择方法
|
|
|
|
|
getCPMCsubmit()
|
|
getCPMCsubmit()
|
|
|
}
|
|
}
|
|
|
if(event.keyCode === 13 && id ==='印件号'){
|
|
if(event.keyCode === 13 && id ==='印件号'){
|
|
|
- console.log("回车印件号")
|
|
|
|
|
- //调用印件号选择方法
|
|
|
|
|
getYJMCsubmit()
|
|
getYJMCsubmit()
|
|
|
}
|
|
}
|
|
|
if(event.keyCode === 13 && id ==='工序名称'){
|
|
if(event.keyCode === 13 && id ==='工序名称'){
|
|
|
- console.log(formData.value.sczl_gxmc)
|
|
|
|
|
- //调用工序选择方法
|
|
|
|
|
getGXsubmit()
|
|
getGXsubmit()
|
|
|
}
|
|
}
|
|
|
if(event.keyCode === 13 && id ==='组别'){
|
|
if(event.keyCode === 13 && id ==='组别'){
|
|
|
- console.log("回车组别")
|
|
|
|
|
- //调用工序选择方法
|
|
|
|
|
getBzsubmit()
|
|
getBzsubmit()
|
|
|
}
|
|
}
|
|
|
if(event.keyCode === 13 && id ==='机器'){
|
|
if(event.keyCode === 13 && id ==='机器'){
|
|
|
- console.log("回车机器")
|
|
|
|
|
- //调用工序选择方法
|
|
|
|
|
getJtbhsubmit()
|
|
getJtbhsubmit()
|
|
|
}
|
|
}
|
|
|
if(event.keyCode === 13 && id2 ==='定额代号'){
|
|
if(event.keyCode === 13 && id2 ==='定额代号'){
|
|
|
- console.log("定额代号")
|
|
|
|
|
if(formData.value.sczl_gxmc.includes('拆片')){
|
|
if(formData.value.sczl_gxmc.includes('拆片')){
|
|
|
formData.value.sczl_dedh = "030001001"
|
|
formData.value.sczl_dedh = "030001001"
|
|
|
}else{
|
|
}else{
|
|
@@ -1567,7 +1527,6 @@ const currentIndex = ref(0);
|
|
|
// 工序名称选择
|
|
// 工序名称选择
|
|
|
const currentIndexgx = ref(0);
|
|
const currentIndexgx = ref(0);
|
|
|
const selectGxmc = (event) => {
|
|
const selectGxmc = (event) => {
|
|
|
- console.log(event)
|
|
|
|
|
if (event.keyCode === 40) {
|
|
if (event.keyCode === 40) {
|
|
|
// 向下箭头
|
|
// 向下箭头
|
|
|
currentIndexgx.value = (currentIndexgx.value + 1) % selectData.length;
|
|
currentIndexgx.value = (currentIndexgx.value + 1) % selectData.length;
|
|
@@ -1583,8 +1542,6 @@ const selectGxmc = (event) => {
|
|
|
}
|
|
}
|
|
|
const tablesczl_gxmc = ref();
|
|
const tablesczl_gxmc = ref();
|
|
|
const setCurrentgxmc = (row) => {
|
|
const setCurrentgxmc = (row) => {
|
|
|
- console.log(row)
|
|
|
|
|
- console.log(123)
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
tablesczl_gxmc.value?.setCurrentRow(row);
|
|
tablesczl_gxmc.value?.setCurrentRow(row);
|
|
|
const { sczl_gxmc } = row;
|
|
const { sczl_gxmc } = row;
|
|
@@ -1592,8 +1549,6 @@ const setCurrentgxmc = (row) => {
|
|
|
formData.value.sczl_gxmc = row.sczl_gxmc;
|
|
formData.value.sczl_gxmc = row.sczl_gxmc;
|
|
|
formData.value.sczl_gxh = row.sczl_gxh;
|
|
formData.value.sczl_gxh = row.sczl_gxh;
|
|
|
formData.value.sczl_ls = row.sczl_ls;
|
|
formData.value.sczl_ls = row.sczl_ls;
|
|
|
- // console.log(row);
|
|
|
|
|
- // YjhVisible.value = false;
|
|
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -1616,8 +1571,6 @@ const selectYjh = (event) => {
|
|
|
yjno: formData.value.sczl_yjno,
|
|
yjno: formData.value.sczl_yjno,
|
|
|
}).then((response) => {
|
|
}).then((response) => {
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
- console.log(response)
|
|
|
|
|
- console.log(666)
|
|
|
|
|
formData.value.yj_yjmc = response.data.yj_yjmc;
|
|
formData.value.yj_yjmc = response.data.yj_yjmc;
|
|
|
formData.value.sczl_ls = response.data.gxmc.sczl_ls;
|
|
formData.value.sczl_ls = response.data.gxmc.sczl_ls;
|
|
|
formData.value.拆片联拼系数 = response.data.gxmc.拆片联拼系数;
|
|
formData.value.拆片联拼系数 = response.data.gxmc.拆片联拼系数;
|
|
@@ -1658,18 +1611,13 @@ const tablesczl_yjno = ref();
|
|
|
const setCurrents = (row) => {
|
|
const setCurrents = (row) => {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
tablesczl_yjno.value?.setCurrentRow(row);
|
|
tablesczl_yjno.value?.setCurrentRow(row);
|
|
|
- // SelectClick(row)
|
|
|
|
|
- // console.log(row)
|
|
|
|
|
- // console.log(table)
|
|
|
|
|
const { yjno } = row;
|
|
const { yjno } = row;
|
|
|
formData.value.sczl_yjno = row.yjno;
|
|
formData.value.sczl_yjno = row.yjno;
|
|
|
- console.log(row);
|
|
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
//印件号选择
|
|
//印件号选择
|
|
|
const SelectClickYjh = (row, column, event) => {
|
|
const SelectClickYjh = (row, column, event) => {
|
|
|
const { sczl_yjno } = row;
|
|
const { sczl_yjno } = row;
|
|
|
- console.log(row)
|
|
|
|
|
formData.value.sczl_yjno = row.yjno;
|
|
formData.value.sczl_yjno = row.yjno;
|
|
|
YjhVisible.value = false;
|
|
YjhVisible.value = false;
|
|
|
};
|
|
};
|
|
@@ -1679,7 +1627,6 @@ const SelectClickYjh = (row, column, event) => {
|
|
|
const getYJMCsubmit = async () => {
|
|
const getYJMCsubmit = async () => {
|
|
|
if (formData.value.sczl_gdbh != "") {
|
|
if (formData.value.sczl_gdbh != "") {
|
|
|
const response = await productionGdmc({gdbh:formData.value.sczl_gdbh})
|
|
const response = await productionGdmc({gdbh:formData.value.sczl_gdbh})
|
|
|
- console.log(response)
|
|
|
|
|
YjhVisible.value = true;
|
|
YjhVisible.value = true;
|
|
|
// 将数组转换为对象数组
|
|
// 将数组转换为对象数组
|
|
|
const formattedData = response.data.yjno.map(item => ({ yjno: item }));
|
|
const formattedData = response.data.yjno.map(item => ({ yjno: item }));
|
|
@@ -1692,23 +1639,15 @@ const getYJMCsubmit = async () => {
|
|
|
yjno: formData.value.sczl_yjno,
|
|
yjno: formData.value.sczl_yjno,
|
|
|
}).then((response) => {
|
|
}).then((response) => {
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
- console.log(response.data.gxmc.拆片条小盒系数)
|
|
|
|
|
formData.value.yj_yjmc = response.data.yj_yjmc;
|
|
formData.value.yj_yjmc = response.data.yj_yjmc;
|
|
|
- // gxmc.value = response.data.gxmc;
|
|
|
|
|
- // formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
|
|
setColorReadonly("印件名称");
|
|
setColorReadonly("印件名称");
|
|
|
} else {
|
|
} else {
|
|
|
- // ElMessage({ type: "error", message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",});
|
|
|
|
|
formData.value.sczl_yjno = yjnoArr.value[0];
|
|
formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
formData.value.yj_yjmc = "";
|
|
formData.value.yj_yjmc = "";
|
|
|
gxmc.value = "";
|
|
gxmc.value = "";
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- // ElMessage({
|
|
|
|
|
- // type: "error",
|
|
|
|
|
- // message: "印件编号不存在, 将恢复默认值, 请仔细确认数据准确性!",
|
|
|
|
|
- // });
|
|
|
|
|
formData.value.sczl_yjno = yjnoArr.value[0];
|
|
formData.value.sczl_yjno = yjnoArr.value[0];
|
|
|
formData.value.yj_yjmc = "";
|
|
formData.value.yj_yjmc = "";
|
|
|
formData.value.sczl_yjno = "";
|
|
formData.value.sczl_yjno = "";
|
|
@@ -1720,17 +1659,7 @@ const getYJMCsubmit = async () => {
|
|
|
const gxmc = ref("");
|
|
const gxmc = ref("");
|
|
|
const showFormItems = ref(true);
|
|
const showFormItems = ref(true);
|
|
|
const tableRef = ref();
|
|
const tableRef = ref();
|
|
|
-
|
|
|
|
|
-//工序数组
|
|
|
|
|
const gxArr = ref({});
|
|
const gxArr = ref({});
|
|
|
-//工序名称获得焦点事件
|
|
|
|
|
-// const gxmcHandleFocus = () => {
|
|
|
|
|
-// if (gxmc.value != "") {
|
|
|
|
|
-// formData.value.sczl_gxmc = gxmc.value.sczl_gxmc;
|
|
|
|
|
-// } else {
|
|
|
|
|
-// formData.value.sczl_gxmc = "";
|
|
|
|
|
-// }
|
|
|
|
|
-// };
|
|
|
|
|
|
|
|
|
|
//工序失去焦点事件
|
|
//工序失去焦点事件
|
|
|
const getGXsubmit = () => {
|
|
const getGXsubmit = () => {
|
|
@@ -1759,12 +1688,6 @@ const getGXsubmit = () => {
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
selectData.splice(0, selectData.length, ...response.data);
|
|
selectData.splice(0, selectData.length, ...response.data);
|
|
|
GXVisible.value = true;
|
|
GXVisible.value = true;
|
|
|
- // nextTick(()=>{
|
|
|
|
|
- // console.log(tableRef)
|
|
|
|
|
- // console.log(selectData)
|
|
|
|
|
- // tableRef.value.setCurrentRow(selectData[0]);
|
|
|
|
|
- // tableRef.value.focus();
|
|
|
|
|
- // });
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -1774,7 +1697,6 @@ const getGXsubmit = () => {
|
|
|
formData.value.sczl_type = gxmc.value.sczl_type;
|
|
formData.value.sczl_type = gxmc.value.sczl_type;
|
|
|
formData.value.sczl_ls = gxmc.value.sczl_ls;
|
|
formData.value.sczl_ls = gxmc.value.sczl_ls;
|
|
|
formData.value.sczl_jtbh = "";
|
|
formData.value.sczl_jtbh = "";
|
|
|
-
|
|
|
|
|
formData.value.sczl_zcfp = 0;
|
|
formData.value.sczl_zcfp = 0;
|
|
|
formData.value.sczl_装版总工时 = 0;
|
|
formData.value.sczl_装版总工时 = 0;
|
|
|
formData.value.sczl_装版工时 = 0;
|
|
formData.value.sczl_装版工时 = 0;
|
|
@@ -1803,12 +1725,6 @@ const getGXsubmit = () => {
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
selectData.splice(0, selectData.length, ...response.data);
|
|
selectData.splice(0, selectData.length, ...response.data);
|
|
|
GXVisible.value = true;
|
|
GXVisible.value = true;
|
|
|
- // nextTick(()=>{
|
|
|
|
|
- // console.log(tableRef)
|
|
|
|
|
- // console.log(selectData)
|
|
|
|
|
- // tableRef.value.setCurrentRow(selectData[0]);
|
|
|
|
|
- // tableRef.value.focus();
|
|
|
|
|
- // });
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -1961,7 +1877,6 @@ const setCurrent = (row) => {
|
|
|
table2.value?.setCurrentRow(row);
|
|
table2.value?.setCurrentRow(row);
|
|
|
const { sczl_bzdh } = row;
|
|
const { sczl_bzdh } = row;
|
|
|
formData.value.sczl_bzdh = row.sczl_bzdh;
|
|
formData.value.sczl_bzdh = row.sczl_bzdh;
|
|
|
- console.log(row);
|
|
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
// 班组弹窗
|
|
// 班组弹窗
|
|
@@ -1997,12 +1912,10 @@ const getDedhsubmit = async () => {
|
|
|
const response = await productionDedh({
|
|
const response = await productionDedh({
|
|
|
sczl_jtbh: formData.value.sczl_jtbh,
|
|
sczl_jtbh: formData.value.sczl_jtbh,
|
|
|
});
|
|
});
|
|
|
- console.log(response);
|
|
|
|
|
|
|
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
if (formData.value.sczl_jtbh === "") {
|
|
if (formData.value.sczl_jtbh === "") {
|
|
|
const data = [response.data];
|
|
const data = [response.data];
|
|
|
- console.log("设备编号", response.data.sys_bh);
|
|
|
|
|
|
|
|
|
|
const buildTree = (node) => {
|
|
const buildTree = (node) => {
|
|
|
const treeNode = {
|
|
const treeNode = {
|
|
@@ -2017,16 +1930,13 @@ const getDedhsubmit = async () => {
|
|
|
treeNode.children.push(buildTree(childNode));
|
|
treeNode.children.push(buildTree(childNode));
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return treeNode;
|
|
return treeNode;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 更新树形数据
|
|
// 更新树形数据
|
|
|
GetDedhtreeData.splice(0, GetDedhtreeData.length, ...data.map(buildTree));
|
|
GetDedhtreeData.splice(0, GetDedhtreeData.length, ...data.map(buildTree));
|
|
|
-
|
|
|
|
|
// 显示树形选择框
|
|
// 显示树形选择框
|
|
|
GetDedhVisible.value = true;
|
|
GetDedhVisible.value = true;
|
|
|
-
|
|
|
|
|
// 使用 nextTick 确保树形组件渲染完成
|
|
// 使用 nextTick 确保树形组件渲染完成
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
const tree = table_fplb.value;
|
|
const tree = table_fplb.value;
|
|
@@ -2091,7 +2001,6 @@ const handleTreeKeydown = (event) => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- console.log("当前子节点:", currentNode.label);
|
|
|
|
|
// 如果节点没有子节点,打印节点名称
|
|
// 如果节点没有子节点,打印节点名称
|
|
|
formData.value.sczl_dedh = currentNode.label.split("【")[0];
|
|
formData.value.sczl_dedh = currentNode.label.split("【")[0];
|
|
|
GetDedhVisible.value = false;
|
|
GetDedhVisible.value = false;
|
|
@@ -2122,10 +2031,8 @@ const ent = (event) => {
|
|
|
if (document.activeElement.id === "tableFplb") {
|
|
if (document.activeElement.id === "tableFplb") {
|
|
|
if (table_fplb.value) {
|
|
if (table_fplb.value) {
|
|
|
const tree = table_fplb.value?.$el;
|
|
const tree = table_fplb.value?.$el;
|
|
|
- console.log(111, tree);
|
|
|
|
|
if (tree) {
|
|
if (tree) {
|
|
|
const node = tree.querySelector("[data-key]");
|
|
const node = tree.querySelector("[data-key]");
|
|
|
- console.log(222, node);
|
|
|
|
|
if (event.keyCode === 13) {
|
|
if (event.keyCode === 13) {
|
|
|
// GetDedhVisible.value = false;
|
|
// GetDedhVisible.value = false;
|
|
|
}
|
|
}
|
|
@@ -2497,12 +2404,12 @@ function onSearch() {
|
|
|
params.gdbh = positionvalue.value;
|
|
params.gdbh = positionvalue.value;
|
|
|
params.type = "getLocateTable";
|
|
params.type = "getLocateTable";
|
|
|
page.value = 1;
|
|
page.value = 1;
|
|
|
- console.log("123");
|
|
|
|
|
GetLocate();
|
|
GetLocate();
|
|
|
}
|
|
}
|
|
|
const ADD = ref("0");
|
|
const ADD = ref("0");
|
|
|
|
|
+const addvalue = ref(null);
|
|
|
/*
|
|
/*
|
|
|
- 新增
|
|
|
|
|
|
|
+ 新增按钮
|
|
|
*/
|
|
*/
|
|
|
function onAdd() {
|
|
function onAdd() {
|
|
|
//进入新增页面光标自动聚焦
|
|
//进入新增页面光标自动聚焦
|
|
@@ -2521,6 +2428,7 @@ function onAdd() {
|
|
|
}
|
|
}
|
|
|
initFormData();
|
|
initFormData();
|
|
|
dialogFormVisible.value = true;
|
|
dialogFormVisible.value = true;
|
|
|
|
|
+ addvalue.value = 0
|
|
|
} else {
|
|
} else {
|
|
|
dialogFormVisible.value = true;
|
|
dialogFormVisible.value = true;
|
|
|
}
|
|
}
|
|
@@ -2598,7 +2506,6 @@ const CountByGdbh = async () => {
|
|
|
const response = await productionByGdbh();
|
|
const response = await productionByGdbh();
|
|
|
|
|
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
- // console.log(displayMod.value)
|
|
|
|
|
treeData.splice(0, treeData.length);
|
|
treeData.splice(0, treeData.length);
|
|
|
// 遍历接口返回的数据
|
|
// 遍历接口返回的数据
|
|
|
response.data.forEach((item) => {
|
|
response.data.forEach((item) => {
|
|
@@ -2627,24 +2534,8 @@ const CountByGdbh = async () => {
|
|
|
treeData[item.sczl_gdbh].children.push(childNode);
|
|
treeData[item.sczl_gdbh].children.push(childNode);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- // console.log(treeData)
|
|
|
|
|
- // // // 打印树形结构
|
|
|
|
|
- // console.log(JSON.stringify(tree, null, 2));
|
|
|
|
|
-
|
|
|
|
|
- // // 将父子关系转换为数组
|
|
|
|
|
- // const transformedData = Object.values(tree);
|
|
|
|
|
- // console.log(transformedData);
|
|
|
|
|
- // treeData = transformedData;
|
|
|
|
|
}
|
|
}
|
|
|
- // // 将父子关系转换为数组
|
|
|
|
|
- // const transformedData = Object.values(tree);
|
|
|
|
|
- // console.log(transformedData)
|
|
|
|
|
- // treeData = transformedData;
|
|
|
|
|
-
|
|
|
|
|
- // getTableData()
|
|
|
|
|
};
|
|
};
|
|
|
-// ============== 表格控制部分结束 ===============
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
//=========工序产量核查===========
|
|
//=========工序产量核查===========
|
|
|
const gd_gxclhclist = ref(false);
|
|
const gd_gxclhclist = ref(false);
|
|
@@ -2689,7 +2580,6 @@ const gd_gxclhconClick = async () => {
|
|
|
gxclhcformData['yjno'] = 1;
|
|
gxclhcformData['yjno'] = 1;
|
|
|
gd_gxclhclist.value = true;
|
|
gd_gxclhclist.value = true;
|
|
|
const response = await PrintDetailList ({workOrder:_Gd_gdbh.value});
|
|
const response = await PrintDetailList ({workOrder:_Gd_gdbh.value});
|
|
|
- console.log(response)
|
|
|
|
|
gdwhformData.yjno = response.data[0].no
|
|
gdwhformData.yjno = response.data[0].no
|
|
|
inputCpmc.value = response.data[0].name
|
|
inputCpmc.value = response.data[0].name
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
@@ -2733,10 +2623,7 @@ const _PrintDetailList = async () => {
|
|
|
const response = await PrintDetailList ({workOrder:order});
|
|
const response = await PrintDetailList ({workOrder:order});
|
|
|
const matchingItem = response.data.find(item => item.no === gdwhformData.yjno);
|
|
const matchingItem = response.data.find(item => item.no === gdwhformData.yjno);
|
|
|
if (matchingItem) {
|
|
if (matchingItem) {
|
|
|
- console.log(matchingItem.name)
|
|
|
|
|
inputCpmc.value = matchingItem.name;
|
|
inputCpmc.value = matchingItem.name;
|
|
|
- } else {
|
|
|
|
|
- console.log(`No matching item found for no: ${gdwhformData.yjno}`);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2788,20 +2675,11 @@ setOptions();
|
|
|
const multipleSelection = ref([]);
|
|
const multipleSelection = ref([]);
|
|
|
// 多选
|
|
// 多选
|
|
|
const handleSelectionChange = (val) => {
|
|
const handleSelectionChange = (val) => {
|
|
|
- // multipleSelection.value = val
|
|
|
|
|
if (val.length > 0) {
|
|
if (val.length > 0) {
|
|
|
- // multipleSelection.value = val
|
|
|
|
|
const lenth = val.length;
|
|
const lenth = val.length;
|
|
|
- // ScrapFactor.gdbh=val[lenth-1].combinedProp.split('-')[0];
|
|
|
|
|
- // const parts = val[lenth-1].combinedProp2.split('-')
|
|
|
|
|
- // ScrapFactor.yjno=parts[0];
|
|
|
|
|
- // ScrapFactor.gxh=parts[1];
|
|
|
|
|
- // ScrapFactor.type=val[lenth-1].sczl_检验类别
|
|
|
|
|
- // console.log(ScrapFactor)
|
|
|
|
|
lastCellValue = val[lenth - 1].UniqId;
|
|
lastCellValue = val[lenth - 1].UniqId;
|
|
|
- // console.log(val)
|
|
|
|
|
- val.splice(0, val.length); // 清空 val 数组
|
|
|
|
|
- console.log(lastCellValue);
|
|
|
|
|
|
|
+ // 清空 val 数组
|
|
|
|
|
+ val.splice(0, val.length);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -2838,29 +2716,27 @@ const onDelete = async () => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// 行为控制标记(弹窗内部需要增还是改)
|
|
|
|
|
-// const type = ref('')
|
|
|
|
|
|
|
|
|
|
// 更新行
|
|
// 更新行
|
|
|
-const updateCompanyFunc = async (row) => {
|
|
|
|
|
- const res = await findCompany({
|
|
|
|
|
- ID: row.ID,
|
|
|
|
|
- });
|
|
|
|
|
- type.value = "update";
|
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
- formData.value = res.data.recompany;
|
|
|
|
|
- dialogFormVisible.value = true;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
+// const updateCompanyFunc = async (row) => {
|
|
|
|
|
+// const res = await findCompany({
|
|
|
|
|
+// ID: row.ID,
|
|
|
|
|
+// });
|
|
|
|
|
+// type.value = "update";
|
|
|
|
|
+// if (res.code === 0) {
|
|
|
|
|
+// formData.value = res.data.recompany;
|
|
|
|
|
+// dialogFormVisible.value = true;
|
|
|
|
|
+// }
|
|
|
|
|
+// };
|
|
|
|
|
|
|
|
// 弹窗控制标记
|
|
// 弹窗控制标记
|
|
|
const dialogFormVisible = ref(false);
|
|
const dialogFormVisible = ref(false);
|
|
|
|
|
|
|
|
// 打开弹窗
|
|
// 打开弹窗
|
|
|
-const openDialog = () => {
|
|
|
|
|
- type.value = "create";
|
|
|
|
|
- dialogFormVisible.value = true;
|
|
|
|
|
-};
|
|
|
|
|
|
|
+// const openDialog = () => {
|
|
|
|
|
+// type.value = "create";
|
|
|
|
|
+// dialogFormVisible.value = true;
|
|
|
|
|
+// };
|
|
|
|
|
|
|
|
// 关闭弹窗
|
|
// 关闭弹窗
|
|
|
const closeDialog = () => {
|
|
const closeDialog = () => {
|
|
@@ -2877,8 +2753,6 @@ function updateTotal() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
//默认启用按钮可点击
|
|
//默认启用按钮可点击
|
|
|
const clickedlist = ref(true);
|
|
const clickedlist = ref(true);
|
|
|
//存储定时器时间
|
|
//存储定时器时间
|
|
@@ -2902,8 +2776,6 @@ const enterDialog = async () => {
|
|
|
clickTimer = null;
|
|
clickTimer = null;
|
|
|
}, 3000);
|
|
}, 3000);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
//弹窗提示确认
|
|
//弹窗提示确认
|
|
|
ElMessageBox.confirm("数据存盘?", "提示", {
|
|
ElMessageBox.confirm("数据存盘?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
@@ -2975,32 +2847,6 @@ const enterDialog = async () => {
|
|
|
}
|
|
}
|
|
|
updateDetailData();
|
|
updateDetailData();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
- // elFormRef.value?.validate(async (valid) => {
|
|
|
|
|
- // if (!valid) return
|
|
|
|
|
-
|
|
|
|
|
- // let res
|
|
|
|
|
- // switch (type.value) {
|
|
|
|
|
- // case 'create':
|
|
|
|
|
- // res = await createCompany(formData.value)
|
|
|
|
|
- // break
|
|
|
|
|
- // case 'update':
|
|
|
|
|
- // res = await updateCompany(formData.value)
|
|
|
|
|
- // break
|
|
|
|
|
- // default:
|
|
|
|
|
- // res = await createCompany(formData.value)
|
|
|
|
|
- // break
|
|
|
|
|
- // }
|
|
|
|
|
- // if (res.code === 0) {
|
|
|
|
|
- // ElMessage({
|
|
|
|
|
- // type: 'success',
|
|
|
|
|
- // message: '创建/更改成功'
|
|
|
|
|
- // })
|
|
|
|
|
- // closeDialog()
|
|
|
|
|
- // getTableData()
|
|
|
|
|
- // }
|
|
|
|
|
- // updateDetailData()
|
|
|
|
|
- // })
|
|
|
|
|
};
|
|
};
|
|
|
// 更新数据
|
|
// 更新数据
|
|
|
const updateDetailData = async () => {
|
|
const updateDetailData = async () => {
|
|
@@ -3055,34 +2901,20 @@ const updateDetailData = async () => {
|
|
|
sys_id: sys_id,
|
|
sys_id: sys_id,
|
|
|
};
|
|
};
|
|
|
updateTotal()
|
|
updateTotal()
|
|
|
- console.log(11123,fpsum.value)
|
|
|
|
|
if(fpsum.value > 1){
|
|
if(fpsum.value > 1){
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: "error",
|
|
type: "error",
|
|
|
message: "分配系数相加不能大于1",
|
|
message: "分配系数相加不能大于1",
|
|
|
});
|
|
});
|
|
|
}else{
|
|
}else{
|
|
|
-// detailData.table.forEach((item, index, array) => {
|
|
|
|
|
- // const num = index + 1
|
|
|
|
|
- // restoredData[`sczl_gdbh${num}`] = item.sczl_gdbh
|
|
|
|
|
- // restoredData[`sczl_yjGx${num}`] = item.sczl_yjGx
|
|
|
|
|
- // restoredData[`sczl_gxmc${num}`] = item.sczl_gxmc
|
|
|
|
|
- // // restoredData[`Gd_cpmc${num}`] = item.Gd_cpmc
|
|
|
|
|
- // restoredData[`sczl_cl${num}`] = item.sczl_cl
|
|
|
|
|
- // restoredData[`sczl_PgCl${num}`] = item.sczl_PgCl
|
|
|
|
|
- // restoredData[`sczl_clAdd${num}`] = item.sczl_clAdd
|
|
|
|
|
- // })
|
|
|
|
|
if (ADD.value == "新增") {
|
|
if (ADD.value == "新增") {
|
|
|
- // console.log('新增')
|
|
|
|
|
const response = await productionadd(restoredData);
|
|
const response = await productionadd(restoredData);
|
|
|
- // ADD.value='1'
|
|
|
|
|
- // console.log(ADD.value)
|
|
|
|
|
- // ADD.value = "0";
|
|
|
|
|
if (response.code == 0) {
|
|
if (response.code == 0) {
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: "success",
|
|
type: "success",
|
|
|
message: "新增成功",
|
|
message: "新增成功",
|
|
|
});
|
|
});
|
|
|
|
|
+ addvalue.value = addvalue.value+1;
|
|
|
//刷新侧边栏
|
|
//刷新侧边栏
|
|
|
getTabdata();
|
|
getTabdata();
|
|
|
if (params.date != "") {
|
|
if (params.date != "") {
|
|
@@ -3099,22 +2931,11 @@ const updateDetailData = async () => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
dialogFormVisible.value = false;
|
|
dialogFormVisible.value = false;
|
|
|
- // ADD.value='0'
|
|
|
|
|
- // console.log(ADD.value)
|
|
|
|
|
}
|
|
}
|
|
|
- // formData.value = [];
|
|
|
|
|
formData.value.sczl_cl = 0 ;
|
|
formData.value.sczl_cl = 0 ;
|
|
|
document.getElementById('工单编号').focus()
|
|
document.getElementById('工单编号').focus()
|
|
|
document.getElementById('工单编号').select()
|
|
document.getElementById('工单编号').select()
|
|
|
- // console.log(restoredData)
|
|
|
|
|
- // console.log(lastCellValue)
|
|
|
|
|
- // formData.value.UniqId=lastCellValue
|
|
|
|
|
- // console.log(formData)
|
|
|
|
|
- // restoredData.UniqId='5'
|
|
|
|
|
-
|
|
|
|
|
- // console.log(FormData)
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
};
|
|
};
|
|
|
let table = ref(5);
|
|
let table = ref(5);
|
|
|
let lastCellValue = ref();
|
|
let lastCellValue = ref();
|
|
@@ -3129,16 +2950,14 @@ function doubleClick(row, column, event) {
|
|
|
inputElement.focus();
|
|
inputElement.focus();
|
|
|
}
|
|
}
|
|
|
}, 100);
|
|
}, 100);
|
|
|
-
|
|
|
|
|
|
|
+ addvalue.value = 0
|
|
|
type.value = "update";
|
|
type.value = "update";
|
|
|
lastCellValue = row["UniqId"];
|
|
lastCellValue = row["UniqId"];
|
|
|
table.value = lastCellValue;
|
|
table.value = lastCellValue;
|
|
|
if (row["table_type"] == "db_sczl") {
|
|
if (row["table_type"] == "db_sczl") {
|
|
|
- console.log(["table_type"]);
|
|
|
|
|
dialogFormVisible.value = true;
|
|
dialogFormVisible.value = true;
|
|
|
GetInfo(table.value);
|
|
GetInfo(table.value);
|
|
|
} else {
|
|
} else {
|
|
|
- // GetInfo(table.value)
|
|
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: "error",
|
|
type: "error",
|
|
|
message: "此工单不展示详细数据",
|
|
message: "此工单不展示详细数据",
|
|
@@ -3152,15 +2971,8 @@ const _Gd_gdbh = ref(null)
|
|
|
|
|
|
|
|
function Click(row, column, event) {
|
|
function Click(row, column, event) {
|
|
|
lastCellValue = row["UniqId"];
|
|
lastCellValue = row["UniqId"];
|
|
|
- console.log(lastCellValue);
|
|
|
|
|
_Gd_gdbh.value = row.sczl_gdbh;
|
|
_Gd_gdbh.value = row.sczl_gdbh;
|
|
|
table_type = row["table_type"];
|
|
table_type = row["table_type"];
|
|
|
- // if(row['table_type']=='db_sczl'){
|
|
|
|
|
- // dialogFormVisible.value = true
|
|
|
|
|
- // GetInfo(table.value)
|
|
|
|
|
- // }else{
|
|
|
|
|
- // console.log('此数据不展示详细信息')
|
|
|
|
|
- // }
|
|
|
|
|
}
|
|
}
|
|
|
//获取详细信息
|
|
//获取详细信息
|
|
|
const GetInfo = async (value) => {
|
|
const GetInfo = async (value) => {
|
|
@@ -3168,9 +2980,7 @@ const GetInfo = async (value) => {
|
|
|
UniqId: value,
|
|
UniqId: value,
|
|
|
});
|
|
});
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
- console.log(response);
|
|
|
|
|
formData.value = response.data;
|
|
formData.value = response.data;
|
|
|
- console.log(formData);
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -3218,28 +3028,6 @@ for (let R = range.s.r + 1; R <= range.e.r + 1; ++R) {
|
|
|
console.error('Error saving file:', e);
|
|
console.error('Error saving file:', e);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-// 导出excel
|
|
|
|
|
-// function exportExcel() {
|
|
|
|
|
-// Execelport()
|
|
|
|
|
-
|
|
|
|
|
-// // exportExcelFile(data);
|
|
|
|
|
-// }
|
|
|
|
|
-// const Execelport = async (value) => {
|
|
|
|
|
-// const response = await Export({
|
|
|
|
|
-// file_name: '111',
|
|
|
|
|
-// date: '2024-01-13',
|
|
|
|
|
-// sys_id: '[1002/郑小丽]',
|
|
|
|
|
-// fields: ['sczl_gdbh', 'Gd_cpmc', 'jyno_gxmc',
|
|
|
|
|
-// 'sczl_rq', 'sczl_jtbh', 'sczl_bzdh', 'sczl_num', 'sczl_cl', 'sczl_ms',
|
|
|
|
|
-// 'sczl_zcfp', 'sczl_zccp', 'sczl_来料异常', 'sczl_装版工时', 'sczl_保养工时', 'sczl_打样工时',
|
|
|
|
|
-// 'sczl_异常停机工时', 'sczl_设备运行工时', 'sczl_bh1', 'sczl_bh1_name', 'sczl_bh2', 'sczl_bh2_name',
|
|
|
|
|
-// 'sczl_bh3', 'sczl_bh3_name', 'sczl_bh4', 'sczl_bh4_name', 'sczl_bh5', 'sczl_bh5_name',
|
|
|
|
|
-// 'sczl_bh6', 'sczl_bh6_name',
|
|
|
|
|
-// '拆片联拼系数', '拆片条小盒系数', 'sczl_工价系数', '日定额', '千件工价', '补产标准'
|
|
|
|
|
-// ]
|
|
|
|
|
-// });
|
|
|
|
|
-// console.log(response)
|
|
|
|
|
-// }
|
|
|
|
|
|
|
|
|
|
// 生命周期钩子
|
|
// 生命周期钩子
|
|
|
onMounted(async () => {});
|
|
onMounted(async () => {});
|
|
@@ -3318,6 +3106,6 @@ onMounted(async () => {});
|
|
|
}
|
|
}
|
|
|
/* tree组件背景高亮 */
|
|
/* tree组件背景高亮 */
|
|
|
:deep(.el-tree-node:focus > .el-tree-node__content){
|
|
:deep(.el-tree-node:focus > .el-tree-node__content){
|
|
|
- background: #ff80ff !important;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ background: #ff80ff !important;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|