更新数据关联查询,以及基本的数据的编辑,部分有待进一步完善。
This commit is contained in:
@@ -39,7 +39,7 @@ class PdmPartitemIndex extends Model
|
||||
* @localKey parttypeid
|
||||
* @bind name
|
||||
*/
|
||||
public function parttype()
|
||||
public function pdmParttype()
|
||||
{
|
||||
return $this->hasOne(\app\admin\model\PdmParttype::Class,'id','parttypeid')->bind(['name']);
|
||||
}
|
||||
@@ -49,11 +49,21 @@ class PdmPartitemIndex extends Model
|
||||
* @localKey parttypeid
|
||||
* @bind name
|
||||
*/
|
||||
public function mfgname()
|
||||
public function pdmMfgName()
|
||||
{
|
||||
return $this->hasOne(\app\admin\model\PdmMfgName::Class,'id','mfg_id')->bind(['mfgname']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义 sa_admin 关联模型
|
||||
* @localKey parttypeid
|
||||
* @bind name
|
||||
*/
|
||||
public function pdmPurchasecode()
|
||||
{
|
||||
return $this->hasOne(\app\admin\model\PdmPurchasecode::Class,'purchasecode','purchasecode')->bind(['mpn']);
|
||||
}
|
||||
|
||||
public function setPartattributeAttr($value)
|
||||
{
|
||||
if (!empty($value) && is_array($value)) {
|
||||
|
||||
Reference in New Issue
Block a user