Commit b8d5d9d6 authored by jingnan's avatar jingnan 👀

胶漆打印标签修改

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