master
cody 6 months ago
parent a2216d0410
commit 03e0d58dc3

@ -1919,7 +1919,7 @@ class OrdersController extends CommonController
* @OA\Parameter(name="customer_id", in="query", @OA\Schema(type="integer"), required=true, description="客户id"), * @OA\Parameter(name="customer_id", in="query", @OA\Schema(type="integer"), required=true, description="客户id"),
* @OA\Parameter(name="customer_sign_id", in="query", @OA\Schema(type="integer"), required=true, description="客户签名图片id"), * @OA\Parameter(name="customer_sign_id", in="query", @OA\Schema(type="integer"), required=true, description="客户签名图片id"),
* @OA\Parameter(name="company_sign_id", in="query", @OA\Schema(type="integer"), required=true, description="公司签名图片id"), * @OA\Parameter(name="company_sign_id", in="query", @OA\Schema(type="integer"), required=true, description="公司签名图片id"),
* @OA\Parameter(name="file_id", in="query", @OA\Schema(type="integer"), required=true, description="协议文件id"), * @OA\Parameter(name="html", in="query", @OA\Schema(type="string"), required=true, description="协议html内容"),
* @OA\Response( * @OA\Response(
* response="200", * response="200",
* description="更新订单状态" * description="更新订单状态"
@ -1937,7 +1937,7 @@ class OrdersController extends CommonController
* @OA\Post( * @OA\Post(
* path="/manager/html-to-image", * path="/manager/html-to-image",
* tags={"管理端订单处理"}, * tags={"管理端订单处理"},
* summary="html生成图片", * summary="html生成图片(废弃)",
* description="html生成图片", * description="html生成图片",
* @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"), * @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"),
* @OA\Parameter(name="html", in="query", @OA\Schema(type="string"), required=true, description="html内容"), * @OA\Parameter(name="html", in="query", @OA\Schema(type="string"), required=true, description="html内容"),

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateOrderAgreementsAddHtml extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('order_agreements', function (Blueprint $table) {
$table->mediumText('html')->nullable()->comment('协议内容html');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

@ -1 +0,0 @@
7e01ae195d6d866fb688b83a9c7081b0

@ -1 +0,0 @@
520c7bfbde672e65a89206776e3b9be4

@ -1 +0,0 @@
9a929b5b5e0990e40920a6e57b6e40a5

@ -96,9 +96,9 @@
@endif @endif
</td> --> </td> -->
<td> <td>
@if($row->file) @if($row->html)
<a href="{{Storage::url($row->file->folder . '/' . $row->file->name)}}" <a href="javascript:void(0);" onclick="showHtml(this)"
target="_blank">查看</a> data-html="{{base64_encode($row->html)}}">查看</a>
@else @else
- -
@endif @endif
@ -127,6 +127,18 @@
@push("footer") @push("footer")
<script> <script>
function showHtml(element) {
// 获取base64编码的HTML内容
var encodedHtml = element.getAttribute('data-html');
// 解码HTML内容
var htmlContent = atob(encodedHtml);
// 打开新窗口
var newWindow = window.open('', '_blank');
// 写入HTML内容
newWindow.document.open();
newWindow.document.write(htmlContent);
newWindow.document.close();
}
</script> </script>
@endpush @endpush
Loading…
Cancel
Save