Commit ff1645f6 authored by Hagsn3's avatar Hagsn3

提交代码

parent ba8fa7da
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-form ref="searchRef" :model="form" :rules="rules" label-width="80px" class="formClass" label-position="right"> <el-form ref="searchRef" :model="form" :rules="rules" label-width="80px" class="formClass" label-position="right">
<div class="searchDiv"> <div class="searchDiv">
<el-form-item label="ptype:"> <el-form-item label="ptype:">
<!-- <span>{{ form.ptype && getDictLabelByValue(typeList, form.ptype.trim()) || '-' }}</span>--> <!-- <span>{{ form.ptype && getDictLabelByValue(typeList, form.ptype.trim()) || '-' }}</span>-->
<span v-if="form.ptype === '1'">jb</span> <span v-if="form.ptype === '1'">jb</span>
<span v-else-if="form.ptype === '20'">jl</span> <span v-else-if="form.ptype === '20'">jl</span>
<span v-else>-</span> <span v-else>-</span>
...@@ -345,7 +345,9 @@ export default { ...@@ -345,7 +345,9 @@ export default {
rank: values[2] rank: values[2]
} }
console.log(obj) console.log(obj)
if (obj.pn !== this.form.pn || obj.lot !== this.form.lot) { /** ptyp为1的时候*/
if (this.form.ptype === '1') {
if (obj.pn !== this.form.pn || obj.lot !== this.form.lot || obj.rank !== this.form.rank) {
playAudio(true) playAudio(true)
this.$message.error({ this.$message.error({
message: '输入不符合要求请重新输入!', message: '输入不符合要求请重新输入!',
...@@ -378,6 +380,42 @@ export default { ...@@ -378,6 +380,42 @@ export default {
this.searchForm.value2 = '' // 清空LOT输入框数据 this.searchForm.value2 = '' // 清空LOT输入框数据
} }
} }
} else {
// ptype不为1的时候
if (obj.pn !== this.form.pn || obj.lot !== this.form.lot) {
playAudio(true)
this.$message.error({
message: '输入不符合要求请重新输入!',
duration: 2000,
onClose: () => {
playAudio(false)
}
})
this.searchForm.value2 = null
} else {
// 获取LOT输入框的数据
this.lot = obj.lot
const lot = this.lot
const search = this.search
// 调用方法,并传入位置和LOT作为参数
const abj = this.getIndexAndNeedNumber(search, lot)
if (abj) {
const { index, needNumber } = abj
if (!this.rowIndexList.includes(index)) {
successAudio(true)
this.rowIndexList.push(index)
this.search = null
this.lot = null
}
this.$nextTick().then(() => {
this.$refs.input1.focus()
})
this.total = this.total + needNumber
this.searchForm.search = ''
this.searchForm.value2 = '' // 清空LOT输入框数据
}
}
}
} }
}) })
}, },
......
...@@ -112,13 +112,6 @@ export default { ...@@ -112,13 +112,6 @@ export default {
// 获取申请分类的数量 // 获取申请分类的数量
getTabList() { getTabList() {
querykindsNumber().then(res => { querykindsNumber().then(res => {
// const tabArray = [{ type: '1', number: 0 }, { type: '20', number: 0 }]
// if (res.code === 200) {
// for (let a = 0; a < res.data.length; a++) {
// if (res.data[a].type == '1') { tabArray[0].number = res.data[a].number }
// if (res.data[a].type == '20') { tabArray[1].number = res.data[a].number }
// }
// this.tabList = tabArray
console.log('得到的标签', res) console.log('得到的标签', res)
this.tabList = res.data this.tabList = res.data
console.log('检查列表', this.tabList) console.log('检查列表', this.tabList)
......
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