Commit 2f93f6a0 authored by wangdanlei's avatar wangdanlei

调胶

parent eef3a74b
<template>
<div class="AssignCradInfo">
<div class="dee-form2 header">
<div class="form-row-title">详情</div>
<div v-show="basicData.appState==='deployed'" class="print-button" @click="print">
<div class="form-row-title" />
<div v-show="basicData.state==='Audited'" class="print-button" @click="print">
<img src="/icons/c-print.png" alt="">
<span>打印</span>
</div>
......@@ -54,8 +54,8 @@ export default {
}
} else if (val.subTypeName === 'AssignCardLacquer') {
this.cmpOptions = {
typeName: 'AssignCardLacquer',
layKey: 'assignCardInfo'
typeName: 'AssignCard',
layKey: 'subpackageInfo'
}
} else {
this.cmpOptions = {
......@@ -115,7 +115,7 @@ export default {
title: '漆料合格标签',
count: data.actualWeight,
number: { label: '编号', value: data.cardNo },
mark: { label: '油漆牌号', value: data.material.modelNo },
mark: { label: '油漆牌号', value: data.modelNo },
mixingUnit: { label: '调配单位', value: data.assignUnit },
validity: {
label: '有效期',
......@@ -148,7 +148,7 @@ export default {
number: { label: '编号', value: data.cardNo },
mark: {
label: '阿洛丁牌号',
value: data.material.modelNo
value: data.modelNo
},
mixingUnit: { label: '调配单位', value: data.assignUnit },
validity: {
......@@ -182,7 +182,7 @@ export default {
title: '胶料合格标签',
count: data.actualWeight,
number: { label: '编号', value: data.cardNo },
mark: { label: '牌号', value: data.material.modelNo },
mark: { label: '牌号', value: data.modelNo },
mixingUnit: {
label: '合格证号',
value: data.certificateNo
......
......@@ -291,6 +291,25 @@ export default {
} else {
this.$set(this.form, this.itemObj.attrKey, value)
this.changeRequest()
if (this.itemObj.attrKey === 'spec') {
this.setMixEndTime()
}
}
},
setMixEndTime() {
if (this.form.mixStartTime) {
let rawTime = Date.parse(this.form.mixStartTime)// 把时间转换成毫秒
const addTime = (!this.form.spec && this.form.spec === '/') ? 0 : Number(this.form.spec)
rawTime = rawTime + (1000 * 60 * 60 * addTime)// 增加3小时。
const newsTime = new Date(rawTime)// 时间重新格式化时间。
const y = newsTime.getFullYear()
const m = (newsTime.getMonth() + 1) < 10 ? '0' + (newsTime.getMonth() + 1) : (newsTime.getMonth() + 1)
const d = newsTime.getDate()
const h = newsTime.getHours() < 10 ? '0' + newsTime.getHours() : newsTime.getHours()
const m2 = newsTime.getMinutes() < 10 ? '0' + newsTime.getMinutes() : newsTime.getMinutes()
const s = newsTime.getSeconds() < 10 ? '0' + newsTime.getSeconds() : newsTime.getSeconds()
const resultDate = y + '-' + m + '-' + d + ' ' + h + ':' + m2 + ':' + s
this.$set(this.form, 'mixEndTime', resultDate)
}
},
changeRequest() {
......@@ -450,7 +469,7 @@ export default {
this.requestOp = res.items.content.map(item => {
let disabled = false
if (item.qualityPeriod) {
disabled = Date.parse(item.qualityPeriod) > new Date().getTime()
disabled = new Date().getTime() > Date.parse(item.qualityPeriod)
}
return {
label: `${item.testNo}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment