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