From 75e19f1d649e971e3422d3a3171592be4bfbe14e Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期四, 15 八月 2024 16:21:33 +0800
Subject: [PATCH] ·
---
HTML/views/ASNSetting/ArrivalNotice.html | 526 +++++++++++++++++++++++++++------------------------------
1 files changed, 251 insertions(+), 275 deletions(-)
diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html
index edec824..396741c 100644
--- a/HTML/views/ASNSetting/ArrivalNotice.html
+++ b/HTML/views/ASNSetting/ArrivalNotice.html
@@ -17,13 +17,16 @@
height: auto;
line-height: 23px;
}
- .layui-table-tool-panel{
+
+ .layui-table-tool-panel {
top: auto;
bottom: 29px;
}
- .layui-table-tool{
+
+ .layui-table-tool {
padding-left: 5px;
}
+
/* 琛ㄦ牸涓嬫媺灏忕澶撮殣钘� */
.layui-table-grid-down {
display: none;
@@ -31,14 +34,14 @@
</style>
<script>
// 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
+ document.addEventListener("DOMContentLoaded", function () {
//鑾峰彇table榛樿鏄剧ず鏁�
pageCntFirst();
console.log(pageCnt)
//鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆�
GetIsSetColW();
});
- </script>
+ </script>
</head>
<body id="body">
@@ -49,8 +52,8 @@
<div class="layui-inline">
<label class="layui-form-label">鍏ュ簱鍗曞彿</label>
<div class="layui-input-inline">
- <input type="text" id="ASNNo" name="ASNNo" placeholder="鍏ュ簱鍗曞彿"
- autocomplete="off" class="layui-input">
+ <input type="text" id="ASNNo" name="ASNNo" placeholder="鍏ュ簱鍗曞彿" autocomplete="off"
+ class="layui-input">
</div>
</div>
<div class="layui-inline">
@@ -92,43 +95,27 @@
<div class="layui-input-inline">
<select name="Type" id="Type" lay-filter="Type" lay-search>
<option value=""></option>
- <!-- JC23 -->
+ <!--JC26-->
<option value="0">鎴愬搧鍏ュ簱</option>
<option value="1">閲囪喘鍏ュ簱</option>
- <option value="4">杞﹂棿浣欐枡閫�鍥炲叆搴�</option>
- <option value="5">鍏跺畠鍏ュ簱</option>
- <option value="6">浠e偍鍏ュ簱</option>
- <!-- JC24 -->
- <!-- <option value="0">鎴愬搧鍏ュ簱</option>
- <option value="1">閲囪喘鍏ュ簱</option>
- <option value="2">涓棿鍝佸叆搴�</option>-->
- <!-- <option value="3">閫�璐у叆搴�</option> -->
- <!-- <option value="4">杞﹂棿浣欐枡閫�鍥炲叆搴�</option>
- <option value="5">鍏跺畠鍏ュ簱</option>
- <option value="6">浠e偍鍏ュ簱</option>
- <option value="7">瀵勫瓨鍏ュ簱</option> -->
- <!-- JC09 -->
- <!-- <option value="0">鏍囧噯浜у搧鍏ュ簱</option>
- <option value="1">闈炴爣浜у搧鍏ュ簱</option> -->
- <!-- JC08 -->
- <!-- <option value="0">鎴愬搧鍏ュ簱</option>
- <option value="1">鍘熸枡鍏ュ簱</option>
- <option value="2">閫�璐у叆搴�</option> -->
+ <option value="2">涓棿鍝佸叆搴�</option>
+ <option value="3">閫�璐у叆搴�</option>
+ <option value="4">浣欐枡閫�鍥炲叆搴�</option>
</select>
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 90px;">涓婃父绯荤粺鍗曞彿</label>
+ <label class="layui-form-label">涓嬪彂鍗曞彿</label>
<div class="layui-input-inline">
- <input type="text" id="OrderCode" name="OrderCode" placeholder="涓婃父绯荤粺鍗曞彿"
+ <input type="text" id="OrderCode" name="OrderCode" placeholder="涓婃父绯荤粺涓嬪彂鐨勫崟鍙�"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">瀹㈡埛鍚嶇О</label>
<div class="layui-input-inline">
- <input type="text" id="CustomerName" name="CustomerName" placeholder="瀹㈡埛鍚嶇О" autocomplete="off"
- class="layui-input">
+ <input type="text" id="CustomerName" name="CustomerName" placeholder="瀹㈡埛鍚嶇О"
+ autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
@@ -149,27 +136,28 @@
<label class="layui-form-label">鎾ら攢鍘熷洜</label>
<div class="layui-input-inline">
<textarea id="Reason" name="Reason" placeholder="璇疯緭鍏ュ唴瀹�" class="layui-textarea"></textarea>
-
</div>
- </div>
+ </div>
+
<div class="layui-inline">
<button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
lay-filter="LAY-app-contlist-search">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
</button>
</div>
-
+
<!-- 缁存姢澶囨敞寮规 -->
<div class="layui-inline" id="divEditDemo" style="display: none; padding-top: 10px;">
<label class="layui-form-label">澶囨敞</label>
<div class="layui-input-inline" style="width: 300px;height: 100%;">
- <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo" class="layui-textarea"></textarea>
+ <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo"
+ class="layui-textarea"></textarea>
</div>
</div>
</div>
</div>
- <div id="center">
+ <div id="center">
</div>
<div class="layui-card-body">
@@ -220,19 +208,16 @@
<script type="text/html" id="buttonTpl">
{{# function GetBtn3(d){
var html = ``;
- if(d.Status=='0'){
- html = `<button class="layui-btn layui-btn-radius layui-btn-xs">绛夊緟鎵ц</button>`;
- } else if(d.Status=='1') {
- html = `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">姝e湪鎵ц</button>`;
- } else if(d.Status=='2') {
- html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">鎵ц瀹屾瘯</button>`;
- } else if(d.Status=='3') {
- html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">璁㈠崟鍏抽棴</button>`;
- } else if(d.Status=='4') {
- html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">涓婁紶瀹屾瘯</button>`;
- } else {
-
+ switch(d.Status)
+ {
+ case "0" : html = `<button class="layui-btn layui-btn-radius layui-btn-xs">绛夊緟鎵ц</button>`;break;
+ case "1" : html = `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">姝e湪鎵ц</button>`; break;
+ case "2" : html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">鎵ц瀹屾瘯</button>`; break;
+ case "3" : html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">璁㈠崟鍏抽棴</button>`; break;
+ case "4" : html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">涓婁紶瀹屾瘯</button>`; break;
+ default : break;
}
+
return html;
}
}}
@@ -242,24 +227,16 @@
<script type="text/html" id="templetType">
{{# function GetBtn4(d){
var html = ``;
- if(d.Type=='0'){
- html = `鎴愬搧鍏ュ簱`;
- } else if(d.Type=='1') {
- html = `閲囪喘鍏ュ簱`;
- } else if(d.Type=='2') {
- html = `涓棿鍝佸叆搴揱;
+ switch(d.Type)
+ {
+ case "0" : html = `鎴愬搧鍏ュ簱`;break;
+ case "1" : html = `閲囪喘鍏ュ簱`; break;
+ case "2" : html = `涓棿鍝佸叆搴揱; break;
+ case "3" : html = `閫�璐у叆搴揱; break;
+ case "4" : html = `浣欐枡閫�鍥炲叆搴揱; break;
+ default : break;
}
- else if(d.Type=='4') {
- html = `杞﹂棿浣欐枡閫�鍥炲叆搴揱;
- }else if(d.Type=='5') {
- html = `鍏跺畠鍏ュ簱`;
- }else if(d.Type=='6') {
- html = `浠e偍鍏ュ簱`;
- }else if(d.Type=='7') {
- html = `瀵勫瓨鍏ュ簱`;
- }else {
-
- }
+
return html;
}
}}
@@ -314,7 +291,10 @@
<i class="layui-icon"></i>娣诲姞
</button>
</script>
-
+ <!-- if((d.AsnType =="1" || d.AsnType == "4" || d.AsnType == "5" || d.AsnType == "6") && d.IsPasteCode == "1" && (d.Status == "0" || d.Status == "1")){
+ html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel">
+ <i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`;
+ } -->
<script type="text/html" id="toolbarDemoList">
{{# function GetBtn2(d){
console.log(d);
@@ -323,10 +303,7 @@
html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del">
<i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>`;
}
- if((d.AsnType =="1" || d.AsnType == "4" || d.AsnType == "5" || d.AsnType == "6") && d.IsPasteCode == "1" && (d.Status == "0" || d.Status == "1")){
- html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel">
- <i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`;
- }
+
return html;
}
@@ -424,15 +401,15 @@
base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'table', 'laypage', 'layer', 'laydate'], function () {
-
+ }).use(['index', 'form','table', 'laypage', 'layer', 'laydate'], function () {
+
var doing = true;
-
+
var table = layui.table,
form = layui.form,
laypage = layui.laypage,
layer = layui.layer;
-
+
laydate = layui.laydate;
laydate.render({
@@ -443,62 +420,63 @@
elem: '#EndTime'
, format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚�
});
-
+
var h1 = GetTableTopHeight();
var h2 = GetTableBottomHeight();
-
+
refreshTable();
- refreshTablemx("鍗曞彿");
+ refreshTablemx("鍗曞彿");
//娓叉煋鎬诲崟
//#region 鑷畾涔夎〃澶�
var TotalColsArr = [[
- {field: '',title: '搴忓彿',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
- {field: 'ASNNo',title: '鍏ュ簱鍗曞彿',align: 'center',fixed: 'left',sort: true,width: 180, "disabled": true},
- {field: 'Status',title: '鎵ц鐘舵��',align: 'center',templet: '#buttonTpl'},
- {field: 'Origin',title: '鏉ユ簮',align: 'center',width: 80},
- {field: 'CustomerName',title: '瀹㈡埛鍚嶇О',align: 'center'},
- {field: 'Type',title: '鍗曟嵁绫诲瀷',align: 'center',templet: '#templetType'},
- {field: 'OrderCode',title: '涓婃父绯荤粺鍗曞彿',align: 'center',width: 180},
- {field: 'CompleteTime',title: '瀹屾垚鏃堕棿',align: 'center',templet: '#templetCompleteTime'},
- {field: 'Demo',title: '澶囨敞',align: 'center',width: 180},
- {field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 110},
- {field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',templet: '#templetCreateTime'},
- {field: 'UpdateUserName',title: '淇敼浜�',align: 'center',width: 110},
- {field: 'UpdateTime',title: '淇敼鏃堕棿',align: 'center',templet: '#templetUpdateTime'},
- {field: 'CheckUserName',title: '澶嶆牳浜�',align: 'center',width: 110},
- {field: 'CheckTime',title: '澶嶆牳鏃堕棿',align: 'center',templet: '#templetCheckTime'},
- {field: 'caozuo',title: '鎿嶄綔',fixed: 'right',width: 280,align: 'center',toolbar: '#toolbarDemo1', "disabled": true}
- ]];
- var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ { field: '', title: '搴忓彿', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true },
+ { field: 'ASNNo', title: '鍏ュ簱鍗曞彿', align: 'center', fixed: 'left', sort: true, width: 180, "disabled": true },
+ { field: 'Status', title: '鎵ц鐘舵��', align: 'center', templet: '#buttonTpl' },
+ { field: 'Origin', title: '鏉ユ簮', align: 'center', width: 80 },
+ { field: 'CustomerName', title: '瀹㈡埛鍚嶇О', align: 'center' },
+ { field: 'Type', title: '鍗曟嵁绫诲瀷', align: 'center', templet: '#templetType' },
+ { field: 'OrderCode', title: '涓嬪彂鍗曞彿', align: 'center', width: 180 },
+ { field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', templet: '#templetCompleteTime' },
+ { field: 'Demo', title: '澶囨敞', align: 'center', width: 180 },
+ { field: 'UserName', title: '鍒跺崟浜�', align: 'center', width: 110 },
+ { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 110 },
+ { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', templet: '#templetCreateTime' },
+ { field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 110 },
+ { field: 'UpdateTime', title: '淇敼鏃堕棿', align: 'center', templet: '#templetUpdateTime' },
+ { field: 'CheckUserName', title: '澶嶆牳浜�', align: 'center', width: 110 },
+ { field: 'CheckTime', title: '澶嶆牳鏃堕棿', align: 'center', templet: '#templetCheckTime' },
+ { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 280, align: 'center', toolbar: '#toolbarDemo1', "disabled": true }
+ ]];
+ var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
//#endregion
function refreshTable() {
-
+
//#region 鑷畾涔夎〃澶�
var colsJson
- var param1={
- Href:'BllAsn/GetArrivalNoticeList'
+ var param1 = {
+ Href: 'BllAsn/GetArrivalNoticeList'
};
- sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
- if (res.code == 0){
- if(res.data=='' || res.data==undefined || res.data==null){
- colsJson=TotalColsArr
- }else{
- colsJson= eval(res.data);
+ sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
+ if (res.code == 0) {
+ if (res.data == '' || res.data == undefined || res.data == null) {
+ colsJson = TotalColsArr
+ } else {
+ colsJson = eval(res.data);
}
- }else{
- colsJson=TotalColsArr
+ } else {
+ colsJson = TotalColsArr
}
var param = {
ASNNo: $("#ASNNo").val(),
Type: $("#Type").val(),
Status: $("#Status").val(),
- OrderCode:$("#OrderCode").val(),
+ OrderCode: $("#OrderCode").val(),
CustomerName: $("#CustomerName").val(),
LotNo: $("#LotNo").val(),
SkuNo: $("#SkuNo").val(),
SkuName: $("#SkuName").val(),
- StartTime:$("#StartTime").val(),
+ StartTime: $("#StartTime").val(),
EndTime: $("#EndTime").val()
};
table.render({
@@ -509,16 +487,17 @@
id: 'LAY-app-content-list',
where: param,
contentType: 'application/json',
- headers:{ToKen:$.cookie('token')},
+ headers: { ToKen: $.cookie('token') },
page: true,
even: true,
limit: pageCnt,
limits: pageLimits,
cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- done: function(res) {
- setRight();
+ done: function (res) {
+ console.log(res);
+ setRight();
//鑷畾涔夊垪瀹�
- SetTableColW('LAY-app-content-list','BllAsn/GetArrivalNoticeList',TotalColsSysArr);
+ SetTableColW('LAY-app-content-list', 'BllAsn/GetArrivalNoticeList', TotalColsSysArr);
},
cols: colsJson
});
@@ -527,64 +506,64 @@
}
// 鍏ュ簱鍗晅able鍗曟満浜嬩欢
- table.on('row(LAY-app-content-list)', function(obj) {
+ table.on('row(LAY-app-content-list)', function (obj) {
refreshTablemx(obj.data.ASNNo);
});
- //娓叉煋鏄庣粏
+ //娓叉煋鏄庣粏
//#region 鑷畾涔夎〃澶�
var DetailColsArr = [[
- {field: '',title: '搴忓彿',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
- {field: 'ASNNo',title: '鍏ュ簱鍗曞彿',align: 'center',fixed: 'left',sort: true,width: 180, "disabled": true},
- {field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',width: 100},
- {field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center',width: 200},
- {field: 'Standard',title: '鐗╂枡瑙勬牸',align: 'center',width: 130},
- {field: 'LotNo',title: '鎵规鍙�',align: 'center',width: 100},
- {field: 'SupplierLot',title: '渚涜揣鎵规',align: 'center',width: 100},
- {field: 'Qty',title: '鏁伴噺',align: 'center',width: 70},
- {field: 'FactQty',title: '宸茬粍鏁伴噺',align: 'center',width: 90},
- {field: 'CompleteQty',title: '瀹屾垚鏁伴噺',align: 'center',width: 90},
- {field: 'CompleteTime',title: '瀹屾垚鏃堕棿',align: 'center', width: 160,templet: '#templetCompleteTime2'},
- {field: 'IsSampling',title: '鏄惁鍙栨牱',align: 'center',width: 90,templet: '#templetIsSampling'},
- {field: 'InspectStatus',title: '璐ㄦ鐘舵��',align: 'center',width: 90,templet: '#templetInspectStatus'},
- {field: 'UnitName',title: '璁¢噺鍗曚綅',align: 'center',width: 90},
- // {field: 'Price',title: '鍗曚环',align: 'center',width: 65},
- // {field: 'Money',title: '閲戦',align: 'center',width: 65},
- {field: 'LotText',title: '鎵规鎻忚堪',align: 'center',width: 120},
- {field: 'PackagName',title: '鍖呰鍚嶇О',align: 'center',width: 110,},
- {field: 'IsBale',title: '鏄惁瑁瑰寘',align: 'center',width: 150},
- {field: 'IsBelt',title: '鏄惁鎵撳甫',align: 'center',width: 150},
- {field: 'UDF1',title: '鑷畾涔夊垪1',align: 'center',width: 140},
- {field: 'UDF2',title: '鑷畾涔夊垪2',align: 'center',width: 140},
- {field: 'UDF3',title: '鑷畾涔夊垪3',align: 'center',width: 140},
- {field: 'UDF4',title: '鑷畾涔夊垪4',align: 'center',width: 140},
- {field: 'UDF5',title: '鑷畾涔夊垪5',align: 'center',width: 140,templet:'#templetUDF5'},
- {field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 100},
- {field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',width: 160,templet: '#templetCreateTime2'},
- {field: 'UpdateUserName',title: '淇敼浜�',align: 'center',width: 150,},
- {field: 'UpdateTime',title: '淇敼鏃堕棿',align: 'center',width: 150,templet: '#templetUpdateTime3'},
- {field: 'caozuo',title: '鎿嶄綔',fixed: 'right',width: 150,align: 'left',toolbar: '#toolbarDemoList', "disabled": true}
- ]];
- var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+ { field: '', title: '搴忓彿', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true },
+ { field: 'ASNNo', title: '鍏ュ簱鍗曞彿', align: 'center', fixed: 'left', sort: true, width: 180, "disabled": true },
+ { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 100 },
+ { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', width: 200 },
+ { field: 'Standard', title: '鐗╂枡瑙勬牸', align: 'center', width: 130 },
+ { field: 'LotNo', title: '鎵规鍙�', align: 'center', width: 100 },
+ { field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center', width: 100 },
+ { field: 'Qty', title: '鏁伴噺', align: 'center', width: 70 },
+ { field: 'FactQty', title: '宸茬粍鏁伴噺', align: 'center', width: 90 },
+ { field: 'CompleteQty', title: '瀹屾垚鏁伴噺', align: 'center', width: 90 },
+ { field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', width: 160, templet: '#templetCompleteTime2' },
+ { field: 'IsSampling', title: '鏄惁鍙栨牱', align: 'center', width: 90, templet: '#templetIsSampling' },
+ { field: 'InspectStatus', title: '璐ㄦ鐘舵��', align: 'center', width: 90, templet: '#templetInspectStatus' },
+ { field: 'UnitName', title: '璁¢噺鍗曚綅', align: 'center', width: 90 },
+ // {field: 'Price',title: '鍗曚环',align: 'center',width: 65},
+ // {field: 'Money',title: '閲戦',align: 'center',width: 65},
+ { field: 'LotText', title: '鎵规鎻忚堪', align: 'center', width: 120 },
+ { field: 'PackagName', title: '鍖呰鍚嶇О', align: 'center', width: 110, },
+ { field: 'IsBale', title: '鏄惁瑁瑰寘', align: 'center', width: 150 },
+ { field: 'IsBelt', title: '鏄惁鎵撳甫', align: 'center', width: 150 },
+ { field: 'UDF1', title: '鑷畾涔夊垪1', align: 'center', width: 140 },
+ { field: 'UDF2', title: '鑷畾涔夊垪2', align: 'center', width: 140 },
+ { field: 'UDF3', title: '鑷畾涔夊垪3', align: 'center', width: 140 },
+ { field: 'UDF4', title: '鑷畾涔夊垪4', align: 'center', width: 140 },
+ { field: 'UDF5', title: '鑷畾涔夊垪5', align: 'center', width: 140, templet: '#templetUDF5' },
+ { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 100 },
+ { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime2' },
+ { field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 150, },
+ { field: 'UpdateTime', title: '淇敼鏃堕棿', align: 'center', width: 150, templet: '#templetUpdateTime3' },
+ { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 150, align: 'left', toolbar: '#toolbarDemoList', "disabled": true }
+ ]];
+ var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
//#endregion
function refreshTablemx(asnNo) {
-
+
//#region 鑷畾涔夎〃澶�
var colsJson2
- var param1={
- Href:'BllAsn/GetArrivalNoticeDetailList'
+ var param1 = {
+ Href: 'BllAsn/GetArrivalNoticeDetailList'
};
- sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
- if (res.code == 0){
- if(res.data=='' || res.data==undefined || res.data==null){
- colsJson2=DetailColsArr
- }else{
- colsJson2= eval(res.data);
+ sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
+ if (res.code == 0) {
+ if (res.data == '' || res.data == undefined || res.data == null) {
+ colsJson2 = DetailColsArr
+ } else {
+ colsJson2 = eval(res.data);
}
- }else{
- colsJson2=DetailColsArr
- }
+ } else {
+ colsJson2 = DetailColsArr
+ }
var param = {
- ASNNo:asnNo
+ ASNNo: asnNo
};
table.render({
elem: '#LAY-app-content-list2',
@@ -594,53 +573,52 @@
id: 'LAY-app-content-list2',
where: param,
contentType: 'application/json',
- toolbar:'#toolbarDemo',
- defaultToolbar: [], //'filter','print', 'exports'
- headers:{ToKen:$.cookie('token')},
+ toolbar: '#toolbarDemo',
+ defaultToolbar: [], //'filter','print', 'exports'
+ headers: { ToKen: $.cookie('token') },
page: true,
limit: pageCnt,
limits: pageLimits,
cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- done: function() {
+ done: function () {
setRight()
//鑷畾涔夊垪瀹�
- SetTableColW('LAY-app-content-list2','BllAsn/GetArrivalNoticeDetailList',DetailColsSysArr);
- },
+ SetTableColW('LAY-app-content-list2', 'BllAsn/GetArrivalNoticeDetailList', DetailColsSysArr);
+ },
cols: colsJson2
});
});
//#endregion
}
- function setRight()
- {
- $(function() {
+ function setRight() {
+ $(function () {
$(".addClass").hide();
$(".editClass").hide();
- $(".delClass").hide();
+ $(".delClass").hide();
// $(".cheXiaoClass").hide();
- $(".clossClass").hide();
+ $(".clossClass").hide();
$(".editDemoClass").hide();//澶囨敞
$(".checkClass").hide(); //澶嶆牳
- $(".addLabelClass").hide(); //澶嶆牳
-
+ //$(".addLabelClass").hide(); //鐢熸垚鏍囩
+
});
- sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
+ sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
if (res.code == 0) { //鎴愬姛
for (var k = 0; k < res.data.length; k++) {
if (res.data[k].MenuName == "娣诲姞鍏ュ簱鍗�") {
- $(function() {
+ $(function () {
$(".addClass").show();
});
}
if (res.data[k].MenuName == "缂栬緫鍏ュ簱鍗�") {
- $(function() {
+ $(function () {
$(".editClass").show();
});
}
if (res.data[k].MenuName == "鍒犻櫎鍏ュ簱鍗�") {
- $(function() {
- $(".delClass").show();
+ $(function () {
+ $(".delClass").show();
});
}
// if (res.data[k].MenuName == "鎾ら攢鍏ュ簱鍗�") {
@@ -649,31 +627,31 @@
// });
// }
if (res.data[k].MenuName == "鍏抽棴鍏ュ簱鍗�") {
- $(function() {
- $(".clossClass").show();
+ $(function () {
+ $(".clossClass").show();
});
}
if (res.data[k].MenuName == "缁存姢鍏ュ簱鍗曞娉�") {
- $(function() {
- $(".editDemoClass").show();
+ $(function () {
+ $(".editDemoClass").show();
});
}
if (res.data[k].MenuName == "澶嶆牳鍏ュ簱鍗�") {
- $(function() {
- $(".checkClass").show();
+ $(function () {
+ $(".checkClass").show();
});
}
- if (res.data[k].MenuName == "鐢熸垚鏍囩") {
- $(function() {
- $(".addLabelClass").show();
- });
- }
+ // if (res.data[k].MenuName == "鐢熸垚鏍囩") {
+ // $(function () {
+ // $(".addLabelClass").show();
+ // });
+ // }
}
} else { //涓嶆垚鍔�
layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
+ }, function () { });
}
});
}
@@ -681,11 +659,11 @@
// 椤甸潰鐩戞帶锛岀偣鍑绘煡璇㈠姞杞藉叆搴撴�诲崟
form.on('submit(LAY-app-contlist-search)', function (data) {
refreshTable();
- refreshTablemx("鍗曞彿");
+ refreshTablemx("鍗曞彿");
});
-
- table.on('toolbar(LAY-app-content-list2)', function(obj){
- if (obj.event == "add") {
+
+ table.on('toolbar(LAY-app-content-list2)', function (obj) {
+ if (obj.event == "add") {
layer.open({
type: 2,
title: '娣诲姞鍏ュ簱鍗曟嵁',
@@ -695,14 +673,13 @@
});
}
});
-
+
var ImportId = 0;
table.on('tool(LAY-app-content-list)', function (obj) {
var data = obj.data;
- switch(obj.event)
- {
- case "edit" :
+ switch (obj.event) {
+ case "edit":
// 浠g爜鍖哄煙
var id = data.ASNNo;
layer.open({
@@ -713,11 +690,11 @@
area: ['70%', '90%']
});
break;
- case "del" :
- layer.confirm('纭畾鍒犻櫎姝ゅ崟鎹悧锛�', function(index) {
+ case "del":
+ layer.confirm('纭畾鍒犻櫎姝ゅ崟鎹悧锛�', function (index) {
// 浠g爜鍖哄煙
var param = {
- ASNNo:data.ASNNo,
+ ASNNo: data.ASNNo,
};
sendData(IP + "/BllAsn/DelArrivalNotice", param, 'post', function (res) {
if (res.code == 0) { //鎴愬姛
@@ -726,7 +703,7 @@
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
}, function () {
refreshTable();
- refreshTablemx("鍗曞彿");
+ refreshTablemx("鍗曞彿");
doing = true
});
} else { //涓嶆垚鍔�
@@ -736,14 +713,14 @@
}, function () { doing = true });
}
});
- });
+ });
break;
- case "closs" :
+ case "closs":
// 浠g爜鍖哄煙
- layer.confirm('纭畾鍏抽棴姝ゅ崟鎹悧锛�', function(index) {
+ layer.confirm('纭畾鍏抽棴姝ゅ崟鎹悧锛�', function (index) {
// 浠g爜鍖哄煙
var param = {
- Id:data.Id,
+ Id: data.Id,
};
sendData(IP + "/UpApi/CloseAsn", param, 'post', function (res) {
if (res.code == 0) { //鎴愬姛
@@ -764,12 +741,12 @@
});
break;
- case "check" :
+ case "check":
// 浠g爜鍖哄煙
- layer.confirm('纭畾澶嶆牳姝ゅ崟鎹悧锛�', function(index) {
+ layer.confirm('纭畾澶嶆牳姝ゅ崟鎹悧锛�', function (index) {
// 浠g爜鍖哄煙
var param = {
- Id:data.Id,
+ Id: data.Id,
};
sendData(IP + "/UpApi/FinishAsn", param, 'post', function (res) {
if (res.code == 0) { //鎴愬姛
@@ -788,111 +765,110 @@
}
});
});
-
+
break;
- case "chexiao" :
+ case "chexiao":
layer.open({
type: 1,
title: '鎾ら攢鐢宠',
content: $('#divReason'),
maxmin: true,
- area: ['300px','265px'],
+ area: ['300px', '265px'],
btn: ['纭畾', '鍙栨秷'],
- yes: function(index, layero) {
+ yes: function (index, layero) {
var pa = $('#Reason').val();
- if (doing== true) {
- doing= false;
-
+ if (doing == true) {
+ doing = false;
+
var param = {
- Id: data.Id,
+ Id: data.Id,
Reason: pa,
};
console.log(param);
- sendData(IP + "/BllAsn/CancelOrder", param, 'get', function(res) {
+ sendData(IP + "/BllAsn/CancelOrder", param, 'get', function (res) {
console.log(res);
if (res.code == 0) { //鎴愬姛
layer.msg(res.msg, {
icon: 1,
time: 3000 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
+ }, function () {
refreshTable();
- doing= true;
+ doing = true;
});
} else { //涓嶆垚鍔�
layer.msg(res.msg, {
icon: 2,
time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
+ }, function () {
refreshTable();
- doing= true;
+ doing = true;
});
}
layer.close(index);
});
- }else{
+ } else {
layer.msg("璇峰嬁閲嶅鐐瑰嚮", {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
});
}
-
+
}
- });
-
+ });
+
break;
- case "editDemo" :
+ case "editDemo":
$('#NoticeDemo').val(data.Demo);
layer.open({
type: 1,
title: '缁存姢澶囨敞',
content: $('#divEditDemo'),
maxmin: false,
- area: ['420px','260px'],
+ area: ['420px', '260px'],
btn: ['纭畾', '鍙栨秷'],
- yes: function(index, layero) {
+ yes: function (index, layero) {
var demo = $('#NoticeDemo').val();
var param = {
id: data.Id,
demo: demo,
};
- sendData(IP + "/BllAsn/EditNoticeDemo", param, 'get', function(res) {
+ sendData(IP + "/BllAsn/EditNoticeDemo", param, 'get', function (res) {
if (res.code == 0) { //鎴愬姛
refreshTable();
layer.msg(res.msg, {
icon: 1,
time: 1500 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
-
+ }, function () {
+
});
} else { //涓嶆垚鍔�
layer.msg(res.msg, {
icon: 2,
time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
+ }, function () {
refreshTable();
});
}
layer.close(index);
});
}
- });
+ });
break;
- default:break;
+ default: break;
}
});
//鏄庣粏琛ㄦ搷浣滄爮浜嬩欢
table.on('tool(LAY-app-content-list2)', function (obj) {
var data = obj.data;
var id = data.Id;
- switch(obj.event)
- {
- case "del" :
- layer.confirm('纭畾鍒犻櫎鍏ュ簱鍗曟槑缁嗗悧锛�', function(index) {
+ switch (obj.event) {
+ case "del":
+ layer.confirm('纭畾鍒犻櫎鍏ュ簱鍗曟槑缁嗗悧锛�', function (index) {
// 浠g爜鍖哄煙
var param = {
- ASNNo:data.ASNNo,
- Id:data.Id,
- };
+ ASNNo: data.ASNNo,
+ Id: data.Id,
+ };
sendData(IP + "/BllAsn/DelArrivalNoticeDetail", param, 'post', function (res) {
if (res.code == 0) { //鎴愬姛
layer.msg(res.msg, {
@@ -910,11 +886,11 @@
}, function () { doing = true });
}
});
- });
+ });
break;
- case "Addlabel" :
- if(data.Qty<=0){
+ case "Addlabel":
+ if (data.Qty <= 0) {
layer.msg("璇峰厛杈撳叆鍒拌揣鏁伴噺!", {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -924,41 +900,41 @@
layer.open({
type: 2,
title: '鐢熸垚鏍囩',
- content: 'LabelPrintSelect.html?Id='+id+'&SupplierLot='+data.SupplierLot,
+ content: 'LabelPrintSelect.html?Id=' + id + '&SupplierLot=' + data.SupplierLot,
maxmin: true,
area: ['480px', '615px'],
- btn: ['纭畾','鍙栨秷'],
- yes: function(index, layero){
- var iframeWindow = window['layui-layer-iframe'+ index]
- ,submitID = 'layuiadmin-app-form-edit'
- ,submit = layero.find('iframe').contents().find('#'+ submitID);
+ btn: ['纭畾', '鍙栨秷'],
+ yes: function (index, layero) {
+ var iframeWindow = window['layui-layer-iframe' + index]
+ , submitID = 'layuiadmin-app-form-edit'
+ , submit = layero.find('iframe').contents().find('#' + submitID);
//鐩戝惉鎻愪氦
- iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
+ iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
console.log(field);
//鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
//"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+
- var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime+"&SupplierLot="+field.SupplierLot;
-
+ var str = "Id=" + id + "&IsReset=" + field.reset + "&ArriveQty=" + field.arriveQty + "&ProductionTime=" + field.productionTime + "&ExpirationTime=" + field.expirationTime + "&StoreTime=" + field.storeTime + "&SupplierLot=" + field.SupplierLot;
+
layer.open({
type: 2,
title: '鐢熸垚鏍囩',
- content: 'LabelPrint.html?'+str,
+ content: 'LabelPrint.html?' + str,
maxmin: true,
area: ['660px', '660px'],
btn: ['鍙栨秷'],
-
+
});
- });
+ });
submit.trigger('click');
}
});
break;
- case "Addlabel2" :
- if(data.Qty<=0){
+ case "Addlabel2":
+ if (data.Qty <= 0) {
layer.msg("璇峰厛杈撳叆鍒拌揣鏁伴噺!", {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -968,61 +944,61 @@
layer.open({
type: 2,
title: '鐢熸垚鏍囩',
- content: 'LabelPrintSelect.html?Id='+id+'&Type=4',
+ content: 'LabelPrintSelect.html?Id=' + id + '&Type=4',
maxmin: true,
area: ['480px', '615px'],
- btn: ['纭畾','鍙栨秷'],
- yes: function(index, layero){
- var iframeWindow = window['layui-layer-iframe'+ index]
- ,submitID = 'layuiadmin-app-form-edit'
- ,submit = layero.find('iframe').contents().find('#'+ submitID);
+ btn: ['纭畾', '鍙栨秷'],
+ yes: function (index, layero) {
+ var iframeWindow = window['layui-layer-iframe' + index]
+ , submitID = 'layuiadmin-app-form-edit'
+ , submit = layero.find('iframe').contents().find('#' + submitID);
//鐩戝惉鎻愪氦
- iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
+ iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
console.log(field);
//鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
//"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+
- var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime;
-
+ var str = "Id=" + id + "&IsReset=" + field.reset + "&ArriveQty=" + field.arriveQty + "&ProductionTime=" + field.productionTime + "&ExpirationTime=" + field.expirationTime + "&StoreTime=" + field.storeTime;
+
layer.open({
type: 2,
title: '鐢熸垚鏍囩',
- content: 'LabelPrint.html?'+str,
+ content: 'LabelPrint.html?' + str,
maxmin: true,
area: ['660px', '660px'],
btn: ['鍙栨秷'],
-
+
});
- });
+ });
submit.trigger('click');
}
});
break;
- default:break;
+ default: break;
}
});
//#region 鑷畾涔夎〃澶�
//鑷畾涔夎〃澶�
active = {
- customCols: function(){
+ customCols: function () {
layer.open({
type: 2,
title: '鑷畾涔夊垪',
- content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeList&ColsSysArr='+TotalColsSysArr,
+ content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeList&ColsSysArr=' + TotalColsSysArr,
maxmin: false,
resize: false,
area: ['970px', '650px']
});
},
- customCols2: function(){
+ customCols2: function () {
layer.open({
type: 2,
title: '鑷畾涔夊垪',
- content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeDetailList&ColsSysArr='+DetailColsSysArr,
+ content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeDetailList&ColsSysArr=' + DetailColsSysArr,
maxmin: false,
resize: false,
area: ['970px', '650px']
@@ -1030,7 +1006,7 @@
}
};
- $('.layui-btn').on('click', function() {
+ $('.layui-btn').on('click', function () {
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
--
Gitblit v1.8.0