| | |
| | | , element = layui.element; |
| | | //æ¸
空çé¢ new |
| | | |
| | | var sBillType = '1203' |
| | | var sBillType = '1203'; |
| | | var col = []; |
| | | //卿å è½½æºåç±»åå表 new |
| | | |
| | | //å è½½æºåç±»å |
| | | set_ClearBill(); |
| | | //åå§åçé¢ |
| | | function set_ClearBill() { |
| | | get_Display(); |
| | | //å·²ä¸ä¼ å表 |
| | | table.render({ |
| | | elem: '#yd-table' |
| | | , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json' |
| | | , toolbar: '#toolbarDemo' |
| | | , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] } |
| | | , page: true // å¼å¯å页 |
| | | , limits: [20, 40, 80, 100] |
| | | , limit: 20 |
| | | , cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'HInterID', title: 'åæ®å
ç ', width: 120 } |
| | | , { field: 'HBillNo', title: 'åæ®å·', width: 150 } |
| | | , { field: 'HMaker', title: 'å¶å人', width: 120 } |
| | | , { field: 'HMakeDate', title: 'å¶åæ¥æ', width: 150 } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 150 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 150 } |
| | | , { field: 'HQty', title: 'æ°é', width: 100 } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', width: 150 } |
| | | , { field: 'HOrgID', title: 'ç»ç»', width: 120 } |
| | | ]] |
| | | , height: 500 |
| | | , done: function () { |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | //å·²ä¸ä¼ æ¥è¯¢ |
| | | table.render({ |
| | | elem: '#sy-table' |
| | | , toolbar: '#toolbarDemo' |
| | | , cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'HInterID', title: 'åæ®å
ç ', width: 120 } |
| | | , { field: 'HBillNo', title: 'åæ®å·', width: 150 } |
| | | , { field: 'HMaker', title: 'å¶å人', width: 120 } |
| | | , { field: 'HMakeDate', title: 'å¶åæ¥æ', width: 150 } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 150 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 150 } |
| | | , { field: 'HQty', title: 'æ°é', width: 100 } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', width: 150 } |
| | | , { field: 'HOrgID', title: 'ç»ç»', width: 120 } |
| | | ]] |
| | | , height: 500 |
| | | }) |
| | | } |
| | | |
| | | //读ååæ®å表 |
| | | // |
| | | |
| | | //éåº |
| | | form.on('submit(Cancel)', function () { |
| | | parent.location.href = "../../../views/index.html" |
| | | //window.close();//å
³éå½å页 |
| | | }) |
| | | |
| | | //ç¼è¾ |
| | | form.on('submit(cmdModify)', function () { |
| | | var checkStatus = table.checkStatus('dj-table') |
| | | , data = checkStatus.data; |
| | |
| | | }) |
| | | }); |
| | | |
| | | |
| | | form.on('submit(cmdRefresh)', function () {//å·æ° |
| | | //å·æ° |
| | | form.on('submit(cmdRefresh)', function () { |
| | | get_Display(); |
| | | table.render({ |
| | | elem: '#dj-table' |
| | | , url: GetWEBURL() + '/Web/chanpinruk' |
| | | , 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"); |
| | | } |
| | | }), |
| | | table.render({ |
| | | elem: '#yd-table' |
| | | , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json' |
| | | , toolbar: '#toolbarDemo' |
| | |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | |
| | | |
| | | //æ¤éåè½ |
| | | form.on('submit(cmdRescind)', function () { |
| | | var checkStatus = table.checkStatus('yd-table') |
| | |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | //layer.msg(data.Message, { icon: 1 }); |
| | | table.render({ |
| | | elem: '#dj-table' |
| | | , url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json' |
| | | , cellMinWidth: 80 |
| | | , toolbar: '#toolbarDemo' |
| | | , where: { HBillType: '1203', sWhere: '' } |
| | | , cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'HInterID', title: 'åæ®å
ç ', width: 80 } |
| | | , { field: 'HBillNo', title: 'åæ®å·', width: 80 } |
| | | , { field: 'HMaker', title: 'å¶å人', width: 100 } |
| | | , { field: 'HMakeDate', title: 'å¶åæ¥æ', width: 100 } |
| | | , { field: 'HQty', title: 'æ°é', width: 100 } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', width: 100 } |
| | | , { field: 'HRedBlueFlag', title: '红èå', width: 100 } |
| | | , { field: 'HSourceBillType', title: 'æºåç±»å', width: 100 } |
| | | ]] |
| | | , height: 500 |
| | | }) |
| | | get_Display(); |
| | | } |
| | | else { |
| | | layer.msg(data.Message, { icon: 2 }); |
| | |
| | | }); |
| | | |
| | | |
| | | |
| | | table.render({ |
| | | elem: '#dj-table' |
| | | , url: GetWEBURL() + '/Web/chanpinruk' |
| | | , 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"); |
| | | } |
| | | }) |
| | | //å è½½ç¼ååè¡¨æ°æ® |
| | | function get_Display() { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Web/GetOtherInBillMain_TempList_New', |
| | | type: "GET", |
| | | data: { "HBillType": sBillType, "sHMaker": sessionStorage["HUserName"], "HOrgID": sessionStorage["OrganizationID"]}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (data[i].name == 'åæ®å
ç ' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { |
| | | 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')}}</div>", width: 200 }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //å·²ä¸ä¼ å表 |
| | | table.render({ |
| | | elem: '#yd-table' |
| | | , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json' |
| | | , toolbar: '#toolbarDemo' |
| | | , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] } |
| | | , page: true // å¼å¯å页 |
| | | , limits: [20, 40, 80, 100] |
| | | , limit: 20 |
| | | , cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'HInterID', title: 'åæ®å
ç ', width: 120 } |
| | | , { field: 'HBillNo', title: 'åæ®å·', width: 150 } |
| | | , { field: 'HMaker', title: 'å¶å人', width: 120 } |
| | | , { field: 'HMakeDate', title: 'å¶åæ¥æ', width: 150 } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 150 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 150 } |
| | | , { field: 'HQty', title: 'æ°é', width: 100 } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', width: 150 } |
| | | , { field: 'HOrgID', title: 'ç»ç»', width: 120 } |
| | | ]] |
| | | , height: 500 |
| | | , done: function () { |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | //卿æ¾ç¤ºåå |
| | | table.render({ |
| | | elem: '#dj-table' |
| | | , cols: [col] |
| | | , data: data1.data |
| | | , height: 550 |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , limit: 50 |
| | | , limits: [50, 500, 5000, 20000] |
| | | }); |
| | | |
| | | //å·²ä¸ä¼ æ¥è¯¢ |
| | | table.render({ |
| | | elem: '#sy-table' |
| | | , toolbar: '#toolbarDemo' |
| | | , cols: [[ |
| | | { type: 'radio' } |
| | | , { field: 'HInterID', title: 'åæ®å
ç ', width: 120 } |
| | | , { field: 'HBillNo', title: 'åæ®å·', width: 150 } |
| | | , { field: 'HMaker', title: 'å¶å人', width: 120 } |
| | | , { field: 'HMakeDate', title: 'å¶åæ¥æ', width: 150 } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', width: 150 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 150 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 150 } |
| | | , { field: 'HQty', title: 'æ°é', width: 100 } |
| | | , { field: 'HSourceBillNo', title: 'æºååå·', width: 150 } |
| | | , { field: 'HOrgID', title: 'ç»ç»', width: 120 } |
| | | ]] |
| | | , height: 500 |
| | | }) |
| | | layer.close(ajaxLoad); |
| | | //layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //å·æ°æç»é¡µç¾ |
| | | table.render({ |