saoma
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<view class="zd-row buttons_wraper">
|
||||
<uni-icons v-show="value !== '' && value !== null && value !== undefined" class="pdr10" type="clear" size="24" color="#666" @tap="toDel"></uni-icons>
|
||||
<uni-icons type="scan" size="22" :color="focusState ? '#ff6a00' : '#4e6ef2'" @tap="focusState=true"></uni-icons>
|
||||
<uni-icons type="camera" size="28" style="marginLeft: 30rpx;" @tap="toPhone"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -51,7 +52,49 @@
|
||||
if (e.target.value.length) {
|
||||
this.$emit('handleChange', e.target.value)
|
||||
}
|
||||
},
|
||||
async toPhone() {
|
||||
// #ifdef APP-PLUS
|
||||
let status = await this.checkPermission();
|
||||
if (status !== 1) {
|
||||
return;
|
||||
}
|
||||
// #endif
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
this.$emit('input', res.result)
|
||||
this.$emit('handleChange', res.result)
|
||||
},
|
||||
fail: (err) => {
|
||||
// uni.showToast({
|
||||
// title: '出错',
|
||||
// icon: 'none'
|
||||
// })
|
||||
}
|
||||
});
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
,
|
||||
async checkPermission(code) {
|
||||
let status = permision.isIOS ? await permision.requestIOS('camera') :
|
||||
await permision.requestAndroid('android.permission.CAMERA');
|
||||
|
||||
if (status === null || status === 1) {
|
||||
status = 1;
|
||||
} else {
|
||||
uni.showModal({
|
||||
content: "需要相机权限",
|
||||
confirmText: "设置",
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
permision.gotoAppSetting();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
return status;
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -42,7 +43,7 @@
|
||||
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-6 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_againTask">重新下发</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled2" @tap="_forceConfirm">强制完成</button>
|
||||
</view>
|
||||
@@ -82,6 +83,11 @@
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.searchList()
|
||||
}
|
||||
},
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
|
||||
Reference in New Issue
Block a user