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
b360a192
Commit
b360a192
authored
Oct 12, 2025
by
chicheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成品入库添加
parent
a0b5a911
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
773 additions
and
560 deletions
+773
-560
config.js
common/config.js
+1
-1
http.api.js
common/http.api.js
+80
-76
pages.json
pages.json
+316
-309
Main.vue
pages/finishedProductStorage/Main.vue
+194
-0
index.vue
pages/index/index.vue
+163
-158
login.vue
pages/sys/login/login.vue
+13
-12
index.js
store/index.js
+5
-3
test.js
uview-ui/libs/function/test.js
+1
-1
No files found.
common/config.js
View file @
b360a192
...
...
@@ -21,7 +21,7 @@ const config = {
}
// 设置后台接口服务的基础地址
config
.
baseUrl
=
'http://
192.168.0.106
:20091'
;
config
.
baseUrl
=
'http://
localhost
:20091'
;
// config.baseUrl = process.env.NODE_ENV === 'development' ? '/api' : 'http://182.140.132.45:9094'; // 上海环境
// config.baseUrl = process.env.NODE_ENV === 'development' ? '/api' : 'http://192.168.1.128:20091'; // 外网环境
// config.baseUrl = "http://101.200.162.168:8080";
...
...
common/http.api.js
View file @
b360a192
...
...
@@ -66,6 +66,10 @@ const install = (Vue, vm) => {
getStorageListApi
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
vm
.
vuex_api_url
+
'/cmsni/getCmsniList'
,
params
),
// 查询工单
getMocta
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
vm
.
vuex_api_url
+
'/mocta/get'
,
params
),
// 根据箱标签查询入库数量
queryByBoxCode
:
(
params
=
{})
=>
vm
.
$u
.
get
(
vm
.
vuex_barcode_url
+
'/barcodeSystem/atcstds/queryByBoxCode'
,
params
),
// 完工入库创建
moctfcreate
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
vm
.
vuex_api_url
+
'/moctf/create'
,
params
),
};
}
...
...
pages.json
View file @
b360a192
...
...
@@ -205,6 +205,13 @@
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/finishedProductStorage/Main"
,
"style"
:
{
"navigationBarTitleText"
:
"成品入库"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/dhd/Main"
,
"style"
:
{
...
...
pages/finishedProductStorage/Main.vue
0 → 100644
View file @
b360a192
<
template
>
<view
class=
"page"
>
<NavBar
:title=
"$t('成品入库')"
></NavBar>
<view
class=
"infoedit"
>
<u-form
ref=
"form"
:modelValue=
"form"
class=
"login-form"
:labelWidth=
"190"
>
<u-form-item
prop=
"boxCode"
:label=
"$t('箱标签:')"
>
<input
v-model=
"form.boxCode"
type=
"text"
:placeholder=
"$t('请输入或扫描箱标签')"
@
blur=
"queryByBoxCode"
@
confirm=
"queryByBoxCode"
>
</input>
</u-form-item>
<u-form-item
prop=
"workOrderType"
:label=
"$t('工单单别:')"
>
<input
v-model=
"form.workOrderType"
type=
"text"
:placeholder=
"$t('请输入工单单别')"
>
</input>
</u-form-item>
<u-form-item
prop=
"workOrderNo"
:label=
"$t('工单单号:')"
>
<input
v-model=
"form.workOrderNo"
type=
"text"
:placeholder=
"$t('请输入工单单号')"
>
</input>
</u-form-item>
<u-form-item
prop=
"quantity"
:label=
"$t('数量:')"
>
<input
v-model=
"form.quantity"
type=
"text"
disabled
>
</input>
</u-form-item>
<u-form-item
style=
"width:100%;"
>
<button
size=
"medium"
type=
"primary"
style=
"width:95%;margin-top: 50rpx"
@
click=
"submit()"
:disabled=
"!form.boxCode || !form.workOrderType || !form.workOrderNo || !form.quantity"
>
<span>
{{
$t
(
'确定入库'
)
}}
</span>
</button>
</u-form-item>
</u-form>
</view>
</view>
</
template
>
<
script
>
import
i18n
from
'../../lang/index'
export
default
{
data
()
{
return
{
form
:
{
boxCode
:
null
,
workOrderType
:
null
,
workOrderNo
:
null
,
quantity
:
null
,
},
queryDetails
:
[],
// 保存查询到的明细数据
loading
:
false
};
},
methods
:
{
// 根据箱标签查询入库数量
queryByBoxCode
(
e
)
{
const
boxCode
=
e
&&
e
.
detail
?
e
.
detail
.
value
:
this
.
form
.
boxCode
if
(
!
boxCode
||
!
boxCode
.
trim
())
{
return
}
if
(
this
.
loading
)
{
return
}
this
.
loading
=
true
this
.
$u
.
api
.
queryByBoxCode
({
boxCode
:
boxCode
.
trim
()
}).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
success
&&
res
.
data
&&
res
.
data
.
length
>
0
)
{
// 保存查询到的明细数据
this
.
queryDetails
=
res
.
data
// 数量:统计数组长度(行数)或累加 snqty
// 方式1:统计行数
this
.
form
.
quantity
=
res
.
data
.
length
}
else
{
this
.
$u
.
toast
(
res
.
errorMessage
||
i18n
.
t
(
'查询箱标签信息失败,未找到数据'
))
this
.
clearForm
()
}
}).
catch
(
err
=>
{
this
.
loading
=
false
this
.
$u
.
toast
(
i18n
.
t
(
'查询失败'
))
this
.
clearForm
()
})
},
clearForm
()
{
this
.
form
.
workOrderType
=
null
this
.
form
.
workOrderNo
=
null
this
.
form
.
quantity
=
null
this
.
queryDetails
=
[]
},
submit
()
{
if
(
!
this
.
form
.
boxCode
)
{
return
this
.
$u
.
toast
(
i18n
.
t
(
'请输入箱标签'
))
}
if
(
!
this
.
form
.
workOrderType
)
{
return
this
.
$u
.
toast
(
i18n
.
t
(
'请输入工单单别'
))
}
if
(
!
this
.
form
.
workOrderNo
)
{
return
this
.
$u
.
toast
(
i18n
.
t
(
'请输入工单单号'
))
}
if
(
!
this
.
form
.
quantity
)
{
return
this
.
$u
.
toast
(
i18n
.
t
(
'请先查询箱标签信息'
))
}
if
(
!
this
.
queryDetails
||
this
.
queryDetails
.
length
===
0
)
{
return
this
.
$u
.
toast
(
i18n
.
t
(
'未找到查询明细数据'
))
}
if
(
this
.
loading
)
{
return
}
// 构建标签明细:从查询结果中提取数据
const
storageDetails
=
this
.
queryDetails
.
map
(
item
=>
({
workOrderType
:
this
.
form
.
workOrderType
,
// 工单单别(表单录入)
workOrderNo
:
this
.
form
.
workOrderNo
,
// 工单单号(表单录入)
boxCode
:
item
.
psnno
||
''
,
// 箱码(查询明细)
labelNo
:
item
.
snNo
||
''
// 小标签号(查询明细)
}))
// 构建请求参数
//批号截取最后两位:JA00000021-175352500F-250905-000001
var
boxCodes
=
this
.
form
.
boxCode
.
split
(
"-"
)
var
batchNo
=
boxCodes
[
2
]
+
boxCodes
[
3
];
const
params
=
{
details
:
[{
tg014
:
this
.
form
.
workOrderType
,
// 工单单别
tg015
:
this
.
form
.
workOrderNo
,
// 工单单号
tg013
:
this
.
form
.
quantity
,
// 验收数量
tg011
:
this
.
form
.
quantity
,
// 入库数量
tg017
:
batchNo
// 批号(箱标签)
}],
storageDetails
:
storageDetails
// 标签明细(从查询结果生成)
}
this
.
loading
=
true
this
.
$u
.
api
.
moctfcreate
(
params
).
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
success
)
{
this
.
$u
.
toast
(
i18n
.
t
(
'入库成功'
))
// 清空表单
this
.
form
=
{
boxCode
:
null
,
workOrderType
:
null
,
workOrderNo
:
null
,
quantity
:
null
,
}
this
.
queryDetails
=
[]
}
else
{
this
.
$u
.
toast
(
res
.
errorMessage
||
i18n
.
t
(
'入库失败'
))
}
}).
catch
(
err
=>
{
this
.
loading
=
false
this
.
$u
.
toast
(
i18n
.
t
(
'入库失败'
))
})
}
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.infoedit
{
padding
:
20rpx
20rpx
;
.u-border-bottom
:after
{
display
:
none
;
}
::v-deep
.uni-select
{
border
:
none
!
important
;
}
}
</
style
>
pages/index/index.vue
View file @
b360a192
...
...
@@ -63,6 +63,11 @@ import i18n from '../../lang/index'
text
:
i18n
.
t
(
'录入入库单'
),
url
:
'/pages/forstorage/Main'
},
{
src
:
require
(
'@/static/images/keyin.png'
),
text
:
i18n
.
t
(
'成品入库'
),
url
:
'/pages/finishedProductStorage/Main'
},
{
src
:
require
(
'@/static/images/infor.png'
),
text
:
i18n
.
t
(
'品号信息'
),
...
...
pages/sys/login/login.vue
View file @
b360a192
...
...
@@ -90,6 +90,7 @@ import {setLocal} from '@/lang'
handleChange
(
val
)
{
this
.
$u
.
vuex
(
'vuex_mes_url'
,
val
.
mesUrl
);
this
.
$u
.
vuex
(
'vuex_api_url'
,
val
.
apiUrl
);
this
.
$u
.
vuex
(
'vuex_barcode_url'
,
val
.
barcodeUrl
);
// #ifdef APP-PLUS
checkappupdate
.
check
({
title
:
i18n
.
t
(
'检测到有新版本!'
),
...
...
store/index.js
View file @
b360a192
...
...
@@ -17,7 +17,7 @@ try {
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
let
saveStateKeys
=
[
'vuex_user'
,
'vuex_user_factory'
,
'vuex_token'
,
'vuex_remember'
,
'vuex_locale'
,
'vuex_isAgent'
,
'vuex_workstation'
,
'vuex_task'
,
'vuex_sales_outbound'
,
'vuex_mes_url'
,
'vuex_api_url'
'vuex_workstation'
,
'vuex_task'
,
'vuex_sales_outbound'
,
'vuex_mes_url'
,
'vuex_api_url'
,
'vuex_barcode_url'
];
// 保存变量到本地存储中
...
...
@@ -56,9 +56,11 @@ const store = new Vuex.Store({
//当前工作站正在进行的生产任务
vuex_task
:
null
,
// 接口请求地址
vuex_mes_url
:
""
,
vuex_mes_url
:
lifeData
.
vuex_mes_url
?
lifeData
.
vuex_mes_url
:
""
,
// 用户信息接口请求地址
vuex_api_url
:
""
,
vuex_api_url
:
lifeData
.
vuex_api_url
?
lifeData
.
vuex_api_url
:
""
,
// 条码接口请求地址
vuex_barcode_url
:
lifeData
.
vuex_barcode_url
?
lifeData
.
vuex_barcode_url
:
""
,
// 自定义tabbar数据
// vuex_tabbar: [{
// iconPath: "/static/uview/example/component.png",
...
...
uview-ui/libs/function/test.js
View file @
b360a192
...
...
@@ -16,7 +16,7 @@ function mobile(value) {
* 验证URL格式
*/
function
url
(
value
)
{
return
/http
(
s
)?
:
\/\/([\w
-
]
+
\.)
+
[\w
-
]
+
(\/[\w
-.
\/
?%&=
]
*
)?
/
.
test
(
value
)
return
/http
(
s
)?
:
\/\/([\w
-
]
+
\.)
*
[\w
-
]
+
(
:
\d
+
)?
(\/[\w
-.
\/
?%&=
]
*
)?
/
.
test
(
value
)
}
/**
...
...
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