From a3bea567c554c2c57809ceed2a040baf473aa95f Mon Sep 17 00:00:00 2001
From: cp <513960435@qq.com>
Date: 星期四, 27 三月 2025 13:04:38 +0800
Subject: [PATCH] 1
---
zy-asrs-wms/src/main/webapp/static/js/order/order.js | 86 ++++++++++++++++++++++++++++++------------
1 files changed, 61 insertions(+), 25 deletions(-)
diff --git a/zy-asrs-wms/src/main/webapp/static/js/order/order.js b/zy-asrs-wms/src/main/webapp/static/js/order/order.js
index db68dae..cafbbd3 100644
--- a/zy-asrs-wms/src/main/webapp/static/js/order/order.js
+++ b/zy-asrs-wms/src/main/webapp/static/js/order/order.js
@@ -12,26 +12,26 @@
var layDate = layui.laydate;
var laytpl = layui.laytpl;
- // // 娓叉煋鎼滅储妯℃澘
- // $.ajax({
- // url: baseUrl+"/docType/page/auth",
- // headers: {'token': localStorage.getItem('token')},
- // data: {
- // limit: 9999
- // },
- // method: 'POST',
- // success: function (res) {
- // if (res.code === 200){
- // let template = Handlebars.compile($('#docTypeTpl').html());
- // $('#docType-query').html(template(res.data));
- // layui.form.render('select');
- // } else if (res.code === 403){
- // top.location.href = baseUrl+"/";
- // } else {
- // layer.msg(res.msg, {icon: 2})
- // }
- // }
- // })
+ // 娓叉煋鎼滅储妯℃澘
+ $.ajax({
+ url: baseUrl+"/docType/page/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ limit: 9999
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ let template = Handlebars.compile($('#docTypeTpl').html());
+ $('#docType-query').html(template(res.data));
+ layui.form.render('select');
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ })
let docName = getQueryVariable('docName')
let where = {};
@@ -51,7 +51,7 @@
limits: [16, 30, 50, 100, 200, 500],
cols: [[
{type: 'numbers'},
- {field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl'},
+ {field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl',sort:true},
{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},
@@ -104,6 +104,8 @@
showWrkTrace(data.id);
} else if (layEvent === 'del') {
doDel(data.id);
+ } else if (layEvent === 'dy') {
+ doDy(data.id);
} else if (layEvent === 'complete') {
doModify(data.id, 4);
} else if (layEvent === 'cancel') {
@@ -159,7 +161,7 @@
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: '鏁伴噺'},
@@ -172,7 +174,7 @@
// },
// {field: 'inQty', title: '宸插叆搴撻噺'},
// {field: 'color', title: '棰滆壊'},
- {field: 'origin', title: '浠撳簱鍙�'}
+ {field: 'threeCode', title: '浠撳簱鍙�'}
]],
request: {
pageName: 'curr',
@@ -311,8 +313,8 @@
cellMinWidth: 100,
cols: [[
{type: 'numbers', title: '#'},
- {field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160},
- {field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 200},
+ {field: 'matnr', title: '鍝佸彿', width: 160},
+ {field: 'maktx', title: '鍚嶇О', width: 200},
{field: 'batch', title: '搴忓垪鐮�', edit: true},
{field: 'specs', title: '瑙勬牸'},
{field: 'anfme', title: '鏁伴噺(淇敼)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110},
@@ -503,6 +505,40 @@
});
}
+ // 鎵撳嵃
+ function doDy(orderId) {
+ layer.confirm('纭畾瑕佹墦鍗板悧锛�', {
+ shade: .1,
+ skin: 'layui-layer-admin'
+ }, function (i) {
+ layer.close(i);
+ layer.load(2);
+ $.ajax({
+ url: baseUrl+"/order/dy",
+ 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 doModify(orderId, settle) {
--
Gitblit v1.9.1