edit.blade.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. @extends('layouts.base')
  2. @section('content')
  3. @section('title', trans('商品详情'))
  4. <script type="text/javascript">
  5. window.type = "{{$goods['type']}}";
  6. window.virtual = "{{$goods['virtual']}}";
  7. $(function () {
  8. $(':radio[name=type]').click(function () {
  9. window.type = $("input[name='type']:checked").val();
  10. window.virtual = $("#virtual").val();
  11. if (window.type == '1') {
  12. $('#dispatch_info').show();
  13. } else {
  14. $('#dispatch_info').hide();
  15. }
  16. if (window.type == '3') {
  17. if ($('#virtual').val() == '0') {
  18. $('.choosetemp').show();
  19. }
  20. }
  21. })
  22. $("input[name='back']").click(function () {
  23. location.href = "{!! yzWebUrl('plugin.auction.admin.auction.index') !!}";
  24. });
  25. })
  26. window.optionchanged = false;
  27. require(['bootstrap'], function () {
  28. $('#myTab a').click(function (e) {
  29. e.preventDefault();
  30. $(this).tab('show');
  31. })
  32. });
  33. require(['util'], function (u) {
  34. $('#cp').each(function () {
  35. u.clip(this, $(this).text());
  36. });
  37. });
  38. function formcheck() {
  39. window.type = $("input[name='goods[type]']:checked").val();
  40. window.virtual = $("#virtual").val();
  41. var reg = /(^[-+]?[1-9]\d*(\.\d{1,2})?$)|(^[-+]?[0]{1}(\.\d{1,2})?$)/; //金额字段验证,后两位小数
  42. var numerictype = /^(0|[1-9]\d*)$/; //整数验证
  43. var thumb = /\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/;
  44. var datetime = /(\d{2}|\d{4})(?:\-)?([0]{1}\d{1}|[1]{1}[0-2]{1})(?:\-)?([0-2]{1}\d{1}|[3]{1}[0-1]{1})(?:\s)?([0-1]{1}\d{1}|[2]{1}[0-3]{1})(?::)?([0-5]{1}\d{1})(?::)?([0-5]{1}\d{1})/;
  45. if ($(':input[name="auction[start_price]"]').val() <= 0) {
  46. alert("请输入起拍价");
  47. $('#myTab a[href="#tab_auction"]').tab('show');
  48. Tip.focus(':input[name="auction[start_price]"]', "请输入起拍价!");
  49. return false;
  50. } else {
  51. if (!reg.test($(':input[name="auction[start_price]"]').val())) {
  52. alert("起拍价金额数值格式错误,最多两位小数");
  53. $('#myTab a[href="#tab_auction"]').tab('show');
  54. Tip.focus(':input[name="auction[start_price]"]', '起拍价金额数值格式错误,最多两位小数.');
  55. return false;
  56. }
  57. }
  58. if ($(':input[name="auction[mini_markup]"]').val() <= 0) {
  59. alert("请输入单次加价金额");
  60. $('#myTab a[href="#tab_auction"]').tab('show');
  61. Tip.focus(':input[name="auction[mini_markup]"]', "请输入单次加价金额!");
  62. return false;
  63. } else {
  64. if (!reg.test($(':input[name="auction[mini_markup]"]').val())) {
  65. alert("单次加价金额数值格式错误,最多两位小数");
  66. $('#myTab a[href="#tab_auction"]').tab('show');
  67. Tip.focus(':input[name="auction[mini_markup]"]', '单次加价金额数值格式错误,最多两位小数.');
  68. return false;
  69. }
  70. }
  71. if ($(':input[name="auction[mini_deal]"]').val() <= 0) {
  72. alert("请输入最低成交价金额");
  73. $('#myTab a[href="#tab_auction"]').tab('show');
  74. Tip.focus(':input[name="auction[mini_deal]"]', "请输入最低成交价金额!");
  75. return false;
  76. } else {
  77. if (!reg.test($(':input[name="auction[mini_deal]"]').val())) {
  78. alert("最低成交价金额数值格式错误,最多两位小数");
  79. $('#myTab a[href="#tab_auction"]').tab('show');
  80. Tip.focus(':input[name="auction[mini_deal]"]', '最低成交价金额数值格式错误,最多两位小数.');
  81. return false;
  82. }
  83. }
  84. if ($(':input[name="auction[type]"]:checked').val() == 2 && $(':input[name="goods[status]"]:checked').val() == 1) {
  85. $('#myTab a[href="#tab_auction"]').tab('show');
  86. alert("只有拍卖商品审核通过才能上架");
  87. Tip.focus(':input[name="auction[type]"]', '只有拍卖商品审核通过才能上架.');
  88. return false;
  89. }
  90. /*
  91. *update date 2017/12/20 16:44
  92. *添加排序的验证
  93. */
  94. if (!numerictype.test($(':input[name="goods[display_order]"]').val())) {
  95. $('#myTab a[href="#tab_basic"]').tab('show');
  96. Tip.focus("#displayorder", "排序必须是整数!");
  97. return false;
  98. }
  99. if ($(':input[name="goods[title]"]').val() == '') {
  100. $('#myTab a[href="#tab_basic"]').tab('show');
  101. Tip.focus("#goodsname", "请输入商品名称!");
  102. return false;
  103. }
  104. if ($(':input[name="goods[title]"]').val().length >= '300') {
  105. $('#myTab a[href="#tab_basic"]').tab('show');
  106. Tip.focus("#goodsname", "商品名称不能超过300个字符!");
  107. return false;
  108. }
  109. if ($(':input[name="category[parentid][]"]').val() == 0) {
  110. $('#myTab a[href="#tab_basic"]').tab('show');
  111. Tip.focus(':input[name="category[parentid][]"]', "请选择一级分类!");
  112. return false;
  113. }
  114. if ($(':input[name="category[childid][]"]').val() == 0) {
  115. $('#myTab a[href="#tab_basic"]').tab('show');
  116. Tip.focus(':input[name="category[childid][]"]', "请选择二级分类!");
  117. return false;
  118. }
  119. @if($shopset['cat_level'] == 3)
  120. if ($(':input[name="category[thirdid][]"]').val() == 0) {
  121. $('#myTab a[href="#tab_basic"]').tab('show');
  122. Tip.focus(':input[name="category[thirdid][]"]', "请选择三级分类!");
  123. return false;
  124. }
  125. @endif
  126. if ($(':input[name="goods[sku]"]').val() == '') {
  127. $('#myTab a[href="#tab_basic"]').tab('show');
  128. Tip.focus(':input[name="goods[sku]"]', "请输入商品单位!");
  129. return false;
  130. }
  131. @if (empty($id))
  132. if ($.trim($(':input[name="goods[thumb]"]').val()) == '') {
  133. $('#myTab a[href="#tab_basic"]').tab('show');
  134. Tip.focus(':input[name="goods[thumb]"]', '请上传缩略图.');
  135. return false;
  136. } else {
  137. if (!thumb.test($.trim($(':input[name="goods[thumb]"]').val()))) {
  138. $('#myTab a[href="#tab_basic"]').tab('show');
  139. Tip.focus(':input[name="goods[thumb]"]', '图片类型必须是.gif,jpeg,jpg,png中的一种.');
  140. return false;
  141. }
  142. }
  143. @endif
  144. if ($(':input[name="goods[stock]"]').val() == '') {
  145. $('#myTab a[href="#tab_basic"]').tab('show');
  146. Tip.focus(':input[name="goods[stock]"]', "请输入库存!");
  147. return false;
  148. } else {
  149. if (!numerictype.test($(':input[name="goods[stock]"]').val())) {
  150. $('#myTab a[href="#tab_basic"]').tab('show');
  151. Tip.focus(':input[name="goods[stock]"]', '库存格式错误,只能为非负整数.');
  152. return false;
  153. }
  154. }
  155. @section('widget_js')
  156. if (!numerictype.test($(':input[name="widgets[sale][max_point_deduct]"]').val()) && $(':input[name="widgets[sale][max_point_deduct]"]').val() != '') {
  157. $('#myTab a[href="#tab_sale"]').tab('show');
  158. Tip.focus(':input[name="widgets[sale][max_point_deduct]"]', '最大积分抵扣格式错误,只能为非负整数或空.');
  159. return false;
  160. }
  161. if (!numerictype.test($(':input[name="widgets[sale][min_point_deduct]"]').val()) && $(':input[name="widgets[sale][min_point_deduct]"]').val() != '') {
  162. $('#myTab a[href="#tab_sale"]').tab('show');
  163. Tip.focus(':input[name="widgets[sale][min_point_deduct]"]', '最小积分抵扣格式错误,只能为非负整数或空.');
  164. return false;
  165. }
  166. if ($(':input[name="widgets[sale][ed_full]"]').val() != '' && !reg.test($(':input[name="widgets[sale][ed_full]"]').val())) {
  167. $('#myTab a[href="#tab_sale"]').tab('show');
  168. Tip.focus(':input[name="widgets[sale][ed_full]"]', '满额立减金额格式错误,最多两位小数.');
  169. return false;
  170. }
  171. if ($(':input[name="widgets[sale][ed_reduction]"]').val() != '' && !reg.test($(':input[name="widgets[sale][ed_reduction]"]').val())) {
  172. $('#myTab a[href="#tab_sale"]').tab('show');
  173. Tip.focus(':input[name="widgets[sale][ed_reduction]"]', '满额立减金额格式错误,最多两位小数.');
  174. return false;
  175. }
  176. if ($(':input[name="widgets[sale][point]"]').val() != '') {
  177. if (!$(':input[name="widgets[sale][point]"]').val().match('\%')) {
  178. if (!numerictype.test($(':input[name="widgets[sale][point]"]').val())) {
  179. $('#myTab a[href="#tab_sale"]').tab('show');
  180. Tip.focus(':input[name="widgets[sale][point]"]', '赠送积分格式错误,只能为非负整数.');
  181. return false;
  182. }
  183. }
  184. }
  185. if ($.trim($(':input[name="widgets[share][share_thumb]"]').val()) != '' && !thumb.test($.trim($(':input[name="widgets[share][share_thumb]"]').val()))) {
  186. $('#myTab a[href="#tab_share"]').tab('show');
  187. Tip.focus(':input[name="widgets[share][share_thumb]"]', '图片类型必须是.gif,jpeg,jpg,png中的一种.');
  188. return false;
  189. }
  190. if ($(':input[name="widgets[privilege][once_buy_limit]"]').val() == '') {
  191. $('#myTab a[href="#tab_privilege"]').tab('show');
  192. Tip.focus(':input[name="widgets[privilege][once_buy_limit]"]', "请输入每次限购数量!");
  193. return false;
  194. } else {
  195. if (!numerictype.test($(':input[name="widgets[privilege][once_buy_limit]"]').val())) {
  196. $('#myTab a[href="#tab_privilege"]').tab('show');
  197. Tip.focus(':input[name="widgets[privilege][once_buy_limit]"]', '每次限购数量格式错误,只能为非负整数.');
  198. return false;
  199. }
  200. }
  201. if ($(':input[name="widgets[privilege][total_buy_limit]"]').val() == '') {
  202. $('#myTab a[href="#tab_privilege"]').tab('show');
  203. Tip.focus(':input[name="widgets[privilege][total_buy_limit]"]', "请输入会员限购总数!");
  204. return false;
  205. } else {
  206. if (!numerictype.test($(':input[name="widgets[privilege][total_buy_limit]"]').val())) {
  207. $('#myTab a[href="#tab_privilege"]').tab('show');
  208. Tip.focus(':input[name="widgets[privilege][total_buy_limit]"]', '会员限购总数格式错误,只能为非负整数.');
  209. return false;
  210. }
  211. }
  212. if ($(':input[name="widgets[privilege][day_buy_limit]"]').val() == '') {
  213. $('#myTab a[href="#tab_privilege"]').tab('show');
  214. Tip.focus(':input[name="widgets[privilege][day_buy_limit]"]', "请输入会员每天限购数量!");
  215. return false;
  216. } else {
  217. if (!numerictype.test($(':input[name="widgets[privilege][day_buy_limit]"]').val())) {
  218. $('#myTab a[href="#tab_privilege"]').tab('show');
  219. Tip.focus(':input[name="widgets[privilege][day_buy_limit]"]', '会员每天限购数量格式错误,只能为非负整数.');
  220. return false;
  221. }
  222. }
  223. if ($(':input[name="widgets[privilege][week_buy_limit]"]').val() == '') {
  224. $('#myTab a[href="#tab_privilege"]').tab('show');
  225. Tip.focus(':input[name="widgets[privilege][week_buy_limit]"]', "请输入会员每周限购数量!");
  226. return false;
  227. } else {
  228. if (!numerictype.test($(':input[name="widgets[privilege][week_buy_limit]"]').val())) {
  229. $('#myTab a[href="#tab_privilege"]').tab('show');
  230. Tip.focus(':input[name="widgets[privilege][week_buy_limit]"]', '会员每周限购数量格式错误,只能为非负整数.');
  231. return false;
  232. }
  233. }
  234. if ($(':input[name="widgets[privilege][month_buy_limit]"]').val() == '') {
  235. $('#myTab a[href="#tab_privilege"]').tab('show');
  236. Tip.focus(':input[name="widgets[privilege][month_buy_limit]"]', "请输入会员每月限购总数!");
  237. return false;
  238. } else {
  239. if (!numerictype.test($(':input[name="widgets[privilege][month_buy_limit]"]').val())) {
  240. $('#myTab a[href="#tab_privilege"]').tab('show');
  241. Tip.focus(':input[name="widgets[privilege][month_buy_limit]"]', '会员每月限购总数格式错误,只能为非负整数.');
  242. return false;
  243. }
  244. }
  245. if ($('.discounts_value').val()) {
  246. if (!reg.test($('.discounts_value').val())) {
  247. $('#myTab a[href="#tab_discount"]').tab('show');
  248. Tip.focus('.discounts_value', '折扣或固定金额数值格式错误,最多两位小数.');
  249. return false;
  250. }
  251. }
  252. @show
  253. if ($(':input[name="widgets[dispatch][dispatch_price]"]').val() == '') {
  254. $('#myTab a[href="#tab_dispatch"]').tab('show');
  255. Tip.focus(':input[name="widgets[dispatch][dispatch_price]"]', "请输入统一邮费金额!");
  256. return false;
  257. } else {
  258. if (!reg.test($(':input[name="widgets[dispatch][dispatch_price]"]').val())) {
  259. $('#myTab a[href="#tab_dispatch"]').tab('show');
  260. Tip.focus(':input[name="widgets[dispatch][dispatch_price]"]', '统一邮费金额数值格式错误,最多两位小数.');
  261. return false;
  262. }
  263. }
  264. if ($(':input[name="widgets[area_dividend][has_dividend]"]').get(0) != undefined && $(':input[name="widgets[area_dividend][has_dividend]"]').get(0).checked) {
  265. if ($(':input[name="widgets[area_dividend][has_dividend_price]"]').val() == '') {
  266. $('#myTab a[href="#tab_area_dividend"]').tab('show');
  267. Tip.focus(':input[name="widgets[area_dividend][has_dividend_price]"]', "独立分红金额!");
  268. return false;
  269. }
  270. }
  271. var full = true;
  272. if (window.type == '3') {
  273. if (window.virtual != '0') { //如果单规格,不能有规格
  274. if ($('#hasoption').get(0).checked) {
  275. $('#myTab a[href="#tab_option"]').tab('show');
  276. util.message('您的商品类型为:虚拟物品(卡密)的单规格形式,需要关闭商品规格!');
  277. return false;
  278. }
  279. }
  280. else {
  281. var has = false;
  282. $('.spec_item_virtual').each(function () {
  283. has = true;
  284. if ($(this).val() == '' || $(this).val() == '0') {
  285. $('#myTab a[href="#tab_option"]').tab('show');
  286. Tip.focus($(this).next(), '请选择虚拟物品模板!');
  287. full = false;
  288. return false;
  289. }
  290. });
  291. if (!has) {
  292. $('#myTab a[href="#tab_option"]').tab('show');
  293. util.message('您的商品类型为:虚拟物品(卡密)的多规格形式,请添加规格!');
  294. return false;
  295. }
  296. }
  297. }
  298. if (!full) {
  299. return false;
  300. }
  301. full = checkoption();
  302. if (!full) {
  303. return false;
  304. }
  305. if (optionchanged) {
  306. $('#myTab a[href="#tab_option"]').tab('show');
  307. alert('规格数据有变动,请重新点击 [刷新规格项目表] 按钮!');
  308. return false;
  309. }
  310. var discountway = $('input:radio[name=discountway]:checked').val();
  311. var discounttype = $('input:radio[name=discounttype]:checked').val();
  312. var returntype = $('input:radio[name=returntype]:checked').val();
  313. var marketprice = $('input:text[name=marketprice]').val();
  314. var isreturn = false;
  315. // Tip.focus("#goodsname", "请输入商品名称!");
  316. // return false;
  317. if (discountway == 1) {
  318. if (discounttype == 1) {
  319. $(".discounts").each(function () {
  320. if (parseFloat($(this).val()) <= 0 || parseFloat($(this).val()) >= 10) {
  321. $(this).val('');
  322. isreturn = true;
  323. alert('请输入正确折扣!');
  324. return false;
  325. }
  326. });
  327. } else {
  328. $(".discounts2").each(function () {
  329. if (parseFloat($(this).val()) <= 0 || parseFloat($(this).val()) >= 10) {
  330. $(this).val('');
  331. isreturn = true;
  332. alert('请输入正确折扣!');
  333. return false;
  334. }
  335. });
  336. }
  337. } else {
  338. if (discounttype == 1) {
  339. $(".discounts").each(function () {
  340. if (parseFloat($(this).val()) < 0 || parseFloat($(this).val()) >= parseFloat(marketprice)) {
  341. $(this).val('');
  342. isreturn = true;
  343. alert('请输入正确折扣金额!');
  344. return false;
  345. }
  346. });
  347. } else {
  348. $(".discounts2").each(function () {
  349. if (parseFloat($(this).val()) < 0 || parseFloat($(this).val()) >= parseFloat(marketprice)) {
  350. $(this).val('');
  351. isreturn = true;
  352. alert('请输入正确折扣金额!');
  353. return false;
  354. }
  355. });
  356. }
  357. }
  358. if (returntype == 1) {
  359. $(".returns").each(function () {
  360. if (parseFloat($(this).val()) < 0 || parseFloat($(this).val()) >= parseFloat(marketprice)) {
  361. $(this).val('');
  362. isreturn = true;
  363. alert('请输入正确返现金额!');
  364. return false;
  365. }
  366. });
  367. } else {
  368. $(".returns2").each(function () {
  369. if (parseFloat($(this).val()) < 0 || parseFloat($(this).val()) >= parseFloat(marketprice)) {
  370. $(this).val('');
  371. isreturn = true;
  372. alert('请输入正确返现金额!');
  373. return false;
  374. }
  375. });
  376. }
  377. if (isreturn) {
  378. return false;
  379. }
  380. return true;
  381. }
  382. function checkoption() {
  383. var full = true;
  384. if ($("#hasoption").get(0).checked) {
  385. $(".spec_title").each(function (i) {
  386. if ($(this).val() == '') {
  387. $('#myTab a[href="#tab_option"]').tab('show');
  388. Tip.focus(".spec_title:eq(" + i + ")", "请输入规格名称!", "top");
  389. full = false;
  390. return false;
  391. }
  392. });
  393. $(".spec_item_title").each(function (i) {
  394. if ($(this).val() == '') {
  395. $('#myTab a[href="#tab_option"]').tab('show');
  396. Tip.focus(".spec_item_title:eq(" + i + ")", "请输入规格项名称!", "top");
  397. full = false;
  398. return false;
  399. }
  400. });
  401. }
  402. if (!full) {
  403. return false;
  404. }
  405. return full;
  406. }
  407. </script>
  408. <script type="text/javascript">
  409. //鼠标划过显示商品链接二维码
  410. $('.umphp').hover(function () {
  411. var url = $(this).attr('data-url');
  412. var goodsid = $(this).attr('data-goodsid');
  413. $.post("{!! yzWebUrl('shop.goods') !!}"
  414. , {'op': 'goods_qrcode', id: goodsid, url: url}
  415. , function (qr) {
  416. if (qr.img) {
  417. var goodsqr = qr.img;
  418. var element = document.getElementById(goodsid);
  419. element.src = goodsqr;
  420. }
  421. }
  422. , "json"
  423. );
  424. $(this).addClass("selected");
  425. },
  426. function () {
  427. $(this).removeClass("selected");
  428. })
  429. function fastChange(id, type, value) {
  430. $.ajax({
  431. url: "{!! yzWebUrl('shop.goods') !!}",
  432. type: "post",
  433. data: {op: 'change', id: id, type: type, value: value},
  434. cache: false,
  435. success: function () {
  436. location.reload();
  437. }
  438. })
  439. }
  440. $(function () {
  441. $("form").keypress(function (e) {
  442. if (e.which == 13) {
  443. return false;
  444. }
  445. });
  446. $('.tdedit input').keydown(function (event) {
  447. if (event.keyCode == 13) {
  448. var group = $(this).closest('.input-group');
  449. var type = group.find('button').data('type');
  450. var goodsid = group.find('button').data('goodsid');
  451. var val = $.trim($(this).val());
  452. if (type == 'title' && val == '') {
  453. return;
  454. }
  455. group.prev().show().find('span').html(val);
  456. group.hide();
  457. fastChange(goodsid, type, val);
  458. }
  459. })
  460. $('.tdedit').mouseover(function () {
  461. $(this).find('.fa-pencil').show();
  462. }).mouseout(function () {
  463. $(this).find('.fa-pencil').hide();
  464. });
  465. $('.fa-edit-item').click(function () {
  466. var group = $(this).closest('span').hide().next();
  467. group.show().find('button').unbind('click').click(function () {
  468. var type = $(this).data('type');
  469. var goodsid = $(this).data('goodsid');
  470. var val = $.trim(group.find(':input').val());
  471. if (type == 'title' && val == '') {
  472. Tip.show(group.find(':input'), '请输入名称!');
  473. return;
  474. }
  475. group.prev().show().find('span').html(val);
  476. group.hide();
  477. fastChange(goodsid, type, val);
  478. });
  479. })
  480. })
  481. function setProperty(obj, id, type) {
  482. $(obj).html($(obj).html() + "...");
  483. $.post("{!! yzWebUrl('goods.goods.index') !!}"
  484. , {'op': 'setgoodsproperty', id: id, type: type, plugin: "", data: obj.getAttribute("data")}
  485. , function (d) {
  486. $(obj).html($(obj).html().replace("...", ""));
  487. if (type == 'type') {
  488. $(obj).html(d.data == '1' ? '实体物品' : '虚拟物品');
  489. }
  490. if (type == 'status') {
  491. $(obj).html(d.data == '1' ? '上架' : '下架');
  492. }
  493. $(obj).attr("data", d.data);
  494. if (d.result == 1) {
  495. $(obj).toggleClass("label-info text-pinfo");
  496. }
  497. }
  498. , "json"
  499. );
  500. }
  501. </script>
  502. <link rel="stylesheet" type="text/css" href="{{static_url('css/font-awesome.min.css')}}">
  503. {{--<link href="{{static_url('yunshop/goods/goods.css')}}" media="all" rel="stylesheet" type="text/css"/>--}}
  504. <div class="right-titpos">
  505. <ul class="add-snav">
  506. <li class="active"><a href="#"><i class="fa fa-circle-o" style="color: #33b5d2;"></i>商品编辑</a></li>
  507. </ul>
  508. </div>
  509. {{--<div class="main rightlist">--}}
  510. <form id="goods-edit" action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
  511. <div class="panel-default panel-center">
  512. <!-- <div class="panel-heading">
  513. {if empty($goods['id'])}添加商品{else}编辑商品{/if}
  514. </div> -->
  515. <div class="top">
  516. <ul class="add-shopnav" id="myTab">
  517. <li class="active"><a href="#tab_basic">基本信息</a></li>
  518. <li><a href="#tab_des">商品描述</a></li>
  519. <li><a href="#tab_param">属性</a></li>
  520. <li><a href="#tab_option">商品规格</a></li>
  521. <li><a href="#tab_auction">拍卖设置</a></li>
  522. @section('goods_widget_title')
  523. @foreach(\app\common\modules\widget\Widget::current()->getItem('goods') as $key=>$value)
  524. <li><a href="#{{$key}}">{{$value['title']}}</a></li>
  525. @endforeach
  526. @show
  527. </ul>
  528. </div>
  529. <div class="info">
  530. <div class="panel-body">
  531. <div class="tab-content">
  532. <div class="tab-pane active" id="tab_basic">@include('goods.basic')</div>
  533. <div class="tab-pane" id="tab_des">@include('goods.des')</div>
  534. <div class="tab-pane" id="tab_param">@include('goods.tpl.param')</div>
  535. <div class="tab-pane" id="tab_option">@include('goods.tpl.option')</div>
  536. <div class="tab-pane" id="tab_auction">@include('Yunshop\Auction::admin.goods.auction')</div>
  537. @section('goods_widget_view')
  538. @foreach(\app\common\modules\widget\Widget::current()->getItem('goods') as $key=>$value)
  539. <div class="tab-pane"
  540. id="{{$key}}">{!! widget($value['class'], ['goods_id'=> $goods->id])!!}</div>
  541. @endforeach
  542. @show
  543. </div>
  544. <div class="form-group col-sm-12 mrleft40 border-t">
  545. <input type="submit" name="submit" value="提交" class="btn btn-success"
  546. onclick="return formcheck()"/>
  547. <input type="hidden" name="token" value="{{$var['token']}}"/>
  548. @section('back')
  549. <input type="button" name="back" value="返回列表" class="btn btn-default back"/>
  550. @show
  551. </div>
  552. </div>
  553. </div>
  554. </div>
  555. </form>
  556. {{--</div>--}}
  557. @endsection('content')