lvhao 1 ماه پیش
والد
کامیت
03ade72c72

+ 29 - 0
core/CoreApp/controllers/Returngoods.php

@@ -161,6 +161,12 @@ class Returngoods extends Start_Controller {
             }
             $time = date("Y-m-d H:i:s",time());
             $type = $this->logic_order->getType("number = '".$post['number']."'");
+            //如果是tiktok的平台 需要添加紧急程度 和售后评价等级
+            if($type ==2){
+                if(empty($post['jjcd'])){
+                    echo json_encode(array('msg'=>'紧急程度必须选择!请选择','success'=>false));exit;
+                }
+            }
             if(empty($type)){
                 echo json_encode(array('msg'=>'订单信息存储表单异常','success'=>false));exit;
             }
@@ -175,6 +181,8 @@ class Returngoods extends Start_Controller {
                 "cate_one"=> $post['cate_one'],
                 "cate_two"=> empty($post['cate_two'])?0:$post['cate_two'],
                 "remark"=> $post['remark'],
+                'jjcd'=>empty($post['jjcd'])?0:$post['jjcd'],
+                'shpjxx'=>empty($post['shpjxx'])?0:$post['shpjxx'],
                 "create_time"=>$time,
                 "update_time"=>$time
             ];
@@ -219,6 +227,8 @@ class Returngoods extends Start_Controller {
             $this->data['status_list'] = $this->returngoods->getStatus(); 
             $this->data['cate_one_list'] = $this->returngoods->getCateOne();    
             $this->data['cate_two_list'] = json_encode($this->returngoods->getCateTwo());
+            $this->data['jjcd'] = $this->returngoods->getJinJiChengDu();
+            $this->data['shpjxx'] = $this->returngoods->getShouHouPingJiaXuanXian();
             $this->data['shop_info'] = $this->shop->read($order_info['shop']);
     		$this->_Template('returngoods_add',$this->data);
         }
@@ -251,13 +261,24 @@ class Returngoods extends Start_Controller {
                 echo json_encode(array('msg'=>'登记人名字必须填写!请填写','success'=>false));exit;
             }
             $time = date("Y-m-d H:i:s",time());
+            $type = $post['table_type'];
+            //如果是tiktok的平台 需要添加紧急程度 和售后评价等级
+            if($type ==2){
+                if(empty($post['jjcd'])){
+                    echo json_encode(array('msg'=>'紧急程度必须选择!请选择','success'=>false));exit;
+                }
+            }
             $insert_data  =[
                 'recorder'=>$post['recorder'],
                 "cate_one"=> $post['cate_one'],
                 "cate_two"=> empty($post['cate_two'])?0:$post['cate_two'],
                 "remark"=> $post['remark'],
+                'jjcd'=>empty($post['jjcd'])?0:$post['jjcd'],
+                'shpjxx'=>empty($post['shpjxx'])?0:$post['shpjxx'],
                 "update_time"=>$time
             ];
+           
+
 			if($this->returngoods->save($insert_data,$post['id']))
         	{   
                 $user = $this->user->get_api($_SESSION['api']);
@@ -291,6 +312,8 @@ class Returngoods extends Start_Controller {
         $this->data['cate_two_list'] = json_encode($cate_list);
         $this->data['cate_two_show'] =  $cate_list[$info['cate_one']];
         $this->data['shop_info'] = $this->shop->read($order_info['shop']);
+        $this->data['jjcd'] = $this->returngoods->getJinJiChengDu();
+        $this->data['shpjxx'] = $this->returngoods->getShouHouPingJiaXuanXian();
         $this->data['info'] = $info; 
 		$this->_Template('returngoods_edit',$this->data);
     }
@@ -599,6 +622,7 @@ class Returngoods extends Start_Controller {
             $cate_one_show = $this->returngoods->getCateOne();
             $cate_two_show = $this->returngoods->getCateTwo();
             $back_status_show = $this->returngoods->getBackStatus();
+            $jjcd_list = $this->returngoods->getJinJiChengDu();
             //格式化数据
             foreach ($info_list as $key=>$value) 
 		    {			
@@ -626,6 +650,11 @@ class Returngoods extends Start_Controller {
                 }else{
                     $tmp['cate_show'] = $cate_one_show[$value['cate_one']]."-".$cate_two_show[$value['cate_one']][$value['cate_two']];
                 }
+                if($value['table_type'] == 2){
+                    $tmp['jjcd'] = isset($jjcd_list[$value['jjcd']])?$jjcd_list[$value['jjcd']]:"异常";
+                }else{
+                    $tmp['jjcd'] ="  --  ";
+                }   
                 if(empty($forder_info['orderremarks'])){
                     $tmp['remark'] = $value['remark'];
                 }else{

+ 17 - 1
core/CoreApp/models/Model_returngoods.php

@@ -105,5 +105,21 @@ class Model_returngoods extends Lin_Model
         ];
     }
 
-  
+    public function getJinJiChengDu(){
+        return [
+            1=>"轻微",
+            2=>"中等",
+            3=>"重度",
+        ];
+    }
+    public function getShouHouPingJiaXuanXian(){
+        return [
+            0=>"未评价",
+            1=>"1星",
+            2=>"2星",
+            3=>"3星",
+            4=>"4星",
+            5=>"5星",
+        ];
+    }
 }  //end class

+ 9 - 4
template/erp/returngoods.html

@@ -131,6 +131,7 @@
 <td>订单号</td>
 <td>编号</td>
 <td>登记原因</td>
+<td>紧急程度</td>
 <td>售后备注</td>
 <td>售后处理类型</td>
 <td>重发订单编号</td>
@@ -166,13 +167,17 @@ $(this).find('td:eq(1)').css("width","7%");
 $(this).find('td:eq(2)').css("width","7%");
 $(this).find('td:eq(3)').css("width","7%");
 $(this).find('td:eq(4)').css("width","9%");
-$(this).find('td:eq(5)').css("width","22%");
-$(this).find('td:eq(6)').css("width","10%");
-$(this).find('td:eq(7)').css("width","7%");
-$(this).find('td:eq(8)').css("width","5%");
+
+$(this).find('td:eq(5)').css("width","5%");
+
+$(this).find('td:eq(6)').css("width","20%");
+$(this).find('td:eq(7)').css("width","10%");
+$(this).find('td:eq(8)').css("width","7%");
 $(this).find('td:eq(9)').css("width","5%");
 $(this).find('td:eq(10)').css("width","5%");
 $(this).find('td:eq(11)').css("width","5%");
+$(this).find('td:eq(12)').css("width","5%");
+$(this).find('td:eq(13)').css("width","7%");
 // $(this).find('td:eq(11)').css("width","5%");
 
 });}

+ 17 - 1
template/erp/returngoods_add.html

@@ -35,7 +35,23 @@
         <option value="">请选择</option>
     </select>
 </li>
-
+<li>
+    <em>紧急程度:</em>
+    <select name="jjcd" class="select ">
+        <option value="">请选择</option>
+        {loop $jjcd as $key=>$val}
+            <option value="{$key}">{$val}</option>
+        {/loop}
+    </select>
+</li>
+<li>
+    <em>评价选项:</em>
+    <select name="shpjxx" class="select ">
+        {loop $shpjxx as $key=>$val}
+            <option value="{$key}">{$val}</option>
+        {/loop}
+    </select>
+</li>
 <li  class="length" >
     <em>备注信息:</em>
     <textarea name="remark" style="height: 30vh;" placeholder="备注信息"></textarea>

+ 21 - 1
template/erp/returngoods_edit.html

@@ -40,13 +40,33 @@
     </select>
 </li>
 
+{if $info['table_type'] == 2}
+<li>
+    <em>紧急程度:</em>
+    <select name="jjcd" class="select ">
+        <option value="">请选择</option>
+        {loop $jjcd as $key=>$val}
+            <option {if ($key == $info['jjcd'])}selected{/if} value="{$key}">{$val}</option>
+        {/loop}
+    </select>
+</li>
+<li>
+    <em>评价选项:</em>
+    <select name="shpjxx" class="select ">
+        {loop $shpjxx as $key=>$val}
+            <option {if ($key == $info['shpjxx'])}selected{/if} value="{$key}">{$val}</option>
+        {/loop}
+    </select>
+</li>
+{/if}
+
 <li  class="length" >
     <em>备注信息:</em>
     <textarea name="remark" style="height: 30vh;" placeholder="备注信息">{$info['remark']}</textarea>
 </li>
 
 <div >
-    
+    <input type="hidden" name="table_type" value="{$info['table_type']}">
     
 </div>
 <div style="clear:both;"></div>