|
|
@@ -78,7 +78,7 @@
|
|
|
<div>拍摄记录</div>
|
|
|
<div class="c-666 fs-12" v-if="goodsList.length" >
|
|
|
<el-button :disabled="!(runLoading || takePictureLoading)" @click="oneClickStop" v-if="configInfoStore.appModel === 1" class="input-button" type="primary" size="mini">一键停止</el-button>
|
|
|
- <el-button :disabled="runLoading || takePictureLoading" @click="delAll" class="input-button" type="primary" size="mini">一键删除</el-button>
|
|
|
+ <el-button :disabled="runLoading || takePictureLoading" @click="delAll" class="input-button" type="danger" size="mini">一键删除</el-button>
|
|
|
</div>
|
|
|
</span>
|
|
|
<img class="divider-line" referrerpolicy="no-referrer" src="@/assets/images/Photography/divider-line.png" />
|
|
|
@@ -376,7 +376,6 @@ async function runGoods(data) {
|
|
|
type: 'run_mcu',
|
|
|
data,
|
|
|
})
|
|
|
- ElMessage.success('开始拍摄,请稍后')
|
|
|
runLoading.value = true;
|
|
|
runAction.value.action = data.action
|
|
|
runAction.value.goods_art_no = data.goods_art_no
|
|
|
@@ -394,6 +393,9 @@ async function runGoods(data) {
|
|
|
ElMessage.error(result.msg)
|
|
|
runLoading.value = false
|
|
|
return;
|
|
|
+ }else{
|
|
|
+
|
|
|
+ ElMessage.success('开始拍摄,请稍后')
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -452,7 +454,12 @@ const del = async function(params){
|
|
|
ElMessage.info('货号删除成功')
|
|
|
getPhotoRecords()
|
|
|
if(reNosObj.value.goods_art_no){
|
|
|
- runGoods(reNosObj.value)
|
|
|
+ runGoods(
|
|
|
+ {
|
|
|
+ "action": reNosObj.value.action,
|
|
|
+ "goods_art_no":reNosObj.value.goods_art_no
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
}else if(result.msg) {
|
|
|
ElMessage.error(result.msg)
|
|
|
@@ -471,8 +478,9 @@ const reTakePicture = async (img)=>{
|
|
|
})
|
|
|
|
|
|
runLoading.value = true;
|
|
|
- runAction.value.goods_art_no = img.goods_art_no
|
|
|
- runAction.value.action = 're_take_picture'
|
|
|
+ reNosObj.value.goods_art_no = img.goods_art_no
|
|
|
+ reNosObj.value.action = 're_take_picture'
|
|
|
+
|
|
|
let params = {
|
|
|
id: img.action_id
|
|
|
}
|
|
|
@@ -491,6 +499,9 @@ const reTakePicture = async (img)=>{
|
|
|
|
|
|
this_run_mcu_single(result.data)
|
|
|
}else if(result.msg){
|
|
|
+ runLoading.value = false;
|
|
|
+ reNosObj.value.goods_art_no = ''
|
|
|
+ reNosObj.value.action = ''
|
|
|
ElMessage.error(result.msg)
|
|
|
}
|
|
|
});
|
|
|
@@ -527,16 +538,18 @@ const reTakePicture = async (img)=>{
|
|
|
}
|
|
|
async function this_re_take_picture(){
|
|
|
|
|
|
- await ElMessageBox.alert('已把鞋子摆放完毕,点击按钮确认开始重拍', '提示')
|
|
|
+ await ElMessageBox.alert('已复位到该视图下,请把鞋子摆放完毕之后,点击按钮开始重拍', '提示',{
|
|
|
+ confirmButtonText:"开始重拍"
|
|
|
+ })
|
|
|
|
|
|
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_digicam_take_picture');
|
|
|
socketStore.sendMessage({
|
|
|
- type: 're_take_picture',
|
|
|
- "data":{"record_id":img.id},
|
|
|
+ type: 'digicam_take_picture',
|
|
|
+ "data":{"id":img.id,"goods_art_no":img.goods_art_no},
|
|
|
})
|
|
|
- clientStore.ipc.removeAllListeners(icpList.socket.message + '_re_take_picture');
|
|
|
- clientStore.ipc.on(icpList.socket.message + '_re_take_picture', (event, result) => {
|
|
|
- console.log('_re_take_picture')
|
|
|
+ clientStore.ipc.on(icpList.socket.message + '_digicam_take_picture', (event, result) => {
|
|
|
+ console.log('_digicam_take_picture')
|
|
|
console.log(result)
|
|
|
|
|
|
runLoading.value = false;
|
|
|
@@ -546,9 +559,13 @@ const reTakePicture = async (img)=>{
|
|
|
showlastPhoto.value = false
|
|
|
},6000)
|
|
|
}else if(result.msg) {
|
|
|
+
|
|
|
+ runLoading.value = false;
|
|
|
+ reNosObj.value.goods_art_no = ''
|
|
|
+ reNosObj.value.action = ''
|
|
|
ElMessage.error(result.msg)
|
|
|
}
|
|
|
- clientStore.ipc.removeAllListeners(icpList.socket.message + '_re_take_picture');
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_digicam_take_picture');
|
|
|
|
|
|
})
|
|
|
}
|
|
|
@@ -569,7 +586,8 @@ const reTakePictureNos = async (goods_art_no,item)=>{
|
|
|
})
|
|
|
reNosObj.value.goods_art_no = goods_art_no
|
|
|
reNosObj.value.action = '执行左脚程序'
|
|
|
- if(item.items && typeof item.items === 'object' && item.items[0].image_deal_mode){
|
|
|
+ console.log(item);
|
|
|
+ if(item.items && typeof item.items === 'object' && item.items[0].PhotoRecord.image_deal_mode){
|
|
|
reNosObj.value.action = '执行右脚程序'
|
|
|
}
|
|
|
del({goods_art_nos:[goods_art_no]})
|
|
|
@@ -671,6 +689,19 @@ onMounted(async () => {
|
|
|
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+ // 监听一键停止结束
|
|
|
+ clientStore.ipc.on(icpList.socket.message + '_run_mcu_stop', (event, result) => {
|
|
|
+ console.log('_run_mcu_stop')
|
|
|
+
|
|
|
+ runLoading.value = false;
|
|
|
+ reNosObj.value.goods_art_no = ''
|
|
|
+ reNosObj.value.action = ''
|
|
|
+ runAction.value.goods_art_no = '';
|
|
|
+ runAction.value.action = '';
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
// 监听拍照完成后的最终状态事件
|
|
|
clientStore.ipc.on(icpList.socket.message + '_photo_take_finish', (event, result) => {
|
|
|
console.log('_photo_take_finish')
|
|
|
@@ -787,6 +818,9 @@ onBeforeUnmount(() => {
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu_update');
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_stop_action');
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_smart_shooter_photo_take');
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu_stop');
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_digicam_take_picture');
|
|
|
+
|
|
|
/* window.removeEventListener('storage', handleStorageEvent);*/
|
|
|
|
|
|
|