diff --git a/app-ht/modules/device/views/device/delete-index.php b/app-ht/modules/device/views/device/delete-index.php
index 2508e64..7884f0c 100644
--- a/app-ht/modules/device/views/device/delete-index.php
+++ b/app-ht/modules/device/views/device/delete-index.php
@@ -82,6 +82,7 @@ $this->params['breadcrumbs'][] = $this->title;
diff --git a/app-ht/modules/device/views/device/index.php b/app-ht/modules/device/views/device/index.php
index d24dad0..df6e7e8 100644
--- a/app-ht/modules/device/views/device/index.php
+++ b/app-ht/modules/device/views/device/index.php
@@ -83,6 +83,7 @@ $this->params['breadcrumbs'][] = $this->title;
diff --git a/app-ht/modules/production/controllers/ProductionController.php b/app-ht/modules/production/controllers/ProductionController.php
index 4050e9f..30d1353 100644
--- a/app-ht/modules/production/controllers/ProductionController.php
+++ b/app-ht/modules/production/controllers/ProductionController.php
@@ -33,34 +33,32 @@ class ProductionController extends BaseController
protected function dataList($type = '')
{
$request = Yii::$app->request;
- $creatTime = $request->get('creatTime');
+ $createTime = $request->get('createTime');
$endTime = $request->get('endTime');
- $productionCreatTime = $request->get('productionCreatTime');
- $productionEndTime = $request->get('productionEndTime');
+ $productionStartDate = $request->get('productionStartDate');
+ $productionEndDate = $request->get('productionEndDate');
$gets = [
- 'creatTime' => $creatTime,
+ 'createTime' => $createTime,
'endTime' => $endTime,
- 'productionCreatTime' => $productionCreatTime,
- 'productionEndTime' => $productionEndTime,
+ 'productionStartDate' => $productionStartDate,
+ 'productionEndDate' => $productionEndDate,
];
$where = ['and'];
- if ($creatTime) {
- $creatTime = strtotime($creatTime);
- $where[] = ['>=', 'p.created_at', $creatTime];
+ if ($createTime) {
+ $createTime = strtotime($createTime);
+ $where[] = ['>=', 'p.created_at', $createTime];
}
if ($endTime) {
$endTime = strtotime($endTime) + 86400;
$where[] = ['<=', 'p.created_at', $endTime];
}
- if ($productionCreatTime) {
- $productionCreatTime = strtotime($productionCreatTime);
- $where[] = ['>=', 'p.name', $productionCreatTime];
+ if ($productionStartDate) {
+ $where[] = ['>=', 'p.name', $productionStartDate];
}
- if ($productionEndTime) {
- $productionEndTime = strtotime($productionEndTime) + 86400;
- $where[] = ['<=', 'p.name', $productionEndTime];
+ if ($productionEndDate) {
+ $where[] = ['<=', 'p.name', $productionEndDate];
}
if ($type == 0) {
$pageList = ProductionRepository::getPageList($where, 0 , 0);
@@ -97,7 +95,7 @@ class ProductionController extends BaseController
public function actionDoAdd()
{
$request = Yii::$app->request;
- $name = $request->post("name"); // 生产日期
+ $name = trim($request->post("name")); // 生产日期
if (empty($name)) {
Yii::$app->session->setFlash('error', '生产日期不能为空');
return $this->render('create');
diff --git a/app-ht/modules/production/views/production/create.php b/app-ht/modules/production/views/production/create.php
index d336ffd..a4bb470 100644
--- a/app-ht/modules/production/views/production/create.php
+++ b/app-ht/modules/production/views/production/create.php
@@ -17,7 +17,7 @@ $this->params['breadcrumbs'][] = $this->title;
diff --git a/app-ht/modules/production/views/production/edit.php b/app-ht/modules/production/views/production/edit.php
index 9902966..c968a9f 100644
--- a/app-ht/modules/production/views/production/edit.php
+++ b/app-ht/modules/production/views/production/edit.php
@@ -18,9 +18,9 @@ $this->params['breadcrumbs'][] = $this->title;
编辑生产日期
diff --git a/app-ht/modules/production/views/production/index.php b/app-ht/modules/production/views/production/index.php
index 59c5378..ceb4f37 100644
--- a/app-ht/modules/production/views/production/index.php
+++ b/app-ht/modules/production/views/production/index.php
@@ -27,15 +27,16 @@ $this->params['breadcrumbs'][] = $this->title;
生产日期: |
- -
-
+ -
+
|
创建时间: |
- -
-
+ -
+
+
|
diff --git a/app-ht/modules/upgrade/views/upgrade/index.php b/app-ht/modules/upgrade/views/upgrade/index.php
index 988fc81..79aa74d 100644
--- a/app-ht/modules/upgrade/views/upgrade/index.php
+++ b/app-ht/modules/upgrade/views/upgrade/index.php
@@ -38,7 +38,7 @@ $this->params['breadcrumbs'][] = $this->title;
- APP版本号 |
+ 版本号 |
|
diff --git a/domain/production/Production.php b/domain/production/Production.php
index e21388b..c556301 100644
--- a/domain/production/Production.php
+++ b/domain/production/Production.php
@@ -20,6 +20,9 @@ class Production
static function create($item)
{
try {
+ if (isset($item["name"])) {
+ $item["name"] = trim($item["name"]);
+ }
$findProductionModel = ProductionModel::findOne(['name' => $item["name"]]);
if (!empty($findProductionModel)) {
return -1;
--
libgit2 0.21.0