|
|
@@ -572,7 +572,6 @@ const reTakePicture = async (img)=>{
|
|
|
await clickLog({ describe: { action: '点击开始重拍', goods_art_no: img.goods_art_no } }, route)
|
|
|
|
|
|
|
|
|
- clientStore.ipc.removeAllListeners(icpList.socket.message + '_digicam_take_picture');
|
|
|
socketStore.sendMessage({
|
|
|
type: 'smart_shooter_photo_take',
|
|
|
"data":{"id":img.id,"goods_art_no":img.goods_art_no},
|
|
|
@@ -583,9 +582,6 @@ const reTakePicture = async (img)=>{
|
|
|
|
|
|
runLoading.value = false;
|
|
|
if(result.code === 0){
|
|
|
-
|
|
|
-
|
|
|
- if(runAction.value.goods_art_no ) setLogInfo(route, { action: '单张拍摄完成', goods_art_no: runAction.value.goods_art_no });
|
|
|
getPhotoRecords()
|
|
|
setTimeout(()=>{
|
|
|
showlastPhoto.value = false
|
|
|
@@ -597,7 +593,6 @@ const reTakePicture = async (img)=>{
|
|
|
reNosObj.value.action = ''
|
|
|
ElMessage.error(result.msg)
|
|
|
}
|
|
|
- clientStore.ipc.removeAllListeners(icpList.socket.message + '_smart_shooter_photo_take');
|
|
|
|
|
|
})
|
|
|
}
|
|
|
@@ -710,9 +705,6 @@ onMounted(async () => {
|
|
|
console.log('_photo_take')
|
|
|
console.log(result)
|
|
|
if(result.status === 2 && result.msg.includes('执行完成')){
|
|
|
- if(runAction.value.goods_art_no ){
|
|
|
- setLogInfo(route, { action: '单张拍摄完成', goods_art_no: runAction.value.goods_art_no });
|
|
|
- }
|
|
|
getPhotoRecords()
|
|
|
// 延迟两秒再获取一遍数据
|
|
|
setTimeout(()=>{
|
|
|
@@ -916,37 +908,23 @@ clientStore.ipc.on(icpList.socket.message+'_smart_shooter_photo_take', async (ev
|
|
|
console.log('_smart_shooter_photo_take');
|
|
|
console.log(result);
|
|
|
|
|
|
- if( reNosObj.value.goods_art_no ){
|
|
|
-
|
|
|
|
|
|
- setLogInfo(route, { action: '单张拍摄完成', goods_art_no: reNosObj.value.goods_art_no });
|
|
|
-
|
|
|
- runLoading.value = false;
|
|
|
- if(result.code === 0){
|
|
|
- getPhotoRecords()
|
|
|
- setTimeout(()=>{
|
|
|
- showlastPhoto.value = false
|
|
|
- },6000)
|
|
|
- }else if(result.msg) {
|
|
|
-
|
|
|
- runLoading.value = false;
|
|
|
- reNosObj.value.goods_art_no = ''
|
|
|
- reNosObj.value.action = ''
|
|
|
- ElMessage.error(result.msg)
|
|
|
+ //
|
|
|
+ if(result.code === 0){
|
|
|
+ if(result.data.goods_art_no ) setLogInfo(route, { action: '单张拍摄完成', goods_art_no: result.data.goods_art_no });
|
|
|
+ if (smartShooterTimeout) {
|
|
|
+ clearTimeout(smartShooterTimeout);
|
|
|
}
|
|
|
+ smartShooterTimeout = setTimeout(() => {
|
|
|
+ getPhotoRecords();
|
|
|
+ }, 2000);
|
|
|
+ }else if(result.msg) {
|
|
|
|
|
|
- }else{
|
|
|
-
|
|
|
- if(result.code === 0 && result.data?.photo_file_name){
|
|
|
- if (smartShooterTimeout) {
|
|
|
- clearTimeout(smartShooterTimeout);
|
|
|
- }
|
|
|
- smartShooterTimeout = setTimeout(() => {
|
|
|
- getPhotoRecords();
|
|
|
- }, 2000);
|
|
|
- }
|
|
|
+ runLoading.value = false;
|
|
|
+ reNosObj.value.goods_art_no = ''
|
|
|
+ reNosObj.value.action = ''
|
|
|
+ ElMessage.error(result.msg)
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
|
|
|
|