Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
photoStore
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
70596d0f
authored
Oct 26, 2020
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
85f72369
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
27 deletions
app.js
pages/detail/detail.acss
pages/detail/detail.axml
pages/detail/detail.js
pages/list/list.axml
pages/list/list.js
app.js
View file @
70596d0f
...
...
@@ -24,8 +24,8 @@ App({
dd
.
httpRequest
({
url
:
'https://oapi.dingtalk.com/user/getuserinfo?access_token='
+
access_token
+
'&code='
+
code
,
success
:
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
.
data
.
errmsg
)
// dd.alert({title:res.data.errmsg.split("访问ip不在白名单之中")[1]})
self
.
personName
=
res
.
data
.
name
},
...
...
pages/detail/detail.acss
View file @
70596d0f
...
...
@@ -4,7 +4,7 @@
align-items: center;
}
.list-box .t2{
flex:
2
;
flex:
1
;
}
.list-box input{
border:1px solid #ccc;
...
...
@@ -32,7 +32,7 @@
margin-left: 10rpx;
}
.list-box2 view{
background:
none
;
background:
#319cd8
;
}
.detail-list{
padding:30rpx;
...
...
pages/detail/detail.axml
View file @
70596d0f
...
...
@@ -5,12 +5,9 @@
<view onTap="submitGo">整单提交</view>
</view>
<view class="list-box list-box2">
<text class="tl">明细扫码:</text>
<text onTap="saoma" class="t2">
<input placeholder="点击输入框扫码" disabled="true" value="{{inputValue2}}"/>
</text>
<view ></view>
<text >明细扫码:</text>
<input placeholder="点击输入框扫码 " focus="true" onBlur="bindKeyInput2" onFocus="initInput" value="{{inputValue2}}"/>
<view onTap="saoma">锁定</view>
</view>
<view class="detail-list">
<view hidden="{{item.order_info.isShow ? false : true}}" class="group {{(item.order_info.scanqty==0)?'':(item.order_info.qty==item.order_info.scanqty)?'y':'d'}}" a:for="{{list}}">
...
...
pages/detail/detail.js
View file @
70596d0f
...
...
@@ -281,6 +281,7 @@ Page({
})
},
getSaoMaId
(
code
)
{
console
.
log
(
code
)
axios
({
url
:
"/photo_taking/scan_order_detail/"
+
this
.
data
.
inputValue
+
"/"
+
encodeURI
(
code
)
}).
then
(
res
=>
{
...
...
@@ -311,17 +312,17 @@ Page({
},
saoma
()
{
dd
.
scan
({
type
:
'qr'
,
success
:
(
res
)
=>
{
let
code_
=
res
.
code
this
.
setData
({
inputValue2
:
code_
});
this
.
getSaoMaId
(
code_
)
}
});
//
dd.scan({
//
type: 'qr',
//
success: (res) => {
//
let code_ = res.code
//
this.setData({
//
inputValue2: code_
//
});
//
this.getSaoMaId(code_)
//
}
//
});
this
.
getSaoMaId
(
this
.
data
.
inputValue2
)
},
resetsdata
()
{
...
...
@@ -407,8 +408,17 @@ Page({
inputValue
:
e
.
detail
.
value
,
});
},
bindKeyInput2
(
e
)
{
this
.
setData
({
inputValue2
:
e
.
detail
.
value
,
});
},
initInput
(){
this
.
setData
({
inputValue2
:
""
,
});
},
submitGo
()
{
//提交
axios
({
...
...
pages/list/list.axml
View file @
70596d0f
<include src="../public/header/header.axml"/>
<view class="list-box">
<text>出库单号:</text>
<view class="inputbox"
onTap="saoma"
>
<input placeholder="点击输入框扫码" on
Input="bindKeyInput
"/>
<view class="inputbox" >
<input placeholder="点击输入框扫码" on
Blur="bindKeyInput" onFocus="initInput" value="{{inputValue}}" autofocus="autofocus" focus="true
"/>
</view>
<view class="bl" onTap="gotoDetail">锁定</view>
</view>
\ No newline at end of file
pages/list/list.js
View file @
70596d0f
...
...
@@ -14,7 +14,6 @@ Page({
getApp
().
setName
(
this
)
},
saoma
()
{
dd
.
scan
({
type
:
'bar'
,
success
:
(
res
)
=>
{
...
...
@@ -25,16 +24,27 @@ Page({
},
});
},
initInput
(
e
){
this
.
setData
({
inputValue
:
""
});
},
bindKeyInput
(
e
)
{
this
.
setData
({
inputValue
:
e
.
detail
.
value
,
});
let
code_text
=
e
.
detail
.
value
code_text
=
code_text
.
substring
(
code_text
.
length
-
4
);
if
(
code_text
==
"|001"
){
this
.
gotoDetail
()
}
},
gotoDetail
()
{
let
val
=
this
.
data
.
inputValue
if
(
val
)
{
dd
.
navigateTo
({
url
:
'/pages/detail/detail?data='
+
this
.
data
.
inputValue
url
:
'/pages/detail/detail?data='
+
val
.
split
(
"|001"
)[
0
]
})
}
else
{
dd
.
showToast
({
...
...
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