From 494c0066b28158a813953b66e3daa2abea313a87 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 29 九月 2022 10:46:28 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/order/out.js | 57 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js
index 4fddc97..4889cf0 100644
--- a/src/main/webapp/static/js/order/out.js
+++ b/src/main/webapp/static/js/order/out.js
@@ -4,7 +4,7 @@
base: baseUrl + "/static/layui/lay/modules/"
}).extend({
notice: 'notice/notice',
-}).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge'], function(){
+}).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function(){
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
@@ -16,6 +16,7 @@
var treeTable = layui.treeTable;
var xmSelect = layui.xmSelect;
var tableMerge = layui.tableMerge;
+ var tableX = layui.tableX;
insTb2 = table.render({
elem: '#orderDetlTable',
@@ -26,6 +27,7 @@
limits: [15, 30, 50, 100, 200, 500],
toolbar: '#orderDetToolbar',
height: 'full-120',
+ where: {order_id: 9999999999},
cols: [[
{type: 'checkbox'}
,{type: 'numbers', title: '#'}
@@ -77,6 +79,7 @@
limit();
}
});
+
/* 琛ㄦ牸2鎼滅储 */
form.on('submit(sensorTbSearch)', function (data) {
insTb2.reload({where: data.field, page: {curr: 1}});
@@ -85,6 +88,7 @@
/* 琛ㄦ牸2澶村伐鍏锋爮鐐瑰嚮浜嬩欢 */
table.on('toolbar(orderDetlTable)', function (obj) {
+
var checkStatus = table.checkStatus(obj.config.id).data;
if (obj.event === 'pakoutPreview') { // 娣诲姞
if (checkStatus.length === 0) {
@@ -158,7 +162,7 @@
{field: 'anfme', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
{field: 'locNo', title: '璐т綅', align: 'center', width: 100, templet: '#locNoTpl'},
{field: 'staNos', align: 'center', title: '鍑哄簱绔�', merge: ['locNo'], templet: '#tbBasicTbStaNos'},
- {type: 'checkbox', merge: ['locNo']},
+ // {type: 'checkbox', merge: ['locNo']},
]],
done: function (res) {
tableMerge.render(this);
@@ -180,19 +184,14 @@
});
// 鎵归噺淇敼鍑哄簱绔�
form.on('submit(batchModifySta)', function () {
- let stoPreTabData = layui.table.checkStatus('stoPreTab').data;
- if (stoPreTabData.length < 1) {
- layer.msg("璇疯嚦灏戦�夋嫨涓�鏉′互涓婂悎骞舵暟鎹�", {icon: 7});
- return false;
- }
- modifySta(stoPreTabData);
+ modifySta();
});
// 鎵归噺淇敼鍑哄簱绔� - 绔欑偣閫夋嫨
- function modifySta(stoPreTabData) {
+ function modifySta() {
// 鍑哄簱绔欏彇浜ら泦
let staBatchSelectVal = [];
- for(let i = 0; i<stoPreTabData.length; i++) {
- let staNos = stoPreTabData[i].staNos;
+ for(let i = 0; i<tableCache.length; i++) {
+ let staNos = tableCache[i].staNos;
if (staNos !== null) {
if (staBatchSelectVal.length === 0) {
staBatchSelectVal = staNos;
@@ -224,15 +223,9 @@
let loadIdx = layer.load(2);
let batchSta = Number(obj.field.batchSta);
let arr = [];
- for (let j = 0; j<stoPreTabData.length; j++) {
- for (let i = 0; i<tableCache.length; i++) {
- if (tableCache[i].orderNo === stoPreTabData[j].orderNo
- && tableCache[i].matnr === stoPreTabData[j].matnr
- && tableCache[i].locNo === stoPreTabData[j].locNo) {
- tableCache[i]['staNo'] = batchSta;
- arr.push(i);
- }
- }
+ for (let i = 0; i<tableCache.length; i++) {
+ tableCache[i]['staNo'] = batchSta;
+ arr.push(i);
}
stoPreTabIdx.reload({data: tableCache});
arr.forEach(item => {
@@ -338,6 +331,8 @@
})
})
+ window.pakoutPreview = pakoutPreview;
+
});
function tableReload(child) {
@@ -353,3 +348,25 @@
});
}
+/**
+ * 涓�閿嚭搴�
+ */
+function autoOut(orderId) {
+ let loadIndex = layer.msg('璇锋眰涓�...', {icon: 16, shade: 0.01, time: false});
+ $.ajax({
+ url: baseUrl + "/out/pakout/orderDetlIds/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: { orderId : orderId },
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ pakoutPreview(res.data);
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+}
--
Gitblit v1.9.1