From aa97a89eb74eae7d2fd4f10a773f924f6d5abeb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E7=8E=B2?= <8702040+cai-ling@user.noreply.gitee.com> Date: Thu, 7 Nov 2024 14:07:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=BF=E7=94=A8=E8=BD=AF=E5=BA=9F=E7=BB=84?= =?UTF-8?q?=E6=A1=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/getData3.js | 3 +- .../settings/MiningSoftWasteBarrel.vue | 56 +++++++++++++------ 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/config/getData3.js b/src/config/getData3.js index b91a94d..243f2df 100644 --- a/src/config/getData3.js +++ b/src/config/getData3.js @@ -16,9 +16,10 @@ export const bucketPrintNo = (code) => post('api/pda/set/bucketNotbag/print', { /** 矿用软废组桶-2024/10/31 */ // 1.3根据袋码码查询信息(扫描袋码触发的后台查询请求)--->变更为扫二维码掉后台 -export const bucketCheckCode = (code, bk, pcsn) => post('api/pda/set/bucket/checkCode', { +export const bucketCheckCode = (code, bk, mcode, pcsn) => post('api/pda/set/bucket/checkCode', { code_info: code, bucketunique: bk, + material_code: mcode, pcsn: pcsn }) // 1.4 确定组桶(点击确定组桶按钮) diff --git a/src/pages/xinrui/storage/settings/MiningSoftWasteBarrel.vue b/src/pages/xinrui/storage/settings/MiningSoftWasteBarrel.vue index da6c76d..efd2248 100644 --- a/src/pages/xinrui/storage/settings/MiningSoftWasteBarrel.vue +++ b/src/pages/xinrui/storage/settings/MiningSoftWasteBarrel.vue @@ -3,12 +3,11 @@
-
-
桶码
-
- -
-
+
物料编码
@@ -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 = {}