From d8fb42f42134d463321cb5654dfd414028e12b48 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 27 五月 2022 16:21:29 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/order/out.js | 49 +++++++++++++++++++++---
src/main/webapp/views/order/out.html | 17 ++++++++
2 files changed, 59 insertions(+), 7 deletions(-)
diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js
index 67ece60..2dd6326 100644
--- a/src/main/webapp/static/js/order/out.js
+++ b/src/main/webapp/static/js/order/out.js
@@ -143,7 +143,7 @@
,moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
,content: $('#pakoutPreviewBox').html()
,success: function(layero, index){
- table.render({
+ stoPreTabIdx = table.render({
elem: '#stoPreTab',
data: res.data,
height: 520,
@@ -182,18 +182,55 @@
// 鎵归噺淇敼鍑哄簱绔�
form.on('submit(batchModifySta)', function () {
let stoPreTabData = layui.table.checkStatus('stoPreTab').data;
- console.log(stoPreTabData)
if (stoPreTabData.length < 1) {
layer.msg("璇疯嚦灏戦�夋嫨涓�鏉′互涓婂悎骞舵暟鎹�", {icon: 7});
return false;
}
- modifySta(stoPreTabData.map(function (d) {
- return d.id;
- }));
+ modifySta(stoPreTabData);
});
// 鎵归噺淇敼鍑哄簱绔� - 绔欑偣閫夋嫨
- function modifySta(data) {
+ function modifySta(stoPreTabData) {
+ let staBatchSelectVal = [];
+ for(let i = 0; i<stoPreTabData.length; i++) {
+ if (i === 0) {
+ staBatchSelectVal = stoPreTabData[i].staNos;
+ } else {
+ let staNos = stoPreTabData[i].staNos;
+ staBatchSelectVal = staBatchSelectVal.filter( val => {
+ return new Set(staNos).has(val)
+ }
+ )
+ }
+ }
+ admin.open({
+ type: 1,
+ area: '300px',
+ offset: 'auto',
+ title: '璇烽�夋嫨绔欑偣',
+ // btn: ['绔嬪嵆鍑哄簱', '绋嶅悗澶勭悊'],
+ // btnAlign: 'c',
+ content: $('#staBatchSelectDialog').html(),
+ success: function (layero, dIndex) {
+ console.log(staBatchSelectVal)
+ let template = Handlebars.compile($('#batchStaSelectTpl').html());
+ $('#batchSelectStaBox').html(template(staBatchSelectVal));
+ layui.form.render('select');
+
+ for (let i = 0; i<tableCache.length; i++) {
+ // if (tableCache[i].locNo === data.locNo) {
+ tableCache[i]['staNo'] = Number(181);
+ // }
+ }
+ stoPreTabIdx.reload({data: tableCache})
+ $('.order-sta-select').val(181);
+
+ // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
+ },
+
+ })
}
}
diff --git a/src/main/webapp/views/order/out.html b/src/main/webapp/views/order/out.html
index 254a593..a152030 100644
--- a/src/main/webapp/views/order/out.html
+++ b/src/main/webapp/views/order/out.html
@@ -167,7 +167,7 @@
<script type="text/html" id="tbBasicTbStaNos">
<div class="ew-select-fixed">
- <select lay-filter="tbBasicTbStaNos">
+ <select class="order-sta-select" lay-filter="tbBasicTbStaNos">
{{#if (d.staNos!=null) {}}
{{# for(let i=0; i<d.staNos.length; i++) { }}
<option value="{{d.staNos[i]}}">{{d.staNos[i]}}</option>
@@ -175,6 +175,13 @@
{{# } }}
</select>
</div>
+</script>
+
+<script type="text/html" id="staBatchSelectDialog">
+ <form class="layui-form" style="padding: 25px 50px 60px 50px">
+ <select id="batchSelectStaBox" name="batchSta" lay-vertype="tips" lay-verify="required" required="">
+ </select>
+ </form>
</script>
<script type="text/html" id="locNoTpl">
@@ -283,5 +290,13 @@
</script>
</body>
+
+<script type="text/template" id="batchStaSelectTpl">
+ <option value="">閫夋嫨鍑哄簱绔�</option>
+ {{#each}}
+ <option value="{{docId}}">{{docName}}</option>
+ {{/each}}
+</script>
+
</html>
--
Gitblit v1.9.1