|
|
@ -616,6 +616,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
createNewRoll(){ |
|
|
createNewRoll(){ |
|
|
|
|
|
debugger |
|
|
if(this.dataForm.partNo===''){ |
|
|
if(this.dataForm.partNo===''){ |
|
|
this.$alert('请输入物料!', '错误', { |
|
|
this.$alert('请输入物料!', '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
@ -673,11 +674,12 @@ |
|
|
batchNo:this.dataForm.batchNo, |
|
|
batchNo:this.dataForm.batchNo, |
|
|
wdrNo:this.dataForm.wdrNo, |
|
|
wdrNo:this.dataForm.wdrNo, |
|
|
locationID:this.dataForm.locationId, |
|
|
locationID:this.dataForm.locationId, |
|
|
manufactureDate:this.dataForm.manufactureDate, |
|
|
|
|
|
expiredDate:this.dataForm.expiredDate, |
|
|
|
|
|
|
|
|
manufactureDate: this.dayjs(this.dataForm.manufactureDate).format('YYYY-MM-DD'), |
|
|
|
|
|
expiredDate:this.dayjs(this.dataForm.expiredDate).format('YYYY-MM-DD'), |
|
|
rollNumber:this.rollData.rollNumber, |
|
|
rollNumber:this.rollData.rollNumber, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
console.log(inData) |
|
|
createNewCachRoll(inData).then(({data})=>{ |
|
|
createNewCachRoll(inData).then(({data})=>{ |
|
|
//区分请求成功和失败的状况 |
|
|
//区分请求成功和失败的状况 |
|
|
if (data && data.code == 0) { |
|
|
if (data && data.code == 0) { |
|
|
@ -791,24 +793,28 @@ |
|
|
month = '0'+batchNo[1]; |
|
|
month = '0'+batchNo[1]; |
|
|
} |
|
|
} |
|
|
let day = batchNo.substring(2,4); // 解析日期 |
|
|
let day = batchNo.substring(2,4); // 解析日期 |
|
|
let manufactureDate = this.dayjs(year+month+day, 'YYYYDDDHH').toDate(); |
|
|
|
|
|
console.log(year) |
|
|
|
|
|
console.log(month) |
|
|
|
|
|
console.log(day) |
|
|
|
|
|
console.log(year+month+day) |
|
|
|
|
|
|
|
|
let manufactureDate = this.dayjs(year+month+day, 'YYYYMMDD').toDate(); |
|
|
|
|
|
// console.log(year) |
|
|
|
|
|
// console.log(month) |
|
|
|
|
|
// console.log(day) |
|
|
|
|
|
// console.log(year+month+day) |
|
|
|
|
|
console.log("manufactureDate:"+manufactureDate) |
|
|
if (isNaN(manufactureDate.getTime())) { |
|
|
if (isNaN(manufactureDate.getTime())) { |
|
|
this.$message.error("生产日期的日期格式不正确") |
|
|
this.$message.error("生产日期的日期格式不正确") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
let expiredDate = this.dayjs(arr[6], 'YYYYDDDHH').toDate(); |
|
|
|
|
|
|
|
|
let expiredDate = this.dayjs(arr[6], 'YYYYMMDD').toDate(); |
|
|
if (isNaN(expiredDate.getTime())) { |
|
|
if (isNaN(expiredDate.getTime())) { |
|
|
this.$message.error("失效日期的日期格式不正确") |
|
|
this.$message.error("失效日期的日期格式不正确") |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
|
|
|
console.log("expiredDate:"+expiredDate) |
|
|
this.dataForm.manufactureDate=manufactureDate |
|
|
this.dataForm.manufactureDate=manufactureDate |
|
|
this.dataForm.expiredDate=expiredDate |
|
|
this.dataForm.expiredDate=expiredDate |
|
|
this.dataForm.batchNo=batchNo; |
|
|
this.dataForm.batchNo=batchNo; |
|
|
this.scanSerial='' |
|
|
this.scanSerial='' |
|
|
|
|
|
console.log("manufactureDate:"+this.dataForm.manufactureDate) |
|
|
|
|
|
console.log("expiredDate:"+this.dataForm.expiredDate) |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
|