fix:禅道112

This commit is contained in:
shijing 2025-09-30 08:44:16 +08:00
parent 96689b7274
commit 595de779e1
1 changed files with 47 additions and 24 deletions

View File

@ -41,12 +41,10 @@
@selectAllChange="selectAllChange"
@add="rowAdd"
>
<!-- <el-table-column prop="number" fixed type="selection"></el-table-column> -->
<el-table-column prop="number" label="物料编号" fixed min-width="80px">
<template #default="scope">
<span v-if="mode == 'outs'">{{ scope.row.number }}</span>
<span v-if="mode == 'outs'&&scope.row.wpr_number_out!==null&&scope.row.wpr_number_out!==undefined">{{ scope.row.wpr_number_out }}</span>
<!-- <el-input v-if="scope.row.isEdit&&mode == 'outs'" v-model="scope.row.number" placeholder="物料编号"></el-input> -->
<el-select
v-if="scope.row.isEdit&&mode == 'ins'&&route_code!=='niuzhuan'"
v-model="scope.row.wpr"
@ -72,13 +70,15 @@
v-model="scope.row.equip"
placeholder="生产设备"
clearable
filterable
style="width: 100%"
filterable
remote = "true"
default-first-option = "true"
style="width: 50%"
>
<el-option
v-for="item in optionsEq"
:key="item.id"
:label="item.name"
:label="item.number"
:value="item.id"
>
<span style="float:left">{{item.name}}</span>
@ -94,13 +94,14 @@
v-if="scope.row.isEdit"
v-model="scope.row.work_start_time"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
formatter="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm"
formatter="YYYY-MM-DD HH:mm"
style="width: 100%;"
popper-append-to-body
@change = "timeChange(scope.row)"
/>
<div v-else>
<span v-if="scope.row.work_start_time!==null">{{ scope.row.work_start_time.split(' ')[0]}}</span>
<span v-if="scope.row.work_start_time!==null">{{ scope.row.work_start_time}}</span>
</div>
</template>
</el-table-column>
@ -914,7 +915,8 @@ export default {
let date = new Date();
if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){
that.mlogbwlist[index].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss');
}
that.timeChange(that.mlogbwlist[index]);
}else{}
}
});
},
@ -1177,21 +1179,6 @@ export default {
}).catch((err) => {
return err;
});
// let retryCount = 0;
// let MAX_RETRIES = 3;
// that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => {
// that.qct_testitems.forEach(item0 => {
// if(item0.testitem_cd_expr!=null){
// that.mlogbwlist[0][item0.testitem_name]= eval(item0.testitem_cd_expr);
// }
// })
// }).catch((err) => {
// if (retryCount < MAX_RETRIES) {
// retryCount++;
// that.getEqData(); //
// }
// return err;
// });
},
wprChange(wprNumber){
let that = this;
@ -1210,6 +1197,42 @@ export default {
}
});
},
equipRemoteMethod(row){
let that = this;
console.log('row',row);
console.log('scope.row.equip',row.equip);
},
timeChange(row){
let that = this;
let index = that.mlogbwlist.indexOf(row);
let waveNum = 1;
let hours =Number(row.work_start_time.split(" ")[1].split(":")[0]);
let minutes =Number(row.work_start_time.split(" ")[1].split(":")[1]) ;
console.log('hours',hours);
console.log('minutes',minutes);
if((hours==0&&minutes>29)||hours==1||(hours==2&&minutes<30)){
waveNum = 9;
}else if((hours==2&&minutes>29)||hours==3||(hours==4&&minutes<30)){
waveNum = 10;
}else if(hours==7||hours==8){
waveNum = 1;
}else if(hours==9||hours==10){
waveNum = 2;
}else if(hours==11||hours==12){
waveNum = 3;
}else if((hours==13&&minutes>29)||hours==14||(hours==15&&minutes<30)){
waveNum = 4;
}else if((hours==15&&minutes>29)||hours==16||(hours==17&&minutes<30)){
waveNum = 5;
}else if(hours==18||hours==19){
waveNum = 6;
}else if(hours==20||hours==21){
waveNum = 7;
}else if(hours==22||hours==23){
waveNum = 8;
}
that.mlogbwlist[index].波数 = waveNum;
},
saveSetting(){
let that = this;
that.$refs.dialogForm.validate((valid) => {