Commit 5d69dfcc by hcy001

1

parent f6b88b57
......@@ -2,6 +2,7 @@
namespace App\Model;
use App\map\InquiryMap;
use Dompdf\Exception;
use Illuminate\Database\Eloquent\Model;
use App\Model\InquiryItemsAssignModel;
use App\Model\OplogModel;
......@@ -32,7 +33,17 @@ class InquiryItemsReportModel extends Model
$con = DB::connection('rfq');
$con->beginTransaction();
#最后批量添加
#更新客户资料
$user = [
"user_name"=>$input["user_name"],
"contact"=>$input["contact"],
"fax"=>$input["fax"],
"tel"=>$input["tel"],
];
(new InquiryUsersModel())->where("id",$input["com_id"])->update($user);
#更新报价明细
foreach ($input["items"] as $k=>$inquiry_items_id){
$temp = [
"inquiry_id"=>$inquiry_id ,
......@@ -79,7 +90,7 @@ class InquiryItemsReportModel extends Model
$data["company"] = $company_info_origin[$mainArr["delivery_place"]]; #公司信息
#客户信息
$data["user"] = ["name"=>$mainArr["user_name"]];
$data["user"] = (new InquiryUsersModel())->where("id",$mainArr["user_id"])->first()->toArray();
#询价明细
$itemsArr = $this->whereIn("inquiry_items_id",explode(",",$inquiry_items_ids))->get()->toArray();
......
......@@ -45,8 +45,8 @@
</tr>
<tr>
<td><b>Attn</b>:{{ @$user["name"] }}</td>
<td><b>C.C</b>:{{ @$user["cc"] }}</td>
<td><b>Attn</b>:{{ @$user["user_name"] }}</td>
<td><b>C.C</b>:{{ @$user["contact"] }}</td>
<td><b>Fax</b>:{{ @$user["fax"] }}</td>
<td><b>Tel</b>: {{ @$user["tel"] }}</td>
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment