From 5fb01f2146eb463829a6f8ceec1a3b411e67314f Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期五, 24 十二月 2021 14:14:10 +0800
Subject: [PATCH] nothing
---
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html | 264 +++++++++++++++++++++++++++++++---------------------
1 files changed, 156 insertions(+), 108 deletions(-)
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
index 69d837d..c93c925 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
@@ -75,10 +75,12 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鍏抽棴鐘舵��</label>
+ <label class="layui-form-label">鍗曟嵁鐘舵��</label>
<div class="layui-input-block">
<select id="HClStatus" name="HClStatus" lay-filter="">
<option value="">鍏ㄩ儴</option>
+ <option value="瀹℃牳">瀹℃牳</option>
+ <option value="瀹℃牳">鍙嶅鏍�</option>
<option value="鏈叧闂�" selected="">鏈叧闂�</option>
<option value="宸插叧闂�">宸插叧闂�</option>
</select>
@@ -128,7 +130,7 @@
-</form>
+ </form>
<!--</div>-->
</div>
@@ -138,8 +140,9 @@
<div class="layui-btn-container">
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></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-confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>-->
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>-->
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-changebg"><i class="layui-icon layui-icon-form"></i>鍙樻洿</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃閫佽揣鍗�</button>
@@ -151,8 +154,8 @@
</div>
</div>
- </div>
</div>
+ </div>
<!--<script src="../../layuiadmin/layui/lay/modules/mobile/jquery-3.3.1.min.js"></script>-->
<script src="../../layuiadmin/layui/layui.js"></script>
<script src="../CreateControl.js"></script>
@@ -214,12 +217,12 @@
index: 'lib/index' //涓诲叆鍙fā鍧�
}).use(['index', 'form', 'laydate', 'code', 'table', 'element', 'layer'], function () {
var $ = layui.$
- , admin = layui.admin
- , layer = layui.layer
- , laydate = layui.laydate
- , table = layui.table
- , form = layui.form
- , element = layui.element;
+ , admin = layui.admin
+ , layer = layui.layer
+ , laydate = layui.laydate
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element;
//甯歌鐢ㄦ硶
laydate.render({
elem: '#HDate1'
@@ -240,51 +243,51 @@
, toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘
, defaultToolbar: ['filter', 'exports', 'print']
// , where: { msg: "", NowPage: 1, OnePage: 10 }
- , cellMinWidth: 100
- , cols: [[
- { checkbox: true, fixed: true }
-
- , { field: 'sorderid', title: '搴忓彿', width: 80, fixed: true }
- , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
- , { field: 'hsubid', title: 'hsubid', sort: true, fixed: true, hide: true }
- , { field: '鐘舵��', title: '鐘舵��', width: 100, sort: true, fixed: true }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 180, sort: true, fixed: true }
- , { field: '閫佽揣鍗曞彿', title: '閫佽揣鍗曞彿', width: 180, sort: true, fixed: true }
- , { field: '鐗╂祦鍗曞彿', title: '鐗╂祦鍗曞彿', width: 180, sort: true, fixed: true }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 180, sort: true }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 180, sort: true }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 180, sort: true }
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true }
- , { field: '鏁伴噺', title: '璁㈣揣鏁伴噺', width: 100, sort: true }
- , { field: '鏈敓鎴愭潯鐮佹暟閲�', title: '鏈敓鎴愭潯鐮佹暟閲�', width: 100, sort: true }
- , { field: '鍚堟牸鏁伴噺', title: '鍚堟牸鏁伴噺', width: 100, sort: true }
- , { field: '涓嶅悎鏍兼暟閲�', title: '涓嶅悎鏍兼暟閲�', width: 100, sort: true }
- , { field: '鍚◣鍗曚环', title: '鍚◣鍗曚环', width: 100, sort: true }
- , { field: '閲戦', title: '閲戦', width: 100, sort: true }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 150, sort: true }
- , { field: '鎵规', title: '鎵规', width: 150, sort: true }
- , { field: '鐢熶骇鏃ユ湡', title: '鐢熶骇鏃ユ湡', width: 150, sort: true }
- , { field: '棰勮鍒拌揣鏃ユ湡', title: '棰勮鍒拌揣鏃ユ湡', width: 150, sort: true }
- , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓籌D', width: 100, hide: true }
- , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛怚D', width: 100, hide: true }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 180 }
- , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 80 }
- , { field: '閲囪喘璁㈠崟鍙�', title: '閲囪喘璁㈠崟鍙�', width: 180, sort: true, hide: true }
- , { field: '濮斿璁㈠崟鍙�', title: '濮斿璁㈠崟鍙�', width: 180, sort: true, hide: true }
- , { field: '鍏抽棴鐘舵��', title: '鍏抽棴鐘舵��', sort: true }
- , { field: '鍙樻洿鐘舵��', title: '鍙樻洿鐘舵��', sort: true }
- , { field: '鏀舵枡缁勭粐', title: '鏀舵枡缁勭粐', sort: true }
- , { field: '閲囪喘缁勭粐', title: '閲囪喘缁勭粐', sort: true }
- , { field: '闇�姹傜粍缁�', title: '闇�姹傜粍缁�', sort: true }
- ]]
- , page: true //鏄惁鏄剧ず鍒嗛〉
- , limits: [10, 20, 50, 100]
- , limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+ , cellMinWidth: 100
+ , cols: [[
+ { checkbox: true/*, fixed: true*/ }
+
+ , { field: 'sorderid', title: '搴忓彿', width: 80/*, fixed: true*/ }
+ , { field: 'hmainid', title: 'hmainid', sort: true/*, fixed: true*/, hide: true }
+ , { field: 'hsubid', title: 'hsubid', sort: true/*, fixed: true*/, hide: true }
+ , { field: '鐘舵��', title: '鐘舵��', width: 100, sort: true/*, fixed: true*/ }
+ , { field: '鍗曟嵁鐘舵��', title: '鍗曟嵁鐘舵��', sort: true/*, fixed: true*/ }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 180, sort: true/*, fixed: true*/ }
+ , { field: '閫佽揣鍗曞彿', title: '閫佽揣鍗曞彿', width: 180, sort: true/*, fixed: true*/ }
+ , { field: '鐗╂祦鍗曞彿', title: '鐗╂祦鍗曞彿', width: 180, sort: true/*, fixed: true*/ }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 180, sort: true }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 180, sort: true }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 180, sort: true }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true }
+ , { field: '鏁伴噺', title: '璁㈣揣鏁伴噺', width: 100, sort: true }
+ , { field: '鏈敓鎴愭潯鐮佹暟閲�', title: '鏈敓鎴愭潯鐮佹暟閲�', width: 100, sort: true }
+ , { field: '鍚堟牸鏁伴噺', title: '鍚堟牸鏁伴噺', width: 100, sort: true }
+ , { field: '涓嶅悎鏍兼暟閲�', title: '涓嶅悎鏍兼暟閲�', width: 100, sort: true }
+ , { field: '鍚◣鍗曚环', title: '鍚◣鍗曚环', width: 100, sort: true }
+ , { field: '閲戦', title: '閲戦', width: 100, sort: true }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 150, sort: true }
+ , { field: '鎵规', title: '鎵规', width: 150, sort: true }
+ , { field: '鐢熶骇鏃ユ湡', title: '鐢熶骇鏃ユ湡', width: 150, sort: true }
+ , { field: '棰勮鍒拌揣鏃ユ湡', title: '棰勮鍒拌揣鏃ユ湡', width: 150, sort: true }
+ , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓籌D', width: 100, hide: true }
+ , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛怚D', width: 100, hide: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 180 }
+ , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 80 }
+ , { field: '閲囪喘璁㈠崟鍙�', title: '閲囪喘璁㈠崟鍙�', width: 180, sort: true, hide: true }
+ , { field: '濮斿璁㈠崟鍙�', title: '濮斿璁㈠崟鍙�', width: 180, sort: true, hide: true }
+ , { field: '鍙樻洿鐘舵��', title: '鍙樻洿鐘舵��', sort: true }
+ , { field: '鏀舵枡缁勭粐', title: '鏀舵枡缁勭粐', sort: true }
+ , { field: '閲囪喘缁勭粐', title: '閲囪喘缁勭粐', sort: true }
+ , { field: '闇�姹傜粍缁�', title: '闇�姹傜粍缁�', sort: true }
+ ]]
+ , page: true //鏄惁鏄剧ず鍒嗛〉
+ , limits: [10, 20, 50, 100]
+ , limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
//, height: 500
- , done: function (res, curr, count) {
- _cur_page = curr;
- layer.closeAll("loading");
- }
+ , done: function (res, curr, count) {
+ _cur_page = curr;
+ layer.closeAll("loading");
+ }
});
@@ -296,21 +299,59 @@
var data = checkStatus.data;
layer.alert(JSON.stringify(data));
break;
- //case 'getCheckLength':
- // var data = checkStatus.data;
- // layer.msg('閫変腑浜嗭細' + data.length + ' 涓�');
- // break;
- //case 'isAll':
- // layer.msg(checkStatus.isAll ? '鍏ㄩ��' : '鏈叏閫�');
- // break;
+ //case 'getCheckLength':
+ // var data = checkStatus.data;
+ // layer.msg('閫変腑浜嗭細' + data.length + ' 涓�');
+ // break;
+ //case 'isAll':
+ // layer.msg(checkStatus.isAll ? '鍏ㄩ��' : '鏈叏閫�');
+ // break;
+ //瀹℃牳
+ case 'btn-Audit':
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ var InterID = "";
+ if (checkStatus.data.length > 0) {
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ InterID += data[i].hmainid.toString() + ",";
+ }
+ InterID = InterID.substring(0, InterID.length - 1);
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ // var WEBURL = ""; //绔犵传鏌旀湰鍦伴厤缃�
+ //url: "http://localhost:8082/LuBaoAPI//AuditPOInStockBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ url: GetWEBURL() + "/AuditPOInStockBill",
+ data: { "HInterID": InterID, "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);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
- //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨鏁版嵁锛�');
+ }
+ //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
case 'btn-reload':
_cur_page = $(".layui-laypage-em").next().html();
RoadHBillNo(sql);
// });
break;
-
+
case 'btn-details':
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
@@ -344,19 +385,29 @@
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: '../../../src/views/SRM/SRM_POInStockBill.html?linterid=' + linterid +'&type =changebg'
+ , content: '../../../src/views/SRM/SRM_POInStockBill.html?linterid=' + linterid + '&type =changebg'
, resize: false
, cancel: function () {
//$(".layui-btn").removeClass("layui-btn-disabled");
}
})
break;
-
+
case 'btn-print':
var checkStatus = table.checkStatus('mainTable')
- , data = checkStatus.data;
+ , data = checkStatus.data;
+ if (data.length == 0) {
+ layer.msg("璇烽�夋嫨鏁版嵁", { icon: 5 });
+ return;
+ }
+ for (var i = 0; i < data.length; i++) {
+ if (data[i].鍗曟嵁鐘舵�� != "瀹℃牳") {
+ layer.msg("閫変腑琛屾湭瀹℃牳", { icon: 5 });
+ return;
+ }
+ }
layer.open({
- type: 2
+ type: 2
, area: ['50%', '50%']
, title: '鎵撳嵃妯$増閫夋嫨'
, shade: 0.6 //閬僵閫忔槑搴�
@@ -372,30 +423,29 @@
break;
case 'btn-generate':
var checkStatus = table.checkStatus('mainTable')
- , data = checkStatus.data;
+ , data = checkStatus.data;
if (data[0].鏈敓鎴愭潯鐮佹暟閲� <= 0) {
layer.msg("閫変腑琛屽凡鐢熸垚鏉$爜锛�", { icon: 5 });
}
- else
- {
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '鏉$爜鐢熸垚'
- , shade: 0.6 //閬僵閫忔槑搴�
- , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
- , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../views/SRM/SRM_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hsubid, 'yes']
- , resize: false
- , cancel: function () {
- $(".layui-btn").removeClass("layui-btn-disabled");
- }
- })
+ else {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鏉$爜鐢熸垚'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../views/SRM/SRM_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hsubid, 'yes']
+ , resize: false
+ , cancel: function () {
+ $(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
}
break;
case 'btn-exit':
//var index = parent.layer.getFrameIndex(window.name);
- //element.tabDelete('layadmin-layout-tabs', this);
+ //element.tabDelete('layadmin-layout-tabs', this);
parent.layui.admin.events.closeThisTabs();
//parent.layer.close(index);
break;
@@ -409,7 +459,7 @@
where = sqlWhere;
$.ajax({
type: "get",
- url: GetWEBURL()+"/GetPOInStockBill",
+ url: GetWEBURL() + "/GetPOInStockBill",
async: true,
data: { "HSupNo": sessionStorage["HUserName"], "sqlWhere": sqlWhere },
success: function (result) {
@@ -435,12 +485,10 @@
form.on('submit(f_Query)', function (data) {//鏌ヨ
var sqlWhere = " and 1=1 ";
if ($("#HStatus").val() != "")
- if ($("#HStatus").val() == "鏈敓鎴愭潯鐮�")
- {
+ if ($("#HStatus").val() == "鏈敓鎴愭潯鐮�") {
sqlWhere += " and 鏈敓鎴愭潯鐮佹暟閲� > 0";
}
- else
- {
+ else {
sqlWhere += " and 鐘舵�� like ^^%" + $("#HStatus").val() + "%^^";
}
@@ -455,7 +503,7 @@
if ($("#HModel").val() != "")
sqlWhere += " and 瑙勬牸鍨嬪彿 like ^^%" + $("#HModel").val() + "%^^";
if ($("#HClStatus").val() != "")
- sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^";
+ sqlWhere += " and 鍗曟嵁鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^";
if ($("#HPURCHASEORGID").val() != "")
sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
if ($("#HDate1").val() != "") {
@@ -464,7 +512,7 @@
if ($("#HDate2").val() != "") {
sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HDate2").val() + "^^";
}
-
+
sql = sqlWhere;
//浠庣涓�椤靛紑濮�
_cur_page = 1;
@@ -501,23 +549,23 @@
// // AjaxReportRun(Report, "../../views/WarM/xmlK3_POInStockBill.aspx?linterid=" + data[0].hmainid, Report.PrintPreview(true));
//},
f_HBarCode: function () {//鐢熸垚鏉$爜
- // var checkStatus = table.checkStatus('test-table-reload')
- //, data = checkStatus.data;
- // layer.open({
- // type: 2
- // , area: ['100%', '100%']
- // , title: '閫佽揣鍗�'
- // , shade: 0.6 //閬僵閫忔槑搴�
- // , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
- // , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- // , content: ['../../views/WarM/Web_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hmainid, 'yes']
- // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
- // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes']
- // , resize: false
- // , cancel: function () {
- // $(".layui-btn").removeClass("layui-btn-disabled");
- // }
- // })
+ // var checkStatus = table.checkStatus('test-table-reload')
+ //, data = checkStatus.data;
+ // layer.open({
+ // type: 2
+ // , area: ['100%', '100%']
+ // , title: '閫佽揣鍗�'
+ // , shade: 0.6 //閬僵閫忔槑搴�
+ // , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+ // , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ // , content: ['../../views/WarM/Web_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hmainid, 'yes']
+ // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
+ // // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes']
+ // , resize: false
+ // , cancel: function () {
+ // $(".layui-btn").removeClass("layui-btn-disabled");
+ // }
+ // })
}
};
$('.test-table-reload-btn .layui-btn').on('click', function () {
--
Gitblit v1.9.1