Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js =================================================================== diff -u -r26083 -r27338 --- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 26083) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 27338) @@ -251,9 +251,27 @@ return v; } } +/* + * 根据谷歌或IE浏览器选择不同的语音播放的方式 + */ + function googleOrIESpeak(content){ + if(!!window.ActiveXObject || "ActiveXObject" in window){ + if(speaker){ + speaker.speak(content); + } + }else { + var synth = window.speechSynthesis; + var googleSpeack = new SpeechSynthesisUtterance(); + //汉语 + googleSpeack.lang = 'zh-CN'; + googleSpeack.rate = 1; + googleSpeack.text = content; + synth.speak(googleSpeack); + } + } function sayGoods(record){ if(record && record.data){ - speaker.speak(record.data.showTousseName + ",数量为" + record.data.count); + googleOrIESpeak(record.data.showTousseName + ",数量为" + record.data.count); } } //发货单明细累减