This commit is contained in:
2024-08-01 19:03:29 +08:00
parent c1e7a3ef6c
commit 1b1df48566

View File

@@ -45,8 +45,7 @@
<dropdown-menu <dropdown-menu
:option="option1" :option="option1"
:active="active1" :active="active1"
:open="open1" :open="open1">
:disabled="true">
</dropdown-menu> </dropdown-menu>
</div> </div>
</div> </div>
@@ -129,11 +128,13 @@ export default {
this.val4 = arr[3] this.val4 = arr[3]
this.val5 = arr[4] this.val5 = arr[4]
this.active = arr[5] + '' this.active = arr[5] + ''
this.option1.map((el, i) => { if (this.option1.length) {
if (el.value === arr[5]) { this.option1.map((el, i) => {
this.active1 = i + '' if (el.value === arr[5]) {
} this.active1 = i + ''
}) }
})
}
}, },
toAdd () { toAdd () {
this.printWeight = !this.printWeight this.printWeight = !this.printWeight
@@ -161,7 +162,9 @@ export default {
try { try {
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : '' 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 user = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).user_name : ''
let newObj = {'accountId': accountId, 'user': user, 'bucketunique': this.val1, 'material_code': this.val2, 'pcsn': this.val3, 'storage_qty': this.val4, 'date': this.val5, 'is_active': this.option[this.active].value, 'ivt_level': this.option1[this.active1].value} let active = this.active !== '' ? this.option[this.active].value : ''
let active1 = this.active1 !== '' ? this.option1[this.active1].value : ''
let newObj = {'accountId': accountId, 'user': user, 'bucketunique': this.val1, 'material_code': this.val2, 'pcsn': this.val3, 'storage_qty': this.val4, 'date': this.val5, 'is_active': active, 'ivt_level': active1}
let res = await confirmGroupBucketNo(newObj) let res = await confirmGroupBucketNo(newObj)
if (res.code === '1') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)
@@ -188,7 +191,9 @@ export default {
try { try {
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : '' 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 user = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).user_name : ''
let newObj = {'accountId': accountId, 'user': user, 'bucketunique': this.val1, 'material_code': this.val2, 'pcsn': this.val3, 'storage_qty': this.val4, 'date': this.val5, 'is_active': this.option[this.active].value, 'ivt_level': this.option1[this.active1].value} let active = this.active !== '' ? this.option[this.active].value : ''
let active1 = this.active1 !== '' ? this.option1[this.active1].value : ''
let newObj = {'accountId': accountId, 'user': user, 'bucketunique': this.val1, 'material_code': this.val2, 'pcsn': this.val3, 'storage_qty': this.val4, 'date': this.val5, 'is_active': active, 'ivt_level': active1}
let res = await confirmGroupBucketNo(newObj) let res = await confirmGroupBucketNo(newObj)
if (res.code === '1') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)