物料编码
@@ -111,7 +110,7 @@
import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue'
import DropdownMenu from '@components/DropdownMenu.vue'
-import { bucketPrint, bucketDelete, bucketGetLevel } from '@config/getData2.js'
+import { queryInfoBybucket, bucketPrint, bucketDelete, bucketGetLevel } from '@config/getData2.js'
import { bucketCheckCode, confirmGroupBucketAndBag } from '@config/getData3.js'
import {accAdd, submitPackUp} from '@config/mUtils.js'
import {toPrint} from '@config/print.js'
@@ -128,7 +127,8 @@ export default {
val2: '',
val3: '',
val4: '',
- result: {},
+ resultOne: {},
+ resultTwo: {},
dataList: [],
pkId: '',
pkObj: {},
@@ -161,6 +161,25 @@ export default {
this._bucketGetLevel()
},
methods: {
+ handleChange1 (e, type) {
+ if (type) {
+ this._queryInfoBybucket(e)
+ }
+ },
+ /** 桶码查询信息 */
+ async _queryInfoBybucket (e) {
+ let res = await queryInfoBybucket(e)
+ if (res.code === '1') {
+ this.val1 = res.result.result.bucketunique
+ this.val2 = res.result.result.material_code
+ this.val3 = res.result.result.pcsn
+ this.dataList = []
+ this.val4 = ''
+ this.dataList = res.result.results
+ } else {
+ this.Dialog(res.desc)
+ }
+ },
handleChange4 (e, type) {
if (type) {
this._bucketCheckCode(e)
@@ -185,7 +204,7 @@ export default {
},
/** 袋码查询信息 */
async _bucketCheckCode (e) {
- let res = await bucketCheckCode(e, this.val1, this.val3)
+ let res = await bucketCheckCode(e, this.val1, this.val2, this.val3)
if (res.code === '1') {
if (this.dataList.length) {
let arr1 = this.dataList.filter(el => {
@@ -196,7 +215,8 @@ export default {
this.val1 = res.resultTwo.bucketunique
this.val2 = res.resultTwo.material_code
this.val3 = res.resultTwo.pcsn
- this.result = res.resultOne
+ this.resultOne = res.resultOne
+ this.resultTwo = res.resultTwo
} else {
this.toast('袋码已存在')
this.val4 = ''
@@ -207,7 +227,8 @@ export default {
this.val1 = res.resultTwo.bucketunique
this.val2 = res.resultTwo.material_code
this.val3 = res.resultTwo.pcsn
- this.result = res.resultOne
+ this.resultOne = res.resultOne
+ this.resultTwo = res.resultTwo
}
}
} else {
@@ -257,7 +278,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, {storage_qty: this.val5, accountId: accountId, user: user, is_active: this.option[this.active].value, ivt_level: this.option1[this.active1].value})
+ let newObj = Object.assign({}, this.resultOne, this.resultTwo, {storage_qty: this.val5, accountId: accountId, user: user, is_active: this.option[this.active].value, ivt_level: this.option1[this.active1].value})
let res = await confirmGroupBucketAndBag(newObj, this.dataList)
if (res.code === '1') {
this.toast(res.desc)
@@ -265,7 +286,8 @@ export default {
this.val2 = ''
this.val3 = ''
this.val4 = ''
- this.result = {}
+ this.resultOne = {}
+ this.resultTwo = {}
this.dataList = []
this.pkId = ''
this.pkObj = {}
@@ -293,7 +315,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, {storage_qty: this.val5, accountId: accountId, user: user, is_active: this.option[this.active].value, ivt_level: this.option1[this.active1].value})
+ let newObj = Object.assign({}, this.resultOne, this.resultTwo, {storage_qty: this.val5, accountId: accountId, user: user, is_active: this.option[this.active].value, ivt_level: this.option1[this.active1].value})
let res = await confirmGroupBucketAndBag(newObj, this.dataList)
if (res.code === '1') {
this.toast(res.desc)
@@ -305,7 +327,8 @@ export default {
this.val2 = ''
this.val3 = ''
this.val4 = ''
- this.result = {}
+ this.resultOne = {}
+ this.resultTwo = {}
this.dataList = []
this.pkId = ''
this.pkObj = {}
@@ -349,7 +372,8 @@ export default {
this.val2 = ''
this.val3 = ''
this.val4 = ''
- this.result = {}
+ this.resultOne = {}
+ this.resultTwo = {}
this.dataList = []
this.pkId = ''
this.pkObj = {}