fix:扭转日期变动时添加是否为空的判断
This commit is contained in:
parent
d21cc6bdf2
commit
0faf237e43
|
|
@ -963,7 +963,7 @@ export default {
|
|||
obj.printer_commands = str;
|
||||
obj.printer_name = that.printer_name;
|
||||
let printer_ip=localStorage.getItem("printer_ip")||'127.0.0.1';
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
|
|
@ -1132,9 +1132,6 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
|||
that.mlogbwlist[0].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss');
|
||||
that.timeChange(that.mlogbwlist[0]);
|
||||
}
|
||||
// if(that.optionsEq.length==0){
|
||||
// that.getEquipment4();
|
||||
// }
|
||||
}
|
||||
if(that.setForm.cd_req_addr!==null&&!that.insInput){
|
||||
//执行cd_req_addr,获取检测设备的数据
|
||||
|
|
@ -1172,41 +1169,38 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
|||
}
|
||||
});
|
||||
},
|
||||
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;
|
||||
if(row.work_start_time!==''&&row.work_start_time!==null&&row.work_start_time!==undefined){
|
||||
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]);
|
||||
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;
|
||||
}else{
|
||||
that.mlogbwlist[index].波数 = null;
|
||||
}
|
||||
that.mlogbwlist[index].波数 = waveNum;
|
||||
},
|
||||
saveSetting(){
|
||||
let that = this;
|
||||
|
|
@ -1228,8 +1222,6 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
|
|||
});
|
||||
that.$API.wpm.mlogbw.update.req("bulk",that.selectWpr).then((res) => {
|
||||
that.setVisible = false;
|
||||
// that.descriptionVisible = false;
|
||||
// that.setForm = {};
|
||||
that.getList();
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -555,37 +555,41 @@ export default {
|
|||
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]) ;
|
||||
if(row.work_start_time!==''&&row.work_start_time!==null&&row.work_start_time!==undefined){
|
||||
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;
|
||||
}else{
|
||||
hours =Number(row.work_start_time.split(" ")[1].split(":")[0]);
|
||||
minutes =Number(row.work_start_time.split(" ")[1].split(":")[1]) ;
|
||||
that.mlogbwlist[index].波数 = null;
|
||||
}
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue