From 699427dd62027a8a1b1e7326a53700fa92230179 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 27 六月 2022 13:09:05 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/order/out.js | 57 ++++++++++++++++++----------
src/main/webapp/views/order/out.html | 28 +++++++-------
2 files changed, 51 insertions(+), 34 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});
+ }
+ }
+ })
+}
diff --git a/src/main/webapp/views/order/out.html b/src/main/webapp/views/order/out.html
index b3c84f0..5e9532d 100644
--- a/src/main/webapp/views/order/out.html
+++ b/src/main/webapp/views/order/out.html
@@ -112,16 +112,16 @@
<input name="batch" class="layui-input" placeholder="搴忓垪鐮�"/>
</div>
</div>
-<!-- <div class="layui-inline">-->
-<!-- <label class="layui-form-label">鐘舵��:</label>-->
-<!-- <div class="layui-input-inline">-->
-<!-- <select name="isOnline">-->
-<!-- <option value="1">鍏呯數涓�</option>-->
-<!-- <option value="1">鍏呯數涓�</option>-->
-<!-- <option value="0">涓嶅湪鍏呯數</option>-->
-<!-- </select>-->
-<!-- </div>-->
-<!-- </div>-->
+ <!-- <div class="layui-inline">-->
+ <!-- <label class="layui-form-label">鐘舵��:</label>-->
+ <!-- <div class="layui-input-inline">-->
+ <!-- <select name="isOnline">-->
+ <!-- <option value="1">鍏呯數涓�</option>-->
+ <!-- <option value="1">鍏呯數涓�</option>-->
+ <!-- <option value="0">涓嶅湪鍏呯數</option>-->
+ <!-- </select>-->
+ <!-- </div>-->
+ <!-- </div>-->
<div class="layui-inline"> 
<button class="layui-btn icon-btn" lay-filter="sensorTbSearch" lay-submit>
<i class="layui-icon"></i>鎼滅储
@@ -187,10 +187,10 @@
<script type="text/html" id="locNoTpl">
<span name="locNo"
- {{# if( d.lack === false){ }}
- class="layui-badge layui-badge-green" >{{d.locNo}}</span>
- {{# } else { }}
- class="layui-badge layui-badge-red" >搴撳瓨涓嶈冻</span>
+ {{# if( d.lack === false){ }}
+ class="layui-badge layui-badge-green" >{{d.locNo}}</span>
+ {{# } else { }}
+ class="layui-badge layui-badge-red" >搴撳瓨涓嶈冻</span>
{{# } }}
</script>
--
Gitblit v1.9.1