Browse Source

【新品/新色配图】页面优化 修改

lvhao 2 months ago
parent
commit
6510bd0e93

+ 17 - 1
core/CoreApp/controllers/Color.php

@@ -191,13 +191,18 @@ class Color extends Start_Controller {
 		}
         $this->_Template('color',$this->data);
 	}
-	
+
 	public function _add()
 	{
 		$post = $this->input->post(NULL, TRUE);
 		if(isset($post['title']))
 		{
 			$title = $this->input->post('title',true);
+			$num = $this->color->find_count("title = '$title'");
+			if($num > 0){
+				echo json_encode(array('msg'=>'该标题已经存在,请重新输入!','success'=>false));exit;
+			}
+
 			$img = $this->input->post('img',true);
 			if($img == '')
 			{
@@ -224,6 +229,17 @@ class Color extends Start_Controller {
 		$post = $this->input->post(NULL, TRUE);
 		if(isset($post['id']))
 		{
+
+			$title = $this->input->post('title',true);
+			if(empty($title)){
+				echo json_encode(array('msg'=>'标题不能为空!','success'=>false));exit;
+			}
+			$num = $this->color->find_count("title = '$title' and id != ".$post['id']);
+			if($num > 0){
+				echo json_encode(array('msg'=>'该标题已经存在,请重新输入!','success'=>false));exit;
+			}
+
+
 			$id = $this->input->post('id',true);
 			$post['warehouse'] = $this->input->post('warehouse',true);
 			$img = $this->input->post('img',true);

+ 1 - 1
template/erp/color.html

@@ -47,7 +47,7 @@
 <td>曲度</td>
 <td>图片</td>
 <td>开发人</td>
-<td>工艺流程</td>
+<td>重要信息提醒</td>
 <td>备注</td>
 <td>添加时间</td>
 </tr>

+ 1 - 1
template/erp/color_add.html

@@ -61,7 +61,7 @@
 <textarea name="content" style="height:75px;"></textarea>
 </li>
 <li class="length">
-    <em>工艺流程:</em>
+    <em>重要信息提醒:</em>
     <textarea name="craft_process" style="height:75px;"></textarea>
 </li>
 

+ 1 - 1
template/erp/color_edit.html

@@ -64,7 +64,7 @@
 <textarea name="content" style="height:75px;">{$color['content']}</textarea>
 </li>
 <li class="length">
-    <em>工艺流程:</em>
+    <em>重要信息提醒:</em>
     <textarea name="craft_process" style="height:75px;">{$color['craft_process']}</textarea>
 </li>