| | |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">ä¿å</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">å®¡æ ¸</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_SelectMainBill">éæ´å</button>--> |
| | | <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_PrintReport" disabled>æå°</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">éåº</button> |
| | | </div> |
| | |
| | | <h1 style="text-align: center; padding: 10px 0;"><b>éè´å
¥åºå</b></h1> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | | <li lay-id="1" style="padding:1px;" class="layui-this">åºæ¬ä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;">å¶åä¿¡æ¯</li> |
| | | <li lay-id="2" style="padding:1px;display:none;">å
¶ä»ä¿¡æ¯</li> |
| | | <li lay-id="3" style="padding:1px;">å¶åä¿¡æ¯</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <!--åºæ¬ä¿¡æ¯--> |
| | |
| | | <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0"> |
| | | <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID" value=0> |
| | | <input type="hidden" name="HBillSubType" id="HBillSubType" value=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æ¥æ<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | <input type="date" class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å
é¨åæ®å·</label> |
| | | <label class="layui-form-label">ä¸å¡å<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs8 layui-inline"> |
| | | <label class="layui-form-label">ä¾åºå<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline" style="width:750px"> |
| | | <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:700px;"> |
| | | <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value=0 style="float:left;width:700px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä»åº<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HWHList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">éªæ¶å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¿ç®¡å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¸å¡å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" style="width:40px;display:none;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType"> |
| | | <!--å¨ææ¸²ææºåç±»å--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="" id="" class="layui-input" value="" style="float:left;width:150px;"> |
| | | |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | <!--<label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="Box2" id="Box2" autocomplete="off"> |
| | | </div>--> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">è´è´£äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">é¨é¨<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;display:none;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä¾åºå<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;display:none;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å票ç¼å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HInvoiceBillNo" id="HInvoiceBillNo" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">ä»åº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HWHList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">éªæ¶å<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <!--<label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="Box2" id="Box2" autocomplete="off"> |
| | | </div>--> |
| | | </div> |
| | | <div class="layui-row" style="display:none;"> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">è´è´£äºº</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">项ç®ç¼ç </label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HProjectNumber" id="HProjectNumber" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly> |
| | |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">项ç®åç§°</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HProjectName" id="HProjectName" style="background-color:#efefef4d;" readonly autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-row"> |
| | | <div class="layui-row" style="display:none;"> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">ä¿ç®¡å</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">æºåç±»å</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="HSourceBillType" id="HSourceBillType" lay-verify="HSourceBillType"> |
| | | <!--å¨ææ¸²ææºåç±»å--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="display:none;"> |
| | | <label class="layui-form-label">éåå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSourceBillNo" id="HSourceBillNo" class="layui-input" value="" style="float:left;width:150px;" readonly> |
| | | |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">æè¦</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="XDHList" id="XDHList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-row"> |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">æè¦</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="hexplanation" id="hexplanation" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs7 layui-inline"> |
| | | <label class="layui-form-label">夿³¨</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline" style="margin-left: 135px;"> |
| | | <label class="layui-form-label">å票ç¼å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HInvoiceBillNo" id="HInvoiceBillNo" autocomplete="off"> |
| | | <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off" style="width:800px;"> |
| | | </div> |
| | | </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="HOrgID" id="HOrgID" lay-verify="HOrgID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 800px;"> |
| | | <select name="HOrgID" id="HOrgID" lay-verify="HOrgID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!--å
¶ä»ä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">å
é¨åæ®å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <!--å¶åä¿¡æ¯--> |
| | | <div class="layui-tab-item"> |
| | |
| | | </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="HUpDater" id="HUpDater" style="background-color:#efefef4d;" 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="HDeleteMan " id="HDeleteMan " style="background-color:#efefef4d;" 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: 120px;"> |
| | | <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly> |
| | |
| | | <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" 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: 120px;"> |
| | | <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" 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="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" 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: 120px;"> |
| | | <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly> |
| | | </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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </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="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>å¢å ä¸è¡</button>--> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>å¤å¶ä¸è¡</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>åºåæ¥è¯¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>åºå
¥åºè®°å½æ¥è¯¢</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>åºå
¥åºè®°å½æ¥è¯¢</button>--> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="xuhao"> |
| | |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <script> |
| | | //#region ææ¬æ¡è¾å
¥æç´¢ç¸å
³æ°æ®-åé |
| | | var childPage = null; //è·ååçªå£å¯¹è±¡ï¼ç¨äºæä½åçªå£çåéåæ¹æ³ |
| | | var currRowIndex = 0; //ç¨äºå®ä½åçªå£å½åéä¸çè¡ |
| | | var childData = null; //ç¨äºè·ååçªå£è¿åçæ°æ® |
| | | //#endregion |
| | | |
| | | //#region æå 注é |
| | | //#endregion |
| | | layui.config({ |
| | |
| | | var month = date.getMonth() + 1; |
| | | var year = date.getFullYear(); |
| | | var shijian = year + "-" + month + "-" + day; |
| | | |
| | | var topScroll = 0;//è®°å½æ»å¨æ¡çä½ç½® |
| | | var allVal; |
| | | //#endregion |
| | | var HModName = "Add_Edit_Kf_POStockInBillList" |
| | |
| | | var linterid = params[params[1]];//æºåid |
| | | var HSouceBillType = params[params[2]];//æºåç±»å |
| | | } |
| | | |
| | | var HBillSubType = getParams("HBillSubType") == "" ? "1201" : getParams("HBillSubType");//åæ®åç±»å |
| | | $("#HBillSubType").val(HBillSubType); |
| | | |
| | | |
| | | //#region è·åæå¤§åæ®å· |
| | |
| | | //#endregion |
| | | |
| | | var rowdata = [{ |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQtyMust": "0", "HQty": "", "HRemark": "", |
| | | "HMaterID": 0, "ç©æä»£ç ": "", "ç©æåç§°": "", "è§æ ¼åå·": "", "HUnitID": 0, "计éåä½": "", "HQtyMust": "0", "HQty": "0", "HRemark": "", |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "HSPID": 0, "ä»ä½åç§°": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | "HSourceBillNo": "", "HSourceBillType": "", "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | "HTaxRate": 0, "HTaxPrice": 0, "HlineTotal": 0 |
| | | }]; |
| | | |
| | |
| | | "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "æ¶æä»åº": "", |
| | | "HSPID": 0, "ä»ä½åç§°": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | "HSourceBillNo": "", "HSourceBillType": "", "HSourceInterID": 0, "HSourceEntryID": 0, |
| | | "HTaxRate": 0, "HTaxPrice": 0, "HlineTotal": 0 |
| | | }; |
| | | switch (obj.event) { |
| | |
| | | //#region æå° |
| | | form.on('submit(get_PrintReport)', function (data) { |
| | | get_PrintReport(); |
| | | }); |
| | | //#endregion |
| | | //#region éæ´å |
| | | form.on('submit(set_SelectMainBill)', function (data) { |
| | | set_SelectMainBill(); |
| | | }); |
| | | //#endregion |
| | | //éæ©ä¸å¡åæé® |
| | |
| | | } |
| | | }); |
| | | |
| | | //#region åè½¦éæ©æºå |
| | | $('#HSourceBillNo').on('keydown', function (event) { |
| | | var HSourceBillNo = $('#HSourceBillNo').val();//ï¼æºååæ®å·ï¼ |
| | | if (event.keyCode == 13) { |
| | | var ajaxLoad = layer.load(); |
| | | var url; |
| | | //å¤æææ¬æ¡æ¯å¦ææ°æ® new |
| | | if (HSourceBillNo == "") { |
| | | layer.close(ajaxLoad); |
| | | return; |
| | | } |
| | | if ($("#HSourceBillType").val() == "1102") { |
| | | //æºåç±»åæ¯éè´è®¢å |
| | | url = "/Cg_POOrderBill/PushList"; |
| | | } else if ($("#HSourceBillType").val() == "1103") { |
| | | //æºåç±»åæ¯æ¶æéç¥å |
| | | url = "/Cg_POInStockBill/PushList"; |
| | | } |
| | | $.ajax({ |
| | | url: GetWEBURL() + url, |
| | | type: "GET", |
| | | data: { "HBillNo": HSourceBillNo, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var checkStatus = result; |
| | | if ($("#HSourceBillType").val() == "1102") { |
| | | option.data = [];//æ¸
空å表 |
| | | $("#HProjectName").val(checkStatus.data[0].项ç®åç§°); |
| | | $("#HProjectNumber").val(checkStatus.data[0].项ç®ä»£ç ); |
| | | $("#HProjectID").val(checkStatus.data[0].HProjectID); |
| | | |
| | | $("#HDeptID").val(checkStatus.data[0].HDeptID); |
| | | $("#HDeptName").val(checkStatus.data[0].é¨é¨); |
| | | $("#HWHID").val(checkStatus.data[0].HWHID); |
| | | $("#HWHName").val(checkStatus.data[0].ä»åº); |
| | | $("#HSupID").val(checkStatus.data[0].HSupID); |
| | | $("#HSupName").val(checkStatus.data[0].ä¾åºå); |
| | | $("#HEmpID").val(checkStatus.data[0].HEmpID); |
| | | $("#HEmpName").val(checkStatus.data[0].ä¸å¡å); |
| | | $("#HManagerID").val(checkStatus.data[0].HManagerID); |
| | | $("#HManagerName").val(checkStatus.data[0].主管); |
| | | $("#HInvoiceBillNo").val(checkStatus.data[0].å票ç¼å·); |
| | | $("#HInnerBillNo").val(checkStatus.data[0].å
é¨åæ®å·); |
| | | |
| | | var j = 0; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | var HNewQty = checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é//æ°é |
| | | var HNewMoney = checkStatus.data[j].éé¢ - checkStatus.data[j].å
³èæ°é * checkStatus.data[j].åä»·//åå°å
³èæ°éçéé¢ |
| | | var HNewTaxMoney = HNewMoney * checkStatus.data[j].ç¨ç * 0.01 |
| | | var HNewlineTotal = HNewMoney + HNewTaxMoney; |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HWHID": checkStatus.data[j].HWHIDSub, "æ¶æä»åº": checkStatus.data[j].ä»åºåç§°, |
| | | "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HQtyMust": checkStatus.data[j].æ°é, |
| | | "HQty": HNewQty, "HPrice": checkStatus.data[j].åä»·, "HMoney": HNewMoney,"HOrderPrice": checkStatus.data[j].éé¢, |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": HNewlineTotal |
| | | }) |
| | | j++; |
| | | } |
| | | |
| | | } else if ($("#HSourceBillType").val() == "1103") { |
| | | option.data = [];//æ¸
空å表 |
| | | $("#HProjectName").val(checkStatus.data[0].项ç®åç§°); |
| | | $("#HProjectNumber").val(checkStatus.data[0].项ç®ä»£ç ); |
| | | $("#HProjectID").val(checkStatus.data[0].HProjectID); |
| | | $("#HDeptID").val(checkStatus.data[0].HDeptID); |
| | | $("#HDeptName").val(checkStatus.data[0].é¨é¨); |
| | | $("#HWHID").val(checkStatus.data[0].主表ä»åºID); |
| | | $("#HWHName").val(checkStatus.data[0].主表ä»åº); |
| | | $("#HSupID").val(checkStatus.data[0].HSupID); |
| | | $("#HSupName").val(checkStatus.data[0].ä¾åºå); |
| | | $("#HEmpID").val(checkStatus.data[0].HEmpID); |
| | | $("#HEmpName").val(checkStatus.data[0].ä¸å¡å); |
| | | $("#HManagerID").val(checkStatus.data[0].HManagerID); |
| | | $("#HManagerName").val(checkStatus.data[0].主管); |
| | | $("#HInvoiceBillNo").val(checkStatus.data[0].å票ç¼å·); |
| | | $("#HInnerBillNo").val(checkStatus.data[0].å
é¨åæ®å·); |
| | | var j = 0; |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | var HNewQty = checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é//æ°é |
| | | var HNewMoney = checkStatus.data[j].éé¢ - checkStatus.data[j].å
³èæ°é * checkStatus.data[j].åä»·//åå°å
³èæ°éçéé¢ |
| | | var HNewTaxMoney = HNewMoney * checkStatus.data[j].ç¨ç * 0.01 |
| | | var HNewlineTotal = HNewMoney + HNewTaxMoney; |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HQtyMust": checkStatus.data[j].æ°é, "HQty": checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é, "HRemark": "", |
| | | "HPrice": checkStatus.data[j].åä»·, "HMoney": HNewMoney, "HOrderPrice": checkStatus.data[j].éé¢, "HWHID": checkStatus.data[j].HWHID, "æ¶æä»åº": checkStatus.data[j].æ¶æä»åº, |
| | | "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": HNewlineTotal |
| | | }) |
| | | j++; |
| | | } |
| | | } |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | layer.msg("æ¥è¯¢æå", { time: 1 * 1000, icon: 1 }); |
| | | } else { |
| | | layer.alert(result.Message, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, error: function () { |
| | | layer.alert(result.Message + "åçé误!", { icon: 5 }); |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | |
| | | table.on('edit(mainTable)', function (obj) { |
| | | //æ°å¼æ ¼å¼æ ¡éªå·¥å
· |
| | | var ref = /^\d+(\.\d+)?$/; //éè´æ°æ£åè¡¨è¾¾å¼ |
| | | var ref1 = /^-?\d+(\.\d+)?$/; //夿å符串æ¯å¦ä¸ºæ°å(å
嫿´æ°ãæµ®ç¹æ°)ï¼æ£åè¡¨è¾¾å¼ |
| | | var temp = ""; |
| | | var Dec = getDecByMaterID(obj.data.HMaterID) //è·å精度 |
| | | var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"]; //æ°é精度 |
| | | var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"]; //å价精度 |
| | | var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"]; //éé¢ç²¾åº¦ |
| | | topScroll = $('#mainTable').next('.layui-table-view').find('.layui-table-body').scrollTop();//è·åæ»å¨æ¡ä½ç½® |
| | | // åå
æ ¼ç¼è¾ä¹åçå¼ |
| | | var oldText = $(this).prev().text(); |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | |
| | | case "HQty": //æ°é |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | | temp = value + ""; |
| | | if (!ref.test(temp) || temp == 0) { |
| | | if (!ref1.test(temp)) { |
| | | //æ¢å¤æ°æ®å°ç¼è¾å |
| | | obj.update({ |
| | | HQty: oldText |
| | | }); |
| | | table.render(option); |
| | | |
| | | layer.msg("æ°é请è¾å
¥å¤§äº0çæ°å!"); |
| | | layer.msg("æ°é请è¾å
¥ä¸ä¸º0çæ°å!"); |
| | | return; |
| | | } else if (temp * 1 == 0) { |
| | | //æ¢å¤æ°æ®å°ç¼è¾å |
| | | obj.update({ |
| | | HQty: oldText |
| | | }); |
| | | table.render(option); |
| | | |
| | | layer.msg("æ°é请è¾å
¥ä¸ä¸º0çæ°å!"); |
| | | return; |
| | | } |
| | | |
| | |
| | | obj.update({ |
| | | HPrice: oldText |
| | | }); |
| | | /* table.render(option);*/ |
| | | table.render(option); |
| | | |
| | | layer.msg("å价请è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | |
| | | obj.update({ |
| | | HMoney: oldText |
| | | }); |
| | | /* table.render(option);*/ |
| | | table.render(option); |
| | | |
| | | layer.msg("éé¢è¯·è¾å
¥å¤§äº0çæ°å!"); |
| | | return; |
| | |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HMoney = value * 1; |
| | | var HPrice = (HMoney / HQty); //åä»·=éé¢/æ°é |
| | | var HTaxRate = value * 0.01; //ç¨ç |
| | | var HTaxRate = obj.data.HTaxRate * 0.01; //ç¨ç |
| | | var HTaxPrice = HPrice * (1 + HTaxRate); //å«ç¨åä»·=åä»·*(1+ç¨ç) |
| | | var HTaxMoney = HMoney * HTaxRate; //ç¨é¢=éé¢*ç¨ç |
| | | var HlineTotal = HMoney + HTaxMoney; //ä»·ç¨å计=éé¢+ç¨é¢ |
| | |
| | | , HMoney: HMoney |
| | | , HlineTotal: HlineTotal |
| | | }); |
| | | //table.render(option); |
| | | table.render(option); |
| | | break; |
| | | case "HTaxPrice": //åä»· |
| | | //æ°æ®æ ¼å¼æ ¡éª |
| | |
| | | |
| | | //#region æå° |
| | | function get_PrintReport() { |
| | | var temp = $("#HInterID").val(); |
| | | if (typeof (temp) != "undefined" && temp != null && temp != "") { |
| | | linterid = temp; |
| | | } |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 150, style: 'background-color:#efefef4d;' } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 100, style: 'background-color:#efefef4d;'} |
| | | , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true } |
| | | , { field: '计éåä½', title: '计éåä½', width: 100, edit: 'text', event: "HUnitID" }//f7 |
| | | , { field: 'HQtyMust', title: 'åºæ¶æ°é', width: 150, edit: 'text', totalRow: true} |
| | | , { field: '计éåä½', title: '计éåä½', width: 100, event: "HUnitID" }//f7 |
| | | , { field: 'HQtyMust', title: 'åºæ¶æ°é', width: 150, totalRow: true} |
| | | , { field: 'HQty', title: '宿¶æ°é', width: 150, edit: 'text', totalRow: true} |
| | | , { field: 'HPrice', title: 'åä»·', width: 100, edit: 'text' } |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, edit: 'text', totalRow: true } |
| | | , { field: 'HOrderPrice', title: 'éè´éé¢', width: 100, edit: 'text', totalRow: true} |
| | | , { field: 'HPrice', title: 'åä»·', width: 100 } |
| | | , { field: 'HMoney', title: 'éé¢', width: 100, totalRow: true } |
| | | , { field: 'HOrderPrice', title: 'éè´éé¢', width: 100, totalRow: true} |
| | | , { field: 'HWHID', title: 'HWHID', width: 100, hide: true } |
| | | , { field: 'æ¶æä»åº', title: 'æ¶æä»åº', width: 100, edit: 'text', event: "HWHID" }//f7 |
| | | , { field: 'HSPID', title: 'HSPID', width: 100, hide: true } |
| | | , { field: 'ä»ä½åç§°', title: 'ä»ä½åç§°', width: 100, edit: 'text', event: "HSPID" }//f7 |
| | | , { field: 'HTaxRate', title: 'ç¨ç', width: 100, edit: 'text' } |
| | | , { field: 'HTaxPrice', title: 'å«ç¨åä»·', width: 100, edit: 'text' } |
| | | , { field: 'HTaxRate', title: 'ç¨ç', width: 100} |
| | | , { field: 'HTaxPrice', title: 'å«ç¨åä»·', width: 100} |
| | | , { field: 'HlineTotal', title: 'å«ç¨éé¢', width: 100, style: 'background-color:#efefef4d;' } |
| | | , { field: 'HBatchNo', title: 'æ¹æ¬¡', width: 150, edit: 'text' } |
| | | , { field: 'HRemark', title: '夿³¨', width: 100, edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo', width: 70 } |
| | | ]] |
| | | , done: function (res, curr, count) { |
| | | $(".layui-table-main").scrollTop(topScroll); |
| | | } |
| | | } |
| | | |
| | | option.data = []; |
| | |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | |
| | | var data = result.data[0]; |
| | | allVal = result.data[0]; |
| | | HBillSubType = data.HBillSubType; |
| | | form.val("component-form-group", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HBillNo": data.åæ®å· |
| | | , "HDate": formatDate(data.æ¥æ) |
| | |
| | | , "HMaker": data.å¶å人 |
| | | , "HChecker": data.å®¡æ ¸äºº |
| | | , "HCloseMan": data.å
³é人 |
| | | , "HMakeDate": data.å¶åæ¥æ |
| | | , "HCheckDate": data.å®¡æ ¸æ¥æ |
| | | , "HCloseDate": data.å
³éæ¥æ |
| | | , "HUpDateDate": data.ä¿®æ¹æ¥æ |
| | | , "HDeleteDate": data.ä½åºæ¥æ |
| | | , "HUpDater": data.ä¿®æ¹äºº |
| | | , "HDeleteMan": data.ä½åºäºº |
| | | , "HMakeDate": data.å¶åæ¥æ == null ? "" : Pub_Format(data.å¶åæ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HCheckDate": data.å®¡æ ¸æ¥æ == null ? "" : Pub_Format(data.å®¡æ ¸æ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HCloseDate": data.å
³éæ¥æ == null ? "" : Pub_Format(data.å
³éæ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HUpDateDate": data.ä¿®æ¹æ¥æ == null ? "" : Pub_Format(data.ä¿®æ¹æ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | , "HDeleteDate": data.ä½åºæ¥æ == null ? "" : Pub_Format(data.ä½åºæ¥æ, "yyyy-MM-dd hh:mm:ss") |
| | | |
| | | }); |
| | | //å表 èµå¼ |
| | |
| | | } |
| | | }); |
| | | |
| | | //#region ä¿åæé® |
| | | //#region ä¿åæé® |
| | | form.on('submit(Saver)', function (data) { |
| | | //#region 夿æºåç¶æ |
| | | if (OperationType == 1 || OperationType == 4) { |
| | |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { icon: 1 }); |
| | | |
| | | if (data.Verify == "Y") //èªå¨å®¡æ ¸ |
| | | { |
| | | $("#HInterID").val(data.HInterID);//è·åæäº¤æåè¿åç忮䏻ID |
| | | set_CheckBill(0); //å®¡æ ¸ |
| | | } |
| | | $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true); |
| | | //ä¿ååæµè§ |
| | | //ReRoadBillMain(); |
| | |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: '项ç®å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../项ç®ç®¡ç/å·¥ç¨é¡¹ç®/PM_ProjectBillList.html?Type=2&HOrgID=' + HOrgID, 'yes'] |
| | | , content: ['../../项ç®ç®¡ç/å·¥ç¨é¡¹ç®/PM_ProjectBillList.html?Type=2&HOrgID=' + HOrgID + "&HBillSubType=" + HBillSubType, 'yes'] |
| | | , btn: ['ç¡®å®', 'åæ¶'] |
| | | , btn1: function (index, layero) {//æé®ãæé®ä¸ãçåè° |
| | | var iframeWindow = window['layui-layer-iframe' + index] //è·åå¼¹æ¡é¡µé¢ |
| | |
| | | //è¡å
å¿«æ·é®çé |
| | | function set_GridCellCheck(obj) { |
| | | $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) { |
| | | //#region åè¡¨ææ¬æ¡è¾å
¥åæ£ç´¢æ°æ® |
| | | if (event.key != "F7") { |
| | | var errKeys = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter"]; |
| | | if (obj.event == "HMaterID") { //å®ä½å½åæ£å¨è¾å
¥çææ¬æ¡çåå |
| | | if ($.inArray(event.key, errKeys) == -1) { //妿æä¸çé®ä½ä¸æ¯ æ¹åé®ï¼åå·æ°å¼¹çªä¸çæ°æ® |
| | | if (childPage == null) { //夿å½ååçªå£æ¯å¦å·²ç»æå¼ï¼è¥æªæå¡ï¼åæå¼é¡µé¢ï¼å¹¶è·ååçªå£ç对象 |
| | | var offset = $(this).offset(); //è·å触åäºä»¶çå
ç´ çä½ç½®ï¼ç¨äºå®ä½åçªå£æå¼çä½ç½® |
| | | var innerHeight = window.innerHeight; |
| | | var top = offset.top + 0.05 * innerHeight; |
| | | var left = offset.left; |
| | | if (top + 0.05 * innerHeight + 0.3 * innerHeight > innerHeight) { |
| | | top = top - 0.3 * innerHeight - 0.05 * innerHeight; |
| | | } |
| | | layer.open({ |
| | | type: 2 //å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['25%', '30%'] //å¤§å° |
| | | , shadeClose: true //ç¹å»é®ç½©æ¶å
³éå¼¹çª |
| | | , offset: [top, left] |
| | | , title: false //䏿¾ç¤ºæ 颿 |
| | | //, title: '项ç®è´¹ç¨å表' //æ é¢ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , closeBtn: 0 //ç¦ç¨å
³éæé® |
| | | , content: ["../../åºç¡èµæ/éç¨åºç¡èµæ/Gy_CommonBaseData.html?OperationType=2", "yes"] |
| | | , success: function (layero, index) { |
| | | setTimeout(function () { |
| | | var value = $(e.currentTarget).val().replace("'", ""); //è·åææ¬æ¡ææ°å¼ |
| | | currRowIndex = 0; |
| | | var tableView = "h_v_Gy_MaterialList"; |
| | | var childSWhere = "select top(10) HItemID,ç©æä»£ç ,ç©æåç§°,è§æ ¼åå·,HUnitID,计éåä½åç§° from " + tableView + " where 1=1 and ç»ç»åç§° = '" + sessionStorage["Organization"] + "' and (ç©æä»£ç like '%" + value + "%' or ç©æåç§° like '%" + value + "%') order by ç©æä»£ç desc"; |
| | | childPage.getData(childSWhere, tableView); |
| | | }, 200); |
| | | } |
| | | , end: function () { |
| | | obj.event = ""; |
| | | childPage = null; |
| | | currRowIndex = 0; |
| | | if (childData != null) { |
| | | OptionData = childData; |
| | | |
| | | //éè¿ä¾åºåidè·åç¨ç |
| | | var HSupID = $("#HSupID").val(); |
| | | if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") { |
| | | var Dec = getDecByMaterID(obj.data.HMaterID) //è·å精度 |
| | | var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"]; //æ°é精度 |
| | | var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"]; //å价精度 |
| | | var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"]; //éé¢ç²¾åº¦ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Gy_Supplier/xg", |
| | | //url: "http://localhost:12761/Gy_Supplier/xg", |
| | | type: "GET", |
| | | data: { |
| | | "HInterID": HSupID |
| | | }, |
| | | success: function (d) { |
| | | var HTaxRate = parseInt(d.data[0].å¢å¼ç¨ç) * 0.01; |
| | | //æ°æ®æ ¡éªåæ ¼ï¼éç®è®°å½ |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HPrice = obj.data.HPrice * 1; //åä»· |
| | | var HMoney = HQty * HPrice; //éé¢=æ°é*åä»· |
| | | var HTaxMoney = Number((HMoney * HTaxRate)); //ç¨é¢=éé¢*ç¨ç |
| | | var HTaxPrice = Number((HPrice * (1 + HTaxRate))); //å«ç¨åä»·=åä»·*(1+ç¨ç) |
| | | var HlineTotal = HMoney + HTaxMoney; //ä»·ç¨å计=éé¢+ç¨é¢ |
| | | //æ°å精度 |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | HlineTotal = Number(HlineTotal.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® |
| | | "HMaterID": OptionData.HItemID //设置HItemIDçå¼ä¸ºâHBillNoâåæ®µçå¼HItemID`çå¼ |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | , "HTaxRate": HTaxRate * 100 |
| | | , "HQty": HQty //æ´æ°HQtyåæ®µï¼HQty |
| | | , "HPrice": HPrice //æ´æ°HPriceåæ®µï¼HPrice |
| | | , "HMoney": HMoney //æ´æ°HMoneyåæ®µï¼HMoney |
| | | , "HlineTotal": HlineTotal //æ´æ°HlineTotalåæ®µï¼HlineTotal |
| | | , "HTaxPrice": HTaxPrice //æ´æ°HTaxPriceåæ®µï¼HTaxPrice |
| | | }) |
| | | } |
| | | }); |
| | | } else if (typeof (OptionData.HItemID) != "undefined") { |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® |
| | | "HMaterID": OptionData.HItemID //设置HItemIDçå¼ä¸ºâHBillNoâåæ®µçå¼HItemID`çå¼ |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | } |
| | | |
| | | OptionData = {}; |
| | | |
| | | childData = null; |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | setTimeout(function () { |
| | | var value = $(e.currentTarget).val().replace("'", ""); //è·åææ¬æ¡ææ°å¼ |
| | | currRowIndex = 0; |
| | | var tableView = "h_v_Gy_MaterialList"; |
| | | var childSWhere = "select top(10) HItemID,ç©æä»£ç ,ç©æåç§°,è§æ ¼åå·,HUnitID,计éåä½åç§° from " + tableView + " where 1=1 and ç»ç»åç§° = '" + sessionStorage["Organization"] + "' and (ç©æä»£ç like '%" + value + "%' or ç©æåç§° like '%" + value + "%') order by ç©æä»£ç desc"; |
| | | childPage.getData(childSWhere, tableView); |
| | | }, 200); |
| | | } |
| | | } else { //妿æä¸çé®ä½æ¯ æ¹åé®ï¼åè°æ´çªå£ä¸ éä¸è¡ çä½ç½® |
| | | if (event.key == "ArrowUp") { |
| | | currRowIndex--; |
| | | childPage.setSelectedRow(currRowIndex); |
| | | } else if (event.key == "ArrowDown") { |
| | | currRowIndex++; |
| | | childPage.setSelectedRow(currRowIndex); |
| | | } else if (event.key == "Enter") { |
| | | //æå¨å¤±ç¦ |
| | | var element = document.getElementById("HBillNo"); |
| | | element.focus(); |
| | | |
| | | childPage.getSelectedData(currRowIndex); |
| | | |
| | | if (childData != null) { |
| | | OptionData = childData; |
| | | |
| | | //éè¿ä¾åºåidè·åç¨ç |
| | | var HSupID = $("#HSupID").val(); |
| | | if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") { |
| | | var Dec = getDecByMaterID(obj.data.HMaterID) //è·å精度 |
| | | var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"]; //æ°é精度 |
| | | var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"]; //å价精度 |
| | | var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"]; //éé¢ç²¾åº¦ |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Gy_Supplier/xg", |
| | | //url: "http://localhost:12761/Gy_Supplier/xg", |
| | | type: "GET", |
| | | data: { |
| | | "HInterID": HSupID |
| | | }, |
| | | success: function (d) { |
| | | var HTaxRate = parseInt(d.data[0].å¢å¼ç¨ç) * 0.01; |
| | | //æ°æ®æ ¡éªåæ ¼ï¼éç®è®°å½ |
| | | var HQty = obj.data.HQty * 1; //æ°é |
| | | var HPrice = obj.data.HPrice * 1; //åä»· |
| | | var HMoney = HQty * HPrice; //éé¢=æ°é*åä»· |
| | | var HTaxMoney = Number((HMoney * HTaxRate)); //ç¨é¢=éé¢*ç¨ç |
| | | var HTaxPrice = Number((HPrice * (1 + HTaxRate))); //å«ç¨åä»·=åä»·*(1+ç¨ç) |
| | | var HlineTotal = HMoney + HTaxMoney; //ä»·ç¨å计=éé¢+ç¨é¢ |
| | | //æ°å精度 |
| | | HQty = Number(HQty.toFixed(HQtyDec)); |
| | | HPrice = Number(HPrice.toFixed(HPriceDec)); |
| | | HMoney = Number(HMoney.toFixed(HMoneyDec)); |
| | | HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec)); |
| | | HlineTotal = Number(HlineTotal.toFixed(HMoneyDec)); |
| | | HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec)); |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® |
| | | "HMaterID": OptionData.HItemID //设置HItemIDçå¼ä¸ºâHBillNoâåæ®µçå¼HItemID`çå¼ |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | , "HTaxRate": HTaxRate * 100 |
| | | , "HQty": HQty //æ´æ°HQtyåæ®µï¼HQty |
| | | , "HPrice": HPrice //æ´æ°HPriceåæ®µï¼HPrice |
| | | , "HMoney": HMoney //æ´æ°HMoneyåæ®µï¼HMoney |
| | | , "HlineTotal": HlineTotal //æ´æ°HlineTotalåæ®µï¼HlineTotal |
| | | , "HTaxPrice": HTaxPrice //æ´æ°HTaxPriceåæ®µï¼HTaxPrice |
| | | }) |
| | | } |
| | | }); |
| | | } else if (typeof (OptionData.HItemID) != "undefined") { |
| | | obj.update({ //æ´æ°è¡¨æ ¼æ°æ® |
| | | "HMaterID": OptionData.HItemID //设置HItemIDçå¼ä¸ºâHBillNoâåæ®µçå¼HItemID`çå¼ |
| | | , "ç©æä»£ç ": OptionData.ç©æä»£ç |
| | | , "ç©æåç§°": OptionData.ç©æåç§° |
| | | , "è§æ ¼åå·": OptionData.è§æ ¼åå· |
| | | , "HUnitID": OptionData.HUnitID |
| | | , "计éåä½": OptionData.计éåä½åç§° |
| | | }) |
| | | } |
| | | |
| | | OptionData = {}; |
| | | childData = null; |
| | | } |
| | | |
| | | |
| | | childPage = null; |
| | | currRowIndex = 0; |
| | | childData = null; |
| | | obj.event = ""; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | //#endregion |
| | | |
| | | if (event.key == "F7") { |
| | | //ç©æ |
| | | if (obj.event == "HMaterID") { |
| | |
| | | } |
| | | }) |
| | | $('.layui-table-box tbody td[data-field="ç©æä»£ç "]').off('dblclick').on('dblclick', function () { |
| | | //æå¨å¤±ç¦ |
| | | var element = document.getElementById("HBillNo"); |
| | | element.focus(); |
| | | |
| | | var HOrgID = $("#HOrgID").val(); |
| | | layer.open({ |
| | | type: 2 |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | obj.event = ""; |
| | | }); |
| | | } |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //#region éæ´å |
| | | function set_SelectMainBill() { |
| | | var url; |
| | | if ($("#HSourceBillType").val() == "1102") { |
| | | url = "../../éè´ç®¡ç/éè´è®¢å/Cg_POOrderBillQuery.html?openType=2&HOrgID=" + HOrgID; |
| | | } else if ($("#HSourceBillType").val() == "1103") { |
| | | url = "../../éè´ç®¡ç/æ¶æéç¥å/Cg_POInStockBillQuery.html?openType=2&HOrgID=" + HOrgID; |
| | | } else { |
| | | return layer.msg('å½å䏿¯æè¯¥æºåéæ©ï¼ï¼'); |
| | | } |
| | | //页é¢å±-èªå®ä¹ |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: '' + getSupType().name + 'å表' //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: [url, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //æé®ä¸ çåè° |
| | | var iframeWindow = window["layui-layer-iframe" + index];//è·åå¼¹æ¡é¡µé¢ |
| | | var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//è·åéä¸çæ°æ® |
| | | |
| | | if (checkStatus.data.length == 0) { |
| | | return layer.msg("请è³å°éæ©ä¸æ¡æ°æ®!"); |
| | | } |
| | | var HSupID = $("#HSupID").val();//夿ä¾åºå |
| | | if (HSupID == 0 || HSupID == '') { |
| | | HSupID = checkStatus.data[0]["HSupID"]; |
| | | } |
| | | //è·åä¾åºå代ç ,设置æ¡ä»¶ |
| | | var sMainWhere = " and hmainid in("; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | if (checkStatus.data[i]["HSupID"] != HSupID) { |
| | | layer.msg("䏿¨å¤±è´¥!å·²ç»éä¸çè®°å½ä¸åå¨ä¸åä¾åºå!"); |
| | | layer.close(index);//å
³éå¼¹çª |
| | | return; |
| | | } |
| | | sMainWhere += checkStatus.data[i]["hmainid"] |
| | | if (i != checkStatus.data.length - 1) { |
| | | sMainWhere += ","; |
| | | } else { |
| | | sMainWhere += ") "; |
| | | } |
| | | } |
| | | getSeletMainInfo(sMainWhere); |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ´åä¿¡æ¯è·åæ¹æ³ |
| | | function getSeletMainInfo(sMainWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | if ($("#HSourceBillType").val() == "1102") { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cg_POOrderBill/list', |
| | | async: false, |
| | | type: "GET", |
| | | data: { "sWhere": sMainWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var checkStatus = data1; |
| | | option.data = [];//æ¸
空å表 |
| | | $("#HProjectName").val(checkStatus.data[0].项ç®åç§°); |
| | | $("#HProjectNumber").val(checkStatus.data[0].项ç®ä»£ç ); |
| | | $("#HProjectID").val(checkStatus.data[0].HProjectID); |
| | | |
| | | $("#HDeptID").val(checkStatus.data[0].HDeptID); |
| | | $("#HDeptName").val(checkStatus.data[0].é¨é¨); |
| | | $("#HWHID").val(checkStatus.data[0].HWHID); |
| | | $("#HWHName").val(checkStatus.data[0].ä»åº); |
| | | $("#HSupID").val(checkStatus.data[0].HSupID); |
| | | $("#HSupName").val(checkStatus.data[0].ä¾åºå); |
| | | $("#HEmpID").val(checkStatus.data[0].HEmpID); |
| | | $("#HEmpName").val(checkStatus.data[0].ä¸å¡å); |
| | | $("#HManagerID").val(checkStatus.data[0].HManagerID); |
| | | $("#HManagerName").val(checkStatus.data[0].主管); |
| | | $("#HInvoiceBillNo").val(checkStatus.data[0].å票ç¼å·); |
| | | $("#HInnerBillNo").val(checkStatus.data[0].å
é¨åæ®å·); |
| | | for (var j = 0; j < checkStatus.data.length; j++) { |
| | | var HNewQty = checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é//æ°é |
| | | var HNewMoney = checkStatus.data[j].éé¢ - checkStatus.data[j].å
³èæ°é * checkStatus.data[j].åä»·//åå°å
³èæ°éçéé¢ |
| | | var HNewTaxMoney = HNewMoney * checkStatus.data[j].ç¨ç * 0.01 |
| | | var HNewlineTotal = HNewMoney + HNewTaxMoney; |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HWHID": checkStatus.data[j].HWHIDSub, "æ¶æä»åº": checkStatus.data[j].ä»åºåç§°, |
| | | "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HQtyMust": checkStatus.data[j].æ°é, |
| | | "HQty": HNewQty, "HPrice": checkStatus.data[j].åä»·, "HMoney": HNewMoney, "HOrderPrice": checkStatus.data[j].éé¢, |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": HNewlineTotal |
| | | }) |
| | | } |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | //layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | return; |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | return; |
| | | } |
| | | }); |
| | | |
| | | } else if ($("#HSourceBillType").val() == "1103") { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Cg_POInStockBill/list', |
| | | type: "GET", |
| | | data: { "sWhere": sMainWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | checkStatus = data1; |
| | | option.data = [];//æ¸
空å表 |
| | | $("#HProjectName").val(checkStatus.data[0].项ç®åç§°); |
| | | $("#HProjectNumber").val(checkStatus.data[0].项ç®ä»£ç ); |
| | | $("#HProjectID").val(checkStatus.data[0].HProjectID); |
| | | $("#HDeptID").val(checkStatus.data[0].HDeptID); |
| | | $("#HDeptName").val(checkStatus.data[0].é¨é¨); |
| | | $("#HWHID").val(checkStatus.data[0].主表ä»åºID); |
| | | $("#HWHName").val(checkStatus.data[0].主表ä»åº); |
| | | $("#HSupID").val(checkStatus.data[0].HSupID); |
| | | $("#HSupName").val(checkStatus.data[0].ä¾åºå); |
| | | $("#HEmpID").val(checkStatus.data[0].HEmpID); |
| | | $("#HEmpName").val(checkStatus.data[0].ä¸å¡å); |
| | | $("#HManagerID").val(checkStatus.data[0].HManagerID); |
| | | $("#HManagerName").val(checkStatus.data[0].主管); |
| | | $("#HInvoiceBillNo").val(checkStatus.data[0].å票ç¼å·); |
| | | $("#HInnerBillNo").val(checkStatus.data[0].å
é¨åæ®å·); |
| | | for (var j = 0; j < checkStatus.data.length; j++) { |
| | | var HNewQty = checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é//æ°é |
| | | var HNewMoney = checkStatus.data[j].éé¢ - checkStatus.data[j].å
³èæ°é * checkStatus.data[j].åä»·//åå°å
³èæ°éçéé¢ |
| | | var HNewTaxMoney = HNewMoney * checkStatus.data[j].ç¨ç * 0.01 |
| | | var HNewlineTotal = HNewMoney + HNewTaxMoney; |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HQtyMust": checkStatus.data[j].æ°é, "HQty": HNewQty, "HRemark": "", |
| | | "HPrice": checkStatus.data[j].åä»·, "HMoney": HNewMoney, "HOrderPrice": checkStatus.data[j].éé¢, "HWHID": checkStatus.data[j].HWHID, "æ¶æä»åº": checkStatus.data[j].æ¶æä»åº, |
| | | "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": HNewlineTotal |
| | | }) |
| | | } |
| | | table.render(option); |
| | | layer.close(ajaxLoad); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | return; |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | return; |
| | | } |
| | | }); |
| | | } else { |
| | | return layer.msg('å½å䏿¯æè¯¥æºåéæ©ï¼ï¼'); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //表头信æ¯éæ©åæ®å¼¹çª |
| | | form.on('submit(XDHList)', function () { |
| | |
| | | if (checkStatus.data.length == 0) { |
| | | return layer.msg("请è³å°éæ©ä¸æ¡æ°æ®!"); |
| | | } |
| | | |
| | | var HSupID = $("#HSupID").val();//夿ä¾åºå |
| | | if (HSupID == 0 || HSupID == '') { |
| | | HSupID = checkStatus.data[0]["HSupID"]; |
| | | } |
| | | //è·åæ¶æéç¥å代ç |
| | | var ProcessNumber = []; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | if (checkStatus.data[i]["HSupID"] != HSupID) { |
| | | layer.msg("䏿¨å¤±è´¥!å·²ç»éä¸çè®°å½ä¸åå¨ä¸åä¾åºå!"); |
| | | layer.close(index);//å
³éå¼¹çª |
| | | return; |
| | | } |
| | | ProcessNumber.push(checkStatus.data[i]); |
| | | } |
| | | |
| | |
| | | |
| | | var j = 0; |
| | | for (var i = 0; i < checkStatus.data.length; i++) { |
| | | var HNewQty = checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é//æ°é |
| | | var HNewMoney = checkStatus.data[j].éé¢ - checkStatus.data[j].å
³èæ°é * checkStatus.data[j].åä»·//åå°å
³èæ°éçéé¢ |
| | | var HNewTaxMoney = HNewMoney * checkStatus.data[j].ç¨ç * 0.01 |
| | | var HNewlineTotal = HNewMoney + HNewTaxMoney; |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HWHID": checkStatus.data[j].HWHIDSub, "æ¶æä»åº": checkStatus.data[j].ä»åºåç§°, |
| | | "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HQtyMust": checkStatus.data[j].æ°é, |
| | | "HQty": checkStatus.data[j].æ°é-checkStatus.data[j].å
³èæ°é, "HPrice": checkStatus.data[j].åä»·,"HMoney": checkStatus.data[j].éé¢, |
| | | "HQty": HNewQty, "HPrice": checkStatus.data[j].åä»·, "HMoney": HNewMoney, "HOrderPrice": checkStatus.data[j].éé¢, |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": checkStatus.data[j].ä»·ç¨å计 |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": HNewlineTotal |
| | | }) |
| | | j++; |
| | | } |
| | |
| | | |
| | | var j = 0; |
| | | for (var i = 0; i < ProcessNumber.length; i++) { |
| | | var HNewQty = checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é//æ°é |
| | | var HNewMoney = checkStatus.data[j].éé¢ - checkStatus.data[j].å
³èæ°é * checkStatus.data[j].åä»·//åå°å
³èæ°éçéé¢ |
| | | var HNewTaxMoney = HNewMoney * checkStatus.data[j].ç¨ç * 0.01 |
| | | var HNewlineTotal = HNewMoney + HNewTaxMoney; |
| | | option.data.push({ |
| | | "HMaterID": checkStatus.data[j].HMaterID, "ç©æä»£ç ": checkStatus.data[j].ç©æä»£ç , "ç©æåç§°": checkStatus.data[j].ç©æåç§°, "è§æ ¼åå·": checkStatus.data[j].è§æ ¼åå·, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HQtyMust": checkStatus.data[j].æ°é, "HQty": checkStatus.data[j].æ°é-checkStatus.data[j].å
³èæ°é, "HRemark": "", |
| | | "HPrice": checkStatus.data[j].åä»·, "HMoney": checkStatus.data[j].éé¢, "HOrderPrice": "0", "HWHID": checkStatus.data[j].HWHID, "æ¶æä»åº": checkStatus.data[j].æ¶æä»åº, |
| | | "HUnitID": checkStatus.data[j].HUnitID, "计éåä½": checkStatus.data[j].计éåä½, "HQtyMust": checkStatus.data[j].æ°é, "HQty": checkStatus.data[j].æ°é - checkStatus.data[j].å
³èæ°é, "HRemark": "", |
| | | "HPrice": checkStatus.data[j].åä»·, "HMoney": HNewMoney, "HOrderPrice": checkStatus.data[j].éé¢, "HWHID": checkStatus.data[j].HWHID, "æ¶æä»åº": checkStatus.data[j].æ¶æä»åº, |
| | | "HSPID": checkStatus.data[j].HSPID, "ä»ä½åç§°": checkStatus.data[j].ä»ä½åç§°, "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0, |
| | | "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", |
| | | "HSourceBillNo": checkStatus.data[j].åæ®å·, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid, |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": (checkStatus.data[j].éé¢ + (checkStatus.data[j].éé¢ * checkStatus.data[j].ç¨ç)) |
| | | "HTaxRate": checkStatus.data[j].ç¨ç, "HTaxPrice": checkStatus.data[j].å«ç¨åä»·, "HlineTotal": HNewlineTotal |
| | | }) |
| | | j++; |
| | | } |
| | |
| | | //è¡å
å é¤ |
| | | function set_GridDelete(obj) { |
| | | var data = obj.data; |
| | | var rowIndex = $(obj.tr).attr("data-index"); |
| | | var rowIndex = $(obj.tr).attr("data-index");//è·åè¡ç´¢å¼ |
| | | if (obj.event === 'del') { |
| | | layer.confirm('ççå é¤è¡åï¼', function (index) { |
| | | console.log("ç´¢å¼ä¸º:" + rowIndex); |
| | | if (rowIndex === '0') { |
| | | if (rowIndex === '0' && table.cache["mainTable"].length == 1) { |
| | | layer.msg('é¦è¡æ æ³å é¤ï¼ï¼ï¼'); |
| | | } else { |
| | | obj.del(); |
| | | obj.del();//åå é¤ |
| | | table.cache["mainTable"].splice(rowIndex, 1); //â¡å½»åºç§»é¤å
ç´ ï¼ä»ç¼åéç§»é¤è¿ä¸è¡ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.reload(option); |
| | | table.render(option); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | |
| | | res = result.data; |
| | | //layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | }, error: function (err) { |
| | | res = "none"; |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | layer.alert("åçé误!"+err, { icon: 5 }); |
| | | } |
| | | }); |
| | | return res; |
| | |
| | | res = result.data; |
| | | //layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | }, error: function (err) { |
| | | res = "none"; |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | layer.alert("åçé误!" + err, { icon: 5 }); |
| | | } |
| | | }); |
| | | return res; |
| | |
| | | function AllowLoadData(data) { |
| | | |
| | | var ref = /^\d+(\.\d+)?$/; //éè´æ°æ£åè¡¨è¾¾å¼ |
| | | var ref1 = /^-?\d+(\.\d+)?$/; //夿å符串æ¯å¦ä¸ºæ°å(å
嫿´æ°ãæµ®ç¹æ°)ï¼æ£åè¡¨è¾¾å¼ |
| | | var temp = ""; |
| | | |
| | | if ($("#HWHID").val() == 0) { |
| | | layer.msg("è¯·éæ©ä»åºï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | if ($("#HBillNo").val() == "") { |
| | | layer.msg("忮巿ªè®¾ç½®ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | |
| | | if ($("#HDate").val() == "") { |
| | | layer.msg("æ¥ææªè®¾ç½®ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | |
| | | //if ($("#HWHID").val() == 0) { |
| | | // layer.msg("è¯·éæ©ä»åºï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | //if ($("#HManagerID").val() == 0) { |
| | | // layer.msg("è¯·éæ©è´è´£äººï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | //if ($("#HEmpID").val() == 0) { |
| | | // layer.msg("è¯·éæ©ä¸å¡åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | if ($("#HEmpID").val() == 0 || $("#HEmpID").val() == "" ) { |
| | | layer.msg("è¯·éæ©ä¸å¡åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | //if ($("#HKeeperID").val() == 0) { |
| | | // layer.msg("è¯·éæ©ä¿ç®¡åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | //if ($("#HSecManagerID").val() == 0) { |
| | | // layer.msg("è¯·éæ©éªæ¶åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | if ($("#HDeptID").val() == 0) { |
| | | if ($("#HSecManagerID").val() == 0 || $("#HSecManagerID").val()=="") { |
| | | layer.msg("è¯·éæ©éªæ¶åï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | if ($("#HDeptID").val() == 0 || $("#HDeptID").val() == "") { |
| | | layer.msg("è¯·éæ©é¨é¨ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | if ($("#HSupID").val() == 0) { |
| | | if ($("#HSupID").val() == 0 || $("#HSupID").val()=="") { |
| | | layer.msg("è¯·éæ©ä¾åºåï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | if ($("#HPSStyleID").val() == 0) { |
| | | layer.msg("è¯·éæ©éè´æ¹å¼ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | if ($("#HSSID").val() == 0) { |
| | | layer.msg("è¯·éæ©ç»ç®æ¹å¼ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | return; |
| | | } |
| | | //if ($("#HPSStyleID").val() == 0) { |
| | | // layer.msg("è¯·éæ©éè´æ¹å¼ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | //if ($("#HSSID").val() == 0) { |
| | | // layer.msg("è¯·éæ©ç»ç®æ¹å¼ï¼", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | // return; |
| | | //} |
| | | //#region å表 æ°æ®æ£éª |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | |
| | |
| | | |
| | | //å®åæ°éæ ¼å¼æ ¡éª |
| | | temp = option.data[i]["HQty"] + ""; |
| | | if (temp == "0") { |
| | | layer.msg("第" + (i + 1) + "è¡ï¼æ°éä¸è½ä¸º0ï¼"); |
| | | if (!ref1.test(temp)) { |
| | | layer.msg("第" + (i + 1) + "è¡ï¼å®åæ°é请è¾å
¥ä¸ä¸º0çæ°åï¼"); |
| | | return false; |
| | | } else if (!ref.test(temp)) { |
| | | layer.msg("第" + (i + 1) + "è¡ï¼æ°é请è¾å
¥å¤§äº0çæ°åï¼"); |
| | | } else if (temp * 1 == 0) { |
| | | layer.msg("第" + (i + 1) + "è¡ï¼å®åæ°é请è¾å
¥ä¸ä¸º0çæ°åï¼"); |
| | | return false; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | //é颿 ¼å¼æ ¡éª |
| | | temp = option.data[i]["HMoney"] + ""; |
| | | if (temp == "0") { |
| | | //layer.msg("第" + (i + 1) + "è¡ï¼éé¢ä¸è½ä¸º0ï¼"); |
| | | //return false; |
| | | } else if (!ref.test(temp)) { |
| | | layer.msg("第" + (i + 1) + "è¡ï¼éé¢è¯·è¾å
¥å¤§äº0çæ°åï¼"); |
| | | return false; |
| | | } |
| | | ////é颿 ¼å¼æ ¡éª |
| | | //temp = option.data[i]["HMoney"] + ""; |
| | | //if (temp == "0") { |
| | | // //layer.msg("第" + (i + 1) + "è¡ï¼éé¢ä¸è½ä¸º0ï¼"); |
| | | // //return false; |
| | | //} else if (!ref.test(temp)) { |
| | | // layer.msg("第" + (i + 1) + "è¡ï¼éé¢è¯·è¾å
¥å¤§äº0çæ°åï¼"); |
| | | // return false; |
| | | //} |
| | | //æ¶æä»åºé空éªè¯ |
| | | if (option.data[i]["HWHID"] == "0") { |
| | | layer.msg("第" + (i + 1) + "è¡ï¼æ¶æä»åºæªéæ©ï¼"); |
| | |
| | | |
| | | //#endregion |
| | | |
| | | //å°urlåæ°ä¸ç䏿乱ç éæ°è½¬æ¢æä¸æ |
| | | function getParams(key) { |
| | | var reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)"); |
| | | //妿å°åæ ä¸åºç°ä¸æåè¿è¡ç¼ç |
| | | var r = encodeURI(window.location.search).substr(1).match(reg); |
| | | if (r != null) { |
| | | //å°ä¸æç¼ç çåç¬¦éæ°åæä¸æ |
| | | return decodeURI(unescape(r[2])); |
| | | } |
| | | return ""; |
| | | }; |
| | | |
| | | //以䏿¯layui模å |
| | | }); |