|
|
@@ -113,7 +113,7 @@
|
|
|
<div class="image-slot"></div>
|
|
|
</template>
|
|
|
</el-image>
|
|
|
- <div class="reset-button" @click="reTakePicture(image.id)">重拍</div>
|
|
|
+ <div class="reset-button" @click="reTakePicture(image)">重拍</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -270,6 +270,9 @@ async function getPhotoRecords(params?:{}) {
|
|
|
loading.true = false;
|
|
|
clientStore.ipc.removeAllListeners(icpList.takePhoto.getPhotoRecords);
|
|
|
if(result.code === 0){
|
|
|
+
|
|
|
+ console.log('======================');
|
|
|
+ console.log(runAction.value);
|
|
|
goodsList.value = result.data.list
|
|
|
if(isDelGoodsGetList.value){
|
|
|
isDelGoodsGetList.value = false;
|
|
|
@@ -301,8 +304,8 @@ async function runGoods(data) {
|
|
|
})
|
|
|
ElMessage.success('开始拍摄,请稍后')
|
|
|
runLoading.value = true;
|
|
|
- console.log(runAction.value);
|
|
|
- runAction.value = data
|
|
|
+ runAction.value.action = data.action
|
|
|
+ runAction.value.goods_art_no = data.goods_art_no
|
|
|
goods_art_no.value = ''
|
|
|
goods_art_no_tpl.value = ''
|
|
|
reNosObj.value.goods_art_no = null;
|
|
|
@@ -386,8 +389,8 @@ const del = async function(params){
|
|
|
|
|
|
//单个重拍
|
|
|
|
|
|
-const reTakePicture = async (record_id)=>{
|
|
|
- if(!record_id) return;
|
|
|
+const reTakePicture = async (img)=>{
|
|
|
+ if(!img.id) return;
|
|
|
await ElMessageBox.confirm('此操作会先删除此数据,需要继续吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -395,7 +398,7 @@ const reTakePicture = async (record_id)=>{
|
|
|
|
|
|
socketStore.sendMessage({
|
|
|
type: 're_take_picture',
|
|
|
- "data":{"record_id":record_id},
|
|
|
+ "data":{"record_id":img.id},
|
|
|
})
|
|
|
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_re_take_picture');
|
|
|
@@ -508,6 +511,8 @@ onMounted(async () => {
|
|
|
console.log(result)
|
|
|
if(result.code === 0) {
|
|
|
runLoading.value = false;
|
|
|
+ runAction.value.goods_art_no = '';
|
|
|
+ runAction.value.action = '';
|
|
|
setTimeout(()=>{
|
|
|
showlastPhoto.value = false
|
|
|
},5000)
|
|
|
@@ -634,11 +639,15 @@ const getLastPhotoRecord = async ()=>{
|
|
|
clientStore.ipc.on(icpList.takePhoto.getLastPhotoRecord, (event, result) => {
|
|
|
console.log('getLastPhotoRecord')
|
|
|
console.log(result)
|
|
|
+ console.log(runAction.value)
|
|
|
clientStore.ipc.removeAllListeners(icpList.takePhoto.getLastPhotoRecord);
|
|
|
if(result.code === 0){
|
|
|
if(lastPhoto.value.image_path){
|
|
|
if( lastPhoto.value.image_path == result.data.image_path) return;
|
|
|
- showlastPhoto.value = true
|
|
|
+
|
|
|
+ if(runAction.value.goods_art_no === result.data.goods_art_no){
|
|
|
+ showlastPhoto.value = true
|
|
|
+ }
|
|
|
}
|
|
|
lastPhoto.value = result.data
|
|
|
}else if(result.msg) {
|