|
|
|
@ -47,18 +47,20 @@ |
|
|
|
<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" @load='loadImg' @tap="showImage(item.ocrPicture)"></image> |
|
|
|
<uni-easyinput type='number' prefixIcon="compose" v-model='item.count' |
|
|
|
placeholder="请输入规格数量" @blur="numChange('zhu',item,index)"></uni-easyinput> |
|
|
|
<image show-menu-by-longpress :src="item.ocrPicture" @load='loadImg' |
|
|
|
@tap="showImage(item.ocrPicture)"></image> |
|
|
|
<uni-easyinput type='number' prefixIcon="compose" v-model='item.count' placeholder="请输入规格数量" |
|
|
|
@blur="numChange('zhu',item,index)"></uni-easyinput> |
|
|
|
</view> |
|
|
|
<view v-for="(items,indexs) in item.children" :key="indexs" |
|
|
|
style="width: 200rpx;height: 280rpx;position: relative;background: #fff;margin-left: 20rpx;border-radius: 10px;"> |
|
|
|
<view class="del-icon" @tap="delSonImage(index,indexs)"> |
|
|
|
<uni-icons type="trash" color="#00BFFF" size="20"></uni-icons> |
|
|
|
</view> |
|
|
|
<image show-menu-by-longpress :src="items.ocrPicture" @load='loadImg' @tap="showImage(items.ocrPicture)" |
|
|
|
style="width: 200rpx;height: 200rpx;padding: 5px;"></image> |
|
|
|
<uni-easyinput type='number' v-model='items.count' placeholder="子图规格数量" @blur="numChange('zi',item,index,items,indexs)"></uni-easyinput> |
|
|
|
<image show-menu-by-longpress :src="items.ocrPicture" @load='loadImg' |
|
|
|
@tap="showImage(items.ocrPicture)" style="width: 200rpx;height: 200rpx;padding: 5px;"></image> |
|
|
|
<uni-easyinput type='number' v-model='items.count' placeholder="子图规格数量" |
|
|
|
@blur="numChange('zi',item,index,items,indexs)"></uni-easyinput> |
|
|
|
</view> |
|
|
|
<view @tap="addSonImg(item.id)" |
|
|
|
style="width: 200rpx;height: 219rpx;background: rgba(255,255,255,0.4);margin: 0 20rpx;border-radius: 10px;font-size: 24rpx;color: #777;text-align: center;"> |
|
|
|
@ -80,13 +82,15 @@ |
|
|
|
<view class="popup-photo" style="font-size: 28rpx;font-weight: 400;">提示:建议使用原相机拍照并在相册内截图后上传</view> |
|
|
|
<view @tap="upLoadImg('pai')" class="popup-photo">拍照</view> |
|
|
|
<view @tap="upLoadImg('xuan')" class="popup-photo">从相册选择</view> |
|
|
|
<view @tap="$refs.popup.close()" class="popup-photo" style="border-bottom:0;border-top:10px solid #eee;">取消</view> |
|
|
|
<view @tap="$refs.popup.close()" class="popup-photo" |
|
|
|
style="border-bottom:0;border-top:10px solid #eee;">取消</view> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<!-- 打印选择框 --> |
|
|
|
<uni-popup ref="productDialog" background-color="#fff"> |
|
|
|
<view class="popup-pay-content" :style="{background:'url('+purchaseOcrPictureList[0].ocrPicture+') no-repeat;background-size: 100%;'}"> |
|
|
|
<view style="height: 750rpx;margin-top: 550rpx;z-index: 99;background: #fff;border-top: 1px solid #eee;"> |
|
|
|
<view class="popup-pay-content" |
|
|
|
:style="{background:'url('+purchaseOcrPictureList[0].ocrPicture+') no-repeat;background-size: 100%;'}"> |
|
|
|
<view class="popup-pay-shili"> |
|
|
|
<view class="popup-pay-title" style="margin-top: 50rpx;"> |
|
|
|
<text>识别规则示例</text> |
|
|
|
</view> |
|
|
|
@ -97,41 +101,59 @@ |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
<view style="height: 350rpx;"> |
|
|
|
<view style="padding-left: 40rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;"> |
|
|
|
<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="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;"> |
|
|
|
<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;"> |
|
|
|
<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" 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;"> |
|
|
|
<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;"> |
|
|
|
<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" @focus="obtainPrice($event,'price')" @blur="changessPrice($event,'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" @focus="obtainPrice($event,'price')" |
|
|
|
@blur="changessPrice($event,'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;"> |
|
|
|
<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="productCount" @focus="obtainPrice($event,'productCount')" @blur="changessPrice($event)" type="digit" placeholder="请输入数量" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;"> |
|
|
|
<input v-model="productCount" @focus="obtainPrice($event,'productCount')" |
|
|
|
@blur="changessPrice($event)" 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: 40rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;"> |
|
|
|
<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="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;"> |
|
|
|
<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;"> |
|
|
|
<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" disabled="true" @tap="clickInput('size')" 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> |
|
|
|
|
|
|
|
@ -151,15 +173,18 @@ |
|
|
|
<text>请输入{{name=='productSn'?'货号':name=='productName'?'商品名称':name=='price'?'价格':name=='productCount'?'数量':name=='color'?'颜色':name=='size'?'尺码':''}}</text> |
|
|
|
</view> |
|
|
|
<view style="height: 100rpx;"> |
|
|
|
<view style="padding-left: 40rpx;display: flex;height: 80rpx;width: 90%;line-height: 80rpx;margin: 20rpx auto;"> |
|
|
|
<view |
|
|
|
style="padding-left: 40rpx;display: flex;height: 80rpx;width: 90%;line-height: 80rpx;margin: 20rpx auto;"> |
|
|
|
<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: 75%;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;"> |
|
|
|
<input v-model="nameText" ref="inputText" :focus="focus" type="text" placeholder="请输入" |
|
|
|
style="display: flex;height: 80rpx;width: 75%;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 class="popup-pay-container" @tap="shurukuang" |
|
|
|
style="position: absolute;bottom: 10px;left: 5%;"> |
|
|
|
确认 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -167,10 +192,14 @@ |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<view v-if="isTake" style="position: fixed;width: 100%;height: 100%;z-index: 100;top: 0;"> |
|
|
|
<camera device-position="back" output-dimension='max' @initdone='showBtn' flash="off" style="width: 100%; height: 100%;"></camera> |
|
|
|
<camera device-position="back" output-dimension='max' @initdone='showBtn' flash="off" |
|
|
|
style="width: 100%; height: 100%;"></camera> |
|
|
|
<view style="width: 100%;height: 120rpx;position: fixed;bottom:200rpx;" v-if="isShow == true"> |
|
|
|
<view @tap="takePhoto" style="width: 120rpx;height: 120rpx;border-radius: 120rpx;background: #fff;margin: 0 auto;border: 2px solid #eee;"> |
|
|
|
<view style="width: 116rpx;height: 116rpx;border-radius: 116rpx;background: #fff;margin: 0 auto;border: 1px solid #fff;"></view> |
|
|
|
<view @tap="takePhoto" |
|
|
|
style="width: 120rpx;height: 120rpx;border-radius: 120rpx;background: #fff;margin: 0 auto;border: 2px solid #eee;"> |
|
|
|
<view |
|
|
|
style="width: 116rpx;height: 116rpx;border-radius: 116rpx;background: #fff;margin: 0 auto;border: 1px solid #fff;"> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view @tap="isTake = false" style="position: absolute;top: 20rpx;left: 100rpx;"> |
|
|
|
<uni-icons type="close" color="#777" size="40"></uni-icons> |
|
|
|
@ -214,7 +243,8 @@ |
|
|
|
scope: 'scope.writePhotosAlbum', |
|
|
|
success() { |
|
|
|
|
|
|
|
},fail(){ |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
this.tui.toast("您未授权,AI入库功能可能会出现错误") |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -427,7 +457,8 @@ |
|
|
|
camera: 'back', |
|
|
|
success(res) { |
|
|
|
that.upLoadFile(res.tempFiles[0].tempFilePath) |
|
|
|
},fail(){ |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
uni.hideLoading(); |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -437,7 +468,8 @@ |
|
|
|
success() { |
|
|
|
that.isTake = true |
|
|
|
uni.hideLoading(); |
|
|
|
},fail(){ |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
that.tui.toast("您未授权,AI入库功能可能会出现错误") |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -448,7 +480,8 @@ |
|
|
|
sourceType: ['album'], |
|
|
|
success(res1) { |
|
|
|
that.upLoadFile(res1.tempFiles[0].tempFilePath) |
|
|
|
},fail(){ |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
uni.hideLoading(); |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -469,7 +502,8 @@ |
|
|
|
ttt.cameraUpload() |
|
|
|
} |
|
|
|
}); |
|
|
|
},fail(err){ |
|
|
|
}, |
|
|
|
fail(err) { |
|
|
|
that.isTake = false |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -518,11 +552,12 @@ |
|
|
|
success(res1) { |
|
|
|
that.isTake = false |
|
|
|
that.upLoadFile(res1.tempFiles[0].tempFilePath) |
|
|
|
},fail(){ |
|
|
|
}, |
|
|
|
fail() { |
|
|
|
that.isTake = false |
|
|
|
uni.hideLoading(); |
|
|
|
},complete(res){ |
|
|
|
} |
|
|
|
}, |
|
|
|
complete(res) {} |
|
|
|
}) |
|
|
|
}, |
|
|
|
async upLoadFile(path) { |
|
|
|
@ -939,6 +974,7 @@ |
|
|
|
transform: rotate(360deg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.popup-photo { |
|
|
|
height: 110rpx; |
|
|
|
line-height: 110rpx; |
|
|
|
@ -947,6 +983,7 @@ |
|
|
|
font-weight: 800; |
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-content { |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
@ -958,6 +995,7 @@ |
|
|
|
overflow: hidden; |
|
|
|
background-color: #fff; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-title { |
|
|
|
font-size: 30rpx; |
|
|
|
font-weight: bold; |
|
|
|
@ -966,6 +1004,7 @@ |
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
padding-bottom: 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-container { |
|
|
|
margin: 40rpx auto 0; |
|
|
|
height: 100rpx; |
|
|
|
@ -978,10 +1017,12 @@ |
|
|
|
color: #fff; |
|
|
|
width: 90%; |
|
|
|
} |
|
|
|
|
|
|
|
.checked { |
|
|
|
background: #60F3FF; |
|
|
|
color: #fff !important; |
|
|
|
} |
|
|
|
|
|
|
|
.content-fur { |
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
display: flex; |
|
|
|
@ -1000,4 +1041,27 @@ |
|
|
|
color: #777; |
|
|
|
margin: 20rpx 0 0 20rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.popup-pay-shili { |
|
|
|
height: 750rpx; |
|
|
|
margin-top: 550rpx; |
|
|
|
z-index: 99; |
|
|
|
background: #fff; |
|
|
|
border-top: 1px solid #eee; |
|
|
|
} |
|
|
|
|
|
|
|
@media screen and (min-width: 470px) { |
|
|
|
|
|
|
|
/* 适配宽度为375px及以上的屏幕 */ |
|
|
|
.popup-pay-content { |
|
|
|
height: 1000rpx; |
|
|
|
} |
|
|
|
.popup-pay-shili{ |
|
|
|
height: 750rpx; |
|
|
|
margin-top: 260rpx; |
|
|
|
z-index: 99; |
|
|
|
background: #fff; |
|
|
|
border-top: 1px solid #eee; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |