From befd7c022b9156ae87404fdb9c3f644db08cecd0 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 18 六月 2025 10:17:13 +0800
Subject: [PATCH] 排产取消分页,提料计划添加列设置,工程项目任务类销售出库单费用带保存待审核修改
---
WebTM/views/验收入库/外购入库/Kf_POStockInBackBill_Add_Up.html | 827 +++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 503 insertions(+), 324 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
index 7842b4a..c24734b 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
@@ -66,7 +66,7 @@
<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>
+ <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">
@@ -74,43 +74,53 @@
</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="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="background-color:#efefef4d;">
+ <input type="date" class="layui-input" name="HDate" id="HDate" autocomplete="off" model="datetime" dateFormat="yyyy-MM-dd" placeholder="yyyy-MM-dd" style="background-color:#efefef4d;" readonly>
</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="HInnerBillNo" id="HInnerBillNo" autocomplete="off">
+ <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-col-xs4 layui-inline">
- <label class="layui-form-label">渚涘簲鍟�</label>
- <div class="layui-input-inline">
- <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float:left;width:150px;">
- <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;">
- <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>
+ <label class="layui-form-label">涓氬姟鍛�<label style="color:red"> * </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="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 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 type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
+ <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;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;">
+ <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>
+ <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="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;">
@@ -119,11 +129,8 @@
</button>
</div>
</div>
-
- </div>
- <div class="layui-row">
<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 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;">
@@ -132,46 +139,20 @@
</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="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
- <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>
- </button>
- </div>
- </div>
</div>
- <div class="layui-col-xs4 layui-inline">
- <label class="layui-form-label">婧愬崟绫诲瀷</label>
+ </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">
- <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;">
+ <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">
+ <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;">
@@ -181,11 +162,24 @@
</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="" id="" class="layui-input" value="" style="float:left;width:150px;">
-
- </div>
- <div class="layui-row">
-
+ <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-col-xs7 layui-inline">
<label class="layui-form-label">鎽樿</label>
<div class="layui-input-block">
@@ -212,92 +206,93 @@
</div>
</div>
</div>
- </div>
-
-
- <!--鍒跺崟淇℃伅-->
- <div class="layui-tab-item">
- <div class="layui-form-item">
- <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="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
+ <!--鍒跺崟淇℃伅-->
+ <div class="layui-tab-item">
+ <div class="layui-form-item">
+ <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="HMaker" id="HMaker" 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="HChecker" id="HChecker" 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="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+ </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;">
- <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
+ <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>
+ </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="HCheckDate" id="HCheckDate" 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="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
+ </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;">
- <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
+ <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>
- <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>
+ <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>
- <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="HCheckDate" id="HCheckDate" 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="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-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 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>
</div>
</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">
@@ -342,7 +337,7 @@
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
get_LoginIs();
//鑾峰彇缁勭粐
- Organ() ;
+ Organ();
//#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
var HModuleType = "1239";
@@ -353,8 +348,8 @@
//鑾峰彇婧愬崟绫诲瀷
HSourceBillType();
-
- //鑾峰彇椤甸潰璺宠浆鍙傛暟
+
+ //鑾峰彇椤甸潰璺宠浆鍙傛暟
var params = get_UrlVars();
if (typeof (params[params[0]]) == "undefined") {
OperationType = 1;//鎿嶄綔绫诲瀷
@@ -364,17 +359,17 @@
var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
}
- // 鍒濆鍖栫晫
+ // 鍒濆鍖栫晫
set_InitGrid();
- //#region 鑾峰彇鏈�澶у崟鎹彿
+ //#region 鑾峰彇鏈�澶у崟鎹彿
function get_MAXNum() {
$("#HInterID").val("0");
$("#HBillNo").val("");
$.ajax({
url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
type: "GET",
- data: { "HBillType": '1103' },
+ data: { "HBillType": '1239' },
success: function (d) {
$("#HBillNo").val(d.data[0].HBillNo);
$("#HInterID").val(d.data[0].HInterID);
@@ -383,9 +378,9 @@
}
//#endregion
- //#region 鍒ゆ柇鎿嶄綔绫诲瀷骞跺垵濮嬪寲鐣岄潰
+ //#region 鍒ゆ柇鎿嶄綔绫诲瀷骞跺垵濮嬪寲鐣岄潰
if (OperationType == 1) { //鏃犳簮鍗曟柊澧�
- /* $("#HItemID").val(0);*/
+ /* $("#HItemID").val(0);*/
//鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
get_MAXNum();
@@ -413,31 +408,31 @@
- //鍒ゆ柇鏄惁鏂板
- if (linterid == null || linterid == 0) {
- //鑾峰彇鏈�澶у崟鎹彿 new
- $("#HMaker").val(sessionStorage["HUserName"]);
- $("#HInterID").val("0");
- $("#HBillNo").val("");
- $.ajax({
- url: GetWEBURL() + "/Web/GetMAXNum",
- type: "GET",
- data: { "HBillType": '1239' },
- success: function (d) {
- //console.log(d.data);
- $("#HBillNo").val(d.data[0].HBillNo);
- $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
- $("#HInterID").val(d.data[0].HInterID);
- $("#HSSDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撶畻鏂瑰紡
- }
- });
- } else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
- $("#HInterID").val(linterid);
- RoadBillMain(linterid);
- }
+ ////鍒ゆ柇鏄惁鏂板
+ //if (linterid == null || linterid == 0) {
+ // //鑾峰彇鏈�澶у崟鎹彿 new
+ // $("#HMaker").val(sessionStorage["HUserName"]);
+ // $("#HInterID").val("0");
+ // $("#HBillNo").val("");
+ // $.ajax({
+ // url: GetWEBURL() + "/Web/GetMAXNum",
+ // type: "GET",
+ // data: { "HBillType": '1239' },
+ // success: function (d) {
+ // //console.log(d.data);
+ // $("#HBillNo").val(d.data[0].HBillNo);
+ // $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ // $("#HInterID").val(d.data[0].HInterID);
+ // $("#HSSDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撶畻鏂瑰紡
+ // }
+ // });
+ //} else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+ // $("#HInterID").val(linterid);
+ // RoadBillMain(linterid);
+ //}
//#endregion
//#endregion
- //鑾峰彇缁勭粐
+ //鑾峰彇缁勭粐
function Organ() {
//鑾峰彇鐧诲綍椤电粍缁囧垪
$.ajax({
@@ -459,8 +454,8 @@
})
}
var rowdata = [{
- "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
- "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+ "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "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,
@@ -476,7 +471,7 @@
//鏂板琛岃〃鏍兼暟鎹�
var NewRow = {
"HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
- "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 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,
@@ -621,6 +616,15 @@
layer.msg("鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
return;
+ } else if (value * 1 > obj.data.HQtyMust * 1) {
+ //鎭㈠鏁版嵁鍒扮紪杈戝墠
+ obj.update({
+ HQty: oldText
+ });
+ table.render(option);
+
+ layer.msg("瀹為��鏁伴噺涓嶈兘澶т簬搴旈��鏁伴噺!");
+ return;
}
@@ -639,7 +643,7 @@
, HPrice: HPrice
, HMoney: HMoney
});
- table.render(option);
+ table.render(option);
break;
case "HPrice": //鍗曚环
//鏁版嵁鏍煎紡鏍¢獙
@@ -679,7 +683,7 @@
obj.update({
HMoney: oldText
});
- table.render(option);
+ table.render(option);
layer.msg("閲戦璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
return;
@@ -701,7 +705,7 @@
});
table.render(option);
break;
-
+
default:
}
});
@@ -771,7 +775,7 @@
//#endregion
-
+
//鏃ユ湡鏍煎紡鍖�
function formatDate(date) {
var d = new Date(date),
@@ -798,24 +802,24 @@
, totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100}
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100 }
, { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
, { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
, { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, event: "HMaterID" }//f7
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, 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: 'HQty', title: '瀹炴敹鏁伴噺', width: 150, edit: 'text', totalRow: true}
- , { field: 'HQtyMust', 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: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, event: "HUnitID" }//f7
+ , { field: 'HQty', title: '瀹為��鏁伴噺', width: 150, edit: 'text', totalRow: true }
+ , { field: 'HQtyMust', title: '搴旈��鏁伴噺', width: 150, 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: '鍙戞枡浠撳簱', 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: 'HBatchNo', title: '鎵规', width: 150, edit: 'text' }
@@ -869,6 +873,8 @@
, "HMaker": data.鍒跺崟浜�
, "HChecker": data.瀹℃牳浜�
, "HCloseMan": data.鍏抽棴浜�
+ , "HUpDater": data.淇敼浜�
+ , "HDeleteDate": 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")
@@ -883,7 +889,7 @@
rowdata.push(
{
"HMaterID": subdata[i].HMaterID, "鐗╂枡浠g爜": subdata[i].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": subdata[i].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": subdata[i].瑙勬牸鍨嬪彿, "HUnitID": subdata[i].HUnitID, "璁¢噺鍗曚綅": subdata[i].璁¢噺鍗曚綅,
- "HQty": subdata[i].瀹炴敹鏁伴噺, "HQtyMust": subdata[i].搴旀敹鏁伴噺,"HRemark": subdata[i].琛ㄤ綋澶囨敞, "HPrice": subdata[i].鍗曚环, "HMoney": subdata[i].閲戦, "HOrderPrice": subdata[i].閲囪喘閲戦, "HWHID": subdata[i].HWHID, "鏀舵枡浠撳簱": subdata[i].鏀舵枡浠撳簱, "HSPID": subdata[i].HSPID, "浠撲綅鍚嶇О": subdata[i].浠撲綅鍚嶇О,
+ "HQty": subdata[i].瀹炴敹鏁伴噺, "HQtyMust": subdata[i].搴旀敹鏁伴噺, "HRemark": subdata[i].琛ㄤ綋澶囨敞, "HPrice": subdata[i].鍗曚环, "HMoney": subdata[i].閲戦, "HOrderPrice": subdata[i].閲囪喘閲戦, "HWHID": subdata[i].HWHID, "鍙戞枡浠撳簱": subdata[i].鏀舵枡浠撳簱, "HSPID": subdata[i].HSPID, "浠撲綅鍚嶇О": subdata[i].浠撲綅鍚嶇О,
"HBatchNo": subdata[i].鎵规,
"HSourceBillNo": subdata[i].婧愬崟鍗曞彿, //婧愬崟鍙�
"HSourceBillType": subdata[i].婧愬崟绫诲瀷, //婧愬崟绫诲瀷
@@ -921,11 +927,11 @@
}
});
- //#region 淇濆瓨鎸夐挳
+ //#region 淇濆瓨鎸夐挳
form.on('submit(Saver)', function (data) {
//#region 鍒ゆ柇婧愬崟鐘舵��
if (OperationType == 1 || OperationType == 4) {
-
+
if ($("#HSourceBillType").val() == "1105") {
for (var i = 0; i < option.data.length; i++) {
var HSourceBillData = "";
@@ -946,6 +952,27 @@
return;
}
}
+ } else if ($("#HSourceBillType").val() == "1201") {
+ for (var i = 0; i < option.data.length; i++) {
+ var HSourceBillData = "";
+ var HSourceBillData = getPushSource_POStockInBillInit(option.data[i].HSourceInterID, option.data[i].HSourceEntryID); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData == null) {
+ layer.alert("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細鏈煡璇㈠埌婧愬崟鍗曟嵁!", { icon: 5 });
+ return;
+ }
+ //else if (HSourceBillData.鐘舵�� != "宸插鏍�") {
+ // var err = "淇濆瓨澶辫触!鍘熷洜锛氱" + (i + 1) + "琛�-婧愬崟鍗曟嵁鐘舵�佷负鈥�" + HSourceBillData.鐘舵�� + "鈥濓紝涓嶅厑璁镐繚瀛橈紒";
+ // layer.alert(err, { icon: 5 });
+ // return;
+ //} else if (HSourceBillData.琛岀姸鎬� == "宸插叧闂�") {
+ // layer.alert("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細璇ヨ璁板綍琛岀姸鎬佷负'宸插叧闂�'鐘舵��!", { icon: 5 });
+ // return;
+ //}
+ } else {
+ return;
+ }
+ }
}
else {
return layer.msg('褰撳墠涓嶆敮鎸佽婧愬崟锛侊紒');
@@ -954,25 +981,25 @@
//#endregion
//if (AllowLoadData(data)) {
- set_SaveBill(data);
+ set_SaveBill(data);
//}
});
//#endregion
-
- //#region 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
+
+ //#region 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
function getUrlVars_JSON() {
var datajson;
var str = window.location.search; //鑾峰彇閾炬帴涓紶閫掔殑鍙傛暟
- var arr = str.substring(str.lastIndexOf("=")+1);
+ var arr = str.substring(str.lastIndexOf("=") + 1);
datajson = $.parseJSON(decodeURI(arr));
return datajson;
}
//#endregion
- //#region 涓嬫帹椤甸潰鍒濆鍖�
+ //#region 涓嬫帹椤甸潰鍒濆鍖�
function setInit_PushBill() {
- //鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
+ //鐢熸垚鍗曟嵁鍙峰拰鍐呯爜
get_MAXNum();
//鍒濆鍖栨棩鏈熴�佸埗鍗曚汉銆佸埗鍗曟棩鏈�
@@ -987,95 +1014,13 @@
//绂佺敤缁勭粐閫夐」
$("#HOrgID").attr("disabled", true);
- //鑾峰彇
- var data = getUrlVars_JSON().data;
- var dataArray = [];
- for (var i = 0; i < data.length; i++) {
- var temp = getPushSource_POInStockBackInit(data[i].hmainid, data[i].hsubid);
- if (temp != "none") {
- dataArray.push(temp);
- } else {
- return;
- }
+ if (HSouceBillType == "1105") {
+ setInit_PushBill_ByPOInStockBackBill();
+ } else if (HSouceBillType == "1201") {
+ setInit_PushBill_ByPOStockInBillInit();
}
+ }
-
- form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
- "HMainSourceInterID": "0"
- , "HMainSourceEntryID": "0"
- , "HMainSourceBillNo": ""
- , "HMainSourceBillType": $("#BillType").val()
-
- , "HDeptID": dataArray[0].HDeptID
- , "HDeptName": dataArray[0].閮ㄩ棬
- , "HManagerID": dataArray[0].HManagerID
- , "HManagerName": dataArray[0].涓荤
- , "HWHID": dataArray[0].HWHID
- , "HWHName": dataArray[0].浠撳簱
- , "HEmpID": dataArray[0].HEmpID
- , "HEmpName": dataArray[0].涓氬姟鍛�
- , "HSupID": dataArray[0].HSupID
- , "HSupName": dataArray[0].渚涘簲鍟�
- , "HSecManagerID": dataArray[0].HSecManagerID
- , "HSecManagerName": dataArray[0].楠屾敹鍛�
- , "HKeeperID": dataArray[0].HKeeperID
- , "HKeeperName": dataArray[0].淇濈鍛�
- , "HCurID": dataArray[0].HCurID
- , "HCurName": dataArray[0].甯佸埆
- , "HExRate": dataArray[0].姹囩巼
- , "HAddress": data.浜よ揣鍦扮偣
- , "HRemark": data.琛ㄥご澶囨敞
- , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
- });
-
- //瀛愯〃 璧嬪��
- var rowdata = [];
- for (var i = 0; i < dataArray.length; i++) {
- rowdata.push(
- {
- "HMaterID": dataArray[i].HMaterID
- , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
- , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
- , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
- , "HUnitID": dataArray[i].HUnitID
- , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
- , "HWHID": dataArray[i].HWHID
- , "鏀舵枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
- , "HSPID": dataArray[i].HSPID
- , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
- , "HSecUnitID": dataArray[i].HSecUnitID
- , "杈呭姪鍗曚綅": dataArray[i].杈呭姪鍗曚綅
- , "HQty": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
- , "HPrice": dealDoubleToFixed(dataArray[i].鍗曚环, 3)
- , 'HDiscountRate': dataArray[i].鎶樻墸鐜� //
- , 'HRelTaxPrice': "0"
- , "HTaxRate": dataArray[i].绋庣巼
- , 'HTaxMoney': dataArray[i].绋庨 //
- , "HMoney": dealDoubleToFixed(dataArray[i].閲戦, 2)
- , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
-
- , "HSourceInterID": dataArray[i].hmainid
- , "HSourceEntryID": dataArray[i].hsubid
- , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
- , "HSourceBillType": dataArray[i].HBillType
- , "HRelationQty": "0"
- , "HRelationMoney": "0"
-
- , 'HPOOrderInterID': "0"
- , 'HPOOrderEntryID': "0"
- , 'HPOOrderBillNo': ""
-
- , 'HSeOrderTaxPrice': dealDoubleToFixed(dataArray[i].鍚◣鍗曚环, 3)
- , "HSeOrderInterID": dataArray[i].hmainid
- , "HSeOrderEntryID": dataArray[i].hsubid
- , "HSeOrderBillNo": dataArray[i].鍗曟嵁鍙�
- }
- );
- }
- option.data = rowdata;
- table.render(option);
- }
-
//#endregion
//#region 淇濆瓨鏂规硶
@@ -1097,12 +1042,12 @@
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 ($("#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: "娓╅Θ鎻愮ず" });
+ layer.msg("璇烽�夋嫨閫�鏂欏憳锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return;
}
@@ -1350,7 +1295,7 @@
}
//#endregion
- //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
+ //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
function set_CheckBill(num) {
var InterID = $("#HInterID").val();
//閫昏緫瀹℃牳鏂规硶
@@ -1409,7 +1354,7 @@
if (rowIndex + i >= option.data.length) {
var NewRow = {
"HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
- "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 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,
@@ -1488,12 +1433,12 @@
})
layer.close(index);//鍏抽棴寮圭獥
}
- , end: function () {
- obj.update({
- "HUnitID": OptionData.HItemID
- , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
- })
- }
+ , end: function () {
+ obj.update({
+ "HUnitID": OptionData.HItemID
+ , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+ })
+ }
})
}
//鏀舵枡浠撳簱
@@ -1518,17 +1463,17 @@
}
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
obj.update({
- "鏀舵枡浠撳簱": checkStatus.data[0].浠撳簱鍚嶇О
+ "鍙戞枡浠撳簱": checkStatus.data[0].浠撳簱鍚嶇О
, "HWHID": checkStatus.data[0].HItemID
})
layer.close(index);//鍏抽棴寮圭獥
}
- , end: function () {
- obj.update({
- "HWHID": OptionData.HItemID
- , "鏀舵枡浠撳簱": OptionData.浠撳簱鍚嶇О
- })
- }
+ , end: function () {
+ obj.update({
+ "HWHID": OptionData.HItemID
+ , "鍙戞枡浠撳簱": OptionData.浠撳簱鍚嶇О
+ })
+ }
})
}
//浠撲綅
@@ -1558,12 +1503,12 @@
})
layer.close(index);//鍏抽棴寮圭獥
}
- , end: function () {
- obj.update({
- "HSPID": OptionData.HMainID
- , "浠撲綅鍚嶇О": OptionData.浠撲綅鍚嶇О
- })
- }
+ , end: function () {
+ obj.update({
+ "HSPID": OptionData.HMainID
+ , "浠撲綅鍚嶇О": OptionData.浠撲綅鍚嶇О
+ })
+ }
})
}
obj.event = "";
@@ -1599,7 +1544,7 @@
if (rowIndex + i >= option.data.length) {
var NewRow = {
"HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
- "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 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,
@@ -1710,6 +1655,35 @@
if (checkStatus.data.length == 0) {
return layer.msg("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�!");
}
+
+ form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HMainSourceInterID": "0"
+ , "HMainSourceEntryID": "0"
+ , "HMainSourceBillNo": ""
+ , "HMainSourceBillType": $("#BillType").val()
+
+ , "HDeptID": checkStatus.data[0].HDeptID
+ , "HDeptName": checkStatus.data[0].閮ㄩ棬
+ , "HManagerID": checkStatus.data[0].HManagerID
+ , "HManagerName": checkStatus.data[0].涓荤
+ , "HWHID": checkStatus.data[0].涓昏〃浠撳簱ID == null ? 0 : checkStatus.data[0].涓昏〃浠撳簱ID
+ , "HWHName": checkStatus.data[0].涓昏〃浠撳簱
+ , "HEmpID": checkStatus.data[0].HEmpID
+ , "HEmpName": checkStatus.data[0].涓氬姟鍛�
+ , "HSupID": checkStatus.data[0].HSupID
+ , "HSupName": checkStatus.data[0].渚涘簲鍟�
+ //, "HSecManagerID": checkStatus.data[0].HSecManagerID
+ //, "HSecManagerName": checkStatus.data[0].楠屾敹鍛�
+ //, "HKeeperID": checkStatus.data[0].HKeeperID
+ //, "HKeeperName": checkStatus.data[0].淇濈鍛�
+ , "HCurID": checkStatus.data[0].HCurID
+ , "HCurName": checkStatus.data[0].甯佸埆
+ , "HExRate": checkStatus.data[0].姹囩巼
+ /*, "HAddress": data.浜よ揣鍦扮偣*/
+ , "HRemark": checkStatus.data[0].琛ㄥご澶囨敞
+ , "HInnerBillNo": checkStatus.data[0].鍐呴儴鍗曟嵁鍙�
+ });
+
//layer.alert("浣犲凡閫夋嫨" + checkStatus.data.length + "鏉℃暟鎹�");
//鑾峰彇鏀舵枡閫氱煡鍗曚唬鐮�
var ProcessNumber = [];
@@ -1726,10 +1700,10 @@
for (var i = 0; i < ProcessNumber.length; i++) {
option.data.push({
"HMaterID": checkStatus.data[j].HMaterID, "鐗╂枡浠g爜": checkStatus.data[j].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": checkStatus.data[j].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": checkStatus.data[j].瑙勬牸鍨嬪彿,
- "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅,
- "HQty": checkStatus.data[j].鏁伴噺-checkStatus.data[j].鍏宠仈鏁伴噺,"HQtyMust": checkStatus.data[j].搴旀敹鏁伴噺, "HPrice": checkStatus.data[j].鍗曚环,
- "HMoney": checkStatus.data[j].閲戦, "HTaxRate": checkStatus.data[j].绋庣巼, "HTaxMoney": checkStatus.data[j].绋庨,"HWHID": checkStatus.data[j].HWHID,
- "鏀舵枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱,"HSPID": checkStatus.data[j].HSPID,"浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О,"HSecUnitID": checkStatus.data[j].HSecUnitID,"杈呭姪鍗曚綅": checkStatus.data[j].杈呭姪鍗曚綅,
+ "HUnitID": checkStatus.data[j].HUnitID, "璁¢噺鍗曚綅": checkStatus.data[j].璁¢噺鍗曚綅,
+ "HQty": checkStatus.data[j].鏁伴噺 - checkStatus.data[j].鍏宠仈鏁伴噺, "HQtyMust": checkStatus.data[j].鏁伴噺 - checkStatus.data[j].鍏宠仈鏁伴噺, "HPrice": checkStatus.data[j].鍗曚环,
+ "HMoney": (checkStatus.data[j].鏁伴噺 - checkStatus.data[j].鍏宠仈鏁伴噺) * Number(checkStatus.data[j].鍗曚环), "HTaxRate": checkStatus.data[j].绋庣巼, "HTaxMoney": checkStatus.data[j].绋庨, "HWHID": checkStatus.data[j].HWHID,
+ "鍙戞枡浠撳簱": checkStatus.data[j].鏀舵枡浠撳簱, "HSPID": checkStatus.data[j].HSPID, "浠撲綅鍚嶇О": checkStatus.data[j].浠撲綅鍚嶇О, "HSecUnitID": checkStatus.data[j].HSecUnitID, "杈呭姪鍗曚綅": checkStatus.data[j].杈呭姪鍗曚綅,
"HSourceBillNo": checkStatus.data[j].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid
})
j++;
@@ -1742,7 +1716,7 @@
});
});
- //鍒ゆ柇鎵�閫夌潃涓庤〃鏍兼槸鍚︽湁閲嶅鏁版嵁
+ //鍒ゆ柇鎵�閫夌潃涓庤〃鏍兼槸鍚︽湁閲嶅鏁版嵁
function checkDuplicateData(data) {
const duplicates = [];
@@ -1815,8 +1789,8 @@
}
//#endregion
-
- //#region 鑾峰彇婧愬崟绫诲瀷
+
+ //#region 鑾峰彇婧愬崟绫诲瀷
function HSourceBillType() {
var HName = '閲囪喘閫�鏂欏崟';
//鑾峰彇鐧诲綍椤电粍缁囧垪
@@ -1840,11 +1814,216 @@
}
//#endregion
- //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢��鏂欓�氱煡鍗曟暟鎹�
+ //#region 涓嬫帹椤甸潰鍒濆鍖�-閫�鏂欓�氱煡鍗�
+ function setInit_PushBill_ByPOInStockBackBill() {
+ //鑾峰彇
+ var data = getUrlVars_JSON().data;
+ var dataArray = [];
+ for (var i = 0; i < data.length; i++) {
+ var temp = getPushSource_POInStockBackInit(data[i].hmainid, data[i].hsubid);
+ if (temp != "none") {
+ dataArray.push(temp);
+ } else {
+ return;
+ }
+ }
+
+
+ form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HMainSourceInterID": "0"
+ , "HMainSourceEntryID": "0"
+ , "HMainSourceBillNo": ""
+ , "HMainSourceBillType": $("#BillType").val()
+
+ , "HDeptID": dataArray[0].HDeptID
+ , "HDeptName": dataArray[0].閮ㄩ棬
+ , "HManagerID": dataArray[0].HManagerID
+ , "HManagerName": dataArray[0].涓荤
+ , "HWHID": dataArray[0].涓昏〃浠撳簱ID == null ? 0 : dataArray[0].涓昏〃浠撳簱ID
+ , "HWHName": dataArray[0].涓昏〃浠撳簱
+ , "HEmpID": dataArray[0].HEmpID
+ , "HEmpName": dataArray[0].涓氬姟鍛�
+ , "HSupID": dataArray[0].HSupID
+ , "HSupName": dataArray[0].渚涘簲鍟�
+ //, "HSecManagerID": dataArray[0].HSecManagerID
+ //, "HSecManagerName": dataArray[0].楠屾敹鍛�
+ //, "HKeeperID": dataArray[0].HKeeperID
+ //, "HKeeperName": dataArray[0].淇濈鍛�
+ , "HCurID": dataArray[0].HCurID
+ , "HCurName": dataArray[0].甯佸埆
+ , "HExRate": dataArray[0].姹囩巼
+ , "HAddress": data.浜よ揣鍦扮偣
+ , "HRemark": data.琛ㄥご澶囨敞
+ , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
+ });
+
+ //瀛愯〃 璧嬪��
+ var rowdata = [];
+ for (var i = 0; i < dataArray.length; i++) {
+ rowdata.push(
+ {
+ "HMaterID": dataArray[i].HMaterID
+ , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
+ , "HUnitID": dataArray[i].HUnitID
+ , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
+ , "HWHID": dataArray[i].HWHID
+ , "鍙戞枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
+ , "HSPID": dataArray[i].HSPID
+ , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
+ , "HSecUnitID": dataArray[i].HSecUnitID
+ , "杈呭姪鍗曚綅": dataArray[i].杈呭姪鍗曚綅
+ , "HQty": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
+ , "HQtyMust": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
+ , "HPrice": dealDoubleToFixed(dataArray[i].鍗曚环, 3)
+ , 'HDiscountRate': dataArray[i].鎶樻墸鐜� //
+ , 'HRelTaxPrice': "0"
+ , "HTaxRate": dataArray[i].绋庣巼
+ , 'HTaxMoney': dataArray[i].绋庨 //
+ , "HMoney": dealDoubleToFixed(dataArray[i].閲戦, 2)
+ , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
+
+ , "HSourceInterID": dataArray[i].hmainid
+ , "HSourceEntryID": dataArray[i].hsubid
+ , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
+ , "HSourceBillType": dataArray[i].HBillType
+ , "HRelationQty": "0"
+ , "HRelationMoney": "0"
+
+ , 'HPOOrderInterID': "0"
+ , 'HPOOrderEntryID': "0"
+ , 'HPOOrderBillNo': ""
+
+ , 'HSeOrderTaxPrice': dealDoubleToFixed(dataArray[i].鍚◣鍗曚环, 3)
+ , "HSeOrderInterID": dataArray[i].hmainid
+ , "HSeOrderEntryID": dataArray[i].hsubid
+ , "HSeOrderBillNo": dataArray[i].鍗曟嵁鍙�
+ }
+ );
+ }
+ option.data = rowdata;
+ table.render(option);
+ }
+ //#endregion
+
+ //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢��鏂欓�氱煡鍗曟暟鎹�
function getPushSource_POInStockBackInit(HSourceInterID, HSourceEntryID) {
var res = "none";
$.ajax({
url: GetWEBURL() + "/Cg_POInStockBackBill/loadCg_POInStockBackBill_Push",
+ async: false,
+ type: "GET",
+ data: {
+ "HInterID": HSourceInterID
+ , "HSubID": HSourceEntryID
+ },
+ success: function (result) {
+ if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ res = result.data[0];
+ } else {
+ res = result.data;
+ //layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ }
+ }, error: function () {
+ res = "none";
+ layer.alert("鍙戠敓閿欒!", { icon: 5 });
+ }
+ });
+ return res;
+ }
+ //#endregion
+
+ //#region 涓嬫帹椤甸潰鍒濆鍖�-閲囪喘鍏ュ簱鍗�
+ function setInit_PushBill_ByPOStockInBillInit() {
+ //鑾峰彇
+ var data = getUrlVars_JSON().data;
+ var dataArray = [];
+ for (var i = 0; i < data.length; i++) {
+ var temp = getPushSource_POStockInBillInit(data[i].hmainid, data[i].hsubid);
+ if (temp != "none") {
+ dataArray.push(temp);
+ } else {
+ return;
+ }
+ }
+
+
+ form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HInnerBillNo": dataArray[0].鍐呴儴鍗曟嵁鍙�
+ , "HSupID": dataArray[0].HSupID
+ , "HSupName": dataArray[0].渚涘簲鍟�
+ , "HEmpID": dataArray[0].HEmpID
+ , "HEmpName": dataArray[0].涓氬姟鍛�
+ , "HWHID": dataArray[0].涓昏〃浠撳簱ID
+ , "HWHName": dataArray[0].涓昏〃浠撳簱
+ //, "HSecManagerID": data.HSecManagerID
+ //, "HSecManagerName": data.楠屾敹鍛�
+ , "HKeeperID": dataArray[0].HKeeperID
+ , "HKeeperName": dataArray[0].淇濈鍛�
+ , "HDeptName": dataArray[0].閮ㄩ棬
+ , "HDeptID": dataArray[0].HDeptID
+ //, "HSourceBillType": data.婧愬崟绫诲瀷
+ , "HManagerID": dataArray[0].HManagerID
+ , "HManagerName": dataArray[0].璐熻矗浜�
+ , "HExRate": dataArray[0].姹囩巼
+ //, "Box2": ""
+ //, "HExplanation": data.鎽樿
+ //, "HRemark": data.琛ㄥご澶囨敞
+
+ , "HSourceBillType": HSouceBillType
+ });
+
+ //瀛愯〃 璧嬪��
+ var rowdata = [];
+ for (var i = 0; i < dataArray.length; i++) {
+ rowdata.push(
+ {
+ "HMaterID": dataArray[i].HMaterID
+ , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
+ , "HUnitID": dataArray[i].HUnitID
+ , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
+
+
+ , "HWHID": dataArray[i].HWHID
+ , "鍙戞枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
+ , "HSPID": dataArray[i].HSPID
+ , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
+ //, "HSecUnitID": dataArray[i].HSecUnitID
+ //, "杈呭姪鍗曚綅": dataArray[i].杈呭姪鍗曚綅
+
+
+ , "HQty": dealDoubleToFixed(dataArray[i].瀹炴敹鏁伴噺, 1) - dealDoubleToFixed(dataArray[i].鍏宠仈鏁伴噺, 1)
+ , "HQtyMust": dealDoubleToFixed(dataArray[i].瀹炴敹鏁伴噺, 1) - dealDoubleToFixed(dataArray[i].鍏宠仈鏁伴噺, 1)
+
+
+ , "HPrice": dealDoubleToFixed(dataArray[i].鍗曚环, 3)
+ , "HMoney": dealDoubleToFixed(dataArray[i].閲戦, 2)
+ , "HOrderPrice": dataArray[i].閲囪喘閲戦
+ , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
+ , "HBatchNo": dataArray[i].鎵规
+
+ , "HSourceInterID": dataArray[i].hmainid
+ , "HSourceEntryID": dataArray[i].hsubid
+ , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
+ , "HSourceBillType": dataArray[i].HBillType
+ , "HRelationQty": "0"
+ , "HRelationMoney": "0"
+ }
+ );
+ }
+ option.data = rowdata;
+ table.render(option);
+ }
+ //#endregion
+
+ //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢噰璐叆搴撳崟鏁版嵁
+ function getPushSource_POStockInBillInit(HSourceInterID, HSourceEntryID) {
+ var res = "none";
+ $.ajax({
+ url: GetWEBURL() + "/Kf_POStockInBill/loadKf_POStockInBillEdit_Push",
async: false,
type: "GET",
data: {
@@ -2026,27 +2205,27 @@
}
- //鍙屽嚮杩斿洖鐗╂枡
- function GetGyMaterial(data) {
- OptionData = data
- }
- //鍙屽嚮杩斿洖璁¢噺鍗曚綅
- function GetGyUnit(data) {
- OptionData = data
- }
+ //鍙屽嚮杩斿洖鐗╂枡
+ function GetGyMaterial(data) {
+ OptionData = data
+ }
+ //鍙屽嚮杩斿洖璁¢噺鍗曚綅
+ function GetGyUnit(data) {
+ OptionData = data
+ }
- //鍙屽嚮杩斿洖鏀舵枡浠撳簱
- function GetGyWarehouse(data) {
- OptionData = data
- }
+ //鍙屽嚮杩斿洖鏀舵枡浠撳簱
+ function GetGyWarehouse(data) {
+ OptionData = data
+ }
//鍙屽嚮杩斿洖鏀舵枡浠撲綅
- function GetGyStockPlace(data) {
- OptionData = data
- }
+ function GetGyStockPlace(data) {
+ OptionData = data
+ }
- //#region 澶勭悊灏忔暟鏄剧ず浣嶆暟锛坉ata锛氶渶瑕佸鐞嗙殑鏁版嵁锛沶um锛氭暟鎹殑绫诲瀷(濡�1:鏁伴噺锛�2:閲戦锛�3:鍗曚环)锛�
+ //#region 澶勭悊灏忔暟鏄剧ず浣嶆暟锛坉ata锛氶渶瑕佸鐞嗙殑鏁版嵁锛沶um锛氭暟鎹殑绫诲瀷(濡�1:鏁伴噺锛�2:閲戦锛�3:鍗曚环)锛�
function dealDoubleToFixed(data, num) {
//鐢ㄤ簬璁剧疆灏忔暟浣嶆暟
var dotLength = 0;
@@ -2080,7 +2259,7 @@
}
}
}
- //#endregion
+ //#endregion
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1