From e63e2d1d2b0354896dc6aaea0e3a13cdb25f7eed Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 14 十月 2024 13:41:34 +0800
Subject: [PATCH] 添康到货确认模块只传单据id
---
WebTM/views/基础资料/基础资料/InventoryAnalysis.html | 110 +++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 90 insertions(+), 20 deletions(-)
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/InventoryAnalysis.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/InventoryAnalysis.html"
index 80fd5a0..b33319b 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/InventoryAnalysis.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/InventoryAnalysis.html"
@@ -9,6 +9,7 @@
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
<script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
@@ -45,6 +46,9 @@
</button>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch1" id="btnReSearch1">
閲嶇疆
+ </button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnDel" id="btnDel">
+ 鍒犻櫎
</button>
</div>
</div>
@@ -169,7 +173,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
// #region 鍏ㄥ眬鍙橀噺
var $ = layui.$
, admin = layui.admin
@@ -188,6 +192,7 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
//鏌ヨ鏉′欢
var sWhere = " HRealPotType=HBookPotType and HRealPot=HBookPot";
var option1 = [];
@@ -198,17 +203,17 @@
var option6 = [];
var option7 = [];
var col = [
- { type: 'checkbox', fixed: 'left' }
- , { field: 'HItemID', title: 'HItemID', width: 200,hide: true}
- , { field: 'HBarCode', title: '鍣ㄥ叿鏉$爜', width: 200 }
- , { field: 'HMouldNo', title: '鍣ㄥ叿缂栧彿', width: 200 }
- , { field: 'HStockCheck', title: '鐩樼偣鏂规', width: 200 }
- , { field: 'HRealPotType', title: '瀹為檯浣嶇疆绫诲瀷', width: 200 }
- , { field: 'HRealPot', title: '瀹為檯浣嶇疆', width: 200 }
- , { field: 'HBookPotType', title: '璐﹂潰浣嶇疆绫诲瀷', width: 200 }
- , { field: 'HBookPot', title: '璐﹂潰浣嶇疆', width: 200 }
- , { field: 'HOWNERName', title: '鐩樼偣缁勭粐', width: 200 }
- , { field: 'HMakeDate', title: '鐩樼偣鏃ユ湡', width: 200, templet: "<div>{{d.HMakeDate ==null ?'':layui.util.toDateString(d.HMakeDate, 'yyyy-MM-dd')}}</div>" }
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�' }
+ , { field: 'HItemID', title: 'HItemID', width: 200, hide: true, sort: true}
+ , { field: 'HBarCode', title: '鍣ㄥ叿鏉$爜', width: 200, sort: true}
+ , { field: 'HMouldNo', title: '鍣ㄥ叿缂栧彿', width: 200, sort: true}
+ , { field: 'HStockCheck', title: '鐩樼偣鏂规', width: 200, sort: true}
+ , { field: 'HRealPotType', title: '瀹為檯浣嶇疆绫诲瀷', width: 200, sort: true}
+ , { field: 'HRealPot', title: '瀹為檯浣嶇疆', width: 200, sort: true}
+ , { field: 'HBookPotType', title: '璐﹂潰浣嶇疆绫诲瀷', width: 200, sort: true}
+ , { field: 'HBookPot', title: '璐﹂潰浣嶇疆', width: 200, sort: true}
+ , { field: 'HOWNERName', title: '鐩樼偣缁勭粐', width: 200, sort: true}
+ , { field: 'HMakeDate', title: '鐩樼偣鏃ユ湡', width: 200, templet: "<div>{{d.HMakeDate ==null ?'':layui.util.toDateString(d.HMakeDate, 'yyyy-MM-dd')}}</div>", sort: true }
];
//#endregion
@@ -393,12 +398,45 @@
option1.data = data1.list[0];
table1.render(option1);
} else {
- layer.alert(result.code + result.Message, { icon: 5 });
+ layer.alert(data1.code + data1.Message, { icon: 5 });
}
}, error: function () {
layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
}
});
+ });
+
+ //鍒犻櫎鎸夐挳
+ form.on('submit(btnDel)', function (data) {
+ var HItemID = $("#HItemID").val();//鐩樼偣
+ if (HItemID) {
+ layer.confirm('鏄惁鍒犻櫎鍏朵粬鏃犵敤鐨勫簱瀛橈紵', {
+ icon: 3,
+ title: "鎻愮ず",
+ btn: ['纭畾', '鍙栨秷'],
+ btn1: function (index) {
+ $.ajax({
+ url: GetWEBURL() + 'Gy_StockCheckItemBill/StockItemSubDel',
+ type: "GET",
+ anysc: false,
+ data: { "sID": HItemID },
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.msg(data1.Message, { icon: 1 });
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ }
+ })
+ }
+ })
+ }
+ else {
+ layer.msg("璇烽�夋嫨鐩樼偣鏂规");
+ return;
+ }
});
//鐩樼偣鏂规寮圭獥
@@ -496,7 +534,7 @@
//鍒濆鍖栬〃鏍�(閫�搴�)
set_InitGrid7();
//鍒濆鏌ユ甯搁〉绛�
- zc_Display();
+ //zc_Display();
}
//鍒濆鍖栬〃鏍�(姝e父)
@@ -507,10 +545,14 @@
, toolbar: '#toolbarDemo1'
, height: '550'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
, cols: [col]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
};
option1.data = [];
table1.render(option1);
@@ -525,6 +567,7 @@
, toolbar: '#toolbarDemo2'
, height: '550'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -543,6 +586,7 @@
, toolbar: '#toolbarDemo3'
, height: '550'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -561,6 +605,7 @@
, toolbar: '#toolbarDemo4'
, height: '550'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -579,6 +624,7 @@
, toolbar: '#toolbarDemo5'
, height: '550'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -597,6 +643,7 @@
, toolbar: '#toolbarDemo6'
, height: '550'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -615,6 +662,7 @@
, toolbar: '#toolbarDemo7'
, height: '550'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
@@ -714,7 +762,7 @@
}
//鐩樼泩鏌ヨ
function py_Display() {
- var sWhere = "isnull(HBookPot,'''')='''' and isnull(HRealPot,'''')!=''''";
+ var sWhere = "py";
var HItemID = $("#HItemID").val();//鍗曟嵁绫诲瀷
//杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
@@ -780,13 +828,35 @@
}
//#endregion
+ //#region 鐐瑰嚮琛岄�変腑楂樹寒
+ table.on('row(mainTable)', function (obj) {
+ //閫変腑琛屾敼鍙橀鑹�
+ var flag = !obj.tr.find(':checkbox:first').prop('checked');
+ obj.tr.find(':checkbox').prop('checked', flag);
+ if (flag) {
+ obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ } else {
+ obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+ }
+ //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+ layui.each(table.cache.mainTable, function (i, l) {
+ if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+ l.LAY_CHECKED = flag;
+ }
+ });
+ })
+ //#endregion
+
+
//#region 瀹℃牳
//瀹℃牳 璋冩嫧
function set_CheckBill2() {
var checkStatus = table.checkStatus('mainTable2')
, data = checkStatus.data;
if (checkStatus.data.length >= 1) {
- var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"];
+ var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"] + ";" + $("#HName").val();
$('#btn-Check2').addClass("layui-btn-disabled").attr("disabled", true);
$.ajax({
type: "POST",
@@ -821,7 +891,7 @@
var checkStatus = table.checkStatus('mainTable3')
, data = checkStatus.data;
if (checkStatus.data.length >= 1) {
- var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"];
+ var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"] + ";" + $("#HName").val();
$('#btn-Check3').addClass("layui-btn-disabled").attr("disabled", true);
$.ajax({
type: "POST",
@@ -855,7 +925,7 @@
var checkStatus = table.checkStatus('mainTable4')
, data = checkStatus.data;
if (checkStatus.data.length >= 1) {
- var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"];
+ var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"] + ";" + $("#HName").val();
$('#btn-Check4').addClass("layui-btn-disabled").attr("disabled", true);
$.ajax({
type: "POST",
@@ -889,7 +959,7 @@
var checkStatus = table.checkStatus('mainTable5')
, data = checkStatus.data;
if (checkStatus.data.length >= 1) {
- var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"];
+ var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"] + ";" + $("#HName").val();
$('#btn-Check5').addClass("layui-btn-disabled").attr("disabled", true);
$.ajax({
type: "POST",
@@ -957,7 +1027,7 @@
var checkStatus = table.checkStatus('mainTable7')
, data = checkStatus.data;
if (checkStatus.data.length >= 1) {
- var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"];
+ var sSubStr = JSON.stringify(data) + ";" + sessionStorage["HUserName"] + ";" + sessionStorage["OrganizationID"] + ";" + $("#HName").val();
$('#btn-Check7').addClass("layui-btn-disabled").attr("disabled", true);
$.ajax({
type: "POST",
--
Gitblit v1.9.1