Commit eafb4d8d authored by hubaoshan's avatar hubaoshan

Merge remote-tracking branch 'origin/template_pda_vue' into template_pda_vue

parents 11dd5836 ce824b74
const manufacturer = [
{
value: '1',
label: 'baidu'
},
{
value: '2',
label: 'ali'
},
{
value: '3',
label: 'taobao'
}
]
export default manufacturer
......@@ -138,6 +138,7 @@ export default {
})
this.queryFormDate.qty = ''
} else {
this.queryFormDate.YY = this.queryForm.value
changeLabel(this.queryFormDate).then(response => {
if (response.code === 200) {
this.$message.success('提交成功')
......
......@@ -16,14 +16,19 @@
<el-form-item label="pn:">
<span>{{ form.pn || '-' }}</span>
</el-form-item>
<el-form-item label="lot:">
<span>{{ form.lot || '-' }}</span>
</el-form-item>
<div class="searchDiv">
<el-form-item label="lot:">
<span>{{ form.lot || '-' }}</span>
</el-form-item>
<el-form-item v-if="form.cj && form.cj !== null" label="cj:">
<span>{{ getLabelByCj(form.cj) || '-' }}</span>
</el-form-item>
</div>
<div class="searchDiv">
<el-form-item label="qty:">
<span>{{ form.qty || '-' }}</span>
</el-form-item>
<el-form-item label="rank:">
<el-form-item label="rank:">
<span>{{ form.rank || '-' }}</span>
</el-form-item>
</div>
......@@ -72,6 +77,7 @@
</template>
<script>
import manufacturer from "@/data/jsonData";
import { handleOutWarehouse, persistOut } from '@/api/outcomeWmsJbapplyTemp'
import { getDict } from '@/api/system/dict/data'
import { playAudio, successAudio } from '@/utils/common'
......@@ -80,6 +86,7 @@ export default {
name: 'Dispose',
data() {
return {
manufacturer,
typeList: [],
// 本地储存
/**
......@@ -101,8 +108,10 @@ export default {
pn: null,
lot: null,
qty: null,
rank: null
rank: null,
cj: null,
},
rules: {
search: [
{ pattern: /^.*,.*/ | /^.*$/, message: '输入值不符合格式要求,请重新输入', trigger: 'blur' }
......@@ -128,6 +137,10 @@ export default {
this.getDetail()
},
methods: {
getLabelByCj(value) {
const obj = manufacturer.find(item => item.value === value)
return obj ? obj.label : null
},
/**
* @description: 一开始将焦点聚焦到第一个输入框下
* @author: gaoyu
......
......@@ -90,7 +90,8 @@
</template>
<script>
import manufacturer, {
import manufacturer from "@/data/jsonData";
import {
batchAddIncomeWmsBox, checkIsZero, getJcCode, queryPass
} from '@/api/incomeWmsBox'
import { findByLocation, updateIncomeWmsLabel } from '@/api/incomeWmsLabel'
......@@ -190,6 +191,7 @@ export default {
}).then(() => {
this.clearForm(e)
this.getDictData()
this.queryForm.cj = this.manufacturer[0].value
this.$message({
type: 'success',
message: '清空成功!'
......@@ -297,15 +299,11 @@ export default {
}, () => {})
} else {
const inputValues = this.queryForm.value1.split(',')
console.log('inputValues', inputValues.length)
if (inputValues.length === 2) {
console.log('查询1')
this.queryForm.location = inputValues[0].trim()
this.queryForm.pn = inputValues[1].trim()
console.log('inputValues', inputValues.length)
findByLocation(this.queryForm.location).then(res => {
if (res.code === 200) {
console.log('resDate', res.data)
if (res.data != null) {
if (res.data.pn !== null && res.data.pn !== '') {
this.incomeWmsLabelList = res.data
......@@ -443,6 +441,7 @@ export default {
} else {
const values = this.queryForm.value2.split(':')
// 校验第三个值是否为整数
// 校验第三个值是否为整数
// if (/^\d+$/.test(values[3])) {
const obj = {
whId: this.queryForm.whId,
......@@ -456,10 +455,9 @@ export default {
orderCode: this.incomeWmsBoxList.order_code
}
// this.incomeWmsBoxList.pn = values[1]
console.log(obj)
if (obj.labelId !== null && obj.labelId !== '' && obj.labelId !== undefined) {
if (this.incomeWmsLabelList.pn && this.incomeWmsLabelList.pn !== '' && this.incomeWmsLabelList.pn !== undefined) {
if (obj.pn !== this.incomeWmsLabelList.pn) {
if (obj.pn.toUpperCase() !== this.incomeWmsLabelList.pn.toUpperCase()) {
playAudio(true)
this.$message.error({
message: '输入的pn值:' + obj.pn + '与数据库中pn值:' + this.incomeWmsLabelList.pn + '不匹配,请重新输入',
......@@ -473,12 +471,12 @@ export default {
} else {
let isLegalLot = false
this.enterTable.forEach(item => {
if (item.lot === obj.lot) {
if (item.lot.toUpperCase() === obj.lot.toUpperCase() ) {
isLegalLot = true
}
})
if (isLegalLot) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase()) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......@@ -502,7 +500,7 @@ export default {
if (res.code === 200) {
if (res.data) {
if (this.enterTable.length > 0) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase()) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......@@ -550,12 +548,12 @@ export default {
if (res.data != null) {
let isLegalLot = false
this.enterTable.forEach(item => {
if (item.lot === obj.lot) {
if (item.lot.toUpperCase() === obj.lot.toUpperCase() ) {
isLegalLot = true
}
})
if (isLegalLot) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase()) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......@@ -579,7 +577,7 @@ export default {
if (res.code === 200) {
if (res.data) {
if (this.enterTable.length > 0) {
if (this.enterTable[0].pn === obj.pn) {
if (this.enterTable[0].pn.toUpperCase() === obj.pn.toUpperCase() ) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment