fix:玻纤生产执行
This commit is contained in:
parent
e32d444e57
commit
69307c7590
|
@ -14,7 +14,7 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add(20)"
|
@click="table_add(20)"
|
||||||
v-auth="'handover.create'"
|
v-auth="'handover.create'"
|
||||||
v-if="mgroupName!=='切片'"
|
v-if="mgroup_name!=='切片'&&mgroup_name!=='拉单丝'&&mgroup_name!=='一次复丝'&&mgroup_name!=='二次复丝'&&mgroup_name!=='切丝排版'"
|
||||||
>返工</el-button
|
>返工</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add(30)"
|
@click="table_add(30)"
|
||||||
v-auth="'handover.create'"
|
v-auth="'handover.create'"
|
||||||
v-if="mgroupName=='一次超洗'||mgroupName=='二次超洗'"
|
v-if="mgroup_name=='一次超洗'||mgroup_name=='二次超洗'"
|
||||||
>检验</el-button
|
>检验</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="80"></el-table-column>
|
<el-table-column label="数量" prop="count" width="80"></el-table-column>
|
||||||
<el-table-column label="交接类型" prop="type" width="100">
|
<el-table-column label="交接类型" prop="type" width="100">
|
||||||
<template #default="scope" v-if="mgroupName=='size'||mgroupName=='facade'">
|
<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.send_dept == deptId" type="primary">交送</el-text>
|
||||||
<el-text v-if="scope.row.recive_dept == deptId" type="success">接收</el-text>
|
<el-text v-if="scope.row.recive_dept == deptId" type="success">接收</el-text>
|
||||||
</template>
|
</template>
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
:type="type"
|
:type="type"
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroup_name"
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
|
@ -279,92 +279,70 @@ export default {
|
||||||
printer_name: "",
|
printer_name: "",
|
||||||
printVisible:false,
|
printVisible:false,
|
||||||
setNameVisible: false,
|
setNameVisible: false,
|
||||||
testCode: "mat:3689278065261125632",
|
mgroup_name:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
mgroupName: {
|
||||||
|
handler: function (newval,odlval) {
|
||||||
|
let that = this;
|
||||||
|
that.params.dept = "";
|
||||||
|
that.params.mgroup = "";
|
||||||
|
that.apiObj = null;
|
||||||
|
that.mgroup_name = newval;
|
||||||
|
that.getMgroupInfo();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
// this.getMgroupInfo();
|
||||||
console.log('that.mgroupName',that.mgroupName);
|
|
||||||
if(that.mgroupName=="size"){//尺寸检验
|
|
||||||
// that.params.material__process__name="一次超洗";
|
|
||||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
|
||||||
if(res.length>0){
|
|
||||||
that.deptId = res[0].id;
|
|
||||||
that.params.dept=res[0].id;
|
|
||||||
console.log('that.deptId',that.deptId);
|
|
||||||
}
|
|
||||||
that.apiObj = that.$API.wpm.handover.list;
|
|
||||||
})
|
|
||||||
}else if(that.mgroupName=="facade"){//外观检验
|
|
||||||
// that.params.material__process__name="二次超洗";
|
|
||||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
|
||||||
if(res.length>0){
|
|
||||||
that.deptId = res[0].id;
|
|
||||||
that.params.dept=res[0].id;
|
|
||||||
console.log('that.deptId',that.deptId);
|
|
||||||
}
|
|
||||||
that.apiObj = that.$API.wpm.handover.list;
|
|
||||||
})
|
|
||||||
}else{//工段交接
|
|
||||||
that.printer_name = localStorage.getItem("printer_name");
|
|
||||||
that.$API.mtm.mgroup.list
|
|
||||||
.req({ page: 0, name: that.mgroupName })
|
|
||||||
.then((res) => {
|
|
||||||
if (res.length < 1) {
|
|
||||||
that.$message.error("获取工段错误");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
|
||||||
that.mgroupId = res[0].id;
|
|
||||||
that.processId = res[0].process;
|
|
||||||
that.processCate = res[0].process_cate;
|
|
||||||
that.params.mgroup = that.mgroupId;
|
|
||||||
that.apiObj = that.$API.wpm.handover.list;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getMgroupInfo(){
|
||||||
|
let that = this;
|
||||||
|
console.log('that.mgroup_name',that.mgroup_name);
|
||||||
|
if(that.mgroup_name=="size"){//尺寸检验
|
||||||
|
// that.params.material__process__name="一次超洗";
|
||||||
|
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.deptId = res[0].id;
|
||||||
|
that.params.dept=res[0].id;
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.handover.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
})
|
||||||
|
}else if(that.mgroup_name=="facade"){//外观检验
|
||||||
|
// that.params.material__process__name="二次超洗";
|
||||||
|
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.deptId = res[0].id;
|
||||||
|
that.params.dept=res[0].id;
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.handover.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
})
|
||||||
|
}else{//工段交接
|
||||||
|
that.printer_name = localStorage.getItem("printer_name");
|
||||||
|
that.$API.mtm.mgroup.list
|
||||||
|
.req({ page: 0, name: that.mgroup_name })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.length < 1) {
|
||||||
|
that.$message.error("获取工段错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||||
|
that.mgroupId = res[0].id;
|
||||||
|
that.processId = res[0].process;
|
||||||
|
that.processCate = res[0].process_cate;
|
||||||
|
that.params.mgroup = that.mgroupId;
|
||||||
|
that.apiObj = that.$API.wpm.handover.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
printSetting(){
|
printSetting(){
|
||||||
this.setNameVisible = true;
|
this.setNameVisible = true;
|
||||||
},
|
},
|
||||||
handoverPrint(row) {
|
|
||||||
let that = this;
|
|
||||||
let str = [
|
|
||||||
"SIZE 60 mm,90 mm",
|
|
||||||
"GAP 0 mm,0 mm",
|
|
||||||
"CLS",
|
|
||||||
'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
|
|
||||||
"WINTEXT 0,200,36,0,0,0,Simhei," +row.material_name,
|
|
||||||
"WINTEXT 0,240,36,0,0,0,Simhei,批次:" +
|
|
||||||
row.batch,
|
|
||||||
];
|
|
||||||
if(row.wm_notok_sign!==null){
|
|
||||||
str.push("WINTEXT 0,280,36,0,0,0,Simhei,不合格原因:" +
|
|
||||||
row.wm_notok_sign,)
|
|
||||||
}
|
|
||||||
//供应商----原料、辅料
|
|
||||||
// if(row.type==30||row.type==40){
|
|
||||||
// str.push("WINTEXT 50,460,36,0,0,0,Simhei,供应商:" +
|
|
||||||
// row.supplier_name,)
|
|
||||||
// }
|
|
||||||
str.push("PRINT 1",)
|
|
||||||
// let str = [
|
|
||||||
// "SIZE 60 mm,90 mm",
|
|
||||||
// "GAP 0 mm,0 mm",
|
|
||||||
// "CLS",
|
|
||||||
// "WINTEXT 0,10,36,0,0,0,Simhei," +row.material_name,
|
|
||||||
// 'QRCODE 0,60,H,5,A,0,"' +that.testCode +'"',
|
|
||||||
// "WINTEXT 50,340,36,0,0,0,Simhei,批次:" +
|
|
||||||
// row.batch,
|
|
||||||
// "WINTEXT 50,400,36,0,0,0,Simhei,不合格原因:" +
|
|
||||||
// row.wm_notok_sign,
|
|
||||||
// "PRINT 1",
|
|
||||||
// ];
|
|
||||||
let obj = {};
|
|
||||||
obj.printer_commands = str;
|
|
||||||
obj.printer_name = that.printer_name;
|
|
||||||
this.$API.wpm.prints.req(obj).then((response) => {});
|
|
||||||
},
|
|
||||||
//添加
|
//添加
|
||||||
table_add(type) {
|
table_add(type) {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
|
@ -410,7 +388,7 @@ export default {
|
||||||
searchTypeQuery() {
|
searchTypeQuery() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if (that.searchType == "send") {
|
if (that.searchType == "send") {
|
||||||
if(that.mgroupName=="size"||that.mgroupName=="facade"){
|
if(that.mgroup_name=="size"||that.mgroup_name=="facade"){
|
||||||
that.query.send_dept = that.deptId;
|
that.query.send_dept = that.deptId;
|
||||||
that.query.recive_dept = "";
|
that.query.recive_dept = "";
|
||||||
}else{
|
}else{
|
||||||
|
@ -418,7 +396,7 @@ export default {
|
||||||
that.query.recive_mgroup = "";
|
that.query.recive_mgroup = "";
|
||||||
}
|
}
|
||||||
} else if (that.searchType == "recive") {
|
} else if (that.searchType == "recive") {
|
||||||
if(that.mgroupName=="size"||that.mgroupName=="facade"){
|
if(that.mgroup_name=="size"||that.mgroup_name=="facade"){
|
||||||
that.query.send_dept = "";
|
that.query.send_dept = "";
|
||||||
that.query.recive_dept =that.deptId;
|
that.query.recive_dept =that.deptId;
|
||||||
}else{
|
}else{
|
||||||
|
@ -445,19 +423,6 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.handoverItem = row;
|
that.handoverItem = row;
|
||||||
that.printVisible = true;
|
that.printVisible = true;
|
||||||
//打印
|
|
||||||
// if (
|
|
||||||
// that.printer_name == null ||
|
|
||||||
// that.printer_name == "" ||
|
|
||||||
// that.printer_name == undefined
|
|
||||||
// ) {
|
|
||||||
// this.setNameVisible = true;
|
|
||||||
// } else {
|
|
||||||
// that.$API.wpm.handover.item.req(row.id).then((res) => {
|
|
||||||
// that.handoverItem = res;
|
|
||||||
// that.handoverPrint(row);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
savePrinter() {
|
savePrinter() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
报废</el-button>
|
报废</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<!-- <el-button type="primary" @click="materialsChoses('wm')"
|
|
||||||
>选择物料</el-button
|
|
||||||
> -->
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.state"
|
v-model="query.state"
|
||||||
placeholder="物料状态"
|
placeholder="物料状态"
|
||||||
|
@ -142,7 +139,7 @@
|
||||||
v-if="dialog.save"
|
v-if="dialog.save"
|
||||||
ref="saveDialog"
|
ref="saveDialog"
|
||||||
:mgroup="mgroupId"
|
:mgroup="mgroupId"
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroup_name"
|
||||||
:itemObj = "checkItem"
|
:itemObj = "checkItem"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
|
@ -152,7 +149,7 @@
|
||||||
v-if="dialog.scrap"
|
v-if="dialog.scrap"
|
||||||
ref="scrapDialog"
|
ref="scrapDialog"
|
||||||
:type="type"
|
:type="type"
|
||||||
:mgroupName="mgroupName"
|
:mgroupName="mgroup_name"
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
@success="handleScrapSuccess"
|
@success="handleScrapSuccess"
|
||||||
@closed="dialog.scrap = false"
|
@closed="dialog.scrap = false"
|
||||||
|
@ -248,47 +245,63 @@ export default {
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
wmId:'',
|
wmId:'',
|
||||||
|
mgroup_name:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {},
|
||||||
let that = this;
|
watch: {
|
||||||
console.log(that.mgroupName);
|
mgroupName: {
|
||||||
if(that.mgroupName=="size"){
|
handler: function (newval,odlval) {
|
||||||
// that.params.material__process__name = "一次超洗";
|
let that = this;
|
||||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
that.params.mgroupx = "";
|
||||||
if(res.length>0){
|
that.apiObj = null;
|
||||||
that.params.mgroupx = null;
|
that.mgroup_name = newval;
|
||||||
that.params.belong_dept=res[0].id;
|
that.getMgroupInfo();
|
||||||
}
|
},
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
},
|
||||||
})
|
|
||||||
}else if(that.mgroupName=="facade"){
|
|
||||||
// that.params.material__process__name = "二次超洗";
|
|
||||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
|
||||||
if(res.length>0){
|
|
||||||
that.params.mgroupx = null;
|
|
||||||
that.params.belong_dept=res[0].id;
|
|
||||||
}
|
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
that.$API.mtm.mgroup.list
|
|
||||||
.req({ page: 0, name: that.mgroupName })
|
|
||||||
.then((res) => {
|
|
||||||
if (res.length < 1) {
|
|
||||||
that.$message.error("获取工段错误");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
that.mgroupId = res[0].id;
|
|
||||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
|
||||||
that.process = res[0].process;
|
|
||||||
that.params.mgroupx = res[0].id;
|
|
||||||
that.params.belong_dept = res[0].belong_dept;
|
|
||||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getMgroupInfo(){
|
||||||
|
let that = this;
|
||||||
|
console.log(that.mgroupName);
|
||||||
|
if(that.mgroupName=="size"){
|
||||||
|
// that.params.material__process__name = "一次超洗";
|
||||||
|
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.params.mgroupx = null;
|
||||||
|
that.params.belong_dept=res[0].id;
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
})
|
||||||
|
}else if(that.mgroupName=="facade"){
|
||||||
|
// that.params.material__process__name = "二次超洗";
|
||||||
|
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||||
|
if(res.length>0){
|
||||||
|
that.params.mgroupx = null;
|
||||||
|
that.params.belong_dept=res[0].id;
|
||||||
|
}
|
||||||
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.$API.mtm.mgroup.list
|
||||||
|
.req({ page: 0, name: that.mgroupName })
|
||||||
|
.then((res) => {
|
||||||
|
if (res.length < 1) {
|
||||||
|
that.$message.error("获取工段错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
that.mgroupId = res[0].id;
|
||||||
|
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||||
|
that.process = res[0].process;
|
||||||
|
that.params.mgroupx = res[0].id;
|
||||||
|
that.params.belong_dept = res[0].belong_dept;
|
||||||
|
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
add() {
|
add() {
|
||||||
this.dialog.save = true;
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-aside style="width: 100px;background: #ffffff;">
|
||||||
|
<ul style="padding-left: 7px;">
|
||||||
|
<li
|
||||||
|
v-for="(item,index) in mgroups"
|
||||||
|
:key="item.id"
|
||||||
|
:class="['mgroupItem',selectedIndex === index?'mgroupItemActive':'']"
|
||||||
|
@click="changeMgroup(item.id,index)"
|
||||||
|
>{{item.name}}</li>
|
||||||
|
</ul>
|
||||||
|
</el-aside>
|
||||||
|
<el-main>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<el-segmented
|
||||||
|
v-model="values"
|
||||||
|
:options="options"
|
||||||
|
size="default"
|
||||||
|
></el-segmented>
|
||||||
|
</el-header>
|
||||||
|
<el-main id="elMain" class="nopadding">
|
||||||
|
<!-- 日志 -->
|
||||||
|
<mlogs
|
||||||
|
v-if="values == '日志'"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
style="height: 60%"
|
||||||
|
></mlogs>
|
||||||
|
<mtask
|
||||||
|
v-if="values == '日志'"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
style="height: 40%"
|
||||||
|
></mtask>
|
||||||
|
<!-- 交接记录 -->
|
||||||
|
<handover
|
||||||
|
v-else-if="values == '交接记录'"
|
||||||
|
:mgroupName="mgroupName"
|
||||||
|
></handover>
|
||||||
|
<!-- 库存 -->
|
||||||
|
<inm v-else-if="values == '库存'" :mgroupName="mgroupName"></inm>
|
||||||
|
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import inm from "./inm.vue";
|
||||||
|
import mlogs from "./mlogs.vue";
|
||||||
|
import mtask from "./mtask.vue";
|
||||||
|
import handover from "./handover.vue";
|
||||||
|
export default {
|
||||||
|
name: "bx",
|
||||||
|
components: { inm, mlogs, mtask, handover },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mgroups:[],
|
||||||
|
tableHieght: 200,
|
||||||
|
options: ["日志", "交接记录", "库存"],
|
||||||
|
values: "日志",
|
||||||
|
mgroupName: "",
|
||||||
|
mgroupId: "",
|
||||||
|
selectedIndex:0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
let that = this;
|
||||||
|
that.getMgroups();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
let height = document.getElementById("elMain").clintHeight / 2;
|
||||||
|
that.tableHieght = height;
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange(value) {
|
||||||
|
this.value = value;
|
||||||
|
console.log("Selected value:", value);
|
||||||
|
},
|
||||||
|
getMgroups(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.mgroup.list.req({page:0}).then((res) => {
|
||||||
|
that.mgroups = res;
|
||||||
|
that.mgroupName = res[0].name;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
changeMgroup(id,index){
|
||||||
|
let that = this;
|
||||||
|
that.selectedIndex = index;
|
||||||
|
console.log(that.selectedIndex);
|
||||||
|
that.mgroupId = id;
|
||||||
|
that.mgroupName = that.mgroups[index].name;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.countBlock {
|
||||||
|
width: 80px;
|
||||||
|
color: #ffffff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.mgroupItem{
|
||||||
|
height: 35px;
|
||||||
|
width: 80px;
|
||||||
|
line-height: 35px;
|
||||||
|
margin: 5px 0;
|
||||||
|
text-align: center;
|
||||||
|
color: #6e80ff;
|
||||||
|
}
|
||||||
|
.mgroupItem:hover,.mgroupItemActive{
|
||||||
|
color: #6e80ff;
|
||||||
|
background: rgba(83, 109, 254, 0.2);
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -54,7 +54,7 @@
|
||||||
prop="equipment_name"
|
prop="equipment_name"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="进度" prop="belong_dept_name" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
<el-table-column label="进度" prop="belong_dept_name" v-if="mgroup_name=='黑化'||mgroup_name=='退火'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-progress id="progressbwlq" :percentage="customMethod(scope.row,1)" :stroke-width="20" :color="customMethod(scope.row,2)" :text-inside="true"><span>{{customMethod(scope.row,3)}}</span></el-progress>
|
<el-progress id="progressbwlq" :percentage="customMethod(scope.row,1)" :stroke-width="20" :color="customMethod(scope.row,2)" :text-inside="true"><span>{{customMethod(scope.row,3)}}</span></el-progress>
|
||||||
</template>
|
</template>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
prop="handle_user_name"
|
prop="handle_user_name"
|
||||||
width="80"
|
width="80"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="保温剩余时间" v-if="mgroupName=='黑化'||mgroupName=='退火'">
|
<el-table-column label="保温剩余时间" v-if="mgroup_name=='黑化'||mgroup_name=='退火'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ getRemaTime(scope.row) }}
|
{{ getRemaTime(scope.row) }}
|
||||||
</template>
|
</template>
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
:process="processId"
|
:process="processId"
|
||||||
:mgroup="mgroupId"
|
:mgroup="mgroupId"
|
||||||
:dept="deptId"
|
:dept="deptId"
|
||||||
:mgroupName = "mgroupName"
|
:mgroup_name = "mgroup_name"
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
>
|
>
|
||||||
|
@ -193,13 +193,27 @@ export default {
|
||||||
deptId: null,
|
deptId: null,
|
||||||
processId: "",
|
processId: "",
|
||||||
processCate: "",
|
processCate: "",
|
||||||
|
mgroup_name:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
mgroupName: {
|
||||||
|
handler: function (newval,odlval) {
|
||||||
|
let that = this;
|
||||||
|
that.params.mgroup = "";
|
||||||
|
that.apiObj = null;
|
||||||
|
that.mgroup_name = newval;
|
||||||
|
that.getMgroupInfo();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
// this.getMgroupInfo();
|
||||||
that.$API.mtm.mgroup.list
|
},
|
||||||
.req({ page: 0, name: that.mgroupName })
|
methods: {
|
||||||
.then((res) => {
|
getMgroupInfo(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.mgroup.list.req({ page: 0, name: that.mgroup_name }).then((res) => {
|
||||||
if (res.length < 1) {
|
if (res.length < 1) {
|
||||||
that.$message.error("获取工段错误");
|
that.$message.error("获取工段错误");
|
||||||
return;
|
return;
|
||||||
|
@ -210,9 +224,9 @@ export default {
|
||||||
that.processCate = res[0].process_cate;
|
that.processCate = res[0].process_cate;
|
||||||
that.params.mgroup = res[0].id;
|
that.params.mgroup = res[0].id;
|
||||||
that.apiObj = that.$API.wpm.mlog.list;
|
that.apiObj = that.$API.wpm.mlog.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
getRemaTime(row){
|
getRemaTime(row){
|
||||||
if(row.work_start_time !== null){
|
if(row.work_start_time !== null){
|
||||||
let times = 0;
|
let times = 0;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可用批" v-if="mgroupName!='切片'">
|
<el-table-column label="可用批" v-if="mgroup_name!='切片'">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
|
@ -138,13 +138,29 @@ export default {
|
||||||
// 40: "已提交",
|
// 40: "已提交",
|
||||||
// },
|
// },
|
||||||
deptId: null,
|
deptId: null,
|
||||||
|
mgroup_name:'',
|
||||||
deliverShow:false,
|
deliverShow:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
mgroupName: {
|
||||||
|
handler: function (newval,odlval) {
|
||||||
|
let that = this;
|
||||||
|
that.params.mgroup = "";
|
||||||
|
that.apiObj = null;
|
||||||
|
that.mgroup_name = newval;
|
||||||
|
that.getMgroupInfo();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
this.getMgroupInfo();
|
||||||
that.$API.mtm.mgroup.list
|
},
|
||||||
.req({ page: 0, name: that.mgroupName })
|
methods: {
|
||||||
|
getMgroupInfo(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.mgroup.list
|
||||||
|
.req({ page: 0, name: that.mgroup_name })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if(res.length>0){
|
if(res.length>0){
|
||||||
that.mgroupId = res[0].id;
|
that.mgroupId = res[0].id;
|
||||||
|
@ -153,13 +169,13 @@ export default {
|
||||||
that.processCate = res[0].process_cate;
|
that.processCate = res[0].process_cate;
|
||||||
that.params.mgroup = res[0].id;
|
that.params.mgroup = res[0].id;
|
||||||
that.apiObj = this.$API.pm.mtask.list;
|
that.apiObj = this.$API.pm.mtask.list;
|
||||||
|
that.$refs.table.refresh();
|
||||||
}else{
|
}else{
|
||||||
that.$message.error("获取工段错误");
|
that.$message.error("获取工段错误");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
viewBatches(row){
|
viewBatches(row){
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
Loading…
Reference in New Issue