矿用软废组桶

This commit is contained in:
蔡玲
2024-11-07 14:07:09 +08:00
parent a45072e242
commit aa97a89eb7
2 changed files with 42 additions and 17 deletions

View File

@@ -16,9 +16,10 @@ export const bucketPrintNo = (code) => post('api/pda/set/bucketNotbag/print', {
/** 矿用软废组桶-2024/10/31 */ /** 矿用软废组桶-2024/10/31 */
// 1.3根据袋码码查询信息(扫描袋码触发的后台查询请求)--->变更为扫二维码掉后台 // 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, code_info: code,
bucketunique: bk, bucketunique: bk,
material_code: mcode,
pcsn: pcsn pcsn: pcsn
}) })
// 1.4 确定组桶(点击确定组桶按钮) // 1.4 确定组桶(点击确定组桶按钮)

View File

@@ -3,12 +3,11 @@
<nav-bar title="矿用软废组桶"></nav-bar> <nav-bar title="矿用软废组桶"></nav-bar>
<section ref="content" class="content mgb70" :style="'margin-top: '+(0.96+2 * 0.92)+ 'rem'"> <section ref="content" class="content mgb70" :style="'margin-top: '+(0.96+2 * 0.92)+ 'rem'">
<div class="filter-wraper"> <div class="filter-wraper">
<div class="bottom-filter-tip"> <search-box
<div class="filter-label txtjustify">桶码</div> label="桶码"
<div class="fxcol mgl20"> v-model="val1"
<input type="text" class="filter-input filter-scan-input" v-model="val1" disabled> @handleChange="handleChange1"
</div> ></search-box>
</div>
<div class="bottom-filter-tip"> <div class="bottom-filter-tip">
<div class="filter-label txtjustify">物料编码</div> <div class="filter-label txtjustify">物料编码</div>
<div class="fxcol mgl20"> <div class="fxcol mgl20">
@@ -111,7 +110,7 @@
import NavBar from '@components/NavBar.vue' import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue' import SearchBox from '@components/SearchBox.vue'
import DropdownMenu from '@components/DropdownMenu.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 { bucketCheckCode, confirmGroupBucketAndBag } from '@config/getData3.js'
import {accAdd, submitPackUp} from '@config/mUtils.js' import {accAdd, submitPackUp} from '@config/mUtils.js'
import {toPrint} from '@config/print.js' import {toPrint} from '@config/print.js'
@@ -128,7 +127,8 @@ export default {
val2: '', val2: '',
val3: '', val3: '',
val4: '', val4: '',
result: {}, resultOne: {},
resultTwo: {},
dataList: [], dataList: [],
pkId: '', pkId: '',
pkObj: {}, pkObj: {},
@@ -161,6 +161,25 @@ export default {
this._bucketGetLevel() this._bucketGetLevel()
}, },
methods: { 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) { handleChange4 (e, type) {
if (type) { if (type) {
this._bucketCheckCode(e) this._bucketCheckCode(e)
@@ -185,7 +204,7 @@ export default {
}, },
/** 袋码查询信息 */ /** 袋码查询信息 */
async _bucketCheckCode (e) { 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 (res.code === '1') {
if (this.dataList.length) { if (this.dataList.length) {
let arr1 = this.dataList.filter(el => { let arr1 = this.dataList.filter(el => {
@@ -196,7 +215,8 @@ export default {
this.val1 = res.resultTwo.bucketunique this.val1 = res.resultTwo.bucketunique
this.val2 = res.resultTwo.material_code this.val2 = res.resultTwo.material_code
this.val3 = res.resultTwo.pcsn this.val3 = res.resultTwo.pcsn
this.result = res.resultOne this.resultOne = res.resultOne
this.resultTwo = res.resultTwo
} else { } else {
this.toast('袋码已存在') this.toast('袋码已存在')
this.val4 = '' this.val4 = ''
@@ -207,7 +227,8 @@ export default {
this.val1 = res.resultTwo.bucketunique this.val1 = res.resultTwo.bucketunique
this.val2 = res.resultTwo.material_code this.val2 = res.resultTwo.material_code
this.val3 = res.resultTwo.pcsn this.val3 = res.resultTwo.pcsn
this.result = res.resultOne this.resultOne = res.resultOne
this.resultTwo = res.resultTwo
} }
} }
} else { } else {
@@ -257,7 +278,7 @@ 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 = 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) let res = await confirmGroupBucketAndBag(newObj, this.dataList)
if (res.code === '1') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)
@@ -265,7 +286,8 @@ export default {
this.val2 = '' this.val2 = ''
this.val3 = '' this.val3 = ''
this.val4 = '' this.val4 = ''
this.result = {} this.resultOne = {}
this.resultTwo = {}
this.dataList = [] this.dataList = []
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
@@ -293,7 +315,7 @@ 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 = 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) let res = await confirmGroupBucketAndBag(newObj, this.dataList)
if (res.code === '1') { if (res.code === '1') {
this.toast(res.desc) this.toast(res.desc)
@@ -305,7 +327,8 @@ export default {
this.val2 = '' this.val2 = ''
this.val3 = '' this.val3 = ''
this.val4 = '' this.val4 = ''
this.result = {} this.resultOne = {}
this.resultTwo = {}
this.dataList = [] this.dataList = []
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}
@@ -349,7 +372,8 @@ export default {
this.val2 = '' this.val2 = ''
this.val3 = '' this.val3 = ''
this.val4 = '' this.val4 = ''
this.result = {} this.resultOne = {}
this.resultTwo = {}
this.dataList = [] this.dataList = []
this.pkId = '' this.pkId = ''
this.pkObj = {} this.pkObj = {}