submit
parent
1664235cf5
commit
c2fc13483b
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,132 @@
|
|||||||
|
<script>
|
||||||
|
import {postDataByParams} from "../../http/service";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "index",
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
url:'',
|
||||||
|
list:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
scanOrder() {
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: false,
|
||||||
|
success: res => {
|
||||||
|
this.url=res.result
|
||||||
|
this.getDetailUrl()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
completeScan(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/consignment-painting/index?type=scan'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getDetailUrl() {
|
||||||
|
const data = {
|
||||||
|
url: this.url
|
||||||
|
}
|
||||||
|
const res = await postDataByParams('/api/warehouse/ocr', data)
|
||||||
|
if (res.code === 200) {
|
||||||
|
if (uni.getStorageSync('scanlist')){
|
||||||
|
uni.setStorageSync('scanlist', [...uni.getStorageSync('scanlist'),res.data])
|
||||||
|
}else {
|
||||||
|
uni.setStorageSync('scanlist', [res.data])
|
||||||
|
}
|
||||||
|
this.list=uni.getStorageSync('scanlist')
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
if (this.$mp.query.url){
|
||||||
|
this.url=this.$mp.query.url
|
||||||
|
this.getDetailUrl()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div class="content1">
|
||||||
|
<div class="wrap1">
|
||||||
|
<img src="https://cdns.fontree.cn/fonchain-main/prod/image/default/approval/500b8411-c3ab-485a-af51-28d877c7524d.png" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="wrap2">扫描成功-{{list.length}}</div>
|
||||||
|
<div class="wrap3">
|
||||||
|
<div class="wrap3_1" @click="scanOrder">继续扫描</div>
|
||||||
|
<div class="wrap3_2" @click="completeScan">完成扫描</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container{
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
background-color: grey;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.content1{
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding-left: 42rpx;
|
||||||
|
padding-right: 42rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
width: 640rpx;
|
||||||
|
height: 438rpx;
|
||||||
|
.wrap3{
|
||||||
|
margin-top: 96rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.wrap3_2{
|
||||||
|
margin-left: 18rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color:#fff ;
|
||||||
|
width: 270rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
background-color: rgba(118, 196, 88, 1);
|
||||||
|
}
|
||||||
|
.wrap3_1{
|
||||||
|
border-radius: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color:rgba(118, 196, 88, 1) ;
|
||||||
|
width: 270rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
border: 1rpx solid rgba(118, 196, 88, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.wrap2{
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #000;
|
||||||
|
margin-top: 56rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.wrap1{
|
||||||
|
margin-top: 38rpx;
|
||||||
|
img{
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue