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
0179cf7f
Commit
0179cf7f
authored
Jul 04, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加工厂别选择,增加仓位选择。
parent
24ad5a69
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
258 additions
and
165 deletions
+258
-165
FactorySelect.vue
components/FactorySelect/FactorySelect.vue
+71
-0
index.vue
pages/index/index.vue
+181
-154
login.vue
pages/sys/login/login.vue
+6
-11
No files found.
components/FactorySelect/FactorySelect.vue
0 → 100644
View file @
0179cf7f
<
template
>
<view
class=
"factoryBox"
>
<zxz-uni-data-select
filterable
v-model=
"warehouseCode"
dataKey=
"label"
placeholder=
"请选择仓库别"
dataValue=
"value"
:localdata=
"warehouseData"
@
change=
'onWarehouseChange'
/>
</view>
</
template
>
<
script
>
export
default
{
model
:
{
prop
:
'value'
,
event
:
'update'
},
props
:
{
value
:
{
type
:
String
,
defualt
:
''
}
},
data
()
{
return
{
warehouseData
:
[]
}
},
computed
:
{
warehouseCode
:
{
get
()
{
return
this
.
value
},
set
(
v
)
{
this
.
$emit
(
'update'
,
v
)
}
}
},
created
()
{
this
.
getDepotLists
()
},
methods
:
{
onWarehouseChange
(
e
)
{
this
.
$emit
(
'change'
,
e
);
},
getDepotLists
()
{
this
.
$u
.
api
.
sapApi
.
sapDict
({
FIELDNAME
:
'T001L'
})
.
then
((
res
)
=>
{
if
(
res
)
{
res
.
forEach
((
ele
)
=>
{
ele
.
label
=
ele
.
LGORT
+
"-"
+
ele
.
LGOBE
;
ele
.
value
=
ele
.
LGORT
});
this
.
warehouseData
=
res
;
}
else
{
this
.
warehouseData
=
[];
}
});
},
}
}
</
script
>
<
style
lang=
"scss"
>
.factoryBox
{
padding
:
10rpx
20rpx
0
;
.item-select
{
margin-bottom
:
20rpx
;
}
}
</
style
>
pages/index/index.vue
View file @
0179cf7f
<
template
>
<view
class=
"homePage"
:style=
"'height:' + screenHeight + 'px;'"
>
<view
class=
"title"
>
广州市宝绅科技应用
</view>
<view
class=
"lines"
></view>
<view
class=
"boxs"
>
<uni-section
v-for=
"(item, index) in tableData"
:key=
"index"
:title=
"item.title"
type=
"line"
>
<u-row
gutter=
"10"
>
<u-col
v-for=
"(v, i) in item.list"
:key=
"i"
span=
"3"
>
<navigator
:url=
"v.url"
open-type=
"navigate"
>
<view
class=
"demo-layout"
>
<u-image
:src=
"v.src"
width=
"100rpx"
height=
"100rpx"
></u-image>
<text>
{{
v
.
text
}}
</text>
</view>
</navigator>
</u-col>
</u-row>
</uni-section>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
screenHeight
:
0
,
src
:
require
(
'@/static/images/cgrk.png'
),
tableData
:
[
{
title
:
'仓库扫描作业'
,
list
:
[
{
src
:
require
(
'@/static/images/cgrk.png'
),
text
:
'采购入库'
,
url
:
'/pages/purchaseStorage/purchaseStorage'
},
{
src
:
require
(
'@/static/images/cgrk.png'
),
text
:
'采购下架'
,
url
:
'/pages/purchase/purchaseRemove'
},
{
src
:
require
(
'@/static/images/cgrk.png'
),
text
:
'质量异常下架'
,
url
:
'/pages/abnormal/abnormalRemove'
},
{
src
:
require
(
'@/static/images/fclyk.png'
),
text
:
'仓位调拨'
,
url
:
'/pages/positionTansfer/positionTansfer'
},
{
src
:
require
(
'@/static/images/kglrk.png'
),
text
:
'完工入库'
,
url
:
'/pages/confirComplete/confirComplete'
},
{
src
:
require
(
'@/static/images/qtck.png'
),
text
:
'库存盘点'
,
url
:
'/pages/inventoryCounting/inventoryCounting'
},
{
src
:
require
(
'@/static/images/scfl.png'
),
text
:
'生产发料'
,
url
:
'/pages/productionIssuance/productionIssuance'
},
{
src
:
require
(
'@/static/images/xsth.png'
),
text
:
'销售退货'
,
url
:
'/pages/salesReturns/salesReturns'
},
{
src
:
require
(
'@/static/images/sctl.png'
),
text
:
'生产退料'
,
url
:
'/pages/produceReturn/produceReturn'
},
{
src
:
require
(
'@/static/images/wwfl.png'
),
text
:
'委外发料'
,
url
:
'/pages/outsourcedMaterial/outsourcedMaterial'
},
{
src
:
require
(
'@/static/images/wwfl.png'
),
text
:
'委外退料'
,
url
:
'/pages/outsourcedReturn/outsourcedReturn'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'销售拣货'
,
url
:
'/pages/salesOutbound/salesOutbound'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'装箱'
,
url
:
'/pages/packing/packing'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'发货过账'
,
url
:
'/pages/posting/posting'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'反冲料移库'
,
url
:
'/pages/recoil/recoilMaterial'
},
]
}
]
};
},
created
()
{
this
.
screenHeight
=
uni
.
getSystemInfoSync
().
screenHeight
;
},
methods
:
{
handleClick
(
v
)
{
uni
.
nav
;
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.homePage
{
background
:
#fff
;
.title
{
background
:
#fff
;
padding-top
:
20rpx
;
height
:
60rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
padding-left
:
32rpx
;
font-weight
:
600
;
}
.lines
{
height
:
32rpx
;
background
:
#f8f8f8
;
}
}
.demo-layout
{
height
:
164rpx
;
border-radius
:
4px
;
margin-bottom
:
10px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
text
{
margin-top
:
24rpx
;
font-size
:
24rpx
;
color
:
#000
;
}
}
</
style
>
<
template
>
<view
class=
"homePage"
:style=
"'height:' + screenHeight + 'px;'"
>
<view
class=
"title"
>
<text>
工厂别:
</text>
<zxz-uni-data-select
:clear=
'false'
class=
"item-select"
filterable
v-model=
"factoryCode"
placeholder=
"请选择工厂"
dataKey=
"label"
dataValue=
"value"
:localdata=
"factoryData"
@
change=
"factoryChange"
/>
</view>
<view
class=
"lines"
></view>
<view
class=
"boxs"
>
<uni-section
v-for=
"(item, index) in tableData"
:key=
"index"
:title=
"item.title"
type=
"line"
>
<u-row
gutter=
"10"
>
<u-col
v-for=
"(v, i) in item.list"
:key=
"i"
span=
"3"
>
<navigator
:url=
"v.url"
open-type=
"navigate"
>
<view
class=
"demo-layout"
>
<u-image
:src=
"v.src"
width=
"100rpx"
height=
"100rpx"
></u-image>
<text>
{{
v
.
text
}}
</text>
</view>
</navigator>
</u-col>
</u-row>
</uni-section>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
screenHeight
:
0
,
src
:
require
(
'@/static/images/cgrk.png'
),
factoryData
:
[{
label
:
'1000 - 广州市宝绅科技有限公司'
,
value
:
'1000'
},
{
label
:
'1010 - 广州市宝绅科技有限公司RFID工厂'
,
value
:
'1010'
},
],
tableData
:
[{
title
:
'仓库扫描作业'
,
list
:
[{
src
:
require
(
'@/static/images/cgrk.png'
),
text
:
'采购入库'
,
url
:
'/pages/purchaseStorage/purchaseStorage'
},
{
src
:
require
(
'@/static/images/cgrk.png'
),
text
:
'采购下架'
,
url
:
'/pages/purchase/purchaseRemove'
},
{
src
:
require
(
'@/static/images/cgrk.png'
),
text
:
'质量异常下架'
,
url
:
'/pages/abnormal/abnormalRemove'
},
{
src
:
require
(
'@/static/images/fclyk.png'
),
text
:
'仓位调拨'
,
url
:
'/pages/positionTansfer/positionTansfer'
},
{
src
:
require
(
'@/static/images/kglrk.png'
),
text
:
'完工入库'
,
url
:
'/pages/confirComplete/confirComplete'
},
{
src
:
require
(
'@/static/images/qtck.png'
),
text
:
'库存盘点'
,
url
:
'/pages/inventoryCounting/inventoryCounting'
},
{
src
:
require
(
'@/static/images/scfl.png'
),
text
:
'生产发料'
,
url
:
'/pages/productionIssuance/productionIssuance'
},
{
src
:
require
(
'@/static/images/xsth.png'
),
text
:
'销售退货'
,
url
:
'/pages/salesReturns/salesReturns'
},
{
src
:
require
(
'@/static/images/sctl.png'
),
text
:
'生产退料'
,
url
:
'/pages/produceReturn/produceReturn'
},
{
src
:
require
(
'@/static/images/wwfl.png'
),
text
:
'委外发料'
,
url
:
'/pages/outsourcedMaterial/outsourcedMaterial'
},
{
src
:
require
(
'@/static/images/wwfl.png'
),
text
:
'委外退料'
,
url
:
'/pages/outsourcedReturn/outsourcedReturn'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'销售拣货'
,
url
:
'/pages/salesOutbound/salesOutbound'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'装箱'
,
url
:
'/pages/packing/packing'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'发货过账'
,
url
:
'/pages/posting/posting'
},
{
src
:
require
(
'@/static/images/xsck.png'
),
text
:
'反冲料移库'
,
url
:
'/pages/recoil/recoilMaterial'
},
]
}]
};
},
computed
:
{
factoryCode
:
{
get
()
{
return
this
.
vuex_user_factory
||
1000
},
set
(
e
)
{
this
.
$u
.
vuex
(
'vuex_user_factory'
,
e
)
}
}
},
created
()
{
this
.
screenHeight
=
uni
.
getSystemInfoSync
().
screenHeight
;
},
methods
:
{
handleClick
(
v
)
{
uni
.
nav
;
},
factoryChange
(
e
)
{
console
.
log
(
e
,
'factoryChange'
)
},
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.homePage
{
background
:
#fff
;
.title
{
background
:
#fff
;
padding
:
20rpx
32rpx
;
font-size
:
28rpx
;
line-height
:
40rpx
;
font-weight
:
600
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.lines
{
height
:
32rpx
;
background
:
#f8f8f8
;
}
}
.demo-layout
{
height
:
164rpx
;
border-radius
:
4px
;
margin-bottom
:
10px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
text
{
margin-top
:
24rpx
;
font-size
:
24rpx
;
color
:
#000
;
}
}
</
style
>
pages/sys/login/login.vue
View file @
0179cf7f
<
template
>
<view
class=
"login"
>
<u-form
ref=
"loginForm"
:modelValue=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
MES
作业端
</h3>
<h3
class=
"title"
>
PDA
作业端
</h3>
<u-form-item
prop=
"username"
>
<input
v-model=
"loginForm.username"
...
...
@@ -68,12 +68,6 @@
},
methods
:
{
submit
(){
// if(1){
// uni.reLaunch({
// url: '/pages/index/index'
// });
// return
// }
this
.
$refs
.
loginForm
.
validate
().
then
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
;
...
...
@@ -85,16 +79,17 @@
})
.
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
msg
){
this
.
$u
.
toast
(
res
.
msg
);
}
this
.
$u
.
vuex
(
'vuex_token'
,
res
.
token
)
this
.
$u
.
vuex
(
'vuex_user'
,
res
.
user
)
if
(
res
.
code
==
'200'
)
{
setTimeout
(()
=>
{
uni
.
reLaunch
({
url
:
'/pages/index/index'
});
},
500
);
}
}
else
{
this
.
$u
.
toast
(
res
.
msg
);
}
});
}
});
...
...
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