|
@@ -1667,17 +1667,30 @@ class Center extends Auth
|
|
|
|
|
|
$dir = dirname(realpath(dirname($_SERVER['SCRIPT_FILENAME']))) . '/public/';
|
|
|
$templateProcessor = new TemplateProcessor($dir.'/cgdd.docx');
|
|
|
- $templateProcessor->setValue('order_no','1234');
|
|
|
- $templateProcessor->setValue('date','2023-02-20 15:05:50');
|
|
|
- $templateProcessor->setValue('fbz','张三');
|
|
|
- $templateProcessor->setValue('jdf','李四');
|
|
|
- $templateProcessor->setValue('fbzphone','15800000000');
|
|
|
- $templateProcessor->setValue('jdfphone','15800000001');
|
|
|
- $templateProcessor->setValue('address','藕粉色大后方胡搜凤凰山佛山房');
|
|
|
- $templateProcessor->setValue('time','2023-02-20 15:10:00');
|
|
|
- $templateProcessor->setValue('desc','维修单维修单');
|
|
|
- $templateProcessor->setValue('price','100');
|
|
|
+ $templateProcessor->cloneRow('id',3);
|
|
|
+ $templateProcessor->setValue('id#1', '1');
|
|
|
+ $templateProcessor->setValue('name#1', '名称');
|
|
|
+ $templateProcessor->setValue('gg#1', '规格');
|
|
|
+ $templateProcessor->setValue('num#1', '10');
|
|
|
+ $templateProcessor->setValue('price#1', '10');
|
|
|
+ $templateProcessor->setValue('allprice#1', '20');
|
|
|
+
|
|
|
+ $templateProcessor->setValue('id#2', '1');
|
|
|
+ $templateProcessor->setValue('name#2', '名称');
|
|
|
+ $templateProcessor->setValue('gg#2', '规格');
|
|
|
+ $templateProcessor->setValue('num#2', '10');
|
|
|
+ $templateProcessor->setValue('price#2', '10');
|
|
|
+ $templateProcessor->setValue('allprice#2', '20');
|
|
|
+
|
|
|
+ $templateProcessor->setValue('id#3', '1');
|
|
|
+ $templateProcessor->setValue('name#3', '名称');
|
|
|
+ $templateProcessor->setValue('gg#4', '规格');
|
|
|
+ $templateProcessor->setValue('num#4', '10');
|
|
|
+ $templateProcessor->setValue('price#4', '10');
|
|
|
+ $templateProcessor->setValue('allprice#4', '20');
|
|
|
+
|
|
|
$templateProcessor->saveAs($dir."b.docx");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|