|
@@ -138,19 +138,19 @@ class WaterQueryController
|
|
|
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $table[] = ['title' => '顶板', 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v ,'type' => 1];
|
|
|
+ $table[] = ['title' => '顶板', 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number'],'type' => 1];
|
|
|
}elseif ($k == '1*0.5'){
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['roof'])->where($where)->where([['long', '=', 1], ['wide', '=', 0.5]])->find();
|
|
|
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $table[] = ['title' => '顶板','name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v ,'type' => 1];
|
|
|
+ $table[] = ['title' => '顶板','name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number'],'type' => 1];
|
|
|
}elseif ($k == '0.5*0.5'){
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['roof'])->where($where)->where([['long', '=', 0.5], ['wide', '=', 0.5]])->find();
|
|
|
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $table[] = ['title' => '顶板','name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 1];
|
|
|
+ $table[] = ['title' => '顶板','name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number'], 'type' => 1];
|
|
|
}
|
|
|
}
|
|
|
// 底板
|
|
@@ -162,7 +162,7 @@ class WaterQueryController
|
|
|
$floor1 = $floor / $m2;
|
|
|
$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];
|
|
|
+ $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, 'weights' => $item['weight'] * $floor1,'weight' => $details['weight'],'code' => $details['number'], 'type' => 4];
|
|
|
}
|
|
|
}else {
|
|
|
$floor = $calculation['floor_number'];
|
|
@@ -180,7 +180,7 @@ class WaterQueryController
|
|
|
// }
|
|
|
$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];
|
|
|
+ $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, 'weights' => $item['weight'] * $floor1,'weight' => $details['weight'],'code' => $details['number'], 'type' => 4];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -195,19 +195,19 @@ class WaterQueryController
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['side_plate'][$storey-1])->where($where)->where([['long', '=', 1], ['wide', '=', 1]])->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $tables[] = ['title' => '侧板'.$storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 2];
|
|
|
+ $tables[] = ['title' => '侧板'.$storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v , 'weight' => $details['weight'],'code' => $details['number'],'type' => 2];
|
|
|
}elseif ($k == '1*0.5'){
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['side_plate'][$storey-1])->where($where)->where([['long', '=', 1], ['wide', '=', 0.5]])->find();
|
|
|
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $tables[] = ['title' => '侧板'.$storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 2];
|
|
|
+ $tables[] = ['title' => '侧板'.$storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number'], 'type' => 2];
|
|
|
}elseif ($k == '0.5*0.5'){
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['side_plate'][$storey-1])->where($where)->where([['long', '=', 0.5], ['wide', '=', 0.5]])->find();
|
|
|
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $tables[] = ['title' => '侧板'.$storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 2];
|
|
|
+ $tables[] = ['title' => '侧板'.$storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'m*'.$details['wide'].'m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number'], 'type' => 2];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -224,7 +224,7 @@ class WaterQueryController
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['lacing'][$lac_storey-1])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $tables1[] = ['title' => '主拉'.$lac_storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'*'.$details['wide'].'*'.'2.1', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 3];
|
|
|
+ $tables1[] = ['title' => '主拉'.$lac_storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'*'.$details['wide'].'*'.'2.1', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number'], 'type' => 3];
|
|
|
}
|
|
|
|
|
|
//辅拉
|
|
@@ -234,7 +234,7 @@ class WaterQueryController
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['fula'][$fula_storey-1])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $tables2[] = ['title' => '辅拉'.$fula_storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'*'.$details['wide'].'*'.'2.1', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 6];
|
|
|
+ $tables2[] = ['title' => '辅拉'.$fula_storey.'层' , 'name' => $details['name'], 'specifications' => $details['long'].'*'.$details['wide'].'*'.'2.1', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number'], 'type' => 6];
|
|
|
}
|
|
|
|
|
|
$table = array_merge($table, Array_reverse($tables1));
|
|
@@ -243,7 +243,7 @@ class WaterQueryController
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['column'])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $calculation['column_number'];
|
|
|
$zzl += $details['weight'] * $calculation['column_number'];
|
|
|
- $table[] = ['title' => '立柱' , 'name' => $details['name'], 'specifications' => $details['long'].'*'.$details['wide'].'*'.'2.1', 'number' => $calculation['column_number'], 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $calculation['column_number'], 'weight' => $details['weight'] * $calculation['column_number'] , 'type' => 5];
|
|
|
+ $table[] = ['title' => '立柱' , 'name' => $details['name'], 'specifications' => $details['long'].'*'.$details['wide'].'*'.'2.1', 'number' => $calculation['column_number'], 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $calculation['column_number'], 'weights' => $details['weight'] * $calculation['column_number'] ,'weight' => $details['weight'],'code' => $details['number'], 'type' => 5];
|
|
|
|
|
|
//保温
|
|
|
foreach ($calculation['warm'] as $k => $v){
|
|
@@ -251,17 +251,17 @@ class WaterQueryController
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['warm'])->where([['long', '=', 1], ['wide', '=', 1]])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '1m*1m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 7];
|
|
|
+ $table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '1m*1m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number']??'无', 'type' => 7];
|
|
|
}elseif ($k == 'warm2' and $v > 0){
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['warm'])->where([['long', '=', 1], ['wide', '=', 0.5]])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '1m*0.5m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 7];
|
|
|
+ $table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '1m*0.5m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number']??'无', 'type' => 7];
|
|
|
}elseif ($k == 'warm3' and $v > 0){
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['warm'])->where([['long', '=', 0.5], ['wide', '=', 0.5]])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $v;
|
|
|
$zzl += $details['weight'] * $v;
|
|
|
- $table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '0.5m*0.5m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weight' => $details['weight'] * $v , 'type' => 7];
|
|
|
+ $table[] = ['title' => '保温板' , 'name' => $details['name'], 'specifications' => '0.5m*0.5m', 'number' => $v, 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $v, 'weights' => $details['weight'] * $v ,'weight' => $details['weight'],'code' => $details['number']??'无', 'type' => 7];
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -270,7 +270,7 @@ class WaterQueryController
|
|
|
$details = WaterMaterialScience::where('cate_id', $data['channel'])->where($where)->find();
|
|
|
$zj += $details['unit_price'] * $calculation['channel_number'];
|
|
|
$zzl += $details['weight'] * $calculation['channel_number'];
|
|
|
- $table[] = ['title' => '槽钢' , 'name' => $details['name'], 'specifications' => $details['company'], 'number' => $calculation['channel_number'], 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $calculation['channel_number'], 'weight' => $details['weight'] * $calculation['channel_number'] , 'type' => 8];
|
|
|
+ $table[] = ['title' => '槽钢' , 'name' => $details['name'], 'specifications' => $details['company'], 'number' => $calculation['channel_number'], 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $calculation['channel_number'], 'weights' => $details['weight'] * $calculation['channel_number'] ,'weight' => $details['weight'],'code' => $details['number']??'无', 'type' => 8];
|
|
|
}
|
|
|
|
|
|
// 扶梯
|
|
@@ -278,7 +278,7 @@ class WaterQueryController
|
|
|
$details = WaterMaterialScience::where('cate_id', 9)->find();
|
|
|
$zj += $details['unit_price'] * $calculation['ladder'];
|
|
|
$zzl += $details['weight'] * $calculation['ladder'];
|
|
|
- $table[] = ['title' => '扶梯' , 'name' => $details['name'], 'specifications' => $details['company'], 'number' => $calculation['ladder'], 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $calculation['ladder'], 'weight' => $details['weight'] * $calculation['ladder'] , 'type' => 9];
|
|
|
+ $table[] = ['title' => '扶梯' , 'name' => $details['name'], 'specifications' => $details['company'], 'number' => $calculation['ladder'], 'unit_price' => $details['unit_price'], 'company' => $details['company'], 'ot_price' => $details['unit_price'] * $calculation['ladder'], 'weights' => $details['weight'] * $calculation['ladder'] ,'weight' => $details['weight'],'code' => $details['number']??'无', 'type' => 9];
|
|
|
}
|
|
|
|
|
|
foreach ($table as &$i){
|
|
@@ -290,6 +290,7 @@ class WaterQueryController
|
|
|
}else{
|
|
|
$zj += 105;
|
|
|
}
|
|
|
+ $zzl = $zzl * (sys_config('weight')/100);
|
|
|
if ($discount > 0){
|
|
|
foreach ($table as &$item)
|
|
|
{
|