| | |
| | | |
| | | <div class="layer-footer" style="text-align: center;"> |
| | | <button type="button" lay-submit="" class="layui-btn buttom_box_little" lay-filter="btn_Check" id="btn_Check">å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn buttom_box_little" lay-filter="btn_Cancel" id="btn_Cancel">éåº</button> |
| | | <button type="button" lay-submit="" class="layui-btn buttom_box_little" lay-filter="btn_Cancel" id="btn_Cancel">éåº</button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | |
| | | if (result.code == "1") { |
| | | var sSubStr = table.cache['mainTable']; |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (sSubStr[i].HMaterID == HBarCode.split("#")[0]) { |
| | | sSubStr[i].HSQty += parseInt(HBarCode.split("#")[1]); |
| | | if (sSubStr[i].HEntryID == result.data[0]["HSourceEntryID"]) { |
| | | sSubStr[i].HSQty += parseInt(result.data[0]["HQty"]); |
| | | table.render(option); |
| | | break; |
| | | } |
| | |
| | | $('#HBarCode').val(""); |
| | | $("#HBarCode").focus(); |
| | | } |
| | | |
| | | //éåº-å
³é页颿¹æ³ |
| | | $('#btn_Cancel').on('click', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | window.close(); |
| | | }); |
| | | form.on('submit(btn_Cancel)', function () { |
| | | parent.location.href = "../../../views/index.html" |
| | | }) |
| | | //å®¡æ ¸ |
| | | form.on('submit(btn_Check)', function (data) {//å®¡æ ¸ |
| | |
| | | for (var i = 0; i < sSubStr.length; i++) { |
| | | if (parseInt(sSubStr[i].HSQty) > parseInt(sSubStr[i].HQty)) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æ«ç æ°éä¸è½è¶
åºè®¢åæ°é!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | if (parseInt(sSubStr[i].HSQty) == 0) { |
| | | layer.msg("æç»è®°å½ç¬¬" + (i + 1) + "è¡,æ«ç æ°é为0", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | } |
| | |
| | | function set_InitGrid() { |
| | | //表头 |
| | | columns = [ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left' } |
| | | , { field: 'HSQty', title: 'æ°é', edit: 'text' } |
| | | { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left' } |
| | | , { field: 'HSQty', title: 'æ°é', edit: 'text', totalRow: true } |
| | | , { field: 'HQty', title: 'è®¢åæ°é' } |
| | | , { field: 'HMaterID', title: 'HMaterID' } |
| | | , { field: 'HMaterNum', title: 'ç©æä»£ç ' } |
| | |
| | | , { field: 'HModel', title: 'è§æ ¼åå·' } |
| | | , { field: 'HInterID', title: '主å
ç ', sort: true, width: 200 } |
| | | , { field: 'HEntryID', title: 'åå
ç ', sort: true, width: 200 } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 150 } |
| | | , { field: 'HPieceQty', title: 'æ¡ç æ°é', width: 150 } |
| | | ]; |
| | | option = { |
| | | id: 'mainTable' |