From a66d008fe479dc0a8b8f4499e2d9375ccf2c1476 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Wed, 13 Jul 2022 11:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AF=E5=BA=9F=E7=BB=84=E6=A1=B6=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=89=93=E5=8D=B0=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storage/settings/SoftWasteBarrelPrint.vue | 39 +++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) 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 } } }