diff --git a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php index 51a7cfbe8..2bab83798 100644 --- a/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php +++ b/app/admin/logic/purchase_product_offer/PurchaseProductOfferLogic.php @@ -13,6 +13,7 @@ use app\common\model\dict\DictData; use app\common\model\store_product\StoreProduct; use app\common\model\store_product_price\StoreProductPrice; use app\common\model\store_product_unit\StoreProductUnit; +use app\common\model\user\User; use app\common\service\workWechat\ProductOffer; use support\exception\BusinessException; use think\facade\Db; @@ -139,7 +140,7 @@ class PurchaseProductOfferLogic extends BaseLogic ]); $find = StoreProductPrice::where(['offer_id' => $params['id']])->find(); $product = StoreProduct::where('id', $offer['product_id'])->withTrashed()->field('store_name,top_cate_id')->find(); - $unit_name=StoreProductUnit::where('id', $offer['unit_id'])->value('name'); + $unit_name=StoreProductUnit::where('id', $offer['unit'])->value('name'); $dict_data = DictData::where('type_value', 'price_lv_' . $product['top_cate_id'])->field('name,value')->select(); $data = []; $data['bhoid'] = $offer['order_id']; @@ -172,6 +173,7 @@ class PurchaseProductOfferLogic extends BaseLogic Db::commit(); $offer['store_name']=$product['store_name']; $offer['unit_name']=$unit_name; + $offer['buyer_name']=User::where('id',$offer['buyer_id'])->value('real_name'); if($offer['pay_type']==1){ $offer['pay_type_name']='赊账'; }elseif($offer['pay_type']==2){