Browse Source

修改发货单

huangsanjia 2 years ago
parent
commit
bb7f3aade2

+ 7 - 2
Application/Admin/Controller/ExportController.class.php

@@ -1089,8 +1089,13 @@ $data['s_weight'] = $data['s_weight']/1000;
         $data = M('goods')->find($id);
         $export_ids = explode(',',$data['export_ids']);
         $arr = [];
-        foreach($export_ids as $v){
-            $arr[] = M('qcode_export')->find($v);
+        foreach($export_ids as $key=>$v){
+            $arr[$key] = M('qcode_export')->find($v);
+            $large_str = explode(',',$arr[$key]['large_str']);
+            $map = [];
+            $map['id'] = array('in',$large_str);
+            $large_num = M('qcode_large')->where($map)->sum('l_num');
+            $arr[$key]['l_num'] = $large_num / 10000;
         }
         $address = $model->query("select u.company_address as address from qr_goods g left join qr_admin_user u on u.id=g.supplier_id where g.id=".$id)[0]['address'];
         $data['address']=$address;

+ 1 - 1
Application/Admin/View/Export/fahuo.html

@@ -308,7 +308,7 @@
                     html+= '<td class="tg-031e">'+arr[i].small_num+'</td>';
                     if(arr[i].mater_type==1){
 						html+= '<td class="tg-031e">万张</td>';
-                        html+='<td class="tg-031e">'+parseFloat(arr[i].num)*parseFloat(arr[i].small_num)/10000+'</td>';
+                        html+='<td class="tg-031e">'+arr[i].l_num+'</td>';
                         html+='<td class="tg-031e" >'+arr[i].small_num+'件*'+parseInt(arr[i].num)+'张'+'</td>';
                     }else if (arr[i].mater_type==2){
 						html+= '<td class="tg-031e">kg</td>';