Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
a293bfe1ae
|
@ -17,35 +17,17 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions>
|
<el-descriptions>
|
||||||
<el-descriptions-item label="工段名称">{{
|
<el-descriptions-item label="工段名称">{{mlogItem.mgroup_name}}</el-descriptions-item>
|
||||||
mlogItem.mgroup_name
|
<el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{mlogItem.equipment_name}}</el-descriptions-item>
|
||||||
}}</el-descriptions-item>
|
<el-descriptions-item label="部门/车间">{{mlogItem.belong_dept_name}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{
|
<el-descriptions-item label="处理人">{{mlogItem.handle_user_name}}</el-descriptions-item>
|
||||||
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">
|
<template v-for="item in oinfo_json" :key="item">
|
||||||
<el-descriptions-item :label="item.key" >
|
<el-descriptions-item :label="item.key" >{{item.value}}</el-descriptions-item>
|
||||||
{{item.value}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item label="创建时间">{{
|
<el-descriptions-item label="创建时间">{{mlogItem.create_time}}</el-descriptions-item>
|
||||||
mlogItem.create_time
|
<el-descriptions-item label="操作日期">{{mlogItem.handle_date}}</el-descriptions-item>
|
||||||
}}</el-descriptions-item>
|
<el-descriptions-item label="开始时间">{{mlogItem.work_start_time}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作日期">{{
|
<el-descriptions-item label="结束时间">{{mlogItem.work_end_time}}</el-descriptions-item>
|
||||||
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-descriptions-item label="指导文件" v-if="route_file!==null">
|
||||||
<el-button @click="showFile">查看</el-button>
|
<el-button @click="showFile">查看</el-button>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
@ -367,7 +349,7 @@
|
||||||
:wm = "wm"
|
:wm = "wm"
|
||||||
:dept="deptId"
|
:dept="deptId"
|
||||||
:mgroup="mgroup"
|
:mgroup="mgroup"
|
||||||
:material_in="mlogItem.material_in"
|
:cutCount="cutCount"
|
||||||
:material_out="mlogItem.material_out"
|
:material_out="mlogItem.material_out"
|
||||||
:mgroupName= "mlogItem.mgroup_name"
|
:mgroupName= "mlogItem.mgroup_name"
|
||||||
:isSubmit="isSubmit"
|
:isSubmit="isSubmit"
|
||||||
|
@ -566,6 +548,7 @@ export default {
|
||||||
},
|
},
|
||||||
qct:null,
|
qct:null,
|
||||||
defectlist:[],
|
defectlist:[],
|
||||||
|
cutCount:0,
|
||||||
batchNumber:'',
|
batchNumber:'',
|
||||||
hasRoute:false,
|
hasRoute:false,
|
||||||
isSubmit:false,
|
isSubmit:false,
|
||||||
|
@ -593,13 +576,10 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
||||||
that.mlogItem = res;
|
that.mlogItem = res;
|
||||||
that.checkTableShow = true;
|
that.getcutCount(res.material_in);
|
||||||
that.isSubmit = res.submit_time==null?false:true;
|
that.isSubmit = res.submit_time==null?false:true;
|
||||||
if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){
|
if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){
|
||||||
that.getMlogbw();
|
that.getMlogbw();
|
||||||
// if(that.mlogItem.qct!==null){
|
|
||||||
// that.getdefects(that.mlogItem.qct);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
if(res.route!==null){
|
if(res.route!==null){
|
||||||
that.hasRoute = true;
|
that.hasRoute = true;
|
||||||
|
@ -621,6 +601,7 @@ export default {
|
||||||
}
|
}
|
||||||
that.materialIn = res.material_in;
|
that.materialIn = res.material_in;
|
||||||
that.deptId = res.belong_dept;
|
that.deptId = res.belong_dept;
|
||||||
|
that.checkTableShow = true;
|
||||||
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
that.apiObjWm = that.$API.wpm.wmaterial.list;
|
||||||
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
|
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
|
||||||
that.tableData2 = 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(){
|
getPreocess(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.mtm.process.list.req({page:0,parent:that.process}).then((res) => {
|
that.$API.mtm.process.list.req({page:0,parent:that.process}).then((res) => {
|
||||||
|
|
|
@ -80,6 +80,17 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
||||||
<el-form-item :label="item.name">
|
<el-form-item :label="item.name">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
@ -295,6 +306,7 @@ export default {
|
||||||
{ id: 10, name: "自产" },
|
{ id: 10, name: "自产" },
|
||||||
{ id: 20, name: "外协" },
|
{ id: 20, name: "外协" },
|
||||||
],
|
],
|
||||||
|
cutCount:0,
|
||||||
mlogtype:"",
|
mlogtype:"",
|
||||||
route_code:"",
|
route_code:"",
|
||||||
visible: false,
|
visible: false,
|
||||||
|
@ -302,17 +314,16 @@ export default {
|
||||||
options: [],
|
options: [],
|
||||||
testitems:[],
|
testitems:[],
|
||||||
routeOptions: [],
|
routeOptions: [],
|
||||||
userOptions: [],
|
|
||||||
mtaskOptions:[],
|
mtaskOptions:[],
|
||||||
supplierOptions: [],
|
supplierOptions: [],
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let that = this;
|
||||||
this.route_code = this.$route.path.split("/")[2];
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
|
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
|
||||||
this.getRoute();
|
this.getRoute();
|
||||||
// this.getUser();
|
|
||||||
this.getSupplier();
|
this.getSupplier();
|
||||||
this.getEquipment();
|
this.getEquipment();
|
||||||
this.getMtask();
|
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() {
|
getEquipment() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -358,11 +363,9 @@ export default {
|
||||||
//获取任务
|
//获取任务
|
||||||
getMtask() {
|
getMtask() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.pm.mtask.list
|
this.$API.pm.mtask.list.req({ page: 0, mgroup: that.mgroup, state: 20 }).then((res) => {
|
||||||
.req({ page: 0, mgroup: that.mgroup, state: 20 })
|
that.mtaskOptions = res;
|
||||||
.then((res) => {
|
});
|
||||||
that.mtaskOptions = res;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
getSupplier() {
|
getSupplier() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -375,11 +378,9 @@ export default {
|
||||||
},
|
},
|
||||||
getRoute(id) {
|
getRoute(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.mtm.route.list
|
that.$API.mtm.route.list.req({ process: that.process, page: 0, routepack__state: 30 }).then((res) => {
|
||||||
.req({ process: that.process, page: 0, routepack__state: 30 })
|
that.routeOptions = res;
|
||||||
.then((res) => {
|
});
|
||||||
that.routeOptions = res;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add",type) {
|
open(mode = "add",type) {
|
||||||
|
@ -401,7 +402,6 @@ export default {
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log("data", data);
|
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
if(data.test_file!==null){
|
if(data.test_file!==null){
|
||||||
this.form.test_file = data.test_file;
|
this.form.test_file = data.test_file;
|
||||||
|
@ -432,7 +432,6 @@ export default {
|
||||||
},
|
},
|
||||||
fileUPSuccess(res) {
|
fileUPSuccess(res) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('res',res);
|
|
||||||
this.test_file = res.path;
|
this.test_file = res.path;
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
|
|
|
@ -256,14 +256,13 @@ export default {
|
||||||
this.getRoute();
|
this.getRoute();
|
||||||
this.getEquipment();
|
this.getEquipment();
|
||||||
this.gettestitem();
|
this.gettestitem();
|
||||||
|
if(that.route_code=='tuomoceliang'){
|
||||||
|
//获取指定工序的切分数量
|
||||||
|
}
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
let inputDom = document.querySelectorAll('.inputWrap .el-input__wrapper .el-input__inner');
|
let inputDom = document.querySelectorAll('.inputWrap .el-input__wrapper .el-input__inner');
|
||||||
console.log(inputDom);
|
|
||||||
inputDom.forEach(function(input) {
|
inputDom.forEach(function(input) {
|
||||||
input.addEventListener("compositionstart", function() {
|
input.addEventListener("compositionstart", function() {
|
||||||
// that.$confirm(`您的输入法为中文,请切换到英文输入法`, "提示", {
|
|
||||||
// type: "warning",
|
|
||||||
// }).then(() => {});
|
|
||||||
that.$message.warning("您的输入法为中文,请切换到英文输入法");
|
that.$message.warning("您的输入法为中文,请切换到英文输入法");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -336,7 +335,6 @@ export default {
|
||||||
//扫描后处理方法
|
//扫描后处理方法
|
||||||
// 扫描后会有两种情况,一种是扫描物料,一种是扫描用户;物料扫描后需要判断
|
// 扫描后会有两种情况,一种是扫描物料,一种是扫描用户;物料扫描后需要判断
|
||||||
formWminChange(code){
|
formWminChange(code){
|
||||||
console.log('code',code);
|
|
||||||
let that = this,codeId='',arr=[];
|
let that = this,codeId='',arr=[];
|
||||||
code = code.replace(/(^\s*)|(\s*$)/g, "");
|
code = code.replace(/(^\s*)|(\s*$)/g, "");
|
||||||
if(code.indexOf("#")>-1){
|
if(code.indexOf("#")>-1){
|
||||||
|
@ -365,7 +363,7 @@ export default {
|
||||||
that.form.wm_in = arr[0].id;
|
that.form.wm_in = arr[0].id;
|
||||||
that.form.count_use = arr[0].count_cando;
|
that.form.count_use = arr[0].count_cando;
|
||||||
that.wm_in = arr[0].batch;
|
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;
|
that.materialTracking = arr[0].material_.tracking;
|
||||||
if(that.routeOptions.length==0){
|
if(that.routeOptions.length==0){
|
||||||
that.routeOriginOptions.forEach((item)=>{
|
that.routeOriginOptions.forEach((item)=>{
|
||||||
|
|
|
@ -359,6 +359,10 @@ export default {
|
||||||
processType:{
|
processType:{
|
||||||
type:String,
|
type:String,
|
||||||
default:"",
|
default:"",
|
||||||
|
},
|
||||||
|
cutCount:{
|
||||||
|
type:Number,
|
||||||
|
default:0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
|
@ -383,6 +387,7 @@ export default {
|
||||||
year:"",
|
year:"",
|
||||||
month:"",
|
month:"",
|
||||||
values:"",
|
values:"",
|
||||||
|
qctId: "",
|
||||||
wprNumber:"",
|
wprNumber:"",
|
||||||
route_code:"",
|
route_code:"",
|
||||||
wprInputText:"",
|
wprInputText:"",
|
||||||
|
@ -433,7 +438,6 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('that.material_out',that.material_out)
|
|
||||||
if(that.processType=='20'){
|
if(that.processType=='20'){
|
||||||
that.canMultiple = true;
|
that.canMultiple = true;
|
||||||
}
|
}
|
||||||
|
@ -441,6 +445,7 @@ export default {
|
||||||
that.getdefects();
|
that.getdefects();
|
||||||
}else if(that.material_out!==''&&that.material_out!==null){//输入
|
}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.$API.qm.qct.getQct.req({ material: that.material_out,type:'out',tag:'process' }).then((res) => {
|
||||||
|
that.qctId = res.id;
|
||||||
that.testdefectss(res);
|
that.testdefectss(res);
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
that.getList();
|
that.getList();
|
||||||
|
@ -480,12 +485,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectChange(rows){
|
selectChange(rows){
|
||||||
console.log('rowsrows',rows)
|
|
||||||
let that = this;
|
let that = this;
|
||||||
that.selectWprList = rows;
|
that.selectWprList = rows;
|
||||||
},
|
},
|
||||||
selectAllChange(datas){
|
selectAllChange(datas){
|
||||||
console.log('datas',datas)
|
|
||||||
let that = this;
|
let that = this;
|
||||||
that.selectWprList = datas;
|
that.selectWprList = datas;
|
||||||
},
|
},
|
||||||
|
@ -527,6 +530,9 @@ 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 = null;
|
obj2.value = null;
|
||||||
|
if(item2.testitem_name == '切片数'){
|
||||||
|
obj2.value = Number(that.cutCount);
|
||||||
|
}
|
||||||
that.addTemplate[item2.testitem_name] = null;
|
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'){
|
||||||
|
@ -587,7 +593,11 @@ export default {
|
||||||
obj[item1.defect_name] = false;
|
obj[item1.defect_name] = false;
|
||||||
})
|
})
|
||||||
that.qct_testitems.forEach((item2) => {
|
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;
|
obj.testitems = that.form.testitemids;
|
||||||
that.setForm.testitemids = 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.$API.wpm.mlogbw.start_test.req(obj).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.form = {};
|
that.form = {};
|
||||||
|
|
|
@ -113,7 +113,6 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleClick(val){
|
handleClick(val){
|
||||||
console.log('handleClick',val)
|
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mpointList.forEach(item=>{
|
that.mpointList.forEach(item=>{
|
||||||
if(item.nickname == that.activeName){
|
if(item.nickname == that.activeName){
|
||||||
|
@ -128,11 +127,22 @@ export default {
|
||||||
params.timex__lte = that.endTime;
|
params.timex__lte = that.endTime;
|
||||||
params.page = 0;
|
params.page = 0;
|
||||||
that.$API.enm.mplogx.req(params).then((res) => {
|
that.$API.enm.mplogx.req(params).then((res) => {
|
||||||
|
let xAxisData = [],seriesData = [];
|
||||||
res.forEach(item=>{
|
res.forEach(item=>{
|
||||||
that.option.xAxis.data.unshift(item.timex);
|
xAxisData.unshift(item.timex);
|
||||||
let value = Number(item.val_float).toFixed(3);
|
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;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue