wangfukang 3 years ago
parent
commit
f5f3cec534
  1. 73
      package1/AI/AIPicture.vue

73
package1/AI/AIPicture.vue

@ -99,19 +99,19 @@
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
货号:
</text>
<input v-model="productSn" type="text" placeholder="请输入货号" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
<input v-model="productSn" disabled="true" @tap="clickInput('productSn')" type="text" placeholder="请输入货号" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
<view style="padding-left: 20rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;">
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
商品名:
</text>
<input v-model="productName" type="text" placeholder="请输入名称" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
<input v-model="productName" disabled="true" @tap="clickInput('productName')" type="text" placeholder="请输入商品名" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
<view style="padding-left: 40rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;">
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
采购价:
</text>
<input v-model="price" type="digit" placeholder="请输入采购价" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
<input v-model="price" type="digit" placeholder="请输入价格" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
<view style="padding-left: 20rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;">
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
@ -123,13 +123,13 @@
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
颜色:
</text>
<input v-model="color" type="text" placeholder="请输入颜色" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
<input v-model="color" type="text" disabled="true" @tap="clickInput('color')" placeholder="请输入颜色" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
<view style="padding-left: 20rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;">
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
尺码:
</text>
<input v-model="size" type="text" placeholder="请输入尺码" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
<input v-model="size" type="text" disabled="true" @tap="clickInput('size')" placeholder="请输入尺码" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
</view>
@ -138,6 +138,36 @@
</view>
</view>
</view>
</uni-popup>
<!-- -->
<uni-popup ref="tanDialog" background-color="#fff">
<view class="popup-pay-content" style="width: 500rpx;height: 850rpx;">
<view style="z-index: 99;background: #fff;border-top: 1px solid #eee;">
<view class="popup-pay-title" style="margin-top: 50rpx;">
<text>请输入{{name=='productSn'?'货号':name=='productName'?'商品名称':name=='price'?'价格':name=='productCount'?'数量':name=='color'?'颜色':name=='size'?'尺码':''}}</text>
</view>
<view style="width: 90%;margin: 40rpx auto 40rpx;line-height: 50rpx;color: #777;">
温馨提示:
</view>
<view style="width: 90%;margin: 40rpx auto 40rpx;line-height: 50rpx;color: #777;">
需要您在上方图片中选择一款商品,拿出其中一种规格的的货号、名称、价格、数量、颜色、尺码输入到下方的输入框中,要保证规格值属于同一种商品,这样就能准确的识别市面上大部分的小票(包括手写单)
</view>
<view style="height: 100rpx;">
<view style="padding-left: 40rpx;display: flex;height: 80rpx;width: 90%;line-height: 80rpx;margin-top: 20rpx;float: left;">
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
{{name=='productSn'?'货号':name=='productName'?'商品名称':name=='price'?'价格':name=='productCount'?'数量':name=='color'?'颜色':name=='size'?'尺码':''}}
</text>
<input v-model="nameText" ref="inputText" :focus="focus" type="text" placeholder="请输入" style="display: flex;height: 80rpx;width: 70%;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
</view>
<view class="popup-pay-container" @tap="shurukuang" style="position: absolute;bottom: 10px;left: 5%;">
确认
</view>
</view>
</view>
</uni-popup>
</view>
@ -153,7 +183,8 @@
'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'
],
],
focus:true,
purchaseOcrPictureList: [],
parentPicturePath: '',
parentId: '',
@ -164,7 +195,9 @@
productCount:"",
color:"",
size:"",
keyBoardHeight:0
keyBoardHeight:0,
name:'',
nameText:''
}
},
onShow() {
@ -226,6 +259,30 @@
}
this.$refs.productDialog.open('bottom')
},
clickInput(name){
this.name = name
this.$refs.tanDialog.open();
this.$refs.inputText.focus();
},
shurukuang(){
if(this.name == 'productSn'){
this.productSn = this.nameText
}else if(this.name == 'productName'){
this.productName = this.nameText
}else if(this.name == 'price'){
this.price = this.nameText
}else if(this.name == 'productCount'){
this.productCount = this.nameText
}else if(this.name == 'color'){
this.color = this.nameText
}else if(this.name == 'size'){
this.size = this.nameText
}
this.name = ""
this.nameText = ""
this.$refs.tanDialog.close()
},
identify() {
let num = 0
@ -382,7 +439,6 @@
.push(data)
}
}
that.parentId = ''
} else {
let data = {
ocrPicture: path.result,
@ -403,6 +459,7 @@
}
});
await setTimeout(res=>{
that.parentId = ''
uni.hideLoading();
},500)
},

Loading…
Cancel
Save