Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
748c15042c
11
changelog.md
11
changelog.md
|
|
@ -1,3 +1,14 @@
|
||||||
|
## 2.6.2025040316
|
||||||
|
|
||||||
|
- fix: 问题修复
|
||||||
|
- 出入库时物料选择更换组件xselect [shijing]
|
||||||
|
- 批次统计完善 [shijing]
|
||||||
|
- fix:性能检验析晶选型纠正 [shijing]
|
||||||
|
- dag优化 [shijing]
|
||||||
|
- 成品检验时批次选择实用xselect组件 [shijing]
|
||||||
|
- 登录页展示前后端版本号 [shijing]
|
||||||
|
- 扭转工段mlog中不填设备和人员;mlogb中选择设备、操作人、开始时间和结束时间 [shijing]
|
||||||
|
- 检验表中添加检验物料搜索时,展示full_name [shijing]
|
||||||
## 2.6.2025040209
|
## 2.6.2025040209
|
||||||
|
|
||||||
- feat: 新增功能
|
- feat: 新增功能
|
||||||
|
|
|
||||||
|
|
@ -440,8 +440,8 @@ export default {
|
||||||
},
|
},
|
||||||
copy:{
|
copy:{
|
||||||
name: "复制",
|
name: "复制",
|
||||||
req: async function (id,data) {
|
req: async function (data) {
|
||||||
return await http.post(`${config.API_URL}/mtm/routepack/${id}/copy/`,data)
|
return await http.post(`${config.API_URL}/mtm/routepack/copy/`,data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
togglestate:{
|
togglestate:{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
if(that.g!==null){
|
if(that.g!==null){
|
||||||
that.updataGraph();
|
that.updateGraph();
|
||||||
}else{
|
}else{
|
||||||
that.g = new dagreD3.graphlib.Graph().setGraph({
|
that.g = new dagreD3.graphlib.Graph().setGraph({
|
||||||
rankdir: that.rankdir,
|
rankdir: that.rankdir,
|
||||||
|
|
@ -104,7 +104,6 @@ export default {
|
||||||
let mySvgWdith =document.getElementsByClassName("output")[0].getBoundingClientRect().width+150 ;
|
let mySvgWdith =document.getElementsByClassName("output")[0].getBoundingClientRect().width+150 ;
|
||||||
document.getElementById('mySvg').setAttribute("height", mySvgHeight);
|
document.getElementById('mySvg').setAttribute("height", mySvgHeight);
|
||||||
document.getElementById('mySvg').setAttribute("width", mySvgWdith);
|
document.getElementById('mySvg').setAttribute("width", mySvgWdith);
|
||||||
|
|
||||||
svg.selectAll("g.node").on("click", function(event, d) {
|
svg.selectAll("g.node").on("click", function(event, d) {
|
||||||
// 改变节点的颜色
|
// 改变节点的颜色
|
||||||
const node = d3.select(this);
|
const node = d3.select(this);
|
||||||
|
|
@ -125,15 +124,17 @@ export default {
|
||||||
});
|
});
|
||||||
// 自定义方法:在节点点击时触发
|
// 自定义方法:在节点点击时触发
|
||||||
function onNodeClick(nodeData) {
|
function onNodeClick(nodeData) {
|
||||||
console.log("Node clicked:", nodeData);
|
let batch = "";
|
||||||
this.$emit("nodeClick", nodeData);
|
that.nodes.forEach((item) => {
|
||||||
|
if (item.id === nodeData){
|
||||||
|
batch = item.label;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
that.$emit("nodeClick", batch);
|
||||||
// 你可以在这里处理更多的逻辑,例如显示一个提示框,更新图形状态等
|
// 你可以在这里处理更多的逻辑,例如显示一个提示框,更新图形状态等
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
updataGraph(){
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 假设你有一个方法来更新节点和边的数据
|
// 假设你有一个方法来更新节点和边的数据
|
||||||
updateGraph() {
|
updateGraph() {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const DEFAULT_CONFIG = {
|
||||||
DASHBOARD_URL: "/dashboard",
|
DASHBOARD_URL: "/dashboard",
|
||||||
|
|
||||||
//版本号
|
//版本号
|
||||||
APP_VER: "2.6.2025040209",
|
APP_VER: "2.6.2025040813",
|
||||||
|
|
||||||
//内核版本号
|
//内核版本号
|
||||||
CORE_VER: "1.6.9",
|
CORE_VER: "1.6.9",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,202 @@
|
||||||
|
<template>
|
||||||
|
<div style="padding:0;width: 99%;height: 99%;border-radius: 0.375rem;margin: 0.5vh auto 0;box-shadow: 0 4px 6px -1px rgba(0, 0, 0 ,.1), 0 2px 4px -2px rgba(0, 0, 0 ,.1);">
|
||||||
|
<div style="width: 100%;height: 100%;position: relative; background: #fff;border-radius: 6px;">
|
||||||
|
<div style=" max-width: 260px;width: 260px;border-right: 1px solid rgb(229, 231, 235);box-sizing: border-box;height: 100%;position: absolute;left: 0;top: 0;">
|
||||||
|
<main style="display: flex;flex-direction: column;min-height: 0;flex:1 1 0%">
|
||||||
|
<el-button type="line" style="margin: 1rem;">新建聊天</el-button>
|
||||||
|
<div style="padding-bottom: 1rem;overflow: hidden;flex: 1 1 0%;min-height: 0px;">
|
||||||
|
<div style="overflow: hidden; position: relative;z-index: auto;height: 100%;width: 100%;padding: 0 1rem;"></div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer style="padding: 1rem;border-top: 1px solid rgb(229, 231, 235);">
|
||||||
|
<div style="align-items: center;display: flex;">
|
||||||
|
<img style="width: 2.5rem;height: 2.5rem;border-radius: 50%;flex-shrink: 0;" src="img/icon_nbyg.png" alt="">
|
||||||
|
<div style="font-weight: 700;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;flex: 1 1 0%;min-width: 0px;margin-left: 0.5rem;"> {{ userName }}</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<div style="padding-left: 260px;height: 100%;box-sizing: border-box;position: relative;z-index: auto;">
|
||||||
|
<el-container>
|
||||||
|
<el-main>
|
||||||
|
<div>
|
||||||
|
<div class="right_layout_myselfChat">
|
||||||
|
<div id="datatime" style="flex:2;font-size:13px;color:lightgray"></div>
|
||||||
|
<div style="flex:1">
|
||||||
|
<div class="user_icons" style="width:40px;height:40px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="myself_chat">
|
||||||
|
前端有哪些性能优化?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-main>
|
||||||
|
<el-footer style="padding: 1rem;height: 5rem;text-align: left;border-top: 1px solid rgb(229, 231, 235);">
|
||||||
|
<div style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
|
<div style="width: 100%;height:100%;padding: 0 0.5rem;">
|
||||||
|
<el-input class="search_input" placeholder="来说点什么吧..."></el-input>
|
||||||
|
</div>
|
||||||
|
<el-button icon="el-icon-promotion" size="success"></el-button>
|
||||||
|
</div>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <el-container>
|
||||||
|
<el-side style=" max-width: 260px;width: 260px;border-right: 1px solid #ddd;box-sizing: border-box;">
|
||||||
|
<div class="common-layout">
|
||||||
|
<el-container>
|
||||||
|
<el-header style="padding:0 6px 0 0;"></el-header>
|
||||||
|
<el-main style="padding:0 6px 0 0;">
|
||||||
|
<div style="display: flex;flex-direction: column;height: 100%;">
|
||||||
|
<el-button type="line" style="margin: 1rem;">新建聊天</el-button>
|
||||||
|
<div class="chat_list">
|
||||||
|
<div class="chat_list_item" v-for="(item,index) in 10" :key="index">
|
||||||
|
<div class="chat_list_item_icon" style="border:1px solid rgb(75, 158, 95);border-radius:20% 20% 0 20%;color:rgb(75,158,95);">...</div>
|
||||||
|
<div class="chat_list_item_text" style="flex:8;color:rgb(75,158,95);">前端有哪些性能优化?</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-main>
|
||||||
|
<el-footer>
|
||||||
|
<div style="align-items: center;display: flex;">
|
||||||
|
<img style="width: 2.5rem;height: 2.5rem;border-radius: 50%;margin-right: 1rem;" src="img/icon_nbyg.png" alt="">
|
||||||
|
<div style="font-weight: 700;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"> {{ userName }}</div>
|
||||||
|
</div>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</div>
|
||||||
|
</el-side>
|
||||||
|
<el-main>
|
||||||
|
<el-container>
|
||||||
|
<el-main>
|
||||||
|
<div class="right_layout_son">
|
||||||
|
<div class="right_layout_myselfChat">
|
||||||
|
<div id="datatime" style="flex:2;font-size:13px;color:lightgray"></div>
|
||||||
|
<div style="flex:1">
|
||||||
|
<div class="user_icons" style="width:40px;height:40px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="myself_chat">
|
||||||
|
前端有哪些性能优化?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-main>
|
||||||
|
<el-footer>
|
||||||
|
<div class="right_layout_son_ipt">
|
||||||
|
<input class="ipt" type="text" placeholder="来说点什么吧...">
|
||||||
|
<button class="btn">发送</button>
|
||||||
|
</div>
|
||||||
|
</el-footer>
|
||||||
|
</el-container>
|
||||||
|
</el-main>
|
||||||
|
</el-container> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
// import xSelects from "@/components/xtSelect/index2.vue";
|
||||||
|
export default {
|
||||||
|
name: "testx",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userName: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
var userInfo = this.$TOOL.data.get("USER_INFO");
|
||||||
|
this.userName = userInfo.username;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
.right_layout {
|
||||||
|
flex: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icons {
|
||||||
|
background-color: white;
|
||||||
|
z-index: 99;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid lightgray;
|
||||||
|
padding: 0px 5px;
|
||||||
|
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icons_display {
|
||||||
|
top: 48vh;
|
||||||
|
right: -15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icons_hideen {
|
||||||
|
top: 48vh;
|
||||||
|
left: 10px;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.new_chat_text {
|
||||||
|
border: 1px solid #4b9e5f;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user_icons {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
background: linear-gradient(-135deg, #0000cc, #009dff);
|
||||||
|
border: 1px solid lightblue;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right_layout_flex{
|
||||||
|
display:flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.right_layout_son{
|
||||||
|
margin:0 auto 0 auto;
|
||||||
|
width:100vh;
|
||||||
|
height:98vh;
|
||||||
|
/* border:1px solid gray; */
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.right_layout_son_ipt{
|
||||||
|
position: absolute;
|
||||||
|
bottom:0;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
border:none;
|
||||||
|
padding:10px 15px;
|
||||||
|
background-color: #18a058;
|
||||||
|
border-radius: 1px;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
.search_input{
|
||||||
|
width: 100%;
|
||||||
|
padding:0.5rem 1rem;
|
||||||
|
/* border:1px solid lightgray; */
|
||||||
|
}
|
||||||
|
.right_layout_myselfChat{
|
||||||
|
width:200px;
|
||||||
|
position: absolute;
|
||||||
|
top:5px;
|
||||||
|
right:0;
|
||||||
|
display:flex;
|
||||||
|
}
|
||||||
|
.myself_chat{
|
||||||
|
position: absolute;
|
||||||
|
top:30px;
|
||||||
|
right:80px;
|
||||||
|
padding:10px 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: #7ae1b6;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -799,7 +799,6 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="item.testitem_field_type=='input-number'"
|
v-if="item.testitem_field_type=='input-number'"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
:min="0"
|
|
||||||
:disabled="!scope.row.isEdit"
|
:disabled="!scope.row.isEdit"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
|
@ -809,7 +808,6 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="item.testitem_field_type=='input-int'"
|
v-if="item.testitem_field_type=='input-int'"
|
||||||
v-model="scope.row[item.testitem_name]"
|
v-model="scope.row[item.testitem_name]"
|
||||||
:min="0"
|
|
||||||
:disabled="!scope.row.isEdit"
|
:disabled="!scope.row.isEdit"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
|
@ -1042,7 +1040,7 @@ export default {
|
||||||
// 初始化表单字段,确保每个字段都有默认值
|
// 初始化表单字段,确保每个字段都有默认值
|
||||||
this.qct_testitems.forEach(item => {
|
this.qct_testitems.forEach(item => {
|
||||||
if (!(item.testitem_name in this.form)) {
|
if (!(item.testitem_name in this.form)) {
|
||||||
this.form[item.testitem_name] = ''
|
this.form[item.testitem_name] = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -1090,17 +1088,17 @@ export default {
|
||||||
that.qct_testitems = [];
|
that.qct_testitems = [];
|
||||||
res.qct_testitems.forEach((item2) => {
|
res.qct_testitems.forEach((item2) => {
|
||||||
let obj2 = Object.assign({}, item2);
|
let obj2 = Object.assign({}, item2);
|
||||||
obj2.value = '';
|
obj2.value = null;
|
||||||
obj2.addto_wpr = item2.addto_wpr;
|
obj2.addto_wpr = item2.addto_wpr;
|
||||||
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
||||||
obj2.value = 0;
|
obj2.value =null;
|
||||||
that.addTemplate[item2.testitem_name] = 0;
|
that.addTemplate[item2.testitem_name] = null;
|
||||||
}
|
}
|
||||||
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
|
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
|
||||||
let str = obj2.testitem_choices.replace(/'/g, '"');
|
let str = obj2.testitem_choices.replace(/'/g, '"');
|
||||||
let arr = JSON.parse(str);
|
let arr = JSON.parse(str);
|
||||||
obj2.testitem_choices = arr;
|
obj2.testitem_choices = arr;
|
||||||
that.addTemplate[item2.testitem_name] = '';
|
that.addTemplate[item2.testitem_name] = null;
|
||||||
}
|
}
|
||||||
that.qct_testitems.push(obj2);
|
that.qct_testitems.push(obj2);
|
||||||
})
|
})
|
||||||
|
|
@ -1123,7 +1121,7 @@ export default {
|
||||||
if(res0.qct_defects.length>0){
|
if(res0.qct_defects.length>0){
|
||||||
res0.qct_defects.forEach((item1) => {
|
res0.qct_defects.forEach((item1) => {
|
||||||
let obj = Object.assign({}, item1);
|
let obj = Object.assign({}, item1);
|
||||||
obj.value = '';
|
obj.value = false;
|
||||||
that.qct_defects.push(obj);
|
that.qct_defects.push(obj);
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -1132,7 +1130,7 @@ export default {
|
||||||
if(res0.qct_testitems.length>0){
|
if(res0.qct_testitems.length>0){
|
||||||
res0.qct_testitems.forEach((item2) => {
|
res0.qct_testitems.forEach((item2) => {
|
||||||
let obj2 = Object.assign({}, item2);
|
let obj2 = Object.assign({}, item2);
|
||||||
obj2.value = '';
|
obj2.value = null;
|
||||||
if(obj2.testitem_field_type=='select-text'||obj2.testitem_field_type=='selects-text'){
|
if(obj2.testitem_field_type=='select-text'||obj2.testitem_field_type=='selects-text'){
|
||||||
let str = obj2.testitem_choices.replace(/'/g, '"');
|
let str = obj2.testitem_choices.replace(/'/g, '"');
|
||||||
let arr = JSON.parse(str);
|
let arr = JSON.parse(str);
|
||||||
|
|
@ -1186,11 +1184,12 @@ export default {
|
||||||
obj[item1.defect_name] = false;
|
obj[item1.defect_name] = false;
|
||||||
})
|
})
|
||||||
that.qct_testitems.forEach((item2) => {
|
that.qct_testitems.forEach((item2) => {
|
||||||
if(item2.testitem_field_type=='input-number'||item.testitem_field_type=='input-int'){
|
obj[item2.testitem_name] = null;
|
||||||
obj[item2.testitem_name] = 0;
|
// if(item2.testitem_field_type=='input-number'||item.testitem_field_type=='input-int'){
|
||||||
}else{
|
// obj[item2.testitem_name] = null;
|
||||||
obj[item2.testitem_name] = "";
|
// }else{
|
||||||
}
|
// obj[item2.testitem_name] = "";
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
that.mioitemwList.push(obj);
|
that.mioitemwList.push(obj);
|
||||||
|
|
@ -1394,27 +1393,32 @@ export default {
|
||||||
if(row.ftest!==null){
|
if(row.ftest!==null){
|
||||||
ftestdefects = row.ftest.ftestdefects;
|
ftestdefects = row.ftest.ftestdefects;
|
||||||
ftestdefects.forEach((item) => {
|
ftestdefects.forEach((item) => {
|
||||||
|
item.test_user = that.formbw.test_user;
|
||||||
|
item.test_date = that.formbw.test_date;
|
||||||
item.has = row[item.defect_name]?row[item.defect_name]:false;
|
item.has = row[item.defect_name]?row[item.defect_name]:false;
|
||||||
})
|
})
|
||||||
ftestitems = row.ftest.ftestitems;
|
ftestitems = row.ftest.ftestitems;
|
||||||
ftestitems.forEach((item1) => {
|
ftestitems.forEach((item1) => {
|
||||||
item1.test_val_json = row[item1.testitem_name]?row[item1.testitem_name]:"";
|
item1.test_user = that.formbw.test_user;
|
||||||
|
item1.test_date = that.formbw.test_date;
|
||||||
|
item1.test_val_json = row[item1.testitem_name]?row[item1.testitem_name]:null;
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
that.qct_testitems.forEach((item) => {
|
that.qct_testitems.forEach((item) => {
|
||||||
let obj0 = {};
|
let obj0 = {};
|
||||||
obj0.testitem = item.testitem;
|
obj0.testitem = item.testitem;
|
||||||
obj0.test_user = row.test_user;
|
obj0.test_user = that.formbw.test_user;
|
||||||
|
obj0.test_date = that.formbw.test_date;
|
||||||
obj0.testitem_name = item.testitem_name;
|
obj0.testitem_name = item.testitem_name;
|
||||||
obj0.test_val_json = row[item.testitem_name]?row[item.testitem_name]:"";
|
obj0.test_val_json = row[item.testitem_name]?row[item.testitem_name]:null;
|
||||||
ftestitems.push(obj0);
|
ftestitems.push(obj0);
|
||||||
})
|
})
|
||||||
that.qct_defects.forEach((item1) => {
|
that.qct_defects.forEach((item1) => {
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
obj1.defect = item1.defect;
|
obj1.defect = item1.defect;
|
||||||
obj1.test_user = row.test_user;
|
obj1.test_user = that.formbw.test_user;
|
||||||
obj1.defect_name = item1.defect_name;
|
obj1.defect_name = item1.defect_name;
|
||||||
|
obj1.test_date = that.formbw.test_date;
|
||||||
obj1.has = row[item1.defect_name]?row[item1.defect_name]:false;
|
obj1.has = row[item1.defect_name]?row[item1.defect_name]:false;
|
||||||
ftestdefects.push(obj1);
|
ftestdefects.push(obj1);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,18 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="物料" prop="material">
|
<el-form-item label="物料" prop="material">
|
||||||
<el-select
|
<xtSelect
|
||||||
|
:apiObj="apiObj"
|
||||||
|
v-model="form.material"
|
||||||
|
v-model:obj="selectObj"
|
||||||
|
:labelField="'full_name'"
|
||||||
|
style="width:100%"
|
||||||
|
:params="query"
|
||||||
|
@change="selectMaterialChange"
|
||||||
|
>
|
||||||
|
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
|
<!-- <el-select
|
||||||
v-model="selectMaterial"
|
v-model="selectMaterial"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
clearable
|
clearable
|
||||||
|
|
@ -40,7 +51,7 @@
|
||||||
>隐</span
|
>隐</span
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
|
@ -83,7 +94,6 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="selectBatchChange"
|
@change="selectBatchChange"
|
||||||
@clear="selectBatchClear"
|
@clear="selectBatchClear"
|
||||||
:disabled="selectBatchDisable"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in batchOptions"
|
v-for="item in batchOptions"
|
||||||
|
|
@ -255,6 +265,7 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
selectObj:{},
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
|
|
@ -272,6 +283,7 @@ export default {
|
||||||
mioitemw:[],
|
mioitemw:[],
|
||||||
project_code:'',
|
project_code:'',
|
||||||
mTracking:10,
|
mTracking:10,
|
||||||
|
apiObj:this.$API.mtm.material.list,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -373,9 +385,11 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
query = { page: 0 ,is_hidden:false};
|
query = { page: 0 ,is_hidden:false};
|
||||||
}
|
}
|
||||||
this.$API.mtm.material.list.req(query).then((res) => {
|
this.query = query;
|
||||||
this.materialOptions = res;
|
this.apiObj=this.$API.mtm.material.list;
|
||||||
});
|
// this.$API.mtm.material.list.req(query).then((res) => {
|
||||||
|
// this.materialOptions = res;
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
async initAssemb(item) {
|
async initAssemb(item) {
|
||||||
this.selectBatchDisable = true;
|
this.selectBatchDisable = true;
|
||||||
|
|
@ -423,15 +437,14 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
selectMaterialChange(item) {
|
selectMaterialChange() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
var material = item.id;
|
that.form.material = that.selectObj.id;
|
||||||
that.form.material = material;
|
that.mTracking = that.selectObj.tracking;
|
||||||
that.mTracking = item.tracking;
|
|
||||||
if (type == "do_in") {
|
if (type == "do_in") {
|
||||||
if (item.is_assemb) {
|
if (that.selectObj.is_assemb) {
|
||||||
this.initAssemb(item);
|
this.initAssemb(that.selectObj);
|
||||||
} else {
|
} else {
|
||||||
this.selectBatchDisable = false;
|
this.selectBatchDisable = false;
|
||||||
this.components = [];
|
this.components = [];
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,8 @@
|
||||||
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
<el-button type="default" @click="faceLogin">刷脸登录</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- <div class="copyright">Copyright © 2024 {{ baseConfig.base_right }}</div> -->
|
<!-- <div class="copyright">Copyright © 2024 {{ baseConfig.base_right }}</div> -->
|
||||||
<div class="version">VERSION @ {{ config_index.APP_VER }}</div>
|
<div class="version version_web">WEB版本:{{ config_index.APP_VER }}</div>
|
||||||
|
<div class="version ">SERVER版本:{{ baseConfig.sys_version }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -406,10 +407,13 @@ export default {
|
||||||
}
|
}
|
||||||
.version {
|
.version {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 30px;
|
bottom: 15px;
|
||||||
left: 30px;
|
right: 30px;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
color: #fff;
|
color: rgb(36, 93, 116);
|
||||||
|
}
|
||||||
|
.version_web{
|
||||||
|
bottom: 40px;
|
||||||
}
|
}
|
||||||
.copyright {
|
.copyright {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -93,14 +93,14 @@
|
||||||
@click="table_show(scope.row, scope.$index)"
|
@click="table_show(scope.row, scope.$index)"
|
||||||
>查看
|
>查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
v-if="scope.row.state == 30"
|
v-if="scope.row.state == 30"
|
||||||
@click="table_copy(scope.row)"
|
@click="table_copy(scope.row)"
|
||||||
>复制
|
>复制
|
||||||
</el-button> -->
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
|
|
@ -127,6 +127,57 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
<el-dialog title="复制工艺" v-model="dialogVisible">
|
||||||
|
<el-form ref="dialogForm" :model="form" :rules="rules" label-position="right" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="名称" prop="new_name">
|
||||||
|
<el-input
|
||||||
|
v-model="form.new_name"
|
||||||
|
type="text"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="原料" prop="material_in">
|
||||||
|
<el-select
|
||||||
|
v-model="form.material_in"
|
||||||
|
style="width: 100%"
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialIn"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.full_name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="产品" prop="material_out">
|
||||||
|
<el-select
|
||||||
|
v-model="form.material_out"
|
||||||
|
style="width: 100%"
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialOut"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.full_name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" :loading="isSaveing" @click="form_save">保存</el-button>
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
<save-dialog
|
<save-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
|
|
@ -183,9 +234,22 @@ export default {
|
||||||
search: "",
|
search: "",
|
||||||
keyword: null,
|
keyword: null,
|
||||||
},
|
},
|
||||||
|
form:{
|
||||||
|
routepack:"",
|
||||||
|
new_name:"",
|
||||||
|
material_in:"",
|
||||||
|
material_out:""
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
new_name:[{required: true,message: "请填写新工艺名称",trigger: "blur"}],
|
||||||
|
material_in:[{required: true,message: "请选择新工艺所用原料",trigger: "blur"}],
|
||||||
|
material_out:[{required: true,message: "请选择新工艺最终产品",trigger: "blur"}],
|
||||||
|
},
|
||||||
nodes:[],
|
nodes:[],
|
||||||
edges:[],
|
edges:[],
|
||||||
timeRange: [],
|
timeRange: [],
|
||||||
|
materialIn: [],
|
||||||
|
materialOut: [],
|
||||||
filteType: "all",
|
filteType: "all",
|
||||||
stateOptions: [
|
stateOptions: [
|
||||||
{
|
{
|
||||||
|
|
@ -209,13 +273,28 @@ export default {
|
||||||
filterType: "all",
|
filterType: "all",
|
||||||
isSaveing:false,
|
isSaveing:false,
|
||||||
limitedWatch:false,
|
limitedWatch:false,
|
||||||
|
dialogVisible:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let userInfo = this.$TOOL.data.get("USER_INFO");
|
let userInfo = this.$TOOL.data.get("USER_INFO");
|
||||||
this.userId = userInfo.id;
|
this.userId = userInfo.id;
|
||||||
|
this.getMaterialIn();
|
||||||
|
this.getMaterialOut();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getMaterialIn() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.material.list.req({ page: 0, type__in: "20,30",is_hidden: false}).then((res) => {
|
||||||
|
that.materialIn = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getMaterialOut() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.material.list.req({ page: 0, type__in: "10,20",is_hidden: false}).then((res) => {
|
||||||
|
that.materialOut = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
getType(state) {
|
getType(state) {
|
||||||
if (state == 10) {
|
if (state == 10) {
|
||||||
return "warning";
|
return "warning";
|
||||||
|
|
@ -252,13 +331,30 @@ export default {
|
||||||
},
|
},
|
||||||
//复制
|
//复制
|
||||||
table_copy(row){
|
table_copy(row){
|
||||||
this.$API.mtm.routepack.copy.req(row.id).then((res) => {
|
let that = this;
|
||||||
this.$message.success("复制成功");
|
that.form.routepack = row.id;
|
||||||
this.$refs.table.refresh();
|
that.form.new_name = '';
|
||||||
return res;
|
that.form.material_in = '';
|
||||||
}).catch((err) => {
|
that.form.material_out ='';
|
||||||
return err;
|
that.dialogVisible = true;
|
||||||
});
|
},
|
||||||
|
form_save(){
|
||||||
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.$API.mtm.routepack.copy.req(that.form).then((res) => {
|
||||||
|
that.$message.success("复制成功");
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.dialogVisible = false;
|
||||||
|
return res;
|
||||||
|
}).catch((err) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// handleWatch(row) {
|
// handleWatch(row) {
|
||||||
// let that = this;
|
// let that = this;
|
||||||
|
|
|
||||||
|
|
@ -45,18 +45,18 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
<el-form-item label="产品" prop="type">
|
<el-form-item label="产品" prop="type">
|
||||||
<el-select
|
<span style="font-weight: 600;">{{ form.material_name }}</span>
|
||||||
|
<xtSelect
|
||||||
|
:apiObj="apiObjM"
|
||||||
v-model="form.material"
|
v-model="form.material"
|
||||||
style="width: 100%"
|
v-model:obj="selectObj"
|
||||||
filterable
|
:labelField="'full_name'"
|
||||||
|
style="margin-left: 10px;"
|
||||||
|
:params = "{type__in: '10,20',is_hidden: false}"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column label="物料" prop="full_name"></el-table-column>
|
||||||
v-for="item in materials"
|
</xtSelect>
|
||||||
:key="item.id"
|
|
||||||
:label="item.full_name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="24" :sm="12" :xs="24">
|
<el-col :md="24" :sm="12" :xs="24">
|
||||||
|
|
@ -134,6 +134,11 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="输出" prop="material_out_name">
|
<el-table-column label="输出" prop="material_out_name">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="追踪方式">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ tracking_[scope.row.material_out_tracking] }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="出材率" prop="out_rate">
|
<el-table-column label="出材率" prop="out_rate">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工时" prop="hour_work">
|
<el-table-column label="工时" prop="hour_work">
|
||||||
|
|
@ -224,12 +229,18 @@ export default {
|
||||||
apiworkerObj: null,
|
apiworkerObj: null,
|
||||||
materials: [],
|
materials: [],
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
|
apiObjM:this.$API.mtm.material.list,
|
||||||
query: {
|
query: {
|
||||||
routepack: "",
|
routepack: "",
|
||||||
},
|
},
|
||||||
|
selectObj:{},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: "请输入" }],
|
name: [{ required: true, message: "请输入" }],
|
||||||
},
|
},
|
||||||
|
tracking_:{
|
||||||
|
10:"批次",
|
||||||
|
20:"单个",
|
||||||
|
},
|
||||||
nodes:[],
|
nodes:[],
|
||||||
edges:[],
|
edges:[],
|
||||||
routepack: "",
|
routepack: "",
|
||||||
|
|
@ -242,7 +253,7 @@ export default {
|
||||||
this.isSaveing = false;
|
this.isSaveing = false;
|
||||||
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
||||||
this.getInit();
|
this.getInit();
|
||||||
this.getMaterials();
|
// this.getMaterials();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(mode) {
|
open(mode) {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
></el-avatar>
|
></el-avatar>
|
||||||
<h3>{{ form.base_name }}</h3>
|
<h3>{{ form.base_name }}</h3>
|
||||||
<p>SERVER版本: {{ form.sys_version }}</p>
|
<p>SERVER版本: {{ form.sys_version }}</p>
|
||||||
|
<p>WEB版本: {{ config.APP_VER }}</p>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
@ -54,7 +55,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
|
import config from "@/config"
|
||||||
export default {
|
export default {
|
||||||
name: "userCenter",
|
name: "userCenter",
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -65,6 +66,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
form: {},
|
form: {},
|
||||||
menu: [
|
menu: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ export default {
|
||||||
},
|
},
|
||||||
state_xj: {
|
state_xj: {
|
||||||
S: "析晶",
|
S: "析晶",
|
||||||
K: "不析晶",
|
R: "不析晶",
|
||||||
θ: "未化",
|
θ: "未化",
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
|
|
|
||||||
|
|
@ -262,6 +262,13 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
sample_number:[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入样品编号",
|
||||||
|
trigger: "blur"
|
||||||
|
},
|
||||||
|
],
|
||||||
test_user: [
|
test_user: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -297,7 +304,7 @@ export default {
|
||||||
],
|
],
|
||||||
xjOptios: [
|
xjOptios: [
|
||||||
{ id: "S", name: "析晶" },
|
{ id: "S", name: "析晶" },
|
||||||
{ id: "K", name: "不析晶" },
|
{ id: "R", name: "不析晶" },
|
||||||
{ id: "θ", name: "未化" },
|
{ id: "θ", name: "未化" },
|
||||||
],
|
],
|
||||||
visible: false,
|
visible: false,
|
||||||
|
|
|
||||||
|
|
@ -16,24 +16,19 @@
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="物料批次" prop="batch">
|
<el-form-item label="物料批次" required="true">
|
||||||
<el-select
|
<xtSelect
|
||||||
v-model="form.batch"
|
:apiObj="apiObjBatch"
|
||||||
placeholder="物料批次"
|
v-model="form.batch"
|
||||||
clearable
|
v-model:obj="selectBatch"
|
||||||
filterable
|
:valueField="'batch'"
|
||||||
style="width: 100%"
|
:labelField="'batch'"
|
||||||
@change="handleChange"
|
style="width:100%"
|
||||||
:disabled="mode != 'add'"
|
@change="handleBatchChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-table-column label="物料批次" prop="batch"></el-table-column>
|
||||||
v-for="item in options"
|
<el-table-column label="数量" prop="count"></el-table-column>
|
||||||
:key="item.id"
|
</xtSelect>
|
||||||
:label="item.batch"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
|
@ -104,6 +99,7 @@ export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
apiObjBatch:this.$API.inm.warehouse.batch,
|
||||||
apiUserObj: this.$API.system.user.list,
|
apiUserObj: this.$API.system.user.list,
|
||||||
loading: false,
|
loading: false,
|
||||||
form: {
|
form: {
|
||||||
|
|
@ -126,6 +122,7 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
selectBatch:null,
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
options: [],
|
||||||
|
|
@ -170,46 +167,38 @@ export default {
|
||||||
that.options = res;
|
that.options = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleChange(val) {
|
handleBatchChange() {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(val);
|
that.form.count = that.selectBatch.count;
|
||||||
that.options.forEach((item) => {
|
that.form.batch = that.selectBatch.batch;
|
||||||
if (item.id == val) {
|
that.form.material = that.selectBatch.material;
|
||||||
that.form.count = item.count;
|
that.form.mb = that.selectBatch.id;
|
||||||
that.form.batch = item.batch;
|
|
||||||
that.form.material = item.material;
|
|
||||||
that.form.mb = item.id;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
submit() {
|
submit() {
|
||||||
this.$refs.dialogForm.validate(async (valid) => {
|
let that = this;
|
||||||
|
that.$refs.dialogForm.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.isSaveing = true;
|
that.isSaveing = true;
|
||||||
try {
|
try {
|
||||||
if (this.mode == "add") {
|
if (that.mode == "add") {
|
||||||
this.$API.qm.ftestwork.create
|
that.$API.qm.ftestwork.create.req(that.form).then((res) => {
|
||||||
.req(this.form)
|
that.isSaveing = false;
|
||||||
.then((res) => {
|
that.visible = false;
|
||||||
this.isSaveing = false;
|
that.$emit("success");
|
||||||
this.visible = false;
|
that.$message.success("操作成功");
|
||||||
this.$emit("success");
|
}).catch(err => {that.isSaveing = false;});
|
||||||
this.$message.success("操作成功");
|
} else if (that.mode == "edit") {
|
||||||
});
|
that.$API.qm.ftestwork.update.req(that.form.id, that.form).then((res) => {
|
||||||
} else if (this.mode == "edit") {
|
that.isSaveing = false;
|
||||||
this.$API.qm.ftestwork.update
|
that.visible = false;
|
||||||
.req(this.form.id, this.form)
|
that.$emit("success");
|
||||||
.then((res) => {
|
that.$message.success("操作成功");
|
||||||
this.isSaveing = false;
|
}).catch(err => {that.isSaveing = false;});
|
||||||
this.visible = false;
|
|
||||||
this.$emit("success");
|
|
||||||
this.$message.success("操作成功");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
//可以处理校验错误
|
//可以处理校验错误
|
||||||
this.isSaveing = false;
|
that.isSaveing = false;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,14 @@
|
||||||
<xtSelect
|
<xtSelect
|
||||||
v-else
|
v-else
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
|
:labelField="'full_name'"
|
||||||
v-model="scope.row.material"
|
v-model="scope.row.material"
|
||||||
v-model:label="scope.row.material_name"
|
v-model:label="scope.row.full_name"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
>
|
>
|
||||||
<el-table-column label="名称" prop="name"></el-table-column>
|
<el-table-column label="物料名称" prop="full_name"></el-table-column>
|
||||||
<el-table-column label="工序" prop="process_name"></el-table-column>
|
<!-- <el-table-column label="工序" prop="process_name"></el-table-column>
|
||||||
<el-table-column label="规格" prop="specification"></el-table-column>
|
<el-table-column label="规格" prop="specification"></el-table-column> -->
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,372 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-side>
|
||||||
|
<el-container>
|
||||||
|
<el-header style="height: 40px;">
|
||||||
|
<el-select
|
||||||
|
v-model="query.material_start__type"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 90px;"
|
||||||
|
>
|
||||||
|
<el-option label="成品" :value="10"></el-option>
|
||||||
|
<el-option label="半成品" :value="20"></el-option>
|
||||||
|
<el-option label="原料" :value="30"></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-input
|
||||||
|
v-model="query.batch"
|
||||||
|
placeholder="请输入批次号"
|
||||||
|
clearable
|
||||||
|
style="width: 150px;"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
<el-button type="primary" @click="search">查询</el-button>
|
||||||
|
</el-header>
|
||||||
|
<el-main style="padding: 0 1px;">
|
||||||
|
<scTable
|
||||||
|
ref="tablets"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
:params="query"
|
||||||
|
:query="query"
|
||||||
|
stripe
|
||||||
|
@row-click="rowClick"
|
||||||
|
hideDo
|
||||||
|
:paginationLayout="'total, sizes, jumper'"
|
||||||
|
>
|
||||||
|
<el-table-column prop="batch" label="批次号"></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-side>
|
||||||
|
<el-main id="elMain">
|
||||||
|
<el-container>
|
||||||
|
<el-header style="height: 40%;flex-direction: column;align-items: start;overflow: scroll;">
|
||||||
|
<p style="position: fixed;">批次流转图</p>
|
||||||
|
<scDegra
|
||||||
|
style="margin-top: 50px;"
|
||||||
|
v-if="limitedWatch"
|
||||||
|
ref="degraDialogs"
|
||||||
|
:nodes="nodes"
|
||||||
|
:edges="edges"
|
||||||
|
:rankdir="'LR'"
|
||||||
|
@nodeClick ="nodeClick"
|
||||||
|
@closeDialog="limitedWatch = false"
|
||||||
|
>
|
||||||
|
</scDegra>
|
||||||
|
</el-header>
|
||||||
|
<el-main style="height: 60%;background: #fff;">
|
||||||
|
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane name="mlog" label="生产日志">
|
||||||
|
<scTable
|
||||||
|
ref="tableMlog"
|
||||||
|
:apiObj="apiObj_mlog"
|
||||||
|
row-key="id"
|
||||||
|
:params="params"
|
||||||
|
:query="params"
|
||||||
|
>
|
||||||
|
<el-table-column label="#" type="index" width="50" fixed></el-table-column>
|
||||||
|
<el-table-column label="工艺路线" prop="material_out_name" min-width="130" fixed>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.material_out_name!==null">{{scope.row.material_out_name}}</span>
|
||||||
|
<span v-else>返工</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="生产设备"
|
||||||
|
prop="equipment_name"
|
||||||
|
min-width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="部门/工段">
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="处理人"
|
||||||
|
prop="handle_user_name"
|
||||||
|
width="80"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="保温剩余时间" v-if="mgroup_name=='黑化'||mgroup_name=='退火'">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ getRemaTime(scope.row) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="开始时间"
|
||||||
|
prop="work_start_time"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="结束时间"
|
||||||
|
prop="work_end_time"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="提交时间"
|
||||||
|
prop="submit_time"
|
||||||
|
></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane name="handover" label="交接记录">
|
||||||
|
<scTable
|
||||||
|
ref="tableHandover"
|
||||||
|
:apiObj="apiObj_handover"
|
||||||
|
row-key="id"
|
||||||
|
:query="params"
|
||||||
|
:params="params"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template #default="props">
|
||||||
|
<div style="padding-left: 50px">
|
||||||
|
<template v-for="item in props.row.handoverb" :key="item.id">
|
||||||
|
<el-descriptions :column="3">
|
||||||
|
<el-descriptions-item label="批次">
|
||||||
|
{{item.batch}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="数量">
|
||||||
|
{{item.count}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="不合格标记" v-if="item.defect_name!==null">
|
||||||
|
{{item.defect_name}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="物料"
|
||||||
|
prop="material_name"
|
||||||
|
min-width="140"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="批次" prop="batch" min-width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-text v-if="scope.row.handoverb.length>0" type="primary">{{scope.row.handoverb.length}}批</el-text>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count" min-width="80"></el-table-column>
|
||||||
|
<el-table-column label="交接类型" prop="type" min-width="80">
|
||||||
|
<template #default="scope" v-if="mgroup_name=='size'||mgroup_name=='facade'">
|
||||||
|
<el-text v-if="scope.row.send_dept == deptId" type="primary">交送</el-text>
|
||||||
|
<el-text v-if="scope.row.recive_dept == deptId" type="success">接收</el-text>
|
||||||
|
</template>
|
||||||
|
<template #default="scope" v-else>
|
||||||
|
<el-text v-if="scope.row.send_mgroup == mgroupId" type="primary">交送</el-text>
|
||||||
|
<el-text v-if="scope.row.recive_mgroup == mgroupId" type="success">接收</el-text>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交接工段" min-width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-text v-if="scope.row.send_mgroup == mgroupId">{{scope.row.send_mgroup_name}}</el-text>
|
||||||
|
<el-text v-if="scope.row.recive_mgroup == mgroupId">{{scope.row.recive_mgroup_name}}</el-text>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交接类别" prop="type" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.type == 10" type="success"
|
||||||
|
>正常</el-tag
|
||||||
|
>
|
||||||
|
<el-tag v-if="scope.row.type == 20" type="warning"
|
||||||
|
>返工</el-tag
|
||||||
|
>
|
||||||
|
<el-tag v-if="scope.row.type == 30" type="primary"
|
||||||
|
>检验</el-tag
|
||||||
|
>
|
||||||
|
<el-tag v-if="scope.row.type == 40" type="danger"
|
||||||
|
>报废</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="交送人"
|
||||||
|
prop="send_user_name"
|
||||||
|
width="80"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="接收人"
|
||||||
|
prop="recive_user_name"
|
||||||
|
width="80"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="交接日期"
|
||||||
|
prop="send_date"
|
||||||
|
width="120"
|
||||||
|
></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane name="winm" label="车间库存">
|
||||||
|
<scTable
|
||||||
|
ref="tableWinm"
|
||||||
|
:apiObj="apiObj_winm"
|
||||||
|
row-key="id"
|
||||||
|
:query="params"
|
||||||
|
:params="params"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection"></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="state">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="wmState[scope.row.state]?.type">
|
||||||
|
{{wmState[scope.row.state]?.text}}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料名称" min-width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.material_name }}
|
||||||
|
<span v-if="scope.row.material_origin != null">({{ scope.row.material_origin_name }})</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batch" min-width="120"></el-table-column>
|
||||||
|
<el-table-column label="部门/工段">
|
||||||
|
<template #default="scope">
|
||||||
|
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="count"></el-table-column>
|
||||||
|
<el-table-column label="生产中" prop="count_working"></el-table-column>
|
||||||
|
<el-table-column label="不合格标记" prop="defect_name"></el-table-column>
|
||||||
|
<el-table-column label="创建时间" prop="create_time" width="150"></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane name="binm" label="仓库库存">
|
||||||
|
<scTable
|
||||||
|
ref="tableBinm"
|
||||||
|
:apiObj="apiObj_binm"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:query="params_binm"
|
||||||
|
:params="params_binm"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="批次" prop="batch">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料名称" prop="material_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="规格型号">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.material_">
|
||||||
|
{{ scope.row.material_.specification }}
|
||||||
|
{{ scope.row.material_.model }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已完成工序">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.material_">
|
||||||
|
{{ scope.row.material_.process_name }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="仓库" prop="warehouse_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料存量" prop="count">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效期" prop="expiration_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="更新时间" prop="update_time">
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { wmState } from "@/utils/enum.js";
|
||||||
|
export default {
|
||||||
|
name: "batch_statistics",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
wmState,
|
||||||
|
apiObj:this.$API.wpm.batchst,
|
||||||
|
apiObj_mlog:null,
|
||||||
|
apiObj_handover:null,
|
||||||
|
apiObj_winm:null,
|
||||||
|
apiObj_binm:null,
|
||||||
|
nodes: [],
|
||||||
|
edges: [],
|
||||||
|
params:{
|
||||||
|
batch:'',
|
||||||
|
},
|
||||||
|
query:{
|
||||||
|
batch:'',
|
||||||
|
material_start__type:20,
|
||||||
|
},
|
||||||
|
params_binm:{
|
||||||
|
search:''
|
||||||
|
},
|
||||||
|
batch:'',
|
||||||
|
activeName:'',
|
||||||
|
limitedWatch:false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getBatches(){
|
||||||
|
},
|
||||||
|
getBatchDag(){
|
||||||
|
|
||||||
|
},
|
||||||
|
rowClick(row){
|
||||||
|
console.log('row',row)
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.batchlog.dag.req({batch:row.batch}).then((res) => {
|
||||||
|
that.nodes = res.nodes;
|
||||||
|
that.edges = res.edges;
|
||||||
|
that.limitedWatch = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
that.$refs.degraDialogs.open();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
nodeClick(data){
|
||||||
|
let that = this;
|
||||||
|
console.log('nodeClick',data)
|
||||||
|
that.params.batch = data;
|
||||||
|
that.params_binm.search = data;
|
||||||
|
that.activeName = 'mlog';
|
||||||
|
if( that.apiObj_mlog !==null){
|
||||||
|
that.$refs.tableMlog.queryData(that.params);
|
||||||
|
that.$refs.tableHandover.queryData(that.params);
|
||||||
|
that.$refs.tableWinm.queryData(that.params);
|
||||||
|
that.$refs.tableBinm.queryData(that.params_binm);
|
||||||
|
}else{
|
||||||
|
that.apiObj_mlog = that.$API.wpm.mlog.list;
|
||||||
|
that.apiObj_handover = that.$API.wpm.handover.list;
|
||||||
|
that.apiObj_winm = that.$API.wpm.wmaterial.list;
|
||||||
|
that.apiObj_binm = that.$API.inm.warehouse.batch;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
search(){
|
||||||
|
this.$refs.tablets.queryData(this.query)
|
||||||
|
},
|
||||||
|
handleClick(){
|
||||||
|
// switch (this.activeName) {
|
||||||
|
// case 'mlog':
|
||||||
|
// this.$refs.tableMlog.refresh();
|
||||||
|
// break;
|
||||||
|
// case 'handover':
|
||||||
|
// this.$refs.tableHandover.refresh();
|
||||||
|
// break;
|
||||||
|
// case 'winm':
|
||||||
|
// this.$refs.tableWinm.refresh();
|
||||||
|
// break;
|
||||||
|
// case 'binm':
|
||||||
|
// this.$refs.tableBinm.refresh();
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -727,6 +727,9 @@ export default {
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
mlogSubmit() {
|
mlogSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
if(that.mlogItem.work_end_time==''||that.mlogItem.work_end_time==null){
|
||||||
|
that.mlogItem.handle_date = that.$TOOL.dateFormat2(new Date());
|
||||||
|
}
|
||||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code!=='niuzhuan'">
|
||||||
<el-form-item label="生产设备">
|
<el-form-item label="生产设备">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.equipment"
|
v-model="form.equipment"
|
||||||
|
|
@ -172,7 +172,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code!=='niuzhuan'">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="开始时间"
|
label="开始时间"
|
||||||
prop="work_start_time"
|
prop="work_start_time"
|
||||||
|
|
@ -187,8 +187,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code!=='niuzhuan'">
|
||||||
<el-col :md="12" :sm="12" :xs="24">
|
|
||||||
<el-form-item label="结束时间" prop="work_end_time">
|
<el-form-item label="结束时间" prop="work_end_time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.work_end_time"
|
v-model="form.work_end_time"
|
||||||
|
|
@ -306,6 +305,13 @@ export default {
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
work_end_time: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择结束时间",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
route: [
|
route: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
|
|
@ -326,6 +332,7 @@ export default {
|
||||||
{ id: 20, name: "外协" },
|
{ id: 20, name: "外协" },
|
||||||
],
|
],
|
||||||
mlogtype:"",
|
mlogtype:"",
|
||||||
|
route_code:"",
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
options: [],
|
options: [],
|
||||||
|
|
@ -338,6 +345,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
|
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
|
||||||
this.getRoute();
|
this.getRoute();
|
||||||
this.getUser();
|
this.getUser();
|
||||||
this.getSupplier();
|
this.getSupplier();
|
||||||
|
|
|
||||||
|
|
@ -17,63 +17,134 @@
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
style="padding: 0 10px"
|
style="padding: 0 10px"
|
||||||
>
|
>
|
||||||
<el-form-item label="关联任务" v-if="!isfix">
|
<el-row>
|
||||||
<el-select
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
v-model="form.mtask"
|
<el-form-item label="关联任务" v-if="!isfix">
|
||||||
placeholder="关联任务"
|
<el-select
|
||||||
clearable
|
v-model="form.mtask"
|
||||||
style="width: 100%"
|
placeholder="关联任务"
|
||||||
@change="getMaterial"
|
clearable
|
||||||
>
|
class="width-100"
|
||||||
<el-option
|
@change="getMaterial"
|
||||||
v-for="item in options"
|
>
|
||||||
:key="item.id"
|
<el-option
|
||||||
:label="item.number"
|
v-for="item in options"
|
||||||
:value="item.id"
|
:key="item.id"
|
||||||
|
:label="item.number"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="批次选择">
|
||||||
|
<el-select
|
||||||
|
v-model="batchs"
|
||||||
|
placeholder="批次选择"
|
||||||
|
clearable
|
||||||
|
class="width-100"
|
||||||
|
@change="changeMaterial"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col>
|
||||||
|
<el-form-item label="物料扫码" style="display: flex;">
|
||||||
|
<scScanner @scanResult="formWminChange"></scScanner>
|
||||||
|
<el-input ref="codeInput" v-model="wm_in" clearable @change="formWminChange(wm_in)" style="width: 200px;margin-left: 4px;"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="使用数量" prop="count_use">
|
||||||
|
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable class="width-100"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
||||||
|
<el-form-item label="生产设备">
|
||||||
|
<el-select
|
||||||
|
v-model="form.equipment"
|
||||||
|
placeholder="生产设备"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in optionsEq"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float:left">{{item.name}}</span>
|
||||||
|
<span style="float:right">{{item.number}}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
||||||
|
<el-form-item label="操作人">
|
||||||
|
<ehsSelect
|
||||||
|
v-model="form.handle_user"
|
||||||
|
:showName="form.handle_user_name"
|
||||||
|
:apiObj="this.$API.system.user.list"
|
||||||
|
:params="{ depts: dept }"
|
||||||
|
class="width-100"
|
||||||
|
></ehsSelect>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
||||||
|
<el-form-item
|
||||||
|
label="开始时间"
|
||||||
|
prop="work_start_time"
|
||||||
>
|
>
|
||||||
</el-option>
|
<el-date-picker
|
||||||
</el-select>
|
:disabled="mode == 'edit'"
|
||||||
</el-form-item>
|
v-model="form.work_start_time"
|
||||||
<el-form-item label="批次选择">
|
type="datetime"
|
||||||
<el-select
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
v-model="batchs"
|
style="width: 100%;"
|
||||||
placeholder="批次选择"
|
popper-append-to-body
|
||||||
clearable
|
/>
|
||||||
style="width: 100%"
|
</el-form-item>
|
||||||
@change="changeMaterial"
|
</el-col>
|
||||||
>
|
<el-col :md="12" :sm="12" :xs="24" v-if="route_code=='niuzhuan'">
|
||||||
<el-option
|
<el-form-item label="结束时间" prop="work_end_time">
|
||||||
v-for="item in materialOptions"
|
<el-date-picker
|
||||||
:key="item.id"
|
v-model="form.work_end_time"
|
||||||
:label="item.batch"
|
type="datetime"
|
||||||
:value="item.id"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
>
|
style="width: 100%;"
|
||||||
</el-option>
|
:disabledDate="disabledDateFn"
|
||||||
</el-select>
|
popper-append-to-body
|
||||||
</el-form-item>
|
/>
|
||||||
<el-form-item label="物料扫码" style="display: flex;">
|
</el-form-item>
|
||||||
<scScanner @scanResult="formWminChange"></scScanner>
|
</el-col> -->
|
||||||
<el-input ref="codeInput" v-model="wm_in" clearable @change="formWminChange(wm_in)" style="width: 200px;margin-left: 4px;"></el-input>
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
</el-form-item>
|
<el-form-item label="主要批次" v-if="!isfix">
|
||||||
<el-form-item label="使用数量" prop="count_use">
|
<el-select
|
||||||
<el-input-number ref="codeInput" v-model="form.count_use" :min="0" clearable></el-input-number>
|
v-model="form.parent"
|
||||||
</el-form-item>
|
placeholder="主要批次"
|
||||||
<el-form-item label="主要批次" v-if="!isfix">
|
clearable
|
||||||
<el-select
|
class="width-100"
|
||||||
v-model="form.parent"
|
>
|
||||||
placeholder="主要批次"
|
<el-option
|
||||||
clearable
|
v-for="item in mlogbInOptions"
|
||||||
style="width: 100%"
|
:key="item.id"
|
||||||
>
|
:label="item.batch"
|
||||||
<el-option
|
:value="item.id"
|
||||||
v-for="item in mlogbInOptions"
|
>
|
||||||
:key="item.id"
|
</el-option>
|
||||||
:label="item.batch"
|
</el-select>
|
||||||
:value="item.id"
|
</el-form-item>
|
||||||
>
|
</el-col>
|
||||||
</el-option>
|
</el-row>
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit">提交</el-button>
|
<el-button type="primary" :loading="isSaveing" @click="submit">提交</el-button>
|
||||||
|
|
@ -144,8 +215,10 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
wm_in:'',
|
wm_in:'',
|
||||||
|
route_code:"",
|
||||||
mlogbIns:[],
|
mlogbIns:[],
|
||||||
options: [],
|
options: [],
|
||||||
|
optionsEq: [],
|
||||||
mlogbInOptions:[],
|
mlogbInOptions:[],
|
||||||
materialOptions: [],
|
materialOptions: [],
|
||||||
mgroup_code:'',
|
mgroup_code:'',
|
||||||
|
|
@ -168,6 +241,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
this.form.mlog = this.mlog;
|
this.form.mlog = this.mlog;
|
||||||
this.params.mlog = this.mlog;
|
this.params.mlog = this.mlog;
|
||||||
let arr = this.$route.path.split("/");
|
let arr = this.$route.path.split("/");
|
||||||
|
|
@ -176,6 +250,7 @@ export default {
|
||||||
this.getMtask();
|
this.getMtask();
|
||||||
this.getMaterial();
|
this.getMaterial();
|
||||||
this.getParentList();
|
this.getParentList();
|
||||||
|
this.getEquipment();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
|
|
@ -195,6 +270,17 @@ export default {
|
||||||
that.mlogbIns = res;
|
that.mlogbIns = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getEquipment() {
|
||||||
|
let that = this;
|
||||||
|
this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => {
|
||||||
|
res.forEach((item) => {
|
||||||
|
let obj = {};
|
||||||
|
Object.assign(obj, item);
|
||||||
|
obj.label = item.name+'-'+item.number;
|
||||||
|
that.optionsEq.push(obj);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
getParentList(){
|
getParentList(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.mlogb.list.req(that.params).then((res) => {
|
that.$API.wpm.mlogb.list.req(that.params).then((res) => {
|
||||||
|
|
@ -350,8 +436,6 @@ export default {
|
||||||
that.form.batch = '';
|
that.form.batch = '';
|
||||||
that.form.parent = '';
|
that.form.parent = '';
|
||||||
that.form.count_use = 0;
|
that.form.count_use = 0;
|
||||||
// that.scanKyes!=='mat'&&that.mlogbInCount>1
|
|
||||||
// that.bwItemForm.wpr!=""
|
|
||||||
if(that.scanKyes!=='mat'&&that.mlogbInCount>1){
|
if(that.scanKyes!=='mat'&&that.mlogbInCount>1){
|
||||||
that.bwItemForm.mlogb = res.id;
|
that.bwItemForm.mlogb = res.id;
|
||||||
that.$API.wpm.mlogbw.create.req(that.bwItemForm).then((res) => {
|
that.$API.wpm.mlogbw.create.req(that.bwItemForm).then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<span v-if="!scope.row.isEdit&&mode == 'outs'">{{ scope.row.number }}</span>
|
<span v-if="!scope.row.isEdit&&mode == 'outs'">{{ scope.row.number }}</span>
|
||||||
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
|
<el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input>
|
||||||
<el-select
|
<el-select
|
||||||
v-if="scope.row.isEdit&&mode == 'ins'"
|
v-if="scope.row.isEdit&&mode == 'ins'&&route_code!=='niuzhuan'"
|
||||||
v-model="scope.row.wpr"
|
v-model="scope.row.wpr"
|
||||||
placeholder="动态成品"
|
placeholder="动态成品"
|
||||||
clearable
|
clearable
|
||||||
|
|
@ -60,6 +60,53 @@
|
||||||
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
|
<span v-if="!scope.row.isEdit&&mode == 'ins'">{{ scope.row.number }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="生产设备" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-select
|
||||||
|
v-model="scope.row.equip"
|
||||||
|
placeholder="生产设备"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
:disabled="!scope.row.isEdit"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in optionsEq"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
<span style="float:left">{{item.name}}</span>
|
||||||
|
<span style="float:right">{{item.number}}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="开始时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-date-picker
|
||||||
|
:disabled="!scope.row.isEdit"
|
||||||
|
v-model="scope.row.work_start_time"
|
||||||
|
type="datetime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
popper-append-to-body
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间" min-width="80px" v-if="mode == 'ins'&&route_code=='niuzhuan'">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="scope.row.work_end_time"
|
||||||
|
type="datetime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
style="width: 100%;"
|
||||||
|
:disabled="!scope.row.isEdit"
|
||||||
|
popper-append-to-body
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -158,7 +205,7 @@
|
||||||
>取消</el-link
|
>取消</el-link
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="!scope.row.isEdit&&mode=='outs'"
|
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="formTableEdit(scope.row)"
|
@click="formTableEdit(scope.row)"
|
||||||
|
|
@ -328,7 +375,6 @@
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import mockData from "./mock.json";
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
mlogb: {
|
mlogb: {
|
||||||
|
|
@ -393,6 +439,7 @@ export default {
|
||||||
qct:"",
|
qct:"",
|
||||||
values:"",
|
values:"",
|
||||||
wprNumber:"",
|
wprNumber:"",
|
||||||
|
route_code:"",
|
||||||
wprInputText:"",
|
wprInputText:"",
|
||||||
params: {mlogb:'',page:0},
|
params: {mlogb:'',page:0},
|
||||||
hideAdd: true,
|
hideAdd: true,
|
||||||
|
|
@ -425,6 +472,7 @@ export default {
|
||||||
equipment:[{ required: true, message: "请选择设备" }],
|
equipment:[{ required: true, message: "请选择设备" }],
|
||||||
|
|
||||||
},
|
},
|
||||||
|
optionsEq:[],
|
||||||
defectlists:[],
|
defectlists:[],
|
||||||
testitemlists:[],
|
testitemlists:[],
|
||||||
qct_defects_origin:[],
|
qct_defects_origin:[],
|
||||||
|
|
@ -436,6 +484,10 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
|
if(this.route_code=='niuzhuan'){
|
||||||
|
this.getEquipment4();
|
||||||
|
}
|
||||||
that.hideAdd = that.isSubmit;
|
that.hideAdd = that.isSubmit;
|
||||||
if(that.mgroupName!=='排板'){
|
if(that.mgroupName!=='排板'){
|
||||||
that.addTemplate.number = that.batchNumber;
|
that.addTemplate.number = that.batchNumber;
|
||||||
|
|
@ -467,6 +519,12 @@ export default {
|
||||||
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
|
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
|
||||||
},500)
|
},500)
|
||||||
},
|
},
|
||||||
|
getEquipment4() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.em.equipment.list.req({page:0,cate__code:"4"}).then((res) => {
|
||||||
|
that.optionsEq = res;
|
||||||
|
})
|
||||||
|
},
|
||||||
getEquipments(){
|
getEquipments(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.em.equipment.list.req({page:0,cate__code:"6"}).then((res) => {
|
that.$API.em.equipment.list.req({page:0,cate__code:"6"}).then((res) => {
|
||||||
|
|
@ -493,14 +551,14 @@ export default {
|
||||||
|
|
||||||
obj2.addto_wpr = item2.addto_wpr;
|
obj2.addto_wpr = item2.addto_wpr;
|
||||||
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
|
||||||
obj2.value = 0;
|
obj2.value = null;
|
||||||
that.addTemplate[item2.testitem_name] = 0;
|
that.addTemplate[item2.testitem_name] = null;
|
||||||
}
|
}
|
||||||
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
|
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
|
||||||
let str = obj2.testitem_choices.replace(/'/g, '"');
|
let str = obj2.testitem_choices.replace(/'/g, '"');
|
||||||
let arr = JSON.parse(str);
|
let arr = JSON.parse(str);
|
||||||
obj2.testitem_choices = arr;
|
obj2.testitem_choices = arr;
|
||||||
that.addTemplate[item2.testitem_name] = '';
|
that.addTemplate[item2.testitem_name] = null;
|
||||||
}
|
}
|
||||||
that.qct_testitems.push(obj2);
|
that.qct_testitems.push(obj2);
|
||||||
})
|
})
|
||||||
|
|
@ -552,11 +610,12 @@ export default {
|
||||||
obj[item1.defect_name] = false;
|
obj[item1.defect_name] = false;
|
||||||
})
|
})
|
||||||
that.qct_testitems.forEach((item2) => {
|
that.qct_testitems.forEach((item2) => {
|
||||||
if(item2.testitem_field_type=='input-number'||item.testitem_field_type=='input-int'){
|
obj[item2.testitem_name] = null;
|
||||||
obj[item2.testitem_name] = 0;
|
// if(item2.testitem_field_type=='input-number'||item.testitem_field_type=='input-int'){
|
||||||
}else{
|
// obj[item2.testitem_name] = null;
|
||||||
obj[item2.testitem_name] = "";
|
// }else{
|
||||||
}
|
// obj[item2.testitem_name] = "";
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -618,7 +677,12 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('obj',obj);
|
// console.log('obj',obj);
|
||||||
|
if(that.mode == 'ins'&&that.route_code=='niuzhuan'){
|
||||||
|
obj.equip = row.equip;
|
||||||
|
obj.work_start_time = row.work_start_time;
|
||||||
|
obj.work_end_time = row.work_end_time;
|
||||||
|
}
|
||||||
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||||
obj.id = row.id;
|
obj.id = row.id;
|
||||||
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
||||||
|
|
@ -867,9 +931,6 @@ export default {
|
||||||
//执行cd_req_addr,获取检测设备的数据
|
//执行cd_req_addr,获取检测设备的数据
|
||||||
that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => {
|
that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => {
|
||||||
//例:res:[{"ZValue": "-0.18", "machineId": "testMachine","XValue": "-127.5831","YValue": "-12.5523"}]
|
//例:res:[{"ZValue": "-0.18", "machineId": "testMachine","XValue": "-127.5831","YValue": "-12.5523"}]
|
||||||
let x = res.XValue;
|
|
||||||
let y = res.YValue;
|
|
||||||
let z = res.ZValue;
|
|
||||||
//遍历检测项,查看是否有cd_expr
|
//遍历检测项,查看是否有cd_expr
|
||||||
that.qct_testitems.forEach(item0 => {
|
that.qct_testitems.forEach(item0 => {
|
||||||
if(item0.testitem_cd_expr!=null){
|
if(item0.testitem_cd_expr!=null){
|
||||||
|
|
|
||||||
|
|
@ -121,15 +121,14 @@
|
||||||
width="150"
|
width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
v-auth="'mlog.update'"
|
type="success"
|
||||||
v-if="scope.row.submit_time == null"
|
v-if="route_code=='ladansi'||route_code=='yicifusi'||route_code=='ercifusi'||route_code=='zlybcl'"
|
||||||
type="primary"
|
@click.stop="table_monitor(scope.row)"
|
||||||
@click.stop="table_edit(scope.row)"
|
>监测</el-button
|
||||||
>编辑</el-button
|
>
|
||||||
> -->
|
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -180,11 +179,19 @@
|
||||||
@closed="detailClose"
|
@closed="detailClose"
|
||||||
>
|
>
|
||||||
</detail-drawer>
|
</detail-drawer>
|
||||||
|
<monitor-drawer
|
||||||
|
v-if="dialog.monitor"
|
||||||
|
ref="monitorDialog"
|
||||||
|
:endTime="endTime"
|
||||||
|
:startTime="startTime"
|
||||||
|
:equipmentId="equipmentId"
|
||||||
|
></monitor-drawer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./mlog_form.vue";
|
import saveDialog from "./mlog_form.vue";
|
||||||
import detailDrawer from "./mlog_detail.vue";
|
import detailDrawer from "./mlog_detail.vue";
|
||||||
|
import monitorDrawer from "./monitor_detail.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -201,6 +208,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
detailDrawer,
|
detailDrawer,
|
||||||
|
monitorDrawer
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -210,6 +218,7 @@ export default {
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
detail: false,
|
detail: false,
|
||||||
|
monitor:false,
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
|
|
@ -217,6 +226,8 @@ export default {
|
||||||
mlogId: "",
|
mlogId: "",
|
||||||
deptId: null,
|
deptId: null,
|
||||||
processId: "",
|
processId: "",
|
||||||
|
route_code: "",
|
||||||
|
equipmentId: "",
|
||||||
processCate: "",
|
processCate: "",
|
||||||
mgroupMtype: "",
|
mgroupMtype: "",
|
||||||
showHidden:false,
|
showHidden:false,
|
||||||
|
|
@ -234,6 +245,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.route_code = this.$route.path.split("/")[2];
|
||||||
that.params.mgroup =that.mgroupId;
|
that.params.mgroup =that.mgroupId;
|
||||||
that.apiObj = that.$API.wpm.mlog.list;
|
that.apiObj = that.$API.wpm.mlog.list;
|
||||||
this.getMgroupInfo();
|
this.getMgroupInfo();
|
||||||
|
|
@ -277,6 +289,20 @@ export default {
|
||||||
this.dialog.detail = false;
|
this.dialog.detail = false;
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
},
|
},
|
||||||
|
table_monitor(row){
|
||||||
|
let that= this;
|
||||||
|
if(row.equipment!==null){
|
||||||
|
that.equipmentId = row.equipment;
|
||||||
|
that.endTime = row.work_end_time;
|
||||||
|
that.startTime = row.work_start_time;
|
||||||
|
that.dialog.monitor = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.monitorDialog.open("add");
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
that.$message.error("该日志未关联设备,请选择设备后重新查看");
|
||||||
|
}
|
||||||
|
},
|
||||||
//添加日志
|
//添加日志
|
||||||
table_add() {
|
table_add() {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
<!-- 日志详情 mlog信息以及mlogb -->
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
title="监测数据"
|
||||||
|
v-model="visible"
|
||||||
|
:size="'65%'"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
|
<div id="tableWap" style="height: 100%;">
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane v-for="item in mpointList" :label="item.name" :name="item.name" :key="item.id" lazy>
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:height="tableHeight"
|
||||||
|
:params="{'mpoint':item.id, 'timex_gte':startTime, 'timex_lte':endTime}"
|
||||||
|
hideDo
|
||||||
|
>
|
||||||
|
<el-table-column label="时间" prop="timex">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数值" prop="val_float">
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
equipmentId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
endTime: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
startTime: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emits: ["success", "closed"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj:null,
|
||||||
|
loading: false,
|
||||||
|
isSaveing: false,
|
||||||
|
visible: false,
|
||||||
|
params:{},
|
||||||
|
query:{},
|
||||||
|
mpointList:[],
|
||||||
|
activeName: "",
|
||||||
|
tableHeight:300,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
that.params.timex__gte = that.startTime;
|
||||||
|
that.params.timex__lte = that.endTime;
|
||||||
|
that.$API.enm.mpoint.list.req({ep_belong:that.equipmentId,page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.mpointList = res;
|
||||||
|
that.activeName = res[0].name;
|
||||||
|
that.params.mpoint = res[0].id;
|
||||||
|
that.apiObj = that.$API.enm.mplogx;
|
||||||
|
}else{
|
||||||
|
that.$message.error("该设备没有监测点");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
let that = this;
|
||||||
|
this.visible = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
let height = document.getElementById("tableWap").clientHeight;
|
||||||
|
console.log('height',height)
|
||||||
|
that.tableHeight = height - 45;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleClick(val){
|
||||||
|
let that = this;
|
||||||
|
that.mpointList.forEach(item=>{
|
||||||
|
if(item.name == that.activeName){
|
||||||
|
that.query.mpoint = item.id;
|
||||||
|
that.query.page = 1;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.file_show{
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
background: rgb(255,255,255);
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -354,6 +354,7 @@ export default {
|
||||||
},
|
},
|
||||||
qct:'',
|
qct:'',
|
||||||
codeText:'',
|
codeText:'',
|
||||||
|
codeBatch:'',
|
||||||
mgroupName:'',
|
mgroupName:'',
|
||||||
materialCount:1,//领料批次现有库存数
|
materialCount:1,//领料批次现有库存数
|
||||||
material_in:'',
|
material_in:'',
|
||||||
|
|
@ -481,7 +482,7 @@ export default {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res;
|
||||||
if(that.codeText!==''){
|
if(that.codeText!==''){
|
||||||
res.forEach(item=>{
|
res.forEach(item=>{
|
||||||
if(item.batch == that.codeText){
|
if(item.batch == that.codeBatch){
|
||||||
that.form.wm_in = item.id;
|
that.form.wm_in = item.id;
|
||||||
that.form.batch = item.batch;
|
that.form.batch = item.batch;
|
||||||
that.materialCount = that.form.count_use = that.form.count_ok = item.count_cando;
|
that.materialCount = that.form.count_use = that.form.count_ok = item.count_cando;
|
||||||
|
|
@ -506,12 +507,21 @@ export default {
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add",codeText) {
|
open(mode = "add",codeText) {
|
||||||
this.mode = mode;
|
let that = this;
|
||||||
this.visible = true;
|
that.mode = mode;
|
||||||
if(codeText){
|
that.visible = true;
|
||||||
this.codeText = codeText;
|
if(codeText!==''){
|
||||||
|
that.codeText = codeText;
|
||||||
|
let id = codeText.split('#')[1];
|
||||||
|
that.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
|
that.codeBatch = res.batch;
|
||||||
|
that.getMaterial();
|
||||||
|
}).catch((err) => {
|
||||||
|
that.getMaterial();
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.getMaterial();
|
||||||
}
|
}
|
||||||
this.getMaterial();
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,8 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
<save-dialog
|
<save-dialog
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialogs"
|
||||||
:fmlog="params.fmlog"
|
:fmlog="fmlogId"
|
||||||
:mgroup="mgroup"
|
:mgroup="mgroup"
|
||||||
:mtask="mtask"
|
:mtask="mtask"
|
||||||
:process="processId"
|
:process="processId"
|
||||||
|
|
@ -209,6 +209,14 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
mgroup: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
mtask: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
|
|
@ -237,7 +245,6 @@ export default {
|
||||||
page: 0,
|
page: 0,
|
||||||
fmlog: "",
|
fmlog: "",
|
||||||
},
|
},
|
||||||
mgroup: "",
|
|
||||||
fmlogItem: {},
|
fmlogItem: {},
|
||||||
saveInForm: {
|
saveInForm: {
|
||||||
count_use: 0,
|
count_use: 0,
|
||||||
|
|
@ -278,11 +285,18 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getfmlogItem();
|
this.getfmlogItem();
|
||||||
this.params.fmlog = this.fmlogId;
|
this.params.fmlog = this.fmlogId;
|
||||||
|
this.paramsWm.mgroup = this.mgroup;
|
||||||
this.apiObj = this.$API.wpm.mlog.list;
|
this.apiObj = this.$API.wpm.mlog.list;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(codeText="") {
|
open(codeText="") {
|
||||||
this.codeText = codeText;
|
this.codeText = codeText;
|
||||||
|
if(this.codeText!=""){
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.codeTextChange(codeText);
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -290,8 +304,6 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.fmlog.item.req(that.fmlogId).then((res) => {
|
that.$API.wpm.fmlog.item.req(that.fmlogId).then((res) => {
|
||||||
that.fmlogItem = res;
|
that.fmlogItem = res;
|
||||||
that.mgroup = res.mgroup;
|
|
||||||
that.mtask = res.mtask;
|
|
||||||
that.paramsWm.mgroup = res.mgroup;
|
that.paramsWm.mgroup = res.mgroup;
|
||||||
that.$API.wpm.mlog.list.req(that.params).then((res) => {
|
that.$API.wpm.mlog.list.req(that.params).then((res) => {
|
||||||
that.tableData = res;
|
that.tableData = res;
|
||||||
|
|
@ -301,9 +313,6 @@ export default {
|
||||||
})
|
})
|
||||||
that.paramsWm.search = that.batchContains;
|
that.paramsWm.search = that.batchContains;
|
||||||
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
||||||
if(that.codeText!=""){
|
|
||||||
this.codeTextChange(that.codeText);
|
|
||||||
}
|
|
||||||
}else{}
|
}else{}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -316,21 +325,19 @@ export default {
|
||||||
table_add() {
|
table_add() {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open('add');
|
this.$refs.saveDialogs.open('add');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
codeTextChange(codeText){
|
codeTextChange(codeText){
|
||||||
let that = this;
|
this.dialog.save = true;
|
||||||
that.codeText = codeText;
|
this.$nextTick(() => {
|
||||||
that.dialog.save = true;
|
this.$refs.saveDialogs.open('add',codeText);
|
||||||
that.$nextTick(() => {
|
|
||||||
that.$refs.saveDialog.open('add',codeText);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
table_edit(row){
|
table_edit(row){
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open('edit').setData(row);
|
this.$refs.saveDialogs.open('edit').setData(row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,8 @@
|
||||||
<detail-drawer
|
<detail-drawer
|
||||||
v-if="dialog.detail"
|
v-if="dialog.detail"
|
||||||
ref="detailDialog"
|
ref="detailDialog"
|
||||||
|
:mtask="mtaskId"
|
||||||
|
:mgroup="mgroupId"
|
||||||
:fmlogId="fmlogId"
|
:fmlogId="fmlogId"
|
||||||
:processId="processId"
|
:processId="processId"
|
||||||
@closed="detailClose"
|
@closed="detailClose"
|
||||||
|
|
@ -245,6 +247,7 @@ export default {
|
||||||
},
|
},
|
||||||
//日志详情
|
//日志详情
|
||||||
table_detail(row) {
|
table_detail(row) {
|
||||||
|
this.mtaskId = row.mtask;
|
||||||
this.fmlogId = row.id;
|
this.fmlogId = row.id;
|
||||||
this.dialog.detail = true;
|
this.dialog.detail = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
@ -271,30 +274,23 @@ export default {
|
||||||
codeTextChange(codeText){
|
codeTextChange(codeText){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.codeText = codeText;
|
that.codeText = codeText;
|
||||||
//根据扫描内容获取物料
|
let id = codeText.split('#')[1];
|
||||||
let obj = {};
|
that.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
obj.page=0;
|
|
||||||
obj.tag = 'todo';
|
|
||||||
obj.mgroup=that.mgroupId;
|
|
||||||
obj.batch=that.codeText;
|
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then(res=>{
|
|
||||||
//根据物料获取任务
|
|
||||||
let params = {}
|
let params = {}
|
||||||
params.page = 0;
|
params.page = 0;
|
||||||
params.state = 20;
|
params.state = 20;
|
||||||
params.mgroup = that.mgroupId;
|
params.mgroup = that.mgroupId;
|
||||||
params.route__material_in = res[0].material;
|
params.route__material_in = res.material;
|
||||||
that.$API.pm.mtask.list.req(params).then(res1=>{
|
that.$API.pm.mtask.list.req(params).then(res1=>{
|
||||||
if(res1.length==1){//只有一个任务,直接打开日志详情
|
if(res1.length==1){//只有一个任务,直接打开日志详情
|
||||||
that.mtaskId =res1[0].id;
|
that.mtaskId =res1[0].id;
|
||||||
that.changeMtask();
|
that.changeMtask();
|
||||||
// that.table_detail(res2[0]);
|
|
||||||
}else{//多个任务时,弹出任务选择框
|
}else{//多个任务时,弹出任务选择框
|
||||||
that.mtaskoptions = res1;
|
that.mtaskoptions = res1;
|
||||||
that.dialog.mtask = true;
|
that.dialog.mtask = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}).catch((err) => {})
|
||||||
},
|
},
|
||||||
changeMtask(){
|
changeMtask(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,6 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import scanDialog from "./../template/scan.vue";
|
|
||||||
export default {
|
export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -217,9 +216,6 @@ export default {
|
||||||
default:false
|
default:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
scanDialog
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
change_batch:false,
|
change_batch:false,
|
||||||
|
|
@ -598,22 +594,14 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
data = data.replace(' ','');
|
data = data.replace(' ','');
|
||||||
let id = data.split('#')[1];
|
let id = data.split('#')[1];
|
||||||
console.log('id',id);
|
|
||||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
console.log('res',res);
|
|
||||||
let arr = that.form.handoverb.filter((item) => {
|
let arr = that.form.handoverb.filter((item) => {
|
||||||
return item.batch == res.batch;
|
return item.batch == res.batch;
|
||||||
})
|
})
|
||||||
console.log('arr',arr);
|
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
that.$message.error("该批次已存在")
|
that.$message.error("该批次已存在")
|
||||||
}else{
|
}else{
|
||||||
console.log('that.materialOptions',that.materialOptions);
|
|
||||||
that.materialOptions.forEach((item) => {
|
that.materialOptions.forEach((item) => {
|
||||||
console.log('item',item);
|
|
||||||
console.log('item.batch',item.batch);
|
|
||||||
console.log('res.batch',res.batch);
|
|
||||||
console.log('item.batch == res.batch',item.batch == res.batch);
|
|
||||||
if(item.batch == res.batch){
|
if(item.batch == res.batch){
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
|
|
@ -621,7 +609,6 @@ export default {
|
||||||
obj.counts = item.count;
|
obj.counts = item.count;
|
||||||
obj.count = item.count;
|
obj.count = item.count;
|
||||||
that.form.handoverb.push(obj)
|
that.form.handoverb.push(obj)
|
||||||
that.$refs.scanDialog.closed();
|
|
||||||
that.getResaveMgroups(item.material);
|
that.getResaveMgroups(item.material);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
<el-form-item label="开始层数">
|
<el-form-item label="开始层数">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="cell_start"
|
v-model="cell_start"
|
||||||
:min="0"
|
:min="1"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
@change="cellStartChanges"
|
@change="cellStartChanges"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
style="width:90%"
|
style="width:90%"
|
||||||
v-model="item.floor"
|
v-model="item.floor"
|
||||||
:min="0"
|
:min="1"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
placeholder="层数"
|
placeholder="层数"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
|
@ -227,7 +227,7 @@ export default {
|
||||||
},
|
},
|
||||||
cells:0,//层数
|
cells:0,//层数
|
||||||
count_cell:0,//每层数量
|
count_cell:0,//每层数量
|
||||||
cell_start:0,//开始层数
|
cell_start:1,//开始层数
|
||||||
codeBatch:"",
|
codeBatch:"",
|
||||||
options: [],
|
options: [],
|
||||||
cellsList:[],
|
cellsList:[],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue