wholesale_add.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. {extend name="default/base/base_seller" /}
  2. {block name="seller_main"}
  3. <div class="dssc-form-default">
  4. {empty name="wholesale_info"}
  5. <form id="add_form" action="{:url('Sellerpromotionwholesale/wholesale_save')}" method="post">
  6. {else /}
  7. <form id="add_form" action="{:url('Sellerpromotionwholesale/wholesale_edit_save')}" method="post">
  8. <input type="hidden" name="wholesale_id" value="{$wholesale_info.wholesale_id}">
  9. {/empty}
  10. {empty name="wholesale_info"}
  11. <dl>
  12. <dt><i class="required">*</i>{$Think.lang.start_time}{$Think.lang.ds_colon}</dt>
  13. <dd>
  14. <input id="start_time" name="start_time" type="text" class="text w130"/>
  15. <em class="add-on"><i class="iconfont">&#xe8d6;</i></em><span></span>
  16. <p class="hint">
  17. {notpresent name="isPlatformStore"}{if $current_wholesale_quota.wholesalequota_starttime > 1}
  18. {$Think.lang.wholesale_add_start_time_explain}{$current_wholesale_quota.wholesalequota_starttime|date="Y-m-d H:i:s"}
  19. {/if}{/notpresent}
  20. </p>
  21. </dd>
  22. </dl>
  23. <dl>
  24. <dt><i class="required">*</i>{$Think.lang.end_time}{$Think.lang.ds_colon}</dt>
  25. <dd>
  26. <input id="end_time" name="end_time" type="text" class="text w130"/>
  27. <em class="add-on"><i class="iconfont">&#xe8d6;</i></em><span></span>
  28. <p class="hint">
  29. {notpresent name="isPlatformStore"}
  30. {$Think.lang.wholesale_add_end_time_explain}{$current_wholesale_quota.wholesalequota_endtime|date="Y-m-d H:i:s"}
  31. {/notpresent}
  32. </p>
  33. </dd>
  34. </dl>
  35. <dl>
  36. <dt><i class="required">*</i>{$Think.lang.wholesale_name}{$Think.lang.ds_colon}</dt>
  37. <dd>
  38. <a href="javascript:void(0);" id="btn_show_search_goods" class="dssc-btn dssc-btn-acidblue">{$Think.lang.modified_discount_price}</a>
  39. <input id="goods_commonid" name="goods_commonid" type="hidden" value=""/>
  40. <span></span>
  41. <div id="div_search_goods" class="div-goods-select mt10" style="display: none;">
  42. <table class="search-form">
  43. <tr>
  44. <th class="w150">
  45. <strong>{$Think.lang.search_store_items}</strong>
  46. </th>
  47. <td class="w160">
  48. <input id="search_goods_name" type="text w150" class="text" name="goods_name" value=""/>
  49. </td>
  50. <td class="w70 tc">
  51. <a href="javascript:void(0);" id="btn_search_goods" class="dssc-btn"/><i class="iconfont">&#xe718;</i>{$Think.lang.ds_search}</a></td>
  52. <td class="w10"></td>
  53. <td>
  54. <p class="hint">{$Think.lang.special_goods_not_allowed}</p>
  55. </td>
  56. </tr>
  57. </table>
  58. <div id="div_goods_search_result" class="search-result" style="width:739px;"></div>
  59. <a id="btn_hide_search_goods" class="close" href="javascript:void(0);">X</a>
  60. </div>
  61. <p class="hint">{$Think.lang.wholesale_goods_explain}</br><span class="red">{$Think.lang.implement_uniform_purchase_prices}</span></p>
  62. </dd>
  63. </dl>
  64. {/empty}
  65. <dl>
  66. <dt><i class="required">*</i>{$Think.lang.wholesale_if_mix}{$Think.lang.ds_colon}</dt>
  67. <dd>
  68. <ul class="dssc-form-radio-list">
  69. <li><label onclick="$('*[dstype=if_mix_0]').hide();$('*[dstype=if_mix_1]').show()"><input type="radio" name="wholesale_if_mix" {if !isset($wholesale_info) || $wholesale_info['wholesale_if_mix'] == '1'}checked="checked"{/if} value="1" />{$Think.lang.ds_yes}</label></li>
  70. <li><label onclick="$('*[dstype=if_mix_1]').hide();$('*[dstype=if_mix_0]').show()"><input type="radio" name="wholesale_if_mix" {if isset($wholesale_info) && $wholesale_info['wholesale_if_mix'] == '0'}checked="checked"{/if} value="0" />{$Think.lang.ds_no}</label></li>
  71. </ul>
  72. <p class="hint">{$Think.lang.wholesale_if_mix_notice}</p>
  73. </dd>
  74. </dl>
  75. <dl>
  76. <dt><i class="required">*</i>{$Think.lang.wholesale_set}{$Think.lang.ds_colon}</dt>
  77. <dd>
  78. <div id="wholesale_goods_item"></div>
  79. </dd>
  80. </dl>
  81. <div class="bottom">
  82. <input type="hidden" name="wholesale_json" id="wholesale_json">
  83. <input id="submit_button" type="submit" class="submit" value="{$Think.lang.ds_submit}">
  84. </div>
  85. </form>
  86. </div>
  87. <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.css">
  88. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.js"></script>
  89. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/i18n/jquery-ui-timepicker-zh-CN.js"></script>
  90. <script src="{$Think.PLUGINS_SITE_ROOT}/template.min.js"></script>
  91. <script id="wholesale_goods_template" type="text/html">
  92. <table class="layui-table">
  93. <colgroup>
  94. <col width="80" />
  95. <col width="300" />
  96. <col width="200" />
  97. <col width="100" />
  98. <col dstype="if_mix_0" <%if(wholesale_if_mix==1){%>style="display:none"<%}%> width="400" />
  99. <col dstype="if_mix_1" <%if(wholesale_if_mix==0){%>style="display:none"<%}%> width="400" />
  100. </colgroup>
  101. <thead>
  102. <tr>
  103. <th>{$Think.lang.wholesale_enable}</th>
  104. <th>{$Think.lang.wholesale_goods_info}</th>
  105. <th>{$Think.lang.wholesale_goods_price}</th>
  106. <th>{$Think.lang.wholesale_goods_storage}</th>
  107. <th>{$Think.lang.wholesale_price}</th>
  108. </tr>
  109. </thead>
  110. <tbody>
  111. <%for(var i in goods_list){%>
  112. <tr <%if(goods_list[i].goods_lock || goods_list[i].inactive){%>class="inactive"<%}%>>
  113. <td><input type="checkbox" dstype="enable" value="<%=goods_list[i].goods_id%>" <%if(goods_list[i].goods_lock){%>disabled<%}else{%><%if(!goods_list[i].inactive){%>checked<%}%> onchange="$(this).parent().parent().toggleClass('inactive')"<%}%>></td>
  114. <td>
  115. <div class="ds-table-title">
  116. <div class="ds-title-pic">
  117. <img src="<%=goods_list[i].goods_image%>" />
  118. </div>
  119. <div class="ds-title-content">
  120. <a href="javascript:;"><%=goods_list[i].goods_name%></a>
  121. </div>
  122. </div> </td>
  123. <td> ¥<%=goods_list[i].goods_price%> </td>
  124. <td> <%=goods_list[i].goods_storage%> </td>
  125. <td dstype="if_mix_0" <%if(wholesale_if_mix==1){%>style="display:none"<%}%>>
  126. <div class="ds-table-btn">
  127. <table class="layui-table sku-block" sku_id="<%=goods_list[i].goods_id%>">
  128. <colgroup>
  129. <col width="10%" />
  130. <col width="28%" />
  131. <col width="28%" />
  132. <col width="27%" />
  133. <col width="7%" />
  134. </colgroup>
  135. <thead>
  136. </thead>
  137. <tbody>
  138. <tr>
  139. <td style="min-width:40px;">{$Think.lang.wholesale_price_num}</td>
  140. <%if(!goods_list[i].wholesale_info){%>
  141. <td><input type="number" class="layui-input wholesale-inut-len num" /></td>
  142. <td><input type="number" class="layui-input wholesale-inut-len num" /></td>
  143. <td><input type="number" class="layui-input wholesale-inut-len num" /></td>
  144. <%}else{%>
  145. <%for(var j in goods_list[i].wholesale_info){%>
  146. <td><input type="number" class="layui-input wholesale-inut-len num" value="<%=goods_list[i].wholesale_info[j].num%>" /></td>
  147. <%}%>
  148. <%}%>
  149. <td rowspan="3"><a href="javascript:void(0);" class="iconfont" style="font-size:20px" onclick="addPricemodel(this);">&#xe6e8;</a></td>
  150. </tr>
  151. <tr>
  152. <td style="min-width:40px;">{$Think.lang.wholesale_price_price}</td>
  153. <%if(!goods_list[i].wholesale_info){%>
  154. <td><input type="number" class="layui-input wholesale-inut-len price" /></td>
  155. <td><input type="number" class="layui-input wholesale-inut-len price" /></td>
  156. <td><input type="number" class="layui-input wholesale-inut-len price" /></td>
  157. <%}else{%>
  158. <%for(var j in goods_list[i].wholesale_info){%>
  159. <td><input type="number" class="layui-input wholesale-inut-len price" value="<%=goods_list[i].wholesale_info[j].price%>" /></td>
  160. <%}%>
  161. <%}%>
  162. </tr>
  163. <tr>
  164. <td style="min-width:40px;">{$Think.lang.ds_handle}</td>
  165. <%if(!goods_list[i].wholesale_info){%>
  166. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  167. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  168. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  169. <%}else{%>
  170. <%for(var j in goods_list[i].wholesale_info){%>
  171. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  172. <%}%>
  173. <%}%>
  174. </tr>
  175. </tbody>
  176. </table>
  177. </div>
  178. </td>
  179. <%if(i==0){%>
  180. <td rowspan="<%=goods_list.length%>" dstype="if_mix_1" <%if(wholesale_if_mix==0){%>style="display:none"<%}%>>
  181. <div class="ds-table-btn">
  182. <table class="layui-table sku-block" sku_id="0">
  183. <colgroup>
  184. <col width="10%" />
  185. <col width="28%" />
  186. <col width="28%" />
  187. <col width="27%" />
  188. <col width="7%" />
  189. </colgroup>
  190. <thead>
  191. </thead>
  192. <tbody>
  193. <tr>
  194. <td style="min-width:40px;">{$Think.lang.wholesale_price_num}</td>
  195. <%if(!goods_list[0].wholesale_info){%>
  196. <td><input type="number" class="layui-input wholesale-inut-len num" /></td>
  197. <td><input type="number" class="layui-input wholesale-inut-len num" /></td>
  198. <td><input type="number" class="layui-input wholesale-inut-len num" /></td>
  199. <%}else{%>
  200. <%for(var j in goods_list[0].wholesale_info){%>
  201. <td><input type="number" class="layui-input wholesale-inut-len num" value="<%=goods_list[0].wholesale_info[j].num%>" /></td>
  202. <%}%>
  203. <%}%>
  204. <td rowspan="3"><a href="javascript:void(0);" class="iconfont" style="font-size:20px" onclick="addPricemodel(this);">&#xe6e8;</a></td>
  205. </tr>
  206. <tr>
  207. <td style="min-width:40px;">{$Think.lang.wholesale_price_price}</td>
  208. <%if(!goods_list[0].wholesale_info){%>
  209. <td><input type="number" class="layui-input wholesale-inut-len price" /></td>
  210. <td><input type="number" class="layui-input wholesale-inut-len price" /></td>
  211. <td><input type="number" class="layui-input wholesale-inut-len price" /></td>
  212. <%}else{%>
  213. <%for(var j in goods_list[0].wholesale_info){%>
  214. <td><input type="number" class="layui-input wholesale-inut-len price" value="<%=goods_list[0].wholesale_info[j].price%>" /></td>
  215. <%}%>
  216. <%}%>
  217. </tr>
  218. <tr>
  219. <td style="min-width:40px;">操作</td>
  220. <%if(!goods_list[0].wholesale_info){%>
  221. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  222. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  223. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  224. <%}else{%>
  225. <%for(var j in goods_list[0].wholesale_info){%>
  226. <td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>
  227. <%}%>
  228. <%}%>
  229. </tr>
  230. </tbody>
  231. </table>
  232. </div>
  233. </td>
  234. <%}%>
  235. </tr>
  236. <%}%>
  237. </tbody>
  238. </table>
  239. </script>
  240. <script>
  241. $(function () {
  242. /*{empty name = "wholesale_info"}*/
  243. $('#start_time').datetimepicker({dateFormat: 'yy-mm-dd'});
  244. $('#end_time').datetimepicker({dateFormat: 'yy-mm-dd'});
  245. /*{else}*/
  246. var data={}
  247. data.wholesale_if_mix={$wholesale_info.wholesale_if_mix};
  248. data.goods_list={$wholesalegoods_list|raw};
  249. var wholesale_goods_item = template.render('wholesale_goods_template', data);
  250. $('#wholesale_goods_item').html(wholesale_goods_item);
  251. /*{/empty}*/
  252. $('#btn_show_search_goods').on('click', function() {
  253. $('#div_search_goods').show();
  254. });
  255. $('#btn_hide_search_goods').on('click', function() {
  256. $('#div_search_goods').hide();
  257. });
  258. //搜索商品
  259. $('#btn_search_goods').on('click', function() {
  260. var url = "{:url('Sellerpromotionwholesale/goods_select')}";
  261. var datas = $.param({goods_name: $('#search_goods_name').val()});
  262. $('#div_goods_search_result').load(url,datas);
  263. });
  264. $('#div_goods_search_result').on('click', '.pagination li a', function() {
  265. $('#div_goods_search_result').load($(this).attr('href'));
  266. return false;
  267. });
  268. //选择商品
  269. $('#div_goods_search_result').on('click', '[dstype="btn_add_wholesale_goods"]', function() {
  270. var goods_commonid = $(this).attr('data-goods-commonid');
  271. $.get("{:url('Sellerpromotionwholesale/goods_info')}", {goods_commonid: goods_commonid}, function(data) {
  272. if(data.result) {
  273. $('#goods_commonid').val(goods_commonid);
  274. data.wholesale_if_mix=$('input[name=wholesale_if_mix]:checked').val()
  275. var wholesale_goods_item = template.render('wholesale_goods_template', data);
  276. $('#wholesale_goods_item').html(wholesale_goods_item);
  277. $('#div_search_goods').hide();
  278. } else {
  279. layer.msg(data.message);
  280. }
  281. }, 'json');
  282. });
  283. jQuery.validator.methods.greaterThanDate = function (value, element, param) {
  284. var date1 = new Date(Date.parse(param.replace(/-/g, "/")));
  285. var date2 = new Date(Date.parse(value.replace(/-/g, "/")));
  286. return date1 < date2;
  287. };
  288. jQuery.validator.methods.lessThanDate = function (value, element, param) {
  289. var date1 = new Date(Date.parse(param.replace(/-/g, "/")));
  290. var date2 = new Date(Date.parse(value.replace(/-/g, "/")));
  291. return date1 > date2;
  292. };
  293. jQuery.validator.methods.greaterThanStartDate = function (value, element) {
  294. var start_date = $("#start_time").val();
  295. var date1 = new Date(Date.parse(start_date.replace(/-/g, "/")));
  296. var date2 = new Date(Date.parse(value.replace(/-/g, "/")));
  297. return date1 < date2;
  298. };
  299. //页面输入内容验证
  300. $("#add_form").validate({
  301. errorPlacement: function (error, element) {
  302. var error_td = element.parent('dd').children('span');
  303. error_td.append(error);
  304. },
  305. onfocusout: false,
  306. submitHandler: function (form) {
  307. var item_list;
  308. var price_array = [];
  309. var wholesale_if_mix=$('input[name=wholesale_if_mix]:checked').val()
  310. if(wholesale_if_mix==0){
  311. item_list = $(".sku-block[sku_id!=0]");
  312. item_list.each(function() {
  313. if (!$(this).parents('tr').find('input[dstype=enable]').is(':checked')) {
  314. return
  315. }
  316. var str=getWholesale($(this))
  317. var sku_id = $(this).attr('sku_id');
  318. price_array.push(sku_id+'|'+str.join('_'));
  319. });
  320. }else{
  321. var str=getWholesale($(".sku-block[sku_id=0]"))
  322. $("input[dstype=enable]:checked").each(function() {
  323. var sku_id = $(this).val();
  324. price_array.push(sku_id+'|'+str.join('_'));
  325. })
  326. }
  327. var price_json = price_array.join(',');
  328. $('#wholesale_json').val(price_json)
  329. ds_ajaxpost('add_form', 'url', "{:url('Sellerpromotionwholesale/index')}", 1000);
  330. },
  331. rules: {
  332. start_time: {
  333. required: true,
  334. greaterThanDate: "{:date('Y-m-d H:i',@$current_wholesale_quota['wholesalequota_starttime'])}"
  335. },
  336. end_time: {
  337. required: true,
  338. /*{if !$isPlatformStore}*/
  339. lessThanDate : "{present name='current_wholesale_quota.wholesalequota_starttime'}{$current_wholesale_quota.wholesalequota_endtime|date='Y-m-d H:i'}{/present}",
  340. /*{/if}*/
  341. greaterThanStartDate : true
  342. },
  343. },
  344. messages : {
  345. start_time : {
  346. required : '<i class="iconfont">&#xe64c;</i>' +
  347. '<?php echo sprintf(lang("wholesale_add_start_time_explain"),@date("Y-m-d H:i",$current_wholesale_quota["wholesalequota_starttime"]));?>',
  348. greaterThanDate : '<i class="iconfont">&#xe64c;</i>' +
  349. '<?php echo sprintf(lang("wholesale_add_start_time_explain"),@date("Y-m-d H:i",$current_wholesale_quota["wholesalequota_starttime"]));?>'
  350. },
  351. end_time : {
  352. required : '<i class="iconfont">&#xe64c;</i>' +
  353. '<?php echo sprintf(lang("wholesale_add_end_time_explain"),@date("Y-m-d H:i",$current_wholesale_quota["wholesalequota_endtime"]));?>',
  354. /*{if !$isPlatformStore}*/
  355. lessThanDate : '<i class="iconfont">&#xe64c;</i>' +
  356. '<?php echo sprintf(lang("wholesale_add_end_time_explain"),@date("Y-m-d H:i",$current_wholesale_quota["wholesalequota_endtime"]));?>',
  357. /*{/if}*/
  358. greaterThanStartDate : '<i class="iconfont">&#xe64c;</i>{$Think.lang.greater_than_start_time}'
  359. },
  360. }
  361. });
  362. });
  363. /**
  364. * 获取阶梯价
  365. */
  366. function getWholesale(obj) {
  367. var item_price_list = obj.find('tr');
  368. if (item_price_list.length == 0) {
  369. layer.msg('{$Think.lang.wholesale_price_empty}', {
  370. icon: 5,
  371. anim: 6
  372. });
  373. return;
  374. }
  375. var first_item = obj.find('tr:eq(0)');
  376. var second_item = obj.find('tr:eq(1)');
  377. var num_item_list = first_item.find('.num');
  378. if (num_item_list.length == 0) {
  379. layer.msg('{$Think.lang.wholesale_price_empty}', {
  380. icon: 5,
  381. anim: 6
  382. });
  383. return;
  384. }
  385. var str = []
  386. num_item_list.each(function(index, element) {
  387. var index = $(element).parent().index();
  388. var num = $(element).val();
  389. var price = second_item.find('td:eq(' + index + ')').find('.price').val();
  390. str.push(num + '-' + price)
  391. });
  392. return str
  393. }
  394. /**
  395. * 添加阶梯价
  396. */
  397. function addPricemodel(obj) {
  398. var index = $(obj).parent().index();
  399. if ($(obj).parent().parent().find('td').length == 5) {
  400. return false;
  401. }
  402. $(obj).parent().before('<td><input type="number" class="layui-input wholesale-inut-len num" lay-verify="required|gtzero" /></td>');
  403. var index = $(obj).parent().index();
  404. $(obj).parent().parent().next().append('<td><input type="number" class="layui-input wholesale-inut-len price" lay-verify="required|gtzero|price"/></td>');
  405. $(obj).parent().parent().next().next().append('<td><a href="javascript:;" class="layui-btn" onclick="deletePricemodel(this)">{$Think.lang.ds_del}</a></td>');
  406. }
  407. /**
  408. * 删除阶梯价
  409. * @param e
  410. */
  411. function deletePricemodel(e) {
  412. var index = $(e).parent().index();
  413. if ($(e).parent().parent().find('td').length == 2) {
  414. layer.msg('{$Think.lang.wholesale_price_less}', {
  415. icon: 5,
  416. anim: 6
  417. });
  418. return false;
  419. }
  420. $(e).parent().parent().parent().find('tr').each(function() {
  421. console.log($(this).find('td'));
  422. $(this).find('td:eq(' + index + ')').remove();
  423. });
  424. }
  425. </script>
  426. <style>
  427. .inactive .ds-title-pic{opacity: .5}
  428. .inactive a,.inactive {color:#999}
  429. .inactive .sku-block{display: none}
  430. .inactive .sku-block[sku_id='0']{display: block}
  431. .layui-table {
  432. width: 100%;
  433. background-color: #fff;
  434. color: #666;
  435. }
  436. .layui-table thead tr{
  437. background-color: #f2f2f2;
  438. }
  439. .layui-table th {
  440. font-weight: bold;
  441. background-color: #F7F7F7;
  442. text-align: left;
  443. }
  444. .layui-table td, .layui-table th {
  445. position: relative;
  446. padding: 9px 15px;
  447. min-height: 20px;
  448. line-height: 20px;
  449. font-size: 14px;
  450. border-width: 1px;
  451. border-style: solid;
  452. border-color: #e6e6e6;
  453. }
  454. .sku-block td:nth-child(5){display: none}
  455. .wholesale-inut-len {
  456. width: 60px !important;
  457. }
  458. .layui-input{
  459. height: 34px;
  460. line-height: 34px;
  461. border-color: #E6E6E6;
  462. display: block;
  463. width: 100%;
  464. padding-left: 10px;
  465. border-width: 1px;
  466. border-style: solid;
  467. background-color: #fff;
  468. border-radius: 2px;
  469. }
  470. .ds-table-title {
  471. display: flex;
  472. align-items: center;
  473. }
  474. .ds-table-title .ds-title-pic {
  475. flex-shrink: 0;
  476. display: inline-block;
  477. width: 50px;
  478. height: 50px;
  479. text-align: center;
  480. line-height: 50px;
  481. margin-left: 5px;
  482. }
  483. .ds-table-title .ds-title-pic img {
  484. max-width: 100%;
  485. max-height: 100%;
  486. }
  487. .ds-table-title .ds-title-content {
  488. overflow: hidden;
  489. margin-left: 10px;
  490. flex: 1;
  491. line-height: 1.8;
  492. }
  493. </style>
  494. {/block}