| | |
| | | </div> |
| | | |
| | | <!-- 详情 --> |
| | | <div class="form-box"> |
| | | <div class="form-box" id="mat-detail"> |
| | | <div class="form-item"> |
| | | <span>名称</span> |
| | | <input id="matName" type="text" disabled="disabled" style="background-color: #ececec"> |
| | | <input id="matName" type="text" disabled="disabled" style="background-color: #ececec;color: #000"> |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>单位</span> |
| | | <input id="str1" type="text" disabled="disabled" style="background-color: #ececec"> |
| | | <input id="str1" type="text" disabled="disabled" style="background-color: #ececec;color: #000; text-align: center;"> |
| | | </div> |
| | | <div class="form-item form-count"> |
| | | <span style="margin-right: 10px">数量</span> |
| | | <button onclick="reduce()">-</button><input id="count" type="number"><button onclick="add()">+</button> |
| | | <button onclick="reduce()">-</button><input id="count" type="number" style="text-align: center"><button onclick="add()">+</button> |
| | | </div> |
| | | <div class="form-item form-btn-con"> |
| | | <button id="confirm" onclick="confirm()">提取</button> |
| | |
| | | |
| | | </body> |
| | | <script> |
| | | // initCrnMsgTable() |
| | | var matMsgTableBlankRows = 0; // 空白行数 |
| | | var code = document.getElementById("code") |
| | | var matnr = document.getElementById("matnr") |
| | |
| | | var btnCon = document.getElementById("btn-con"); |
| | | var tipDom = document.getElementById("tips"); |
| | | |
| | | // todo |
| | | matMsg.style.display = 'none'; |
| | | btnCon.style.display = 'none'; |
| | | var matetail = document.getElementById("mat-detail"); |
| | | var matName = document.getElementById("matName"); |
| | | var str1 = document.getElementById("str1"); |
| | | var count = document.getElementById("count"); |
| | | |
| | | matetail.style.display = 'none'; |
| | | var initMatCount = 1; |
| | | |
| | | // 查询物流 |
| | | function find(el) { |
| | |
| | | }, function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | // 样式 |
| | | matMsg.style.display = 'none'; |
| | | btnCon.style.display = 'none'; |
| | | matetail.style.display = 'block'; |
| | | // 填充数据 |
| | | matName.value = res.data.matName; |
| | | str1.value = res.data.str1; |
| | | count.value = initMatCount; |
| | | } else { |
| | | matMsg.style.display = 'block'; |
| | | btnCon.style.display = 'block'; |
| | | matetail.style.display = 'none'; |
| | | } |
| | | } else { |
| | | alert(res.msg); |
| | |
| | | } |
| | | } |
| | | |
| | | function add() { |
| | | count.value = Number(count.value) + 1; |
| | | } |
| | | function reduce() { |
| | | if (count.value <= initMatCount) { |
| | | return; |
| | | } |
| | | count.value = count.value - 1; |
| | | } |
| | | |
| | | function httpRequest(paramObj,fun,errFun) { |
| | | var xmlhttp = null; |
| | | /*创建XMLHttpRequest对象, |