From ae2fca5e311baab36b206deb19afbbf41de13be8 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 3 Aug 2023 14:13:23 +0800 Subject: [PATCH] * Fix project::edit bug. --- module/execution/config/dtable.php | 3 +-- module/product/model.php | 3 +-- module/project/ui/edit.html.php | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/module/execution/config/dtable.php b/module/execution/config/dtable.php index ae3d843c42..9226e468de 100644 --- a/module/execution/config/dtable.php +++ b/module/execution/config/dtable.php @@ -14,7 +14,6 @@ $config->execution->dtable->fieldList['rawID']['required'] = true; $config->execution->dtable->fieldList['name']['title'] = $lang->execution->name; $config->execution->dtable->fieldList['name']['name'] = 'nameCol'; $config->execution->dtable->fieldList['name']['fixed'] = 'left'; -$config->execution->dtable->fieldList['name']['flex'] = 1; $config->execution->dtable->fieldList['name']['type'] = 'nestedTitle'; $config->execution->dtable->fieldList['name']['sortType'] = true; $config->execution->dtable->fieldList['name']['minWidth'] = '356'; @@ -25,9 +24,9 @@ if(isset($config->setCode) and $config->setCode == 1) { $config->execution->dtable->fieldList['code']['title'] = $lang->execution->code; $config->execution->dtable->fieldList['code']['name'] = 'code'; - $config->execution->dtable->fieldList['code']['fixed'] = 'left'; $config->execution->dtable->fieldList['code']['type'] = 'text'; $config->execution->dtable->fieldList['code']['sortType'] = true; + $config->execution->dtable->fieldList['code']['group'] = '1'; $config->execution->dtable->fieldList['code']['width'] = '136'; $config->execution->dtable->fieldList['code']['show'] = 'true'; } diff --git a/module/product/model.php b/module/product/model.php index 3c7d051f92..b07d2c8b2a 100755 --- a/module/product/model.php +++ b/module/product/model.php @@ -262,11 +262,10 @@ class productModel extends model { $products[$product->id] = $product; $products[$product->id]->branches = array(); - $products[$product->id]->plans = array(); } $products[$product->id]->branches[$product->branch] = $product->branch; - if($product->plan) $products[$product->id]->plans[$product->plan] = $product->plan; + if($product->plan) $products[$product->id]->plans = $product->plan; unset($product->branch, $product->plan); } diff --git a/module/project/ui/edit.html.php b/module/project/ui/edit.html.php index b788678cd3..b2180da40d 100644 --- a/module/project/ui/edit.html.php +++ b/module/project/ui/edit.html.php @@ -105,7 +105,8 @@ if($linkedProducts) ( set::name("plans[$product->id][]"), set::items($plans), - set::value($product->plans) + set::value($product->plans), + set::multiple(true) ) ) ),