songxingwei 2 年之前
父節點
當前提交
48ac3fd5ce
共有 1 個文件被更改,包括 19 次插入1 次删除
  1. 19 1
      app/common.php

+ 19 - 1
app/common.php

@@ -236,10 +236,28 @@ function setword($type,$id){
         case 3:     //生产订单
             $templateProcessor = new TemplateProcessor($dir.'/scdd.docx');
             $info =ShopPurchase::getItem(2)
-                ->with(['merchant','ppoffer','ppoffer.user'])
+                ->with(['merchant','items','ppoffer','ppoffer.user'])
                 ->lock(true)
                 ->findOrEmpty($id);
             dump($info->toArray());die;
+            $array = [
+                'order_no'=>$info['order_no'],
+                'date'=>date('Y-m-d',strtotime($info['post_time'])),
+                'shopname'=>$info['merchant']['name'],
+                'mfname'=>$info['merchant']['contact_name'],
+                'mfphone'=>$info['merchant']['contact_phone'],
+                'mmfname'=>$info['ppoffer']['user']['nickname'],
+                'mmfphone'=>$info['ppoffer']['user']['phone'],
+                'id'=>1,
+                'name'=>$info['name'],
+                'gg'=>$info['spec'],
+                'num'=>$info['number'],
+                'price'=>$info['price'],
+                'allprice'=>$allprice,
+                'dxprice'=>num_to_rmb($allprice),
+                'toprice'=>$allprice,
+                'sprice'=>$info['ppoffer']['amount']
+            ];
             break;
         case 4:     //外协订单
             break;