|
|
@@ -103,7 +103,7 @@ class WorkController extends BaseController
|
|
|
$orderSn = orderSn::getWorkSn();
|
|
|
$mainId = $this->mainId;
|
|
|
$post['workSn'] = $orderSn;
|
|
|
- if (isset($post['staffId']) && !empty($post['staffId'])) {
|
|
|
+ if (!empty($post['staffId'])) {
|
|
|
$staffId = $post['staffId'];
|
|
|
$staffName = $post['staffName'] ?? '';
|
|
|
} else {
|
|
|
@@ -112,8 +112,9 @@ class WorkController extends BaseController
|
|
|
}
|
|
|
$post['staffId'] = $staffId;
|
|
|
$post['staffName'] = $staffName;
|
|
|
- $post['name'] = isset($post['name']) && !empty($post['name']) ? $post['name'] : '花束';
|
|
|
- $post['cover'] = isset($post['cover']) && !empty($post['cover']) ? $post['cover'] : 'default-img.png';
|
|
|
+ $post['name'] = !empty($post['name']) ? $post['name'] : '花束';
|
|
|
+ $post['cover'] = !empty($post['cover']) ? $post['cover'] : 'default-img.png';
|
|
|
+ $post['reachDate'] = date("Y-m-d");
|
|
|
$connection = Yii::$app->db;
|
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|