From 985e16c0233f66cd547f4c3f6fd5c65eb16ca268 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 11 十二月 2023 16:22:51 +0800
Subject: [PATCH] 销售订单:下查增加工序流转卡
---
WebTM/views/销售管理/销售订单/Xs_SeOrderBill_LookDown.html | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 203 insertions(+), 2 deletions(-)
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBill_LookDown.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBill_LookDown.html"
index 888fc88..9caeadc 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBill_LookDown.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Xs_SeOrderBill_LookDown.html"
@@ -27,6 +27,7 @@
<li lay-id="1" style="padding:1px;">鐢熶骇璁㈠崟</li>
<li lay-id="2" style="padding:1px;">鐗规壒鐢宠鍗�</li>
<li lay-id="2" style="padding:1px;">閿�鍞嚭搴撳崟</li>
+ <li lay-id="2" style="padding:1px;">宸ュ簭娴佽浆鍗�</li>
</ul>
<div class="layui-tab-content">
<!--閿�鍞鍗曞彉鏇村崟-->
@@ -65,6 +66,15 @@
</div>
</script>
</div>
+ <!--宸ュ簭娴佽浆鍗�-->
+ <div class="layui-tab-item">
+ <table class="layui-hide" id="mainTable4" lay-filter="mainTable4"></table>
+ <script type="text/html" id="toolbarDemo4">
+ <div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn4"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ </div>
+ </script>
+ </div>
</div>
</div>
</form>
@@ -97,12 +107,14 @@
var option1 = {};
var option2 = {};
var option3 = {};
+ var option4 = {};
//瀛愯〃涓嶉渶瑕佹樉绀虹殑瀛楁
var titleData0 = ["hmainid","HMainSourceInterID","HMainSourceEntryID","HDeptID","HEmpID","HCurID","HCusID","HSSID","HSellSID","HOrgID","HMaterID","HUnitID","HSourceInterID","HSourceEntryID","HSourceBillNo","HSourceBillType"];
var titleData1 = ["hmainid", "HEntryID", "HEmpID", "HBomID", "HRoutingInterID", "HPRDORGID", "hsubid", "HMaterID", "HUnitID", "HAuxPropID", "HDeptID", "HEntryCusID", "HCenterID", "HSourceID", "HSourceID_b", "HSourceName", "HBillStatus", "HAuxQty", "HAuxUnit", "HAuxUnitName", "HWidth", "HWeight", "HIsStockQty", "HCusID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType"];
var titleData2 = ["hmainid", "HMainSourceInterID", "HMainSourceEntryID", "HDeptID", "HEmpID", "HCurID", "HCusID", "HManagerID", "HOrgID"];
- var titleData3 = ["hmainid" ,"绾㈣摑鍗曟爣璁�","鍙戣揣浜�","淇濈鍛�", "hsupid", "HEmpID", "hmanagerid", "hsecmanagerid", "hkeeperid", "HDeptID", "hsubid", "hmaterid","hunitid"];
+ var titleData3 = ["hmainid", "绾㈣摑鍗曟爣璁�", "鍙戣揣浜�", "淇濈鍛�", "hsupid", "HEmpID", "hmanagerid", "hsecmanagerid", "hkeeperid", "HDeptID", "hsubid", "hmaterid", "hunitid"];
+ var titleData4 = ["hmainid", "HEntryID", "HEmpID", "HBomID", "HRoutingInterID", "HPRDORGID", "hsubid", "HMaterID", "HUnitID", "HAuxPropID", "HDeptID", "HEntryCusID", "HCenterID", "HSourceID", "HOrderLevID", "HSourceID_b", "HsourceName", "HBillStatus", "HAuxQty", "HAuxUnit", "HAuxUnitName", "HWidth", "HWeight", "HIsStockQty", "HCusID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType"];
//#endregion
@@ -162,6 +174,17 @@
//鍒楄缃�
case 'set_HideColumn3':
get_HideColumn3();
+ break;
+ }
+ });
+ //#endregion
+
+ //#region 瀛愯〃4锛氬ご宸ュ叿鏍忎簨浠�
+ table.on('toolbar(mainTable4)', function (obj) {
+ switch (obj.event) {
+ //鍒楄缃�
+ case 'set_HideColumn4':
+ get_HideColumn4();
break;
}
});
@@ -415,6 +438,17 @@
]]
};
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option4 = {
+ elem: '#mainTable4'
+ , toolbar: '#toolbarDemo4'
+ , height: 550
+ //, page: true
+ , cellMinWidth: 90
+ //, limit: 50
+ //, limits: [50, 500, 5000, 20000]
+ };
}
//#endregion
@@ -455,7 +489,13 @@
};
setInit_mainTable3(table3);
-
+ //娓叉煋琛�4
+ var table4 = {
+ "data": data1.data[4]
+ , "list": data1.list[4]
+ };
+ setInit_mainTable4(table4);
+
layer.close(ajaxLoad);
} else {
layer.close(ajaxLoad);
@@ -639,6 +679,49 @@
//鍒锋柊琛ㄦ牸鏁版嵁
DisPlay_HideColumn3();
+ }
+ //#endregion
+
+ //#region 娓叉煋琛�4
+ function setInit_mainTable4(data1) {
+ //闇�瑕佽缃悎璁¤鐨勫垪
+ var totalArray = [];
+
+ //鏁寸悊瀛愯〃鐨勫垪
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ //col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData4) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else if ($.inArray(data[i].name, totalArray) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ } else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
+ }
+ }
+ }
+
+ //璁剧疆瀛愯〃娓叉煋鍙傛暟鐨勫垪闆嗗悎鍜屾暟鎹苟娓叉煋
+ option4.cols = [col];
+ option4.data = data1.data;
+ table.render(option4);
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn4();
}
//#endregion
@@ -1114,6 +1197,124 @@
}
//#endregion
+ //#region 瀛愯〃4锛氶殣钘忓垪璁剧疆
+ function get_HideColumn4() {
+ HModName = "Xs_SeOrderBill_LookDown_ProcessExchangeBill";
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option4.cols[0].length; i++) {
+ colName += option4.cols[0][i]["title"] + ",";
+ }
+ var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ var urlLen = urlStr.split('/');
+ for (var i = 0; i < urlLen.length - 4; i++) {
+ contentUrl += "../";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: [contentUrl, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn4();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ //#endregion
+ //#region 瀛愯〃4锛氭樉绀哄垪鏁版嵁
+ function DisPlay_HideColumn4() {
+ HModName = "Xs_SeOrderBill_LookDown_ProcessExchangeBill";
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ async: false,
+ success: function (data1) {
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option4.cols[0].length - 1; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option4.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option4.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option4.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option4.cols[0][i + 1]["style"] += "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ //if (data1.data[0].HColumnWidth != 0) {
+ // option2.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option2.cols[0][i + 1]["width"] = "";
+ //}
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option4.cols[0][i + 1]["title"], titleData4) == -1) {
+ option4.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option4.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option4.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option4.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option4.cols[0].length - 1; i++) {
+ if (option4.cols[0][i]["fixed"] != null) {
+ option4.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option4.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option4.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option4);
+ } else {
+ table.render(option4);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
+
//#region 鑾峰彇鍙傛暟
function getUrlVars() {
var vars = [], hash;
--
Gitblit v1.9.1