软废组桶标签打印增加是否可用

This commit is contained in:
2022-07-13 11:05:07 +08:00
parent 3778e55fb2
commit a66d008fe4

View File

@@ -23,6 +23,18 @@
<input type="text" class="filter-input filter-scan-input" v-model="val3">
</div>
</div>
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">是否可用</div>
<div class="fxcol mgl20 visible" >
<dropdown-menu
:option="option"
:active="active"
:open="open"
@toggleItem="toggleItem"
@dropdownMenu="dropdownMenu">
</dropdown-menu>
</div>
</div>
<search-box
label="袋码"
v-model="val4"
@@ -103,6 +115,7 @@
<script>
import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue'
import DropdownMenu from '@components/DropdownMenu.vue'
import { queryInfoBybucket, queryInfoByBag, confirmGroupBucket, bucketPrint, bucketDelete, getpcsn } from '@config/getData2.js'
import {accAdd, submitPackUp} from '@config/mUtils.js'
import {toPrint} from '@config/print.js'
@@ -110,7 +123,8 @@ export default {
name: 'SoftWasteBarrelPrint',
components: {
NavBar,
SearchBox
SearchBox,
DropdownMenu
},
data () {
return {
@@ -128,7 +142,10 @@ export default {
disabled3: false,
disabled4: false,
disabled5: false,
printWeight: true
printWeight: true,
option: [{value: '0', label: '不可用'}, {value: '1', label: '可用'}],
active: '0',
open: false
}
},
computed: {
@@ -337,7 +354,7 @@ export default {
try {
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : ''
let user = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).user_name : ''
let newObj = Object.assign({}, this.result, this.$store.getters.materObj, {pcsn: this.val3, storage_qty: this.val5, accountId: accountId, user: user})
let newObj = Object.assign({}, this.result, this.$store.getters.materObj, {pcsn: this.val3, storage_qty: this.val5, accountId: accountId, user: user, is_active: this.option[this.active].value})
let res = await confirmGroupBucket(newObj, this.dataList)
if (res.code === '1') {
this.toast(res.desc)
@@ -349,6 +366,7 @@ export default {
this.pkId = ''
this.pkObj = {}
this.disabled5 = false
this.active = '0'
} else {
this.Dialog(res.desc)
this.disabled5 = false
@@ -380,7 +398,7 @@ export default {
try {
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : ''
let user = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).user_name : ''
let newObj = Object.assign({}, this.result, this.$store.getters.materObj, {pcsn: this.val3, storage_qty: this.val5, accountId: accountId, user: user})
let newObj = Object.assign({}, this.result, this.$store.getters.materObj, {pcsn: this.val3, storage_qty: this.val5, accountId: accountId, user: user, is_active: this.option[this.active].value})
let res = await confirmGroupBucket(newObj, this.dataList)
if (res.code === '1') {
this.toast(res.desc)
@@ -400,6 +418,7 @@ export default {
this.pkId = ''
this.pkObj = {}
this.disabled1 = false
this.active = '0'
} else {
this.Dialog(res.desc)
this.disabled1 = false
@@ -447,11 +466,23 @@ export default {
this.disabled3 = false
this.disabled4 = false
this.disabled5 = false
this.active = '0'
this.$store.dispatch('materObj', '')
this._getpcsn()
},
packUp () {
this.up = submitPackUp(this.$refs.submit, this.$refs.arrow, this.$refs.content, 2, this.up)
},
toggleItem () {
if (!this.open) {
this.open = true
} else {
this.open = false
}
},
dropdownMenu (i) {
this.active = i + ''
this.open = false
}
}
}