|
@@ -231,15 +231,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','jQuery.print','jquery
|
|
|
str += "'></td>";
|
|
str += "'></td>";
|
|
|
if(result.data[i].weight == 0){
|
|
if(result.data[i].weight == 0){
|
|
|
str += "<td><button type=\"button\" class=\"btn btn-primary btn-embossed submit \">保存</button></td>";
|
|
str += "<td><button type=\"button\" class=\"btn btn-primary btn-embossed submit \">保存</button></td>";
|
|
|
|
|
+ str += "<td><input class='form-control bach' type='text' name='row[bach][]' value=''></td>";
|
|
|
}else{
|
|
}else{
|
|
|
str += "<td><button type=\"button\" class=\"btn btn-primary btn-embossed\">已保存</button></td>";
|
|
str += "<td><button type=\"button\" class=\"btn btn-primary btn-embossed\">已保存</button></td>";
|
|
|
- }
|
|
|
|
|
- if(result.data[i].material_bach){
|
|
|
|
|
str += "<td><input class='form-control bach' type='text' name='row[bach][]' readonly value='"+result.data[i].material_bach+"'></td>";
|
|
str += "<td><input class='form-control bach' type='text' name='row[bach][]' readonly value='"+result.data[i].material_bach+"'></td>";
|
|
|
- }else{
|
|
|
|
|
- str += "<td><input class='form-control bach' type='text' name='row[bach][]' value=''></td>";
|
|
|
|
|
}
|
|
}
|
|
|
- str += "<td><input class='form-control' type='text' name='row[gy_name][]' value='"+result.data[i].gy_name+"'></td>";
|
|
|
|
|
|
|
+ // if(result.data[i].material_bach){
|
|
|
|
|
+ // str += "<td><input class='form-control bach' type='text' name='row[bach][]' readonly value='"+result.data[i].material_bach+"'></td>";
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // str += "<td><input class='form-control bach' type='text' name='row[bach][]' value=''></td>";
|
|
|
|
|
+ // }
|
|
|
|
|
+ str += "<td><input class='form-control' type='text' name='row[gy_name][]' value='"+result.data[i].gy_name+"'></td>";
|
|
|
str += "</tr>";
|
|
str += "</tr>";
|
|
|
html += `<tr class="print${i} print"><td>${result.data[i].material}</td>
|
|
html += `<tr class="print${i} print"><td>${result.data[i].material}</td>
|
|
|
<td>${result.data[i].nweight}</td><td>`;
|
|
<td>${result.data[i].nweight}</td><td>`;
|
|
@@ -286,12 +288,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','jQuery.print','jquery
|
|
|
//扫描的物料=table中的物料,,,变红,否则语音提示
|
|
//扫描的物料=table中的物料,,,变红,否则语音提示
|
|
|
if(result.data[i].material===data.data[j].m_name){
|
|
if(result.data[i].material===data.data[j].m_name){
|
|
|
if (result.data[i].gy_num <= result.process){
|
|
if (result.data[i].gy_num <= result.process){
|
|
|
- $(".material")[i].setAttribute('style','color:red');
|
|
|
|
|
- $(".nweight")[i].setAttribute('style','color:red');
|
|
|
|
|
|
|
+ //投料重量为空时 扫描物料文字为红
|
|
|
|
|
+ if (result.data[i].weight == 0) {
|
|
|
|
|
+ $(".material")[i].setAttribute('style','color:red');
|
|
|
|
|
+ $(".nweight")[i].setAttribute('style','color:red');
|
|
|
|
|
+ }
|
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
|
- the_bach.value = bach;
|
|
|
|
|
|
|
+ if(the_bach.readOnly == false){
|
|
|
|
|
+ the_bach.value = bach;
|
|
|
|
|
+ }
|
|
|
|
|
+ // var the_bach = document.getElementsByClassName('bach')[i];
|
|
|
|
|
+ // the_bach.value = bach;
|
|
|
$(".number")[i].focus();
|
|
$(".number")[i].focus();
|
|
|
- //语音播报
|
|
|
|
|
|
|
+ //语音播报
|
|
|
var msg = new SpeechSynthesisUtterance("应投入物料"+result.data[i].material+"应投入重量"+result.data[i].nweight+"千克");
|
|
var msg = new SpeechSynthesisUtterance("应投入物料"+result.data[i].material+"应投入重量"+result.data[i].nweight+"千克");
|
|
|
window.speechSynthesis.speak(msg);
|
|
window.speechSynthesis.speak(msg);
|
|
|
error++;
|
|
error++;
|
|
@@ -318,8 +327,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','jQuery.print','jquery
|
|
|
var arr = result.data[i].material.split('/');
|
|
var arr = result.data[i].material.split('/');
|
|
|
if (arr.indexOf($("#wuliao").val()) !== -1 && result.data[i].gy_num == result.process) {
|
|
if (arr.indexOf($("#wuliao").val()) !== -1 && result.data[i].gy_num == result.process) {
|
|
|
$(".material")[i].value = wuliao;
|
|
$(".material")[i].value = wuliao;
|
|
|
- $(".material")[i].setAttribute('style', 'color:red');
|
|
|
|
|
- $(".nweight")[i].setAttribute('style', 'color:red');
|
|
|
|
|
|
|
+ if (result.data[i].weight == 0) {
|
|
|
|
|
+ $(".material")[i].setAttribute('style','color:red');
|
|
|
|
|
+ $(".nweight")[i].setAttribute('style','color:red');
|
|
|
|
|
+ }
|
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
|
the_bach.value = bach;
|
|
the_bach.value = bach;
|
|
|
$(".number")[i].focus();
|
|
$(".number")[i].focus();
|
|
@@ -354,11 +365,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','jQuery.print','jquery
|
|
|
//扫描的物料=table中的物料,,,变红,否则语音提示
|
|
//扫描的物料=table中的物料,,,变红,否则语音提示
|
|
|
if(result.data[i].material===wuliao){
|
|
if(result.data[i].material===wuliao){
|
|
|
if (result.data[i].gy_num <= result.process){
|
|
if (result.data[i].gy_num <= result.process){
|
|
|
- $(".material")[i].setAttribute('style','color:red');
|
|
|
|
|
- $(".nweight")[i].setAttribute('style','color:red');
|
|
|
|
|
|
|
+ if (result.data[i].weight == 0) {
|
|
|
|
|
+ $(".material")[i].setAttribute('style','color:red');
|
|
|
|
|
+ $(".nweight")[i].setAttribute('style','color:red');
|
|
|
|
|
+ }
|
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
|
- // console.log(the_bach);
|
|
|
|
|
- the_bach.value = bach;
|
|
|
|
|
|
|
+ if(the_bach.readOnly == false){
|
|
|
|
|
+ the_bach.value = bach;
|
|
|
|
|
+ }
|
|
|
$(".number")[i].focus();
|
|
$(".number")[i].focus();
|
|
|
//语音播报
|
|
//语音播报
|
|
|
var msg = new SpeechSynthesisUtterance("应投入物料"+result.data[i].material+"应投入重量"+result.data[i].nweight+"千克");
|
|
var msg = new SpeechSynthesisUtterance("应投入物料"+result.data[i].material+"应投入重量"+result.data[i].nweight+"千克");
|
|
@@ -389,10 +403,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','jQuery.print','jquery
|
|
|
var spanValue = document.getElementById("input").innerHTML;
|
|
var spanValue = document.getElementById("input").innerHTML;
|
|
|
if (arr.indexOf(spanValue) !== -1 && result.data[i].gy_num == result.process) {
|
|
if (arr.indexOf(spanValue) !== -1 && result.data[i].gy_num == result.process) {
|
|
|
$(".material")[i].value = wuliao;
|
|
$(".material")[i].value = wuliao;
|
|
|
- $(".material")[i].setAttribute('style', 'color:red');
|
|
|
|
|
- $(".nweight")[i].setAttribute('style', 'color:red');
|
|
|
|
|
|
|
+ if (result.data[i].weight == 0) {
|
|
|
|
|
+ $(".material")[i].setAttribute('style','color:red');
|
|
|
|
|
+ $(".nweight")[i].setAttribute('style','color:red');
|
|
|
|
|
+ }
|
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
var the_bach = document.getElementsByClassName('bach')[i];
|
|
|
- the_bach.value = bach;
|
|
|
|
|
|
|
+ if(the_bach.readOnly == false){
|
|
|
|
|
+ the_bach.value = bach;
|
|
|
|
|
+ }
|
|
|
$(".number")[i].focus();
|
|
$(".number")[i].focus();
|
|
|
var msg = new SpeechSynthesisUtterance("应投入物料"+result.data[i].material+"应投入重量"+result.data[i].nweight+"千克");
|
|
var msg = new SpeechSynthesisUtterance("应投入物料"+result.data[i].material+"应投入重量"+result.data[i].nweight+"千克");
|
|
|
window.speechSynthesis.speak(msg);
|
|
window.speechSynthesis.speak(msg);
|