Kaynağa Gözat

添加了 在编辑订单页面提交信息 一定要又打印类型 如果没有提示报错

lvhao 5 gün önce
ebeveyn
işleme
eb271b72c8

+ 13 - 0
core/CoreApp/models/Model_logic_order.php

@@ -163,6 +163,12 @@ class Model_logic_order extends Lin_Model {
  
     //根据提交信息 校验一下快递是够满足对应条件
     public function checkEditExpress($post){
+        if(empty($post['printtype'])){
+            return [
+                'code'=>-1,
+                "msg"=>"请选择打印类型!"
+            ];
+        }
         //1 dhl官方只允许提交6个申报名字
         if($post['express'] == 1){
             if(!in_array($post['sbpm'],[
@@ -332,6 +338,13 @@ class Model_logic_order extends Lin_Model {
 
     //根据提交信息 校验一下客户下单是否正确
     public function checkEditCustomer($post){
+
+        if(empty($post['printtype'])){
+            return [
+                'code'=>-1,
+                "msg"=>"请选择打印类型!"
+            ];
+        }
         if($post['zsbjz']*1 < 0.01){
             return [
                 'code'=>-1,

+ 1 - 1
template/erp/fullordersmt_edit.html

@@ -423,7 +423,7 @@
 </li>
 
 <li>
-<em>打印类型:{$fullordersmt['printtype']}</em>
+<em>打印类型:</em>
 <select name="printtype" class="printtype select class">
 {if $fullordersmt['type'] == 5}
 <option value="1" {if $fullordersmt['printtype'] == 1}selected="selected"{/if}>运单</option>