printOriginalRecords.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429
  1. <template>
  2. <BasicModal
  3. v-bind="$attrs"
  4. @register="registerModal"
  5. destroyOnClose
  6. title="推钢室生产原始记录"
  7. :width="1400"
  8. :height="930"
  9. ok-text="打印"
  10. @ok="onPrint"
  11. >
  12. <section
  13. ref="print"
  14. style="padding: 10px 10px 0; position: relative; border: 1px solid #c5c5c5; background: #fff; width: 100%; height: 100%"
  15. id="printBilletSampleCard"
  16. >
  17. <div class="ticket next-ticket">
  18. <div style="text-align: center">
  19. <p style="font-size: 24px; font-weight: 800; display: inline-block; margin-bottom: 16px; line-height: 30px">
  20. <span class="ccmno">{{ hostNumber }}</span> #机推钢室生产原始记录
  21. </p>
  22. </div>
  23. <div class="flex ccmno-info" style="line-height: 24px">
  24. <div class="flex-1"> 班组:<component :is="renderDictTag(shiftInfo.shiftGroup, 'lg_bz')" /> </div>
  25. <div class="flex-1"> 班次:<component :is="renderDictTag(shiftInfo.shift, 'lg_bb')" /> </div>
  26. <div class="flex-1"> 定尺: </div>
  27. <div class="flex-1" style="text-align: center; font-size: 13px">
  28. {{ dayjs(curTime).format('YYYY 年 MM 月 DD 日') }}
  29. </div>
  30. <div class="flex-1" style="text-align: right; font-size: 12px"> lg/R05 </div>
  31. </div>
  32. <a-table :columns="columns" size="small" :data-source="dataSource" bordered :pagination="false">
  33. <template #summary>
  34. <a-table-summary-row>
  35. <a-table-summary-cell :col-span="remakeColSpan" style="text-align: center">备注</a-table-summary-cell>
  36. <a-table-summary-cell :col-span="sizeColSpan" style="text-align: center"> 定尺 </a-table-summary-cell>
  37. <a-table-summary-cell :col-span="flowColSpan" style="text-align: center"> 支数(支) </a-table-summary-cell>
  38. <a-table-summary-cell :col-span="weightColSpan" style="text-align: center"> 产量(吨) </a-table-summary-cell>
  39. </a-table-summary-row>
  40. <a-table-summary-row class="summary-row-no-border">
  41. <a-table-summary-cell :col-span="remakeColSpan">
  42. <div class="summary-cell-remark"></div>
  43. </a-table-summary-cell>
  44. <a-table-summary-cell :row-span="1" :col-span="1"> 热送 </a-table-summary-cell>
  45. <a-table-summary-cell :row-span="1" :col-span="sizeColSpan - 1">
  46. <div class="song-items flex" v-for="(item, index) in hotSendList" :key="index">
  47. <div class="title">{{ index }}</div>
  48. <div class="flex flex-col">
  49. <div class="song-item" v-for="ele in item">{{ ele.size }}</div>
  50. </div>
  51. </div>
  52. </a-table-summary-cell>
  53. <a-table-summary-cell :col-span="flowColSpan">
  54. <div class="song-items flex" v-for="(item, index) in hotSendList" :key="index">
  55. <div class="flex flex-col">
  56. <div class="song-item" v-for="ele in item">{{ ele.amount }}</div>
  57. </div>
  58. </div>
  59. </a-table-summary-cell>
  60. <a-table-summary-cell :col-span="weightColSpan">
  61. <div class="song-items flex" v-for="(item, index) in hotSendList" :key="index">
  62. <div class="flex flex-col">
  63. <div class="song-item" v-for="ele in item">{{ ele.weight ? ele.weight.toFixed(3) : '' }} t</div>
  64. </div>
  65. </div>
  66. </a-table-summary-cell>
  67. </a-table-summary-row>
  68. <a-table-summary-row>
  69. <a-table-summary-cell :col-span="remakeColSpan">
  70. <div class="summary-cell-remark"></div>
  71. </a-table-summary-cell>
  72. <a-table-summary-cell :row-span="1" :col-span="1"> 堆垛 </a-table-summary-cell>
  73. <a-table-summary-cell :row-span="1" :col-span="sizeColSpan - 1">
  74. <div class="song-items flex">
  75. <div class="flex flex-col">
  76. <div class="song-item" v-for="ele in stackingList">{{ ele.size }}</div>
  77. </div>
  78. </div>
  79. </a-table-summary-cell>
  80. <a-table-summary-cell :col-span="flowColSpan">
  81. <div class="song-items flex">
  82. <div class="flex flex-col">
  83. <div class="song-item" v-for="ele in stackingList">{{ ele.amount }}</div>
  84. </div>
  85. </div>
  86. </a-table-summary-cell>
  87. <a-table-summary-cell :col-span="weightColSpan">
  88. <div class="song-items flex">
  89. <div class="flex flex-col">
  90. <div class="song-item" v-for="ele in stackingList">{{ ele.weight ? ele.weight.toFixed(3) : '' }} t</div>
  91. </div>
  92. </div>
  93. </a-table-summary-cell>
  94. </a-table-summary-row>
  95. </template>
  96. </a-table>
  97. </div>
  98. </section>
  99. <template #appendFooter>
  100. <a-button @click="openJSModal = true"> 重量计算 </a-button>
  101. </template>
  102. </BasicModal>
  103. <a-modal
  104. v-model:open="openJSModal"
  105. title="重量计算"
  106. centered
  107. width="600px"
  108. :zIndex="9999"
  109. @ok="
  110. () => {
  111. openJSModal = false;
  112. }
  113. "
  114. @cancel="
  115. () => {
  116. openJSModal = false;
  117. }
  118. "
  119. >
  120. <div class="flex justify-center items-center" style="margin: 20px; line-height: 40px">
  121. <a-input-group size="large">
  122. <a-row :gutter="8">
  123. <a-col :span="5">
  124. <a-input type="number" :min="1" v-model:value="weightNum" placeholder="支数" />
  125. </a-col>
  126. <a-col :span="1" style="line-height: 40px; text-align: center">*</a-col>
  127. <a-col :span="5">
  128. <a-input type="number" v-model:value="sizeNum" placeholder="定尺" />
  129. </a-col>
  130. <a-col :span="1" style="line-height: 40px; text-align: center">*</a-col>
  131. <a-col :span="5">
  132. <a-input type="number" v-model:value="xiShu" placeholder="请输入比例" />
  133. </a-col>
  134. <a-col :span="1" style="line-height: 40px; text-align: center">=</a-col>
  135. <a-col :span="6" style="line-height: 40px; text-align: center">{{ weightCalc }}</a-col>
  136. </a-row>
  137. </a-input-group>
  138. </div>
  139. </a-modal>
  140. <!-- 设置定尺数量的modal -->
  141. <a-modal v-model:open="openSetSizeNumModal" title="设置定尺数量" centered width="500px" :zIndex="1100" @ok="confirmSetSizeNum">
  142. <div style="padding: 60px 30px 30px; font-size: 16px" v-if="editSizeNumRecord && editSizeNumRecord.hotChargeLengthArr">
  143. <div style="margin-bottom: 30px" v-for="(item, index) in editSizeNumRecord.hotChargeLengthArr" :key="index">
  144. <a-input-number
  145. size="large"
  146. v-model:value="item.totalCount"
  147. :addon-before="headText[item.hotChargeDestination] + ' ' + Number(item.hotChargeLength) / 1000 + 'm'"
  148. :min="0"
  149. :step="4"
  150. @change="
  151. (value) => {
  152. if (!value) {
  153. item.totalCount = 0;
  154. }
  155. if (value % 4 !== 0) {
  156. item.totalCount = value - (value % 4);
  157. }
  158. }
  159. "
  160. :controls="false"
  161. ></a-input-number>
  162. </div>
  163. <div style="font-size: 16px; color: #f50">注:请输入4或4的倍数.</div>
  164. </div>
  165. </a-modal>
  166. </template>
  167. <script lang="ts" setup>
  168. import { ref, computed, h } from 'vue';
  169. import { BasicModal, useModalInner } from '/@/components/Modal';
  170. import dayjs from 'dayjs';
  171. import { printJS } from '/@/hooks/web/usePrintJS';
  172. import type { TableColumnsType } from 'ant-design-vue';
  173. import { queryBilletRecordByCcmNo, editBilletRecord } from '../operator.api';
  174. import { render } from '/@/utils/common/renderUtils';
  175. import { isNumber } from '/@/utils/is';
  176. import Icon from '/@/components/Icon';
  177. import { Input, Select } from 'ant-design-vue';
  178. import { throttle } from 'lodash-es';
  179. import { useMessage } from '/@/hooks/web/useMessage';
  180. import { initDictOptions } from '/@/utils/dict';
  181. const { createMessage } = useMessage();
  182. // 渲染字典标签
  183. const renderDictTag = (value: string, dictCode: string) => {
  184. return render.renderDict(value, dictCode);
  185. };
  186. // 主机号
  187. const hostNumber = ref('5');
  188. const defaultColumns: TableColumnsType = [
  189. {
  190. title: '序号',
  191. width: 40,
  192. dataIndex: 'SerialNumber',
  193. align: 'center',
  194. key: 'SerialNumber',
  195. },
  196. {
  197. title: '炉号',
  198. dataIndex: 'heatNo',
  199. width: 80,
  200. align: 'center',
  201. key: 'heatNo',
  202. },
  203. {
  204. title: '钢种',
  205. width: 80,
  206. align: 'center',
  207. dataIndex: 'brandNum',
  208. key: 'brandNum',
  209. customRender: ({ text }) => {
  210. return render.renderDict(text, 'billet_spec');
  211. },
  212. },
  213. {
  214. title: '支数(根)',
  215. align: 'center',
  216. width: 570,
  217. children: [
  218. {
  219. title: 'I',
  220. dataIndex: 'oneFlow',
  221. key: 'oneFlow',
  222. align: 'center',
  223. width: 40,
  224. },
  225. {
  226. title: 'II',
  227. dataIndex: 'twoFlow',
  228. key: 'twoFlow',
  229. align: 'center',
  230. width: 40,
  231. },
  232. {
  233. title: 'III',
  234. dataIndex: 'threeFlow',
  235. key: 'threeFlow',
  236. align: 'center',
  237. width: 40,
  238. },
  239. {
  240. title: 'IV',
  241. dataIndex: 'fourFlow',
  242. key: 'fourFlow',
  243. align: 'center',
  244. width: 40,
  245. },
  246. {
  247. title: 'V',
  248. dataIndex: 'fiveFlow',
  249. key: 'fiveFlow',
  250. align: 'center',
  251. width: 40,
  252. },
  253. {
  254. title: 'VI',
  255. dataIndex: 'sixFlow',
  256. key: 'sixFlow',
  257. align: 'center',
  258. width: 40,
  259. },
  260. {
  261. title: 'VII',
  262. dataIndex: 'sevenFlow',
  263. key: 'sevenFlow',
  264. align: 'center',
  265. width: 40,
  266. },
  267. {
  268. title: 'VIII',
  269. dataIndex: 'eightFlow',
  270. key: 'eightFlow',
  271. align: 'center',
  272. width: 40,
  273. },
  274. {
  275. title: '合计',
  276. dataIndex: 'total',
  277. key: 'total',
  278. align: 'center',
  279. width: 40,
  280. customRender({ text, record }) {
  281. if (!record.heatNo) {
  282. return '';
  283. }
  284. return h(Input, { class: 'total-input', size: 'small', bordered: false, value: text, onBlur: (e) => handleTotalChange(e, record) }, '');
  285. },
  286. },
  287. ],
  288. },
  289. {
  290. title: () => {
  291. return h('div', { style: { position: 'relative' } }, [
  292. h('span', {}, '棒一'),
  293. h(
  294. 'div',
  295. {
  296. style: {
  297. cursor: 'pointer',
  298. position: 'absolute',
  299. right: '4px',
  300. top: '1px',
  301. },
  302. class: 'noprint',
  303. onClick: () => {
  304. console.log('点击了');
  305. const rollOnrColumn = columns.value.find((item: any) => item.dataIndex === 'rollOne');
  306. let newSize = '';
  307. rollOnrColumn.children.push({
  308. title: () => {
  309. return h(
  310. Select,
  311. {
  312. options: sizeListOPtions.value,
  313. bordered: false,
  314. dropdownStyle: {
  315. minWidth: '80px',
  316. },
  317. defaultValue: '',
  318. onChange: (value) => {
  319. newSize = value;
  320. },
  321. },
  322. ''
  323. );
  324. },
  325. dataIndex: 'newSize',
  326. key: 'newSize',
  327. align: 'center',
  328. width: 40,
  329. customRender({ text, record }) {
  330. if (!record.heatNo) {
  331. return '';
  332. }
  333. return h(
  334. Input,
  335. { class: 'total-input', size: 'small', bordered: false, value: text, onBlur: (e) => handleSizeChange(e, record, newSize) },
  336. ''
  337. );
  338. },
  339. });
  340. },
  341. },
  342. h(Icon, { icon: 'ant-design:plus-square-outlined' }, '')
  343. ),
  344. ]);
  345. },
  346. width: 40,
  347. align: 'center',
  348. dataIndex: 'rollOne',
  349. key: 'rollOne',
  350. children: [],
  351. },
  352. ];
  353. const columns = ref<TableColumnsType>(defaultColumns);
  354. const dataSource = ref<any[]>([]);
  355. const shiftInfoTxt = ref(['', '']);
  356. const shiftInfo = ref({ shift: '', shiftGroup: '' });
  357. const curTime = ref(dayjs().format('YYYY-MM-DD'));
  358. //表单赋值
  359. const fetchQueryType = ref(1);
  360. const fetchChangeShiftId = ref('');
  361. // 定尺
  362. const sizeListOPtions = ref([]);
  363. const [registerModal, { changeOkLoading, changeLoading }] = useModalInner(async (data) => {
  364. const { ccmNo, shiftText, queryType, curShiftInfo, changeShiftId, time } = data;
  365. hostNumber.value = ccmNo;
  366. fetchQueryType.value = queryType;
  367. fetchChangeShiftId.value = changeShiftId;
  368. shiftInfoTxt.value = shiftText.split('-');
  369. shiftInfo.value = curShiftInfo;
  370. if (time) {
  371. curTime.value = time;
  372. }
  373. let newSip: any[] = [];
  374. for (let index = 0; index < 22; index++) {
  375. newSip.push({
  376. SerialNumber: index + 1,
  377. heatNo: '',
  378. brandNum: '',
  379. oneFlow: '',
  380. twoFlow: '',
  381. threeFlow: '',
  382. fourFlow: '',
  383. fiveFlow: '',
  384. sixFlow: '',
  385. sevenFlow: '',
  386. eightFlow: '',
  387. total: '',
  388. });
  389. }
  390. dataSource.value = [...newSip];
  391. getHeatList({
  392. ccmNo,
  393. queryType,
  394. changeShiftId,
  395. });
  396. // 获取定尺啊
  397. initDictOptions('lg_dcgg').then((res) => {
  398. sizeListOPtions.value = (res || []).map((item) => {
  399. return {
  400. label: Number(item.value) / 1000,
  401. value: item.value,
  402. };
  403. });
  404. });
  405. });
  406. // 字段映射
  407. const headText = {
  408. rollClubTwoCount: '二',
  409. rollClubThreeCount: '三',
  410. rollClubShippCount: '上',
  411. roll_club_two: '棒二',
  412. roll_club_three: '棒三',
  413. roll_out_shipp: '上若',
  414. };
  415. // 备注
  416. const remakeColSpan = ref(8);
  417. // 定尺
  418. const sizeColSpan = ref(2);
  419. // 支数
  420. const flowColSpan = ref(2);
  421. // 产量
  422. const weightColSpan = ref(4);
  423. // 热送统计
  424. const hotSendList = ref({});
  425. // 堆垛统计
  426. const stackingList = ref([]);
  427. const getHeatList = async (params) => {
  428. try {
  429. changeLoading(true);
  430. const res = await queryBilletRecordByCcmNo(params);
  431. let newArr: any[] = [];
  432. if (res && Array.isArray(res)) {
  433. // 根据时间排序
  434. newArr = res.sort((a, b) => {
  435. return dayjs(a.createTime).isBefore(dayjs(b.createTime)) ? -1 : 1;
  436. });
  437. let sizeColumn: string[] = [];
  438. let sizeHeadContent = {};
  439. // 棒一
  440. const rollOneColumns: TableColumnsType = [];
  441. const rollOneSize = {};
  442. // 棒二
  443. const rollTwoSize = {};
  444. // 棒三
  445. const rollThreeSize = {};
  446. // 上若
  447. const rollShippSize = {};
  448. // 堆垛
  449. const stackingSize = {};
  450. // 堆垛字段
  451. let stackLengthColumn: any = {
  452. title: () => {
  453. return h('div', { style: { position: 'relative' } }, [
  454. h('span', {}, '堆垛'),
  455. h(
  456. 'div',
  457. {
  458. style: {
  459. cursor: 'pointer',
  460. position: 'absolute',
  461. right: '4px',
  462. top: '1px',
  463. },
  464. class: 'noprint',
  465. onClick: () => {
  466. const rollOnrColumn = columns.value.find((item: any) => item.dataIndex === 'stackLength');
  467. let newSize = '';
  468. rollOnrColumn.children.push({
  469. title: () => {
  470. return h(
  471. Select,
  472. {
  473. options: sizeListOPtions.value,
  474. bordered: false,
  475. dropdownStyle: {
  476. minWidth: '80px',
  477. },
  478. defaultValue: '',
  479. onChange: (value) => {
  480. newSize = value;
  481. },
  482. },
  483. ''
  484. );
  485. },
  486. dataIndex: 'newSize',
  487. key: 'newSize',
  488. align: 'center',
  489. width: 40,
  490. customRender({ text, record }) {
  491. if (!record.heatNo) {
  492. return '';
  493. }
  494. return h(
  495. Input,
  496. { class: 'total-input', size: 'small', bordered: false, value: text, onBlur: (e) => handleStackChange(e, record, newSize) },
  497. ''
  498. );
  499. },
  500. });
  501. },
  502. },
  503. h(Icon, { icon: 'ant-design:plus-square-outlined' }, '')
  504. ),
  505. ]);
  506. },
  507. dataIndex: 'stackLength',
  508. key: 'stackLength',
  509. width: 40,
  510. children: [],
  511. };
  512. dataSource.value = dataSource.value.map((item, index) => {
  513. if (!newArr[index]) return item;
  514. const { lengthDetails, hotChargeLength, rollClubOneDetails, stackLength } = newArr[index];
  515. // 棒一
  516. let rollOneNum = '';
  517. let rollOneSizesObj = {};
  518. // if (hotSend) {
  519. // const obj = JSON.parse(hotSend);
  520. // rollOneNum = obj.hotSendTotalCount || '';
  521. // }
  522. if (rollClubOneDetails) {
  523. const obj = JSON.parse(rollClubOneDetails);
  524. rollOneNum = obj.directRollingTotalCount || '';
  525. const lengthGroupCount = obj.lengthGroupCount;
  526. if (lengthGroupCount) {
  527. // 热送棒一的定尺
  528. Object.keys(lengthGroupCount).forEach((key) => {
  529. const column = key;
  530. const columnKey = column + 'rollOneColumn';
  531. const findIndex = rollOneColumns.findIndex((item: any) => item.dataIndex === columnKey);
  532. if (findIndex === -1) {
  533. rollOneColumns.push({
  534. title: () => {
  535. return h('div', { class: 'rollOneColumnWrapper' }, [
  536. h(
  537. Select,
  538. {
  539. options: sizeListOPtions.value,
  540. bordered: false,
  541. dropdownStyle: {
  542. minWidth: '80px',
  543. },
  544. defaultValue: column,
  545. onChange: (value) => {
  546. switchSizehandler(value, column);
  547. },
  548. },
  549. ''
  550. ),
  551. h(
  552. 'div',
  553. { class: 'noprint', onClick: () => deleteRollOneColumn(column) },
  554. h(Icon, { icon: 'ant-design:delete-outlined' }, '')
  555. ),
  556. ]);
  557. },
  558. dataIndex: columnKey,
  559. key: columnKey,
  560. align: 'center',
  561. width: 40,
  562. customRender({ text, record }) {
  563. if (!record.heatNo) {
  564. return '';
  565. }
  566. return h(
  567. Input,
  568. { class: 'total-input', size: 'small', bordered: false, value: text, onBlur: (e) => handleSizeChange(e, record, column) },
  569. ''
  570. );
  571. },
  572. });
  573. }
  574. rollOneSizesObj[columnKey] = lengthGroupCount[key];
  575. // 如果没有棒一的定尺
  576. if (!rollOneSize[key]) {
  577. rollOneSize[key] = {
  578. size: Number(column) / 1000 + 'm',
  579. amount: lengthGroupCount[key],
  580. weight: lengthGroupCount[key] * (Number(column) / 1000) * 0.2265,
  581. };
  582. } else {
  583. rollOneSize[key].amount += lengthGroupCount[key];
  584. rollOneSize[key].weight += lengthGroupCount[key] * (Number(column) / 1000) * 0.2265;
  585. }
  586. });
  587. }
  588. }
  589. // 定尺
  590. let sizeArr = {};
  591. if (hotChargeLength) {
  592. // "[{\"hotChargeLength\":\"11820\",\"hotChargeDestination\":\"roll_club_three\",\"totalWeight\":\"5.3545\",\"totalCount\":2}]"
  593. const hotChargeArr = JSON.parse(hotChargeLength);
  594. hotChargeArr.forEach((k) => {
  595. const sizeFormat = Number(k.hotChargeLength) / 1000;
  596. if (!sizeArr[sizeFormat + 'Arr']) {
  597. sizeArr[sizeFormat + 'Arr'] = {};
  598. }
  599. sizeColumn.push(sizeFormat);
  600. // 判断是否有该字段,列头显示
  601. if (!sizeHeadContent[sizeFormat]) {
  602. sizeHeadContent[sizeFormat] = [];
  603. }
  604. // 热送统计
  605. // 棒二
  606. if (k.hotChargeDestination === 'roll_club_two' && k.totalCount > 0) {
  607. sizeArr[sizeFormat + 'Arr'].rollClubTwoCount = k.totalCount;
  608. sizeHeadContent[sizeFormat].push('rollClubTwoCount');
  609. if (!rollTwoSize[k.hotChargeLength]) {
  610. rollTwoSize[k.hotChargeLength] = {
  611. size: Number(k.hotChargeLength) / 1000 + 'm',
  612. amount: k.totalCount,
  613. weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
  614. };
  615. } else {
  616. rollTwoSize[k.hotChargeLength].amount += k.totalCount;
  617. rollTwoSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
  618. }
  619. }
  620. // 棒三
  621. if (k.hotChargeDestination === 'roll_club_three' && k.totalCount > 0) {
  622. sizeArr[sizeFormat + 'Arr'].rollClubThreeCount = k.totalCount;
  623. sizeHeadContent[sizeFormat].push('rollClubThreeCount');
  624. if (!rollThreeSize[k.hotChargeLength]) {
  625. rollThreeSize[k.hotChargeLength] = {
  626. size: Number(k.hotChargeLength) / 1000 + 'm',
  627. amount: k.totalCount,
  628. weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
  629. };
  630. } else {
  631. rollThreeSize[k.hotChargeLength].amount += k.totalCount;
  632. rollThreeSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
  633. }
  634. }
  635. // 上若
  636. if (k.hotChargeDestination === 'roll_out_shipp' && k.totalCount > 0) {
  637. sizeArr[sizeFormat + 'Arr'].rollClubShippCount = k.totalCount;
  638. sizeHeadContent[sizeFormat].push('rollClubShippCount');
  639. if (!rollShippSize[k.hotChargeLength]) {
  640. rollShippSize[k.hotChargeLength] = {
  641. size: Number(k.hotChargeLength) / 1000 + 'm',
  642. amount: k.totalCount,
  643. weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
  644. };
  645. } else {
  646. rollShippSize[k.hotChargeLength].amount += k.totalCount;
  647. rollShippSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
  648. }
  649. }
  650. });
  651. }
  652. // 堆垛
  653. let stackSizeData = {};
  654. if (stackLength) {
  655. const stackLeghtObj = JSON.parse(stackLength);
  656. stackLeghtObj.forEach((v) => {
  657. const sSize = String(v.stackingLength);
  658. const hasChild = stackLengthColumn.children.findIndex((ele) => ele.dataIndex === sSize + 'stackLength');
  659. if (hasChild < 0) {
  660. stackLengthColumn.children.push({
  661. title: () => {
  662. return h('div', { class: 'rollOneColumnWrapper' }, [
  663. h(
  664. Select,
  665. {
  666. options: sizeListOPtions.value,
  667. bordered: false,
  668. dropdownStyle: {
  669. minWidth: '80px',
  670. },
  671. defaultValue: sSize,
  672. onChange: (value) => {
  673. switchStackhandler(value, sSize);
  674. },
  675. },
  676. ''
  677. ),
  678. h('div', { class: 'noprint', onClick: () => deleteStackColumn(sSize) }, h(Icon, { icon: 'ant-design:delete-outlined' }, '')),
  679. ]);
  680. },
  681. dataIndex: sSize + 'stackLength',
  682. key: sSize + 'stackLength',
  683. width: 40,
  684. customRender({ text, record }) {
  685. if (!record.heatNo) {
  686. return '';
  687. }
  688. return h(
  689. Input,
  690. { class: 'total-input', size: 'small', bordered: false, value: text, onBlur: (e) => handleStackChange(e, record, sSize) },
  691. ''
  692. );
  693. },
  694. });
  695. }
  696. stackSizeData[sSize + 'stackLength'] = v.stackingCount;
  697. // 给堆垛添加致谢
  698. if (!stackingSize[sSize]) {
  699. stackingSize[sSize] = {
  700. size: Number(sSize) / 1000 + 'm',
  701. amount: v.stackingCount,
  702. weight: v.stackingCount * (Number(sSize) / 1000) * 0.2265,
  703. };
  704. } else {
  705. stackingSize[sSize].amount += v.stackingCount;
  706. stackingSize[sSize].weight += v.stackingCount * (Number(sSize) / 1000) * 0.2265;
  707. }
  708. });
  709. }
  710. return {
  711. ...item,
  712. heatNo: newArr[index].heatNo,
  713. brandNum: newArr[index].grade,
  714. oneFlow: newArr[index].oneStrandSum || '',
  715. twoFlow: newArr[index].twoStrandSum || '',
  716. threeFlow: newArr[index].threeStrandSum || '',
  717. fourFlow: newArr[index].fourStrandSum || '',
  718. fiveFlow: newArr[index].fiveStrandSum || '',
  719. sixFlow: newArr[index].sixStrandSum || '',
  720. sevenFlow: newArr[index].sevenStrandSum || '',
  721. eightFlow: newArr[index].eightStrandSum || '',
  722. total: newArr[index].amount || '',
  723. rollOne: rollOneNum,
  724. ...sizeArr,
  725. ...rollOneSizesObj,
  726. ...stackSizeData,
  727. orgData: newArr[index],
  728. };
  729. });
  730. const otherColumn: TableColumnsType = [...new Set(sizeColumn)].map((item) => {
  731. return {
  732. title: () => {
  733. const subHead = Object.keys(headText)
  734. .filter((key) => sizeHeadContent[item].includes(key))
  735. .map((key) => headText[key]);
  736. return h('div', {}, [h('div', { style: { fontSize: '12px' } }, subHead.join(' / ')), h('div', {}, item)]);
  737. },
  738. dataIndex: item,
  739. key: item,
  740. align: 'center',
  741. width: 50,
  742. customRender: ({ text, record }) => {
  743. if (record[item + 'Arr']) {
  744. const subHead = Object.keys(headText)
  745. .filter((key) => sizeHeadContent[item].includes(key))
  746. .map((key) => record[item + 'Arr'][key] || '~');
  747. return h(
  748. 'div',
  749. {
  750. class: 'size-st-num',
  751. onClick: () => {
  752. if (subHead.length === 0) return;
  753. const { orgData } = record;
  754. if (!orgData || !orgData.hotChargeLength) return;
  755. const { hotChargeLength } = orgData;
  756. editSizeNumRecord.value = {
  757. ...orgData,
  758. hotChargeLengthArr: JSON.parse(hotChargeLength),
  759. };
  760. openSetSizeNumModal.value = true;
  761. },
  762. },
  763. subHead.join('/')
  764. );
  765. }
  766. return '';
  767. },
  768. };
  769. });
  770. // 添加空白列
  771. otherColumn.push(stackLengthColumn);
  772. columns.value = [...defaultColumns, ...otherColumn];
  773. if (rollOneColumns.length) {
  774. columns.value[4].children = rollOneColumns;
  775. }
  776. const allSpan = 12 + rollOneColumns.length + otherColumn.length + stackLengthColumn.children.length;
  777. remakeColSpan.value = Math.ceil(allSpan / 3);
  778. const nnColSpan = Math.ceil((allSpan - remakeColSpan.value) / 2);
  779. const newNNColSpan = nnColSpan % 2 === 0 ? nnColSpan : nnColSpan + 1;
  780. sizeColSpan.value = newNNColSpan / 2 > 4 ? newNNColSpan / 2 : 4;
  781. flowColSpan.value = newNNColSpan - sizeColSpan.value;
  782. weightColSpan.value = allSpan - remakeColSpan.value - newNNColSpan;
  783. // 热送统计
  784. if (Object.values(rollOneSize).length) {
  785. hotSendList.value['一'] = Object.values(rollOneSize);
  786. }
  787. if (Object.values(rollTwoSize).length) {
  788. hotSendList.value['二'] = Object.values(rollTwoSize);
  789. }
  790. if (Object.values(rollThreeSize).length) {
  791. hotSendList.value['三'] = Object.values(rollThreeSize);
  792. }
  793. if (Object.values(rollShippSize).length) {
  794. hotSendList.value['上'] = Object.values(rollShippSize);
  795. }
  796. if (Object.values(stackingSize)) {
  797. stackingList.value = Object.values(stackingSize);
  798. }
  799. }
  800. changeLoading(false);
  801. } catch (error) {
  802. changeLoading(false);
  803. console.log(error);
  804. }
  805. };
  806. const openJSModal = ref(false);
  807. const xiShu = ref(0.2265);
  808. const sizeNum = ref();
  809. const weightNum = ref();
  810. // 重量计算按钮
  811. const weightCalc = computed(() => {
  812. const w = Number(weightNum.value);
  813. const x = Number(xiShu.value);
  814. const s = Number(sizeNum.value);
  815. if (isNumber(w) && isNumber(x) && isNumber(s)) {
  816. const r = w * x * s;
  817. return !isNaN(r) ? r.toFixed(6) : '';
  818. }
  819. return '';
  820. });
  821. // 修改合计
  822. const handleTotalChange = throttle((e: any, record) => {
  823. const val = Number(e.target.value);
  824. if (!isNumber(val) || val <= 0) {
  825. createMessage.error('请输入数字');
  826. return;
  827. }
  828. if (record.total !== val) {
  829. const { orgData } = record;
  830. handleEdit({
  831. ...orgData,
  832. amount: val,
  833. });
  834. }
  835. }, 800);
  836. // 编辑
  837. const handleEdit = async (record) => {
  838. try {
  839. changeLoading(true);
  840. await editBilletRecord(record);
  841. await getHeatList({
  842. ccmNo: hostNumber.value,
  843. queryType: fetchQueryType.value,
  844. changeShiftId: fetchChangeShiftId.value,
  845. });
  846. changeLoading(false);
  847. } catch (error) {
  848. changeLoading(false);
  849. console.log(error);
  850. }
  851. };
  852. // 修改棒一定尺数量
  853. const handleSizeChange = throttle((e: any, record, size) => {
  854. if (!size) {
  855. createMessage.error('请选择定尺');
  856. return;
  857. }
  858. const val = Number(e.target.value);
  859. if (!isNumber(val)) {
  860. createMessage.error('请输入大于0的数字');
  861. return;
  862. }
  863. const { orgData } = record;
  864. const { rollClubOneDetails } = orgData;
  865. let obj = {
  866. lengthGroupCount: {},
  867. directRollingTotalWeight: 0,
  868. directRollingTotalCount: 0,
  869. };
  870. if (rollClubOneDetails) {
  871. obj = JSON.parse(rollClubOneDetails);
  872. }
  873. const lengthGroupCount = obj.lengthGroupCount;
  874. if (
  875. lengthGroupCount &&
  876. ((Object.hasOwn(lengthGroupCount, size) && (val === 0 || lengthGroupCount[size] !== val)) ||
  877. (!Object.hasOwn(lengthGroupCount, size) && val > 0))
  878. ) {
  879. if (val <= 0) {
  880. delete obj.lengthGroupCount[size];
  881. } else {
  882. obj.lengthGroupCount[size] = val;
  883. }
  884. handleEdit({
  885. ...orgData,
  886. rollClubOneDetails: JSON.stringify(obj),
  887. });
  888. }
  889. }, 800);
  890. // 修改堆垛定尺数量
  891. const handleStackChange = throttle((e: any, record, size) => {
  892. if (!size) {
  893. createMessage.error('请选择定尺');
  894. return;
  895. }
  896. const val = Number(e.target.value);
  897. if (!isNumber(val)) {
  898. createMessage.error('请输入大于0的数字');
  899. return;
  900. }
  901. const { orgData } = record;
  902. const { stackLength } = orgData;
  903. let obj: any[] = [];
  904. if (stackLength) {
  905. obj = JSON.parse(stackLength);
  906. }
  907. const lengthGroupCount = obj.findIndex((v) => v.stackingLength == size);
  908. if (lengthGroupCount === -1) {
  909. obj.push({
  910. stackingCount: val,
  911. stackingLength: size,
  912. stackingWeight: val * (Number(size) / 1000) * 0.2265,
  913. });
  914. } else {
  915. if (obj[lengthGroupCount].stackingCount === val) return;
  916. obj[lengthGroupCount].stackingCount = val;
  917. obj[lengthGroupCount].stackingWeight = val * (Number(size) / 1000) * 0.2265;
  918. }
  919. handleEdit({
  920. ...orgData,
  921. stackLength: JSON.stringify(obj),
  922. });
  923. }, 800);
  924. // 编辑切换定尺
  925. const switchSizehandler = async (val, oldSize) => {
  926. try {
  927. changeLoading(true);
  928. const fetchArr: any[] = [];
  929. dataSource.value.forEach((item) => {
  930. if (item.heatNo && item.orgData) {
  931. const { rollClubOneDetails } = item.orgData;
  932. if (rollClubOneDetails) {
  933. const obj = JSON.parse(rollClubOneDetails);
  934. if (obj && obj.lengthGroupCount) {
  935. const lengthGroupCount = obj.lengthGroupCount;
  936. if (lengthGroupCount[oldSize]) {
  937. obj.lengthGroupCount[val] = lengthGroupCount[oldSize] + (lengthGroupCount[val] ? lengthGroupCount[val] : 0);
  938. delete obj.lengthGroupCount[oldSize];
  939. // 请求push了
  940. fetchArr.push(
  941. editBilletRecord({
  942. ...item.orgData,
  943. rollClubOneDetails: JSON.stringify(obj),
  944. })
  945. );
  946. }
  947. }
  948. }
  949. }
  950. });
  951. if (fetchArr.length > 0) {
  952. await Promise.all(fetchArr);
  953. await getHeatList({
  954. ccmNo: hostNumber.value,
  955. queryType: fetchQueryType.value,
  956. changeShiftId: fetchChangeShiftId.value,
  957. });
  958. changeLoading(false);
  959. }
  960. } catch (error) {
  961. changeLoading(false);
  962. console.log(error);
  963. }
  964. };
  965. // 堆垛编辑定尺
  966. const switchStackhandler = async (val, oldSize) => {
  967. try {
  968. // changeLoading(true);
  969. const fetchArr: any[] = [];
  970. dataSource.value.forEach((item) => {
  971. if (item.heatNo && item.orgData) {
  972. const { stackLength } = item.orgData;
  973. if (stackLength) {
  974. let obj = stackLength ? JSON.parse(stackLength) : [];
  975. const oldSizeIndex = obj.findIndex((k) => k.stackingLength === oldSize);
  976. if (oldSizeIndex > -1) {
  977. const newSizeIndex = obj.findIndex((k) => k.stackingLength === Number(val));
  978. if (newSizeIndex > -1) {
  979. obj[newSizeIndex].stackingCount += obj[oldSizeIndex].stackingCount;
  980. obj = obj.filter((j) => j.stackingLength !== oldSize);
  981. } else {
  982. obj[oldSizeIndex].stackingLength = Number(val);
  983. }
  984. // 请求push了
  985. fetchArr.push(
  986. editBilletRecord({
  987. ...item.orgData,
  988. stackLength: JSON.stringify(obj),
  989. })
  990. );
  991. }
  992. }
  993. }
  994. });
  995. if (fetchArr.length > 0) {
  996. await Promise.all(fetchArr);
  997. await getHeatList({
  998. ccmNo: hostNumber.value,
  999. queryType: fetchQueryType.value,
  1000. changeShiftId: fetchChangeShiftId.value,
  1001. });
  1002. changeLoading(false);
  1003. }
  1004. } catch (error) {
  1005. changeLoading(false);
  1006. console.log(error);
  1007. }
  1008. };
  1009. // 删除定尺
  1010. const deleteRollOneColumn = async (size) => {
  1011. try {
  1012. changeLoading(true);
  1013. const fetchArr: any[] = [];
  1014. dataSource.value.forEach((item) => {
  1015. if (item.heatNo && item.orgData) {
  1016. const { rollClubOneDetails } = item.orgData;
  1017. if (rollClubOneDetails) {
  1018. const obj = JSON.parse(rollClubOneDetails);
  1019. if (obj && obj.lengthGroupCount) {
  1020. const lengthGroupCount = obj.lengthGroupCount;
  1021. if (lengthGroupCount[size]) {
  1022. delete obj.lengthGroupCount[size];
  1023. // 请求push了
  1024. fetchArr.push(
  1025. editBilletRecord({
  1026. ...item.orgData,
  1027. rollClubOneDetails: JSON.stringify(obj),
  1028. })
  1029. );
  1030. }
  1031. }
  1032. }
  1033. }
  1034. });
  1035. if (fetchArr.length > 0) {
  1036. await Promise.all(fetchArr);
  1037. await getHeatList({
  1038. ccmNo: hostNumber.value,
  1039. queryType: fetchQueryType.value,
  1040. changeShiftId: fetchChangeShiftId.value,
  1041. });
  1042. changeLoading(false);
  1043. }
  1044. } catch (error) {
  1045. changeLoading(false);
  1046. console.log(error);
  1047. }
  1048. };
  1049. // 删除堆垛定尺
  1050. const deleteStackColumn = async (size) => {
  1051. try {
  1052. changeLoading(true);
  1053. const fetchArr: any[] = [];
  1054. dataSource.value.forEach((item) => {
  1055. if (item.heatNo && item.orgData) {
  1056. const { stackLength } = item.orgData;
  1057. if (stackLength) {
  1058. const obj = JSON.parse(stackLength);
  1059. const hasStackItem = obj.findIndex((n) => n.stackingLength === size);
  1060. if (hasStackItem > -1) {
  1061. const lengthGroupCount = obj.filter((m) => m.stackingLength !== size);
  1062. // 请求push了
  1063. fetchArr.push(
  1064. editBilletRecord({
  1065. ...item.orgData,
  1066. stackLength: JSON.stringify(lengthGroupCount),
  1067. })
  1068. );
  1069. }
  1070. }
  1071. }
  1072. });
  1073. if (fetchArr.length > 0) {
  1074. await Promise.all(fetchArr);
  1075. await getHeatList({
  1076. ccmNo: hostNumber.value,
  1077. queryType: fetchQueryType.value,
  1078. changeShiftId: fetchChangeShiftId.value,
  1079. });
  1080. changeLoading(false);
  1081. }
  1082. } catch (error) {
  1083. changeLoading(false);
  1084. console.log(error);
  1085. }
  1086. };
  1087. // 编辑目的地定尺数量
  1088. const openSetSizeNumModal = ref(false);
  1089. const editSizeNumRecord = ref<any>({});
  1090. const confirmSetSizeNum = async () => {
  1091. try {
  1092. changeLoading(true);
  1093. const { hotChargeLengthArr } = editSizeNumRecord.value;
  1094. if (!hotChargeLengthArr.length) {
  1095. return;
  1096. }
  1097. const arr = hotChargeLengthArr
  1098. .filter((ele) => ele.totalCount)
  1099. .map((k) => {
  1100. return {
  1101. ...k,
  1102. totalWeight: (k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265).toFixed(4),
  1103. };
  1104. });
  1105. editSizeNumRecord.value.hotChargeLength = arr.length ? JSON.stringify(arr) : null;
  1106. await editBilletRecord({
  1107. ...editSizeNumRecord.value,
  1108. });
  1109. openSetSizeNumModal.value = false;
  1110. await getHeatList({
  1111. ccmNo: hostNumber.value,
  1112. queryType: fetchQueryType.value,
  1113. changeShiftId: fetchChangeShiftId.value,
  1114. });
  1115. changeLoading(false);
  1116. } catch (e) {
  1117. changeLoading(false);
  1118. console.log(e);
  1119. }
  1120. };
  1121. function onPrint() {
  1122. changeOkLoading(true);
  1123. printJS({
  1124. printable: '#printBilletSampleCard',
  1125. type: 'html',
  1126. });
  1127. setTimeout(() => {
  1128. changeOkLoading(false);
  1129. }, 1000);
  1130. }
  1131. </script>
  1132. <style scoped lang="less">
  1133. .ticket {
  1134. max-width: 1400px;
  1135. height: 100%;
  1136. display: flex;
  1137. flex-direction: column;
  1138. .ccmno-info {
  1139. font-family: 'Kingsoft_Cloud_Font';
  1140. }
  1141. .ccmno {
  1142. display: inline-block;
  1143. width: 60px;
  1144. border-bottom: 1px solid black;
  1145. text-align: center;
  1146. }
  1147. .size-items-title {
  1148. font-size: 12px;
  1149. line-height: 32px;
  1150. border-bottom: 1px solid #bfbfbf;
  1151. padding-left: 10px;
  1152. min-width: 100px;
  1153. }
  1154. .size-num-title {
  1155. font-size: 12px;
  1156. line-height: 32px;
  1157. padding-left: 10px;
  1158. }
  1159. .size-items-content {
  1160. height: 32px;
  1161. text-align: center;
  1162. line-height: 32px;
  1163. }
  1164. .size-items-remark {
  1165. width: 100%;
  1166. min-height: 90px;
  1167. flex-wrap: wrap;
  1168. font-family: 'Kingsoft_Cloud_Font';
  1169. align-content: flex-start;
  1170. .size-remark-item {
  1171. width: 50%;
  1172. height: 30px;
  1173. color: #000;
  1174. }
  1175. .size-remark-size {
  1176. display: inline-block;
  1177. width: 80px;
  1178. }
  1179. .size-remark-num {
  1180. display: inline-block;
  1181. width: 80px;
  1182. padding: 0 40px 0 0;
  1183. font-size: 12px;
  1184. }
  1185. }
  1186. .two-num-wrapper {
  1187. position: absolute;
  1188. left: 0;
  1189. top: 0;
  1190. width: 100%;
  1191. height: 100%;
  1192. z-index: 10;
  1193. display: flex;
  1194. flex-direction: column;
  1195. justify-content: center;
  1196. align-items: flex-end;
  1197. padding-right: 6px;
  1198. }
  1199. .s-txt {
  1200. font-family: 'Kingsoft_Cloud_Font';
  1201. }
  1202. .ant-table-wrapper {
  1203. flex: 1;
  1204. :deep(.ant-spin-nested-loading) {
  1205. min-height: 100%;
  1206. .ant-table {
  1207. border-top: 1px solid rgba(0, 0, 0, 0.6);
  1208. > .ant-table-container {
  1209. border-inline-start: 1px solid rgba(0, 0, 0, 0.6);
  1210. }
  1211. .ant-table-content > table > thead > tr > th,
  1212. .ant-table-tbody > tr > td,
  1213. .ant-table-summary > tr > td {
  1214. padding: 2px;
  1215. border-inline-end: 1px solid rgba(0, 0, 0, 0.6);
  1216. border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  1217. text-align: center;
  1218. position: relative;
  1219. }
  1220. .size-st-wrapper {
  1221. position: absolute;
  1222. top: 1px;
  1223. left: 1px;
  1224. right: 1px;
  1225. bottom: 1px;
  1226. .line {
  1227. content: '';
  1228. position: absolute;
  1229. top: 0;
  1230. left: 0;
  1231. width: 100%; /* 等于长方形宽度 */
  1232. height: 100%; /* 等于长方形高度 */
  1233. /* 创建斜线:线性渐变从左上到右下 */
  1234. background: linear-gradient(
  1235. to bottom right,
  1236. transparent 0%,
  1237. transparent calc(50% - 0.5px),
  1238. /* 斜线上方透明 */ rgba(0, 0, 0, 0.6) calc(50% - 0.5px),
  1239. /* 斜线颜色 */ rgba(0, 0, 0, 0.6) calc(50% + 0.5px),
  1240. /* 斜线厚度 */ transparent calc(50% + 0.5px) /* 斜线下方透明 */
  1241. );
  1242. }
  1243. .size-st-item {
  1244. position: absolute;
  1245. top: -4px;
  1246. left: 2px;
  1247. color: #108ee9;
  1248. }
  1249. }
  1250. .size-st-num {
  1251. color: #f50;
  1252. cursor: pointer;
  1253. }
  1254. // 自定义啊
  1255. .total-input {
  1256. width: 100%;
  1257. padding: 0;
  1258. text-align: center;
  1259. cursor: pointer;
  1260. }
  1261. .ant-select {
  1262. width: 100%;
  1263. .ant-select-selector {
  1264. padding: 0;
  1265. .ant-select-selection-item,
  1266. .ant-select-selection-placeholder {
  1267. padding-inline-end: 0;
  1268. }
  1269. }
  1270. .ant-select-arrow {
  1271. display: none;
  1272. }
  1273. }
  1274. .rollOneColumnWrapper {
  1275. position: relative;
  1276. width: 100%;
  1277. height: 100%;
  1278. .noprint {
  1279. position: absolute;
  1280. left: 0;
  1281. top: 0;
  1282. display: none;
  1283. color: #f50;
  1284. cursor: pointer;
  1285. }
  1286. &:hover {
  1287. .noprint {
  1288. display: block;
  1289. }
  1290. }
  1291. }
  1292. }
  1293. }
  1294. .summary-row-no-border {
  1295. td:first-child {
  1296. border-bottom: none !important;
  1297. }
  1298. .song-items {
  1299. width: 100%;
  1300. height: 100%;
  1301. align-items: flex-start;
  1302. justify-content: flex-start;
  1303. .title {
  1304. margin-right: 10px;
  1305. }
  1306. }
  1307. }
  1308. .summary-cell-remark {
  1309. min-height: 70px;
  1310. }
  1311. }
  1312. }
  1313. </style>
  1314. <style lang="less">
  1315. @media print {
  1316. header,
  1317. footer,
  1318. .noprint {
  1319. display: none;
  1320. }
  1321. @page {
  1322. margin-top: 10px; /* 第一页的页眉距离顶部为0 */
  1323. margin-bottom: 0; /* 第一页的页脚距离底部为0 */
  1324. }
  1325. }
  1326. </style>