index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. <template>
  2. <div class="shipping-bill-container">
  3. <!-- 查询区域 -->
  4. <div class="jeecg-basic-table-form-container">
  5. <a-spin :spinning="sandCarLoading">
  6. <a-form layout="inline" ref="form" :label-col="labelCol" :wrapper-col="wrapperCol">
  7. <a-row :gutter="24" class="form-row">
  8. <!-- <a-col :span="4">
  9. <a-form-item label="铸机">
  10. <segmented-select v-model:value="queryParam.ccmNo" dict="lg_zj" @change="changeType" defaultValue="5" />
  11. </a-form-item>
  12. </a-col> -->
  13. <!-- <a-col :span="6">
  14. <a-form-item label="钢种">
  15. <a-input v-model:value="queryParam.steel" placeholder="请输入" allowClear />
  16. </a-form-item>
  17. </a-col> -->
  18. <!-- <a-col :span="6">
  19. <a-form-item label="规格">
  20. <JSearchSelect placeholder="请选择" v-model:value="queryParam.spec" dict="billet_spec" allowClear />
  21. </a-form-item>
  22. </a-col> -->
  23. <!-- <a-col :xl="4">
  24. <a-form-item label="班组">
  25. <JSearchSelect placeholder="请选择" v-model:value="queryParam.shiftGroup" dict="lg_bz" @change="editQueryParam" allowClear />
  26. </a-form-item>
  27. </a-col>
  28. <a-col :xl="4">
  29. <a-form-item label="班别">
  30. <JSearchSelect placeholder="请选择" v-model:value="queryParam.shift" dict="lg_bb" @change="editQueryParam" allowClear />
  31. </a-form-item>
  32. </a-col> -->
  33. <a-col :span="4">
  34. <a-form-item label="车号">
  35. <JSearchSelect placeholder="请选择" v-model:value="queryParam.licensePlate" dict="lg_car" allowClear />
  36. </a-form-item>
  37. </a-col>
  38. <a-col :span="4">
  39. <a-form-item label="类型">
  40. <JSearchSelect placeholder="请选择" v-model:value="queryParam.btype" :defaultValue="0" dict="lg_btype" allowClear />
  41. </a-form-item>
  42. </a-col>
  43. <a-col :span="4">
  44. <a-form-item label="定尺">
  45. <JSearchSelect type="list" v-model:value="queryParam.size" dict="lg_dcgg" placeholder="请选择" allowClear />
  46. </a-form-item>
  47. </a-col>
  48. <a-col :span="4">
  49. <a-form-item label="目的地">
  50. <JSearchSelect
  51. v-model:value="queryParam.destination"
  52. :options="destinationOptions[queryParam.ccmNo]"
  53. placeholder="请选择"
  54. allowClear
  55. />
  56. </a-form-item>
  57. </a-col>
  58. <a-col :span="4" v-if="queryParam.ccmNo === '6'">
  59. <a-form-item label="车位号">
  60. <a-select style="width: 100%" v-model:value="queryParam.positionNum" placeholder="请选择" :options="carPosition6" />
  61. </a-form-item>
  62. </a-col>
  63. <a-col :span="4" v-else>
  64. <a-form-item label="车位号">
  65. <a-select style="width: 100%" v-model:value="queryParam.positionNum" placeholder="请选择" :options="carPosition5" />
  66. </a-form-item>
  67. </a-col>
  68. </a-row>
  69. <a-row :gutter="24">
  70. <a-col :span="24" style="text-align: center; margin-bottom: 20px">
  71. <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
  72. </a-col>
  73. </a-row>
  74. </a-form>
  75. </a-spin>
  76. </div>
  77. <!--引用表格-->
  78. <BasicTable @register="registerTable" class="shipping-bill-talbe" :rowSelection="rowSelection">
  79. <template #form-positionNum="{ model, field }">
  80. <a-radio-group v-model:value="model[field]" button-style="solid" @change="() => reload()">
  81. <a-radio-button value="1" v-if="Number(machine) === 5">1号车位</a-radio-button>
  82. <a-radio-button value="2">2号车位</a-radio-button>
  83. <a-radio-button value="3" v-if="Number(machine) === 6">3号车位</a-radio-button>
  84. <a-radio-button value="4">4号车位</a-radio-button>
  85. </a-radio-group>
  86. </template>
  87. <!--插槽:table标题-->
  88. <template #tableTitle>
  89. <a-button type="primary" @click="batchHandleDelete" :disabled="!selectedRowKeys.length" preIcon="ant-design:delete-outlined">
  90. 批量删除
  91. </a-button>
  92. </template>
  93. <!--操作栏-->
  94. <template #action="{ record }">
  95. <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
  96. </template>
  97. <template #billXuhao="{ record }">{{ record.uniqueCode || '' }}</template>
  98. <template #licensePlate="{ record }">
  99. <a-badge-ribbon style="top: -20px" v-if="record.licensePlateStatus === 1" color="red" text="错误">
  100. <JSearchSelect
  101. type="list"
  102. v-model:value="record.licensePlate"
  103. dict="lg_car"
  104. :getPopupContainer="
  105. () => {
  106. return documentBody;
  107. }
  108. "
  109. @change="(v) => handleLicensePlateChange(v, record)"
  110. placeholder="请选择"
  111. allowClear
  112. />
  113. </a-badge-ribbon>
  114. <div v-else>{{ record.licensePlate }}</div>
  115. </template>
  116. <template #btype="{ record }">
  117. <a-switch
  118. v-model:checked="record.btype"
  119. checked-value="0"
  120. @change="(checked) => handleBtypeChange(checked, record)"
  121. checked-children="热坯"
  122. un-checked-value="1"
  123. un-checked-children="冷坯"
  124. />
  125. </template>
  126. <template #destination="{ record }">
  127. <JSearchSelect
  128. v-if="Number(record.typeConfigId) === 1024"
  129. type="list"
  130. v-model:value="record.destinationId"
  131. :disabled="Number(record.typeConfigId) !== 1024"
  132. :options="destinationOptions[record.ccmNo]"
  133. placeholder="请选择"
  134. allowClear
  135. @change="(v) => handleDestinationIdChange(v, record)"
  136. />
  137. <div v-else>{{ record.destination }}</div>
  138. </template>
  139. <template #outTime="{ record }">
  140. <a-date-picker
  141. style="padding: 4px 2px"
  142. show-time
  143. placeholder="选择发车时间"
  144. v-model:value="record.outTimeDate"
  145. @ok="(v) => onOkOutTime(v, record)"
  146. />
  147. </template>
  148. </BasicTable>
  149. <!-- 表单区域 -->
  150. <!-- 编辑 -->
  151. <editModal ref="modelRef" @ok="formSubmitSuccess" />
  152. <!-- 日志 -->
  153. <logModel ref="logRef" @ok="handleSuccess"></logModel>
  154. <!-- 详情 -->
  155. <detailsModal @register="registerDetailModal" showActionColumn @success="handleSuccess" />
  156. <!-- 热装 -->
  157. <rod-line
  158. @register="registerRodLineModal"
  159. @success="handleSuccess"
  160. :machine="queryParam.ccmNo"
  161. :machineConfig="machineConfigs()[MachineConfigType.RODLINE]"
  162. />
  163. <!-- 堆垛装车 -->
  164. <stack @register="registerStackingEntruckingModal" :machine="queryParam.ccmNo" @success="handleSuccess" />
  165. <!-- 打印 -->
  166. <printModal @register="registerPrintModal" @success="handleSuccess" />
  167. <!-- 修改目的地 -->
  168. <a-modal v-model:open="openTypeConfigIdModal" title="切换目的地" centered width="400px" :footer="null">
  169. <div class="flex justify-center items-center" style="padding: 20px">
  170. <div>选择目的地:</div>
  171. <JSearchSelect
  172. type="list"
  173. style="width: 200px"
  174. v-model:value="currentRecord.destinationId"
  175. :options="destinationOptions[currentRecord.ccmNo]"
  176. placeholder="请选择"
  177. allowClear
  178. @change="(v) => handleDestinationIdChange(v, currentRecord)"
  179. />
  180. </div>
  181. </a-modal>
  182. </div>
  183. </template>
  184. <script lang="ts" name="shippingBill" setup>
  185. // import SegmentedSelect from '/@/components/SegmentedSelect/index.vue';
  186. import { BasicTable, TableAction } from '/@/components/Table';
  187. import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
  188. import { useListPage } from '/@/hooks/system/useListPage';
  189. import { columns, initDictConfig, queryParam, searchFormSchema, carPosition6, carPosition5 } from './shippingBill.data';
  190. import { deleteOne, batchDelete, edit, destinationSwitch } from './shippingBill.api';
  191. import { defHttp } from '/@/utils/http/axios';
  192. import { onMounted, ref, reactive, h } from 'vue';
  193. // import hotDeliveryModal from './components/hotDeliveryModal.vue';
  194. import editModal from './components/editModal.vue';
  195. import logModel from './components/logModel.vue';
  196. import detailsModal from './components/detailsModal.vue';
  197. import printModal from './components/printModal.vue';
  198. import { useModal } from '/@/components/Modal';
  199. import { message } from 'ant-design-vue';
  200. import { destinationOptions, getMachineConfig, MachineConfigType, getMachineNum } from '../hotDelivery/common.data';
  201. import rodLine from './components/hotCharging/rodLine.vue';
  202. import stack from './components/hotCharging/stack.vue';
  203. import { useMessage } from '/@/hooks/web/useMessage';
  204. import dayjs from 'dayjs';
  205. const { createConfirm } = useMessage();
  206. const sandCarLoading = ref(false);
  207. const logRef = ref();
  208. const documentBody = document.body;
  209. const labelCol = reactive({
  210. xs: { span: 24 },
  211. sm: { span: 6 },
  212. });
  213. const modelRef = ref();
  214. const wrapperCol = reactive({
  215. xs: { span: 24 },
  216. sm: { span: 18 },
  217. });
  218. const machine = getMachineNum();
  219. queryParam.value.ccmNo = machine;
  220. queryParam.value.positionNum = Number(machine) === 5 ? '1' : '2';
  221. // 六号机配置信息
  222. const machineConfigs = () => getMachineConfig(queryParam.value.ccmNo);
  223. // 棒线堆垛明细
  224. const [registerDetailModal, { openModal: openDetailModal }] = useModal();
  225. // 注册添加棒线弹框
  226. const [registerRodLineModal, { openModal: openRodLineModal }] = useModal();
  227. // 注册打印modal
  228. const [registerPrintModal, { openModal: openPrintModal }] = useModal();
  229. // 堆垛发车modal
  230. const [registerStackingEntruckingModal, { openModal: openStackingEntruckingModal }] = useModal();
  231. // 发车
  232. const sendCar = async (record) => {
  233. try {
  234. setLoading(true);
  235. await defHttp.post({ url: '/storageBill/startCar', params: { ...record } }, { joinParamsToUrl: true });
  236. reload();
  237. } catch (error) {
  238. console.log(error);
  239. } finally {
  240. setLoading(false);
  241. }
  242. };
  243. /**
  244. * 操作栏
  245. */
  246. function getTableAction(record) {
  247. let actions: any[] = [];
  248. if (!!record.outTime || !!record.arrivalTime) {
  249. actions = [
  250. {
  251. label: '发车',
  252. disabled: !!record.outTime || !record.destination,
  253. icon: 'ant-design:car-outlined',
  254. popConfirm: {
  255. title: '是否确认发车?',
  256. description: record.amountTotal <= 0 ? `注意:当前车辆装运钢坯支数为${record.amountTotal}` : '',
  257. confirm: sendCar.bind(null, record),
  258. },
  259. },
  260. ];
  261. }
  262. return actions.concat([
  263. {
  264. label: '热装',
  265. color: 'error',
  266. // disabled: !!record.outTime,
  267. onClick: () => {
  268. openRodLineModal(true, {
  269. info: record,
  270. machineConfig: machineConfigs()[MachineConfigType.RODLINE],
  271. title: [[queryParam.value.ccmNo + '#机热装'], ['车牌号:', record.licensePlate], ['目的地:', record.destination]],
  272. isUpdate: true,
  273. });
  274. },
  275. },
  276. {
  277. label: '堆垛装车',
  278. // disabled: !!record.outTime,
  279. color: 'warning',
  280. onClick: () => {
  281. openStackingEntruckingModal(true, {
  282. info: record,
  283. machineConfig: machineConfigs()[MachineConfigType.STACKING],
  284. destinationList: machineConfigs()[MachineConfigType.RODLINE],
  285. title: [[queryParam.value.ccmNo + '#机堆垛装车'], ['车牌号:', record.licensePlate], ['目的地:', record.destination]],
  286. isUpdate: true,
  287. });
  288. },
  289. },
  290. {
  291. label: '票据',
  292. onClick: () => {
  293. openPrintModal(true, { record, isUpdate: true, type: 'offline' });
  294. },
  295. disabled: false,
  296. },
  297. {
  298. label: '编辑',
  299. onClick: handleEdit.bind(null, record),
  300. // disabled: record.isUpd,
  301. },
  302. ]);
  303. }
  304. const openTypeConfigIdModal = ref(false);
  305. const currentRecord = ref<any>();
  306. /**
  307. * 下拉操作栏
  308. */
  309. function getDropDownAction(record) {
  310. return [
  311. {
  312. label: '装运明细',
  313. onClick: () => {
  314. openDetailModal(true, { record, isUpdate: true });
  315. },
  316. disabled: false,
  317. },
  318. {
  319. label: '打印',
  320. onClick: () => {
  321. openPrintModal(true, { record, isUpdate: true });
  322. },
  323. disabled: false,
  324. },
  325. {
  326. label: '日志',
  327. onClick: handleLog.bind(null, record),
  328. disabled: false,
  329. },
  330. {
  331. label: '修改目的地',
  332. onClick: () => {
  333. openTypeConfigIdModal.value = true;
  334. currentRecord.value = record;
  335. },
  336. disabled: false,
  337. },
  338. {
  339. label: '删除',
  340. popConfirm: {
  341. title: '是否确认删除',
  342. confirm: handleDelete.bind(null, record),
  343. },
  344. disabled: false,
  345. },
  346. ];
  347. }
  348. /**
  349. * 批量删除事件
  350. */
  351. async function batchHandleDelete() {
  352. await batchDelete({ ids: selectedRowKeys.value }, formSubmitSuccess);
  353. }
  354. // 查看操作日志
  355. function handleLog(record: Recordable) {
  356. logRef.value.tableId = record.id;
  357. logRef.value.showLog(record.id);
  358. }
  359. // 删除
  360. async function handleDelete(record: Recordable) {
  361. await deleteOne({ id: record.id }, formSubmitSuccess);
  362. }
  363. /**
  364. * 编辑事件
  365. */
  366. function handleEdit(record: Recordable) {
  367. modelRef.value.edit(record);
  368. modelRef.value.rowData = record;
  369. }
  370. // 获取表格数据
  371. const getList = (params) => {
  372. return defHttp.get({
  373. url: '/storageBill/list',
  374. params: {
  375. ...params,
  376. ccmNo: queryParam.value.ccmNo || '5',
  377. },
  378. });
  379. };
  380. //注册table数据
  381. const { tableContext } = useListPage({
  382. tableProps: {
  383. title: '',
  384. api: getList,
  385. beforeFetch: (params) => {
  386. return Object.assign(params, {
  387. ccmNo: Number(queryParam.value.ccmNo),
  388. });
  389. },
  390. afterFetch: (data) => {
  391. return data.map((item) => {
  392. return {
  393. ...item,
  394. licensePlateOrg: item.licensePlate,
  395. destinationId: item.typeConfigId === '1024' ? undefined : item.typeConfigId,
  396. outTimeDate: item.outTime ? dayjs(item.outTime) : '',
  397. };
  398. });
  399. },
  400. columns,
  401. canResize: false,
  402. showActionColumn: false,
  403. useSearchForm: true,
  404. showIndexColumn: true,
  405. indexColumnProps: {
  406. fixed: 'left',
  407. width: 220,
  408. slots: { customRender: 'billXuhao' },
  409. title: '序号',
  410. },
  411. rowClassName: (record: any) => {
  412. return record.licensePlateStatus === 1 ? 'licensePlate-error-500' : '';
  413. },
  414. formConfig: {
  415. //labelWidth: 120,
  416. schemas: searchFormSchema,
  417. autoSubmitOnEnter: true,
  418. showAdvancedButton: true,
  419. fieldMapToNumber: [],
  420. fieldMapToTime: [
  421. ['outTime', ['outTime_begin', 'outTime_end'], 'YYYY-MM-DD'],
  422. ['arrivalTime', ['arrivalTime_begin', 'arrivalTime_end'], 'YYYY-MM-DD'],
  423. ],
  424. },
  425. striped: true,
  426. actionColumn: {
  427. width: 340,
  428. title: '操作',
  429. fixed: 'right',
  430. },
  431. pagination: {
  432. pageSizeOptions: ['5', '10', '15', '20', '30'],
  433. defaultPageSize: 5,
  434. },
  435. rowSelection: { type: 'checkbox' },
  436. },
  437. });
  438. const [registerTable, { reload, setLoading }, { rowSelection, selectedRowKeys }] = tableContext;
  439. /**
  440. * 成功回调
  441. */
  442. function handleSuccess() {
  443. (selectedRowKeys.value = []) && reload();
  444. }
  445. // 成功后同时刷新列表和模板
  446. function formSubmitSuccess() {
  447. (selectedRowKeys.value = []) && reload();
  448. }
  449. const changeType = (v) => {
  450. queryParam.value.positionNum = v == 5 ? '1' : '3';
  451. reload();
  452. };
  453. /**
  454. * 新增事件
  455. */
  456. function handleAdd() {
  457. if (!queryParam.value.ccmNo) {
  458. message.error('请选择铸机!');
  459. return;
  460. }
  461. if (!queryParam.value.licensePlate) {
  462. message.error('请选择车号!');
  463. return;
  464. }
  465. if (!queryParam.value.size) {
  466. message.error('请选择定尺!');
  467. return;
  468. }
  469. if (!queryParam.value.destination) {
  470. message.error('请选择目的地!');
  471. return;
  472. }
  473. const destinationInfo = destinationOptions[queryParam.value.ccmNo].find((item) => item.value === queryParam.value.destination);
  474. defHttp
  475. .post(
  476. {
  477. url: '/storageBill/add',
  478. params: { ...queryParam.value, destination: destinationInfo?.label, typeConfigId: destinationInfo?.value },
  479. },
  480. { joinParamsToUrl: true }
  481. )
  482. .then(() => {
  483. handleSuccess();
  484. queryParam.value = {
  485. ccmNo: machine,
  486. licensePlate: '',
  487. btype: '0',
  488. positionNum: Number(machine) === 5 ? '1' : '2',
  489. size: '',
  490. destination: '',
  491. };
  492. });
  493. }
  494. // 修改类型
  495. function handleBtypeChange(v, record) {
  496. createConfirm({
  497. iconType: 'warning',
  498. title: '确认修改',
  499. width: '460px',
  500. content: () => {
  501. return h('div', { style: { fontSize: '16px' } }, [
  502. h('span', null, `是否将车牌为`),
  503. h('span', { style: { fontSize: '18px', color: '#d48806' } }, `${record.licensePlate}`),
  504. h('span', null, `的`),
  505. h('span', { style: { fontSize: '18px', color: v === '1' ? '#cd201f' : '#3b5999' } }, `${v === '1' ? ' 热坯 ' : ' 冷坯 '}`),
  506. h('span', null, `改为`),
  507. h('span', { style: { fontSize: '18px', color: v === '1' ? '#3b5999' : '#cd201f' } }, `${v === '1' ? ' 冷坯 ' : ' 热坯 '}`),
  508. h('span', null, `?`),
  509. ]);
  510. },
  511. okText: '确认',
  512. cancelText: '取消',
  513. onOk: () => {
  514. return edit({ id: record.id, btype: v }).then(() => {
  515. handleSuccess();
  516. });
  517. },
  518. onCancel: () => {
  519. record.btype = v === '1' ? '0' : '1';
  520. },
  521. });
  522. }
  523. // 修改目的地
  524. function handleDestinationIdChange(v, record) {
  525. if (!v) return;
  526. const destinationInfo = destinationOptions[record.ccmNo].find((item) => item.value === v);
  527. createConfirm({
  528. iconType: 'warning',
  529. title: '确认修改',
  530. width: '460px',
  531. content: () => {
  532. return h('div', { style: { fontSize: '16px' } }, [
  533. h('span', null, `是否修改目的地为:`),
  534. h('span', { style: { fontSize: '18px', color: '#d48806' } }, ` ${destinationInfo.label} `),
  535. h('span', null, `?`),
  536. ]);
  537. },
  538. okText: '确认',
  539. cancelText: '取消',
  540. onOk: () => {
  541. const fetchFn = record.typeConfigId === '1024' ? edit : destinationSwitch;
  542. return fetchFn({
  543. ...record,
  544. typeConfigId: v,
  545. destination: destinationInfo.label,
  546. }).then(() => {
  547. handleSuccess();
  548. openTypeConfigIdModal.value = false;
  549. });
  550. },
  551. onCancel: () => {
  552. record.destinationId = record.typeConfigId === '1024' ? undefined : v;
  553. },
  554. });
  555. }
  556. // 修改发车时间
  557. const onOkOutTime = (v, record) => {
  558. console.log(v, record);
  559. createConfirm({
  560. iconType: 'warning',
  561. title: '确认修改',
  562. width: '460px',
  563. content: () => {
  564. return h('div', { style: { fontSize: '16px' } }, [
  565. h('span', null, `是否将发车时间修改为`),
  566. h('span', { style: { fontSize: '18px', color: '#d48806' } }, `${v.format('YYYY-MM-DD HH:mm:ss')}`),
  567. h('span', null, `?`),
  568. ]);
  569. },
  570. okText: '确认',
  571. cancelText: '取消',
  572. onOk: () => {
  573. return edit({ id: record.id, btype: record.btype, licensePlate: record.licensePlate, outTime: v.format('YYYY-MM-DD HH:mm:ss') }).then(() => {
  574. handleSuccess();
  575. });
  576. },
  577. onCancel: () => {
  578. record.outTimeDate = dayjs(record.outTime);
  579. },
  580. });
  581. };
  582. // 修改车号
  583. function handleLicensePlateChange(v, record) {
  584. if (!v) return;
  585. createConfirm({
  586. iconType: 'warning',
  587. title: '确认修改',
  588. width: '460px',
  589. content: () => {
  590. return h('div', { style: { fontSize: '16px' } }, [
  591. h('span', null, `是否修改车辆为:`),
  592. h('span', { style: { fontSize: '18px', color: '#d48806' } }, ` ${v} `),
  593. h('span', null, `?`),
  594. ]);
  595. },
  596. okText: '确认',
  597. cancelText: '取消',
  598. onOk: () => {
  599. return edit({
  600. id: record.id,
  601. btype: record.btype,
  602. licensePlate: record.licensePlate,
  603. licensePlateStatus: 0,
  604. }).then(() => {
  605. handleSuccess();
  606. });
  607. },
  608. onCancel: () => {
  609. record.licensePlate = record.licensePlateOrg;
  610. },
  611. });
  612. }
  613. onMounted(() => {
  614. initDictConfig();
  615. // initWebSocket();
  616. });
  617. </script>
  618. <style scoped lang="less">
  619. .shipping-bill-container {
  620. padding: 0 10px;
  621. }
  622. .disabled {
  623. color: rgb(97, 98, 99);
  624. pointer-events: none;
  625. cursor: not-allowed;
  626. }
  627. .default {
  628. cursor: pointer;
  629. color: #1890ff;
  630. }
  631. .show-error {
  632. font-size: 12px;
  633. color: #f5222d;
  634. }
  635. .hidden-error {
  636. display: none;
  637. }
  638. :deep(.ant-table-thead) {
  639. .anticon-form {
  640. display: none;
  641. }
  642. }
  643. :deep(.ant-row) {
  644. margin: 3px 0 !important;
  645. width: 100%;
  646. }
  647. :deep(.jeecg-basic-table-form-container) {
  648. padding: 10px 0;
  649. }
  650. // 假禁点灰色按钮
  651. .disabled-btn {
  652. background: #f5f5f5 !important;
  653. border-color: #d9d9d9 !important;
  654. color: rgba(0, 0, 0, 0.25) !important;
  655. }
  656. // 根据炉号末尾数字判断颜色
  657. :deep(.ant-table-tbody) {
  658. .highlight-row-odd {
  659. background-color: #99beff;
  660. .ant-table-cell-fix-left,
  661. .ant-table-cell-fix-right {
  662. background-color: #99beff;
  663. }
  664. }
  665. .highlight-row-even {
  666. background-color: #99ddff;
  667. .ant-table-cell-fix-left,
  668. .ant-table-cell-fix-right {
  669. background-color: #99ddff;
  670. }
  671. }
  672. .jeecg-basic-table-action {
  673. justify-content: flex-end;
  674. }
  675. .ant-switch {
  676. background-color: #3b5999;
  677. }
  678. .ant-switch.ant-switch-checked {
  679. background-color: #cd201f;
  680. }
  681. .ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
  682. background-color: #e7e7e7;
  683. }
  684. }
  685. .form-row {
  686. .ant-form-item {
  687. margin-bottom: 20px;
  688. }
  689. }
  690. .shipping-bill-talbe {
  691. :deep(.licensePlate-error-500) {
  692. position: relative;
  693. td:first-child {
  694. position: relative;
  695. z-index: 8;
  696. // border-bottom: 1px solid var(--vxe-danger-color, #f56c6c) !important;
  697. &::after {
  698. content: '';
  699. position: absolute;
  700. top: 0;
  701. inset-inline-start: 0;
  702. width: 100%;
  703. height: 100%;
  704. box-shadow: inset 5px 0 0 var(--vxe-danger-color, #f56c6c);
  705. }
  706. }
  707. td:last-child {
  708. z-index: 8;
  709. // border-bottom: 1px solid var(--vxe-danger-color, #f56c6c) !important;
  710. }
  711. &::after {
  712. position: absolute;
  713. top: 0;
  714. inset-inline-start: 0;
  715. width: 100%;
  716. height: 100%;
  717. // animation-name: errNoticeAnimation;
  718. // animation-duration: 1.2s;
  719. // animation-iteration-count: infinite;
  720. // animation-timing-function: ease-in-out;
  721. content: '';
  722. z-index: -1;
  723. // box-shadow: inset 5px -1px 0 var(--vxe-danger-color, #f56c6c);
  724. }
  725. }
  726. }
  727. @keyframes errNoticeAnimation {
  728. 0% {
  729. opacity: 1;
  730. }
  731. 100% {
  732. opacity: 0;
  733. }
  734. }
  735. </style>