From dd1f00d30cf5b8e086a5ae4e32fc8815f5b3bdd4 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 16 六月 2020 17:00:37 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/wrkMast/wrkMast.js | 87 +++++++++++++++++++++++++++----------------
1 files changed, 55 insertions(+), 32 deletions(-)
diff --git a/src/main/webapp/static/js/wrkMast/wrkMast.js b/src/main/webapp/static/js/wrkMast/wrkMast.js
index ada7ef8..8b38b98 100644
--- a/src/main/webapp/static/js/wrkMast/wrkMast.js
+++ b/src/main/webapp/static/js/wrkMast/wrkMast.js
@@ -11,7 +11,7 @@
tableIns = table.render({
elem: '#wrkMast',
headers: {token: localStorage.getItem('token')},
- url: '/wrkMast/list/auth',
+ url: baseUrl+'/wrkMast/list/auth',
page: true,
limit: 10,
even: true,
@@ -19,17 +19,17 @@
cellMinWidth: 50,
cols: [[
{type: 'checkbox'}
- ,{field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�',sort: true,event: 'detlShow'}
- ,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿',sort: true,event: 'detlShow', width:200}
- ,{field: 'wrkSts$', align: 'center',title: '宸ヤ綔鐘舵��',event: 'detlShow', width:150}
- ,{field: 'ioType$', align: 'center',title: '鍏ュ嚭搴撶被鍨�',event: 'detlShow', width:150}
- ,{field: 'ioPri', align: 'center',title: '浼樺厛绾�',event: 'detlShow'}
- ,{field: 'crnNo$', align: 'center',title: '鍫嗗灈鏈�',event: 'detlShow'}
- ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯',event: 'detlShow'}
- ,{field: 'staNo$', align: 'center',title: '鐩爣绔�',event: 'detlShow'}
- ,{field: 'sourceLocNo$', align: 'center',title: '婧愬簱浣�',event: 'detlShow', width:100}
- ,{field: 'locNo$', align: 'center',title: '鐩爣搴撲綅',event: 'detlShow', width:100}
- ,{field: 'barcode', align: 'center',title: '鏉$爜',event: 'detlShow'}
+ ,{field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�',sort: true}
+ ,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿',sort: true}
+ ,{field: 'wrkSts$', align: 'center',title: '宸ヤ綔鐘舵��'}
+ ,{field: 'ioType$', align: 'center',title: '鍏ュ嚭搴撶被鍨�'}
+ ,{field: 'ioPri', align: 'center',title: '浼樺厛绾�'}
+ ,{field: 'crnNo$', align: 'center',title: '鍫嗗灈鏈�'}
+ ,{field: 'sourceStaNo$', align: 'center',title: '婧愮珯'}
+ ,{field: 'staNo$', align: 'center',title: '鐩爣绔�'}
+ ,{field: 'sourceLocNo$', align: 'center',title: '婧愬簱浣�'}
+ ,{field: 'locNo$', align: 'center',title: '鐩爣搴撲綅'}
+ ,{field: 'barcode', align: 'center',title: '鏉$爜'}
// ,{field: 'picking', align: 'center',title: '鎷f枡', templet:function(row){
// var html = "<input value='picking' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'";
// if(row.picking === 'Y'){html += " checked ";}
@@ -63,7 +63,7 @@
// return html;
// }}
- ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:130}
+ ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:200}
]],
request: {
pageName: 'curr',
@@ -82,7 +82,7 @@
},
done: function(res, curr, count) {
if (res.code === 403) {
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
}
pageCurr=curr;
limit();
@@ -112,7 +112,7 @@
},
done: function (res, curr, count) {
if (res.code === 403) {
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
}
pageCurr=curr;
limit();
@@ -139,7 +139,7 @@
} else {
layer.confirm('纭畾澧炲姞'+(list.length===1?'姝�':list.length)+'鏉℃暟鎹殑浼樺厛绾у悧', function(){
$.ajax({
- url: "/wrkMast/add/pri/auth",
+ url: baseUrl+"/wrkMast/add/pri/auth",
headers: {'token': localStorage.getItem('token')},
contentType:'application/json;charset=UTF-8',
data: JSON.stringify(list),
@@ -149,8 +149,9 @@
layer.closeAll();
if (res.code === 200){
$(".layui-laypage-btn")[0].click();
+ layer.msg(res.msg);
} else if (res.code === 403){
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
} else {
layer.msg(res.msg)
}
@@ -174,7 +175,7 @@
} else {
layer.confirm('纭畾闄嶄綆'+(list.length===1?'姝�':list.length)+'鏉℃暟鎹殑浼樺厛绾у悧', function(){
$.ajax({
- url: "/wrkMast/red/pri/auth",
+ url: baseUrl+"/wrkMast/red/pri/auth",
headers: {'token': localStorage.getItem('token')},
contentType:'application/json;charset=UTF-8',
data: JSON.stringify(list),
@@ -184,8 +185,9 @@
layer.closeAll();
if (res.code === 200){
$(".layui-laypage-btn")[0].click();
+ layer.msg(res.msg);
} else if (res.code === 403){
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
} else {
layer.msg(res.msg)
}
@@ -216,7 +218,7 @@
} else {
layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
$.ajax({
- url: "/wrkMast/delete/auth",
+ url: baseUrl+"/wrkMast/delete/auth",
headers: {'token': localStorage.getItem('token')},
data: {param: JSON.stringify(data)},
method: 'POST',
@@ -226,7 +228,7 @@
layer.closeAll();
tableReload(false);
} else if (res.code === 403){
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
} else {
layer.msg(res.msg)
}
@@ -254,7 +256,7 @@
'fields': fields
};
$.ajax({
- url: "/wrkMast/export/auth",
+ url: baseUrl+"/wrkMast/export/auth",
headers: {'token': localStorage.getItem('token')},
data: JSON.stringify(param),
dataType:'json',
@@ -265,7 +267,7 @@
if (res.code === 200) {
table.exportFile(titles,res.data,'xls');
} else if (res.code === 403) {
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
} else {
layer.msg(res.msg)
}
@@ -295,6 +297,27 @@
content: 'wrkDetl.html',
success: function(layero, index){
}
+ });
+ break;
+ // 瀹屾垚
+ case 'complete':
+ layer.confirm('纭瀹屾垚璇ョ瑪宸ヤ綔妗o紵', {title: '宸ヤ綔鍙凤細'+data.wrkNo}, function(){
+ http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:1}, function (res) {
+ $(".layui-laypage-btn")[0].click();
+ layer.msg(res.msg);
+ })
+ layer.closeAll();
+
+ });
+ break;
+ // 鍙栨秷
+ case 'cancel':
+ layer.confirm('纭鍙栨秷璇ョ瑪宸ヤ綔妗o紵', {title: '宸ヤ綔鍙凤細'+data.wrkNo}, function(){
+ http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:2}, function (res) {
+ $(".layui-laypage-btn")[0].click();
+ layer.msg(res.msg);
+ })
+ layer.closeAll();
});
break;
// 璇︽儏
@@ -353,7 +376,7 @@
content: '../locMast/locMast_detail.html',
success: function(layero, index){
$.ajax({
- url: "/locMast/"+ param +"/auth",
+ url: baseUrl+"/locMast/"+ param +"/auth",
headers: {'token': localStorage.getItem('token')},
method: 'GET',
success: function (res) {
@@ -389,7 +412,7 @@
content: '../basDevp/basDevp_detail.html',
success: function(layero, index){
$.ajax({
- url: "/basDevp/"+ param +"/auth",
+ url: baseUrl+"/basDevp/"+ param +"/auth",
headers: {'token': localStorage.getItem('token')},
method: 'GET',
success: function (res) {
@@ -425,7 +448,7 @@
content: '../basDevp/basDevp_detail.html',
success: function(layero, index){
$.ajax({
- url: "/basDevp/"+ param +"/auth",
+ url: baseUrl+"/basDevp/"+ param +"/auth",
headers: {'token': localStorage.getItem('token')},
method: 'GET',
success: function (res) {
@@ -461,7 +484,7 @@
content: '../locMast/locMast_detail.html',
success: function(layero, index){
$.ajax({
- url: "/locMast/"+ param +"/auth",
+ url: baseUrl+"/locMast/"+ param +"/auth",
headers: {'token': localStorage.getItem('token')},
method: 'GET',
success: function (res) {
@@ -563,7 +586,7 @@
};
$.ajax({
- url: "/wrkMast/"+name+"/auth",
+ url: baseUrl+"/wrkMast/"+name+"/auth",
headers: {'token': localStorage.getItem('token')},
data: top.reObject(data),
method: 'POST',
@@ -575,7 +598,7 @@
$(this).val("");
});
} else if (res.code === 403){
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
}else {
layer.msg(res.msg)
}
@@ -668,7 +691,7 @@
tableIns1 = table.render({
elem: '#wrkDetlByMap',
headers: {token: localStorage.getItem('token')},
- url: '/wrkDetl/list/auth',
+ url: baseUrl+'/wrkDetl/list/auth',
where: {wrk_no: param},
page: true,
limit: 16,
@@ -711,7 +734,7 @@
},
done: function(res, curr, count) {
if (res.code === 403) {
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
}
pageCur=curr;
form.on('checkbox(tableCheckbox)', function (data) {
@@ -745,7 +768,7 @@
},
done: function (res, curr, count) {
if (res.code === 403) {
- top.location.href = "/";
+ top.location.href = baseUrl+"/";
}
pageCurr=curr;
if (res.data.length === 0 && count !== 0) {
--
Gitblit v1.9.1