Commit 167a92b4 authored by wangdanlei's avatar wangdanlei

调胶

parent 81090bc0
...@@ -39,7 +39,8 @@ export default { ...@@ -39,7 +39,8 @@ export default {
width: 260, width: 260,
prints: [] prints: []
}, },
loading: false loading: false,
form: {}
} }
}, },
watch: { watch: {
...@@ -69,6 +70,7 @@ export default { ...@@ -69,6 +70,7 @@ export default {
methods: { methods: {
// 打印 // 打印
print() { print() {
this.form = this.$children[0].$children[0].form
this.loading = true this.loading = true
const params = { const params = {
'pageFrom': 1, 'pageFrom': 1,
...@@ -179,12 +181,19 @@ export default { ...@@ -179,12 +181,19 @@ export default {
this.printConfig.prints = [ this.printConfig.prints = [
{ {
text: data.cardNo, text: data.cardNo,
title: '胶料合格标签', title: '密封剂合格标签',
count: data.actualWeight, count: data.actualWeight,
number: { label: '编号', value: data.cardNo }, number: { label: '编号', value: data.cardNo },
mark: { label: '牌号', value: data.modelNo }, standard: {
label: '材料规范',
value: this.form.standard
},
mark: {
label: '材料标识/牌号',
value: data.modelNo + '-' + data.spec + '/' + data.realityMark
},
mixingUnit: { mixingUnit: {
label: '合格证号', label: '合格证号',
value: data.certificateNo value: data.certificateNo
}, },
validity: { validity: {
...@@ -200,9 +209,9 @@ export default { ...@@ -200,9 +209,9 @@ export default {
} }
} }
}, },
deployment: { label: '调配员', value: data.creator.userName }, deployment: { label: '发料员', value: data.creator.userName },
inspector: { inspector: {
label: '检验', label: '检验',
value: data.checker value: data.checker
} }
} }
......
<template> <template>
<section ref="print" class="print"> <section ref="print" class="print">
<section class="prinaa"> <section>
<div <div
v-for="(item, index) in config.prints" v-for="(item, index) in config.prints"
:key="index" :key="index"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
padding-left: 20px; padding-left: 20px;
" "
> >
<span style="padding-left: 20px">{{ item.count }}</span> <span style="padding-left: 20px">{{ item.count }}</span>
</div> </div>
</div> </div>
<div <div
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
border-botoom: 2px solid #222; border-botoom: 2px solid #222;
" "
> >
<!-- 牌号 --> <!-- 材料规范 -->
<div <div
style=" style="
line-height: 76px; line-height: 76px;
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
box-sizing: border-box; box-sizing: border-box;
" "
> >
{{ item.mark.label }} {{ item.standard.label }}
</div> </div>
<div <div
style=" style="
...@@ -118,31 +118,32 @@ ...@@ -118,31 +118,32 @@
font-size: 25px; font-size: 25px;
" "
> >
{{ item.mark.value }} {{ item.standard.value }}
</div> </div>
</div> </div>
<div <div
style=" style="
height: 76px; height: 76px;
border-top: 2px solid #222;
border-botoom: 2px solid #222;
display: flex; display: flex;
align-items: center; align-items: center;
border-top: 2px solid #222;
border-botoom: 2px solid #222;
" "
> >
<!-- 合格证号 --> <!-- 号 -->
<div <div
style=" style="
display: inline-block;
line-height: 76px; line-height: 76px;
vertical-align: top;
display: inline-block;
width: 40%; width: 40%;
border-right: 2px solid #222; border-right: 2px solid #222;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
" "
> >
{{ item.mixingUnit.label }} {{ item.mark.label }}
</div> </div>
<div <div
style=" style="
...@@ -153,7 +154,7 @@ ...@@ -153,7 +154,7 @@
font-size: 25px; font-size: 25px;
" "
> >
{{ item.mixingUnit.value }} {{ item.mark.value }}
</div> </div>
</div> </div>
</div> </div>
...@@ -230,7 +231,35 @@ ...@@ -230,7 +231,35 @@
{{ item.ineffectiveTime.value }} {{ item.ineffectiveTime.value }}
</div> </div>
</div> </div>
<!-- 合格证号 -->
<div
style="height: 80px; box-sizing: border-box; border-bottom: 2px solid #222;"
>
<div
style="
line-height: 76px;
vertical-align: top;
display: inline-block;
width: 24%;
border-right: 2px solid #222;
text-align: center;
box-sizing: border-box;
"
>
{{ item.mixingUnit.label }}
</div>
<div
style="
display: inline-block;
width: 69%;
line-height: 80px;
padding-left: 10px;
vertical-align: top;
"
>
{{ item.mixingUnit.value }}
</div>
</div>
<!-- 施工期 --> <!-- 施工期 -->
<div <div
v-if="!item.remainingConstructionPeriod" v-if="!item.remainingConstructionPeriod"
...@@ -353,6 +382,7 @@ ...@@ -353,6 +382,7 @@
align-items: center; align-items: center;
font-weight: lighter; font-weight: lighter;
border-top: 2px solid #222; border-top: 2px solid #222;
border-bottom: 2px solid #222
" "
> >
<!-- 调配员 --> <!-- 调配员 -->
...@@ -374,6 +404,7 @@ ...@@ -374,6 +404,7 @@
</div> </div>
</div> </div>
</div> </div>
<div>B330319B</div>
</div> </div>
</section> </section>
</section> </section>
...@@ -425,7 +456,7 @@ export default { ...@@ -425,7 +456,7 @@ export default {
doc.write(` doc.write(`
<style> <style>
div{ div{
} }
</style> </style>
`) `)
......
...@@ -119,10 +119,10 @@ export default { ...@@ -119,10 +119,10 @@ export default {
}) })
} }
this.isEdit = this.form.modelNo && this.form.spec && this.form.realityMark this.isEdit = this.form.modelNo && this.form.spec && this.form.realityMark
if (this.isEdit) { if (this.basicData.setAttrs) {
this.editInit()
} else {
this.initFn() this.initFn()
} else {
this.editInit()
} }
} }
}, },
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
'value': this.form.spec || '' 'value': this.form.spec || ''
} }
] ]
this.setOptions(this.itemObj.attrKey, params) this.setOptions('spec', params)
} }
} }
if (this.itemObj.attrKey === 'realityMark') { if (this.itemObj.attrKey === 'realityMark') {
...@@ -185,7 +185,7 @@ export default { ...@@ -185,7 +185,7 @@ export default {
} }
] ]
this.$set(this.form, 'realityMark', '') this.$set(this.form, 'realityMark', '')
this.setOptions(this.itemObj.attrKey, params) this.setOptions('realityMark', params)
} }
} }
}, },
...@@ -196,16 +196,21 @@ export default { ...@@ -196,16 +196,21 @@ export default {
'fieldName': 'modelNo', 'fieldName': 'modelNo',
'operator': 'LIKE', 'operator': 'LIKE',
'value': '' 'value': ''
},
{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': 'ShellacCardLacquer'
} }
] ]
this.setOptions('modelNo', params) this.setOptions('modelNo', params)
} }
if (this.itemObj.attrKey === 'spec') { if (this.itemObj.attrKey === 'spec' && this.basicData.modelNo) {
const params = [ const params = [
{ {
'fieldName': 'modelNo', 'fieldName': 'modelNo',
'operator': 'LIKE', 'operator': 'LIKE',
'value': this.form.modelNo 'value': this.basicData.modelNo
}, },
{ {
'fieldName': 'spec', 'fieldName': 'spec',
...@@ -213,19 +218,19 @@ export default { ...@@ -213,19 +218,19 @@ export default {
'value': '' 'value': ''
} }
] ]
this.setOptions(this.itemObj.attrKey, params) this.setOptions('spec', params)
} }
if (this.itemObj.attrKey === 'realityMark') { if (this.itemObj.attrKey === 'realityMark' && this.basicData.spec) {
const params = [ const params = [
{ {
'fieldName': 'modelNo', 'fieldName': 'modelNo',
'operator': 'LIKE', 'operator': 'LIKE',
'value': this.form.modelNo 'value': this.basicData.modelNo
}, },
{ {
'fieldName': 'spec', 'fieldName': 'spec',
'operator': 'LIKE', 'operator': 'LIKE',
'value': this.form.spec 'value': this.basicData.spec
}, },
{ {
'fieldName': 'realityMark', 'fieldName': 'realityMark',
...@@ -233,9 +238,9 @@ export default { ...@@ -233,9 +238,9 @@ export default {
'value': '' 'value': ''
} }
] ]
this.setOptions(this.itemObj.attrKey, params) this.setOptions('realityMark', params)
} }
this.requestShellacDeploy() this.requestShellacDeploy(this.basicData.modelNo, this.basicData.spec, this.basicData.realityMark)
}, },
async setOptions(key, params) { async setOptions(key, params) {
await this.requestOptions(key, params) await this.requestOptions(key, params)
...@@ -353,58 +358,60 @@ export default { ...@@ -353,58 +358,60 @@ export default {
this.setOptions('realityMark', params) this.setOptions('realityMark', params)
} }
if (this.itemObj.attrKey === 'realityMark') { if (this.itemObj.attrKey === 'realityMark') {
this.requestShellacDeploy() this.requestShellacDeploy(this.form.modelNo, this.form.spec, this.form.realityMark)
} }
}, },
requestShellacDeploy() { requestShellacDeploy(modelNo, spec, realityMark) {
const params = { if (modelNo && spec && realityMark) {
'searchItems': { const params = {
'items': [ 'searchItems': {
{ 'items': [
'fieldName': 'modelNo', {
'operator': 'LIKE', 'fieldName': 'modelNo',
'value': this.form.modelNo 'operator': 'LIKE',
}, 'value': modelNo
{ },
'fieldName': 'spec', {
'operator': 'LIKE', 'fieldName': 'spec',
'value': this.form.spec 'operator': 'LIKE',
}, 'value': spec
},
{
'fieldName': 'realityMark',
'operator': 'LIKE',
'value': realityMark
}
],
'operator': 'AND'
},
'openProps': [],
'sortItem': [
{ {
'fieldName': 'realityMark', 'fieldName': 'modifyTime',
'operator': 'LIKE', 'sortOrder': 'desc'
'value': this.form.realityMark
} }
], ]
'operator': 'AND' }
}, post(`/ShellacDeploy/search`, params)
'openProps': [], .then(res => {
'sortItem': [ if (res.code === 0) {
{ this.$set(this.form, 'standard', res.items.content[0].standard)
'fieldName': 'modifyTime', this.$set(this.form, 'matching', res.items.content[0].matching)
'sortOrder': 'desc' this.$set(this.form, 'theoreticalTemperature', res.items.content[0].temperature)
} this.$set(this.form, 'humidity', res.items.content[0].humidity)
] this.$set(this.form, 'component', res.items.content[0].component)
} this.$set(this.form, 'shellacDeployId', res.items.content[0].id)
post(`/ShellacDeploy/search`, params) this.$set(this.form, 'storeUp', res.items.content[0].storeUp)
.then(res => { this.$set(this.form, 'storeUpTo', res.items.content[0].storeUpTo)
if (res.code === 0) { if (this.form.validityStart && this.form.freeTemperature) {
this.$set(this.form, 'standard', res.items.content[0].standard) const date = new Date(this.form.validityStart)
this.$set(this.form, 'matching', res.items.content[0].matching) const data = this.form.freeTemperature === '-24' ? (this.form.storeUp ? Number(this.form.storeUp) : 21) : (this.form.storeUp ? Number(this.form.storeUpTo) : 30)
this.$set(this.form, 'theoreticalTemperature', res.items.content[0].temperature) date.setDate(date.getDate() + data)
this.$set(this.form, 'humidity', res.items.content[0].humidity) this.$set(this.form, 'validityEnd', this.$utils.dateFormat(date.toISOString()))
this.$set(this.form, 'component', res.items.content[0].component) }
this.$set(this.form, 'shellacDeployId', res.items.content[0].id)
this.$set(this.form, 'storeUp', res.items.content[0].storeUp)
this.$set(this.form, 'storeUpTo', res.items.content[0].storeUpTo)
if (this.form.validityStart && this.form.freeTemperature) {
const date = new Date(this.form.validityStart)
const data = this.form.freeTemperature === '-24' ? (this.form.storeUp ? Number(this.form.storeUp) : 21) : (this.form.storeUp ? Number(this.form.storeUpTo) : 30)
date.setDate(date.getDate() + data)
this.$set(this.form, 'validityEnd', this.$utils.dateFormat(date.toISOString()))
} }
} })
}) }
}, },
remoteMethod(query) { remoteMethod(query) {
if (query && query.length >= 2) { if (query && query.length >= 2) {
......
...@@ -374,11 +374,11 @@ ...@@ -374,11 +374,11 @@
style=" style="
font-size: 25px; font-size: 25px;
vertical-align: middle; vertical-align: middle;
display: block;
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: lighter; font-weight: lighter;
border-top: 2px solid #222; border-top: 2px solid #222;
border-bottom: 2px solid #222
" "
> >
<!-- 调配员 --> <!-- 调配员 -->
...@@ -400,6 +400,7 @@ ...@@ -400,6 +400,7 @@
</div> </div>
</div> </div>
</div> </div>
<div>B330320</div>
</div> </div>
</section> </section>
</section> </section>
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
eventFunc() { eventFunc() {
this.selectedData = this.$utils.findByNameVnode(this, 'DeeAsTable').selectedData this.selectedData = this.$utils.findByNameVnode(this, 'DeeAsTable').selectedData
if (this.selectedData.length) { if (this.selectedData.length) {
let state = true /* let state = true
this.selectedData.forEach(item => { this.selectedData.forEach(item => {
if (item.state !== 'Audited') { if (item.state !== 'Audited') {
state = false state = false
...@@ -54,7 +54,8 @@ export default { ...@@ -54,7 +54,8 @@ export default {
this.$utils.showMessageWarning('勾选数据中存在状态为未审核的数据!') this.$utils.showMessageWarning('勾选数据中存在状态为未审核的数据!')
} else { } else {
this.print() this.print()
} }*/
this.print()
} }
}, },
print() { print() {
...@@ -112,13 +113,9 @@ export default { ...@@ -112,13 +113,9 @@ export default {
title: '密封剂冷冻标签', title: '密封剂冷冻标签',
weight: data.weight, weight: data.weight,
number: { label: '编号', value: data.itemNo }, number: { label: '编号', value: data.itemNo },
modelNo: {
label: '材料规范',
value: data.assignCard.modelNo
},
mark: { mark: {
label: '材料标识/牌号', label: '材料标识/牌号',
value: data.assignCard.modelNo value: data.assignCard.modelNo + '-' + data.assignCard.spec + '/' + data.assignCard.realityMark
}, },
mixingUnit: { mixingUnit: {
label: '合格证编号', label: '合格证编号',
......
<template> <template>
<div> <div>
<dee-as-com <dee-as-com
:lay-config="layConfig" :lay-config="{
typeName: 'ExtSupportingItem',
layKey: 'lacquerList'
}"
@tableToolHandler="tableToolHandler" @tableToolHandler="tableToolHandler"
@row-click="onRowClick" @row-click="onRowClick"
@selectionChange="selectionChange($event)" @selectionChange="selectionChange($event)"
/> />
<dee-drawer <dee-drawer
width="60%" width="60%"
title="创建调胶调配记录卡" :title="title"
:dialog-visible="drawer" :dialog-visible="drawer"
@handleClose="handleClose" @handleClose="handleClose"
> >
<dee-as-com <dee-as-com
:lay-config="{ :lay-config="layConfig"
typeName: 'AssignCard',
layKey: 'defaultCreate'
}"
:basic-data=" { ...basicData,setAttrs:setAttrs }" :basic-data=" { ...basicData,setAttrs:setAttrs }"
/> />
</dee-drawer> </dee-drawer>
...@@ -51,6 +51,8 @@ export default { ...@@ -51,6 +51,8 @@ export default {
return { return {
drawer: false, drawer: false,
dialogVisible: false, dialogVisible: false,
subTypeName: '',
title: '',
evenList: [ evenList: [
{ {
even: 'row-click', even: 'row-click',
...@@ -105,10 +107,19 @@ export default { ...@@ -105,10 +107,19 @@ export default {
}, },
computed: { computed: {
layConfig() { layConfig() {
return { if (this.subTypeName === 'AssignCardLacquer') {
typeName: 'ExtSupportingItem', return {
layKey: 'lacquerList' typeName: 'AssignCard',
layKey: 'defaultCreate'
}
}
if (this.subTypeName === 'AssignCardPaint') {
return {
typeName: 'AssignCard',
layKey: 'assignCardPaintEdit'
}
} }
return {}
} }
}, },
mounted() { mounted() {
...@@ -122,37 +133,43 @@ export default { ...@@ -122,37 +133,43 @@ export default {
}, },
tableToolHandler(e) { tableToolHandler(e) {
if (e && e.key && e.key.btnValue) { if (e && e.key && e.key.btnValue) {
let type let name
const { btnValue } = e.key const { btnValue } = e.key
switch (btnValue) { switch (btnValue) {
case 'addMix': type = 'AssignCardLacquer' case 'deploymentCardCreate': this.subTypeName = 'AssignCardLacquer' // 调胶调配卡
name = '调胶调配'
this.title = '创建调胶调配记录卡'
break break
case 'addPaint': type = 'AssignCardPaint' case 'paintAdjustmentCreate': this.subTypeName = 'AssignCardPaint' // 调漆调配卡
name = '胶漆调配'
this.title = '创建调漆调配记录卡'
break break
case 'addAlodine':type = 'AssignCardAlodine' case 'addAlodine':this.subTypeName = 'AssignCardAlodine' // 阿洛丁调配卡
this.title = '创建阿洛丁调配记录卡'
name = '阿洛丁调配'
break break
} }
if (e.el.selectedData.length === 0) { if (e.el.selectedData.length === 0) {
this.$utils.showConfirm( this.$utils.showConfirm(
`确定不关联胶漆调配申请创建调配卡吗, 是否继续?`, `确定不关联${name}申请创建调配卡吗, 是否继续?`,
'提示', '提示',
'warning', 'warning',
'确定', '确定',
'取消', '取消',
() => { () => {
if (btnValue === 'deploymentCardCreate') { if (['AssignCardLacquer', 'AssignCardPaint'].includes(this.subTypeName)) {
this.productArea = '' this.productArea = ''
this.dialogVisible = true this.dialogVisible = true
} else { } else {
this.adjustCardCreate(e, type) this.adjustCardCreate(e, this.subTypeName)
} }
} }
) )
} else { } else {
if (btnValue === 'deploymentCardCreate') { if (['AssignCardLacquer', 'AssignCardPaint'].includes(this.subTypeName)) {
this.dataCheck() this.dataCheck()
} else { } else {
this.adjustCardCreate(e, type) this.adjustCardCreate(e, this.subTypeName)
} }
} }
} }
...@@ -190,7 +207,7 @@ export default { ...@@ -190,7 +207,7 @@ export default {
save() { save() {
const params = { const params = {
'dxClassName': 'com.yonde.tf.mom.common.vo.schedule.AssignCardVO', 'dxClassName': 'com.yonde.tf.mom.common.vo.schedule.AssignCardVO',
'subTypeName': 'AssignCardLacquer', 'subTypeName': this.subTypeName,
'operator': 'ADD', 'operator': 'ADD',
productArea: this.productArea productArea: this.productArea
} }
......
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