Commit 2f93f6a0 authored by wangdanlei's avatar wangdanlei

调胶

parent eef3a74b
<template> <template>
<div class="AssignCradInfo"> <div class="AssignCradInfo">
<div class="dee-form2 header"> <div class="dee-form2 header">
<div class="form-row-title">详情</div> <div class="form-row-title" />
<div v-show="basicData.appState==='deployed'" class="print-button" @click="print"> <div v-show="basicData.state==='Audited'" class="print-button" @click="print">
<img src="/icons/c-print.png" alt=""> <img src="/icons/c-print.png" alt="">
<span>打印</span> <span>打印</span>
</div> </div>
...@@ -54,8 +54,8 @@ export default { ...@@ -54,8 +54,8 @@ export default {
} }
} else if (val.subTypeName === 'AssignCardLacquer') { } else if (val.subTypeName === 'AssignCardLacquer') {
this.cmpOptions = { this.cmpOptions = {
typeName: 'AssignCardLacquer', typeName: 'AssignCard',
layKey: 'assignCardInfo' layKey: 'subpackageInfo'
} }
} else { } else {
this.cmpOptions = { this.cmpOptions = {
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
title: '漆料合格标签', title: '漆料合格标签',
count: data.actualWeight, count: data.actualWeight,
number: { label: '编号', value: data.cardNo }, number: { label: '编号', value: data.cardNo },
mark: { label: '油漆牌号', value: data.material.modelNo }, mark: { label: '油漆牌号', value: data.modelNo },
mixingUnit: { label: '调配单位', value: data.assignUnit }, mixingUnit: { label: '调配单位', value: data.assignUnit },
validity: { validity: {
label: '有效期', label: '有效期',
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
number: { label: '编号', value: data.cardNo }, number: { label: '编号', value: data.cardNo },
mark: { mark: {
label: '阿洛丁牌号', label: '阿洛丁牌号',
value: data.material.modelNo value: data.modelNo
}, },
mixingUnit: { label: '调配单位', value: data.assignUnit }, mixingUnit: { label: '调配单位', value: data.assignUnit },
validity: { validity: {
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
title: '胶料合格标签', title: '胶料合格标签',
count: data.actualWeight, count: data.actualWeight,
number: { label: '编号', value: data.cardNo }, number: { label: '编号', value: data.cardNo },
mark: { label: '牌号', value: data.material.modelNo }, mark: { label: '牌号', value: data.modelNo },
mixingUnit: { mixingUnit: {
label: '合格证号', label: '合格证号',
value: data.certificateNo value: data.certificateNo
......
...@@ -291,6 +291,25 @@ export default { ...@@ -291,6 +291,25 @@ export default {
} else { } else {
this.$set(this.form, this.itemObj.attrKey, value) this.$set(this.form, this.itemObj.attrKey, value)
this.changeRequest() 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() { changeRequest() {
...@@ -450,7 +469,7 @@ export default { ...@@ -450,7 +469,7 @@ export default {
this.requestOp = res.items.content.map(item => { this.requestOp = res.items.content.map(item => {
let disabled = false let disabled = false
if (item.qualityPeriod) { if (item.qualityPeriod) {
disabled = Date.parse(item.qualityPeriod) > new Date().getTime() disabled = new Date().getTime() > Date.parse(item.qualityPeriod)
} }
return { return {
label: `${item.testNo}`, 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