update
This commit is contained in:
parent
982ff79c7f
commit
224166e587
@ -201,7 +201,7 @@ class OpurchaseclassLogic extends BaseLogic
|
|||||||
public static function goodsOfferUpdate($params)
|
public static function goodsOfferUpdate($params)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
OpurchaseGoodsOffer::where('id', $params)->update(['is_adopt' => 1]);
|
OpurchaseGoodsOffer::where('id', $params)->update(['is_adopt' => 2]);
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
self::setError($e->getMessage());
|
self::setError($e->getMessage());
|
||||||
|
@ -15,6 +15,7 @@ class OpurchaseGoodsOfferLogic extends BaseLogic{
|
|||||||
OpurchaseGoodsOffer::where('id',$v['id'])->update([
|
OpurchaseGoodsOffer::where('id',$v['id'])->update([
|
||||||
'price' => $v['price'],
|
'price' => $v['price'],
|
||||||
'nums' => $v['nums'],
|
'nums' => $v['nums'],
|
||||||
|
'is_adopt' => 1,
|
||||||
'update_time' => time()
|
'update_time' => time()
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,8 @@ class OpurchaseGoodsOffer extends BaseModel
|
|||||||
|
|
||||||
public function getIsAdoptTextAttr($value,$data): string
|
public function getIsAdoptTextAttr($value,$data): string
|
||||||
{
|
{
|
||||||
return $data['is_adopt'] == 0 ? '未成交' : '已成交';
|
$arr = [0=>'待报价', 1=>'已报价', 2=>'已采纳', 3=>'未采纳'];
|
||||||
|
return $arr[$data['is_adopt']];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function goods()
|
public function goods()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user