Commit 70596d0f by 肖康

x

parent 85f72369
......@@ -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
},
......
......@@ -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;
......
......@@ -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}}">
......
......@@ -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({
......
<include src="../public/header/header.axml"/>
<view class="list-box">
<text>出库单号:</text>
<view class="inputbox" onTap="saoma">
<input placeholder="点击输入框扫码" onInput="bindKeyInput"/>
<view class="inputbox" >
<input placeholder="点击输入框扫码" onBlur="bindKeyInput" onFocus="initInput" value="{{inputValue}}" autofocus="autofocus" focus="true"/>
</view>
<view class="bl" onTap="gotoDetail">锁定</view>
</view>
\ No newline at end of file
......@@ -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({
......
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