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