index.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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.row {
  37. min-height: calc(100vh - 132px);
  38. }
  39. #procuremen-layout .procuremen-layout > .procuremen-sidebar,
  40. #procuremen-layout .procuremen-layout > .procuremen-main {
  41. float: none !important;
  42. display: flex;
  43. flex-direction: column;
  44. }
  45. #procuremen-layout .procuremen-layout > .procuremen-sidebar {
  46. flex: 0 0 92px;
  47. max-width: 92px;
  48. width: 92px !important;
  49. }
  50. }
  51. #procuremen-layout .procuremen-main {
  52. overflow-x: visible !important;
  53. padding-right: 18px !important;
  54. flex: 1 1 0%;
  55. min-width: 0;
  56. }
  57. .procuremen-sidebar {
  58. flex: 0 0 auto;
  59. align-self: stretch;
  60. min-height: 0;
  61. overflow-y: auto;
  62. border-right: 1px solid #e7e7e7;
  63. background: #fafafa;
  64. }
  65. /* 左侧年月栏:桌面固定约 92px,略宽于纯数字月份便于显示「2026年」 */
  66. .procuremen-sidebar .year-title {
  67. font-weight: 600;
  68. padding: 6px 8px;
  69. margin: 6px 0 2px;
  70. background: #eee;
  71. border-radius: 3px;
  72. font-size: 12px;
  73. }
  74. .procuremen-sidebar .procuremen-ym-item {
  75. display: block;
  76. padding: 6px 8px;
  77. margin: 1px 0;
  78. color: #333;
  79. border-radius: 3px;
  80. text-decoration: none;
  81. border: 1px solid transparent;
  82. }
  83. .procuremen-sidebar .procuremen-ym-item:hover {
  84. background: #e8f4fc;
  85. border-color: #bce8f1;
  86. }
  87. .procuremen-sidebar .procuremen-ym-item.active {
  88. background: #3c8dbc;
  89. color: #fff;
  90. border-color: #367fa9;
  91. }
  92. #procuremen-layout .procuremen-main .widget-body {
  93. overflow-x: visible;
  94. overflow-y: hidden;
  95. flex: 1 1 auto;
  96. min-height: 0;
  97. display: flex;
  98. flex-direction: column;
  99. }
  100. #procuremen-layout .procuremen-toolbar-host,
  101. #procuremen-layout .procuremen-wff-tabs {
  102. flex-shrink: 0;
  103. }
  104. #procuremen-layout .procuremen-main .fixed-table-pagination {
  105. background: #fff;
  106. border-top: 1px solid #e7e7e7;
  107. box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
  108. }
  109. /* 主表 loading 遮罩盖不住右侧固定列克隆体,刷新时短暂露出旧「操作」按钮,加载中先隐藏 */
  110. #procuremen-layout .fixed-columns-right.procuremen-hide-fixed-right-loading {
  111. visibility: hidden !important;
  112. pointer-events: none !important;
  113. }
  114. /* JS 把 .fixed-table-toolbar 挪到此处:上一行按钮,下一行 tabs */
  115. .procuremen-toolbar-host {
  116. padding: 6px 12px 8px 0;
  117. margin-bottom: 0;
  118. border-bottom: 1px solid #e7e7e7;
  119. width: 100%;
  120. box-sizing: border-box;
  121. overflow: visible;
  122. position: relative;
  123. z-index: 3;
  124. }
  125. .procuremen-toolbar-host .fixed-table-toolbar {
  126. border: none;
  127. margin: 0;
  128. padding: 0;
  129. display: flex;
  130. align-items: center;
  131. justify-content: flex-start;
  132. flex-wrap: nowrap;
  133. gap: 12px;
  134. width: 100%;
  135. box-sizing: border-box;
  136. overflow: visible;
  137. min-height: 36px;
  138. }
  139. .procuremen-toolbar-host .fixed-table-toolbar > .pull-left,
  140. .procuremen-toolbar-host .fixed-table-toolbar > .bars.pull-left,
  141. .procuremen-toolbar-host .fixed-table-toolbar > .bs-bars.pull-left {
  142. float: none !important;
  143. margin: 0 !important;
  144. flex: 0 0 auto;
  145. }
  146. .procuremen-toolbar-host .fixed-table-toolbar > .pull-right,
  147. .procuremen-toolbar-host .fixed-table-toolbar > .columns.pull-right,
  148. .procuremen-toolbar-host .fixed-table-toolbar > .columns.columns-right {
  149. float: none !important;
  150. margin-left: auto !important;
  151. flex: 0 0 auto;
  152. display: flex;
  153. align-items: center;
  154. flex-wrap: nowrap;
  155. gap: 8px;
  156. }
  157. .procuremen-toolbar-host .fixed-table-toolbar .search {
  158. float: none !important;
  159. margin: 0 !important;
  160. }
  161. .procuremen-toolbar-host .fixed-table-toolbar .search .form-control {
  162. min-width: 140px;
  163. max-width: 220px;
  164. }
  165. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap {
  166. margin-left: auto !important;
  167. float: none !important;
  168. display: flex !important;
  169. align-items: center;
  170. flex-wrap: nowrap;
  171. gap: 8px;
  172. flex: 0 0 auto !important;
  173. flex-shrink: 0 !important;
  174. min-width: min-content;
  175. }
  176. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap .btn-group,
  177. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap button[name="search"] {
  178. flex-shrink: 0;
  179. }
  180. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > .search {
  181. order: 0 !important;
  182. }
  183. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > *:not(.search) {
  184. order: 2;
  185. }
  186. .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > button[name="search"] {
  187. order: 4 !important;
  188. }
  189. #procuremen-layout .procuremen-main .procuremen-table-area {
  190. flex: 1 1 auto;
  191. min-height: 0;
  192. overflow: hidden;
  193. display: flex;
  194. flex-direction: column;
  195. }
  196. #procuremen-layout .procuremen-table-area > .bootstrap-table {
  197. flex: 1 1 auto;
  198. min-height: 0;
  199. }
  200. .procuremen-table-area .toolbar.procuremen-toolbar-empty {
  201. display: none !important;
  202. }
  203. .procuremen-wff-tabs {
  204. margin-bottom: 0;
  205. margin-top: 0;
  206. border-bottom: 1px solid #ddd;
  207. }
  208. .procuremen-wff-tabs > li > a {
  209. padding: 8px 14px;
  210. }
  211. #procuremen-layout .bootstrap-table .table > thead > tr > th,
  212. #procuremen-layout .bootstrap-table .table > tbody > tr > td {
  213. padding: 3px 6px;
  214. line-height: 1.28;
  215. vertical-align: middle;
  216. }
  217. /* 复选框列:表头 .th-inner 与表体 td 内边距一致,避免全选与行勾选框错位 */
  218. #procuremen-layout .bootstrap-table th.bs-checkbox,
  219. #procuremen-layout .bootstrap-table td.bs-checkbox {
  220. width: 42px !important;
  221. min-width: 42px !important;
  222. max-width: 42px !important;
  223. padding: 3px 4px !important;
  224. text-align: center !important;
  225. vertical-align: middle !important;
  226. box-sizing: border-box;
  227. }
  228. #procuremen-layout .bootstrap-table th.bs-checkbox .th-inner {
  229. padding: 0 !important;
  230. margin: 0 !important;
  231. text-align: center !important;
  232. line-height: 1;
  233. min-height: 0;
  234. }
  235. #procuremen-layout .bootstrap-table th.bs-checkbox input[type="checkbox"],
  236. #procuremen-layout .bootstrap-table td.bs-checkbox input[type="checkbox"] {
  237. margin: 0 auto !important;
  238. vertical-align: middle !important;
  239. float: none;
  240. position: static;
  241. top: auto;
  242. width: 16px;
  243. height: 16px;
  244. cursor: pointer;
  245. display: block;
  246. }
  247. #procuremen-layout .bootstrap-table tbody td.bs-checkbox {
  248. min-height: 28px;
  249. cursor: pointer;
  250. }
  251. /* 避免出现纵向滚动条时表头与表体列宽错位 */
  252. #procuremen-layout .bootstrap-table .fixed-table-body {
  253. overflow-y: auto;
  254. }
  255. #procuremen-layout .nice-validator .bootstrap-table td.bs-checkbox input[type="checkbox"],
  256. #procuremen-layout .nice-validator .bootstrap-table th.bs-checkbox input[type="checkbox"] {
  257. vertical-align: middle !important;
  258. }
  259. #procuremen-layout .bootstrap-table .table > tbody > tr > td .btn-xs {
  260. padding: 2px 6px;
  261. font-size: 12px;
  262. }
  263. /*
  264. * 右固定列与主表 .fixed-table-body 为同级兄弟,主表全宽时最后一列会叠在固定层「下面」。
  265. * 全局 backend.css 里 .fixed-columns-right 仅 z-index:2,易被主表内层盖住,表现为要点多次才打开弹窗。
  266. * 抬高固定列整体叠层,并把主表滚动区压在 z-index:0,保证命中的是固定层上的按钮。
  267. */
  268. #procuremen-layout .bootstrap-table .fixed-table-container > .fixed-table-body {
  269. position: relative;
  270. z-index: 0;
  271. }
  272. #procuremen-layout .bootstrap-table .fixed-columns-right {
  273. box-shadow: none !important;
  274. border-left: 1px solid #e3e6ea;
  275. background-color: #fff;
  276. z-index: 18 !important;
  277. }
  278. #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-header table thead th,
  279. #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-body table tbody td {
  280. border-left-color: transparent;
  281. }
  282. /* 操作列按钮在固定层内置于可点区域之上,减少与主表透明重叠导致的「多点一次」 */
  283. /* 固定列操作按钮:抬高层级 + 明确可点,减轻与主表空白区域叠层的「点了没反应」 */
  284. #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-body {
  285. pointer-events: auto;
  286. }
  287. #procuremen-layout .bootstrap-table .fixed-columns-right a.procuremen-op-open {
  288. position: relative;
  289. z-index: 6;
  290. pointer-events: auto;
  291. display: inline-block;
  292. vertical-align: middle;
  293. }
  294. #procuremen-layout .procuremen-op-btns .btn + .btn {
  295. margin-left: 6px;
  296. }
  297. /* 可排序列表头:排序图标贴近文字,避免贴列最右侧 */
  298. #procuremen-layout .bootstrap-table thead th.procuremen-th-sort-tight {
  299. background-position: calc(100% - 8px) center !important;
  300. }
  301. #procuremen-layout .bootstrap-table thead th.procuremen-th-sort-tight .th-inner {
  302. display: inline-block;
  303. max-width: calc(100% - 4px);
  304. padding-right: 16px !important;
  305. box-sizing: border-box;
  306. }
  307. /* 完结确认弹层:与操作列「完结」同为警示色主按钮 */
  308. body .layui-layer-procuremen-finish .layui-layer-btn0 {
  309. background-color: #f0ad4e !important;
  310. border-color: #eea236 !important;
  311. color: #fff !important;
  312. }
  313. body .layui-layer-procuremen-finish .layui-layer-btn0:hover {
  314. background-color: #ec971f !important;
  315. border-color: #d58512 !important;
  316. color: #fff !important;
  317. }
  318. #procuremen-layout .procuremen-po-field.procuremen-po-dirty {
  319. border-color: #f0ad4e;
  320. box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 4px rgba(240, 173, 78, 0.45);
  321. }
  322. .procuremen-po-popover {
  323. position: fixed;
  324. z-index: 100050;
  325. padding: 6px 8px;
  326. background: #fff;
  327. border: 1px solid #d2d6de;
  328. border-radius: 4px;
  329. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  330. }
  331. .procuremen-po-popover-inner {
  332. white-space: nowrap;
  333. }
  334. .procuremen-po-popover-inner .btn + .btn {
  335. margin-left: 6px;
  336. }
  337. #procuremen-layout .procuremen-supplier-lines-cell {
  338. position: relative;
  339. }
  340. #procuremen-layout .procuremen-supplier-lines-cell .procuremen-supplier-caret {
  341. position: absolute;
  342. right: 0;
  343. top: 0;
  344. height: 100%;
  345. line-height: 1;
  346. background: #eee;
  347. color: #ddd;
  348. padding: 0 5px;
  349. display: flex;
  350. justify-content: center;
  351. align-items: center;
  352. cursor: pointer;
  353. }
  354. #procuremen-layout .procuremen-supplier-lines-cell .procuremen-supplier-caret:hover {
  355. color: #999;
  356. }
  357. </style>
  358. <div class="panel panel-default panel-intro" id="procuremen-layout"
  359. data-default-ym="{$defaultYm|htmlentities}"
  360. data-procuremen-redis-api="{$procuremenRedisApi|htmlentities}"
  361. data-procuremen-stage="{$procuremenStage|default='pick'|htmlentities}"
  362. data-can-dispatch="{$procuremenBtnDispatch|default=0}"
  363. data-can-pick-delete="{$procuremenBtnPickDelete|default=0}"
  364. data-can-complete="{$procuremenBtnComplete|default=0}"
  365. data-can-audit-abandon="{$procuremenBtnAuditAbandon|default=0}">
  366. {:build_heading()}
  367. <div class="panel-body">
  368. <div class="row procuremen-layout">
  369. <div class="col-xs-12 col-sm-2 col-md-1 procuremen-sidebar">
  370. {foreach name="sidebarYearMonths" item="block"}
  371. <div class="procuremen-year-block">
  372. <div class="year-title">{$block.year}年</div>
  373. {foreach name="block.months" item="item"}
  374. <a href="javascript:;" class="procuremen-ym-item{if $item.ym == $defaultYm} active{/if}" data-ym="{$item.ym|htmlentities}">{$item.label|htmlentities}</a>
  375. {/foreach}
  376. </div>
  377. {/foreach}
  378. </div>
  379. <div class="col-xs-12 col-sm-10 col-md-11 procuremen-main">
  380. <div id="myTabContent" class="tab-content">
  381. <div class="tab-pane fade active in" id="one">
  382. <div class="widget-body no-padding">
  383. <div id="procuremen-toolbar-host" class="procuremen-toolbar-host clearfix"></div>
  384. <div class="procuremen-table-area">
  385. <div id="toolbar" class="toolbar">
  386. <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" >刷新 <i class="fa fa-refresh"></i> </a>
  387. {if isset($procuremenBtnAuditAbandon) && $procuremenBtnAuditAbandon}
  388. <a href="javascript:;" class="btn btn-danger" id="btn-procuremen-audit-abandon" title="勾选一条或多条订单退回协助初选重新下发(历史记录保留)" style="display:none;"><i class="fa fa-repeat"></i> 重新下发</a>
  389. {/if}
  390. {if isset($procuremenBtnDispatch) && $procuremenBtnDispatch}
  391. <a href="javascript:;" class="btn btn-info" id="btn-procuremen-pick-review" title="勾选一条或多条工序进行下发(多条须同一订单号)" style="display:none;"><i class="fa fa-paper-plane"></i> 下发</a>
  392. {/if}
  393. {if isset($procuremenBtnComplete) && $procuremenBtnComplete}
  394. <a href="javascript:;" class="btn btn-warning" id="btn-procuremen-batch-finish" title="勾选一条或多条工序标记为已完结" style="display:none;"><i class="fa fa-flag-checkered"></i> 完结</a>
  395. {/if}
  396. {if isset($procuremenBtnPickDelete) && $procuremenBtnPickDelete}
  397. <a href="javascript:;" class="btn btn-danger" id="btn-procuremen-pick-delete" title="勾选一条或多条工序从初选列表移除" style="display:none;"><i class="fa fa-trash"></i> 删除</a>
  398. {/if}
  399. </div>
  400. <table id="table"
  401. class="table table-striped table-bordered table-hover">
  402. </table>
  403. </div>
  404. </div>
  405. </div>
  406. </div>
  407. </div>
  408. </div>
  409. </div>
  410. </div>