From 8a36bbee40f5e1069b15a98b1e64ac9719ee8a46 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 23 四月 2024 17:17:13 +0800
Subject: [PATCH] 1.销售出库单 增加 反写源单 销售订单和发货通知单 超出 关联数量 关闭源单 2.应收单 增加 反写源单 销售出库单 和 销售订单 超出关联数量 关闭源单 3.动态获取源单增加参数 Num 0蓝单 1红单 2全部 4.销售流程的测试并完善功能; 销售订单-》发货通知单-》销售出库单-》应收单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 )
---
WebTM/views/生产管理/生产计划平台/JIT_DayPlanPlatFormImport.html | 128 ++++++++++++++++++++++++++----------------
1 files changed, 80 insertions(+), 48 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
index 9526fbe..c1ccb28 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\241\345\210\222\345\271\263\345\217\260/JIT_DayPlanPlatFormImport.html"
@@ -11,37 +11,6 @@
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
- <style>
- .main-btn { /*澶撮儴涓绘寜閽�*/
- padding: 0 2px; /*璋冩暣鎸夐挳宸﹀彸绌洪殭澶у皬*/
- height: 30px;
- line-height: 30px;
- }
-
- .btn-title {
- font-size: 16px;
- }
- /* 闃叉涓嬫媺妗嗙殑涓嬫媺鍒楄〃琚殣钘�---蹇呴』璁剧疆--- */
- .layui-table-cell {
- overflow: visible !important;
- }
- /* 浣垮緱涓嬫媺妗嗕笌鍗曞厓鏍煎垰濂藉悎閫� */
- td .layui-form-select {
- margin-top: -10px;
- margin-left: -15px;
- margin-right: -15px;
- }
-
- .layui-form-item .layui-inline {
- margin-top: 5px;
- margin-bottom: 5px;
- margin-right: 0px;
- }
-
- .layui-form-label {
- width: 25%;
- }
- </style>
</head>
<body>
<div class="layui-fluid" style="padding: 0;">
@@ -49,7 +18,7 @@
<div class="layui-card-body" style="padding: 1px;">
<form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
<div style="padding: 10px; ">
- <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
</div>
@@ -129,6 +98,9 @@
//#region 杩涘叆椤甸潰鍗冲姞杞�
+ var params = getUrlVars();
+ var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 娣诲姞 淇濆瓨
+
//鍒濆鍖栫晫闈�
set_ClearBill();
@@ -139,6 +111,7 @@
//琛屽唴浜嬩欢
table.on('tool(mainTable)', function (obj) {
set_GridDelete(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck(obj);//琛屽唴蹇嵎閿瓫閫�
});
//鏂囦欢涓婁紶
@@ -168,7 +141,12 @@
//閫�鍑�
form.on('submit(Cancel)', function () {
- Pub_Close(2);
+ if (OperationType == 1) {
+ Pub_Close(1);
+ }
+ else {
+ Pub_Close(2);
+ }
})
//瀵煎叆 淇濆瓨鏁版嵁
@@ -206,34 +184,37 @@
var columns = [];
columns.push({ type: 'checkbox', fixed: 'left' });
- columns.push({ field: 'hmainid', title: ' hmainid', width: 200, hide: true });
- columns.push({ field: '鍗曟嵁鍙�', title: ' 鍗曟嵁鍙�', width: 200 });
- columns.push({ field: '鐢熶骇璁㈠崟鍙�*', title: '鐢熶骇璁㈠崟鍙�' });
+ columns.push({ field: 'hmainid', title: 'hmainid', width: 200, hide: true });
+ columns.push({ field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 });
+ columns.push({ field: '鐢熶骇璁㈠崟鍙�*', title: '鐢熶骇璁㈠崟鍙�', width: 150 });
columns.push({ field: '鐢熶骇璁㈠崟鏄庣粏琛屽彿*', title: '鐢熶骇璁㈠崟鏄庣粏琛屽彿', width: 200 });
- columns.push({ field: '缁勭粐缂栫爜*', title: '缁勭粐缂栫爜' });
+ columns.push({ field: '缁勭粐缂栫爜*', title: '缁勭粐缂栫爜', width: 150});
columns.push({ field: 'HWorkShopID', title: 'HWorkShopID', hide: true });
- columns.push({ field: '鐢熶骇杞﹂棿缂栫爜*', title: '鐢熶骇杞﹂棿' });
+ columns.push({ field: '鐢熶骇杞﹂棿缂栫爜*', title: '鐢熶骇杞﹂棿', width: 150});
columns.push({ field: 'HSourceID', title: 'HSourceID', hide: true });
- columns.push({ field: '鐢熶骇璧勬簮缂栫爜*', title: '鐢熶骇璧勬簮' });
+ columns.push({ field: '鐢熶骇璧勬簮缂栫爜*', title: '鐢熶骇璧勬簮', edit: 'text', event: "HSourceID" });
columns.push({ field: '浼樺厛绾�', title: '浼樺厛绾�' });
columns.push({ field: 'HEmpID', title: 'HEmpID', hide: true });
- columns.push({ field: '鍛樺伐', title: '鍛樺伐' });
- columns.push({ field: '鍛樺伐缂栫爜', title: '鍛樺伐缂栫爜' });
+ columns.push({ field: '鍛樺伐', title: '鍛樺伐', width: 150 });
+ columns.push({ field: '鍛樺伐缂栫爜', title: '鍛樺伐缂栫爜', width: 150 });
columns.push({ field: 'HMaterID', title: '鐗╂枡ID', hide: true });
- columns.push({ field: '鐗╂枡缂栫爜*', title: '鐗╂枡缂栫爜' });
+ columns.push({ field: '鐗╂枡缂栫爜*', title: '鐗╂枡缂栫爜', width: 150 });
columns.push({ field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 200 });
- columns.push({ field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' });
+ columns.push({ field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 150});
columns.push({ field: 'HUnitID', title: 'HUnitID', hide: true });
- columns.push({ field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' });
- columns.push({ field: '鎵规鍙�', title: '鎵规' });
+ columns.push({ field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 150});
+ columns.push({ field: '鎵规鍙�', title: '鎵规', width: 150});
columns.push({ field: '閿�鍞鍗曟暟閲�', title: '閿�鍞鍗曟暟閲�', width: 200 });
columns.push({ field: '鐢熶骇璁㈠崟鏁伴噺', title: '鐢熶骇璁㈠崟鏁伴噺', width: 200 });
columns.push({ field: '鎬婚綈濂楁暟閲�', title: '鎬婚綈濂楁暟閲�', width: 200 });
+ columns.push({ field: 'ICMOBillHInterID', title: 'ICMOBillHInterID', hide: true});
+ columns.push({ field: 'ICMOBillHEntryID', title: 'ICMOBillHEntryID', hide: true });
+ columns.push({ field: 'HProdORGID', title: 'HProdORGID', hide: true });
for (var i = 0; i <= (SumMonth - dd); i++) {
- columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), edit: 'text' })
+ columns.push({ field: Format(yyyy + '/' + MM + '/' + (dd + i), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (dd + i), 'MM.dd'), edit: 'text', width:80 })
}
- for (var i = 1; i < dd; i++) {
- columns.push({ field: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), edit: 'text' })
+ for (var i = 1; i <= dd; i++) {
+ columns.push({ field: Format(yyyy + '/' + (MM + 1) + '/' + i, 'yyyy-MM-dd'), title: Format(yyyy + '/' + (MM + 1) + '/' + i, 'MM.dd'), edit: 'text', width: 80 })
}
columns.push({ fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' });
@@ -304,6 +285,57 @@
}
}
+ //琛屽唴鍒犻櫎蹇嵎閿�
+ function set_GridCellCheck(obj) {
+ $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+ if (event.key == "F7") {
+ //鐢熶骇璧勬簮
+ if (obj.event == "HSourceID") {
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "鐢熶骇璧勬簮鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ["../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html", "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鎸夐挳涓� 鐨勫洖璋�
+ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+ if (checkStatus.data.length != 1) {
+ return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ }
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ obj.update({
+ "HSourceID": checkStatus.data[0].HItemID
+ , "鐢熶骇璧勬簮缂栫爜*": checkStatus.data[0].鐢熶骇璧勬簮浠g爜
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ obj.event = "";
+ return false;
+ }
+
+ })
+ }
+
+ //鑾峰彇鍙傛暟
+ function getUrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ }
//#endregion
--
Gitblit v1.9.1