Browse Source

提交数据

lvhao 5 months ago
parent
commit
d55322bf64
2 changed files with 56 additions and 4 deletions
  1. 56 0
      core/CoreApp/controllers/Zzququeu9.php
  2. 0 4
      template/erp/zzququeu9zt.html

+ 56 - 0
core/CoreApp/controllers/Zzququeu9.php

@@ -39,6 +39,10 @@ class Zzququeu9 extends Start_Controller {
           {
           {
                $this->_xs_two($arg_array);
                $this->_xs_two($arg_array);
           }
           }
+          elseif($arg == 'dczt')//在途的调出单
+          {
+               $this->_dczt($arg_array);
+          }
           elseif($arg == 'add'){
           elseif($arg == 'add'){
                $this->_add();
                $this->_add();
           }
           }
@@ -770,4 +774,56 @@ class Zzququeu9 extends Start_Controller {
 
 
      $this->_Template('zzququeu9zt',$this->data);
      $this->_Template('zzququeu9zt',$this->data);
     }
     }
+
+    public function _dczt(){
+     $process= $arg_array[0];
+      $id = $arg_array[1];
+      $info = $this->zzquque_u9->read($id);
+      var_dump($info);
+      die;
+      if($process == 1){
+          if(!in_array($info['dc_status'],[0,-1])){
+               echo json_encode(array('msg'=>'当前状态不符合创建调出单的条件','success'=>false));
+               exit;
+          }
+          $r = $this->logic_u9xgsd->createDc($info);
+          if($r['code'] == 1){
+               echo json_encode(array('msg'=>'创建调出单成功','success'=>true));
+               exit;
+          }else{
+               echo json_encode(array('msg'=>$r['msg'],'success'=>false));
+               exit;
+          }
+      }else if($process == 2){
+          if(!in_array($info['dc_status'],[1,-2])){
+               echo json_encode(array('msg'=>'当前状态不符合提交调出单的条件','success'=>false));
+               exit;
+          }
+          $r = $this->logic_u9xgsd->subDc($info);
+          if($r['code'] == 1){
+               echo json_encode(array('msg'=>'提交调出单成功','success'=>true));
+               exit;
+          }else{
+               echo json_encode(array('msg'=>$r['msg'],'success'=>false));
+               exit;
+          }
+      }else if($process == 3){
+          if(!in_array($info['dc_status'],[2,-3])){
+               echo json_encode(array('msg'=>'当前状态不符合审核调出单的条件','success'=>false));
+               exit;
+          }
+          $r = $this->logic_u9xgsd->shDc($info);
+          if($r['code'] == 1){
+               echo json_encode(array('msg'=>'审核调出单成功','success'=>true));
+               exit;
+          }else{
+               echo json_encode(array('msg'=>$r['msg'],'success'=>false));
+               exit;
+          }
+      }else{
+          echo json_encode(array('msg'=>'当前状态不符合创建调出单的条件','success'=>false));
+          exit;
+      }
+     
+    }
 }
 }

+ 0 - 4
template/erp/zzququeu9zt.html

@@ -112,10 +112,6 @@
             let action = $(that).data('action')
             let action = $(that).data('action')
             let process = $(that).data('process')
             let process = $(that).data('process')
             let id = $(that).data('id')
             let id = $(that).data('id')
-            alert(action)
-            alert(process)
-            alert(id)
-            return
             layx.load('loadId','提交中,请稍后',{shadable:0.6});
             layx.load('loadId','提交中,请稍后',{shadable:0.6});
             $.ajax({
             $.ajax({
                 url:"/zzququeu9/"+action+"/"+process+"/"+id,
                 url:"/zzququeu9/"+action+"/"+process+"/"+id,