This commit is contained in:
caoqianming 2025-09-23 13:23:29 +08:00
commit a293bfe1ae
5 changed files with 73 additions and 66 deletions

View File

@ -17,35 +17,17 @@
</el-descriptions-item>
</el-descriptions>
<el-descriptions>
<el-descriptions-item label="工段名称">{{
mlogItem.mgroup_name
}}</el-descriptions-item>
<el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{
mlogItem.equipment_name
}}</el-descriptions-item>
<el-descriptions-item label="部门/车间">{{
mlogItem.belong_dept_name
}}</el-descriptions-item>
<el-descriptions-item label="处理人">{{
mlogItem.handle_user_name
}}</el-descriptions-item>
<el-descriptions-item label="工段名称">{{mlogItem.mgroup_name}}</el-descriptions-item>
<el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{mlogItem.equipment_name}}</el-descriptions-item>
<el-descriptions-item label="部门/车间">{{mlogItem.belong_dept_name}}</el-descriptions-item>
<el-descriptions-item label="处理人">{{mlogItem.handle_user_name}}</el-descriptions-item>
<template v-for="item in oinfo_json" :key="item">
<el-descriptions-item :label="item.key" >
{{item.value}}
</el-descriptions-item>
<el-descriptions-item :label="item.key" >{{item.value}}</el-descriptions-item>
</template>
<el-descriptions-item label="创建时间">{{
mlogItem.create_time
}}</el-descriptions-item>
<el-descriptions-item label="操作日期">{{
mlogItem.handle_date
}}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{
mlogItem.work_start_time
}}</el-descriptions-item>
<el-descriptions-item label="结束时间">{{
mlogItem.work_end_time
}}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{mlogItem.create_time}}</el-descriptions-item>
<el-descriptions-item label="操作日期">{{mlogItem.handle_date}}</el-descriptions-item>
<el-descriptions-item label="开始时间">{{mlogItem.work_start_time}}</el-descriptions-item>
<el-descriptions-item label="结束时间">{{mlogItem.work_end_time}}</el-descriptions-item>
<el-descriptions-item label="指导文件" v-if="route_file!==null">
<el-button @click="showFile">查看</el-button>
</el-descriptions-item>
@ -367,7 +349,7 @@
:wm = "wm"
:dept="deptId"
:mgroup="mgroup"
:material_in="mlogItem.material_in"
:cutCount="cutCount"
:material_out="mlogItem.material_out"
:mgroupName= "mlogItem.mgroup_name"
:isSubmit="isSubmit"
@ -566,6 +548,7 @@ export default {
},
qct:null,
defectlist:[],
cutCount:0,
batchNumber:'',
hasRoute:false,
isSubmit:false,
@ -593,13 +576,10 @@ export default {
let that = this;
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res;
that.checkTableShow = true;
that.getcutCount(res.material_in);
that.isSubmit = res.submit_time==null?false:true;
if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){
that.getMlogbw();
// if(that.mlogItem.qct!==null){
// that.getdefects(that.mlogItem.qct);
// }
}
if(res.route!==null){
that.hasRoute = true;
@ -621,6 +601,7 @@ export default {
}
that.materialIn = res.material_in;
that.deptId = res.belong_dept;
that.checkTableShow = true;
that.apiObjWm = that.$API.wpm.wmaterial.list;
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
that.tableData2 = res;
@ -630,6 +611,15 @@ export default {
})
});
},
//
getcutCount(material_id){
let that = this;
that.$API.mtm.route.list.req({ nprocess_name: "板段滚圆", material_in_has:material_id, page: 0,query:'{div_number}' }).then((res) => {
if(res.length>0){
that.cutCount = res[0].div_number;
}
});
},
getPreocess(){
let that = this;
that.$API.mtm.process.list.req({page:0,parent:that.process}).then((res) => {

View File

@ -80,6 +80,17 @@
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="route_code=='tuomoceliang'">
<el-form-item label="切分数量">
<el-input-number
v-model="form.cutCount"
:min="1"
class="width-100"
controls-position="right"
>
</el-input-number>
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
<el-form-item :label="item.name">
<el-input-number
@ -295,6 +306,7 @@ export default {
{ id: 10, name: "自产" },
{ id: 20, name: "外协" },
],
cutCount:0,
mlogtype:"",
route_code:"",
visible: false,
@ -302,17 +314,16 @@ export default {
options: [],
testitems:[],
routeOptions: [],
userOptions: [],
mtaskOptions:[],
supplierOptions: [],
setFiltersVisible: false,
};
},
mounted() {
let that = this;
this.route_code = this.$route.path.split("/")[2];
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
this.getRoute();
// this.getUser();
this.getSupplier();
this.getEquipment();
this.getMtask();
@ -337,12 +348,6 @@ export default {
})
});
},
//
getUser() {
this.$API.system.user.list.req({ depts: this.dept }).then((res) => {
this.userOptions = res.results;
});
},
//
getEquipment() {
let that = this;
@ -358,11 +363,9 @@ export default {
//
getMtask() {
let that = this;
this.$API.pm.mtask.list
.req({ page: 0, mgroup: that.mgroup, state: 20 })
.then((res) => {
that.mtaskOptions = res;
});
this.$API.pm.mtask.list.req({ page: 0, mgroup: that.mgroup, state: 20 }).then((res) => {
that.mtaskOptions = res;
});
},
getSupplier() {
let that = this;
@ -375,11 +378,9 @@ export default {
},
getRoute(id) {
let that = this;
that.$API.mtm.route.list
.req({ process: that.process, page: 0, routepack__state: 30 })
.then((res) => {
that.routeOptions = res;
});
that.$API.mtm.route.list.req({ process: that.process, page: 0, routepack__state: 30 }).then((res) => {
that.routeOptions = res;
});
},
//
open(mode = "add",type) {
@ -401,7 +402,6 @@ export default {
//
setData(data) {
let that = this;
console.log("data", data);
Object.assign(this.form, data);
if(data.test_file!==null){
this.form.test_file = data.test_file;
@ -432,7 +432,6 @@ export default {
},
fileUPSuccess(res) {
let that = this;
console.log('res',res);
this.test_file = res.path;
},
//

View File

@ -256,14 +256,13 @@ export default {
this.getRoute();
this.getEquipment();
this.gettestitem();
if(that.route_code=='tuomoceliang'){
//
}
setTimeout(()=>{
let inputDom = document.querySelectorAll('.inputWrap .el-input__wrapper .el-input__inner');
console.log(inputDom);
inputDom.forEach(function(input) {
input.addEventListener("compositionstart", function() {
// that.$confirm(``, "", {
// type: "warning",
// }).then(() => {});
that.$message.warning("您的输入法为中文,请切换到英文输入法");
});
});
@ -336,7 +335,6 @@ export default {
//
//
formWminChange(code){
console.log('code',code);
let that = this,codeId='',arr=[];
code = code.replace(/(^\s*)|(\s*$)/g, "");
if(code.indexOf("#")>-1){
@ -365,7 +363,7 @@ export default {
that.form.wm_in = arr[0].id;
that.form.count_use = arr[0].count_cando;
that.wm_in = arr[0].batch;
that.batchCountCando = Number(arr[0].count_cando);;
that.batchCountCando = Number(arr[0].count_cando);
that.materialTracking = arr[0].material_.tracking;
if(that.routeOptions.length==0){
that.routeOriginOptions.forEach((item)=>{

View File

@ -359,6 +359,10 @@ export default {
processType:{
type:String,
default:"",
},
cutCount:{
type:Number,
default:0,
}
},
emits: ["success", "closed"],
@ -383,6 +387,7 @@ export default {
year:"",
month:"",
values:"",
qctId: "",
wprNumber:"",
route_code:"",
wprInputText:"",
@ -433,7 +438,6 @@ export default {
watch: {},
mounted() {
let that = this;
console.log('that.material_out',that.material_out)
if(that.processType=='20'){
that.canMultiple = true;
}
@ -441,6 +445,7 @@ export default {
that.getdefects();
}else if(that.material_out!==''&&that.material_out!==null){//
that.$API.qm.qct.getQct.req({ material: that.material_out,type:'out',tag:'process' }).then((res) => {
that.qctId = res.id;
that.testdefectss(res);
}).catch(()=>{
that.getList();
@ -480,12 +485,10 @@ export default {
}
},
selectChange(rows){
console.log('rowsrows',rows)
let that = this;
that.selectWprList = rows;
},
selectAllChange(datas){
console.log('datas',datas)
let that = this;
that.selectWprList = datas;
},
@ -527,6 +530,9 @@ export default {
obj2.addto_wpr = item2.addto_wpr;
if(item2.testitem_field_type=='input-number'||item2.testitem_field_type=='input-int'){
obj2.value = null;
if(item2.testitem_name == '切片数'){
obj2.value = Number(that.cutCount);
}
that.addTemplate[item2.testitem_name] = null;
}
if(item2.testitem_field_type=='select-text'||item2.testitem_field_type=='selects-text'){
@ -587,7 +593,11 @@ export default {
obj[item1.defect_name] = false;
})
that.qct_testitems.forEach((item2) => {
obj[item2.testitem_name] = null;
if(item2.testitem_name == '切片数'){
obj[item2.testitem_name] = Number(that.cutCount);
}else{
obj[item2.testitem_name] = null;
}
})
}
}
@ -843,7 +853,7 @@ export default {
obj.testitems = that.form.testitemids;
that.setForm.testitemids = that.form.testitemids;
}
obj.qct = that.qct;
obj.qct = that.qct!==null?that.qct:that.qctId;
that.$API.wpm.mlogbw.start_test.req(obj).then((res) => {
that.isSaveing = false;
that.form = {};

View File

@ -113,7 +113,6 @@ export default {
})
},
handleClick(val){
console.log('handleClick',val)
let that = this;
that.mpointList.forEach(item=>{
if(item.nickname == that.activeName){
@ -128,11 +127,22 @@ export default {
params.timex__lte = that.endTime;
params.page = 0;
that.$API.enm.mplogx.req(params).then((res) => {
let xAxisData = [],seriesData = [];
res.forEach(item=>{
that.option.xAxis.data.unshift(item.timex);
xAxisData.unshift(item.timex);
let value = Number(item.val_float).toFixed(3);
that.option.series.data.unshift(value);
seriesData.unshift(value);
})
function getMinValue(arr) {
return Math.min.apply(null, arr);
}
if(that.activeName.indexOf("温度") != -1){
let minNum = getMinValue(seriesData);
console.log(minNum);
that.option.yAxis.min = minNum;
}
that.option.xAxis.data = xAxisData;
that.option.series.data = seriesData;
})
}
})