EVOLUTION-NINJA
Edit File: dyeing_work_order_grid.php
<style> .ui-jqgrid { text-transform: capitalize !important; } .tablediv { text-transform: uppercase !important; } .ui-jqgrid tr.jqgrow td{ text-transform: uppercase !important; } .redyeing:hover { border: solid 1px rgb(84, 79, 79) !important; } .tablediv { width:auto !important; overflow-x:scroll; } </style> <div class="page-content-wrapper"> <div class="page-content"> <!-- BEGIN PAGE HEADER--> <h3 class="page-title"> Dyeing Work Order Details </h3> <div class="page-bar"> <ul class="page-breadcrumb"> <li><i class="fa fa-home"></i> <a href="https://swansilk.co/dashboard/dashboard_fun">Home</a> <i class="fa fa-angle-right"></i> <a href="#" >Dyeing </a></li> </ul> </div> <?php if(empty($access_row)) { } else { if($access_row->insert_id == '1') { ?> <form action="<?php echo base_url(); ?>out_source/create_dyeing_work_order" method="post" class="form-horizontal"> <b>To insert data click here:</b> <input type="submit" name="Insert" class="btn btn-default" value="Dyeing" /> <a href="<?php echo base_url(); ?>out_source/redirect_dyeing_work_order" class="redyeing default btn btn-default" > Redyeing</a> <a href="<?php echo base_url(); ?>out_source/outsource_dyeing_work_order" class="redyeing default btn btn-default" > Out-Source</a> <br/><br/> </form> <?php } else { ?> <?php } }?> <input type="hidden" value="<?php echo $ref; ?>" id="ref_id" > <input type="hidden" value="<?php echo $url_val; ?>" id="url_ref" style="width: 230px;" > <!--<button style="background: rgb(240,240,240);color:rgb(90,90,90); border-width: 2px !important; border-style: outset !important; border-color: buttonface !important; border-image: initial !important;" name="Insert" value="Redyeing" /> <div class="radio-list" style="margin-left: 2%;"> <label class="radio-inline"> <input type="radio" checked="checked" name="planningorder" id="planningorder" onclick="planningtypes('indent_pending')" /> Pending Indent </label> <label class="radio-inline"> <input type="radio" name="planningorder" id="planningorder" onclick="planningtypes('approved_indent')" /> Approved Indent</label> </div><br>--> <input type="hidden" id="preview_id" class="preview_id" value="<?php if(empty($access_row)) { } else { echo $access_row->preview_id; } ?>" > <?php echo $this->session->flashdata('msg111');?> <div id="table_approved_indent" class="table-responsive"> <div id = "jaytab" class="jaytab"> <table id="list3"></table> <div id="pager3"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div> <!--<div id="table_approved_indent"> <div id = "jaytab" class="jaytab"> <table id="list3"></table> <div id="pager3"></div> <div id="dialogSelectRow" title="Warning" style="display:none"> <p>Please select row</p> </div> </div> </div>--> </div> </div> </div> <!-- End BEGIN CONTAINER --> <!-- BEGIN FOOTER --> <script src="<?php echo base_url(); ?>assets/js/sweetalert.min.js" type="text/javascript"></script> <link href="<?php echo base_url(); ?>assets/css/sweetalert.min.css" rel="stylesheet" type="text/css" > <!-- BEGIN FOOTER --> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style> .ss{ padding-right: 0 !important; padding-left: 0 !important; } .form-control { width:65% !important; height:27px !important; padding: 3px 12px !important; border-radius: 0px !important; //margin-bottom:15px; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } #refresh_list3 { display:none !important; } </style> <script> function getDesignAndQuality(articleNo) { $.ajax({ type: "post", url: "<?php echo base_url(); ?>marketing/getDesignAndQuality", data: "articleNo=" + articleNo, success: function (data) { var objData = jQuery.parseJSON(data); document.getElementById("design").value = objData.design; document.getElementById("quality").value = objData.quality; } }); } </script> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <link href="<?php echo base_url('assets/css/sweetalert2.min.css');?>" rel="stylesheet"/> <script src="<?php echo base_url('assets/js/sweetalert2.min.js');?>"></script> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/jquery.jqGrid.min.js'); ?>"></script> <!-- This is the localization file of the grid controlling messages, labels, etc. <!-- We support more than 40 localizations --> <script type="text/ecmascript" src="<?php echo base_url('jqgrid/js/i18n/grid.locale-en.min.js'); ?>"></script> <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom --> <!-- The link to the CSS that the grid needs --> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap.min.css'); ?>" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('jqgrid/css/ui.jqgrid-bootstrap-ui.min.css'); ?>" /> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <style type="text/css"> .ss{ padding-right: 0 !important; padding-left: 0 !important; } label { font-weight: normal; text-align: left; } .hr-line{ border-top: 1px solid #465A81; } .well-sm { padding: 3px !important; border-radius: 0px !important; } input[type="file"] { padding-bottom: 28px !important; height: 25px !important; color:transparent; } .portlet.box.blue-madison { border: 1px solid #fff !important; border-top: 0; background:#fff !important; } input[type=file] { display: none; } .ui-jqgrid .ui-jqgrid-caption { text-align: left; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar { padding: .1em .1em; min-height: 35px; background: rgb(72,91,127); color: white; } .ui-jqdialog .ui-jqdialog-titlebar-close span { display: block; margin: -9px; } #sData { height: 27px; } #cData { height: 27px; } #dData { height: 27px; } #eData { height: 27px; } .coledit { cursor:pointer; text-align: right; padding-right: 33px !important; padding-left: 33px !important; } .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: hidden; white-space: pre; } </style> <!-----------------datepicker-------------> <!-- The link to the CSS that the grid needs --> <script> $(document).ready(function (){ var l=$("#ref_id").val(); jQuery("#list3").jqGrid({ url:"<?php echo base_url('out_source/work_order_deying_grid_details')?>/s"+l+"/", datatype: "json", colNames:['Id','Work Order','Vendor Name','Date','Delivery Date','Created By','Issue Status','Del Status','WO preview','GRN Preview'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'work_order_no',index:'work_order_no', width:210,editable:false}, {name:'vendor',index:'vendor', width:210,editable:true,editrules:{required: true}}, {name:'date',index:'date', editable:true,editrules:{required: true},width:210}, {name:'delivery_date',index:'delivery_date', editable:true,editrules:{required: true},width:210}, {name:'prepared_by',index:'prepared_by', editable:true,editrules:{required: true},width:210}, {name:'dyeing_main_status',index:'dyeing_main_status', editable:true,editrules:{required: true},width:210}, {name:'complite_status',index:'complite_status', editable:true,editrules:{required: true},width:210}, {name:' ',index:' ',align: "center",editable:false,editrules:{required: true}, width:175,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_deying_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }}, {name:' ',index:' ',align: "center",editable:false,editrules:{required: true}, width:175,cellattr: function (rowId, tv, rawObject, cm, rdata) { return ' onclick="fun_grn_deying_preview($(this))" '; },formatter:function (cellvalue, options, rowObject) { return "<input type='button' value='PREVIEW' onclick='some_function' \>"; }} ], height: 'auto', rowNum:50, rowTotal: 200000000000000000000000000, rowList : [50,100,200,300,500,1000,5000], rownumbers: true, rownumWidth: 40, pager:"#pager3", sortname:'id', viewrecords: true, gridview: true, autowidth: true, sortorder:"asc", loadonce:true, caption:"Work Order Details", subGrid: true, subGridRowExpanded: function(subgrid_id, row_id) { var subgrid_table_id; //alert(row_id); swan_id=row_id; //alert(swan_id); subgrid_table_id = subgrid_id+"_t"; jQuery("#"+subgrid_id).html("<table id='"+subgrid_table_id+"' class='scroll'></table>"); jQuery("#"+subgrid_table_id).jqGrid({ url:"<?php echo base_url('out_source/deying_material_subgrid');?>/s"+row_id+"/", //data:{'sub_id':123}, mtype : "get", datatype: "json", colNames:['Id','OSL No','Issued Number','Color Code','DTL Shade','Yarn Details','Kora Weight','Issued Net Weight','Issued By','Issue stock'], colModel:[ {name:'id',index:'id',hidden:true, width:50,editable:true,width:100}, {name:'osl_no',index:'osl_no', width:123,editable:true,editrules:{required: true}}, {name:'issue_no',index:'issue_no', width:123,editable:true,editrules:{required: true}}, {name:'warp_color',index:'warp_color', width:100,editable:true,editrules:{required: true}}, {name:'ourshade',index:'ourshade', width:200,editable:true,editrules:{required: true}}, {name:'yarn_details',index:'yarn_details', width:250,editable:true,editrules:{required: true}}, {name:'warp_wt',index:'warp_wt', width:150,editable:true,editrules:{required: true}}, {name:'issue_net_weight',index:'issue_net_weight', editable:true,editrules:{required: true},width:130}, // {name:'balanced_net_weight',index:'balanced_net_weight', editable:true,editrules:{required: true},width:100}, {name:'approved_by',index:'approved_by', editable:true,editrules:{required: true},width:102}, {name:'issue_stock',index:'issue_stock',align: "center",editable:true,style:'cursor:pointer',editrules:{required: true},width:150,classes:'coledit',formatter:'showlink',formatoptions:{baseLinkUrl:'<?php echo base_url('out_source/outsource_deying_addstock')?>'}}, ], height: 'auto', rowNum:20000000, sortname: 'num', sortorder: "asc" }); } }); //$("#list2").jqGrid('filterToolbar',{searchOperators : false}); //for multisearch code,remove if not required jQuery("#list3").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: "cn" }); $("#list3").jqGrid('navGrid','#pager3', {edit:false,add:false,del:false,search:false,refreshstate:"current"}, { }, { }, { }, { sopt:['eq', 'ne', 'lt', 'gt', 'cn', 'bw', 'ew'], closeOnEscape: true, multipleSearch: true, closeAfterSearch: true } ); }); function fun_deying_preview(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("out_source/outsource_deying_preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('out_source/outsource_deying_preview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('out_source/wo_outsource_deying_preview');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('out_source/out_source_deying_preview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('out_source/out_source_deying_view');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } function fun_grn_deying_preview(rowId) { var id = rowId.closest('tr').attr('id'); var as=id; var v=$('#preview_id').val(); if(v == 1) { $.ajax({ type:'post', url:'<?php echo base_url("out_source/outsource_grn_deying_preview"); ?>', data:{'as':as}, async:false, success:function() { var url_r=$('#url_ref').val(); if(url_r == '1') { window.location.href = '<?php echo base_url('out_source/outsource_grn_deying_preview');?>/'+ '?id='+as; } else if(url_r == '2') { window.location.href = '<?php echo base_url('out_source/wo_outsource_grn_deying_preview');?>/'+ '?id='+as; } else if(url_r == '3') { window.location.href = '<?php echo base_url('out_source/outsource_grn_deyingwo__preview');?>/'+ '?id='+as; } else if(url_r == '4') { window.location.href = '<?php echo base_url('out_source/outsource_grn_deying_wo_view');?>/'+ '?id='+as; } } }); } else { swal({ title: "You Don't Have Access For This Preview", text: "", }); } } // function fun(rowId) // { // var id = rowId.closest('tr').attr('id'); // var as=id; // //alert(as); // $.ajax({ // type:'post', // url:'<?php echo base_url("out_source/outsource_deying_addstock"); ?>', // data:{'as':as}, // async:false, // success:function() // { // window.location.href = '<?php echo base_url('out_source/outsource_deying_addstock');?>/'+ '?id='+as; // } // }); // } </script> <link rel="stylesheet" href="<?php echo base_url('assets/css/code_jquery.min.css');?>"> <script src="<?php echo base_url('assets/js/jquery-ui.min.js'); ?>" type="text/javascript"></script> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url('assets/css/jquery-ui.min.css'); ?>" /> <script> $(document).ready(function() { $( "#customer" ).autocomplete({ source: '<?php echo base_url('request/auto_sea'); ?>', }); }); function searchname() { var customer = document.getElementById('customer').value; $.ajax({ url:"<?php echo base_url('request/search_by_fetch')?>", dataType: "json", data:{'customer':customer}, type:"POST", async:true, success:function(data) { // alert('hai'); var obj=JSON.parse(data); document.getElementById('customer_id').value=obj[0].customerID; } }); } </script> <style> #search_list2 { display:none !important; } #list2_122_t { height:0px !important; } list2_136_t { height:12px !important; } .scroll { height:12px !important; } .ui-jqgrid-btable { } .ui-common-table { height:12px !important; } #refresh_list2 { display:none !important; } #client_edit { padding-right:12px !important; } #list2 { width: 1050px; height: 0px !important; } #gbox_list2 { height: auto !important; } #gview_list2 { height: auto !important; } @media only screen and (min-width:320px) and (max-width:641px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left: 0 !important; } #editmodlist2 { width:90% !important; } #sData span, #cData span { margin-left: 0 !important; } } @media only screen and (min-width:641px) and (max-width:991px){ .ui-jqgrid { margin-left: 1px !important; } #jaytab{ margin-top: 0 !important; margin-left: 0 !important; overflow-x: scroll; width: 100% !important; padding-left:0 !important; padding-right:9px !important; } } #sData span, #cData span { margin-left: 3px; } #sData { height: 29px; } #cData { height: 29px; } .jqgfirstrow { height: 0px !important; } </style> <style> #gbox_list3 { width: 1300px !important; } @media only screen and (min-width:320px) and (min-height:640px){ #gbox_list3{ //width:1052px !important; } #gview_list3{ //width:100% !important; } .ui-jqgrid-hdiv{ //width:100% !important; } .ui-jqgrid-htable{ //width:100% !important; } #list3{ //width:100% !important; } } </style>