From 642428dd870c2f288bb0f3a5fc94373a69a425cf Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期五, 25 四月 2025 13:08:53 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/order/order.js | 95 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 82 insertions(+), 13 deletions(-)
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index c58a12b..61318f4 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -56,7 +56,7 @@
{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', width: 240}
+ {align: 'center', title: '鎿嶄綔', toolbar: '#operate'}
]],
request: {
pageName: 'curr',
@@ -110,7 +110,7 @@
,'<td><div class="layui-progress" lay-filter="progress-demo-'+ index +'"><div class="layui-progress-bar" lay-percent=""></div></div></td>'
,'<td>'
,'<button class="layui-btn layui-btn-xs demo-reload layui-hide">閲嶄紶</button>'
- ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>'
+ // ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>'
,'</td>'
,'</tr>'].join(''));
@@ -168,6 +168,10 @@
showEditModel(data);
} else if (layEvent === 'wrkTrace') {
showWrkTrace(data.id);
+ } else if (layEvent === 'priAdd') {
+ priAdd(data.id);
+ } else if (layEvent === 'priReduce') {
+ priReduce(data.id);
} else if (layEvent === 'del') {
doDel(data.id);
} else if (layEvent === 'labelUp') {
@@ -200,7 +204,7 @@
+ '<td><div class="layui-progress" lay-filter="progress-demo-' + index + '"><div class="layui-progress-bar" lay-percent=""></div></div></td>'
+ '<td>'
+ '<button class="layui-btn layui-btn-xs demo-reload layui-hide">閲嶄紶</button>'
- + '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>'
+ // + '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>'
+ '</td>';
// 灏唗r鍏冪礌娣诲姞鍒扮洰鏍噒able涓�
@@ -245,10 +249,10 @@
cellMinWidth: 100,
cols: [[
{type: 'numbers'},
- {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
+ {field: 'matnr', title: '瑙勬牸', width: 160},
{field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160},
{field: 'batch', title: '绠卞彿'},
- {field: 'anfme', title: '鏈ㄧ涓摐绠旀暟閲�'},
+ {field: 'anfme', title: '鏁伴噺'},
// {field: 'workQty', title: '浣滀笟鏁伴噺'},
// {field: 'unit', title: '鍗曚綅'},
@@ -259,7 +263,7 @@
// },
// {field: 'inQty', title: '宸插叆搴撻噺'},
// {field: 'color', title: '棰滆壊'},
- {field: 'specs', title: '瑙勬牸'},
+ {field: 'specs', title: '鎺ュご'},
{field: 'qty$', title: '鐘舵��', style: 'font-weight: bold'},
{field: 'source$', title: '鏄惁纭', style: 'font-weight: bold'}
]],
@@ -359,10 +363,10 @@
cellMinWidth: 100,
cols: [[
{type: 'numbers', title: '#'},
- {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
+ {field: 'matnr', title: '瑙勬牸', width: 160},
{field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
{field: 'batch', title: '绠卞彿', edit: true},
- {field: 'specs', title: '瑙勬牸'},
+ {field: 'specs', title: '鎺ュご'},
{field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
{field: 'workQty', title: '浣滀笟鏁伴噺', minWidth: 100, width: 100},
// {field: 'unit', title: '鍗曚綅', width: 80},
@@ -529,6 +533,70 @@
}
// 鍒犻櫎鍗曟嵁
+ function priAdd(orderId) {
+ layer.confirm('纭畾瑕佸鍔犳璁㈠崟浼樺厛绾у悧锛熺偣涓�涓嬪姞100000', {
+ shade: .1,
+ skin: 'layui-layer-admin'
+ }, function (i) {
+ layer.close(i);
+ layer.load(2);
+ $.ajax({
+ url: baseUrl+"/order/priAdd/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ orderId: orderId
+ },
+ 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});
+ }
+ }
+ })
+ });
+ }
+ function priReduce(orderId) {
+ layer.confirm('纭畾瑕佸鍔犳璁㈠崟浼樺厛绾у悧锛熺偣涓�涓嬪噺100000', {
+ shade: .1,
+ skin: 'layui-layer-admin'
+ }, function (i) {
+ layer.close(i);
+ layer.load(2);
+ $.ajax({
+ url: baseUrl+"/order/priReduce/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ orderId: orderId
+ },
+ 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});
+ }
+ }
+ })
+ });
+ }
function doDel(orderId) {
layer.confirm('纭畾瑕佸垹闄ゅ悧锛�', {
shade: .1,
@@ -709,12 +777,13 @@
{field: 'title', title: '鍟嗗搧', align: 'center', width: 350},
// {field: 'title', title: '鍟嗗搧', merge: true, align: 'center', width: 350},
{field: 'batch', title: '绠卞彿', align: 'center'},
- {field: 'model', title: '鎵规', align: 'center'},
- {field: 'specs', title: '瑙勬牸', align: 'center'},
- {field: 'brand', title: '鏈ㄧ绫诲瀷', align: 'center'},
+ {field: 'model', title: '鍗峰彿', align: 'center', hide: false},
+ {field: 'specs', title: '鎺ュご', align: 'center'},
+ // {field: 'brand', title: '鏈ㄧ绫诲瀷', align: 'center'},
+ {field: 'brand$', title: '鏈ㄧ绫诲瀷', align: 'center'},
{field: 'zpallet', title: '鎵樼洏鐮�', align: 'center'},
- {field: 'anfme', title: '鏈ㄧ涓摐绠旀暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
- {field: 'count', title: '鏈ㄧ涓摐绠旀暟閲�', align: 'center', width: 90, style: 'font-weight: bold'},
+ {field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
+ {field: 'count', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
{field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'},
{field: 'tkType$', title: 'TK鏍囪', align: 'center', width: 100},
// {field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
--
Gitblit v1.9.1