| | |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">ä¿®æ¹</button>--> |
| | | |
| | | <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="set_CheckBill">å®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">éåº</button> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">å®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">åå®¡æ ¸</button> |
| | |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="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 type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" value="0"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">æ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;"> |
| | | <label class="layui-form-label">æ¥æ<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-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; background-color: #efefef4d;" 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;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | <div class="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; background-color: #efefef4d;" 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;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="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 type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HCurID" id="HCurID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="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="HExRate" id="HExRate" autocomplete="off" value="0" readonly> |
| | | <input class="layui-input" name="HExRate" id="HExRate" autocomplete="off" value="0" style="background-color: #efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:900px;"> |
| | | <label class="layui-form-label">ä¸å¡å®¢æ·</label> |
| | | <label class="layui-form-label">ä¸å¡å®¢æ·<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline" style="width:750px;"> |
| | | <input type="text" name="HCusName" id="HCusName" class="layui-input" value="" style="float:left;width:475px;"> |
| | | <input type="text" name="HCusName" id="HCusName" class="layui-input" value="" style="float: left; width: 475px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HCusID" id="HCusID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HCusList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ç®æ¹å¼</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HSSName" id="HSSName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HSSName" id="HSSName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HSSID" id="HSSID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HSSList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width:900px;"> |
| | | <label class="layui-form-label">ç»ç®åä½</label> |
| | | <label class="layui-form-label">ç»ç®åä½<label style="color:red"> * </label></label> |
| | | <div class="layui-input-inline" style="width:750px;"> |
| | | <input type="text" name="HAccCusName" id="HAccCusName" class="layui-input" value="" style="float:left;width:475px;"> |
| | | <input type="text" name="HAccCusName" id="HAccCusName" class="layui-input" value="" style="float: left; width: 475px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HAccCusID" id="HAccCusID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HAccCusList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | <div class="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="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" 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> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é¶è¡</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="HBankName" id="HBankName" class="layui-input" value="" style="float:left;width:150px;"> |
| | | <input type="text" name="HBankName" id="HBankName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly> |
| | | <input type="hidden" name="HBankID" id="HBankID" class="layui-input" value="0" style="float:left;width:150px;"> |
| | | <button type="button" lay-submit="" class="layui-btn" lay-filter="HBankList" style="width:40px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">é¶è¡è´¦å·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HBankNo" id="HBankNo" autocomplete="off"> |
| | | <input class="layui-input" name="HBankNo" id="HBankNo" style="background-color: #efefef4d;" autocomplete="off" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å
é¨è®¢åå·</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off" readonly> |
| | | <input class="layui-input" name="HInnerBillNo" id="HInnerBillNo" autocomplete="off" style="background-color: #efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="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="HSumMoney" id="HSumMoney" autocomplete="off"> |
| | | <input class="layui-input" name="HSumMoney" id="HSumMoney" value="0" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="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="HDiscountRate" id="HDiscountRate" autocomplete="off"> |
| | | <input class="layui-input" name="HDiscountRate" id="HDiscountRate" value="100" autocomplete="off" style="background-color: #efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="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="HRelSumMoney" id="HRelSumMoney" autocomplete="off"> |
| | | <input class="layui-input" name="HRelSumMoney" value="0" id="HRelSumMoney" autocomplete="off" style="background-color: #efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è´¢å¡æ¥æ</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="date" class="layui-input" lay-verify="HAccDate" name="HAccDate" id="HAccDate" style="padding-left: 80px;"> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" lay-verify="HAccDate" name="HAccDate" id="HAccDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">客æ·ä½é¢</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HCusBalance" id="HCusBalance" autocomplete="off" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ä¿¡ç¨é¢åº¦</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HCreditRating_Now" id="HCreditRating_Now" autocomplete="off" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¯ç¨é¢åº¦</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HAvailableBalance" id="HAvailableBalance" autocomplete="off" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">éå®ç»ç»<label style="color:red"> * </label></label> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 501px;"> |
| | | <select name="HOrgID" id="HOrgID" lay-verify="HOrgID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">客æ·ä½é¢</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="" id="" autocomplete="off" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">客æ·ä¿¡ç¨é¢åº¦</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="" id="" autocomplete="off" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | set_InitDate(); |
| | | //åå§åå¶å人åå¶åæ¶é´ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | //éå®åãéå®é¨é¨ãéå®ä¸»ç®¡åå§å |
| | | getCzyglByUser(); |
| | | } |
| | | else if (OperationType == 3) { //ç¼è¾ |
| | | //å è½½ç¼è¾é¡µé¢ |
| | |
| | | |
| | | //#region ç»ç»åå§å |
| | | Organ(); |
| | | //#endregion |
| | | |
| | | //#region 页é¢åå§ååï¼æ ¹æ®å®¢æ·è·å客æ·ä½é¢ |
| | | getCustomerBalance($("#HCusID").val()); |
| | | //#endregion |
| | | //#endregion |
| | | |
| | |
| | | |
| | | //#region ææ¬æ¡çå¬ |
| | | $(document).ready(function () { |
| | | //#region åå§æ¥æææ¬æ¡çå¬ |
| | | //$("#HBirthday").on('input proprytychange', function (data) { |
| | | // if (data.currentTarget.value == "") { |
| | | // $("#HAge").val(""); |
| | | // } else { |
| | | // var HBirthDay = data.currentTarget.value; //åºçæ¥æ |
| | | // var HToday = Format(new Date(), "yyyy-MM-dd"); //å½å¤©æ¥æ |
| | | // var year = HToday.split("-")[0] - HBirthDay.split("-")[0]; |
| | | // var month = HToday.split("-")[1] - HBirthDay.split("-")[1]; |
| | | // var day = HToday.split("-")[2] - HBirthDay.split("-")[2]; |
| | | // if (month > 0 || (month == 0 && day >= 0)) { |
| | | // $("#HAge").val(year); |
| | | // } else { |
| | | // $("#HAge").val(year-1); |
| | | // } |
| | | // } |
| | | //}); |
| | | //#region éé¢å¤±ç¦äºä»¶ |
| | | var oldHSumMoney = ""; //ä¿®æ¹åçå¼ |
| | | var newHSumMoney = ""; //ä¿®æ¹åçå¼ |
| | | $("#HSumMoney").on('focus', function (data) { |
| | | oldHSumMoney = $("#HSumMoney").val() * 1; //éé¢ææ¬æ¡è·åç¦ç¹æ¶è·åä¿®æ¹åçå¼ |
| | | }).on('blur', function (data) { |
| | | newHSumMoney = $("#HSumMoney").val(); //éé¢ææ¬æ¡å¤±ç¦æ¶è·åä¿®æ¹åçå¼ |
| | | |
| | | //夿è¾å
¥çé颿¯å¦åæ³ |
| | | var ref = /^\d+(\.\d+)?$/; //éè´æ°æ£åè¡¨è¾¾å¼ |
| | | if (!ref.test(newHSumMoney)) { |
| | | layer.msg("éé¢è¯·è¾å
¥ä¸å°äº0çæ°å!"); |
| | | $("#HSumMoney").val(oldHSumMoney); |
| | | return false; |
| | | } |
| | | |
| | | //è¾å
¥çéé¢åæ³ï¼éç®ææ£åéé¢ |
| | | var HSumMoney = newHSumMoney * 1; //éé¢ |
| | | var HDiscountRate = $("#HDiscountRate").val() * 1; //æ´åææ£ |
| | | var HRelSumMoney = HSumMoney * HDiscountRate * 0.01; //ææ£åéé¢ |
| | | |
| | | $("#HSumMoney").val(HSumMoney); |
| | | $("#HDiscountRate").val(HDiscountRate); |
| | | $("#HRelSumMoney").val(HRelSumMoney); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ´åææ£å¤±ç¦äºä»¶ |
| | | var oldHDiscountRate = ""; //ä¿®æ¹åçå¼ |
| | | var newHDiscountRate = ""; //ä¿®æ¹åçå¼ |
| | | $("#HDiscountRate").on('focus', function (data) { |
| | | oldHDiscountRate = $("#HDiscountRate").val() * 1; //æ´åææ£ææ¬æ¡è·åç¦ç¹æ¶è·åä¿®æ¹åçå¼ |
| | | }).on('blur', function (data) { |
| | | newHDiscountRate = $("#HDiscountRate").val(); //æ´åææ£ææ¬æ¡å¤±ç¦æ¶è·åä¿®æ¹åçå¼ |
| | | |
| | | //夿è¾å
¥çæ´åææ£æ¯å¦åæ³ |
| | | var ref = /^\d+(\.\d+)?$/; //éè´æ°æ£åè¡¨è¾¾å¼ |
| | | if (!ref.test(newHDiscountRate)) { |
| | | layer.msg("æ´åææ£è¯·è¾å
¥ä¸å°äº0çæ°å!"); |
| | | $("#HDiscountRate").val(oldHDiscountRate); |
| | | return false; |
| | | } |
| | | |
| | | //è¾å
¥çéé¢åæ³ï¼éç®ææ£åéé¢ |
| | | var HSumMoney = $("#HSumMoney").val() * 1; //éé¢ |
| | | var HDiscountRate = newHDiscountRate * 1; //æ´åææ£ |
| | | var HRelSumMoney = HSumMoney * HDiscountRate * 0.01; //ææ£åéé¢ |
| | | |
| | | $("#HSumMoney").val(HSumMoney); |
| | | $("#HDiscountRate").val(HDiscountRate); |
| | | $("#HRelSumMoney").val(HRelSumMoney); |
| | | }); |
| | | //#endregion |
| | | }); |
| | | //#endregion |
| | |
| | | //if (AllowLoadData(data)) { |
| | | set_AddNew(data); |
| | | //} |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region å®¡æ ¸æé® |
| | | form.on('submit(set_CheckBill)', function (data) { |
| | | set_CheckBill(0); |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¶é´è½¬æ¢ |
| | | function formatDate(date) { |
| | | var d = new Date(date), |
| | | month = '' + (d.getMonth() + 1), |
| | | day = '' + d.getDate(), |
| | | year = d.getFullYear(); |
| | | |
| | | if (month.length < 2) { |
| | | month = '0' + month; |
| | | } |
| | | if (day.length < 2) { |
| | | day = '0' + day; |
| | | } |
| | | |
| | | return [year, month, day].join('-'); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region è·åç»ç» |
| | | function Organ() { |
| | | //è·åç»å½é¡µç»ç»å |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®è´¦å·è·åé¨é¨ãèåã主管 |
| | | function getCzyglByUser() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Xs_SeOrderBill/getCzyglByUser", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "CurUserName": sessionStorage["HUserName"] |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | $("#HEmpID").val(data.HEmpID); |
| | | $("#HEmpName").val(data.HEmpName); |
| | | $("#HDeptID").val(data.HDeptID); |
| | | $("#HDeptName").val(data.HDeptName); |
| | | $("#HManagerID").val(data.HManagerID); |
| | | $("#HManagerName").val(data.HManagerName); |
| | | |
| | | |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | //#region å¼¹çªé¡µé¢æ¹æ³ |
| | | //#region éæ©éå®é¨é¨ |
| | | function get_checkDept() { |
| | |
| | | if (checkStatus.data.length === 0) { |
| | | return layer.msg('è¯·éæ©æ°æ®'); |
| | | } |
| | | $("#HCusName").val(checkStatus.data[0].HName); |
| | | $("#HCusID").val(checkStatus.data[0].HItemID); |
| | | |
| | | getCustomerByCusID(checkStatus.data[0].HItemID); |
| | | //æ ¹æ®å®¢æ·è·å客æ·ä½é¢ |
| | | getCustomerBalance(checkStatus.data[0].HItemID); |
| | | |
| | | layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | } |
| | | , btn2: function (index, layero) { } |
| | |
| | | |
| | | //#region é¶è¡éæ©é¡µé¢ |
| | | function get_checkBank() { |
| | | |
| | | layer.open({ |
| | | type: 2//å¼¹çªç±»å |
| | | , skin: 'layui-layer-rim' //å ä¸è¾¹æ¡ |
| | | , area: ['90%', '90%']//å¤§å° |
| | | , title: 'é¶è¡å表'//æ é¢ |
| | | , shift: 2//å¼¹åºå¨ç» |
| | | , content: ['../../Baseset/åºç¡èµæ/Gy_BankList.html?Type=HBank', '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('è¯·éæ©æ°æ®'); |
| | | // } |
| | | // $("#HEmpName").val(checkStatus.data[0].HName); |
| | | // $("#HEmpID").val(checkStatus.data[0].HItemID); |
| | | // layer.close(index); //å®è·åçå§ç»æ¯ææ°å¼¹åºçæä¸ªå±ï¼å¼æ¯ç±layerå
é¨å¨æéå¢è®¡ç®ç |
| | | //} |
| | | //, btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | |
| | | |
| | | //è¥ä¸ºç¼è¾-ä¿åï¼åæ´æ°ä¿®æ¹äººåä¿®æ¹æ¶é´ |
| | | if (OperationType == 3) { |
| | | data.field.HUpdater = sessionStorage["HUserName"]; |
| | | data.field.HUpdaterDate = Format(new Date(), "yyyy-MM-dd"); |
| | | $("#HUpdater").val(sessionStorage["HUserName"]); |
| | | $("#HUpdaterDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | data.field.HUpDater = sessionStorage["HUserName"]; |
| | | data.field.HUpDateDate = Format(new Date(), "yyyy-MM-dd"); |
| | | $("#HUpDater").val(sessionStorage["HUserName"]); |
| | | $("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | } |
| | | |
| | | |
| | |
| | | , "HDiscountRate": data.æ´åææ£ |
| | | , "HRelSumMoney": data.ææ£åéé¢ |
| | | , "HAccDate": formatDate(data.è´¢å¡æ¥æ) |
| | | , "HCreditRating_Now": data.HCreditRating_Now |
| | | , "HRemark": data.è¡¨å¤´å¤æ³¨ |
| | | |
| | | , "HMaker": data.å¶å人 |
| | |
| | | return true; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå®¡æ ¸/å®¡æ ¸æ°æ® |
| | | function set_CheckBill(num) { |
| | | var InterID = $("#HInterID").val(); |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/YS_ReceiveBill/AuditYS_ReceiveBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | //#endregion |
| | | |
| | |
| | | |
| | | function GetHSupValue(obj) //è¿åä¸å¡å®¢æ· |
| | | { |
| | | $("#HCusName").val(obj[0].HName); |
| | | $("#HCusID").val(obj[0].HItemID); |
| | | //$("#HCusName").val(obj[0].HName); |
| | | //$("#HCusID").val(obj[0].HItemID); |
| | | //æ ¹æ®å®¢æ·è·åç¸å
³ä¿¡æ¯ |
| | | getCustomerByCusID(obj[0].HItemID); |
| | | //æ ¹æ®å®¢æ·è·å客æ·ä½é¢ |
| | | getCustomerBalance(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetHManagerValue(obj) //è¿åéå®ä¸»ç®¡ |
| | |
| | | $("#HManagerID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetHBankValue(obj) //è¿åé¶è¡ |
| | | { |
| | | $("#HBankName").val(obj[0].é¶è¡åç§°); |
| | | $("#HBankID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | function GetSettleStyleValue(obj) //è¿åç»ç®æ¹å¼ |
| | | { |
| | | $("#HSSName").val(obj[0].HName); |
| | | $("#HSSID").val(obj[0].HItemID); |
| | | } |
| | | |
| | | //#region æ ¹æ®å®¢æ·è·åå¸å«ãæ±çãç»ç®æ¹å¼ |
| | | function getCustomerByCusID(HCusID) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/YS_ReceiveBill/getCustomerByCusID", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "HCusID": HCusID |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | $("#HCusID").val(data.HCusID); |
| | | $("#HCusName").val(data.HCusName); |
| | | $("#HCurID").val(data.HCurID); |
| | | $("#HCurName").val(data.HCurName); |
| | | $("#HExRate").val(data.HExRate); |
| | | $("#HSSID").val(data.HSSID); |
| | | $("#HSSName").val(data.HSSName); |
| | | $("#HBankID").val(data.HBankID); |
| | | $("#HBankName").val(data.HBankName); |
| | | $("#HBankNo").val(data.HBankAccount); |
| | | $("#HCreditRating_Now").val(data.HCreditRating_Now); |
| | | |
| | | if ($("#HAccCusID").val() + "" == "0") { |
| | | $("#HAccCusID").val(data.HCusID); |
| | | $("#HAccCusName").val(data.HCusName); |
| | | } |
| | | } else { |
| | | layer.alert(result.msg, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ ¹æ®å®¢æ·è·å客æ·ä½é¢ |
| | | function getCustomerBalance(HCusID) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Xs_CusRatingChangeBill/getCustomerBalance", |
| | | async: false, |
| | | type: "GET", |
| | | data: { |
| | | "HCusID": HCusID |
| | | }, |
| | | success: function (result) { |
| | | if (result.code == 1) { // 说æéªè¯æåäºï¼ |
| | | var data = result.data[0]; |
| | | |
| | | $("#HCusBalance").val(data.HCusBalance == null ? 0 : data.HCusBalance); |
| | | $("#HCreditRating_Now").val(data.HCreditRating_Now == null ? 0 : data.HCreditRating_Now); |
| | | $("#HAvailableBalance").val(data.HAvailableBalance == null ? 0 : data.HAvailableBalance); |
| | | } else { |
| | | layer.alert(result.Message, { icon: 5, btn: ['éåº'], time: 100000, offset: 't' }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("åçé误!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | </script> |
| | | </body> |
| | | </html> |