index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <style>
  2. /* 工具栏贴右时避免被 #content / .col / .content 裁切 */
  3. #content:has(#procuremen-layout),
  4. #content .col-xs-12:has(#procuremen-layout),
  5. div.content:has(#procuremen-layout) {
  6. overflow-x: visible !important;
  7. }
  8. div.content:has(#procuremen-layout) {
  9. padding-top: 0 !important;
  10. padding-bottom: 0 !important;
  11. }
  12. #procuremen-layout > .panel-body {
  13. padding-top: 16px !important;
  14. padding-bottom: 0 !important;
  15. }
  16. #procuremen-layout.panel-intro > .panel-heading {
  17. padding-top: 0 !important;
  18. padding-bottom: 0 !important;
  19. }
  20. #procuremen-layout.panel-intro > .panel-heading .panel-lead {
  21. margin-bottom: 0;
  22. }
  23. #procuremen-layout .tab-content,
  24. #procuremen-layout .tab-pane {
  25. padding: 0;
  26. margin: 0;
  27. }
  28. .procuremen-layout { margin: 0 -10px; }
  29. /* 左右列等高:与右侧整块(工具条+Tab+表格+分页)对齐;桌面下取消 float 用 flex */
  30. #procuremen-layout .procuremen-layout.row {
  31. display: flex;
  32. flex-wrap: wrap;
  33. align-items: stretch;
  34. }
  35. @media (min-width: 768px) {
  36. #procuremen-layout .procuremen-layout > .procuremen-sidebar,
  37. #procuremen-layout .procuremen-layout > .procuremen-main {
  38. float: none !important;
  39. display: flex;
  40. flex-direction: column;
  41. }
  42. }
  43. #procuremen-layout .procuremen-main {
  44. overflow-x: visible !important;
  45. padding-right: 18px !important;
  46. }
  47. .procuremen-sidebar {
  48. flex: 1 1 auto;
  49. min-height: 0;
  50. overflow-y: auto;
  51. border-right: 1px solid #e7e7e7;
  52. background: #fafafa;
  53. }
  54. /* 左侧年月栏:桌面 md 用 1 列(略窄于 2 列);平板 sm 仍为 2 列 */
  55. .procuremen-sidebar .year-title {
  56. font-weight: 600;
  57. padding: 6px 8px;
  58. margin: 6px 0 2px;
  59. background: #eee;
  60. border-radius: 3px;
  61. font-size: 12px;
  62. }
  63. .procuremen-sidebar .procuremen-ym-item {
  64. display: block;
  65. padding: 6px 8px;
  66. margin: 1px 0;
  67. color: #333;
  68. border-radius: 3px;
  69. text-decoration: none;
  70. border: 1px solid transparent;
  71. }
  72. .procuremen-sidebar .procuremen-ym-item:hover {
  73. background: #e8f4fc;
  74. border-color: #bce8f1;
  75. }
  76. .procuremen-sidebar .procuremen-ym-item.active {
  77. background: #3c8dbc;
  78. color: #fff;
  79. border-color: #367fa9;
  80. }
  81. #procuremen-layout .procuremen-main .widget-body {
  82. overflow-x: visible;
  83. overflow-y: hidden;
  84. flex: 1 1 0%;
  85. min-height: 0;
  86. display: flex;
  87. flex-direction: column;
  88. }
  89. #procuremen-layout .procuremen-toolbar-host,
  90. #procuremen-layout .procuremen-wff-tabs {
  91. flex-shrink: 0;
  92. }
  93. #procuremen-layout .procuremen-main .fixed-table-pagination {
  94. background: #fff;
  95. border-top: 1px solid #e7e7e7;
  96. box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
  97. }
  98. /* 主表 loading 遮罩盖不住右侧固定列克隆体,刷新时短暂露出旧「操作」按钮,加载中先隐藏 */
  99. #procuremen-layout .fixed-columns-right.procuremen-hide-fixed-right-loading {
  100. visibility: hidden !important;
  101. pointer-events: none !important;
  102. }
  103. /* JS 把 .fixed-table-toolbar 挪到此处:上一行按钮,下一行 tabs */
  104. .procuremen-toolbar-host {
  105. padding: 6px 12px 8px 0;
  106. margin-bottom: 0;
  107. border-bottom: 1px solid #e7e7e7;
  108. width: 100%;
  109. box-sizing: border-box;
  110. overflow: visible;
  111. position: relative;
  112. z-index: 3;
  113. }
  114. .procuremen-toolbar-host .fixed-table-toolbar {
  115. border: none;
  116. margin: 0;
  117. padding: 0;
  118. display: flex;
  119. align-items: center;
  120. justify-content: flex-start;
  121. flex-wrap: nowrap;
  122. gap: 12px;
  123. width: 100%;
  124. box-sizing: border-box;
  125. overflow: visible;
  126. min-height: 36px;
  127. }
  128. .procuremen-toolbar-host .fixed-table-toolbar > .pull-left,
  129. .procuremen-toolbar-host .fixed-table-toolbar > .bars.pull-left,
  130. .procuremen-toolbar-host .fixed-table-toolbar > .bs-bars.pull-left {
  131. float: none !important;
  132. margin: 0 !important;
  133. flex: 0 0 auto;
  134. }
  135. .procuremen-toolbar-host .fixed-table-toolbar > .pull-right,
  136. .procuremen-toolbar-host .fixed-table-toolbar > .columns.pull-right,
  137. .procuremen-toolbar-host .fixed-table-toolbar > .columns.columns-right {
  138. float: none !important;
  139. margin-left: auto !important;
  140. flex: 0 0 auto;
  141. display: flex;
  142. align-items: center;
  143. flex-wrap: nowrap;
  144. gap: 8px;
  145. }
  146. .procuremen-toolbar-host .fixed-table-toolbar .search {
  147. float: none !important;
  148. margin: 0 !important;
  149. }
  150. .procuremen-toolbar-host .fixed-table-toolbar .search .form-control {
  151. min-width: 140px;
  152. max-width: 220px;
  153. }
  154. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap {
  155. margin-left: auto !important;
  156. float: none !important;
  157. display: flex !important;
  158. align-items: center;
  159. flex-wrap: nowrap;
  160. gap: 8px;
  161. flex: 0 0 auto !important;
  162. flex-shrink: 0 !important;
  163. min-width: min-content;
  164. }
  165. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap .btn-group,
  166. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap button[name="search"] {
  167. flex-shrink: 0;
  168. }
  169. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > .search {
  170. order: 0 !important;
  171. }
  172. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > *:not(.search) {
  173. order: 2;
  174. }
  175. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > button[name="search"] {
  176. order: 4 !important;
  177. }
  178. #procuremen-layout .procuremen-main .procuremen-table-area {
  179. flex: 1 1 auto;
  180. min-height: 0;
  181. }
  182. .procuremen-table-area .toolbar.procuremen-toolbar-empty {
  183. display: none !important;
  184. }
  185. .procuremen-wff-tabs {
  186. margin-bottom: 0;
  187. margin-top: 0;
  188. border-bottom: 1px solid #ddd;
  189. }
  190. .procuremen-wff-tabs > li > a {
  191. padding: 8px 14px;
  192. }
  193. #procuremen-layout .bootstrap-table .table > thead > tr > th,
  194. #procuremen-layout .bootstrap-table .table > tbody > tr > td {
  195. padding: 3px 6px;
  196. line-height: 1.28;
  197. vertical-align: middle;
  198. }
  199. /* 复选框列:表头 .th-inner 与表体 td 内边距一致,避免全选与行勾选框错位 */
  200. #procuremen-layout .bootstrap-table th.bs-checkbox,
  201. #procuremen-layout .bootstrap-table td.bs-checkbox {
  202. width: 42px !important;
  203. min-width: 42px !important;
  204. max-width: 42px !important;
  205. padding: 3px 4px !important;
  206. text-align: center !important;
  207. vertical-align: middle !important;
  208. box-sizing: border-box;
  209. }
  210. #procuremen-layout .bootstrap-table th.bs-checkbox .th-inner {
  211. padding: 0 !important;
  212. margin: 0 !important;
  213. text-align: center !important;
  214. line-height: 1;
  215. min-height: 0;
  216. }
  217. #procuremen-layout .bootstrap-table th.bs-checkbox input[type="checkbox"],
  218. #procuremen-layout .bootstrap-table td.bs-checkbox input[type="checkbox"] {
  219. margin: 0 auto !important;
  220. vertical-align: middle !important;
  221. float: none;
  222. position: static;
  223. top: auto;
  224. width: 16px;
  225. height: 16px;
  226. cursor: pointer;
  227. display: block;
  228. }
  229. #procuremen-layout .bootstrap-table tbody td.bs-checkbox {
  230. min-height: 28px;
  231. cursor: pointer;
  232. }
  233. /* 避免出现纵向滚动条时表头与表体列宽错位 */
  234. #procuremen-layout .bootstrap-table .fixed-table-body {
  235. overflow-y: scroll;
  236. }
  237. #procuremen-layout .nice-validator .bootstrap-table td.bs-checkbox input[type="checkbox"],
  238. #procuremen-layout .nice-validator .bootstrap-table th.bs-checkbox input[type="checkbox"] {
  239. vertical-align: middle !important;
  240. }
  241. #procuremen-layout .bootstrap-table .table > tbody > tr > td .btn-xs {
  242. padding: 2px 6px;
  243. font-size: 12px;
  244. }
  245. /*
  246. * 右固定列与主表 .fixed-table-body 为同级兄弟,主表全宽时最后一列会叠在固定层「下面」。
  247. * 全局 backend.css 里 .fixed-columns-right 仅 z-index:2,易被主表内层盖住,表现为要点多次才打开弹窗。
  248. * 抬高固定列整体叠层,并把主表滚动区压在 z-index:0,保证命中的是固定层上的按钮。
  249. */
  250. #procuremen-layout .bootstrap-table .fixed-table-container > .fixed-table-body {
  251. position: relative;
  252. z-index: 0;
  253. }
  254. #procuremen-layout .bootstrap-table .fixed-columns-right {
  255. box-shadow: none !important;
  256. border-left: 1px solid #e3e6ea;
  257. background-color: #fff;
  258. z-index: 18 !important;
  259. }
  260. #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-header table thead th,
  261. #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-body table tbody td {
  262. border-left-color: transparent;
  263. }
  264. /* 操作列按钮在固定层内置于可点区域之上,减少与主表透明重叠导致的「多点一次」 */
  265. /* 固定列操作按钮:抬高层级 + 明确可点,减轻与主表空白区域叠层的「点了没反应」 */
  266. #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-body {
  267. pointer-events: auto;
  268. }
  269. #procuremen-layout .bootstrap-table .fixed-columns-right a.procuremen-op-open {
  270. position: relative;
  271. z-index: 6;
  272. pointer-events: auto;
  273. display: inline-block;
  274. vertical-align: middle;
  275. }
  276. /* 完结确认弹层:与操作列「完结」同为警示色主按钮 */
  277. body .layui-layer-procuremen-finish .layui-layer-btn0 {
  278. background-color: #f0ad4e !important;
  279. border-color: #eea236 !important;
  280. color: #fff !important;
  281. }
  282. body .layui-layer-procuremen-finish .layui-layer-btn0:hover {
  283. background-color: #ec971f !important;
  284. border-color: #d58512 !important;
  285. color: #fff !important;
  286. }
  287. </style>
  288. <div class="panel panel-default panel-intro" id="procuremen-layout"
  289. data-default-ym="{$defaultYm|htmlentities}"
  290. data-procuremen-redis-api="{$procuremenRedisApi|htmlentities}"
  291. data-procuremen-stage="{$procuremenStage|default='pick'|htmlentities}">
  292. {:build_heading()}
  293. <div class="panel-body">
  294. <div class="row procuremen-layout">
  295. <div class="col-xs-12 col-sm-2 col-md-1 procuremen-sidebar">
  296. {foreach name="sidebarYearMonths" item="block"}
  297. <div class="procuremen-year-block">
  298. <div class="year-title">{$block.year}年</div>
  299. {foreach name="block.months" item="item"}
  300. <a href="javascript:;" class="procuremen-ym-item" data-ym="{$item.ym|htmlentities}">{$item.label|htmlentities}</a>
  301. {/foreach}
  302. </div>
  303. {/foreach}
  304. </div>
  305. <div class="col-xs-12 col-sm-10 col-md-11 procuremen-main">
  306. <div id="myTabContent" class="tab-content">
  307. <div class="tab-pane fade active in" id="one">
  308. <div class="widget-body no-padding">
  309. <div id="procuremen-toolbar-host" class="procuremen-toolbar-host clearfix"></div>
  310. <div class="procuremen-table-area">
  311. <div id="toolbar" class="toolbar">
  312. <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" >刷新 <i class="fa fa-refresh"></i> </a>
  313. <a href="javascript:;" class="btn btn-success" id="btn-procuremen-pick-add" title="手工新增一条外发工序" style="display:none;"><i class="fa fa-plus"></i> 新增</a>
  314. <a href="javascript:;" class="btn btn-info" id="btn-procuremen-pick-review" title="勾选一条或多条工序进行下发(多条须同一订单号)" style="display:none;"><i class="fa fa-paper-plane"></i> 下发</a>
  315. <a href="javascript:;" class="btn btn-warning" id="btn-procuremen-batch-finish" title="勾选一条或多条工序标记为已完结" style="display:none;"><i class="fa fa-flag-checkered"></i> 完结</a>
  316. </div>
  317. <table id="table"
  318. class="table table-striped table-bordered table-hover">
  319. </table>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. </div>