|
@@ -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;
|