本文整理汇总了PHP中Part::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Part::setValue方法的具体用法?PHP Part::setValue怎么用?PHP Part::setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Part
的用法示例。
在下文中一共展示了Part::setValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateExcel
function generateExcel($data = array())
{
if (isset($data['did']) && $data['did'] != '') {
$did = $data['did'];
}
if (isset($data['bid']) && $data['bid'] != '') {
$bid = $data['bid'];
}
if (isset($data['jobno']) && $data['jobno'] != '') {
$jobno = $data['jobno'];
}
if (isset($data['fairno']) && $data['fairno'] != '') {
$fairno = $data['fairno'];
}
if (isset($data['inch']) && $data['inch'] != '') {
$inch = $data['inch'];
}
if ($inch == 1) {
$this->inch = 25.4;
}
$db = Database::getInstance();
$cxn = $db->getConnection();
$part = new Part();
$part->setValue('partid', $did);
$part->setPartDetails();
$qz = "SELECT Mfg_Batch_NO FROM Batch_NO WHERE Batch_ID={$bid}";
if (!($rz = $cxn->query($qz))) {
exit("error (generateExcel 0) {$qz} : {$cxn->error}");
}
$rez = mysqli_fetch_assoc($rz);
$mfgbatchno = $rez['Mfg_Batch_NO'];
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setTitle("FAIR");
///form 1
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setTitle("Form 1");
$objPHPExcel->getActiveSheet()->mergeCells('A1:B1');
$objPHPExcel->getActiveSheet()->SetCellValue('A1', '1. Part Number');
$objPHPExcel->getActiveSheet()->mergeCells('A2:B2');
$objPHPExcel->getActiveSheet()->SetCellValue('A2', $part->getValue('partno'));
$objPHPExcel->getActiveSheet()->mergeCells('C1:D1');
$objPHPExcel->getActiveSheet()->SetCellValue('C1', '2. Part Name');
$objPHPExcel->getActiveSheet()->mergeCells('C2:D2');
$objPHPExcel->getActiveSheet()->SetCellValue('C2', $part->getValue('partname'));
$objPHPExcel->getActiveSheet()->mergeCells('E1:F1');
$objPHPExcel->getActiveSheet()->SetCellValue('E1', '3. Serial Number');
$objPHPExcel->getActiveSheet()->mergeCells('E2:F2');
$objPHPExcel->getActiveSheet()->mergeCells('G1:H1');
$objPHPExcel->getActiveSheet()->SetCellValue('G1', '4. FAIR Number');
$objPHPExcel->getActiveSheet()->mergeCells('G2:H2');
$objPHPExcel->getActiveSheet()->SetCellValue('G2', $fairno);
$objPHPExcel->getActiveSheet()->mergeCells('A3:B3');
$objPHPExcel->getActiveSheet()->SetCellValue('A3', '5. Part Revision Level');
$objPHPExcel->getActiveSheet()->mergeCells('A4:B4');
$objPHPExcel->getActiveSheet()->SetCellValue('A4', $part->getValue('partrevision'));
$objPHPExcel->getActiveSheet()->mergeCells('C3:D3');
$objPHPExcel->getActiveSheet()->SetCellValue('C3', '6. Drawing Number');
$objPHPExcel->getActiveSheet()->mergeCells('C4:D4');
$objPHPExcel->getActiveSheet()->SetCellValue('C4', $part->getValue('drawingno'));
$objPHPExcel->getActiveSheet()->mergeCells('E3:F3');
$objPHPExcel->getActiveSheet()->SetCellValue('E3', '7. Drawing Revision Level');
$objPHPExcel->getActiveSheet()->mergeCells('E4:F4');
$objPHPExcel->getActiveSheet()->SetCellValue('E4', $part->getValue('drawingrevision'));
$objPHPExcel->getActiveSheet()->mergeCells('G3:H3');
$objPHPExcel->getActiveSheet()->SetCellValue('G3', '8. Additional Changes');
$objPHPExcel->getActiveSheet()->mergeCells('G4:H4');
$objPHPExcel->getActiveSheet()->mergeCells('A5:B5');
$objPHPExcel->getActiveSheet()->SetCellValue('A5', '9. Manufactiring Process Reference');
$objPHPExcel->getActiveSheet()->mergeCells('A6:B6');
$objPHPExcel->getActiveSheet()->SetCellValue('A6', $mfgbatchno);
$objPHPExcel->getActiveSheet()->mergeCells('C5:D5');
$objPHPExcel->getActiveSheet()->SetCellValue('C5', '10. Organization Name');
$objPHPExcel->getActiveSheet()->mergeCells('C5:D5');
$objPHPExcel->getActiveSheet()->SetCellValue('C5', 'Divya Engineering Works (P) Ltd');
$objPHPExcel->getActiveSheet()->mergeCells('E5:F5');
$objPHPExcel->getActiveSheet()->SetCellValue('E5', '11. Supplier Code');
$objPHPExcel->getActiveSheet()->mergeCells('E6:F6');
$objPHPExcel->getActiveSheet()->SetCellValue('E6', '');
$objPHPExcel->getActiveSheet()->mergeCells('G5:H5');
$objPHPExcel->getActiveSheet()->SetCellValue('G5', '12. P.O. Number');
$objPHPExcel->getActiveSheet()->mergeCells('G6:H6');
$objPHPExcel->getActiveSheet()->SetCellValue('G6', '');
$objPHPExcel->getActiveSheet()->mergeCells('A7:B7');
$objPHPExcel->getActiveSheet()->SetCellValue('A7', '13. Detail Part');
$objPHPExcel->getActiveSheet()->mergeCells('A8:B9');
$objPHPExcel->getActiveSheet()->SetCellValue('A8', 'Assembly FAI:');
$objPHPExcel->getActiveSheet()->mergeCells('C7:H7');
$objPHPExcel->getActiveSheet()->SetCellValue('C7', '14. Fill FAI: Partial FAI:');
$objPHPExcel->getActiveSheet()->mergeCells('C8:H8');
$objPHPExcel->getActiveSheet()->SetCellValue('C8', 'Baseline Part Number (including revision level):');
$objPHPExcel->getActiveSheet()->mergeCells('C9:H9');
$objPHPExcel->getActiveSheet()->SetCellValue('C9', 'Reason for Partial FAI:');
$objPHPExcel->getActiveSheet()->mergeCells('A10:H10');
$objPHPExcel->getActiveSheet()->SetCellValue('A10', 'a) If above part number is a detail part only, go to field 19.');
$objPHPExcel->getActiveSheet()->mergeCells('A11:H11');
$objPHPExcel->getActiveSheet()->SetCellValue('A11', 'b) If above part number is an assembly, go to the "INDEX" section below.');
$objPHPExcel->getActiveSheet()->mergeCells('A12:H12');
$objPHPExcel->getActiveSheet()->SetCellValue('A12', 'INDEX of part numbers or sub-assembly numbers required to make the assembly noted above.');
$objPHPExcel->getActiveSheet()->mergeCells('A13:B13');
$objPHPExcel->getActiveSheet()->SetCellValue('A13', '15. Part Number:');
//.........这里部分代码省略.........
示例2:
} else {
$draw = '';
}
//delete drawings is checked
if (isset($_POST['psht'])) {
$psht = $_POST['psht'];
} else {
$psht = '';
}
//delete process sheets is checked
$part->setPartID($partid);
$part->setCustomerID($_POST['Customer_ID']);
$part->setPartName($_POST['partname']);
$part->setDrawingNo($_POST['drawingno']);
$part->setPartNO($_POST['partno']);
$part->setValue('drawingrevision', $_POST['drawingrevision']);
$part->setCustomerDrawingNo($_POST['custdrwinggno']);
$part->setPartMaterial($_POST['partmaterial']);
$part->setPartSize($_POST['partsize']);
$part->setMaterialCode($_POST['materialcode']);
$part->setPreMachSize($_POST['premachinedsize']);
$part->setFinishSize($_POST['finishsize']);
$part->setScrapeWeight($_POST['scrapeweight']);
$part->setHidePart($_POST['hidepart']);
$part->savePart($partid);
if ($pimg != '') {
$part->delPreview($pimg);
}
///delete part preview images from server and db
if ($draw != '') {
$part->delDrawings($draw);
示例3: generateLabels
function generateLabels($data = array())
{
if (isset($data['did']) && $data['did'] != '') {
$did = $data['did'];
}
if (isset($data['bid']) && $data['bid'] != '') {
$bid = $data['bid'];
$this->batchid = $bid;
}
if (isset($data['sno']) && $data['sno'] != '') {
$sno = $data['sno'];
} else {
$sno = 1;
}
// if(isset($data['eno'])&&$data['eno']!=''){$eno=$data['eno'];}else{$eno=1;}
$db = Database::getInstance();
$cxn = $db->getConnection();
$part = new Part();
$part->setValue('partid', $did);
$part->setPartDetails();
$qz = "SELECT Mfg_Batch_NO FROM Batch_NO WHERE Batch_ID={$bid}";
if (!($rz = $cxn->query($qz))) {
exit("error (generateExcel 0) {$qz} : {$cxn->error}");
}
$rez = mysqli_fetch_assoc($rz);
$mfgbatchno = $rez['Mfg_Batch_NO'];
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setTitle("Labels");
///form 1
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT);
$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
$rh = 20;
///row height
$cw = 33;
///column width
$objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.5);
$objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.5);
$objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.02);
$objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(0.5);
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth($cw);
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth($cw);
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth($cw);
$objPHPExcel->getActiveSheet()->setTitle("Form 1");
$cs = 0;
$rs = 1;
$n = 0;
$jn = $sno;
while ($n < $this->getBatchQty()) {
$rs1 = $rs + 1;
$rs2 = $rs + 2;
$rs3 = $rs + 3;
$objPHPExcel->getActiveSheet()->getRowDimension($rs)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('0', $rs, $part->getValue('partname'));
$objPHPExcel->getActiveSheet()->getRowDimension($rs1)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('0', $rs1, 'DEW ID: ' . $part->getValue('dewpartid'));
$objPHPExcel->getActiveSheet()->getRowDimension($rs2)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('0', $rs2, 'Batch: ' . $mfgbatchno);
$objPHPExcel->getActiveSheet()->getRowDimension($rs3)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('0', $rs3, 'Job Serial No:' . $jn);
$n++;
$jn++;
$objPHPExcel->getActiveSheet()->getRowDimension($rs)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('1', $rs, $part->getValue('partname'));
$objPHPExcel->getActiveSheet()->getRowDimension($rs1)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('1', $rs1, 'DEW PART ID: ' . $part->getValue('dewpartid'));
$objPHPExcel->getActiveSheet()->getRowDimension($rs2)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('1', $rs2, 'Batch No:' . $mfgbatchno);
$objPHPExcel->getActiveSheet()->getRowDimension($rs3)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('1', $rs3, 'Job Serial No:' . $jn);
$n++;
$jn++;
$objPHPExcel->getActiveSheet()->getRowDimension($rs)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('2', $rs, $part->getValue('partname'));
$objPHPExcel->getActiveSheet()->getRowDimension($rs1)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('2', $rs1, 'DEW PART ID: ' . $part->getValue('dewpartid'));
$objPHPExcel->getActiveSheet()->getRowDimension($rs2)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('2', $rs2, 'Batch No:' . $mfgbatchno);
$objPHPExcel->getActiveSheet()->getRowDimension($rs3)->setRowHeight($rh);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow('2', $rs3, 'Job Serial No:' . $jn);
$n++;
$jn++;
$rs += 5;
}
// foreach(range('A1','B1') as $columnID)
// {
// $objPHPExcel->getActiveSheet()->getColumnDimension($columnID)->setAutoSize(true);
// }
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
ob_end_clean();
$fair = $did . '-labels.xlsx';
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition: attachment; filename={$fair}");
// Write file to the browser
$objWriter->save('php://output');
}
示例4: Part
print "{$message}";
} else {
$message = $upload->show_errors();
print "{$message}";
}
}
} else {
if (isset($_POST['save']) && $_POST['save'] == '2') {
$rou->setValue('batchid', $_POST['Batch_ID']);
$c = new Part();
if (isset($_POST['Drawing_ID'])) {
$did = $_POST['Drawing_ID'];
} else {
$did = $_POST['drawing'];
}
$c->setValue('partid', $did);
$c->setPartDetails();
$rou->setBatchDetails();
$cname = $c->getValue('partname');
$partno = $c->getValue('partno');
$heatcode = $rou->getValue('heatcode');
$materialcode = $rou->getValue('materialcode');
$batchdesc = $rou->getValue('batchdesc');
$bremark = $rou->getValue('bremark');
$bqty = $rou->getValue('batchqty');
$dewid = $c->getValue('dewpartid');
class PDF_SKN extends TCPDF
{
// Page header
function Header()
{
示例5: showToolList
function showToolList($div = null)
{
$db = Database::getInstance();
$cxn = $db->getConnection();
if ($this->opedrawingid != '') {
$qp = "SELECT comp.Drawing_ID FROM Component as comp inner join Operation as op on op.Drawing_ID=comp.Drawing_ID\n\t\tinner join Ope_Drawing as od on od.Link_ID=op.Operation_ID WHERE Ope_Drawing_ID={$this->opedrawingid}";
if (!($resp = $cxn->query($qp))) {
exit("error (showToolList) {$qp} : {$cxn->error}");
}
$rp = mysqli_fetch_assoc($resp);
$drawingid = $rp['Drawing_ID'];
if ($div != null) {
$class = '"tl"';
} else {
$class = '"tt"';
}
$query = 'SELECT Ope_Tool_ID,Ope_Tool_OH,Ope_Tool_Desc,Tool_ID_1,Ope_Tool_Life,Cutting_Mins,Image_Path,Operator_Name,DATE_FORMAT(App_Date_Time,"%d-%m-%Y") as apd,App_Remarks,
(SELECT CONCAT(Tool_Desc," ( ",Mfg_Part_NO," )") FROM Tool WHERE Tool_ID=ot.Tool_ID_1) as td1,
(SELECT CONCAT(Tool_Desc," ( ",Mfg_Part_NO," )") FROM Tool WHERE Tool_ID=ot.Tool_ID_2)as td2,
(SELECT CONCAT(Mfg_Part_NO," ",Tool_Desc) FROM ToolBody WHERE ToolBody_ID=ot.ToolBody_ID_1) as i1,
(SELECT CONCAT(Mfg_Part_NO," ",Tool_Desc) FROM ToolBody WHERE ToolBody_ID=ot.ToolBody_ID_2) as i2,
(SELECT Brand_Description FROM Tool_Brand as tb INNER JOIN Tool as t1 ON t1.Brand_ID=tb.Brand_ID WHERE t1.Tool_ID=ot.Tool_ID_1) as tb1,
(SELECT Brand_Description FROM Tool_Brand as tb2 INNER JOIN Tool as t2 ON t2.Brand_ID=tb2.Brand_ID WHERE t2.Tool_ID=ot.Tool_ID_2) as tb2,
(SELECT Holder_Description FROM Holder as h1 WHERE Holder_ID=ot.Holder_ID_1) as hd1,
(SELECT Holder_Description FROM Holder as h2 WHERE Holder_ID=ot.Holder_ID_2) as hd2
FROM Ope_Tool AS ot
LEFT OUTER JOIN Ope_Tool_Image as oti ON oti.Link_ID=ot.Ope_Tool_ID
INNER JOIN Ope_Tool_Approval as ota ON ota.Ope_Drawing_ID=ot.Ope_Drawing_ID
INNER JOIN Operator as ope on ope.Operator_ID=ota.Approved_BY WHERE ot.Ope_Drawing_ID=' . $this->opedrawingid . ' AND Deleted=0';
if ($div != null) {
$query .= ' AND ota.Approved_BY!=0';
}
// print($q);
if (!($res = $cxn->query($query))) {
exit("error (showToolList) {$query}: {$cxn->error}");
} else {
if ($res->num_rows > 0) {
echo '<h2>Tool List</h2>Record Format Ref DEW-WI-T-02, Rev: Nil,Issue Date 01-12-2015';
echo '<p class="gr">WI No: DEW-WI-T-' . $drawingid . '-' . $this->opedrawingid;
$p = new Part();
$p->setValue('partid', $drawingid);
$p->setPartDetails();
$dewid = $p->getValue('dewpartid');
print "<p>DEW ID: {$dewid}</p>";
print "<p>Tools Aded To this Operation</p>";
print "<table class={$class}>";
print "<tr>";
if ($div != null) {
print "<th>Details</th>";
}
print "<th>Preferred Tool and Insert</th><th>Alternate Tool and Insert</th><th>Description</th><th>Preffered Holder</th>\n\t\t\t\t\t\t\t\t<th>Alternate Holder</th><th>Tool Overhang</th><th>Cutting Mins</th><th>Tool Life</th><th>Tool Images</th></tr>";
$i = 0;
while ($row = mysqli_fetch_assoc($res)) {
$appby = 'Approved By : ' . $row['Operator_Name'] . ' On ' . $row['apd'] . ', Remarks:' . $row['App_Remarks'];
if ($row['Image_Path'] != '') {
$otpath = 'opetoolimages/' . $row['Image_Path'];
$img = '<a href="' . $otpath . '" target=\\"_NEW\\">Tool Image</a>';
} else {
$img = '';
}
if ($row['Ope_Tool_Life'] != 0) {
$tl = $row['Ope_Tool_Life'];
} else {
$tl = '';
}
if ($row['td2'] != '') {
$t2 = '<font color=\\"green\\">' . $row['tb2'] . ' Make ' . $row['td2'] . ' ' . $row['i2'] . '</font>';
} else {
$t2 = '';
}
print "<tr>";
if ($div != null) {
print "<td><input type=\"radio\" name=\"tinfo\" class=\"tinfo\" id=\"tinfo[{$i}]\" value=\"{$row['Tool_ID_1']}\"></input></td>";
}
print "<td>{$row['tb1']} Make {$row['td1']} {$row['i1']}</td><td>{$t2}</td><td>{$row['Ope_Tool_Desc']}</td>\n\t\t\t\t\t\t<td>{$row['hd1']}</td><td>{$row['hd2']}</td><td>{$row['Ope_Tool_OH']} mm</td><td>{$row['Cutting_Mins']}</td><td>{$row['Ope_Tool_Life']}</td>";
if ($div != null) {
print "<td>{$img}</td></tr><tr><tr><td colspan=\"12\"><div id=\"{$i}\"></div></td></tr>";
} else {
print "</tr>";
}
$i++;
}
print "</table>";
echo '<p>' . $appby . '<p/>';
} else {
print "No Tools Added for this Operation Or Tool List is Not Approved";
}
}
}
}
示例6: DimnReport
require_once 'autoload.php';
require_once '../tcpdf/tcpdf.php';
$dr = new DimnReport();
date_default_timezone_set('Asia/Kolkata');
if (isset($_POST['jobno'])) {
if (isset($_POST['Drawing_ID'])) {
$drawingid = $_POST['Drawing_ID'];
} else {
$drawingid = $_POST['drg'];
}
if (isset($_POST['Customer_ID'])) {
$customerid = $_POST['Customer_ID'];
} else {
///if customer_id is not set means we are using select2 to search for part
$p = new Part();
$p->setValue('partid', $drawingid);
$p->setPartDetails();
///get customerid from part id
$customerid = $p->getValue('customerid');
}
$db = Database::getInstance();
$cxn = $db->getConnection();
$jobnos = $_POST['jobno'];
if (isset($_POST['Ope_Rev_ID'])) {
$opedrawingid = $_POST['Ope_Rev_ID'];
} else {
$opedrawingid = '';
}
$bnos = $_POST['bno'];
$batchid = $_POST['Batch_ID'];
$pdfxl = $_POST['pdfxl'];