| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8" /> |
| | | <title>ç产订å</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <style> |
| | | .main-btn { /*头é¨ä¸»æé®*/ |
| | | padding: 0 2px; /*è°æ´æé®å·¦å³ç©ºé大å°*/ |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | .btn-title { |
| | | font-size: 16px; |
| | | } |
| | | /* 鲿¢ä¸ææ¡ç䏿å表被éè---å¿
须设置--- */ |
| | | .layui-table-cell { |
| | | overflow: visible !important; |
| | | } |
| | | /* 使å¾ä¸ææ¡ä¸åå
æ ¼å好åé */ |
| | | td .layui-form-select { |
| | | margin-top: -10px; |
| | | margin-left: -15px; |
| | | margin-right: -15px; |
| | | } |
| | | |
| | | .layui-form-item .layui-inline { |
| | | margin-top: 5px; |
| | | margin-bottom: 5px; |
| | | margin-right: 0px; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | width: 25%; |
| | | } |
| | | </style> |
| | | |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | | <div class="layui-card" style="padding: 2px;background-color: #efefef;"> |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> |
| | | <div style="padding: 10px; "> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">ä¿å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">éåº</button> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--åºæ¬ä¿¡æ¯--> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åæ®å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HPRDORGID" id="HPRDORGID" lay-verify="HPRDORGID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">éå®è®¢åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HSeOrderBillNo" name="HSeOrderBillNo" id="HSeOrderBillNo" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HSeOrderInterID" id="HSeOrderInterID" lay-verify="HSeOrderInterID" value="0"> |
| | | <input type="hidden" name="HSeOrderEntryID" id="HSeOrderEntryID" lay-verify="HSeOrderEntryID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHSeOrder" id="btnHSeOrder" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">ä¸å¡å</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HEmpName" name="HEmpName" id="HEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" lay-verify="HEmpID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHEmp" id="btnHEmp" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">客æ·</label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HCusName" name="HCusName" id="HCusName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HCusID" id="HCusID" lay-verify="HCusID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCus" id="btnHCus" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">å·¥ä½ä¸å¿</label> |
| | | <div class="layui-input-block" style="margin-left: 75px;"> |
| | | <input type="text" class="layui-input" lay-verify="HCenterName" name="HCenterName" id="HCenterName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HCenterID" id="HCenterID" lay-verify="HCenterID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHCenter" id="btnHCenter" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç产车é´</label> |
| | | <div class="layui-input-block" style="margin-left: 71px;"> |
| | | <input type="text" class="layui-input" lay-verify="HDeptName" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHDept" id="btnHDept" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">计åç产æ°é</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HQty" lay-verify="HQty" id="HQty"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æç¼ç </label> |
| | | <div class="layui-input-block" style="margin-left: 71px;"> |
| | | <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HMaterID" id="HMaterID" lay-verify="HMaterID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMater" id="btnHMater" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æåç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HMaterName" lay-verify="HMaterName" id="HMaterName" style="background-color:#efefef4d;display: inline-block;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">è§æ ¼åå·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HModel" lay-verify="HModel" id="HModel" style="background-color:#efefef4d;display: inline-block;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">çäº§èµæº</label> |
| | | <div class="layui-input-block" style="margin-left: 75px;"> |
| | | <input type="text" class="layui-input" lay-verify="HSourceName" name="HSourceName" id="HSourceName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HSourceID" id="HSourceID" lay-verify="HSourceID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHSource" id="btnHSource" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">计éåä½</label> |
| | | <div class="layui-input-block" style="margin-left: 71px;"> |
| | | <input type="text" class="layui-input" lay-verify="HUnitName" name="HUnitName" id="HUnitName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HUnitID" id="HUnitID" lay-verify="HUnitID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHUnit" id="btnHUnit" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ä¸å¡ç¶æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 185px;"> |
| | | <select name="HSTATUS" lay-filter="HSTATUS" id="HSTATUS"> |
| | | <option value="1">计å</option> |
| | | <option value="2">计å确认</option> |
| | | <option value="3">ä¸è¾¾</option> |
| | | <option value="4">å¼å·¥</option> |
| | | <option value="5">å®å·¥</option> |
| | | <option value="6">ç»æ¡</option> |
| | | <option value="7">ç»ç®</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 95px;">BOM</label> |
| | | <div class="layui-input-block" style="margin-left: 80px;"> |
| | | <input type="text" class="layui-input" lay-verify="HBomName" name="HBomName" id="HBomName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HBomID" id="HBomID" lay-verify="HBomID" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnBom" id="btnBom" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">计åå¼å·¥æ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 115px;"> |
| | | <input type="date" class="layui-input" lay-verify="HPlanBeginDate" name="HPlanBeginDate" id="HPlanBeginDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">计åå¼å®å·¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="date" class="layui-input" lay-verify="HPlanEndDate" name="HPlanEndDate" id="HPlanEndDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æè¿å¼å·¥æ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æè¿å®å·¥æ¥æ</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline" style="width: 56%;"> |
| | | <label class="layui-form-label" style="width: 85px;">夿³¨</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HRemark" id="HRemark" lay-verify="HRemark" placeholder="请è¾å
¥å
容" onmouseover="this.title=this.value"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script> |
| | | |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //éæèµæºæå¨è·¯å¾ |
| | | }).extend({ |
| | | index: 'lib/index' //主å
¥å£æ¨¡å |
| | | }).use(['index', 'form', 'laydate', 'table', 'element', 'laydate'], function () { |
| | | |
| | | //#region å
Œ
±åé |
| | | |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element |
| | | , laydate = layui.laydate |
| | | var option = []; |
| | | |
| | | |
| | | //#endregion |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | |
| | | //åå§å |
| | | set_ClearBill(); |
| | | |
| | | var params = getUrlVars(); |
| | | var OperationType = params[params[0]]; //ä»åæ°ä¸è·å æ°æ®ç±»å 1æ·»å ä¿å 2å¤å¶ 3 ç¼è¾ |
| | | var linterid = params[params[1]]; //ä»åæ°ä¸è·å åæ®å
ç |
| | | |
| | | if (linterid == null || linterid == 0) { |
| | | OperationType = 1; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/GetMAXNum", |
| | | type: "GET", |
| | | data: { "HBillType": '3710' }, |
| | | success: function (d) { |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | } |
| | | }); |
| | | } |
| | | else {//å¦æä¿®æ¹åèµ°ä¸é¢ |
| | | //ç¦ç¨ç»ç»é项 |
| | | $("#HPRDORGID").attr("disabled", true); |
| | | $("#HDate").attr("disabled", true); |
| | | RoadBillMain(linterid); |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //éæ©éå®è®¢åå·æé® |
| | | form.on('submit(btnHSeOrder)', function () { |
| | | get_btnHSeOrder(); |
| | | }); |
| | | |
| | | //éæ©ä¸å¡åæé® |
| | | form.on('submit(btnHEmp)', function () { |
| | | get_btnHEmp(); |
| | | }); |
| | | |
| | | //éæ©å®¢æ·æé® |
| | | form.on('submit(btnHCus)', function () { |
| | | get_btnHCus(); |
| | | }); |
| | | |
| | | //éæ©çäº§è½¦é´æé® |
| | | form.on('submit(btnHDept)', function () { |
| | | get_btnHDept(); |
| | | }); |
| | | |
| | | //鿩工ä½ä¸å¿æé® |
| | | form.on('submit(btnHCenter)', function () { |
| | | get_btnHCenter(); |
| | | }); |
| | | |
| | | //éæ©ç©ææé® |
| | | form.on('submit(btnHMater)', function () { |
| | | get_btnHMater(); |
| | | }); |
| | | |
| | | //éæ©çäº§èµæºæé® |
| | | form.on('submit(btnHSource)', function () { |
| | | get_btnHSource(); |
| | | }); |
| | | |
| | | //éæ©è®¡éåä½æé® |
| | | form.on('submit(btnHUnit)', function () { |
| | | get_btnHUnit(); |
| | | }); |
| | | |
| | | //éæ©BOMæé® |
| | | form.on('submit(btnBom)', function () { |
| | | get_btnBom(); |
| | | }); |
| | | |
| | | //éåº |
| | | form.on('submit(btnEdit)', function (data) { |
| | | if (OperationType == 1 && linterid != "") { |
| | | Pub_Close(2); |
| | | } else { |
| | | Pub_Close(1); |
| | | } |
| | | }); |
| | | |
| | | //ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | | //if (AllowLoadData(data)) { |
| | | // set_AddNew(data); |
| | | //} |
| | | set_AddNew(data); |
| | | }); |
| | | |
| | | //#endregion |
| | | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | // åå§åçé¢ |
| | | function set_ClearBill() { |
| | | //åå§åæ¥æ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HPlanBeginDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HPlanEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§å ç»ç» |
| | | Organ(); |
| | | } |
| | | |
| | | //è·åç»ç» |
| | | function Organ() { |
| | | //è·åç»å½é¡µç»ç»å |
| | | var Organization = ''; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "/Web/GetOrganizations", |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data; |
| | | for (var i = 0; i < data.length; i++) { |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#HPRDORGID").append(Organization); |
| | | $("#HPRDORGID").val(sessionStorage["OrganizationID"]) |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //éå®è®¢å |
| | | function get_btnHSeOrder() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'éå®è®¢å'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../éå®ç®¡ç/éå®è®¢å/Xs_SeOrderBillList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HSeOrderInterID").val(checkStatus.data[0].hmainid); |
| | | $("#HSeOrderBillNo").val(checkStatus.data[0].åæ®å·); |
| | | $("#HSeOrderEntryID").val(checkStatus.data[0].hsubid); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //ä¸å¡å |
| | | function get_btnHEmp() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'ä¸å¡å'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../åºç¡èµæ/å
¬ç¨åºç¡èµæ/Gy_EmployeeList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HEmpID").val(checkStatus.data[0].HItemID); |
| | | $("#HEmpName").val(checkStatus.data[0].èååç§°); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //å®¢æ· |
| | | function get_btnHCus() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: '客æ·'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_CustomerList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HCusID").val(checkStatus.data[0].HItemID); |
| | | $("#HCusName").val(checkStatus.data[0].HName); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //çäº§è½¦é´ |
| | | function get_btnHDept() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: "ç产车é´å表" //æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_DepartmentList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HDeptID").val(checkStatus.data[0].HItemID); |
| | | $("#HDeptName").val(checkStatus.data[0].HName); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //å·¥ä½ä¸å¿ |
| | | function get_btnHCenter() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'å·¥ä½ä¸å¿'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_WorkCenterList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HCenterID").val(checkStatus.data[0].HItemID); |
| | | $("#HCenterName").val(checkStatus.data[0].å·¥ä½ä¸å¿); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //ç©æ |
| | | function get_btnHMater() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: "ç©æå表" //æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_MaterialList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HMaterID").val(checkStatus.data[0].HItemID); |
| | | $("#HMaterNumber").val(checkStatus.data[0].HNumber); |
| | | $("#HMaterName").val(checkStatus.data[0].HName); |
| | | $("#HModel").val(checkStatus.data[0].HModel); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //çäº§èµæº |
| | | function get_btnHSource() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: "çäº§èµæºå表" //æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ["../../åºç¡èµæ/ç产åºç¡èµæ/Gy_Source.html", "yes"] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HSourceID").val(checkStatus.data[0].HItemID); |
| | | $("#HSourceName").val(checkStatus.data[0].çäº§èµæºåç§°); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //计éåä½ |
| | | function get_btnHUnit() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: "计éåä½å表" //æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_UnitList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HUnitID").val(checkStatus.data[0].HItemID); |
| | | $("#HUnitName").val(checkStatus.data[0].HName); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //BOM |
| | | function get_btnBom() { |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'BOMå表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../ç产管ç/çäº§ç©ææ¸
å/sc_Gy_ICBomBillMainList.html', 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//è·åtableçelem:"#test" |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | //è·åæ°æ® |
| | | $("#HBomID").val(checkStatus.data[0].hmainid); |
| | | $("#HBomName").val(checkStatus.data[0].åæ®å·); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | |
| | | //ä¿åHMaker |
| | | function set_AddNew(data) { |
| | | |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sMainSub = sMainStr + ';' + OperationType + ";" + sessionStorage["HUserName"]; |
| | | |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Sc_ICMOBill/ICMOBillEdit_NoTable", |
| | | async: true, |
| | | data: { "sMainSub": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | $('#btnSave').addClass("layui-btn-disabled").attr("disabled", true); |
| | | layer.close(index); |
| | | layer.msg("æäº¤æå"); |
| | | } |
| | | else { |
| | | layer.close(index); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.close(index); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //ç¼è¾ 页é¢èµå¼ |
| | | function RoadBillMain(linterid)//å 载表头 |
| | | { |
| | | var sWhere = " and HPRDORGID=" + sessionStorage["OrganizationID"] + " and hmainid='" + linterid + "'"; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/LEMS/MES_IF_ICMOBillList_Json", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (d) { |
| | | |
| | | //if (d.data.length > 1) { |
| | | // layer.msg("忮忰æ®ä¸å¯ä¸!,è¯·éæ°éæ©"); |
| | | //} |
| | | |
| | | var HSTATUS = ""; |
| | | switch (d.data[0].ç¶æ) { |
| | | case "计å": |
| | | HSTATUS = "1"; |
| | | break; |
| | | case "计å确认": |
| | | HSTATUS = "2"; |
| | | break; |
| | | case "ä¸è¾¾": |
| | | HSTATUS = "3"; |
| | | break; |
| | | case "å¼å·¥": |
| | | HSTATUS = "4"; |
| | | break; |
| | | case "å®å·¥": |
| | | HSTATUS = "5"; |
| | | break; |
| | | case "ç»æ¡": |
| | | HSTATUS = "6"; |
| | | break; |
| | | } |
| | | |
| | | //主表 |
| | | form.val("formData", { |
| | | "HBillNo": d.data[0].åæ®å· |
| | | , "HInterID": d.data[0].hmainid |
| | | , "HPRDORGID": d.data[0].HPRDORGID |
| | | , "HDate": Format(new Date(d.data[0].æ¥æ), "yyyy-MM-dd") |
| | | , "HSeOrderBillNo": d.data[0].æºååå· |
| | | , "HSeOrderInterID": d.data[0].æºå主å
ç |
| | | , "HSeOrderEntryID": d.data[0].æºååå
ç |
| | | , "HEmpID": d.data[0].HEmpID |
| | | , "HEmpName": d.data[0].ä¸å¡å |
| | | , "HCusID": d.data[0].HEntryCusID |
| | | , "HCusName": d.data[0].å®¢æ· |
| | | , "HCenterID": d.data[0].HCenterID |
| | | , "HCenterName": d.data[0].å·¥ä½ä¸å¿ |
| | | , "HDeptID": d.data[0].HDeptID |
| | | , "HDeptName": d.data[0].çäº§è½¦é´ |
| | | , "HQty": d.data[0].ç产任å¡åæ°é |
| | | , "HMaterID": d.data[0].HMaterID |
| | | , "HMaterNumber": d.data[0].产å代ç |
| | | , "HMaterName": d.data[0].产ååç§° |
| | | , "HModel": d.data[0].è§æ ¼åå· |
| | | , "HSourceID": d.data[0].HSourceID |
| | | , "HSourceName": d.data[0].çäº§èµæº |
| | | , "HUnitID": d.data[0].HUnitID |
| | | , "HUnitName": d.data[0].计éåä½ |
| | | , "HSTATUS": HSTATUS |
| | | , "HBomID": d.data[0].HBomID |
| | | , "HBomName": d.data[0].BOMåç¼ç |
| | | , "HPlanBeginDate": Format(new Date(d.data[0].计åå¼å·¥æ¥æ), "yyyy-MM-dd") |
| | | , "HPlanEndDate": Format(new Date(d.data[0].计åå®å·¥æ¥æ), "yyyy-MM-dd") |
| | | , "HBeginDate": Format(new Date(d.data[0].æè¿å¼å·¥æ¥æ), "yyyy-MM-dd") |
| | | , "HEndDate": Format(new Date(d.data[0].æè¿å®å·¥æ¥æ), "yyyy-MM-dd") |
| | | , "HRemark": d.data[0].è¡¨å¤´å¤æ³¨ |
| | | }); |
| | | form.render('select'); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //é空éªè¯ |
| | | function AllowLoadData(data) { |
| | | |
| | | if ($("#HMaterNumber").val() == "") { |
| | | layer.msg("ç©æç¼ç 没æéæ©"); |
| | | return false; |
| | | } |
| | | if ($("#HSourceName").val() == "") { |
| | | layer.msg("çäº§èµæºæ²¡æéæ©"); |
| | | return false; |
| | | } |
| | | if ($("#HUnitName").val() == "") { |
| | | layer.msg("计éå使²¡æéæ©"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HDeptName").val() == "") { |
| | | layer.msg("çäº§è½¦é´æ²¡æéæ©"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HMainCenterIDName").val() == "") { |
| | | layer.msg("å·¥ä½ä¸å¿æ²¡æéæ©"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#BomName").val() == "") { |
| | | layer.msg("BOM没æéæ©"); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | //è·ååæ° |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | | for (var i = 0; i < hashes.length; i++) { |
| | | hash = hashes[i].split('='); |
| | | vars.push(hash[0]); |
| | | vars[hash[0]] = hash[1]; |
| | | } |
| | | return vars; |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |