update 19_12
This commit is contained in:
parent
aa1019314c
commit
dfa54182b1
|
|
@ -29,6 +29,20 @@ class Production extends ComponentBase
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function calculateHoursAndMinutes($date, $time)
|
||||||
|
{
|
||||||
|
// Assuming $this->date_column and $this->time_column are your actual column names
|
||||||
|
$dateTime = Carbon::parse($date." ".$time);
|
||||||
|
|
||||||
|
// Get the current date and time
|
||||||
|
$now = Carbon::now();
|
||||||
|
|
||||||
|
// Calculate the difference in hours and minutes
|
||||||
|
$diffInHours = $dateTime->diffInHours($now);
|
||||||
|
$diffInMinutes = $dateTime->diffInMinutes($now) % 60;
|
||||||
|
|
||||||
|
return ['hours' => $diffInHours, 'minutes' => $diffInMinutes];
|
||||||
|
}
|
||||||
|
|
||||||
public function onReportProduction()
|
public function onReportProduction()
|
||||||
{
|
{
|
||||||
|
|
@ -80,6 +94,9 @@ class Production extends ComponentBase
|
||||||
$diffMinutes = Carbon::parse($calc->max_time)->diffInMinutes($calc->min_time);
|
$diffMinutes = Carbon::parse($calc->max_time)->diffInMinutes($calc->min_time);
|
||||||
$calcTimeDiff = floor($diffMinutes / 60) . ' sagat ' . ($diffMinutes - floor($diffMinutes / 60) * 60) . ' minut';
|
$calcTimeDiff = floor($diffMinutes / 60) . ' sagat ' . ($diffMinutes - floor($diffMinutes / 60) * 60) . ' minut';
|
||||||
|
|
||||||
|
$calcq = $this->calculateHoursAndMinutes($calc->date, $calc->time);
|
||||||
|
|
||||||
|
// dd($calcq);
|
||||||
|
|
||||||
$productionsCalcPivot->whereBetween('date', [$start, $end]);
|
$productionsCalcPivot->whereBetween('date', [$start, $end]);
|
||||||
|
|
||||||
|
|
@ -97,7 +114,7 @@ class Production extends ComponentBase
|
||||||
|
|
||||||
$pivotIds = PivotProductionModel::whereIn('production_id', $calculationAmountqq)->get()->pluck('id')->toArray();
|
$pivotIds = PivotProductionModel::whereIn('production_id', $calculationAmountqq)->get()->pluck('id')->toArray();
|
||||||
|
|
||||||
$calculationAmount = ProductionCalculateModel::whereIn('prev_pivot_id', $pivotIds)->sum("amount_calc");
|
$calculationAmount = ProductionCalculateModel::whereIn('production_id', $calculationAmountqq)->sum("amount_calc");
|
||||||
|
|
||||||
|
|
||||||
//dd($pivotIds);
|
//dd($pivotIds);
|
||||||
|
|
@ -105,15 +122,15 @@ class Production extends ComponentBase
|
||||||
$html_data = '';
|
$html_data = '';
|
||||||
for ($x = 0; $x < count($productionsFiltered); $x++) {
|
for ($x = 0; $x < count($productionsFiltered); $x++) {
|
||||||
$date = "";
|
$date = "";
|
||||||
if($productionsFiltered[$x]->date != null){
|
if ($productionsFiltered[$x]->date != null) {
|
||||||
$date = Carbon::parse($productionsFiltered[$x]->date)->format('d.m.Y').' | '.$productionsFiltered[$x]->time;
|
$date = Carbon::parse($productionsFiltered[$x]->date)->format('d.m.Y') . ' | ' . $productionsFiltered[$x]->time;
|
||||||
}else{
|
} else {
|
||||||
$date = "";
|
$date = "";
|
||||||
}
|
}
|
||||||
// dd($productionsFiltered[0]->shift->desc);
|
// dd($productionsFiltered[0]->shift->desc);
|
||||||
$html_data .= '<tr>
|
$html_data .= '<tr>
|
||||||
<td style="font-weight: bold;width: 5%;">' . ($x + 1) . '</td>
|
<td style="font-weight: bold;width: 5%;">' . ($x + 1) . '</td>
|
||||||
<td><a href="#'.$productionsFiltered[$x]->id.'" style="font-weight: bold;color: #0005c5;">' . $date . '</a></td>
|
<td><a href="#' . $productionsFiltered[$x]->id . '" style="font-weight: bold;color: #0005c5;">' . $date . '</a></td>
|
||||||
<td><a href="#" style="font-weight: bold;color: #1e2038;">' . $productionsFiltered[$x]->shift->desc . '</a></td>
|
<td><a href="#" style="font-weight: bold;color: #1e2038;">' . $productionsFiltered[$x]->shift->desc . '</a></td>
|
||||||
<td style="text-align: center;">
|
<td style="text-align: center;">
|
||||||
<span class="badge badge-soft-info"
|
<span class="badge badge-soft-info"
|
||||||
|
|
@ -144,7 +161,7 @@ class Production extends ComponentBase
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="card bg-info text-white-50">
|
<div class="card bg-info text-white-50">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i class="mdi mdi-bullseye-arrow me-3"></i>Sarp Edilen Wagt: ' . $calcTimeDiff . ' sany</h5>
|
<h5 class="text-white" style="text-transform: uppercase;margin-bottom: 0;"><i class="mdi mdi-bullseye-arrow me-3"></i>Sarp Edilen Wagt: ' . $calcTimeDiff . '</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -413,9 +430,9 @@ class Production extends ComponentBase
|
||||||
|
|
||||||
$productionPivot = PivotProductionModel::where('production_id', $todayProductionsGet->id)->where("product_id", $data["prod_id"])->first();
|
$productionPivot = PivotProductionModel::where('production_id', $todayProductionsGet->id)->where("product_id", $data["prod_id"])->first();
|
||||||
|
|
||||||
if(!$productionPivot){
|
if (!$productionPivot) {
|
||||||
$amountPERC = 0;
|
$amountPERC = 0;
|
||||||
}else{
|
} else {
|
||||||
$amountPERC = $productionPivot->amount_percentage;
|
$amountPERC = $productionPivot->amount_percentage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -469,7 +486,6 @@ class Production extends ComponentBase
|
||||||
$productionCalulate->amount_calc = (float)(((float) $data[$fieldName] ?? 0) / 100) * ((float) $diffCalc);
|
$productionCalulate->amount_calc = (float)(((float) $data[$fieldName] ?? 0) / 100) * ((float) $diffCalc);
|
||||||
$productionCalulate->amount_percentage = (float) $data[$fieldName] ?? 0;
|
$productionCalulate->amount_percentage = (float) $data[$fieldName] ?? 0;
|
||||||
$productionCalulate->save();
|
$productionCalulate->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($updatePivotProduction) {
|
if ($updatePivotProduction) {
|
||||||
|
|
@ -492,43 +508,46 @@ class Production extends ComponentBase
|
||||||
Flash::error("Ekstrudor Saýla!");
|
Flash::error("Ekstrudor Saýla!");
|
||||||
return Redirect::refresh();
|
return Redirect::refresh();
|
||||||
} else {
|
} else {
|
||||||
$createProduction = new ProductionModel();
|
$todayProductionsGet = ProductionModel::where("excruiter_id", $excruiter)->orderBy("id", "DESC")->first();
|
||||||
|
//dd($todayProductionsGet);
|
||||||
|
if ($todayProductionsGet) {
|
||||||
|
// Flash::error("1");
|
||||||
|
// return Redirect::refresh();
|
||||||
|
$createProduction = new ProductionModel();
|
||||||
|
|
||||||
$createProduction->all_amount = $data["all_amount"];
|
$createProduction->all_amount = $data["all_amount"];
|
||||||
$createProduction->note = $data["note"];
|
$createProduction->note = $data["note"];
|
||||||
$createProduction->user_id = $user->id;
|
$createProduction->user_id = $user->id;
|
||||||
$createProduction->date = Carbon::parse($data["date"])->format('Y-m-d');
|
$createProduction->date = Carbon::parse($data["date"])->format('Y-m-d');
|
||||||
$createProduction->time = Carbon::parse($data["time"])->format('H:i:s');
|
$createProduction->time = Carbon::parse($data["time"])->format('H:i:s');
|
||||||
$createProduction->excruiter_id = $excruiter;
|
|
||||||
$createProduction->shift_id = $data["shift_id"];
|
|
||||||
$createProduction->save();
|
|
||||||
|
|
||||||
$products = ProductModel::where("report", "simple")->orderBy('order', 'ASC')->get();
|
|
||||||
|
|
||||||
for ($x = 0; $x < count($products); $x++) {
|
|
||||||
$fieldName = "product_" . $products[$x]->id;
|
|
||||||
|
|
||||||
$createPivotProduction = new PivotProductionModel();
|
|
||||||
$createPivotProduction->production_id = $createProduction->id;
|
|
||||||
$createPivotProduction->product_id = $products[$x]->id;
|
|
||||||
$createPivotProduction->amount_percentage = (float) $data[$fieldName] ?? 0;
|
|
||||||
$createPivotProduction->product_name = $products[$x]->name;
|
|
||||||
$createPivotProduction->product_code = $products[$x]->code;
|
|
||||||
$createProduction->excruiter_id = $excruiter;
|
$createProduction->excruiter_id = $excruiter;
|
||||||
$createPivotProduction->amount = (float)(((float) $data[$fieldName] ?? 0) / 100) * ((float) $createProduction->all_amount);
|
$createProduction->shift_id = $data["shift_id"];
|
||||||
|
$createProduction->save();
|
||||||
|
|
||||||
$createPivotProduction->date = Carbon::parse($data["date"])->format('Y-m-d');
|
$products = ProductModel::where("report", "simple")->orderBy('order', 'ASC')->get();
|
||||||
$createPivotProduction->time = Carbon::parse($data["time"])->format('H:i:s');
|
|
||||||
$createPivotProduction->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
for ($x = 0; $x < count($products); $x++) {
|
||||||
|
$fieldName = "product_" . $products[$x]->id;
|
||||||
|
|
||||||
$todayProductionsCount = ProductionModel::whereDate('date', date($createProduction->date))->where("excruiter_id", $excruiter)->count();
|
$createPivotProduction = new PivotProductionModel();
|
||||||
|
$createPivotProduction->production_id = $createProduction->id;
|
||||||
|
$createPivotProduction->product_id = $products[$x]->id;
|
||||||
|
$createPivotProduction->amount_percentage = (float) $data[$fieldName] ?? 0;
|
||||||
|
$createPivotProduction->product_name = $products[$x]->name;
|
||||||
|
$createPivotProduction->product_code = $products[$x]->code;
|
||||||
|
$createPivotProduction->excruiter_id = $excruiter;
|
||||||
|
$createPivotProduction->amount = (float)(((float) $data[$fieldName] ?? 0) / 100) * ((float) $createProduction->all_amount);
|
||||||
|
|
||||||
if ($todayProductionsCount > 1) {
|
$createPivotProduction->date = Carbon::parse($data["date"])->format('Y-m-d');
|
||||||
|
$createPivotProduction->time = Carbon::parse($data["time"])->format('H:i:s');
|
||||||
|
$createPivotProduction->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
// if ($todayProductionsCount > 1) {
|
||||||
// $todayProductionsGetLast = ProductionModel::whereDate('date', date($createProduction->date))->where("excruiter_id", $excruiter)->orderBy("id", "DESC")->first();
|
// $todayProductionsGetLast = ProductionModel::whereDate('date', date($createProduction->date))->where("excruiter_id", $excruiter)->orderBy("id", "DESC")->first();
|
||||||
|
|
||||||
$todayProductionsGet = ProductionModel::whereDate('date', date($createProduction->date))->where("excruiter_id", $excruiter)->orderBy("id", "DESC")->skip(1)->first();
|
|
||||||
|
|
||||||
|
|
||||||
$productionPivots = PivotProductionModel::where('production_id', $todayProductionsGet->id)->get();
|
$productionPivots = PivotProductionModel::where('production_id', $todayProductionsGet->id)->get();
|
||||||
|
|
||||||
|
|
@ -550,14 +569,52 @@ class Production extends ComponentBase
|
||||||
$createCalculate->current_pivot_id = $currentPivot->id;
|
$createCalculate->current_pivot_id = $currentPivot->id;
|
||||||
$createCalculate->prev_pivot_id = $productionPivots[$x]->id;
|
$createCalculate->prev_pivot_id = $productionPivots[$x]->id;
|
||||||
|
|
||||||
$createCalculate->date = $productionPivots[$x]->date;
|
$createCalculate->date = $todayProductionsGet->date;
|
||||||
$createCalculate->time = $productionPivots[$x]->time;
|
$createCalculate->time = $todayProductionsGet->time;
|
||||||
|
|
||||||
$createCalculate->save();
|
$createCalculate->save();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
// Flash::error("2");
|
||||||
|
// return Redirect::refresh();
|
||||||
|
$createProduction = new ProductionModel();
|
||||||
|
|
||||||
|
$createProduction->all_amount = $data["all_amount"];
|
||||||
|
$createProduction->note = $data["note"];
|
||||||
|
$createProduction->user_id = $user->id;
|
||||||
|
$createProduction->date = Carbon::parse($data["date"])->format('Y-m-d');
|
||||||
|
$createProduction->time = Carbon::parse($data["time"])->format('H:i:s');
|
||||||
|
$createProduction->excruiter_id = $excruiter;
|
||||||
|
$createProduction->shift_id = $data["shift_id"];
|
||||||
|
$createProduction->save();
|
||||||
|
|
||||||
|
$products = ProductModel::where("report", "simple")->orderBy('order', 'ASC')->get();
|
||||||
|
|
||||||
|
for ($x = 0; $x < count($products); $x++) {
|
||||||
|
$fieldName = "product_" . $products[$x]->id;
|
||||||
|
|
||||||
|
$createPivotProduction = new PivotProductionModel();
|
||||||
|
$createPivotProduction->production_id = $createProduction->id;
|
||||||
|
$createPivotProduction->product_id = $products[$x]->id;
|
||||||
|
$createPivotProduction->amount_percentage = (float) $data[$fieldName] ?? 0;
|
||||||
|
$createPivotProduction->product_name = $products[$x]->name;
|
||||||
|
$createPivotProduction->product_code = $products[$x]->code;
|
||||||
|
$createPivotProduction->excruiter_id = $excruiter;
|
||||||
|
$createPivotProduction->amount = (float)(((float) $data[$fieldName] ?? 0) / 100) * ((float) $createProduction->all_amount);
|
||||||
|
|
||||||
|
$createPivotProduction->date = Carbon::parse($data["date"])->format('Y-m-d');
|
||||||
|
$createPivotProduction->time = Carbon::parse($data["time"])->format('H:i:s');
|
||||||
|
$createPivotProduction->save();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
if ($createProduction && $createPivotProduction) {
|
if ($createProduction && $createPivotProduction) {
|
||||||
Flash::success("Hasabat Ustunlikli Goşuldy");
|
Flash::success("Hasabat Ustunlikli Goşuldy");
|
||||||
return Redirect::refresh();
|
return Redirect::refresh();
|
||||||
|
|
@ -608,7 +665,4 @@ class Production extends ComponentBase
|
||||||
return Redirect::refresh();
|
return Redirect::refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class PivotProduction extends Model
|
||||||
public $hasMany = [
|
public $hasMany = [
|
||||||
'pivot_production_calculate' => [
|
'pivot_production_calculate' => [
|
||||||
'Romanah\Gokbakja\Models\ProductionCalculate',
|
'Romanah\Gokbakja\Models\ProductionCalculate',
|
||||||
'key' => 'prev_pivot_id',
|
'key' => 'current_pivot_id',
|
||||||
'softDelete' => true
|
'softDelete' => true
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,7 @@ class Production extends Model
|
||||||
],
|
],
|
||||||
'pivot_production_calculation' => [
|
'pivot_production_calculation' => [
|
||||||
'Romanah\Gokbakja\Models\ProductionCalculate',
|
'Romanah\Gokbakja\Models\ProductionCalculate',
|
||||||
'key' => 'production_id',
|
'key' => 'production_id'
|
||||||
'softDelete' => true
|
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -229,9 +229,18 @@ function onStart() {
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
{% set allCalc = 0 %}
|
||||||
|
{% set allCalcDefect = 0 %}
|
||||||
|
{% set allCalcDefectRep = 0 %}
|
||||||
|
{% set allAmountSum = 0 %}
|
||||||
|
|
||||||
{% for key, report in reportDatas %}
|
{% for key, report in reportDatas %}
|
||||||
|
|
||||||
|
{% set allCalc = (allCalc + report.amount) %}
|
||||||
|
{% set allCalcDefect = (allCalcDefect + report.defective) %}
|
||||||
|
{% set allCalcDefectRep = (allCalcDefectRep + report.defectiveRepair) %}
|
||||||
|
{% set allAmountSum = (allAmountSum + report.all) %}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold;">{{key + 1}}</td>
|
<td style="font-weight: bold;">{{key + 1}}</td>
|
||||||
<td><a href="#" style="font-weight: bold;">{{report.bag_gram}}</a></td>
|
<td><a href="#" style="font-weight: bold;">{{report.bag_gram}}</a></td>
|
||||||
|
|
@ -255,16 +264,13 @@ function onStart() {
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 5%;">№</th>
|
<th colspan="5" style="width: 5%;">Jemi</th>
|
||||||
<th>Gram</th>
|
|
||||||
<th>Ini</th>
|
<th>{{allCalc|number_format(2)}}</th>
|
||||||
<th>Boýy</th>
|
<th>{{allCalcDefect|number_format(2)}}</th>
|
||||||
<th>Reňki</th>
|
<th>{{allCalcDefectRep|number_format(2)}}</th>
|
||||||
<th>Öndürilen Haltasy (arassa)</th>
|
<th>{{allAmountSum|number_format(2)}}</th>
|
||||||
<th>Öndürilen Haltasy (brak)</th>
|
<th></th>
|
||||||
<th>Sürülmedik haltalar</th>
|
|
||||||
<th>Jemi öndüren haltasy</th>
|
|
||||||
<th>Şuwagtky Ýagdaýy</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,27 @@ function onStart(){
|
||||||
->orderBy('id', 'DESC')
|
->orderBy('id', 'DESC')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
if($filter == 'filter'){
|
||||||
|
|
||||||
|
|
||||||
|
$start = Carbon\Carbon::parse(post("start"))->format('Y-m-d');
|
||||||
|
$end = Carbon\Carbon::parse(post("end"))->format('Y-m-d');
|
||||||
|
|
||||||
|
$this["rulons"] = Romanah\Gokbakja\Models\BagAction::select('romanah_gokbakja_bag_actions.*')
|
||||||
|
->with(['product.rulon_action.product.bag_type', 'product.rulon_action.product.color', 'product.pivot_sewer', 'product.pivot_sewer_lst', 'product.rulon_action.product'])
|
||||||
|
->whereHas('product', function($q){
|
||||||
|
$q->where('is_sewed', 1);
|
||||||
|
})
|
||||||
|
->whereHas('product.rulon_action.product', function($qq) use ($start, $end){
|
||||||
|
$qq->whereBetween('date', [$start, $end]);
|
||||||
|
})
|
||||||
|
->orderBy('id', 'DESC')
|
||||||
|
->groupBy('romanah_gokbakja_bag_actions.product_id')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//dd($this["rulons"]);
|
//dd($this["rulons"]);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -48,7 +69,7 @@ function onStart(){
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form action="/machine/rulon-bags/filter">
|
<form action="/machine/rulon-bags/filter" method="POST">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
@ -139,6 +160,14 @@ function onStart(){
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
{% set allCalc = 0 %}
|
||||||
|
{% set allCalcDefective = 0 %}
|
||||||
|
{% set allCalcDefectiveRep = 0 %}
|
||||||
|
{% set allCalcAmount = 0 %}
|
||||||
|
{% set allCalcKg = 0 %}
|
||||||
|
{% set pipeAllCalc = 0 %}
|
||||||
|
{% set allLeft = 0 %}
|
||||||
|
{% set allBrakPerc = 0 %}
|
||||||
|
|
||||||
{% for key, report in rulons %}
|
{% for key, report in rulons %}
|
||||||
|
|
||||||
|
|
@ -150,9 +179,25 @@ function onStart(){
|
||||||
|
|
||||||
{% set percentDefective = ((report.product.defective_bag_qty * 100) / report.amount) %}
|
{% set percentDefective = ((report.product.defective_bag_qty * 100) / report.amount) %}
|
||||||
|
|
||||||
|
{% set allCalc = (allCalc + report.amount) %}
|
||||||
|
|
||||||
|
{% set allCalcDefective = (allCalcDefective + report.product.defective_bag_qty) %}
|
||||||
|
|
||||||
|
{% set allCalcDefectiveRep = (allCalcDefectiveRep + report.product.defective_repair_qty) %}
|
||||||
|
|
||||||
|
{% set allCalcAmount = (allCalcAmount + sumOfBags) %}
|
||||||
|
|
||||||
|
{% set allCalcKg = (allCalcKg + allInKg) %}
|
||||||
|
|
||||||
|
{% set pipeAllCalc = (pipeAllCalc + report.product.pipe_weight) %}
|
||||||
|
|
||||||
|
{% set allLeft = (allLeft + report.product.pivot_sewer_lst.left_amount) %}
|
||||||
|
|
||||||
|
{% set allBrakPerc = (allBrakPerc + percentDefective) %}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold;">{{key+1}}</td>
|
<td style="font-weight: bold;">{{key+1}}</td>
|
||||||
<td><a href="#" style="font-weight: bold;">{{report.product.rulon_action.created_at|date('d.m.Y')}}</a></td>
|
<td><a href="#" style="font-weight: bold;">{{report.product.rulon_action.product.date|date('d.m.Y')}}</a></td>
|
||||||
<td>{{report.product.rulon_action.product.machine.name}}</td>
|
<td>{{report.product.rulon_action.product.machine.name}}</td>
|
||||||
<td>{{report.product.rulon_action.product.color.name}}</td>
|
<td>{{report.product.rulon_action.product.color.name}}</td>
|
||||||
<td>{{report.product.rulon_action.product.width}}</td>
|
<td>{{report.product.rulon_action.product.width}}</td>
|
||||||
|
|
@ -183,6 +228,25 @@ function onStart(){
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th colspan="10">JEMI</th>
|
||||||
|
|
||||||
|
<th>{{allCalc|number_format(2)}}</th>
|
||||||
|
<th>{{allCalcDefective|number_format(2)}}</th>
|
||||||
|
<th>{{allCalcDefectiveRep|number_format(2)}}</th>
|
||||||
|
|
||||||
|
<th>{{allCalcAmount|number_format(2)}}</th>
|
||||||
|
<th>{{allCalcKg|number_format(2)}}</th>
|
||||||
|
|
||||||
|
<th>{{pipeAllCalc|number_format(2)}}</th>
|
||||||
|
<th>{{allLeft|number_format(2)}}</th>
|
||||||
|
|
||||||
|
<th>{{allBrakPerc|number_format(2)}}</th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
<!-- <table class="table table-bordered dt-responsive nowrap">
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th>NO</th>
|
<th>NO</th>
|
||||||
|
|
@ -210,7 +274,7 @@ function onStart(){
|
||||||
<th>Brak %</th>
|
<th>Brak %</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ function onStart(){
|
||||||
{% if crudExtrudor %}
|
{% if crudExtrudor %}
|
||||||
<div class="collapse multi-collapse show" id="multiCollapseExample1">
|
<div class="collapse multi-collapse show" id="multiCollapseExample1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg" data-bs-toggle="collapse" href="#multiCollapseExample1" role="button"
|
<div class="col-md-3" data-bs-toggle="collapse" href="#multiCollapseExample1" role="button"
|
||||||
aria-expanded="false" aria-controls="multiCollapseExample1">
|
aria-expanded="false" aria-controls="multiCollapseExample1">
|
||||||
<a class="card bg-success text-white-50">
|
<a class="card bg-success text-white-50">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
@ -197,9 +197,9 @@ function onStart(){
|
||||||
<th>Smen</th>
|
<th>Smen</th>
|
||||||
<th>Ekskruiter</th>
|
<th>Ekskruiter</th>
|
||||||
<th>Hemmesi</th>
|
<th>Hemmesi</th>
|
||||||
{% for key, record in records %}
|
|
||||||
<th>{{record.code}}</th>
|
<th>HARYTLAR</th>
|
||||||
{% endfor %}
|
|
||||||
<th>Bellik</th>
|
<th>Bellik</th>
|
||||||
<th>Sazlama</th>
|
<th>Sazlama</th>
|
||||||
<!-- <th>Настройки</th> -->
|
<!-- <th>Настройки</th> -->
|
||||||
|
|
@ -221,15 +221,18 @@ function onStart(){
|
||||||
<span class="badge badge-soft-success"
|
<span class="badge badge-soft-success"
|
||||||
style="font-size: 14px;">{{report.all_amount|number_format}} kg</span>
|
style="font-size: 14px;">{{report.all_amount|number_format}} kg</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{% for product in report.pivot_production %}
|
|
||||||
<td>
|
<td>
|
||||||
|
<div class="row">
|
||||||
|
{% for product in report.pivot_production %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
{% if report.user_id == user.id %}
|
{% if report.user_id == user.id %}
|
||||||
|
{{product.product_code}}:
|
||||||
<a href="#" data-bs-toggle="modal"
|
<a href="#" data-bs-toggle="modal"
|
||||||
data-bs-target=".bs-example-modal-sm-{{product.id}}">
|
data-bs-target=".bs-example-modal-sm-{{product.id}}">
|
||||||
{% if product.amount_percentage %}
|
{% if product.amount_percentage %}
|
||||||
{{product.amount_percentage|number_format(2)}} %
|
{{product.amount_percentage|number_format(2)}} %
|
||||||
{% else %}
|
{% else %}
|
||||||
0 %
|
0 %
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
@ -237,10 +240,10 @@ function onStart(){
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<a href="#">{{product.amount_percentage|number_format(2)}} %</a>
|
{{product.product_code}}: <a href="#">{{product.amount_percentage|number_format(2)}} %</a>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</div>
|
||||||
|
|
||||||
{% if crudExtrudor %}
|
{% if crudExtrudor %}
|
||||||
{% if report.user_id == user.id %}
|
{% if report.user_id == user.id %}
|
||||||
|
|
@ -276,7 +279,8 @@ function onStart(){
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td style="font-weight: bold;color: #0005c5;">{{report.note}}</td>
|
<td style="font-weight: bold;color: #0005c5;">{{report.note}}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if crudExtrudor %}
|
{% if crudExtrudor %}
|
||||||
|
|
@ -300,7 +304,7 @@ function onStart(){
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<!-- <tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 5%;">№</th>
|
<th style="width: 5%;">№</th>
|
||||||
<th>Senesi</th>
|
<th>Senesi</th>
|
||||||
|
|
@ -313,7 +317,7 @@ function onStart(){
|
||||||
<th>Bellik</th>
|
<th>Bellik</th>
|
||||||
<th>Sazlama</th>
|
<th>Sazlama</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot> -->
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -333,41 +337,41 @@ function onStart(){
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
// $(document).ready(function () {
|
||||||
var prodCount = document.getElementById('product_count').innerHTML;
|
// var prodCount = document.getElementById('product_count').innerHTML;
|
||||||
|
|
||||||
for (let i = 0; i < prodCount; i++) {
|
// for (let i = 0; i < prodCount; i++) {
|
||||||
|
|
||||||
$("#product_" + i).hover(function () {
|
// $("#product_" + i).hover(function () {
|
||||||
$(this).attr("ishoveredin", 1);
|
// $(this).attr("ishoveredin", 1);
|
||||||
$(this).stop(true, false).animate({
|
// $(this).stop(true, false).animate({
|
||||||
width: "200px"
|
// width: "200px"
|
||||||
});
|
// });
|
||||||
}, function () {
|
// }, function () {
|
||||||
$(this).attr("ishoveredin", 0);
|
// $(this).attr("ishoveredin", 0);
|
||||||
if ($(this).attr("isfocusedin") != 1)
|
// if ($(this).attr("isfocusedin") != 1)
|
||||||
$(this).stop(true, false).animate({
|
// $(this).stop(true, false).animate({
|
||||||
width: "100%"
|
// width: "100%"
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
$("#product_" + i).focus(function () {
|
// $("#product_" + i).focus(function () {
|
||||||
$(this).attr("isfocusedin", 1);
|
// $(this).attr("isfocusedin", 1);
|
||||||
$(this).stop(true, false).animate({
|
// $(this).stop(true, false).animate({
|
||||||
width: "200px"
|
// width: "200px"
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
$("#product_" + i).blur(function () {
|
// $("#product_" + i).blur(function () {
|
||||||
$(this).attr("isfocusedin", 0);
|
// $(this).attr("isfocusedin", 0);
|
||||||
$(this).stop(true, false).animate({
|
// $(this).stop(true, false).animate({
|
||||||
width: "100%"
|
// width: "100%"
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
});
|
// });
|
||||||
|
|
||||||
function backStep1() {
|
function backStep1() {
|
||||||
document.getElementById("step1").setAttribute("style", "display:contents");
|
document.getElementById("step1").setAttribute("style", "display:contents");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue