diff --git a/src/pages/xinrui/storage/settings/SoftWasteBarrelPrint.vue b/src/pages/xinrui/storage/settings/SoftWasteBarrelPrint.vue index 96e34fa..2939636 100644 --- a/src/pages/xinrui/storage/settings/SoftWasteBarrelPrint.vue +++ b/src/pages/xinrui/storage/settings/SoftWasteBarrelPrint.vue @@ -23,6 +23,18 @@ +
+
是否可用
+
+ + +
+
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 } } }