shish 3 years ago
parent
commit
bb76e775de
1 changed files with 9 additions and 9 deletions
  1. 9 9
      biz-ghs/order/classes/PurchaseOrderClass.php

+ 9 - 9
biz-ghs/order/classes/PurchaseOrderClass.php

@@ -88,13 +88,19 @@ class PurchaseOrderClass extends BaseClass
         $debtCount = PurchaseOrderClass::getCount(['ghsId' => $ghsId, 'debt' => PurchaseOrderClass::DEBT_YES]);
         $debtCount = PurchaseOrderClass::getCount(['ghsId' => $ghsId, 'debt' => PurchaseOrderClass::DEBT_YES]);
         $debtAmount = PurchaseOrderClass::sum(['ghsId' => $ghsId, 'debt' => PurchaseOrderClass::DEBT_YES], 'actPrice');
         $debtAmount = PurchaseOrderClass::sum(['ghsId' => $ghsId, 'debt' => PurchaseOrderClass::DEBT_YES], 'actPrice');
 
 
-
         $orderSn = $orderInfo->orderSn ?? '';
         $orderSn = $orderInfo->orderSn ?? '';
         $itemList = PurchaseOrderItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*');
         $itemList = PurchaseOrderItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*');
 
 
-        $content = '';
+        $sjId = $shop->sjId ?? 0;
+        $sj = SjClass::getById($sjId, true);
+        $sjName = $sj->name ?? '';
+        $shopName = $shop->shopName ?? '';
+        $currentName = $shopName == '首店' ? $sjName : $sjName . ' ' . $shopName;
+
+        $content = "<CB>{$currentName}</CB>";
+        $content .= "<CB>采购单</CB>";
         $content .= '--------------------------------<BR>';
         $content .= '--------------------------------<BR>';
-        $content .= '<B>' . $orderInfo->ghsName . '</B><BR><BR>';
+        $content .= '<B>供货商:' . $orderInfo->ghsName . '</B><BR><BR>';
         if (isset($orderInfo->remark) && !empty($orderInfo->remark)) {
         if (isset($orderInfo->remark) && !empty($orderInfo->remark)) {
             $content .= '<BR>';
             $content .= '<BR>';
             $content .= '备注:<BR>';
             $content .= '备注:<BR>';
@@ -147,16 +153,10 @@ class PurchaseOrderClass extends BaseClass
 
 
         $shopId = $orderInfo['shopId'] ?? 0;
         $shopId = $orderInfo['shopId'] ?? 0;
         $shop = ShopClass::getById($shopId, true);
         $shop = ShopClass::getById($shopId, true);
-        $sjId = $shop->sjId ?? 0;
         $telephone = $shop->telephone ?? '';
         $telephone = $shop->telephone ?? '';
-        $sj = SjClass::getById($sjId, true);
-        $sjName = $sj->name ?? '';
-        $shopName = $shop->shopName ?? '';
-        $currentName = $shopName == '首店' ? $sjName : $sjName . ' ' . $shopName;
         $getInfo = self::getById($orderInfo['id']);
         $getInfo = self::getById($orderInfo['id']);
         $content .= '订单日期:' . date("Y-m-d H:i", strtotime($getInfo['addTime'])) . '<BR>';
         $content .= '订单日期:' . date("Y-m-d H:i", strtotime($getInfo['addTime'])) . '<BR>';
         $content .= '订单编号:' . $orderInfo['orderSn'] . '<BR>';
         $content .= '订单编号:' . $orderInfo['orderSn'] . '<BR>';
-        $content .= '门店名称:' . $currentName . '<BR>';
         if (!empty($telephone)) {
         if (!empty($telephone)) {
             $content .= '联系电话:' . $telephone . '<BR>';
             $content .= '联系电话:' . $telephone . '<BR>';
         }
         }