|
|
@@ -545,7 +545,7 @@ const reTakePicture = async (img)=>{
|
|
|
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_digicam_take_picture');
|
|
|
socketStore.sendMessage({
|
|
|
- type: 'digicam_take_picture',
|
|
|
+ type: 'smart_shooter_photo_take',
|
|
|
"data":{"id":img.id,"goods_art_no":img.goods_art_no},
|
|
|
})
|
|
|
clientStore.ipc.on(icpList.socket.message + '_digicam_take_picture', (event, result) => {
|
|
|
@@ -864,13 +864,34 @@ let smartShooterTimeout = null; // 在合适的位置定义一个全局变量用
|
|
|
clientStore.ipc.on(icpList.socket.message+'_smart_shooter_photo_take', async (event, result) => {
|
|
|
console.log('_smart_shooter_photo_take');
|
|
|
console.log(result);
|
|
|
- if(result.code === 0 && result.data?.photo_file_name){
|
|
|
- if (smartShooterTimeout) {
|
|
|
- clearTimeout(smartShooterTimeout);
|
|
|
+
|
|
|
+ if( 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)
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+
|
|
|
+ if(result.code === 0 && result.data?.photo_file_name){
|
|
|
+ if (smartShooterTimeout) {
|
|
|
+ clearTimeout(smartShooterTimeout);
|
|
|
+ }
|
|
|
+ smartShooterTimeout = setTimeout(() => {
|
|
|
+ getPhotoRecords();
|
|
|
+ }, 2000);
|
|
|
}
|
|
|
- smartShooterTimeout = setTimeout(() => {
|
|
|
- getPhotoRecords();
|
|
|
- }, 2000);
|
|
|
}
|
|
|
|
|
|
})
|