| | |
| | | , layer = layui.layer |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | , element = layui.element; |
| | | var option = {}; |
| | | //æ¸
空çé¢ new |
| | | var sBillType = '1210' |
| | | //卿å è½½æºåç±»åå表 new |
| | |
| | | |
| | | |
| | | //éåº |
| | | form.on('submit(Cancel)', function () { |
| | | parent.location.href = "../../../views/index.html" |
| | | form.on('submit(cmdCancel)', function () { |
| | | layer.confirm('æ¨ç¡®å®è¦éåºåï¼', { icon: 3, title: 'æç¤º' }, function (index) { |
| | | parent.location.href = "../../../views/index_Mobile.html" |
| | | }); |
| | | //window.close();//å
³éå½å页 |
| | | }) |
| | | //ç¼è¾ |
| | |
| | | }); |
| | | //å·æ° |
| | | form.on('submit(cmdRefresh)', function () {// |
| | | 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(option); |
| | | table.render({ |
| | | elem: '#yd-table' |
| | | , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json' |
| | |
| | | |
| | | |
| | | |
| | | 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: '#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"); |
| | | // } |
| | | //}) |
| | | |
| | | |
| | | |
| | | //卿å |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/Web/chanpinruk1", |
| | | type: "GET", |
| | | async: false, |
| | | data: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }, |
| | | //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' |