Commit fc42f9c6 by 朱继来

fix

parents c28a6e51 83f3d94f
......@@ -342,8 +342,7 @@ class InquiryItemsModel extends Model
$assignInfo = (new InquiryItemsAssignModel())->select("assign_uid")->where("inquiry_items_id",$inquiry_items_id)->get();
if ($assignInfo){
$assignInfoArr = $assignInfo->toArray();
$currency = $mainArr["currency"] == 1 ? "¥":"$";
$msg = $b["user_name"].'已修改询价,询价单号:'.$mainArr["inquiry_sn"].',型号:'.$updateArr["goods_name"].' 修改内容:价格:'.$currency.$itemArr["target_price"].',目标价:'.$currency.$updateArr["target_price"];
$msg = $b["user_name"].'已修改询价,询价单号:'.$mainArr["inquiry_sn"].',型号:'.$updateArr["goods_name"].' 修改内容:价格:'.InquiryMap::$currency_sign[$mainArr["currency"]].$itemArr["target_price"].',目标价:'.InquiryMap::$currency_sign[$mainArr["currency"]].$updateArr["target_price"];
foreach ($assignInfoArr as $k=>$v){
$CommonModel->send_msg($v["assign_uid"],$msg);
}
......
......@@ -142,7 +142,7 @@ class InquiryItemsReportModel extends Model
$inquiry = (new InquiryModel())->select("currency")->where("id",$quoteItem["inquiry_id"])->first()->toArray();
$mainCurrency = $inquiry["currency"]; #询价主单币种
$rate = (new CommonModel())->getRate("美元"); #获取美元汇率
$rate = (new CommonModel())->getRate($mainCurrency); #获取汇率
$itemInfo = $InquiryItemsModel->select("status")->where("id",$inquiry_items_id)->first()->toArray(); #询价明细
......
......@@ -135,8 +135,7 @@ class InquiryModel extends Model
#目标价
if (@$input["types"] != 5){
$currency_sign = $v['currency'] == 1 ? '¥' : '$';
$v['target_price'] = $currency_sign . $v['target_price']."\t"; // 客户目标报价
$v['target_price'] = InquiryMap::$currency_sign[$v["currency"]] . $v['target_price']."\t"; // 客户目标报价
}
#交货日期
......@@ -325,7 +324,7 @@ class InquiryModel extends Model
$v['create_time'] = timeToDate($v['create_time']); //创建时间
$currency_sign = $v['currency'] == 1 ? '¥' : '$';
$currency_sign = InquiryMap::$currency_sign[$v["currency"]];
$v['target_price'] = $currency_sign . $v['target_price']; // 客户目标报价
......
......@@ -19,6 +19,25 @@ class InquiryMap{
self::status_sure => "已确认",
];
//币种 1:CNY 2:USD 3: 港币 4:欧元 5:英磅
static $currency = [
1 => '人民币',
2 => '美元',
3 => '港币',
4 => '欧元',
5 => '英磅',
];
//前缀
static $currency_sign = [
1 => '¥',
2 => '$',
3 => 'HK$',
4 => '€',
5 => '£',
];
}
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