From c2406f5761fd3ed639eb8546586f2c8efc9eda77 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 12 四月 2022 09:55:35 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/order/order.js | 90 +++++++++++++++++++++++++++++++--------------
1 files changed, 62 insertions(+), 28 deletions(-)
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 69302a4..bc87226 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -20,13 +20,13 @@
cellMinWidth: 100,
cols: [[
{type: 'numbers'},
- {field: 'orderNo', title: '鍗曟嵁缂栧彿', sort: true},
+ {field: 'orderNo', title: '鍗曟嵁缂栧彿'},
{field: 'docType$', align: 'center', title: '绫诲瀷', minWidth: 160, width: 160},
{align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160},
{field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 200, width: 200},
{field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160},
{field: 'memo', align: 'center',title: '澶囨敞', hide: true},
- {align: 'center', title: '鎿嶄綔', toolbar: '#operate', minWidth: 130, width: 130}
+ {align: 'center', title: '鎿嶄綔', toolbar: '#operate', width: 180}
]],
request: {
pageName: 'curr',
@@ -44,6 +44,7 @@
statusCode: 200
},
done: function (res, curr, count) {
+ limit();
if (res.code === 403) {
top.location.href = baseUrl+"/";
}
@@ -69,6 +70,8 @@
showEditModel(data);
} else if (layEvent === 'del') {
doDel(data.id);
+ } else if (layEvent === 'complete') {
+ doModify(data.id, 4);
} else if (layEvent === 'look') {
var $a = $(obj.tr).find('a[lay-event="look"]');
var offset = $a.offset();
@@ -287,7 +290,7 @@
admin.open({
type: 1,
offset: '150px',
- area: '480px',
+ area: '680px',
title: (exp ? '淇敼' : '娣诲姞') + '鏄庣粏',
content: $('#matEditDialog').html(),
success: function (layero, dIndex) {
@@ -296,32 +299,26 @@
form.val('matEditForm', exp);
// 琛ㄥ崟鎻愪氦浜嬩欢
form.on('submit(matEditSubmit)', function (data) {
- var existMats = [];
- xxDataList.forEach(function(elem) {
- existMats.push(elem.matNo);
- });
- var selectList = matXmSelect.getValue();
- for (var i = 0; i<selectList.length; i++) {
- var item = selectList[i];
- if (existMats.indexOf(item.value) === -1) {
- // 鏌ヨ鐗╂枡璇︽儏
- $.ajax({
- url: baseUrl+"/matCode/covert/"+item.value+"/auth",
- headers: {'token': localStorage.getItem('token')},
- method: 'GET',
- async: false,
- success: function (res) {
- if (res.code === 200){
- xxDataList.push(res.data);
- insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- }else {
- layer.msg(res.msg, {icon: 2})
- }
+ let selectList = matXmSelect.getValue();
+ for (let i = 0; i<selectList.length; i++) {
+ let item = selectList[i];
+ // 鏌ヨ鐗╂枡璇︽儏
+ $.ajax({
+ url: baseUrl+"/mat/covert/"+item.value+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ xxDataList.push(res.data);
+ insTbSSXM.reload({data: xxDataList, page: {curr: 1}});
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2})
}
- })
- }
+ }
+ })
}
layer.close(dIndex);
return false;
@@ -400,6 +397,43 @@
});
}
+ // 淇敼璁㈠崟鐘舵��
+ function doModify(orderId, settle) {
+ layer.confirm('纭畾瑕佹墜鍔ㄥ畬缁撳悧锛�', {
+ shade: .1,
+ skin: 'layui-layer-admin'
+ }, function (i) {
+ layer.close(i);
+ layer.load(2);
+ console.log(orderId);
+ console.log(settle);
+ $.ajax({
+ url: baseUrl+"/order/update/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ id: orderId,
+ settle: settle
+ },
+ method: 'POST',
+ success: function (res) {
+ layer.closeAll('loading');
+ if (res.code === 200){
+ if (insTbCount === 0) {
+ insTb.reload({page: {curr: 1}});
+ } else {
+ $(".layui-laypage-btn")[0].click();
+ }
+ layer.msg(res.msg, {icon: 1});
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ });
+ }
+
layDate.render({
elem: '.layui-laydate-range'
,type: 'datetime'
--
Gitblit v1.9.1