feat: 禅道310

This commit is contained in:
shijing 2026-01-21 11:22:27 +08:00
parent adbd936382
commit dfedb67cb8
1 changed files with 68 additions and 0 deletions

View File

@ -41,6 +41,8 @@
<th class="w_30 inlineBlock">序号</th>
<th class="w_140 inlineBlock">物料批次</th>
<th class="w_150 inlineBlock">物料编号</th>
<th class="w_150 inlineBlock" v-if="route_code=='niuzhuan'">生产设备</th>
<th class="w_150 inlineBlock" v-if="route_code=='niuzhuan'">扭转日期</th>
<th class="w_80 inlineBlock" v-for="item in qct_testitems" :key="item.id">{{ item.testitem_name }}</th>
<th class="w_80 inlineBlock" v-for="item in qct_defects" :key="item.id">{{ item.defect_name }}</th>
<th class="w_80 inlineBlock">备注</th>
@ -64,6 +66,20 @@
<span v-else>{{ row.number }}</span>
<span v-if="row.wpr_number_out !== null && row.wpr_number_out !== undefined">{{ row.wpr_number_out }}</span>
</td>
<td class="w_150 inlineBlock" v-if="route_code=='niuzhuan'">
<select name="pets" id="pet-select" v-if="row.isEdit" style="width: 100%;" v-model="row.equip" :value="row.equip">
<option v-for="item in optionsEq" :key="item.id" :value="item.id">
{{ item.number }}
</option>
</select>
<span v-else>{{ row.equip_name }}<span v-if="row.equip_number&&row.equip_number!=null">{{ row.equip_number }}</span></span>
</td>
<td class="w_150 inlineBlock" v-if="route_code=='niuzhuan'">
<input v-if="row.isEdit" type="datetime-local" id="datetime" v-model="row.work_start_time" @change = "timeChange(row)">
<div v-else>
<span v-if="row.work_start_time!==null">{{ row.work_start_time}}</span>
</div>
</td>
<td class="w_80 inlineBlock" v-for="item in qct_testitems" :key="item.id">
<span v-if="!row.isEdit || !item.canEdit">{{ row[item.testitem_name] }}</span>
<input v-if="item.testitem_field_type == 'input-number' && row.isEdit && item.canEdit"
@ -405,6 +421,9 @@ export default {
if(that.processType=='20'){
that.canMultiple = true;
}
if(that.route_code=='niuzhuan'){
that.getEquipment4();
}
if(that.qct!==''&&that.qct!==null){//
that.getdefects();
}else{
@ -532,6 +551,42 @@ export default {
that.options = res;
})
},
timeChange(row){
let that = this;
console.log('row',row)
let index = that.mlogbwlist.indexOf(row);
let waveNum = 1;
let hours = 0,minutes=0;
if(row.work_start_time.indexOf("T")>-1){
hours =Number(row.work_start_time.split("T")[1].split(":")[0]);
minutes =Number(row.work_start_time.split("T")[1].split(":")[1]) ;
}else{
hours =Number(row.work_start_time.split(" ")[1].split(":")[0]);
minutes =Number(row.work_start_time.split(" ")[1].split(":")[1]) ;
}
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;
},
getList(){
let that = this;
let params = {};
@ -599,6 +654,12 @@ export default {
obj.mlogb = row.mlogb;
obj.wpr = row.wpr;
obj.note = row.note;
if(row.work_start_time){
obj.work_start_time = row.work_start_time.replace('T',' ');
}
if(row.equip){
obj.equip = row.equip;
}
//qct
if((that.qct!==''&&that.qct!==null)||(that.qctId!==''&&that.qctId!==null)){
obj.ftest = {};
@ -640,6 +701,9 @@ export default {
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
that.$message.success("保存成功");
that.mlogbwlist[editIndex].isEdit = false;
that.mlogbwlist[editIndex].equip_name = res.equip_name;
that.mlogbwlist[editIndex].equip_number = res.equip_number;
that.mlogbwlist[editIndex].work_start_time = res.work_start_time;
// that.getList();
return res;
}).catch((err) => {
@ -653,6 +717,9 @@ export default {
that.$API.wpm.mlogbw.create.req(objNew).then((res) => {
that.$message.success("添加成功");
that.mlogbwlist[editIndex].isEdit = false;
that.mlogbwlist[editIndex].equip_name = res.equip_name;
that.mlogbwlist[editIndex].equip_number = res.equip_number;
that.mlogbwlist[editIndex].work_start_time = res.work_start_time;
// that.getList();
return res;
}).catch((err) => {
@ -673,6 +740,7 @@ 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])
}
let getEd = false;
if(that.qct_testitems.length>0){