hrjy 2 years ago
parent
commit
a7ea58e060

+ 1 - 0
app/admin/controller/water/WaterCate.php

@@ -44,6 +44,7 @@ class WaterCate extends AuthController
             ['name', ''],
             ['role', ''],
             ['type', ''],
+            ['gc', ''],
         ]);
 
         return Json::successlayui(model::list($where));

+ 7 - 0
app/admin/model/water/WaterCate.php

@@ -44,6 +44,13 @@ class WaterCate extends BaseModel
 
         if ($where['name'])$model->where('name' , 'like', '%'.$where['name'].'%');
         if ($where['type'])$model->where('type' , $where['type']);
+        if ($where['gc']){
+            if ($where['gc'] == 1){
+                $model->where('is_gc', 0);
+            }else{
+                $model->where('is_gc', 1);
+            }
+        }
         $data['count'] = $model->count();
         if ($where['page'] && $where['limit']){
             $model->page($where['page'], $where['limit']);

+ 10 - 0
app/admin/view/water/water_cate/index.php

@@ -57,6 +57,16 @@
                                             </select>
                                         </div>
                                     </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label" style="top: -4.5px">公差</label>
+                                        <div class="layui-input-block">
+                                            <select name="gc">
+                                                <option value="">全部</option>
+                                                <option value="1">正常</option>
+                                                <option value="2">大公差</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                                 <div class="layui-inline">
                                     <div class="layui-input-inline">

+ 4 - 0
app/admin/view/water/water_query/details.php

@@ -21,6 +21,7 @@
                             <th class="text-center">数量</th>
                             <th class="text-center">单价</th>
                             <th class="text-center">总价</th>
+                            <th class="text-center">重量</th>
                             <th class="text-center">分类</th>
                             <th class="text-center">单位</th>
                         </tr>
@@ -49,6 +50,9 @@
                             <td class="text-center">
                                 {$vo.ot_price}
                             </td>
+                            <td class="text-center">
+                                {$vo.weight}
+                            </td>
                             <td class="text-center">
                                 {if condition="$vo['type'] eq 1"}
                                 顶板

+ 5 - 3
app/api/controller/water/WaterQueryController.php

@@ -160,7 +160,9 @@ class WaterQueryController
             foreach ($science as $item) {
                 $m2 = $item['long'] * $item['wide'];
                 $floor1 = $floor / $m2;
-                $table[] = ['title' => '底板', 'name' => $item['name'], 'specifications' =>  $item['long'].'m*'.$item['wide'].'m', 'number' => $floor1, 'unit_price' => $item['unit_price'], 'company' => $item['company'], 'ot_price' => $item['unit_price'] * $floor1, 'weight' => $item['weight'] * $v, 'type' => 4];
+                $zj +=  $item['unit_price'] * $floor1;
+                $zzl += $item['weight'] * $floor1;
+                $table[] = ['title' => '底板', 'name' => $item['name'], 'specifications' =>  $item['long'].'m*'.$item['wide'].'m', 'number' => $floor1, 'unit_price' => $item['unit_price'], 'company' => $item['company'], 'ot_price' => $item['unit_price'] * $floor1, 'weight' => $item['weight'] * $floor1, 'type' => 4];
             }
         }else {
             $floor = $calculation['floor_number'];
@@ -177,8 +179,8 @@ class WaterQueryController
 //                            $floor = 0;
 //                        }
                         $zj +=  $item['unit_price'] * $floor1;
-                        $zzl += $item['weight'] * $v;
-                        $table[] = ['title' => '底板', 'name' => $item['name'], 'specifications' =>  $item['long'].'m*'.$item['wide'].'m', 'number' => $floor1, 'unit_price' => $item['unit_price'], 'company' => $item['company'], 'ot_price' => $item['unit_price'] * $floor1, 'weight' => $item['weight'] * $v, 'type' => 4];
+                        $zzl += $item['weight'] * $floor1;
+                        $table[] = ['title' => '底板', 'name' => $item['name'], 'specifications' =>  $item['long'].'m*'.$item['wide'].'m', 'number' => $floor1, 'unit_price' => $item['unit_price'], 'company' => $item['company'], 'ot_price' => $item['unit_price'] * $floor1, 'weight' => $item['weight'] * $floor1, 'type' => 4];
                     }
                 }
             }