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
3a53405a
authored
Sep 04, 2020
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
打印日志
parent
a08bab95
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
30 deletions
app.js
pages/detail/detail.axml
pages/detail/detail.js
app.js
View file @
3a53405a
...
...
@@ -16,7 +16,6 @@ App({
dd
.
getAuthCode
({
success
:
(
res
)
=>
{
var
code
=
res
.
authCode
;
dd
.
httpRequest
({
url
:
"https://oapi.dingtalk.com/gettoken?appkey=dingmwxikbdltarcjlb8&appsecret=GUS0_HylYmPcoPYCshqUI3U2ik3r1eu7SyydOCWzUny7SZwDUQb1E1jnW7vpZCvM"
,
success
:
function
(
res
)
{
...
...
@@ -24,14 +23,14 @@ App({
dd
.
httpRequest
({
url
:
'https://oapi.dingtalk.com/user/getuserinfo?access_token='
+
access_token
+
'&code='
+
code
,
success
:
function
(
res
)
{
dd
.
httpRequest
({
url
:
'https://oapi.dingtalk.com/user/get?access_token='
+
access_token
+
'&userid='
+
res
.
data
.
userid
,
success
:
function
(
res
)
{
console
.
log
(
res
)
self
.
personName
=
res
.
data
.
name
}
});
},
});
},
fail
:
function
(
res
){
console
.
log
(
res
)
}
})
},
...
...
pages/detail/detail.axml
View file @
3a53405a
...
...
@@ -7,7 +7,7 @@
<view class="list-box list-box2">
<text class="tl">明细扫码:</text>
<text onTap="saoma" class="t2">
<input placeholder="点击输入框扫码"
disabled="true
"/>
<input placeholder="点击输入框扫码"
disabled="true" value="{{inputValue2}}
"/>
</text>
<view ></view>
...
...
pages/detail/detail.js
View file @
3a53405a
...
...
@@ -21,15 +21,25 @@ Page({
getApp
().
setName
(
this
)
},
getDateList
()
{
axios
({
url
:
"/photo_taking/get_order_info/"
+
this
.
data
.
inputValue
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
res
.
data
.
data
.
forEach
((
item
)
=>
{
item
.
order_info
.
isShow
=
1
});
this
.
setData
({
list
:
res
.
data
.
data
})
}
else
{
dd
.
showToast
({
type
:
'fail'
,
content
:
res
.
data
.
data
,
duration
:
3000
});
}
})
},
...
...
@@ -37,6 +47,7 @@ Page({
axios
({
url
:
"/photo_taking/scan_order_detail/"
+
this
.
data
.
inputValue
+
"/"
+
encodeURI
(
code
)
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
//请求得到的ID值
let
detail_id
=
res
.
data
.
data
;
this
.
data
.
list
.
forEach
((
item
)
=>
{
...
...
@@ -51,8 +62,14 @@ Page({
detailId
:
detail_id
})
this
.
subMxActionShee
()
}).
catch
(
err
=>
{
console
.
log
(
err
)
}
else
{
dd
.
showToast
({
type
:
'fail'
,
content
:
res
.
data
.
data
,
duration
:
3000
});
}
})
},
...
...
@@ -60,7 +77,7 @@ Page({
dd
.
scan
({
type
:
'qr'
,
success
:
(
res
)
=>
{
let
code_
=
res
.
code
let
code_
=
res
.
code
this
.
setData
({
inputValue2
:
code_
});
...
...
@@ -70,25 +87,18 @@ Page({
},
clear
()
{
resetsdata
()
{
//提交成功 取消
this
.
data
.
list
.
forEach
((
item
)
=>
{
item
.
order_info
.
isShow
=
1
});
this
.
setData
({
inputValue2
:
""
,
detailImages
:
""
,
detailImages
:
[]
,
list
:
this
.
data
.
list
});
},
submitDetail
()
{
console
.
log
(
{
id
:
this
.
data
.
detailId
,
scan_str
:
this
.
data
.
inputValue2
,
image_src
:
(
this
.
data
.
detailImages
.
join
(
","
))
}
)
axios
({
url
:
"/photo_taking/add_order_image"
,
method
:
"POST"
,
...
...
@@ -100,14 +110,19 @@ Page({
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
//提交成功
this
.
clear
();
this
.
resetsdata
();
this
.
getDateList
();
}
else
{
dd
.
showToast
({
type
:
'fail'
,
content
:
res
.
data
.
data
,
duration
:
3000
});
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
subMxActionShee
()
{
//提交明细
dd
.
showActionSheet
({
items
:
[
'提交'
,
'拍照'
],
...
...
@@ -120,16 +135,16 @@ Page({
dd
.
chooseImage
({
count
:
10
,
success
:
(
res
)
=>
{
console
.
log
(
res
.
filePaths
)
this
.
setData
({
detailImages
:
[...
this
.
data
.
detailImages
,
...
res
.
filePaths
]
});
console
.
log
(
this
.
data
.
detailImages
)
this
.
subMxActionShee
();
},
});
}
else
{
this
.
clear
()
this
.
resetsdata
()
}
}
});
...
...
@@ -139,11 +154,7 @@ Page({
inputValue
:
e
.
detail
.
value
,
});
},
bindKeyInput2
(
e
)
{
this
.
setData
({
inputValue2
:
e
.
detail
.
value
,
});
},
submitGo
()
{
//提交
...
...
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