fixbug_sunjun_23810

This commit is contained in:
sunjun
2022-06-16 05:49:32 +00:00
parent bfa7047dff
commit 7dfc3f64a2
+8 -5
View File
@@ -917,13 +917,16 @@ class productModel extends model
$data = fixer::input('post')->get();
/* When there are products under the line, the program cannot be modified */
foreach($oldLines as $oldLine)
if($this->config->systemMode == 'new')
{
$oldLineID = 'id' . $oldLine->id;
if($data->programs[$oldLineID] != $oldLine->root)
foreach($oldLines as $oldLine)
{
$product = $this->dao->select('*')->from(TABLE_PRODUCT)->where('line')->eq($oldLine->id)->fetch();
if(!empty($product)) return print(js::error($this->lang->product->changeLineError));
$oldLineID = 'id' . $oldLine->id;
if($data->programs[$oldLineID] != $oldLine->root)
{
$product = $this->dao->select('*')->from(TABLE_PRODUCT)->where('line')->eq($oldLine->id)->fetch();
if(!empty($product)) return print(js::error($this->lang->product->changeLineError));
}
}
}