喷雾工序打印赋值

This commit is contained in:
2022-07-13 19:02:31 +08:00
parent 407390a793
commit 60fa5f13de
3 changed files with 28 additions and 6 deletions

View File

@@ -21,7 +21,7 @@
<img src="../../images/xinrui/menu/password.png" alt="">
<p class="fxcol">修改密码</p>
</div>
<div class="menu-col fxrow" @click="goInner('/MaintainExecution')"><p class="fxcol">设备保养执行-维修工</p></div>
<!-- <div class="menu-col fxrow" @click="goInner('/MaintainExecution')"><p class="fxcol">设备保养执行-维修工</p></div>
<div class="menu-col fxrow" @click="goInner('/MaintainConfirm')"><p class="fxcol">设备保养确认-生产员</p></div>
<div class="menu-col fxrow" @click="goInner('/EquipRepair')"><p class="fxcol">设备报修</p></div>
<div class="menu-col fxrow" @click="goInner('/EquipRepairExecute')"><p class="fxcol">设备维修执行</p></div>
@@ -29,7 +29,7 @@
<div class="menu-col fxrow" @click="goInner('/SparePartInstore')"><p class="fxcol">备件入库</p></div>
<div class="menu-col fxrow" @click="goInner('/SparePartOutstore')"><p class="fxcol">备件出库</p></div>
<div class="menu-col fxrow" @click="goInner('/UseReturn')"><p class="fxcol">领用还回</p></div>
<div class="menu-col fxrow" @click="goInner('/RunLogFill')"><p class="fxcol">运行记录填报</p></div>
<div class="menu-col fxrow" @click="goInner('/RunLogFill')"><p class="fxcol">运行记录填报</p></div> -->
<!-- <div class="menu-col fxrow" @click="goInner('/ProcessMakePowder')"><p class="fxcol">配粉工序</p></div>
<div class="menu-col fxrow" @click="goInner('/ProcessGrindBall')"><p class="fxcol">球磨工序</p></div>
<div class="menu-col fxrow" @click="goInner('/ProcessSpray')"><p class="fxcol">喷雾工序</p></div>
@@ -106,6 +106,7 @@ export default {
},
mounted () {
this.$store.dispatch('materObj', {})
this.$store.dispatch('materObj1', {})
document.getElementsByTagName('body')[0].className = 'bgwhite'
},
created () {

View File

@@ -114,10 +114,25 @@ export default {
next()
},
activated () {
this.val2 = this.$store.getters.materObj.material_code
this.materialId = this.$store.getters.materObj.material_id
if (this.$store.getters.materObj.standard_weight) {
this.val4 = Number(this.$store.getters.materObj.standard_weight).toFixed(3) + ''
if (JSON.stringify(this.$store.getters.materObj1) !== '{}') {
if (JSON.stringify(this.$store.getters.materObj) === '{}') {
this.val2 = this.$store.getters.materObj1.material_code
this.materialId = this.$store.getters.materObj1.material_id
this.val3 = this.$store.getters.materObj1.pcsn
this.val4 = '50.000'
}
if (JSON.stringify(this.$store.getters.materObj) !== '{}') {
this.val2 = this.$store.getters.materObj.material_code
this.materialId = this.$store.getters.materObj.material_id
this.val4 = Number(this.$store.getters.materObj.standard_weight).toFixed(3) + ''
}
}
if (JSON.stringify(this.$store.getters.materObj1) === '{}') {
if (JSON.stringify(this.$store.getters.materObj) !== '{}') {
this.val2 = this.$store.getters.materObj.material_code
this.materialId = this.$store.getters.materObj.material_id
this.val4 = Number(this.$store.getters.materObj.standard_weight).toFixed(3) + ''
}
}
},
methods: {
@@ -264,6 +279,7 @@ export default {
goIn () {
if (this.$route.query.url === 'ProcessSpray') {
this.$store.dispatch('materObj1', {})
this.$store.dispatch('materObj', {})
this.$store.dispatch('setKeepAlive', ['ProcessSpray'])
this.$router.push('/ProcessSpray')
}

View File

@@ -254,6 +254,11 @@ export default {
/** 打印 */
async _bagPrint () {
this.disabled2 = true
if (parseFloat(this.val4) <= 0 || isNaN(parseFloat(this.val4))) {
this.toast('重量必须大于0')
this.disabled2 = false
return
}
if (this.val2 === '' || this.val2 === undefined) {
this.toast('粉料编码不能为空')
this.disabled2 = false