From e17a462dec6be60e6589309ac2c18b70a7cf4316 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期四, 30 十二月 2021 20:51:39 +0800
Subject: [PATCH] 盘点记录
---
WebTM/views/验收入库/其他入库/Kf_OtherInBillList.html | 305 ++++++++++++++++++++++++++++++--------------------
1 files changed, 180 insertions(+), 125 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBillList.html"
index ad50ea4..f1aa3fb 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBillList.html"
@@ -60,26 +60,46 @@
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
<div class="layui-colla-content">
<div class="layui-inline">
- <div class="layui-inline">
- <span>鍏朵粬鏉′欢></span>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">瀹㈡埛</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HCusID" id="HCusID" style="width:190px;">
- </div>
- </div>
- <div class="layui-inline">
<label class="layui-form-label">閮ㄩ棬</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="HDeptID" id="HDeptID" style="width:190px;">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">涓荤</label>
+ <label class="layui-form-label">鐗╂枡浠g爜</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HMangerID" id="HMangerID" style="width:190px;">
+ <input type="text" class="layui-input" name="MaterialCode" id="MaterialCode" style="width:190px;">
+ </div>
+ </div>
+ <!--<hr />-->
+ <div class="layui-inline">
+ <label class="layui-form-label">鐗╂枡鍚嶇О</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="MaterialName" id="MaterialName" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="SpecificationModel" id="SpecificationModel" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">婧愬崟鍗曞彿</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HSourceBillNo" id="HSourceBillNo" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">浠撳簱</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="Warehouse" id="Warehouse" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鍒跺崟浜�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="Hmaker" id="Hmaker" style="width:190px;">
</div>
</div>
</div>
@@ -93,6 +113,10 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
</div>
</script>
</form>
@@ -110,6 +134,8 @@
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
}).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+
+ //#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -123,111 +149,27 @@
var sWhere = "";
var option = [];
- //鍒濆鍖栫晫闈�
- set_ClearBill();
-
//#endregion
- //#region 閲嶇疆鎸夐挳
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ // 閲嶇疆鎸夐挳
form.on('submit(btnReSearch)', function (data) {
//娓呯┖杩囨护鏉′欢
set_ClearQuery();
});
- //#endregion
- //#region 鏌ヨ鎸夐挳
+ // 鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {
get_FastQuery(table, option);
});
- //#endregion
- //#region 鍒濆鍖栫晫闈�
- function set_ClearBill() {
- //鍒濆鍖栬〃鏍�
- set_InitGrid();
- //鏌ヨ
- get_Display(sWhere);
- }
- //#endregion
- //#region 鍒濆鍖栬〃鏍兼柟娉�
- $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
- $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
- function set_InitGrid() {
- option = {
- elem: '#mainTable'
- , toolbar: '#toolbarDemo'
- , height: 'full-50'
- , page: true
- , cellMinWidth: 90
- , cols: [[
- { type: 'checkbox', fixed: 'left' }
- ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
- ,{ field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', hide: true }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
- , { field: '绾㈣摑鍗曟爣璁�', title: '绾㈣摑鍗曟爣璁�', width: 160 }
- , { field: 'HCusID', title: 'HCusID', width: 160, hide: true }
- , { field: '瀹㈡埛', title: '瀹㈡埛', width: 200 }
- , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 200, hide: true }
- , { field: '楠屾敹鍛�', title: '楠屾敹鍛�', width: 200 }
- , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true }
- , { field: '淇濈鍛�', title: '淇濈鍛�', width: 200 }
- , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
- , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 160 }
- , { field: '浠撳簱', title: '浠撳簱', width: 160 }
- , { field: 'hsubid', title: 'hsubid', width: 160, hide: true }
- , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200 }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 200 }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 200 }
- , { field: '鎵规', title: '鎵规', width: 200 }
- , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200 }
- , { field: '搴旀敹鏁伴噺', title: '搴旀敹鏁伴噺', width: 115 }
- , { field: '瀹炴敹鏁伴噺', title: '瀹炴敹鏁伴噺', width: 115 }
- , { field: '鍑哄簱鏁伴噺', title: '鍑哄簱鏁伴噺', width: 200 }
- , { field: '鍗曚环', title: '鍗曚环', width: 200 }
- , { field: '閲戦', title: '閲戦', width: 115 }
- , { field: 'hwhid', title: 'hwhid', width: 200, hide: true }
- , { field: '鏀舵枡浠撳簱浠g爜', title: '鏀舵枡浠撳簱浠g爜', width: 200 }
- , { field: '鏀舵枡浠撳簱', title: '鏀舵枡浠撳簱', width: 200 }
- , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 125 }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 125 }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '淇敼浜�', title: '淇敼浜�', width: 125 }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 125 }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 125 }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-
- ]]
- };
- }
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- function get_Display(sWhere) {
- var ajaxLoad = layer.load();
- $.ajax({
- url: GetWEBURL() + '/Kf_OtherInBill/GetOtherInBill',
- type: "GET",
- data: { "sWhere": sWhere },
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(ajaxLoad);
- } else {
- layer.close(ajaxLoad);
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(ajaxLoad);
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
- });
- }
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus(obj.config.id);
@@ -326,15 +268,113 @@
};
});
+ //#endregion
- //#region 蹇�熻繃婊�
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ //鏌ヨ
+ get_Display(sWhere);
+ //鍒濆鍖栨棩鏈�
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ }
+
+ // 鍒濆鍖栬〃鏍兼柟娉�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , page: true
+ , cellMinWidth: 90
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
+ ,{ field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', hide: true }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
+ , { field: '绾㈣摑鍗曟爣璁�', title: '绾㈣摑鍗曟爣璁�', width: 160 }
+ , { field: 'HCusID', title: 'HCusID', width: 160, hide: true }
+ , { field: '瀹㈡埛', title: '瀹㈡埛', width: 200 }
+ , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 200, hide: true }
+ , { field: '楠屾敹鍛�', title: '楠屾敹鍛�', width: 200 }
+ , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true }
+ , { field: '淇濈鍛�', title: '淇濈鍛�', width: 200 }
+ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+ , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 160 }
+ , { field: '浠撳簱', title: '浠撳簱', width: 160 }
+ , { field: 'hsubid', title: 'hsubid', width: 160, hide: true }
+ , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200 }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 200 }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 200 }
+ , { field: '鎵规', title: '鎵规', width: 200 }
+ , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200 }
+ , { field: '搴旀敹鏁伴噺', title: '搴旀敹鏁伴噺', width: 115 }
+ , { field: '瀹炴敹鏁伴噺', title: '瀹炴敹鏁伴噺', width: 115 }
+ , { field: '鍑哄簱鏁伴噺', title: '鍑哄簱鏁伴噺', width: 200 }
+ , { field: '鍗曚环', title: '鍗曚环', width: 200 }
+ , { field: '閲戦', title: '閲戦', width: 115 }
+ , { field: 'hwhid', title: 'hwhid', width: 200, hide: true }
+ , { field: '鏀舵枡浠撳簱浠g爜', title: '鏀舵枡浠撳簱浠g爜', width: 200 }
+ , { field: '鏀舵枡浠撳簱', title: '鏀舵枡浠撳簱', width: 200 }
+ , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200 }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 125 }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 125 }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '淇敼浜�', title: '淇敼浜�', width: 125 }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 125 }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 125 }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+
+ ]]
+ };
+ }
+
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+ function get_Display(sWhere) {
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Kf_OtherInBill/GetOtherInBill',
+ type: "GET",
+ data: { "sWhere": sWhere },
+ success: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ // 蹇�熻繃婊�
function get_FastQuery(table, option) {
var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
- var HCusID = $("#HCusID").val();
- var HDeptID = $("#HDeptID").val();
- var HMangerID = $("#HMangerID").val();
+ var HDeptID = $("#HDeptID").val();//閮ㄩ棬
+ var MaterialCode = $("#MaterialCode").val();//鐗╂枡浠g爜
+ var MaterialName = $("#MaterialName").val();//鐗╂枡鍚嶇О
+ var SpecificationModel = $("#SpecificationModel").val();//瑙勬牸鍨嬪彿
+ var HSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍗曞彿
+ var Warehouse = $("#Warehouse").val();//浠撳簱
+ var Hmaker = $("#Hmaker").val();//鍒跺崟浜�
+
if (HDate) {
sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
}
@@ -344,36 +384,51 @@
if (HBillNo) {
sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
}
- if (HCusID) {
- sWhere += " and 瀹㈡埛 like '%" + HCusID + "%'";
- }
if (HDeptID) {
sWhere += " and 閮ㄩ棬 like '%" + HDeptID + "%'";
}
- if (HMangerID) {
- sWhere += " and 涓荤 like '%" + HMangerID + "%'";
+ if (MaterialCode) {
+ sWhere += " and 鐗╂枡浠g爜 like '%" + MaterialCode + "%'";
}
+ if (MaterialName) {
+ sWhere += " and 鐗╂枡鍚嶇О like '%" + MaterialName + "%'";
+ }
+ if (SpecificationModel) {
+ sWhere += " and 瑙勬牸鍨嬪彿 like '%" + SpecificationModel + "%'";
+ }
+ if (HSourceBillNo) {
+ sWhere += " and 婧愬崟鍗曞彿 like '%" + HSourceBillNo + "%'";
+ }
+ if (Warehouse) {
+ sWhere += " and 鍙戣揣浠撳簱 like '%" + Warehouse + "%'";
+ }
+ if (Hmaker) {
+ sWhere += " and 鍒跺崟浜� like '%" + Hmaker + "%'";
+ }
+
get_Display(sWhere);
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
- //#endregion
- //#region 閲嶇疆杩囨护鏉′欢
+ // 閲嶇疆杩囨护鏉′欢
function set_ClearQuery() {
$("#HDate").val("");//寮�濮嬫棩鏈�
$("#HDate1").val("");//缁撴潫鏃ユ湡
- $("#HBillNo").val("");//
- $("#HCusID").val("");
- $("#HDeptID").val("");
- $("#HMangerID").val("");
+ $("#HBillNo").val("");//鍗曟嵁鍙�
+ $("#HDeptID").val();//閮ㄩ棬
+ $("#MaterialCode").val();//鐗╂枡浠g爜
+ $("#MaterialName").val();//鐗╂枡鍚嶇О
+ $("#SpecificationModel").val();//瑙勬牸鍨嬪彿
+ $("#HSourceBillNo").val();//婧愬崟鍗曞彿
+ $("#Warehouse").val();//浠撳簱
+ $("#Hmaker").val();//鍒跺崟浜�
sWhere = "";
}
- //#endregion
-
- //#region 鍒锋柊
+ // 鍒锋柊
function get_Refresh() {
set_ClearQuery();
get_Display(sWhere);
}
+
//#endregion
--
Gitblit v1.9.1