1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
| $('#LR_DJ_DetaSalary').jfGrid({ headData: [ { label: 'Material Code', name: 'MaterialNumber', width: 180, align: 'left', frozen: true , edit: { type: 'layer', change: function (rowData, rowIndex, item, seletes) { if (seletes.length == 1) { rowData.MaterialNumber = item.FNumber; rowData.MaterialName = item.FName; rowData.FMaterialId = item.FMATERIALID; $('#LR_DJ_DetaSalary').jfGridSet('updateRow', rowIndex); } else { var rows = $('#LR_DJ_DetaSalary').jfGridGet('rowdatas'); var addRows = []; $.each(seletes, function (i, n) { rows.push({ MaterialNumber: n.FNumber, MaterialName: n.FName, FMaterialId: n.FMATERIALID }); }); $.each(rows, function (i, item) { if (item.MaterialNumber != undefined && item.MaterialNumber != '') { addRows.push(item); } }); $('#LR_DJ_DetaSalary').jfGridSet('refreshdata', addRows); } }, op: { width: 700, height: 500, colData: [ { label: "ID", name: "FMATERIALID", width: 100, align: "left", ishide: true }, { label: "Material Code", name: "FNumber", width: 200, align: "left" }, { label: "物料名称", name: "FName", width: 100, align: "left" } ], url: top.$.rootUrl + '/JD_BasicModule/LR_DJ_MrEndCustomer/GetwlZPpany?number=' + data.text + "&companyNumber=" + $("#F_Company").val(), isPage: true, reloadSelected: true, mainId: 'FMATERIALID', sidx: 'FMATERIALID', isMultiselect: true, type: 2 } } }, { label: 'Material Code', name: 'WuLiao', width: 130, align: 'left', edit: { type: 'layer', change: function (rowData, rowIndex, item) { rowData.WuLiao = item.FNumber; rowData.WuLiaoName = item.FName; rowData.F_RTA_HavePPN = item.F_RTA_HavePPN; rowData.FMaterialId = item.FMATERIALID; $('#LR_DJ_ExpensePurDetailed').jfGridSet('updateRow', rowIndex); }, op: { width: 700, height: 500, colData: [ { label: "ID", name: "FMATERIALID", width: 100, align: "left", ishide: true }, { label: "Material Code", name: "FNumber", width: 200, align: "left" }, { label: "物料名称", name: "FName", width: 100, align: "left" } ], url: top.$.rootUrl + '/JD_BasicModule/LR_DJ_MrEndCustomer/Getdbwlpany?F_RTA_TYPEOFSPF=' + data.text + "&companyNumber=" + $("#F_Company").val(), isPage: true, reloadSelected: true, mainId: 'F_UserId', sidx: 'FMATERIALID', type: 1 } } }, { label: '部门', name: 'FDepartmentName', width: 120, align: 'left', bk: '#e0e0e0' ,edit: { type: 'select', datatype: 'dataSource', code: 'YD_JFFS', op: { value: 'id', text: 'designaname', title: 'designaname' } } }, { label: '部门编码', name: 'FDepartment', width: 100, align: 'left', ishide: true , edit: { type: 'select', datatype: 'dataItem', code: 'BZ' } }, { label: '金额', name: 'FMoney', width: 100, align: 'left', statistics: true , edit: { type: 'input' } }, { label: '说明', name: 'FExplain', width: 300, align: 'left' , edit: { type: 'input', change: function (rowData, index, $edit) { if (rowData.FExplain.length > 300) { $edit.val(rowData.FExplain.substring(0, 300)); rowData.FExplain = $edit.val(); $('#LR_DJ_DetaSalary').jfGridSet('updateRow', index); } } } }, { label: '部门ID', name: 'FDepartId', width: 100, align: 'left', ishide: true }, ], isEdit: true, height: 200 });
|