矿用软废组桶
This commit is contained in:
@@ -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 确定组桶(点击确定组桶按钮)
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
<nav-bar title="矿用软废组桶"></nav-bar>
|
||||
<section ref="content" class="content mgb70" :style="'margin-top: '+(0.96+2 * 0.92)+ 'rem'">
|
||||
<div class="filter-wraper">
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">桶码</div>
|
||||
<div class="fxcol mgl20">
|
||||
<input type="text" class="filter-input filter-scan-input" v-model="val1" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<search-box
|
||||
label="桶码"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
></search-box>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">物料编码</div>
|
||||
<div class="fxcol mgl20">
|
||||
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user