|
@@ -193,7 +193,10 @@ const socketStore = socket()
|
|
|
* 保存货号模板到货号变量中。
|
|
* 保存货号模板到货号变量中。
|
|
|
*/
|
|
*/
|
|
|
function saveGoodsArtNo(){
|
|
function saveGoodsArtNo(){
|
|
|
- if(goods_art_no_tpl.value) goods_art_no.value = goods_art_no_tpl.value
|
|
|
|
|
|
|
+ if(goods_art_no_tpl.value){
|
|
|
|
|
+ goods_art_no.value = goods_art_no_tpl.value
|
|
|
|
|
+ ElMessage.success('商品货号'+goods_art_no.value+'获取成功,请在遥控器上按下左或右脚按键,启动拍摄')
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -235,11 +238,25 @@ async function runGoods(data) {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
ElMessage.success('开始拍摄,请稍后')
|
|
ElMessage.success('开始拍摄,请稍后')
|
|
|
- console.log('aa4')
|
|
|
|
|
runLoading.value = true;
|
|
runLoading.value = true;
|
|
|
runAction.value = data
|
|
runAction.value = data
|
|
|
goods_art_no.value = ''
|
|
goods_art_no.value = ''
|
|
|
goods_art_no_tpl.value = ''
|
|
goods_art_no_tpl.value = ''
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ clientStore.ipc.on(icpList.socket.message + '_run_mcu', (event, result) => {
|
|
|
|
|
+
|
|
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu');
|
|
|
|
|
+ console.log('_run_mcu');
|
|
|
|
|
+ console.log(result);
|
|
|
|
|
+ if(result.code !== 0 && result.msg){
|
|
|
|
|
+ ElMessage.error(result.msg)
|
|
|
|
|
+ runLoading.value = false
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -307,20 +324,15 @@ onMounted(async () => {
|
|
|
|
|
|
|
|
console.log('_blue_tooth_scan')
|
|
console.log('_blue_tooth_scan')
|
|
|
if (result.code === 0 && result.data?.data) {
|
|
if (result.code === 0 && result.data?.data) {
|
|
|
- if(result.data?.data.goods_art_no) runGoods(result.data?.data)
|
|
|
|
|
- if(!result.data?.data.goods_art_no && goods_art_no.value){
|
|
|
|
|
- console.log('aa')
|
|
|
|
|
- console.log('手工')
|
|
|
|
|
- console.log({
|
|
|
|
|
- ...result.data?.data,
|
|
|
|
|
- goods_art_no: goods_art_no.value
|
|
|
|
|
- })
|
|
|
|
|
- runGoods({
|
|
|
|
|
- ...result.data?.data,
|
|
|
|
|
- goods_art_no: goods_art_no.value
|
|
|
|
|
- })
|
|
|
|
|
- console.log('aa1')
|
|
|
|
|
|
|
+ console.log(goods_art_no.value);
|
|
|
|
|
+ if(!goods_art_no.value){
|
|
|
|
|
+ ElMessage.error('请先扫描货号或者手动输入货号!')
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
+ runGoods({
|
|
|
|
|
+ ...result.data?.data,
|
|
|
|
|
+ goods_art_no: goods_art_no.value
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -383,7 +395,8 @@ const checkInfoStore = checkInfo()
|
|
|
checkInfoStore.set_blue_tooth_scan_NO('')
|
|
checkInfoStore.set_blue_tooth_scan_NO('')
|
|
|
watchEffect(async ()=>{
|
|
watchEffect(async ()=>{
|
|
|
if(checkInfoStore.blue_tooth_scan_NO){
|
|
if(checkInfoStore.blue_tooth_scan_NO){
|
|
|
- ElMessage.success('商品货号'+checkInfoStore.blue_tooth_scan_NO+'获取成功,请根据左右脚按遥控器上的左右脚按键启动拍摄')
|
|
|
|
|
|
|
+ ElMessage.success('商品货号'+checkInfoStore.blue_tooth_scan_NO+'获取成功,请在遥控器上按下左或右脚按键,启动拍摄')
|
|
|
|
|
+ goods_art_no.value = checkInfoStore.blue_tooth_scan_NO
|
|
|
checkInfoStore.set_blue_tooth_scan_NO('')
|
|
checkInfoStore.set_blue_tooth_scan_NO('')
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -395,6 +408,7 @@ watchEffect(async ()=>{
|
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_blue_tooth_scan');
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_blue_tooth_scan');
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_image_process');
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_image_process');
|
|
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message + '_run_mcu');
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take');
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take');
|
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take_finish');
|
|
clientStore.ipc.removeAllListeners(icpList.socket.message + '_photo_take_finish');
|
|
|
|
|
|