Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_pda_Web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_pda_Web
Commits
55a6cf7b
Commit
55a6cf7b
authored
Jul 15, 2024
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复原版(前面意外提交)
parent
4d021618
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
903 deletions
+0
-903
incomeBox.js
src/api/test/incomeBox.js
+0
-104
incomeLabel.js
src/api/test/incomeLabel.js
+0
-76
enterbound.vue
src/views/mytest/enterbound.vue
+0
-723
No files found.
src/api/test/incomeBox.js
deleted
100644 → 0
View file @
4d021618
import
request
from
'@/utils/request'
import
Qs
from
'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询库存管理列表
export
function
listIncomeBox
(
query
)
{
return
request
({
url
:
'/incomebox/list'
,
method
:
'get'
,
params
:
query
})
}
// 2. 查询库存管理详细信息
export
function
getIncomeBox
(
businessId
)
{
return
request
({
url
:
'/incomebox/detail/'
+
businessId
,
method
:
'get'
})
}
// 3. 新增库存管理
export
function
addIncomeBox
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/incomebox/add'
,
method
:
'post'
,
data
:
data
})
}
// 4. 修改库存管理
export
function
updateIncomeBox
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/incomebox/update/'
+
businessId
,
method
:
'put'
,
data
})
}
// 5. 逻辑删除库存管理
export
function
delIncomeBox
(
businessId
)
{
return
request
({
url
:
'/incomebox/deleteLogical/'
+
businessId
,
method
:
'delete'
})
}
// 6. 导出库存管理
export
function
exportIncomeBox
(
query
)
{
return
request
({
url
:
'/incomebox/export'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
// 7.获取单号
export
function
getJcCode
()
{
return
request
({
url
:
'/incomebox/getJcCode'
,
method
:
'get'
})
}
// 8. 查询满足条件的条数
export
function
queryPass
(
lot
)
{
return
request
({
url
:
'/incomebox/queryPass/'
+
lot
,
method
:
'get'
})
}
// 9. 批量新增库存管理
export
function
batchAddIncomeBox
(
data
)
{
return
request
({
url
:
'/incomebox/batchAdd'
,
method
:
'post'
,
data
:
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
// 接口修改传参类型
}
})
}
export
function
checkIsZero
(
data
)
{
return
request
({
url
:
'incomebox/checkIsZero'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
// 接口修改传参类型
}
})
}
src/api/test/incomeLabel.js
deleted
100644 → 0
View file @
4d021618
import
request
from
'@/utils/request'
import
Qs
from
'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询标签管理列表
export
function
listIncomeLabel
(
query
)
{
return
request
({
url
:
'/incomelabel/list'
,
method
:
'get'
,
params
:
query
})
}
// 2. 查询标签管理详细信息
export
function
getIncomeLabel
(
businessId
)
{
return
request
({
url
:
'/incomelabel/detail/'
+
businessId
,
method
:
'get'
})
}
// 3. 新增标签管理
export
function
addIncomeLabel
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/incomelabel/add'
,
method
:
'post'
,
data
:
data
})
}
// 4. 修改标签管理
export
function
updateIncomeLabel
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/incomelabel/update/'
+
businessId
,
method
:
'put'
,
data
})
}
// 5. 逻辑删除标签管理
export
function
delIncomeLabel
(
businessId
)
{
return
request
({
url
:
'/incomelabel/deleteLogical/'
+
businessId
,
method
:
'delete'
})
}
// 6. 导出标签管理
export
function
exportIncomeLabel
(
query
)
{
return
request
({
url
:
'/incomelabel/export'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
// 7. 查询标签管理详细信息
export
function
findByLocation
(
location
)
{
return
request
({
url
:
'/incomelabel/findByLocation/'
+
location
,
method
:
'get'
})
}
src/views/mytest/enterbound.vue
deleted
100644 → 0
View file @
4d021618
<
template
>
<div
class=
"enterBound"
>
<div
class=
"enterForm"
>
<div
class=
"search"
>
<el-form
ref=
"queryForm"
class=
"formClass"
:model=
"queryForm"
:rules=
"rules"
label-width=
"80px"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"仓库:"
prop=
"whId"
>
<el-select
v-model=
"queryForm.whId"
filterable
class=
"normalSelect"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in warehouseList"
:key=
"index"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"cj"
prop=
"cj"
>
<el-select
v-model=
"queryForm.cj"
class=
"normalSelect"
placeholder=
"请选择厂家"
>
<el-option
v-for=
"item in manufacturer"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"location:"
prop=
"value1"
>
<el-input
ref=
"input1"
v-model=
"queryForm.value1"
:disabled=
"enterTable.length>0"
clearable
@
keyup
.
enter
.
native=
"handelTab(1,$event)"
/>
</el-form-item>
<el-form-item>
<div
class=
"location"
>
location:
{{
queryForm
.
location
}}
</div>
<div
v-show=
"showPN(queryForm.location,incomeLabelList.pn)"
>
<!-- 库PN:
{{
incomeLabelList
.
pn
}}
-->
<span
style=
"color: black;"
>
库PN:
</span><span
style=
"color: red;"
>
{{
incomeLabelList
.
pn
}}
</span>
</div>
</el-form-item>
<el-form-item
label=
"YY:"
prop=
"value2"
>
<el-input
ref=
"input2"
v-model=
"queryForm.value2"
clearable
@
keyup
.
enter
.
native=
"addList"
/>
</el-form-item>
<el-form-item>
<div
class=
"showPn"
>
<span
class=
"pnFont"
>
YYpn:
{{
incomeBoxList
.
pn
}}
</span>
</div>
</el-form-item>
</el-form>
</div>
<div
class=
"enterTable"
>
<el-table
:data=
"enterTable"
>
<el-table-column
label=
"lot"
min-width=
"52"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
lot
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"qty"
min-width=
"52"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
qty
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"rank"
min-width=
"52"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
rank
}}
</span>
</
template
>
</el-table-column>
<el-table-column
min-width=
"20"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<i
class=
"el-icon-delete-solid"
style=
"font-size: 26px;margin-left: -10px;color: #46BCF3; margin-top: 7px"
@
click=
"handleDelte(scope.$index)"
/>
<!--
<span>
{{
scope
.
row
.
value3
}}
</span>
-->
</
template
>
</el-table-column>
</el-table>
</div>
<div
class=
"tableTotal"
>
<span
style=
"color: red"
>
条数:{{ enterTable.length }}
</span>
</div>
<div
class=
"buttonRegion"
>
<el-button
class=
"button_rowBtn"
type=
"primary"
@
click=
"SubmitForm"
>
保存
</el-button>
<el-button
class=
"button_rowBtn"
type=
"primary"
@
click=
"clearFormConfirmation($event)"
>
清空
</el-button>
</div>
<!-- 中间文本-->
<div
class=
"BottomContent"
>
<div
class=
"fontSp"
>
单号: {{ incomeBoxList.order_code }}
</div>
<div
class=
"loginUser"
>
操作人: {{ userList.nickName }}
</div>
</div>
</div>
</div>
</template>
<
script
>
import
manufacturer
from
'@/data/jsonData'
import
{
batchAddIncomeBox
,
checkIsZero
,
getJcCode
}
from
'@/api/test/incomeBox'
import
{
findByLocation
}
from
'@/api/test/incomeLabel'
import
{
getInfo
}
from
'@/api/login'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
playAudio
,
successAudio
}
from
'@/utils/common'
import
{
customUpperCase
}
from
'@/utils/common'
export
default
{
name
:
'EnterBound'
,
data
()
{
return
{
queryForm
:
{
cj
:
''
,
whId
:
''
,
location
:
''
,
// 假设 location 的值为 'A1'
pn
:
''
,
// 假设 pn 的值为 'ABC'
value1
:
''
,
value2
:
''
,
lot
:
''
,
qty
:
''
,
rank
:
''
},
// 库存管理表格数据
incomeBoxList
:
{
order_code
:
''
,
pn
:
''
},
// 仓库数据
warehouseList
:
[],
form
:
{},
enterTable
:
[],
incomeLabelList
:
{},
userList
:
{
nickName
:
''
},
manufacturer
:
{},
// 表单校验
rules
:
{
value1
:
[
{
required
:
true
,
message
:
'请输入barcode的值'
,
trigger
:
'blur'
},
{
pattern
:
/^.*,.*/
|
/^.*$/
,
message
:
'输入值不符合格式要求,请重新输入'
,
trigger
:
'blur'
}
],
value2
:
[
{
pattern
:
/^
[^
:
]
+:
[^
:
]
+:
[^
:
]
+:
\d
+$/
,
message
:
'输入值不符合格式要求,请重新输入'
,
trigger
:
'blur'
}
]
}
}
},
created
()
{
console
.
log
(
'manufacturer'
,
manufacturer
)
this
.
manufacturer
=
manufacturer
this
.
getDictData
()
this
.
focusing
()
this
.
getOrderCode
()
this
.
getLoginUser
()
// this.queryForm.cj = this.manufacturer[0].value
},
mounted
()
{
this
.
queryForm
.
cj
=
this
.
manufacturer
[
0
].
value
},
methods
:
{
customUpperCase
,
/**
* @description: 获取数据字典
* @author: gaoyu
* @param:
* @return:
**/
getDictData
()
{
// 获取仓库的数据字段
getDict
(
'WAREHOUSE'
).
then
(
res
=>
{
console
.
log
(
'仓库数据字典'
,
res
)
this
.
warehouseList
=
res
.
data
const
whId
=
res
.
data
[
0
].
dictValue
this
.
queryForm
.
whId
=
whId
})
},
showPN
(
location
,
pn
)
{
if
((
location
!==
''
&&
location
!==
null
)
&&
(
pn
!==
''
&&
pn
!==
null
&&
pn
!==
undefined
))
{
return
true
}
else
{
return
false
}
},
/**
* 清空按钮
* @param e
*/
// 清空按钮的确认逻辑
clearFormConfirmation
(
e
)
{
if
(
e
.
target
.
innerText
===
'清空'
)
{
this
.
$confirm
(
'确定要清空列表吗?'
,
'清空列表'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
clearForm
(
e
)
this
.
getDictData
()
this
.
queryForm
.
cj
=
this
.
manufacturer
[
0
].
value
this
.
$message
({
type
:
'success'
,
message
:
'清空成功!'
})
}).
catch
(()
=>
{
})
}
},
clearForm
(
e
)
{
this
.
queryForm
=
{
queryForm
:
{
cj
:
''
,
location
:
''
,
// 假设 location 的值为 'A1'
pn
:
''
,
// 假设 pn 的值为 'ABC'
value1
:
''
,
value2
:
''
,
lot
:
''
,
qty
:
''
,
rank
:
''
}
}
this
.
incomeLabelList
=
{}
this
.
incomeBoxList
.
pn
=
''
this
.
enterTable
=
[]
const
that
=
this
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
that
.
$refs
[
'input1'
].
focus
()
})
},
/**
* 保存
*/
SubmitForm
()
{
this
.
$confirm
(
'确定要执行新增操作吗?'
,
'批量新增'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
if
(
valid
&&
this
.
enterTable
.
length
>
0
)
{
const
obj
=
{
boxList
:
this
.
enterTable
}
batchAddIncomeBox
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
msgSuccess
(
'新增成功'
)
this
.
clearForm
()
this
.
queryForm
.
cj
=
this
.
manufacturer
[
0
].
value
this
.
getDictData
()
this
.
getOrderCode
()
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
input1
.
focus
()
})
}
})
}
else
{
this
.
$message
.
error
(
'列表的数据不能为空'
)
}
})
}).
catch
(()
=>
{
})
},
/** 获取当前登录用户**/
getLoginUser
()
{
getInfo
().
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
userList
.
nickName
=
response
.
data
.
user
.
nickName
}
})
},
/**
* 获取单号
*/
// 获取单号
getOrderCode
()
{
getJcCode
().
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
incomeBoxList
.
order_code
=
response
.
data
}
})
},
/**
* @description: 监听输入框回车事件,如果回车焦点聚集到下一个输入框
* @author: gaoyu
* @param:
* @return:
**/
handelTab
(
i
,
e
)
{
const
that
=
this
if
(
!
that
.
$refs
[
'input'
+
i
])
{
return
}
this
.
$refs
.
queryForm
.
validateField
(
'value1'
,
(
error
)
=>
{
if
(
error
)
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
},
()
=>
{})
}
else
{
const
inputValues
=
this
.
queryForm
.
value1
.
split
(
','
)
if
(
inputValues
.
length
===
2
)
{
this
.
queryForm
.
location
=
inputValues
[
0
].
trim
()
this
.
queryForm
.
pn
=
inputValues
[
1
].
trim
()
findByLocation
(
this
.
queryForm
.
location
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
!=
null
)
{
if
(
res
.
data
.
pn
!==
null
&&
res
.
data
.
pn
!==
''
)
{
this
.
incomeLabelList
=
res
.
data
// this.getOrderCode()
successAudio
(
true
)
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
else
{
successAudio
(
true
)
this
.
incomeLabelList
=
res
.
data
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'数据库中无对应数据location:'
+
this
.
queryForm
.
location
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
},
()
=>
{
})
this
.
queryForm
.
value1
=
''
this
.
queryForm
.
location
=
''
this
.
incomeLabelList
.
pn
=
''
this
.
queryForm
.
value2
=
''
}
}
})
}
else
{
console
.
log
(
'查询2'
)
if
(
inputValues
.
length
===
1
)
{
this
.
queryForm
.
location
=
inputValues
[
0
].
trim
()
console
.
log
(
'location'
,
this
.
queryForm
.
location
)
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
!==
''
)
{
if
(
res
.
data
.
pn
!==
this
.
queryForm
.
pn
)
{
successAudio
(
true
)
this
.
incomeLabelList
=
res
.
data
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
else
{
successAudio
(
true
)
this
.
incomeLabelList
=
res
.
data
// this.getOrderCode()
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
}
else
{
successAudio
(
true
)
this
.
incomeLabelList
=
res
.
data
that
.
$nextTick
(()
=>
{
e
.
target
.
blur
()
const
index
=
i
+
1
that
.
$refs
[
'input'
+
index
].
focus
()
})
}
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'数据库中无对应数据location:'
+
this
.
queryForm
.
location
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value1
=
''
this
.
queryForm
.
location
=
''
this
.
incomeLabelList
.
pn
=
''
this
.
queryForm
.
value2
=
''
}
}
})
}
else
{
playAudio
(
true
)
// 输入值不符合格式要求,进行报错处理
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value1
=
''
}
}
}
})
},
/**
* @description: 一开始将焦点聚焦到第一个输入框下
* @author: gaoyu
* @param:
* @return:
**/
focusing
()
{
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
input1
.
focus
()
})
},
/**
* @description: 监听第二个输入框,回车将输入添加到数组中
* @author: gaoyu
* @param:
* @return:
**/
addList
()
{
this
.
$refs
.
queryForm
.
validateField
(
'value2'
,
(
error
)
=>
{
if
(
error
)
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入值不符合格式要求,请重新输入'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value2
=
''
}
else
{
const
values
=
this
.
queryForm
.
value2
.
split
(
':'
)
// 校验第三个值是否为整数
// 校验第三个值是否为整数
// if (/^\d+$/.test(values[3])) {
const
obj
=
{
whId
:
this
.
queryForm
.
whId
,
lot
:
values
[
0
],
cj
:
this
.
queryForm
.
cj
,
location
:
this
.
queryForm
.
location
,
pn
:
values
[
1
],
qty
:
parseInt
(
values
[
3
]),
rank
:
values
[
2
],
labelId
:
this
.
incomeLabelList
.
businessId
,
orderCode
:
this
.
incomeBoxList
.
order_code
}
// this.incomeBoxList.pn = values[1]
if
(
obj
.
labelId
!==
null
&&
obj
.
labelId
!==
''
&&
obj
.
labelId
!==
undefined
)
{
if
(
this
.
incomeLabelList
.
pn
&&
this
.
incomeLabelList
.
pn
!==
''
&&
this
.
incomeLabelList
.
pn
!==
undefined
)
{
if
(
customUpperCase
(
obj
.
pn
)
!==
customUpperCase
(
this
.
incomeLabelList
.
pn
))
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入的pn值:'
+
obj
.
pn
+
'与数据库中pn值:'
+
this
.
incomeLabelList
.
pn
+
'不匹配,请重新输入'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value2
=
null
// this.incomeBoxList.pn = obj.pn
}
else
{
let
isLegalLot
=
false
this
.
enterTable
.
forEach
(
item
=>
{
if
(
customUpperCase
(
item
.
lot
)
===
customUpperCase
(
obj
.
lot
))
{
isLegalLot
=
true
}
})
if
(
isLegalLot
)
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
))
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn:'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value2
=
null
}
}
else
{
const
Zbj
=
{
lot
:
obj
.
lot
}
checkIsZero
(
Zbj
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
)
{
if
(
this
.
enterTable
.
length
>
0
)
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
))
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn:'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value2
=
null
}
}
else
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
}
}
else
{
// 创建一个新的音频元素
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'该LOT值'
+
obj
.
lot
+
'未被检查!'
,
duration
:
2000
,
onClose
:
()
=>
{
// 当消息提示框关闭时停止播放声音
playAudio
(
false
)
}
},
()
=>
{
})
this
.
queryForm
.
value2
=
null
}
}
})
}
}
}
else
{
const
inputValues
=
this
.
queryForm
.
value1
.
split
(
','
)
this
.
queryForm
.
location
=
inputValues
[
0
].
trim
()
findByLocation
(
this
.
queryForm
.
location
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
!=
null
)
{
let
isLegalLot
=
false
this
.
enterTable
.
forEach
(
item
=>
{
if
(
customUpperCase
(
item
.
lot
)
===
customUpperCase
(
obj
.
lot
))
{
isLegalLot
=
true
}
})
if
(
isLegalLot
)
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
))
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn值'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value2
=
null
}
}
else
{
const
Zbj
=
{
lot
:
obj
.
lot
}
checkIsZero
(
Zbj
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
data
)
{
if
(
this
.
enterTable
.
length
>
0
)
{
if
(
customUpperCase
(
this
.
enterTable
[
0
].
pn
)
===
customUpperCase
(
obj
.
pn
))
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'与下方列表的pn值'
+
this
.
enterTable
[
0
].
pn
+
'不匹配'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
value2
=
null
}
}
else
{
successAudio
(
true
)
this
.
enterTable
.
push
(
obj
)
this
.
incomeBoxList
.
pn
=
obj
.
pn
this
.
queryForm
.
value2
=
''
}
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'该LOT值'
+
obj
.
lot
+
'未被检查!'
,
duration
:
2000
,
onClose
:
()
=>
{
// 当消息提示框关闭时停止播放声音
playAudio
(
false
)
}
},
()
=>
{
})
this
.
queryForm
.
value2
=
null
}
}
})
}
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'该location的值'
+
this
.
queryForm
.
location
+
'无效'
+
'请输入有效的location值'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
this
.
queryForm
.
location
=
''
}
}
})
}
}
else
{
playAudio
(
true
)
this
.
$message
.
error
({
message
:
'输入格式不符合要求,请重新输入'
,
duration
:
2000
,
onClose
:
()
=>
{
playAudio
(
false
)
}
})
}
// }
// else {
// this.$message.error('qty的值必须为整数!')
// }
}
})
},
/**
* @description: 删除数据中元素
* @author: gaoyu
* @param:
* @return:
**/
handleDelte
(
index
)
{
this
.
enterTable
.
splice
(
index
,
1
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.enterBound
{
display
:
flex
;
justify-content
:
center
;
.enterForm
{
width
:
96%
;
.normalSelect
{
width
:
100%
;
}
//.input1Font{
// width: 100%;
// justify-content: space-between;
// display: flex;
//}
.showPn
{
width
:
100%
;
justify-content
:
space-between
;
display
:
flex
;
}
.tableTotal
{
margin-top
:
2%
;
}
}
.buttonRegion
{
margin-top
:
20px
;
display
:
flex
;
justify-content
:
space-between
;
.button_rowBtn
{
font-size
:
17px
;
width
:
120px
;
}
}
.BottomContent
{
margin-top
:
5%
;
display
:
flex
;
justify-content
:
space-between
;
.loginUser
{
text-align
:
right
;
margin-right
:
0
.7%
;
}
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment