|
|
@ -39,11 +39,12 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="content-list"> |
|
|
<view class="content-list"> |
|
|
<view class="content-list-img" v-for="(item,index) in purchaseOcrPictureList" :key="index"> |
|
|
<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> |
|
|
<uni-icons type="trash" color="#00BFFF" size="20"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
<image show-menu-by-longpress :src="item.ocrPicture" @tap="showImage(item.ocrPicture)"></image> |
|
|
<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> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -67,14 +68,14 @@ |
|
|
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/44e7ccc2fae74db593bd1a10f538e2de.jpg', |
|
|
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/44e7ccc2fae74db593bd1a10f538e2de.jpg', |
|
|
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/2a55142e562b4ea480ce553c8b84d092.jpg' |
|
|
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/2a55142e562b4ea480ce553c8b84d092.jpg' |
|
|
], |
|
|
], |
|
|
purchaseOcrPictureList:[] |
|
|
purchaseOcrPictureList: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
if(this.uploadUrl && this.uploadNum == 1){ |
|
|
if (this.uploadUrl && this.uploadNum == 1) { |
|
|
let data = { |
|
|
let data = { |
|
|
ocrPicture:this.uploadUrl, |
|
|
ocrPicture: this.uploadUrl, |
|
|
count:'' |
|
|
count: '' |
|
|
} |
|
|
} |
|
|
this.purchaseOcrPictureList.push(data) |
|
|
this.purchaseOcrPictureList.push(data) |
|
|
this.uploadUrl = '' |
|
|
this.uploadUrl = '' |
|
|
@ -85,10 +86,10 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
identify(){ |
|
|
identify() { |
|
|
this.tui.request("/purchaseOcrPicture/batchSave", "POST", { |
|
|
this.tui.request("/purchaseOcrPicture/batchSave", "POST", { |
|
|
orderId:"", |
|
|
orderId: "", |
|
|
purchaseOcrPictureList:this.purchaseOcrPictureList |
|
|
purchaseOcrPictureList: this.purchaseOcrPictureList |
|
|
|
|
|
|
|
|
}, false, false).then((res) => { |
|
|
}, false, false).then((res) => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
@ -104,7 +105,7 @@ |
|
|
} |
|
|
} |
|
|
}).catch((res) => {}) |
|
|
}).catch((res) => {}) |
|
|
}, |
|
|
}, |
|
|
backPage(){ |
|
|
backPage() { |
|
|
uni.navigateBack({ |
|
|
uni.navigateBack({ |
|
|
delta: 1 |
|
|
delta: 1 |
|
|
}) |
|
|
}) |
|
|
@ -124,12 +125,23 @@ |
|
|
sourceType: ['album', 'camera'], |
|
|
sourceType: ['album', 'camera'], |
|
|
camera: 'back', |
|
|
camera: 'back', |
|
|
success(res) { |
|
|
success(res) { |
|
|
console.log(res.tempFiles[0].tempFilePath) |
|
|
|
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url: '/package1/cropper/cropper?imgSrc='+res.tempFiles[0].tempFilePath |
|
|
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); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|