浏览代码

提交color的信息

lvhao 5 天之前
父节点
当前提交
3de846694c
共有 4 个文件被更改,包括 58 次插入13 次删除
  1. 28 3
      core/CoreApp/controllers/Color.php
  2. 8 4
      template/erp/color.html
  3. 11 3
      template/erp/color_add.html
  4. 11 3
      template/erp/color_edit.html

+ 28 - 3
core/CoreApp/controllers/Color.php

@@ -138,7 +138,7 @@ class Color extends Start_Controller {
                 $start = ($page - 1)*$perpage;
             }
 			
-			$info_list = $this->color->find_all($where,'id,title,state,type,color,lowe,img,developer,craft_process,content,time,edittime',$order_str,$start,$perpage);
+			$info_list = $this->color->find_all($where,'id,title,state,type,color,lowe,img,developer,craft_process,gylj,scsx,content,time,edittime',$order_str,$start,$perpage);
 			foreach ($info_list as $key=>$value) 
 		    {
 				
@@ -211,8 +211,10 @@ class Color extends Start_Controller {
 					{
 						$info_list[$key]['img'] = '';
 					}
-				$info_list[$key]['time'] = date('Y-m-d H:i:s',$value['time']);
-				$info_list[$key]['edittime'] = date('Y-m-d H:i:s',$value['edittime']);
+				$info_list[$key]['gylj'] = empty($value['gylj'])?'':$value['gylj'];
+				$info_list[$key]['scsx'] = empty($value['scsx'])?'0':$value['scsx'];
+				$info_list[$key]['time'] = date('Y-m-d H:i',$value['time']);
+				$info_list[$key]['edittime'] = date('Y-m-d H:i',$value['edittime']);
 			}
 			$total = $this->color->find_count($where);
 		    $pagenum = ceil($total/$perpage);
@@ -259,6 +261,18 @@ class Color extends Start_Controller {
 			$post['content'] = $this->input->post('content',true);
 			$post['time'] = time();
 			$post['edittime'] = $post['time'];
+
+			$post['gylj'] = $this->input->post('gylj',true);
+			if(empty($post['scsx'])){
+				$post['scsx'] = 0;
+			}else{
+				if(is_numeric($post['scsx'])){
+					$post['scsx'] = $post['scsx']*1;
+				}else{
+					echo json_encode(array('msg'=>'请输入正确的生产时效!','success'=>false));exit;
+				}
+			}
+			
 			if($this->color->insert($post))
         	{
          		echo json_encode(array('msg'=>'添加成功','success'=>true));exit;
@@ -315,6 +329,17 @@ class Color extends Start_Controller {
 			}
 			$post['img'] = rtrim($img,'|');
 			$post['content'] = $this->input->post('content',true);
+			
+			$post['gylj'] = $this->input->post('gylj',true);
+			if(empty($post['scsx'])){
+				$post['scsx'] = 0;
+			}else{
+				if(is_numeric($post['scsx'])){
+					$post['scsx'] = $post['scsx']*1;
+				}else{
+					echo json_encode(array('msg'=>'请输入正确的生产时效!','success'=>false));exit;
+				}
+			}
 			$post['edittime'] = time();
 			if($this->color->save($post,$id))
         	{

+ 8 - 4
template/erp/color.html

@@ -56,6 +56,8 @@
 <td>图片</td>
 <td>对接人</td>
 <td>重要信息提醒</td>
+<td>工艺路径</td>
+<td>生产失效</td>
 <td>备注</td>
 <td>添加时间</td>
 <td>更新时间</td>
@@ -81,12 +83,14 @@ $(this).find('td:eq(2)').css("width","5%");
 $(this).find('td:eq(3)').css("width","6%");
 $(this).find('td:eq(4)').css("width","6%");
 $(this).find('td:eq(5)').css("width","6%");
-$(this).find('td:eq(6)').css("width","16%");
+$(this).find('td:eq(6)').css("width","14%");
 $(this).find('td:eq(7)').css("width","5%");
 $(this).find('td:eq(8)').css("width","8%");
-$(this).find('td:eq(9)').css("width","20%");
-$(this).find('td:eq(10)').css("width","8%");
-$(this).find('td:eq(11)').css("width","8%");
+$(this).find('td:eq(9)').css("width","10%");
+$(this).find('td:eq(10)').css("width","4%");
+$(this).find('td:eq(11)').css("width","12%");
+$(this).find('td:eq(12)').css("width","4%");
+$(this).find('td:eq(13)').css("width","4%");
 });}
 $(".excel").click(function() {
     var f = "";

+ 11 - 3
template/erp/color_add.html

@@ -55,15 +55,23 @@
 <span class="upimg"></span>
 <font>+</font>
 </li>
-
+<li class="length">
+    <em>重要信息提醒:</em>
+    <textarea name="craft_process" style="height:75px;"></textarea>
+</li>
 <li class="length remark">
 <em>情况备注:</em>
 <textarea name="content" style="height:75px;"></textarea>
 </li>
 <li class="length">
-    <em>重要信息提醒:</em>
-    <textarea name="craft_process" style="height:75px;"></textarea>
+<em>工艺路径:</em>
+<textarea name="gylj" style="height:75px;"></textarea>
 </li>
+<li class="length">
+<em>生产时间:</em>
+<input type="text" name="scsx" value="0" />
+</li>
+
 
 <div style="clear:both;"></div>
 </ul>

+ 11 - 3
template/erp/color_edit.html

@@ -58,14 +58,22 @@
 <span class="upimg">{$color['img']}</span>
 <font>+</font>
 </li>
-
+<li class="length">
+    <em>重要信息提醒:</em>
+    <textarea name="craft_process" style="height:75px;">{$color['craft_process']}</textarea>
+</li>
 <li class="length remark">
 <em>情况备注:</em>
 <textarea name="content" style="height:75px;">{$color['content']}</textarea>
 </li>
+
 <li class="length">
-    <em>重要信息提醒:</em>
-    <textarea name="craft_process" style="height:75px;">{$color['craft_process']}</textarea>
+<em>工艺路径:</em>
+<textarea name="gylj" style="height:75px;">{$color['gylj']}</textarea>
+</li>
+<li class="length">
+<em>生产时间:</em>
+<input type="text" name="scsx" value="{$color['scsx']}" />
 </li>
 
 <div style="clear:both;"></div>