/**
  * 获取OE号
  */
 public static function getOENOSByGoodsID($goodsID)
 {
     $goodsOES = DealerGoodsOenoRelation::findAll("GoodsID={$goodsID}");
     $data = array();
     foreach ($goodsOES as $key => $value) {
         $data[$key]['ID'] = $value['ID'];
         $data[$key]['OENO'] = $value['OENO'];
     }
     return $data;
 }
Exemple #2
0
 public function actionDeletegoodsoeno()
 {
     $cateid = $_GET['cateid'];
     $model = DealerGoodsOenoRelation::model()->findByPk($cateid)->delete();
     echo json_decode($model);
 }
Exemple #3
0
 /**
  * 获取OE号
  */
 public static function getOENOSByGoodsID($goodsID)
 {
     $goodsOES = DealerGoodsOenoRelation::model()->findAll("GoodsID={$goodsID}");
     $data = array();
     $OENOS = '';
     foreach ($goodsOES as $key => $value) {
         $data[$key]['ID'] = $value['ID'];
         $data[$key]['OENO'] = $value['OENO'];
         if ($key == 0) {
             $OENOS .= $value['OENO'];
         } else {
             $OENOS .= '、' . $value['OENO'];
         }
     }
     // return $data;
     return $OENOS;
 }