fix:脱模测量日志详情获取板段滚圆的切片数

This commit is contained in:
shijing 2025-09-22 14:40:17 +08:00
parent 4deeb0fc54
commit 5ce3889f3d
3 changed files with 25 additions and 73 deletions

View File

@ -576,6 +576,7 @@ export default {
let that = this;
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res;
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();
@ -587,12 +588,7 @@ export default {
if(res.oinfo_json_&&res.oinfo_json_!==null){
for(let key in res.oinfo_json_){
let obj = {};
if(key=='cutCount'){
that.cutCount = res.oinfo_json_[key];
obj.key = '切分数量';
}else{
obj.key = key;
}
obj.value = res.oinfo_json_[key];
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(){
let that = this;
that.$API.mtm.process.list.req({page:0,parent:that.process}).then((res) => {

View File

@ -48,7 +48,6 @@
clearable
filterable
style="width: 100%"
@change="routeChange"
>
<el-option
v-for="item in routeOptions"
@ -81,7 +80,7 @@
</el-select>
</el-form-item>
</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-input-number
v-model="form.cutCount"
@ -91,7 +90,7 @@
>
</el-input-number>
</el-form-item>
</el-col>
</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
@ -307,6 +306,7 @@ export default {
{ id: 10, name: "自产" },
{ id: 20, name: "外协" },
],
cutCount:0,
mlogtype:"",
route_code:"",
visible: false,
@ -314,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();
@ -349,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;
@ -370,9 +363,7 @@ export default {
//
getMtask() {
let that = this;
this.$API.pm.mtask.list
.req({ page: 0, mgroup: that.mgroup, state: 20 })
.then((res) => {
this.$API.pm.mtask.list.req({ page: 0, mgroup: that.mgroup, state: 20 }).then((res) => {
that.mtaskOptions = res;
});
},
@ -387,9 +378,7 @@ export default {
},
getRoute(id) {
let that = this;
that.$API.mtm.route.list
.req({ process: that.process, page: 0, routepack__state: 30 })
.then((res) => {
that.$API.mtm.route.list.req({ process: that.process, page: 0, routepack__state: 30 }).then((res) => {
that.routeOptions = res;
});
},
@ -413,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;
@ -434,14 +422,6 @@ export default {
}
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(){
let that = this;
that.mtaskOptions.forEach((item) => {
@ -452,7 +432,6 @@ export default {
},
fileUPSuccess(res) {
let that = this;
console.log('res',res);
this.test_file = res.path;
},
//
@ -466,9 +445,6 @@ export default {
that.testitems.forEach((item) => {
oinfo_json[item.id] = item.value;
})
if(that.route_code=="tuomoceliang"){
oinfo_json.cutCount = that.form.cutCount;
}
that.form.oinfo_json = oinfo_json;
if (that.mode === "add") {
that.$API.wpm.mlog.init.req(that.form).then((res) => {

View File

@ -81,17 +81,6 @@
</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
@ -154,7 +143,6 @@
placeholder="工艺路线"
clearable
style="width: 100%"
@change="routeChange"
>
<el-option
v-for="item in routeOptions"
@ -261,7 +249,6 @@ export default {
mounted() {
let that = this;
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.work_start_time = this.$TOOL.dateFormat(new Date());
this.form.mgroup = this.mgroup;
@ -269,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("您的输入法为中文,请切换到英文输入法");
});
});
@ -349,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){
@ -378,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)=>{
@ -388,9 +373,6 @@ export default {
})
if(that.routeOptions.length==1){
that.form.route = that.routeOptions[0].id;
if(that.route_code=='tuomoceliang'){
that.form.cutCount = that.routeOptions[0].div_number;
}
}
}
}else{
@ -423,9 +405,6 @@ export default {
})
if(that.routeOptions.length==1){
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) => {
@ -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() {
let that = this;