|
@ -6,6 +6,7 @@ use backend\modules\shop\models\ars\Province; |
|
|
use yii\helpers\Html; |
|
|
use yii\helpers\Html; |
|
|
use yii\widgets\DetailView; |
|
|
use yii\widgets\DetailView; |
|
|
use backend\modules\shop\models\ars\ExpressTemplate; |
|
|
use backend\modules\shop\models\ars\ExpressTemplate; |
|
|
|
|
|
use backend\modules\shop\logic\ShopManager; |
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */ |
|
|
/* @var $this yii\web\View */ |
|
|
/* @var $model backend\modules\shop\models\ars\ExpressTemplate */ |
|
|
/* @var $model backend\modules\shop\models\ars\ExpressTemplate */ |
|
@ -32,7 +33,7 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
'value' => function ($model) { |
|
|
'value' => function ($model) { |
|
|
$expressTemplateModel = ExpressTemplate::findOne($model->express_template); |
|
|
$expressTemplateModel = ExpressTemplate::findOne($model->express_template); |
|
|
if ($expressTemplateModel->calculation_type == ExpressTemplate::CALCULATION_TYPE_WEIGHT) { |
|
|
if ($expressTemplateModel->calculation_type == ExpressTemplate::CALCULATION_TYPE_WEIGHT) { |
|
|
return $model->basic_count /= 10; |
|
|
|
|
|
|
|
|
return $model->basic_count /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_WEIGHT); |
|
|
} else { |
|
|
} else { |
|
|
return $model->basic_count; |
|
|
return $model->basic_count; |
|
|
} |
|
|
} |
|
@ -42,7 +43,7 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
'attribute' => 'basic_price', |
|
|
'attribute' => 'basic_price', |
|
|
'label' => ExpressArea::$formList[$expressTemplateModel->calculation_type]['basic_price'], |
|
|
'label' => ExpressArea::$formList[$expressTemplateModel->calculation_type]['basic_price'], |
|
|
'value' => function ($model) { |
|
|
'value' => function ($model) { |
|
|
return $model->basic_price /= 100; |
|
|
|
|
|
|
|
|
return $model->basic_price /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_MONEY); |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
[ |
|
|
[ |
|
@ -51,7 +52,7 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
'value' => function ($model) { |
|
|
'value' => function ($model) { |
|
|
$expressTemplateModel = ExpressTemplate::findOne($model->express_template); |
|
|
$expressTemplateModel = ExpressTemplate::findOne($model->express_template); |
|
|
if ($expressTemplateModel->calculation_type == ExpressTemplate::CALCULATION_TYPE_WEIGHT) { |
|
|
if ($expressTemplateModel->calculation_type == ExpressTemplate::CALCULATION_TYPE_WEIGHT) { |
|
|
return $model->extra_count /= 10; |
|
|
|
|
|
|
|
|
return $model->extra_count /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_WEIGHT); |
|
|
} else { |
|
|
} else { |
|
|
return $model->extra_count; |
|
|
return $model->extra_count; |
|
|
} |
|
|
} |
|
@ -61,7 +62,7 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
'attribute' => 'extra_price', |
|
|
'attribute' => 'extra_price', |
|
|
'label' => ExpressArea::$formList[$expressTemplateModel->calculation_type]['extra_price'], |
|
|
'label' => ExpressArea::$formList[$expressTemplateModel->calculation_type]['extra_price'], |
|
|
'value' => function ($model) { |
|
|
'value' => function ($model) { |
|
|
return $model->extra_price /= 100; |
|
|
|
|
|
|
|
|
return $model->extra_price /= ShopManager::proportionalConversion(ShopManager::UNIT_TYPE_MONEY); |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
'updated_at:datetime', |
|
|
'updated_at:datetime', |
|
|