fix:脱模测量日志详情获取板段滚圆的切片数
This commit is contained in:
parent
4deeb0fc54
commit
5ce3889f3d
|
@ -576,6 +576,7 @@ 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.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();
|
||||||
|
@ -587,12 +588,7 @@ export default {
|
||||||
if(res.oinfo_json_&&res.oinfo_json_!==null){
|
if(res.oinfo_json_&&res.oinfo_json_!==null){
|
||||||
for(let key in res.oinfo_json_){
|
for(let key in res.oinfo_json_){
|
||||||
let obj = {};
|
let obj = {};
|
||||||
if(key=='cutCount'){
|
|
||||||
that.cutCount = res.oinfo_json_[key];
|
|
||||||
obj.key = '切分数量';
|
|
||||||
}else{
|
|
||||||
obj.key = key;
|
obj.key = key;
|
||||||
}
|
|
||||||
obj.value = res.oinfo_json_[key];
|
obj.value = res.oinfo_json_[key];
|
||||||
that.oinfo_json.push(obj);
|
that.oinfo_json.push(obj);
|
||||||
}
|
}
|
||||||
|
@ -615,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) => {
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="routeChange"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in routeOptions"
|
v-for="item in routeOptions"
|
||||||
|
@ -81,7 +80,7 @@
|
||||||
</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-col :md="12" :sm="12" :xs="24" v-if="route_code=='tuomoceliang'">
|
||||||
<el-form-item label="切分数量">
|
<el-form-item label="切分数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.cutCount"
|
v-model="form.cutCount"
|
||||||
|
@ -91,7 +90,7 @@
|
||||||
>
|
>
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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
|
||||||
|
@ -307,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,
|
||||||
|
@ -314,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();
|
||||||
|
@ -349,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;
|
||||||
|
@ -370,9 +363,7 @@ 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 })
|
|
||||||
.then((res) => {
|
|
||||||
that.mtaskOptions = res;
|
that.mtaskOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -387,9 +378,7 @@ 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 })
|
|
||||||
.then((res) => {
|
|
||||||
that.routeOptions = res;
|
that.routeOptions = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -413,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;
|
||||||
|
@ -434,14 +422,6 @@ export default {
|
||||||
}
|
}
|
||||||
this.getRoute(data.id);
|
this.getRoute(data.id);
|
||||||
},
|
},
|
||||||
routeChange(){
|
|
||||||
let that = this;
|
|
||||||
that.routeOptions.forEach((item) => {
|
|
||||||
if(item.id == that.form.route&&that.route_code=='tuomoceliang'){
|
|
||||||
that.form.cutCount = item.div_number;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeMtask(){
|
changeMtask(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mtaskOptions.forEach((item) => {
|
that.mtaskOptions.forEach((item) => {
|
||||||
|
@ -452,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;
|
||||||
},
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
|
@ -466,9 +445,6 @@ export default {
|
||||||
that.testitems.forEach((item) => {
|
that.testitems.forEach((item) => {
|
||||||
oinfo_json[item.id] = item.value;
|
oinfo_json[item.id] = item.value;
|
||||||
})
|
})
|
||||||
if(that.route_code=="tuomoceliang"){
|
|
||||||
oinfo_json.cutCount = that.form.cutCount;
|
|
||||||
}
|
|
||||||
that.form.oinfo_json = oinfo_json;
|
that.form.oinfo_json = oinfo_json;
|
||||||
if (that.mode === "add") {
|
if (that.mode === "add") {
|
||||||
that.$API.wpm.mlog.init.req(that.form).then((res) => {
|
that.$API.wpm.mlog.init.req(that.form).then((res) => {
|
||||||
|
|
|
@ -81,17 +81,6 @@
|
||||||
</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
|
||||||
|
@ -154,7 +143,6 @@
|
||||||
placeholder="工艺路线"
|
placeholder="工艺路线"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@change="routeChange"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in routeOptions"
|
v-for="item in routeOptions"
|
||||||
|
@ -261,7 +249,6 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.route_code = this.$route.path.split("/")[2];
|
this.route_code = this.$route.path.split("/")[2];
|
||||||
console.log('this.route_code',this.route_code);
|
|
||||||
this.form.handle_date = this.$TOOL.dateFormat2(new Date());
|
this.form.handle_date = this.$TOOL.dateFormat2(new Date());
|
||||||
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
|
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
|
||||||
this.form.mgroup = this.mgroup;
|
this.form.mgroup = this.mgroup;
|
||||||
|
@ -269,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("您的输入法为中文,请切换到英文输入法");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -349,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){
|
||||||
|
@ -378,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)=>{
|
||||||
|
@ -388,9 +373,6 @@ export default {
|
||||||
})
|
})
|
||||||
if(that.routeOptions.length==1){
|
if(that.routeOptions.length==1){
|
||||||
that.form.route = that.routeOptions[0].id;
|
that.form.route = that.routeOptions[0].id;
|
||||||
if(that.route_code=='tuomoceliang'){
|
|
||||||
that.form.cutCount = that.routeOptions[0].div_number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -423,9 +405,6 @@ export default {
|
||||||
})
|
})
|
||||||
if(that.routeOptions.length==1){
|
if(that.routeOptions.length==1){
|
||||||
that.form.route = that.routeOptions[0].id;
|
that.form.route = that.routeOptions[0].id;
|
||||||
if(that.route_code=='tuomoceliang'){
|
|
||||||
that.form.cutCount = that.routeOptions[0].div_number;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let arr = that.materialOptions.filter((item) => {
|
let arr = that.materialOptions.filter((item) => {
|
||||||
|
@ -463,14 +442,6 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
routeChange(){
|
|
||||||
let that = this;
|
|
||||||
that.routeOptions.forEach((item) => {
|
|
||||||
if(item.id == that.form.route&&that.route_code=='tuomoceliang'){
|
|
||||||
that.form.cutCount = item.div_number;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
submit() {
|
submit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
Loading…
Reference in New Issue