lvhao vor 6 Stunden
Ursprung
Commit
b1f8d99dee

+ 10 - 1
core/CoreApp/controllers/Beihuogl.php

@@ -180,7 +180,7 @@ class Beihuogl extends Start_Controller {
                 $start = ($page - 1)*$perpage;
             }
 
-            $list = $this->bhsq->find_all($where,"id,shop_id,plat_id,title,sku,sqr,sq_num,sq_status,add_time,update_time,bh_no,u9sc_no,is_cx",$order_str,$start,$perpage);
+            $list = $this->bhsq->find_all($where,"id,shop_id,plat_id,title,sku,sqr,sq_num,sq_status,add_time,update_time,yqwc_time,bh_no,u9sc_no,is_cx",$order_str,$start,$perpage);
 
             if(empty($list)){
                 $rows = array('total'=>0,'over'=>1,'pagenum'=>0,'rows'=>([]));
@@ -213,6 +213,7 @@ class Beihuogl extends Start_Controller {
                 }
                 $str .=  "</div>";
                 $list[$k]['update_time'] = $str;
+                $list[$k]['yqwc_time'] = empty($v['yqwc_time'])?'':date("Y-m-d H:i",$v['yqwc_time']);
                 unset($list[$k]['bh_no']);
                 unset($list[$k]['u9sc_no']);
                 unset($list[$k]['is_cx']);
@@ -258,6 +259,9 @@ class Beihuogl extends Start_Controller {
             $insert_arr = [];
 
             $time = time();
+            if(empty($data['yqwc_time'])){
+                echo json_encode(['code'=>-1,'msg'=>'预期完工事时间为填写']);
+            }
             foreach($data['title'] as $k=>$v){
                 $insert_arr[] = [
                     'sb_no'=>$sb_no,
@@ -424,6 +428,11 @@ class Beihuogl extends Start_Controller {
                 'title'=>$data['title'],
                 'yqwc_time'=>empty($data['yqwc_time'])?0:strtotime($data['yqwc_time']),
             ];
+
+
+            if(empty($data['yqwc_time'])){
+                echo json_encode(['code'=>-1,'msg'=>'预期完工事时间为填写']);
+            }
             $r = $this->bhsq->save($update_arr,$id);
             if($r){
                 echo json_encode(['msg'=>'添加成功','success'=>true]);

+ 4 - 2
template/erp/beihuogl_dyapply.html

@@ -63,6 +63,7 @@
 <td>申请数量</td>
 <td>状态</td>
 <td>申请时间</td>
+<td>预计完工时间</td>
 <td>操作</td>
 </tr>
 </table>
@@ -98,8 +99,9 @@ $(".data tr").each(function() {
     $(this).find('td:eq(5)').css("width","6%");
     $(this).find('td:eq(6)').css("width","8%");
     $(this).find('td:eq(7)').css("width","6%");
-    $(this).find('td:eq(8)').css("width","8%");
-    $(this).find('td:eq(9)').css("width","15%");
+    $(this).find('td:eq(8)').css("width","6%");
+    $(this).find('td:eq(9)').css("width","6%");
+    $(this).find('td:eq(10)').css("width","15%");
   
 });}
 

+ 1 - 1
template/erp/beihuogl_dyapplyadd.html

@@ -146,7 +146,7 @@
 </li>
 <li >
     <em>预期完成时间:</em>
-    <input id="yqwc_time"  value="{date('Y-m-d',time())} 0:00" name="yqwc_time" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"  autocomplete="off">
+    <input id="yqwc_time"  value="" name="yqwc_time" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"  autocomplete="off">
 </li>
 <li class="length">
     <em>备注:</em>