update
This commit is contained in:
parent
e07b515620
commit
7576f74ff6
@ -54,11 +54,12 @@
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return MarketingBidResultDetail::where($this->searchWhere)
|
||||
->field(['id', 'bid_result_id', 'company', 'quotation_one', 'quotation_two', 'quotation_three', 'final_rate', 'manager', 'month', 'result'])
|
||||
return MarketingBidResultDetail::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->select()->each(function ($data) {
|
||||
$data['result_text'] = $data->result_text;
|
||||
})
|
||||
->toArray();
|
||||
}
|
||||
|
||||
|
@ -115,6 +115,8 @@
|
||||
*/
|
||||
public static function detail($params): array
|
||||
{
|
||||
return MarketingBidResultDetail::findOrEmpty($params['id'])->toArray();
|
||||
$data = MarketingBidResultDetail::withoutField('create_time,update_time,delete_time')->findOrEmpty($params['id']);
|
||||
$data['result_text'] = $data->result_text;
|
||||
return $data->toArray();
|
||||
}
|
||||
}
|
@ -11,24 +11,29 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\model\marketing;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 市场经营--投标管理--投标结果--参标单位模型
|
||||
* Class MarketingBidResultDetail
|
||||
* @package app\common\model\marketing
|
||||
*/
|
||||
class MarketingBidResultDetail extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
protected $name = 'marketing_bid_result_detail';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
}
|
||||
|
||||
namespace app\common\model\marketing;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\model\concern\SoftDelete;
|
||||
|
||||
|
||||
/**
|
||||
* 市场经营--投标管理--投标结果--参标单位模型
|
||||
* Class MarketingBidResultDetail
|
||||
* @package app\common\model\marketing
|
||||
*/
|
||||
class MarketingBidResultDetail extends BaseModel
|
||||
{
|
||||
use SoftDelete;
|
||||
|
||||
protected $name = 'marketing_bid_result_detail';
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public function getResultTextAttr($value, $data): string
|
||||
{
|
||||
$arr = [0 => '中标', 1 => '未中标'];
|
||||
return $arr[$data['result']];
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user