Commit 70596d0f by 肖康

x

parent 85f72369
...@@ -24,8 +24,8 @@ App({ ...@@ -24,8 +24,8 @@ App({
dd.httpRequest({ dd.httpRequest({
url: 'https://oapi.dingtalk.com/user/getuserinfo?access_token=' + access_token + '&code=' + code, url: 'https://oapi.dingtalk.com/user/getuserinfo?access_token=' + access_token + '&code=' + code,
success: function (res) { 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 self.personName = res.data.name
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
align-items: center; align-items: center;
} }
.list-box .t2{ .list-box .t2{
flex:2; flex:1;
} }
.list-box input{ .list-box input{
border:1px solid #ccc; border:1px solid #ccc;
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
margin-left: 10rpx; margin-left: 10rpx;
} }
.list-box2 view{ .list-box2 view{
background: none; background: #319cd8;
} }
.detail-list{ .detail-list{
padding:30rpx; padding:30rpx;
......
...@@ -5,12 +5,9 @@ ...@@ -5,12 +5,9 @@
<view onTap="submitGo">整单提交</view> <view onTap="submitGo">整单提交</view>
</view> </view>
<view class="list-box list-box2"> <view class="list-box list-box2">
<text class="tl">明细扫码:</text> <text >明细扫码:</text>
<text onTap="saoma" class="t2"> <input placeholder="点击输入框扫码 " focus="true" onBlur="bindKeyInput2" onFocus="initInput" value="{{inputValue2}}"/>
<input placeholder="点击输入框扫码" disabled="true" value="{{inputValue2}}"/> <view onTap="saoma">锁定</view>
</text>
<view ></view>
</view> </view>
<view class="detail-list"> <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}}"> <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}}">
......
...@@ -281,6 +281,7 @@ Page({ ...@@ -281,6 +281,7 @@ Page({
}) })
}, },
getSaoMaId(code) { getSaoMaId(code) {
console.log(code)
axios({ axios({
url: "/photo_taking/scan_order_detail/" + this.data.inputValue + "/" + encodeURI(code) url: "/photo_taking/scan_order_detail/" + this.data.inputValue + "/" + encodeURI(code)
}).then(res => { }).then(res => {
...@@ -311,17 +312,17 @@ Page({ ...@@ -311,17 +312,17 @@ Page({
}, },
saoma() { saoma() {
dd.scan({ //dd.scan({
type: 'qr', //type: 'qr',
success: (res) => { //success: (res) => {
let code_ = res.code //let code_ = res.code
this.setData({ //this.setData({
inputValue2: code_ // inputValue2: code_
}); //});
this.getSaoMaId(code_) //this.getSaoMaId(code_)
} //}
}); //});
this.getSaoMaId(this.data.inputValue2)
}, },
resetsdata() { resetsdata() {
...@@ -407,8 +408,17 @@ Page({ ...@@ -407,8 +408,17 @@ Page({
inputValue: e.detail.value, inputValue: e.detail.value,
}); });
}, },
bindKeyInput2(e) {
this.setData({
inputValue2: e.detail.value,
});
},
initInput(){
this.setData({
inputValue2: "",
});
},
submitGo() { submitGo() {
//提交 //提交
axios({ axios({
......
<include src="../public/header/header.axml"/> <include src="../public/header/header.axml"/>
<view class="list-box"> <view class="list-box">
<text>出库单号:</text> <text>出库单号:</text>
<view class="inputbox" onTap="saoma"> <view class="inputbox" >
<input placeholder="点击输入框扫码" onInput="bindKeyInput"/> <input placeholder="点击输入框扫码" onBlur="bindKeyInput" onFocus="initInput" value="{{inputValue}}" autofocus="autofocus" focus="true"/>
</view> </view>
<view class="bl" onTap="gotoDetail">锁定</view> <view class="bl" onTap="gotoDetail">锁定</view>
</view> </view>
\ No newline at end of file
...@@ -14,7 +14,6 @@ Page({ ...@@ -14,7 +14,6 @@ Page({
getApp().setName(this) getApp().setName(this)
}, },
saoma() { saoma() {
dd.scan({ dd.scan({
type: 'bar', type: 'bar',
success: (res) => { success: (res) => {
...@@ -25,16 +24,27 @@ Page({ ...@@ -25,16 +24,27 @@ Page({
}, },
}); });
}, },
initInput(e){
this.setData({
inputValue: ""
});
},
bindKeyInput(e) { bindKeyInput(e) {
this.setData({ this.setData({
inputValue: e.detail.value, 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() { gotoDetail() {
let val = this.data.inputValue let val = this.data.inputValue
if (val) { if (val) {
dd.navigateTo({ dd.navigateTo({
url: '/pages/detail/detail?data=' + this.data.inputValue url: '/pages/detail/detail?data=' + val.split("|001")[0]
}) })
} else { } else {
dd.showToast({ dd.showToast({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment