4a30bcdde8433b656398d42c5e13cc3e.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:77:"D:\phpstudy_pro\WWW\minongyun\public/../application/admin\view\order\add.html";i:1661938313;s:72:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\layout\default.html";i:1661938313;s:69:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\meta.html";i:1661938313;s:71:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\script.html";i:1662615560;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  8. <meta name="renderer" content="webkit">
  9. <meta name="referrer" content="never">
  10. <meta name="robots" content="noindex, nofollow">
  11. <link rel="shortcut icon" href="/assets/img/favicon.ico" />
  12. <!-- Loading Bootstrap -->
  13. <link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
  14. <?php if(\think\Config::get('fastadmin.adminskin')): ?>
  15. <link href="/assets/css/skins/<?php echo \think\Config::get('fastadmin.adminskin'); ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
  16. <?php endif; ?>
  17. <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
  18. <!--[if lt IE 9]>
  19. <script src="/assets/js/html5shiv.js"></script>
  20. <script src="/assets/js/respond.min.js"></script>
  21. <![endif]-->
  22. <script type="text/javascript">
  23. var require = {
  24. config: <?php echo json_encode($config); ?>
  25. };
  26. </script>
  27. </head>
  28. <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
  29. <div id="main" role="main">
  30. <div class="tab-content tab-addtabs">
  31. <div id="content">
  32. <div class="row">
  33. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  34. <section class="content-header hide">
  35. <h1>
  36. <?php echo __('Dashboard'); ?>
  37. <small><?php echo __('Control panel'); ?></small>
  38. </h1>
  39. </section>
  40. <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav') && \think\Config::get('fastadmin.breadcrumb')): ?>
  41. <!-- RIBBON -->
  42. <div id="ribbon">
  43. <ol class="breadcrumb pull-left">
  44. <?php if($auth->check('dashboard')): ?>
  45. <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
  46. <?php endif; ?>
  47. </ol>
  48. <ol class="breadcrumb pull-right">
  49. <?php foreach($breadcrumb as $vo): ?>
  50. <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
  51. <?php endforeach; ?>
  52. </ol>
  53. </div>
  54. <!-- END RIBBON -->
  55. <?php endif; ?>
  56. <div class="content">
  57. <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
  58. <div class="form-group">
  59. <label class="control-label col-xs-12 col-sm-2"><?php echo __('No'); ?>:</label>
  60. <div class="col-xs-12 col-sm-8">
  61. <input id="c-no" class="form-control" name="row[no]" type="text">
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Customer'); ?>:</label>
  66. <div class="col-xs-12 col-sm-8">
  67. <input id="c-customer" data-rule="required" class="form-control" name="row[customer]" type="text">
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Product'); ?>:</label>
  72. <div class="col-xs-12 col-sm-8">
  73. <input id="c-product" data-rule="required" class="form-control" name="row[product]" type="text">
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Specs'); ?>:</label>
  78. <div class="col-xs-12 col-sm-8">
  79. <input id="c-specs" class="form-control" name="row[specs]" type="text">
  80. </div>
  81. </div>
  82. <div class="form-group">
  83. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Unit'); ?>:</label>
  84. <div class="col-xs-12 col-sm-8">
  85. <input id="c-unit" class="form-control" name="row[unit]" type="text" value="kg">
  86. </div>
  87. </div>
  88. <div class="form-group">
  89. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Number'); ?>:</label>
  90. <div class="col-xs-12 col-sm-8">
  91. <input id="c-number" data-rule="required" class="form-control" name="row[number]" type="number">
  92. </div>
  93. </div>
  94. <div class="form-group">
  95. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Price'); ?>:</label>
  96. <div class="col-xs-12 col-sm-8">
  97. <input id="c-price" class="form-control" name="row[price]" type="text">
  98. </div>
  99. </div>
  100. <div class="form-group">
  101. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Delivery_date'); ?>:</label>
  102. <div class="col-xs-12 col-sm-8">
  103. <!-- <input id="c-delivery_date" data-rule="required" class="form-control" name="row[delivery_date]" type="text">-->
  104. <input id="c-delivery_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[delivery_date]" type="text" value="">
  105. </div>
  106. </div>
  107. <div class="form-group">
  108. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Remark'); ?>:</label>
  109. <div class="col-xs-12 col-sm-8">
  110. <input id="c-remark" class="form-control" name="row[remark]" type="text">
  111. </div>
  112. </div>
  113. <div class="form-group">
  114. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Date'); ?>:</label>
  115. <div class="col-xs-12 col-sm-8">
  116. <input id="c-date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[date]" type="text" value="<?php echo date('Y-m-d'); ?>">
  117. </div>
  118. </div>
  119. <div class="form-group">
  120. <label class="control-label col-xs-12 col-sm-2"><?php echo __('User_name'); ?>:</label>
  121. <div class="col-xs-12 col-sm-8">
  122. <input id="c-user_name" data-rule="required" class="form-control" name="row[user_name]" type="text">
  123. </div>
  124. </div>
  125. <div class="form-group">
  126. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Examine'); ?>:</label>
  127. <div class="col-xs-12 col-sm-8">
  128. <input id="c-examine" data-rule="required" class="form-control" name="row[examine]" type="text">
  129. </div>
  130. </div>
  131. <div class="form-group">
  132. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Status'); ?>:</label>
  133. <div class="col-xs-12 col-sm-8">
  134. <div class="radio">
  135. <?php if(is_array($statusList) || $statusList instanceof \think\Collection || $statusList instanceof \think\Paginator): if( count($statusList)==0 ) : echo "" ;else: foreach($statusList as $key=>$vo): ?>
  136. <label for="row[status]-<?php echo $key; ?>"><input id="row[status]-<?php echo $key; ?>" name="row[status]" type="radio" value="<?php echo $key; ?>" <?php if(in_array(($key), explode(',',"1"))): ?>checked<?php endif; ?> /> <?php echo $vo; ?></label>
  137. <?php endforeach; endif; else: echo "" ;endif; ?>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="form-group">
  142. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Create'); ?>:</label>
  143. <div class="col-xs-12 col-sm-8">
  144. <input id="c-create" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create]" type="text" value="<?php echo date('Y-m-d H:i:s'); ?>">
  145. </div>
  146. </div>
  147. <div class="form-group">
  148. <label class="control-label col-xs-12 col-sm-2"><?php echo __('Update'); ?>:</label>
  149. <div class="col-xs-12 col-sm-8">
  150. <input id="c-update" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update]" type="text" value="<?php echo date('Y-m-d H:i:s'); ?>">
  151. </div>
  152. </div>
  153. <div class="form-group layer-footer">
  154. <label class="control-label col-xs-12 col-sm-2"></label>
  155. <div class="col-xs-12 col-sm-8">
  156. <button type="submit" class="btn btn-primary btn-embossed disabled"><?php echo __('OK'); ?></button>
  157. <button type="reset" class="btn btn-default btn-embossed"><?php echo __('Reset'); ?></button>
  158. </div>
  159. </div>
  160. </form>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
  168. <!--<input type="hidden" value="<?php echo \think\Session::get('admin.username'); ?>" name="" id="username">-->
  169. <input type="hidden" value="<?php echo \think\Session::get('admin.company'); ?>" name="" id="company">
  170. <script>
  171. function watermark(element, config) {
  172. // 获取元素的坐标
  173. function getOffset(el) {
  174. if (el.offsetParent) {
  175. return {
  176. x: el.offsetLeft + getOffset(el.offsetParent).x,
  177. y: el.offsetTop + getOffset(el.offsetParent).y,
  178. };
  179. }
  180. return {
  181. x: el.offsetLeft,
  182. y: el.offsetTop,
  183. };
  184. }
  185. if (!element) return;
  186. // 默认配置
  187. const _config = {
  188. text1: '张三', //文本1
  189. text2: '13868686868', // 文本2
  190. start_x: 0, // x轴起始位置
  191. start_y: 0, // y轴起始位置
  192. space_x: 100, // x轴间距
  193. space_y: 50, // y轴间距
  194. width: 210, // 宽度
  195. height: 80, // 长度
  196. fontSize: 14, // 字体
  197. color: '#aaa', // 字色
  198. alpha: 0.4, // 透明度
  199. rotate: 15, // 倾斜度
  200. };
  201. // 替换默认配置
  202. if (arguments.length === 2 && typeof arguments[1] === "object") {
  203. const src = arguments[1] || {};
  204. for (let key in src) {
  205. if (src[key] && _config[key] && src[key] === _config[key]) {
  206. continue;
  207. } else if (src[key]) {
  208. _config[key] = src[key];
  209. }
  210. }
  211. }
  212. // 节点的总宽度
  213. const total_width = element.scrollWidth;
  214. // 节点的总高度
  215. const total_height = element.scrollHeight;
  216. // 创建文本碎片,用于包含所有的插入节点
  217. const mark = document.createDocumentFragment();
  218. // 水印节点的起始坐标
  219. const position = getOffset(element);
  220. let x = position.x + _config.start_x, y = position.y + _config.start_y;
  221. // 先循环y轴插入水印
  222. do {
  223. // 再循环x轴插入水印
  224. do {
  225. // 创建单个水印节点
  226. const item = document.createElement('div');
  227. item.className = 'watermark-item';
  228. // 设置节点的样式
  229. item.style.position = "absolute";
  230. item.style.zIndex = 99999;
  231. item.style.left = `${x}px`;
  232. item.style.top = `${y}px`;
  233. item.style.width = `${_config.width}px`;
  234. item.style.height = `${_config.height}px`;
  235. item.style.fontSize = `${_config.fontSize}px`;
  236. item.style.color = _config.color;
  237. item.style.textAlign = 'center';
  238. item.style.opacity = _config.alpha;
  239. item.style.filter = `alpha(opacity=${_config.alpha * 100})`;
  240. // item.style.filter = `opacity(${_config.alpha * 100}%)`;
  241. item.style.webkitTransform = `rotate(-${_config.rotate}deg)`;
  242. item.style.MozTransform = `rotate(-${_config.rotate}deg)`;
  243. item.style.msTransform = `rotate(-${_config.rotate}deg)`;
  244. item.style.OTransform = `rotate(-${_config.rotate}deg)`;
  245. item.style.transform = `rotate(-${_config.rotate}deg)`;
  246. item.style.pointerEvents = 'none'; //让水印不遮挡页面的点击事件
  247. // 创建text1水印节点
  248. const text1 = document.createElement('div');
  249. text1.appendChild(document.createTextNode(_config.text1));
  250. item.append(text1);
  251. // 创建text2水印节点
  252. const text2 = document.createElement('div');
  253. text2.appendChild(document.createTextNode(_config.text2));
  254. item.append(text2);
  255. // 添加水印节点到文本碎片
  256. mark.append(item);
  257. // x坐标递增
  258. x = x + _config.width + _config.space_x;
  259. // 超出文本右侧坐标停止插入
  260. } while (total_width + position.x > x + _config.width);
  261. // 重置x初始坐标
  262. x = position.x + _config.start_x;
  263. // y坐标递增
  264. y = y + _config.height + _config.space_y;
  265. // 超出文本底部坐标停止插入
  266. } while (total_height + position.y > y + _config.height);
  267. // 插入文档碎片
  268. element.append(mark);
  269. }
  270. var username = document.getElementById('username');
  271. var company = document.getElementById('company');
  272. //找到存放水印的盒子
  273. const element = document.getElementsByTagName('body')[0];
  274. watermark(element,{text1:username.value,text2:company.value});
  275. </script>
  276. </body>
  277. </html>