Example #1
0
     } else {
         $class = '';
     }
     if (isset($_GET['showall'])) {
         $ncl->setValue('showall', 1);
     }
     if (isset($_GET['nclt'])) {
         $ncl->setValue('nctypeid', $_GET['nclt']);
     }
     $ncl->createNCList();
     $sel = new selectlist('NonConformance_ID', $ncl->getNCList(), 'Select NC Log', 'NonConformance_ID', 'pd', $class, '', '1');
     break;
 case 'notation':
     //machine list
     $not = new OpeNotation();
     $not->createList();
     if (isset($_GET['class'])) {
         $class = 'class="required"';
     } else {
         $class = '';
     }
     $sel = new selectlist('Notation_ID', $not->getList(), 'Select Notation', 'Notation', 'description', $class, '', '');
     break;
 case 'ecn':
     //machine list
     $ecn = new ECN();
     if (isset($_GET['did'])) {
         $ecn->setValue('drawingid', $_GET['did']);
     }
     if (isset($_GET['closed'])) {
         $ecn->setValue('onlyclosed', $_GET['closed']);
Example #2
0
    function showOperationUI()
    {
        $itl = '<option value="1"  selected>Yes</option><option value="0">No</option>';
        $iopl = '<option value="1"  selected>Yes</option><option value="0">No</option>';
        $oirc = '<option value="1">Yes</option><option value="0" selected>No</option>';
        $not = new OpeNotation();
        $not->createList();
        if ($this->operationid != '') {
            $db = Database::getInstance();
            $cxn = $db->getConnection();
            $q = "SELECT * FROM Operation WHERE Operation_ID={$this->operationid}";
            if (!($res = $cxn->query($q))) {
                exit("error : {$cxn->error}");
            }
            $row = mysqli_fetch_assoc($res);
            $this->operationdescription = $row['Operation_Desc'];
            $this->setuptime = self::hms2min($row['Setup_Time']);
            $this->clampingtime = self::hms2min($row['Clamping_Time']);
            $this->machiningtime = self::hms2min($row['Machining_Time']);
            $this->operationnotes = $row['Operation_Notes'];
            $this->intoollist = $row['In_Tool_List'];
            $this->inoplist = $row['In_Op_list'];
            $this->onlyinroutecard = $row['Only_In_Route_Card'];
            if ($this->intoollist == 1) {
                $itl = '<option value="1" selected>Yes</option><option value="0">No</option>';
            } else {
                $itl = '<option value="1">Yes</option><option value="0" selected>No</option>';
            }
            if ($this->inoplist == 1) {
                $iopl = '<option value="1" selected>Yes</option><option value="0">No</option>';
            } else {
                $iopl = '<option value="1">Yes</option><option value="0" selected>No</option>';
            }
            if ($this->onlyinroutecard == 1) {
                $oirc = '<option value="1" selected>Yes</option><option value="0">No</option>';
            } else {
                $oirc = '<option value="1">Yes</option><option value="0" selected>No</option>';
            }
            $this->altfxtnos = $row['Alt_Fixture'];
            $this->fixturenos = self::getFixtureNos();
            $this->openotation = $row['Operation_Notation'];
            $this->displayorder = $row['Display_Order'];
            $this->ncprogpath = $row['NC_Prog_Path'];
            $this->program = $row['Program_NO'];
        }
        echo <<<_END
\t\t\t<fieldset>
\t\t\t\t<legend>Operation Details</legend>

\t\t\t\t<p><label>Describe Operation using Notations</label></p>
\t\t\t\t<table><tr><td>
_END;
        $sel = new selectlist('Notation_ID', $not->getList(), 'Select Notation', 'Notation', 'description', '', '', '');
        echo <<<_END
\t\t\t   </td><td>
\t\t\t     <select id="slno" name="slno">
\t\t\t     <option value="">Select Step</option>
\t\t\t     <option value="A">A</option>
\t\t\t     <option value="B">B</option>
\t\t\t     <option value="C">C</option>
\t\t\t     <option value="D">D</option>
\t\t\t     <option value="E">E</option>
\t\t\t     <option value="F">F</option>
\t\t\t     <option value="G">G</option>
\t\t\t     </select>
   \t\t\t\t</td><td>
\t\t\t     <select id="snot" name="snot">
\t\t\t     <option value="">Select Stage Notation</option>
\t\t\t     <option value="RU">Roughing</option>
\t\t\t     <option value="SF">Semi Finishing</option>
\t\t\t     <option value="FI">Finishing</option>
\t\t\t     </select>
\t\t\t   </td>
\t\t\t   <td><input type="button" id="addnotation" value="Add Notation"></td>
\t\t\t   </tr></table>
\t\t\t   <p>Operation Notation: {$this->openotation}  <div id="shownotation"></div>
\t\t\t   <input type="hidden" id="notation" name="notation" value="{$this->openotation}">
   \t\t\t\t<p>
     \t\t\t\t<label>Operation Description</label>
     \t\t\t\t<input id="operationdescription" name="operationdescription" size="40" class="required" value="{$this->operationdescription}" title="Describe Operation"/>
   \t\t\t\t</p>
   \t\t\t\t<p>
     \t\t\t\t<label>Operation Display Order</label>
     \t\t\t\t<input id="displayorder" name="displayorder" size="10" class="required" value="{$this->displayorder}"/>
   \t\t\t\t</p>
   \t\t\t\t<p>
     \t\t\t\t<label>Program NO</label>
     \t\t\t\t<input id="program" name="program" size="25" value="{$this->program}"/>
   \t\t\t\t</p>
   \t\t\t\t<p>
     \t\t\t\t<label>Program Path</label>
     \t\t\t\t<input id="ncprogpath" name="ncprogpath" size="25" value="{$this->ncprogpath}"/>
   \t\t\t\t</p>

   \t\t\t\t<p>
     \t\t\t\t<label>Set Up Time</label>
     \t\t\t\t<input type="number" id="setuptime" name="setuptime" size="25" value="{$this->setuptime}"/>
   \t\t\t\t</p>
   \t\t\t\t<p>
\t\t\t     <label>Clamping Time</label>
\t\t\t     <input type="number" id="clampingtime" name="clampingtime" size="25" value="{$this->clampingtime}"/>
\t\t\t   </p>
   \t\t\t\t<p>
\t\t\t     <label>Machining Time</label>
\t\t\t     <input type="number" id="machiningtime" name="machiningtime" size="25" value="{$this->machiningtime}"/>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Operation Notes</label>
\t\t\t     <input id="operationnotes" name="operationnotes" size="50"  value="{$this->operationnotes}"/>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Fixture Numbers</label>
\t\t\t     <input id="fixturenos" name="fixturenos" size="25" value="{$this->fixturenos}" title="Enter Fixture Numbers each seperated by a , "/>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Alternate Fixture Numbers</label>
\t\t\t     <input id="altfixturenos" name="altfixturenos" size="25" title="Enter Alternate Fixture Numbers" value="{$this->altfxtnos}"/>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Required In Tool List</label>
\t\t\t     <select id="intoollist" name="intoollist">
\t\t\t     {$itl}
\t\t\t     </select>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Required In Operation List</label>
\t\t\t     <select id="inoplist" name="inoplist">
\t\t\t     {$iopl}
\t\t\t     </select>
\t\t\t   </p>
   \t\t\t   <p>
\t\t\t     <label>Required Only In Route Card</label>
\t\t\t     <select id="onlyinroutecard" name="onlyinroutecard">
\t\t\t     {$oirc}
\t\t\t     </select>
\t\t\t   </p>
_END;
        if ($this->operationid != '') {
            self::listPreviewImage();
            self::listDrawings();
        }
        echo <<<_END

\t\t\t\t</fieldset>
\t\t\t   <p>
\t\t\t     <input class="submit" type="submit" value="Save"/>
\t\t\t   </p>


_END;
    }