<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\QuickRun\Verify\Field; use ModStart\Core\Util\IdUtil; use ModStart\Layout\LayoutHtml; class LayoutHtmlVerifyFoot extends LayoutHtml { protected $isLayoutField = true; public function __construct() { parent::__construct(null); } public function render() { goto qwpsg; Xzujv: $this->label = "<script type=\"text/html\" id=\"{$MkmbZ}Content\">\n    <button type=\"button\" class=\"btn btn-primary\" data-verify-pass>审核通过</button>\n    <button type=\"button\" class=\"btn btn-danger\" data-verify-reject>审核拒绝</button>\n    <input class=\"form\" placeholder=\"输入拒绝理由\" data-verify-rejct-remark />\n</script>\n<script>\n\$(function(){\n    \$(\".panel-dialog-foot\").css('text-align','left').html(\$('#{$MkmbZ}Content').html());\n    var search = null;\n    try {\n        search = window.parent.__grids.get(0).lister.getParam().search;\n    } catch(e) { }\n    var request = function(data){\n        MS.dialog.loadingOn();\n        var formData = \$('form').serializeJson();\n        MS.api.post(window.location.href,Object.assign(data,{search:search},formData), function(res){\n            MS.dialog.loadingOff();\n            MS.api.defaultCallback(res);\n        });\n    };\n    \$(document).on('click','[data-verify-pass]',function(){\n        request({verify:true});\n    });\n    \$(document).on('click','[data-verify-reject]',function(){\n        request({verify:false,remark:\$('[data-verify-rejct-remark]').val()});\n    });\n});\n</script>"; goto M2Sf9; qwpsg: $MkmbZ = IdUtil::generate('LayoutHtmlVerifyFoot'); goto Xzujv; M2Sf9: return parent::render(); goto OLzvN; OLzvN: } }