From f132f64272c35bf069d36a7469d531a8dd0a3d1a Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期二, 11 七月 2023 09:01:14 +0800 Subject: [PATCH] 1 --- WebTM/views/验收入库/外购入库/Kf_POStockInBill_FastList.html | 264 +++++++++++++++++++++++++++++----------------------- 1 files changed, 149 insertions(+), 115 deletions(-) diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html" index 9c72435..f8dbf15 100644 --- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html" +++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBill_FastList.html" @@ -135,7 +135,7 @@ //閫�鍑� form.on('submit(cmdCancel)', function () { layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) { - parent.location.href = "../../../views/index.html"; + parent.location.href = "../../../views/index_Mobile.html" }); //parent.location.href = "../../../views/index.html" //window.close();//鍏抽棴褰撳墠椤� @@ -144,27 +144,61 @@ form.on('submit(cmdModify)', function () { var checkStatus = table.checkStatus('dj-table') , data = checkStatus.data; - //ajaxLabelData = data; - //layer.alert(rows); - layer.open({ - type: 2 - , area: ['100%', '100%'] - , title: '澶栬喘鍏ュ簱鍗�' - , shade: 0.6 //閬僵閫忔槑搴� - , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲 - , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� - , content: ['../../楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_Fast.html?linterid=' + data[0].HInterID, 'yes'] - , resize: false - , cancel: function () { - $(".layui-btn").removeClass("layui-btn-disabled"); + $.ajax({ + type: "GET", + url: GetWEBURL() + "/WEBSController/TempList_Modify_Json", + async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰 + data: { "HInterID": data[0].HInterID, "HBillNo": data[0].HBillNo, "HBillType": sBillType }, + success: function (result) { + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '閲囪喘鍏ュ簱鍗�' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: ['../../楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_Fast.html?OperationType=2&HInterID=' + data[0].HInterID, 'yes'] + , resize: false + , cancel: function () { + $(".layui-btn").removeClass("layui-btn-disabled"); + } + }) + } + else { + layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + } + }, + error: function (err) { + layer.msg("閿欒" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); } - }) + }); }); + ////缂栬緫 + //form.on('submit(cmdModify)', function () { + // var checkStatus = table.checkStatus('dj-table') + // , data = checkStatus.data; + // //ajaxLabelData = data; + // //layer.alert(rows); + // layer.open({ + // type: 2 + // , area: ['100%', '100%'] + // , title: '澶栬喘鍏ュ簱鍗�' + // , shade: 0.6 //閬僵閫忔槑搴� + // , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲 + // , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + // , content: ['../../楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBill_Fast.html?linterid=' + data[0].HInterID, 'yes'] + // , resize: false + // , cancel: function () { + // $(".layui-btn").removeClass("layui-btn-disabled"); + // } + // }) + //}); //鍒锋柊 form.on('submit(cmdRefresh)', function () {// var sBillType = '1201' - //鍔ㄦ�佸垪-鍒锋柊缂撳瓨鍒楄〃 - table.render(option); + ////鍔ㄦ�佸垪-鍒锋柊缂撳瓨鍒楄〃 + //table.render(option); table.render({ elem: '#yd-table' , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json' @@ -311,108 +345,108 @@ }); }); - ////缂撳瓨鍒楄〃 - //table.render({ - // elem: '#dj-table' - // , url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json' - // , toolbar: '#toolbarDemo' - // , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] } - // , cols: [[ - // { type: 'radio' } - // , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 } - // , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 } - // , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 } - // , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 } - // , { field: 'HQty', title: '鏁伴噺', width: 100 } - // , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } - // , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 } - // , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 } - // ]] - // , height: 500 - // , done: function () { - // layer.closeAll("loading"); - // } - //}) - - - - //鍔ㄦ�佸垪-缂撳瓨鍒楄〃 - $.ajax({ - url: GetWEBURL() + "/Web/DisBillEntryList_Mate_Webs_Json", - type: "GET", - async: false, - data: { HBillType: sBillType, sWhere: '' }, - //async: false, - success: function (data1) { - - if (data1.count == 1) { - - 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: 'radio', fixed: 'left' }); - for (var i = 0; i < data.length; i++) { - if ($.inArray(data[i].name, "") > -1) { - col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� - } - 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 HH:mm:ss')}}</div>", width: 200 }); - break; - default: - col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); - } - } - } - - option = { - elem: '#dj-table' - , toolbar: '#toolbarDemo' - , height: 500 - , page: true //寮�鍚垎椤� - , limit: 50 - , limits: [50, 500, 5000, 20000] - , cols: [col] - , data: data1.data - }; - table.render(option); - } else { - option = { - elem: '#dj-table' - , toolbar: '#toolbarDemo' - , height: 500 - , page: true //寮�鍚垎椤� - , limit: 50 - , limits: [50, 500, 5000, 20000] - , cols: [[ - { type: 'radio' } - , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 } - , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 } - , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } - , { field: 'HQty', title: '鏁伴噺', width: 100 } - ]] - , data: [] - }; - table.render(option); - } - }, - error: function (err) { - layer.msg('閿欒' + err, { - icon: 5, - time: 20000 - }, function () { - //do something - }); + //缂撳瓨鍒楄〃 + table.render({ + elem: '#dj-table' + , url: GetWEBURL() + '/Web/chanpinruk' + , toolbar: '#toolbarDemo' + , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] } + , cols: [[ + { type: 'radio' } + , { field: '鍗曟嵁鍐呯爜', title: '鍗曟嵁鍐呯爜', width: 120 } + , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 150 } + , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 120 } + , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 150 } + , { field: '鏁伴噺', title: '鏁伴噺', width: 100 } + , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 150 } + , { field: '绾㈣摑瀛�', title: '绾㈣摑瀛�', width: 120 } + , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 100 } + ]] + , height: 500 + , done: function () { + layer.closeAll("loading"); } }) + + ////鍔ㄦ�佸垪-缂撳瓨鍒楄〃 + //$.ajax({ + // url: GetWEBURL() + "/Web/DisBillEntryList_Mate_Webs_Json", + // type: "GET", + // async: false, + // data: { HBillType: sBillType, sWhere: '' }, + // //async: false, + // success: function (data1) { + + // if (data1.count == 1) { + + // 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: 'radio', fixed: 'left' }); + // for (var i = 0; i < data.length; i++) { + // if ($.inArray(data[i].name, "") > -1) { + // col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒� + // } + // 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 HH:mm:ss')}}</div>", width: 200 }); + // break; + // default: + // col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); + // } + // } + // } + + // option = { + // elem: '#dj-table' + // , toolbar: '#toolbarDemo' + // , height: 500 + // , page: true //寮�鍚垎椤� + // , limit: 50 + // , limits: [50, 500, 5000, 20000] + // , cols: [col] + // , data: data1.data + // }; + // table.render(option); + // } else { + // option = { + // elem: '#dj-table' + // , toolbar: '#toolbarDemo' + // , height: 500 + // , page: true //寮�鍚垎椤� + // , limit: 50 + // , limits: [50, 500, 5000, 20000] + // , cols: [[ + // { type: 'radio' } + // , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 } + // , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 } + // , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } + // , { field: 'HQty', title: '鏁伴噺', width: 100 } + // ]] + // , data: [] + // }; + // table.render(option); + // } + // }, + // error: function (err) { + // layer.msg('閿欒' + err, { + // icon: 5, + // time: 20000 + // }, function () { + // //do something + // }); + // } + //}) + + //宸蹭笂浼犲垪琛� table.render({ elem: '#yd-table' -- Gitblit v1.9.1