Commit 36bdb814 authored by wangdanlei's avatar wangdanlei

Merge branch 'rubberPaint-dev' of http://94.191.100.41/tfmom/tf-mom-web into rubberPaint-dev

parents 65bc2c3b 0ec66d57
......@@ -13,17 +13,23 @@
:lay-config="cmpOptions"
:basic-data="basicData"
/>
<PrintTag ref="print" :config="printConfig" />
<PrintTagLacquer ref="printConfigLacquer" :config="printConfigLacquer" />
<PrintConfigPaint ref="printConfigPaint" :config="printConfigPaint" />
<PrintConfigAlodine ref="printConfigAlodine" :config="printConfigAlodine" />
</div>
</template>
<script>
import PrintTag from './printTag'
import PrintTagLacquer from './printTagLacquer'
import PrintConfigPaint from './printConfigPaint'
import PrintConfigAlodine from './printConfigAlodine'
import { post } from '@/utils/http'
export default {
name: 'AssignCradInfo',
componentName: '调配卡详情',
components: {
PrintTag
PrintTagLacquer,
PrintConfigPaint,
PrintConfigAlodine
},
props: {
basicData: {
......@@ -34,7 +40,17 @@ export default {
data() {
return {
cmpOptions: {},
printConfig: {
printConfigLacquer: {
visible: false,
width: 260,
prints: []
},
printConfigPaint: {
visible: false,
width: 260,
prints: []
},
printConfigAlodine: {
visible: false,
width: 260,
prints: []
......@@ -50,8 +66,8 @@ export default {
handler: function(val) {
if (val.subTypeName === 'AssignCardAlodine') {
this.cmpOptions = {
typeName: 'AssignCardAlodine',
layKey: 'assignCardInfo'
typeName: 'AssignCard',
layKey: 'assignCardAlodineDetailView'
}
} else if (val.subTypeName === 'AssignCardLacquer') {
this.cmpOptions = {
......@@ -103,24 +119,36 @@ export default {
post('/AssignCard/qualification', params)
.then((res) => {
var data = res.items.content[0]
this.printConfig = Object.assign({}, this.printConfig, {
visible: true
})
var b = data.validityEnd && data.validityEnd.split(':') || []
b.pop()
if (data.subTypeName === 'AssignCardPaint') {
if (data.subTypeName === 'AssignCardPaint') { // 调漆
this.printConfigPaint = Object.assign({}, this.printConfigPaint, {
visible: true
})
const a = data.validityStart && data.validityStart.split(':') || []
a.pop()
this.printConfig.prints = [
this.printConfigPaint.prints = [
{
text: data.cardNo,
title: '漆料合格标签',
count: data.actualWeight,
count: { label: '领取量', value: data.actualWeight },
number: { label: '编号', value: data.cardNo },
mark: { label: '油漆牌号', value: data.modelNo },
mixingUnit: { label: '调配单位', value: data.assignUnit },
standard: {
label: '材料规范',
value: this.form.standard
},
mark: {
label: '材料标识/牌号',
value: data.modelNo + '/' + data.realityMark
},
mixingUnit: {
label: '合格证编号',
value: data.certificateNo
},
// mark: { label: '油漆牌号', value: data.modelNo },
mixStartTime: { label: '混合开始时间', value: data.mixStartTime },
validity: {
label: '有效期',
label: '漆料施工有效期',
value: {
start: {
label: '始',
......@@ -132,27 +160,35 @@ export default {
}
}
},
deployment: { label: '调配员', value: data.creator.userName },
deployment: { label: '发料员', value: data.creator.userName },
inspector: {
label: '检验员',
value: data.checker
}
}
]
} else if (data.subTypeName === 'AssignCardAlodine') {
this.$refs.printConfigPaint.print()
} else if (data.subTypeName === 'AssignCardAlodine') { // 阿洛丁
this.printConfigAlodine = Object.assign({}, this.printConfigAlodine, {
visible: true
})
const c = (data.assignTime && data.assignTime.split(':')) || []
c.pop()
this.printConfig.prints = [
this.printConfigAlodine.prints = [
{
text: data.cardNo,
title: '阿洛丁刷涂合格标签',
count: data.assignTotalAmount,
count: { label: '领取量', value: data.assignTotalAmount },
number: { label: '编号', value: data.cardNo },
mark: {
label: '阿洛丁牌号',
value: data.modelNo
},
mixingUnit: { label: '调配单位', value: data.assignUnit },
mixingUnit: {
label: '合格证编号',
value: data.certificateNo
},
receiveDate: { label: '领取日期', value: data.assignUnit || 'xxxx-xx-xx hh:mm' },
validity: {
label: '有效期',
value: {
......@@ -166,23 +202,29 @@ export default {
}
}
},
deployment: { label: '调配员', value: data.creator.userName },
deployment: { label: '发料员', value: data.creator.userName },
inspector: {
label: '检验员',
value: data.checker
}
},
remark: { label: '备注',
value: data.realityMark }
}
]
} else if (data.subTypeName === 'AssignCardLacquer') {
this.$refs.printConfigAlodine.print()
} else if (data.subTypeName === 'AssignCardLacquer') { // 调胶
this.printConfigLacquer = Object.assign({}, this.printConfigLacquer, {
visible: true
})
const d = (data.mixStartTime && data.mixStartTime.split(':')) || []
d.pop()
const e = (data.mixEndTime && data.mixEndTime.split(':')) || []
e.pop()
this.printConfig.prints = [
this.printConfigLacquer.prints = [
{
text: data.cardNo,
title: '密封剂合格标签',
count: data.actualWeight,
count: { label: '重量', value: data.actualWeight },
number: { label: '编号', value: data.cardNo },
standard: {
label: '材料规范',
......@@ -216,8 +258,8 @@ export default {
}
}
]
this.$refs.printConfigLacquer.print()
}
this.$refs.print.print()
})
.catch((err) => console.log(err))
......
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