Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pda-scan
Project
Project
Details
Activity
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
ximai
mes-pda-scan
Commits
c8202d54
Commit
c8202d54
authored
Aug 09, 2025
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购到货、到货条码打印、到货检验、录入进货单页面添加批号显示
parent
493e53a4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
242 additions
and
123 deletions
+242
-123
abnormalRemoveEdit.vue
pages/abnormal/abnormalRemoveEdit.vue
+20
-10
scanning.vue
pages/dhd/scanning.vue
+11
-0
scanningList.vue
pages/dhd/scanningList.vue
+1
-0
Edit.vue
pages/forcheck/Edit.vue
+20
-10
Edit.vue
pages/forcreate/Edit.vue
+61
-86
Edit.vue
pages/moctcforcreate/Edit.vue
+124
-12
index.js
store/index.js
+5
-5
No files found.
pages/abnormal/abnormalRemoveEdit.vue
View file @
c8202d54
...
...
@@ -22,16 +22,26 @@
>
</input>
</u-form-item>
<u-form-item
prop=
"cd005"
:label=
"$t('品名:')"
class=
"disabled"
>
<input
v-model=
"form.cd005"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd005"
:label=
"$t('品名:')"
class=
"disabled"
>
<input
v-model=
"form.cd005"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd017"
:label=
"$t('批次号:')"
class=
"disabled"
>
<input
v-model=
"form.cd017"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd011"
:label=
"$t('采购单号:')"
class=
"disabled"
>
<input
v-model=
"form.cd011"
...
...
pages/dhd/scanning.vue
View file @
c8202d54
...
...
@@ -119,6 +119,15 @@ export default {
.
getforinvmbinfo
({
mb001
:
arr
[
4
]
})
// 生成批号:品号+客户+日期yyyyMMdd
const
today
=
new
Date
()
const
dateStr
=
today
.
getFullYear
().
toString
()
+
(
today
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
)
+
today
.
getDate
().
toString
().
padStart
(
2
,
'0'
)
const
customer
=
arr
[
0
]
// 使用供应商号作为客户,如果没有则使用默认值
const
batchNo
=
arr
[
4
]
+
customer
+
dateStr
this
.
goodsList
.
push
({
supplierNo
:
arr
[
0
],
purchaseType
:
arr
[
1
],
...
...
@@ -128,6 +137,8 @@ export default {
arrivalQuantity
:
arr
[
5
],
udf07
:
data1
.
data
[
'udf07'
],
mb002
:
data1
.
data
[
'mb002'
],
mb029
:
data1
.
data
[
'mb029'
],
batchNo
:
batchNo
,
joinlabel
:
arr
.
slice
(
0
,
5
).
join
(
'-'
)
})
}
...
...
pages/dhd/scanningList.vue
View file @
c8202d54
...
...
@@ -13,6 +13,7 @@
</view>
<view
class=
"item"
>
品名:
{{
item
.
mb002
}}
</view>
<view
class=
"item"
>
图号:
{{
item
.
mb029
}}
</view>
<view
class=
"item"
>
批号:
{{
item
.
batchNo
}}
</view>
</view>
</view>
</
template
>
...
...
pages/forcheck/Edit.vue
View file @
c8202d54
...
...
@@ -22,16 +22,26 @@
>
</input>
</u-form-item>
<u-form-item
prop=
"cd005"
:label=
"$t('品名:')"
class=
"disabled"
>
<input
v-model=
"form.cd005"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd005"
:label=
"$t('品名:')"
class=
"disabled"
>
<input
v-model=
"form.cd005"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd017"
:label=
"$t('批次号:')"
class=
"disabled"
>
<input
v-model=
"form.cd017"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd011"
:label=
"$t('采购单号:')"
class=
"disabled"
>
<input
v-model=
"form.cd011"
...
...
pages/forcreate/Edit.vue
View file @
c8202d54
...
...
@@ -12,16 +12,26 @@
>
</input>
</u-form-item>
<u-form-item
prop=
"cd004"
:label=
"$t('品号:')"
class=
"disabled"
>
<input
v-model=
"form.cd004"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd004"
:label=
"$t('品号:')"
class=
"disabled"
>
<input
v-model=
"form.cd004"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd017"
:label=
"$t('批次号:')"
class=
"disabled"
>
<input
v-model=
"form.cd017"
disabled
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"cd005"
:label=
"$t('品名:')"
class=
"disabled"
>
<input
v-model=
"form.cd005"
...
...
@@ -62,82 +72,47 @@
>
</input>
</u-form-item>
<template
v-if=
"!form.islot"
>
<u-form-item
prop=
"th009"
:label=
"$t('仓库:')"
>
<input
v-model=
"form.th009"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th072"
:label=
"$t('库位:')"
>
<input
v-model=
"form.th072"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th015"
:label=
"$t('验收数量:')"
>
<input
v-model
.
number=
"form.th015"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th016"
:label=
"$t('计价数量:')"
>
<input
v-model
.
number=
"form.th016"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th017"
:label=
"$t('验退数量:')"
>
<input
v-model
.
number=
"form.th017"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
</
template
>
<
template
v-else
>
<view
style=
"display: flex;"
>
<button
size=
"medium"
type=
"primary"
style=
"margin-top: 10rpx;margin-right: 20rpx;"
@
click=
"addBatch()"
>
<span>
{{
$t
(
'添加批次'
)
}}
</span>
</button>
</view>
<view
class=
"batchBox"
>
<view
v-for=
"(item, index) in info.purths"
:key=
"index"
@
click=
"editBatch(item, index)"
>
<view
class=
"batchContent"
v-if=
"item.batch && item.cd004 === form.cd004"
>
<view
class=
"itemtitle"
>
<text>
{{
item
.
th010
}}
</text>
<view>
<text
style=
"color: #006400"
>
{{
item
.
th015
}}
</text>
<text
style=
"color: #8b008b; margin-left: 40rpx"
>
{{
item
.
th017
}}
</text>
</view>
</view>
<view>
<text>
{{
$t
(
'仓库'
)
}}
</text>
<text
style=
"margin-right:20rpx"
>
{{
item
.
th009
}}
</text>
</view>
<view>
<text>
{{
$t
(
'库位'
)
}}
</text>
<text>
{{
item
.
th072
}}
</text>
</view>
</view>
</view>
</view>
</
template
>
<u-form-item
prop=
"th009"
:label=
"$t('仓库:')"
>
<input
v-model=
"form.th009"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th072"
:label=
"$t('库位:')"
>
<input
v-model=
"form.th072"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th015"
:label=
"$t('验收数量:')"
>
<input
v-model
.
number=
"form.th015"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th016"
:label=
"$t('计价数量:')"
>
<input
v-model
.
number=
"form.th016"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
prop=
"th017"
:label=
"$t('验退数量:')"
>
<input
v-model
.
number=
"form.th017"
type=
"text"
@
confirm=
"submit"
>
</input>
</u-form-item>
<u-form-item
style=
"width:100%;"
>
<button
size=
"medium"
...
...
pages/moctcforcreate/Edit.vue
View file @
c8202d54
...
...
@@ -53,20 +53,22 @@
</input>
</u-form-item>
<u-form-item
prop=
"te025"
:label=
"$t('库位:')"
>
<
inpu
t
<
zxz-uni-data-selec
t
v-model=
"form.te025"
type=
"text"
@
confirm=
"submit"
>
</input>
:localdata=
"locationOptions"
placeholder=
"请选择库位"
:disabled=
"loading"
@
change=
"onLocationChange"
/>
</u-form-item>
<u-form-item
prop=
"te010"
:label=
"$t('批次号:')"
>
<
inpu
t
<
zxz-uni-data-selec
t
v-model=
"form.te010"
type=
"text"
@
confirm=
"submit"
>
</input>
:localdata=
"batchOptions"
placeholder=
"请选择批次号"
:disabled=
"loading"
@
change=
"onBatchChange"
/>
</u-form-item>
<u-form-item
prop=
"quantity"
:label=
"$t('领料数量:')"
>
<input
...
...
@@ -108,6 +110,8 @@ import i18n from '../../lang/index'
this
.
index
=
option
.
index
this
.
info
=
data
this
.
form
=
data
.
moctes
[
this
.
index
]
// 页面加载时查询库存
this
.
loadInventoryData
()
}
},
computed
:
{
...
...
@@ -119,9 +123,14 @@ import i18n from '../../lang/index'
return
{
info
:
null
,
index
:
0
,
loading
:
false
,
// 加载状态
inventoryData
:
[],
// 库存数据
locationOptions
:
[],
// 库位选项
batchOptions
:
[],
// 批次号选项
form
:
{
cd003
:
null
,
tb003
:
null
,
tb003
:
null
,
tb009
:
null
,
tb012
:
null
,
tb004
:
null
,
cd008
:
null
,
...
...
@@ -133,6 +142,92 @@ import i18n from '../../lang/index'
created
()
{
},
methods
:
{
// 加载库存数据
loadInventoryData
()
{
if
(
!
this
.
form
.
tb003
)
return
this
.
loading
=
true
console
.
log
(
this
.
form
);
this
.
$u
.
api
.
getforinvmlinfo
({
ml001
:
this
.
form
.
tb003
,
// 物料品号
ml002
:
this
.
form
.
tb009
//仓库
}).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
success
&&
res
.
data
)
{
this
.
inventoryData
=
res
.
data
this
.
initLocationOptions
()
}
else
{
this
.
$u
.
toast
(
res
.
errorMessage
||
i18n
.
t
(
'查询库存失败'
))
}
}).
catch
(
err
=>
{
this
.
loading
=
false
this
.
$u
.
toast
(
i18n
.
t
(
'查询库存失败'
))
})
},
// 初始化库位选项
initLocationOptions
()
{
// 从库存数据中提取唯一的库位
const
locations
=
[...
new
Set
(
this
.
inventoryData
.
map
(
item
=>
item
.
ml003
).
filter
(
Boolean
))]
this
.
locationOptions
=
locations
.
map
(
location
=>
({
text
:
location
,
value
:
location
}))
// 设置默认库位
if
(
this
.
locationOptions
.
length
>
0
)
{
// 如果明细响应数据中有库位,优先使用
if
(
this
.
form
.
te025
&&
this
.
locationOptions
.
some
(
opt
=>
opt
.
value
===
this
.
form
.
te025
))
{
// 保持原有库位
}
else
{
// 默认选择第一个有数据的库位
this
.
form
.
te025
=
this
.
locationOptions
[
0
].
value
}
this
.
onLocationChange
({
value
:
this
.
form
.
te025
})
}
else
{
this
.
$u
.
toast
(
i18n
.
t
(
'未找到该物料的库存信息'
))
}
},
// 库位变化时更新批次号选项
onLocationChange
(
location
)
{
if
(
!
location
)
{
this
.
batchOptions
=
[]
this
.
form
.
te010
=
''
return
}
// 根据选择的库位筛选批次号
const
batches
=
this
.
inventoryData
.
filter
(
item
=>
item
.
ml003
===
location
.
value
)
.
map
(
item
=>
({
text
:
item
.
ml004
||
i18n
.
t
(
'无批号'
),
value
:
item
.
ml004
||
''
}))
this
.
batchOptions
=
batches
// 设置默认批次号
if
(
this
.
batchOptions
.
length
>
0
)
{
// 如果明细响应数据中有批次号,优先使用
if
(
this
.
form
.
te010
&&
this
.
batchOptions
.
some
(
opt
=>
opt
.
value
===
this
.
form
.
te010
))
{
// 保持原有批次号
}
else
{
// 默认选择第一个批次号
this
.
form
.
te010
=
this
.
batchOptions
[
0
].
value
}
}
},
// 批次号变化时的处理
onBatchChange
(
batch
)
{
if
(
batch
&&
this
.
form
.
te025
)
{
// 可以根据需要在这里添加批次号变化时的逻辑
// 比如更新可领数量等
}
},
calckw
(
str
){
if
(
!
str
)
return
i18n
.
t
(
'批号'
)
if
(
typeof
str
===
'string'
&&
!
str
.
trim
())
{
...
...
@@ -147,7 +242,7 @@ import i18n from '../../lang/index'
ta001
:
this
.
form
.
ta001
,
ta002
:
this
.
form
.
ta002
,
ta006
:
this
.
form
.
ta006
,
tb004
:
this
.
form
.
tb004
,
tb004
:
this
.
form
.
tb004
,
batch
:
true
,
te010
:
this
.
form
.
te010
,
te025
:
this
.
form
.
te025
,
...
...
@@ -245,5 +340,22 @@ import i18n from '../../lang/index'
justify-content
:
space-between
;
}
}
// 下拉框样式优化
/
deep
/
.uni-select
{
height
:
35px
;
border
:
1px
solid
#d5d5d5
;
border-radius
:
4px
;
padding
:
0
10px
;
}
/
deep
/
.uni-select__input-text
{
font-size
:
14px
;
color
:
#333
;
}
/
deep
/
.uni-select__input-placeholder
{
color
:
#999
;
}
</
style
>
\ No newline at end of file
store/index.js
View file @
c8202d54
...
...
@@ -45,7 +45,7 @@ const store = new Vuex.Store({
vuex_remember
:
lifeData
.
vuex_remember
?
lifeData
.
vuex_remember
:
''
,
vuex_locale
:
lifeData
.
vuex_locale
?
lifeData
.
vuex_locale
:
''
,
vuex_isAgent
:
lifeData
.
vuex_isAgent
?
lifeData
.
vuex_isAgent
:
''
,
vuex_user_factory
:
lifeData
.
vuex_user_factory
||
'1000'
,
vuex_user_factory
:
lifeData
.
vuex_user_factory
||
'1000'
,
vuex_sales_outbound
:
lifeData
.
vuex_sales_outbound
||
{},
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
...
...
@@ -55,10 +55,10 @@ const store = new Vuex.Store({
vuex_workunit
:
null
,
//当前工作站正在进行的生产任务
vuex_task
:
null
,
// 接口请求地址
// 接口请求地址
vuex_mes_url
:
""
,
// 用户信息接口请求地址
vuex_api_url
:
"
http://182.140.132.45:9011
"
,
// 用户信息接口请求地址
vuex_api_url
:
""
,
// 自定义tabbar数据
// vuex_tabbar: [{
// iconPath: "/static/uview/example/component.png",
...
...
@@ -105,4 +105,4 @@ const store = new Vuex.Store({
}
})
export
default
store
export
default
store
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