diff --git a/frontend/controllers/FixCarController.php b/frontend/controllers/FixCarController.php index c34e720..6630309 100644 --- a/frontend/controllers/FixCarController.php +++ b/frontend/controllers/FixCarController.php @@ -105,7 +105,8 @@ class FixCarController extends BaseController $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); - $row['user'] = $item->getUser()->asArray()->one(); + $row['show_name'] = $item->user->getShowName(); + $row['status_txt'] = $item->getStatus(); $data['rows'][] = $row; } return $data; @@ -612,7 +613,10 @@ class FixCarController extends BaseController $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); - $row['user'] = $item->getUser()->asArray()->one(); + $row['brand'] = $item->brand?$item->brand->name:''; + $row['series'] = $item->series?$item->series->name:''; + $row['show_name'] = $item->user->getShowName(); + $row['status_txt'] = $item->getStatus(); $data['rows'][] = $row; } return $data; @@ -698,7 +702,10 @@ class FixCarController extends BaseController $data['rows'] = []; foreach($items as $item) { $row = $item->toArray(); - $row['user'] = $item->getUser()->asArray()->one(); + $row['brand'] = $item->brand?$item->brand->name:''; + $row['series'] = $item->series?$item->series->name:''; + $row['show_name'] = $item->user->getShowName(); + $row['status_txt'] = $item->getStatus(); $data['rows'][] = $row; } return $data; diff --git a/frontend/views/fix-car/my-list-edit.php b/frontend/views/fix-car/my-list-edit.php index 525b16a..ead2187 100644 --- a/frontend/views/fix-car/my-list-edit.php +++ b/frontend/views/fix-car/my-list-edit.php @@ -523,7 +523,7 @@ use \common\libs\MyLib; var table_data = []; $.each(data,function(name,item){ if (item[1].length) { - table_data.push(item[1]); + table_data[name] = item[1]; html += '
' + '
' + '
'+ item[0] +'
' + @@ -531,7 +531,7 @@ use \common\libs\MyLib; '
' + '
' + '
' + - ' ' + + '
' + ' ' + ' ' + ' ' + @@ -556,7 +556,7 @@ use \common\libs\MyLib; $('#'+ id).html(html).find('table').each(function(i,target){ $(target).bootstrapTable("destroy"); $(target).bootstrapTable({ - data: table_data[i], + data: table_data[$(target).data('name')], pagination: false, queryParams: function (params) { return params; diff --git a/frontend/views/fix-car/my-list.php b/frontend/views/fix-car/my-list.php index ec9f0d2..1e418b3 100644 --- a/frontend/views/fix-car/my-list.php +++ b/frontend/views/fix-car/my-list.php @@ -37,8 +37,8 @@ use \common\libs\MyLib; - - + + @@ -103,40 +103,6 @@ use \common\libs\MyLib; return false; } - function showNameFormatter(value){ - return value.username + '(' + value.name + ')'; - } - - function statusFormatter(value){ - var result = ''; - switch(+value) { - case 1: - result = '维修调度'; - break; - case 2: - result = '司机接车'; - break; - case 3: - result = '前台派工'; - break; - case 4: - result = '查勘定损'; - break; - case 5: - result = '技工维修'; - break; - case 6: - result = '总检'; - break; - case 7: - result = '财务结算'; - break; - default: - result = ''; - } - return result; - } - $(function() { search(); }); diff --git a/frontend/views/fix-car/step1-list.php b/frontend/views/fix-car/step1-list.php index f56c1fb..b2a0f0e 100644 --- a/frontend/views/fix-car/step1-list.php +++ b/frontend/views/fix-car/step1-list.php @@ -38,8 +38,8 @@ use \common\libs\MyLib; - - + + @@ -85,40 +85,6 @@ use \common\libs\MyLib; return false; } - function showNameFormatter(value){ - return value.username + '(' + value.name + ')'; - } - - function statusFormatter(value){ - var result = ''; - switch(+value) { - case 1: - result = '维修调度'; - break; - case 2: - result = '司机接车'; - break; - case 3: - result = '前台派工'; - break; - case 4: - result = '查勘定损'; - break; - case 5: - result = '技工维修'; - break; - case 6: - result = '总检'; - break; - case 7: - result = '财务结算'; - break; - default: - result = ''; - } - return result; - } - $(function() { search(); }); diff --git a/frontend/views/fix-car/step2-list.php b/frontend/views/fix-car/step2-list.php index d602b73..0f83018 100644 --- a/frontend/views/fix-car/step2-list.php +++ b/frontend/views/fix-car/step2-list.php @@ -39,7 +39,7 @@ use \common\libs\MyLib; - + @@ -85,36 +85,6 @@ use \common\libs\MyLib; return false; } - function statusFormatter(value){ - var result = ''; - switch(+value) { - case 1: - result = '维修调度'; - break; - case 2: - result = '司机接车'; - break; - case 3: - result = '前台派工'; - break; - case 4: - result = '查勘定损'; - break; - case 5: - result = '技工维修'; - break; - case 6: - result = '总检'; - break; - case 7: - result = '财务结算'; - break; - default: - result = ''; - } - return result; - } - $(function() { search(); });
ID联系人 电话 提单日期提单者状态提单者状态 操作
接车日期 事故类型 责任提单者状态提单者状态 操作
事故类型 责任 提单者状态状态 操作