QuoteOther.php 630 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace addons\qingdongams\model;
  3. use think\Exception;
  4. use think\Model;
  5. /**
  6. *报价单其他信息
  7. */
  8. class QuoteOther Extends Model {
  9. protected $name = 'qingdongams_quote_other';
  10. // 开启自动写入时间戳字段
  11. protected $autoWriteTimestamp = false;
  12. public static function getOther($params){
  13. $other = self::where(['id' => $params['id']])->value('other');
  14. if($other){
  15. $other=json_decode($other,true);
  16. }else{
  17. $other=[];
  18. }
  19. $params = array_merge($params, $other);
  20. $params = Form::getDataDetail('quote', $params);
  21. return $params;
  22. }
  23. }