public function fill($get, $post) { $sample_id = $post['sample_id']; $flow_id = $post['flow_id']; $comment = $post['comment']; SampleTechnic::deleteWhere(0, 'flow_id=? AND sample_id=?', $flow_id, $sample_id); $t = new SampleTechnic(); $t->sample_id = $sample_id; $t->flow_id = $flow_id; $t->technic_desc = $comment; $t->save(); return $this->getCommonResult(true); }
流程工艺 <a href="<?php echo $this->getUrl('Sample/update', array('id' => $sample->id)); ?> " rel="popup">更新</a> </h3> <div class="technic_flow"> <?php echo $this->displayField('technic_flow_id_list', $sample->extend_info); ?> </div> <?php $flow_str = $sample->extend_info->technic_flow_id_list; if ($flow_str) { $flows = SampleTechnic::findByFlowIdList($sample->id, explode(',', $flow_str)); ?> <h3 class="caption">工艺备注</h3> <table class="info-tbl" data-empty-fill="1"> <tbody> <?php foreach ($flows as $id => list($comment, $name)) { ?> <tr> <th><?php echo $name; ?> </th> <td class="tc-state-normal"> <span class="tc-comment"> <?php
/** * 删除单件眼样品的工艺 * @param $get * @return Result */ public function deleteSampleTechnic($get) { $id = $get['id']; $sample_id = $get['sample_id']; SampleTechnic::delByPk($id); return new Result('操作成功', true, null, Router::getUrl('Sample/updateSampleTechnic', array('sample_id' => $sample_id))); }