|
|
|
@ -1,8 +1,8 @@ |
|
|
|
<template> |
|
|
|
<view class="page1"> |
|
|
|
<view class="top" ref="top"> |
|
|
|
<view @tap="backPage" style="width: 80rpx;height: 80rpx;margin: 98rpx 0 0 30rpx;"> |
|
|
|
<uni-icons type="left" color="#fff" size="27"></uni-icons> |
|
|
|
<view class="top" ref="top"> |
|
|
|
<view @tap="backPage" style="width: 80rpx;height: 80rpx;margin: 98rpx 0 0 30rpx;"> |
|
|
|
<uni-icons type="left" color="#fff" size="27"></uni-icons> |
|
|
|
</view> |
|
|
|
<view class="top1"> |
|
|
|
<text style="display: block;margin-top: 107rpx;color: #fff;">Ai入库</text> |
|
|
|
@ -39,11 +39,12 @@ |
|
|
|
</view> |
|
|
|
<view class="content-list"> |
|
|
|
<view class="content-list-img" v-for="(item,index) in purchaseOcrPictureList" :key="index"> |
|
|
|
<view class="del-icon"> |
|
|
|
<view class="del-icon" @tap="delImage(index)"> |
|
|
|
<uni-icons type="trash" color="#00BFFF" size="20"></uni-icons> |
|
|
|
</view> |
|
|
|
<image show-menu-by-longpress :src="item.ocrPicture" @tap="showImage(item.ocrPicture)"></image> |
|
|
|
<uni-easyinput type='number' prefixIcon="compose" v-model='item.count' placeholder="请输入规格数量"></uni-easyinput> |
|
|
|
<uni-easyinput type='number' prefixIcon="compose" v-model='item.count' |
|
|
|
placeholder="请输入规格数量"></uni-easyinput> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -66,48 +67,48 @@ |
|
|
|
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/5444bab7df8d47e09c831c054b6e447b.jpg', |
|
|
|
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/44e7ccc2fae74db593bd1a10f538e2de.jpg', |
|
|
|
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/2a55142e562b4ea480ce553c8b84d092.jpg' |
|
|
|
], |
|
|
|
purchaseOcrPictureList:[] |
|
|
|
], |
|
|
|
purchaseOcrPictureList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
if(this.uploadUrl && this.uploadNum == 1){ |
|
|
|
let data = { |
|
|
|
ocrPicture:this.uploadUrl, |
|
|
|
count:'' |
|
|
|
} |
|
|
|
this.purchaseOcrPictureList.push(data) |
|
|
|
this.uploadUrl = '' |
|
|
|
this.uploadNum = '' |
|
|
|
onShow() { |
|
|
|
if (this.uploadUrl && this.uploadNum == 1) { |
|
|
|
let data = { |
|
|
|
ocrPicture: this.uploadUrl, |
|
|
|
count: '' |
|
|
|
} |
|
|
|
this.purchaseOcrPictureList.push(data) |
|
|
|
this.uploadUrl = '' |
|
|
|
this.uploadNum = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
identify(){ |
|
|
|
this.tui.request("/purchaseOcrPicture/batchSave", "POST", { |
|
|
|
orderId:"", |
|
|
|
purchaseOcrPictureList:this.purchaseOcrPictureList |
|
|
|
|
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("识别中,请等待...") |
|
|
|
setTimeout(res => { |
|
|
|
uni.navigateBack({ |
|
|
|
delta: 1 |
|
|
|
}) |
|
|
|
}, 2000) |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
backPage(){ |
|
|
|
uni.navigateBack({ |
|
|
|
delta: 1 |
|
|
|
}) |
|
|
|
methods: { |
|
|
|
identify() { |
|
|
|
this.tui.request("/purchaseOcrPicture/batchSave", "POST", { |
|
|
|
orderId: "", |
|
|
|
purchaseOcrPictureList: this.purchaseOcrPictureList |
|
|
|
|
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("识别中,请等待...") |
|
|
|
setTimeout(res => { |
|
|
|
uni.navigateBack({ |
|
|
|
delta: 1 |
|
|
|
}) |
|
|
|
}, 2000) |
|
|
|
|
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
backPage() { |
|
|
|
uni.navigateBack({ |
|
|
|
delta: 1 |
|
|
|
}) |
|
|
|
}, |
|
|
|
//点击图片放大 |
|
|
|
showImage(img) { |
|
|
|
@ -124,12 +125,23 @@ |
|
|
|
sourceType: ['album', 'camera'], |
|
|
|
camera: 'back', |
|
|
|
success(res) { |
|
|
|
console.log(res.tempFiles[0].tempFilePath) |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/package1/cropper/cropper?imgSrc='+res.tempFiles[0].tempFilePath |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/package1/cropper/cropper?imgSrc='+res.tempFiles[0].tempFilePath |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
delImage(index) { |
|
|
|
let that = this; |
|
|
|
uni.showModal({ |
|
|
|
title: "提示", |
|
|
|
content: "确定删除吗?", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
that.purchaseOcrPictureList.splice(index, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -145,7 +157,7 @@ |
|
|
|
width: 780rpx; |
|
|
|
height: 390rpx; |
|
|
|
opacity: 1; |
|
|
|
background: linear-gradient(90deg, #6484fa 0%, #66e8ff 100%); |
|
|
|
background: linear-gradient(90deg, #6484fa 0%, #66e8ff 100%); |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
|
|
|
|
@ -313,13 +325,13 @@ |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
.bottom-img { |
|
|
|
width: 60rpx; |
|
|
|
height: 60rpx; |
|
|
|
background-size: 100%; |
|
|
|
margin: 10rpx; |
|
|
|
float: left; |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
width: 60rpx; |
|
|
|
height: 60rpx; |
|
|
|
background-size: 100%; |
|
|
|
margin: 10rpx; |
|
|
|
float: left; |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
bottom: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -452,26 +464,26 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.bottom-btn { |
|
|
|
width: 100%; |
|
|
|
height: 80rpx; |
|
|
|
padding-left: 100rpx; |
|
|
|
color: #777; |
|
|
|
line-height: 80rpx; |
|
|
|
font-weight: bold; |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
bottom: 40rpx; |
|
|
|
width: 100%; |
|
|
|
height: 80rpx; |
|
|
|
padding-left: 100rpx; |
|
|
|
color: #777; |
|
|
|
line-height: 80rpx; |
|
|
|
font-weight: bold; |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
bottom: 40rpx; |
|
|
|
font-size: 34rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.run-line { |
|
|
|
width: 200px; |
|
|
|
height: 200px; |
|
|
|
-webkit-animation: rotate2 2s linear infinite; |
|
|
|
animation: rotate2 3s linear infinite; |
|
|
|
-webkit-transform-origin: 50% 50%; |
|
|
|
z-index: -2; |
|
|
|
margin: -50% 0 0 -50%; |
|
|
|
width: 200px; |
|
|
|
height: 200px; |
|
|
|
-webkit-animation: rotate2 2s linear infinite; |
|
|
|
animation: rotate2 3s linear infinite; |
|
|
|
-webkit-transform-origin: 50% 50%; |
|
|
|
z-index: -2; |
|
|
|
margin: -50% 0 0 -50%; |
|
|
|
background: linear-gradient(90deg, #FFF0F5 0%, #BCD2EE 100%); |
|
|
|
} |
|
|
|
|
|
|
|
|