checkDetails.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. <template>
  2. <ele-modal
  3. :title="title"
  4. :visible.sync="visible"
  5. :close-on-click-modal="false"
  6. @close="handleClose"
  7. resizable
  8. maxable
  9. width="80%"
  10. >
  11. <div
  12. v-if="(type == 'detail' || type == 'edit') && form.processInstanceId"
  13. class="switch"
  14. :maxable="true"
  15. style="margin-bottom: 20px"
  16. >
  17. <div class="switch_left">
  18. <ul>
  19. <li
  20. v-for="item in tabOptions"
  21. :key="item.key"
  22. :class="{ active: activeComp == item.key }"
  23. @click="activeComp = item.key"
  24. >
  25. {{ item.name }}
  26. </li>
  27. </ul>
  28. </div>
  29. </div>
  30. <bpmDetail
  31. v-if="activeComp == 'bpm' && form && form.processInstanceId"
  32. :id="form.processInstanceId"
  33. >
  34. </bpmDetail>
  35. <el-form
  36. v-if="activeComp == 'main'"
  37. ref="formRef"
  38. :model="form"
  39. :rules="rules"
  40. label-width="100px"
  41. >
  42. <header-title title="基本信息"></header-title>
  43. <el-row :gutter="10">
  44. <el-col :span="8">
  45. <el-form-item label="放行单编码">
  46. <el-input
  47. v-model="form.code"
  48. placeholder="系统自动生成"
  49. disabled
  50. ></el-input>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="8">
  54. <el-form-item label="放行单名称" prop="name">
  55. <el-input v-model="form.name" placeholder="请输入"></el-input>
  56. </el-form-item>
  57. </el-col>
  58. </el-row>
  59. <header-title title="物品清单">
  60. <el-button type="primary" icon="el-icon-plus" @click="openAddModel">
  61. 添加
  62. </el-button>
  63. </header-title>
  64. <ele-pro-table
  65. ref="table"
  66. row-key="userId"
  67. :columns="ordersColumns"
  68. :datasource="form.orders"
  69. >
  70. <template v-slot:action="{ row }">
  71. <el-link icon="el-icon-edit" type="primary" :underline="false"
  72. >详情</el-link
  73. >
  74. <el-link
  75. icon="el-icon-delete"
  76. type="danger"
  77. :underline="false"
  78. @click="deleteRow(row)"
  79. >删除</el-link
  80. >
  81. </template>
  82. </ele-pro-table>
  83. <el-button
  84. type="primary"
  85. style="margin-bottom: 15px"
  86. @click="getKitCheck"
  87. :loading="butLoading"
  88. >
  89. 规则齐套检查
  90. </el-button>
  91. <header-title title="生产放行规则"> </header-title>
  92. <ele-pro-table
  93. ref="scTable"
  94. row-key="id"
  95. :columns="detailsColumns"
  96. :datasource="scDetails"
  97. >
  98. <template v-slot:isPass="{ row }">
  99. <el-radio-group v-model="row.isPass">
  100. <el-radio :label="1">是</el-radio>
  101. <el-radio :label="0">否</el-radio>
  102. </el-radio-group>
  103. </template>
  104. <template v-slot:remark="{ row }">
  105. <el-input
  106. type="textarea"
  107. v-model="row.remark"
  108. placeholder="请输入备注"
  109. :rows="1"
  110. ></el-input>
  111. </template>
  112. </ele-pro-table>
  113. <table
  114. class="detail-table"
  115. key="first-table"
  116. style="width: 500px; margin: 15px 0"
  117. >
  118. <tr>
  119. <td>结论</td>
  120. <td>
  121. <el-radio-group v-model="form.workConclution">
  122. <el-radio :label="0">不符合规定</el-radio>
  123. <el-radio :label="1">符合规定</el-radio>
  124. </el-radio-group>
  125. </td>
  126. </tr>
  127. <tr>
  128. <td>验收人</td>
  129. <td @click="openSelectUser(0)">
  130. <div class="mask-box">
  131. <el-input
  132. v-model="form.workCheckUserName"
  133. placeholder="请输选择验收人"
  134. readonly
  135. ></el-input>
  136. </div>
  137. </td>
  138. </tr>
  139. <tr>
  140. <td>验收时间</td>
  141. <td>
  142. <el-date-picker
  143. v-model="form.workCheckTime"
  144. type="datetime"
  145. placeholder="选择日期时间"
  146. style="width: 100%"
  147. value-format="yyyy-MM-dd HH:mm:ss"
  148. ></el-date-picker>
  149. </td>
  150. </tr>
  151. </table>
  152. <header-title title="质检放行规则"></header-title>
  153. <ele-pro-table
  154. ref="zjTable"
  155. row-key="id"
  156. :columns="detailsColumns"
  157. :datasource="zjDetails"
  158. >
  159. <template v-slot:isPass="{ row }">
  160. <el-radio-group v-model="row.isPass">
  161. <el-radio :label="1">是</el-radio>
  162. <el-radio :label="0">否</el-radio>
  163. </el-radio-group>
  164. </template>
  165. <template v-slot:remark="{ row }">
  166. <el-input
  167. type="textarea"
  168. v-model="row.remark"
  169. placeholder="请输入备注"
  170. :rows="1"
  171. ></el-input>
  172. </template>
  173. </ele-pro-table>
  174. <table
  175. class="detail-table"
  176. key="tow"
  177. style="width: 500px; margin: 15px 0"
  178. >
  179. <tr>
  180. <td>结论</td>
  181. <td>
  182. <el-radio-group v-model="form.qualityConclution">
  183. <el-radio :label="0">不符合规定</el-radio>
  184. <el-radio :label="1">符合规定</el-radio>
  185. </el-radio-group>
  186. </td>
  187. </tr>
  188. <tr>
  189. <td>验收人</td>
  190. <td>
  191. <div class="mask-box" @click="openSelectUser(1)">
  192. <el-input
  193. v-model="form.qualityCheckUserName"
  194. placeholder="请输选择验收人"
  195. readonly
  196. ></el-input>
  197. </div>
  198. </td>
  199. </tr>
  200. <tr>
  201. <td>验收时间</td>
  202. <td>
  203. <el-date-picker
  204. v-model="form.qualityCheckTime"
  205. type="datetime"
  206. placeholder="选择日期时间"
  207. style="width: 100%"
  208. value-format="yyyy-MM-dd HH:mm:ss"
  209. ></el-date-picker>
  210. </td>
  211. </tr>
  212. </table>
  213. <bpmTask
  214. v-if="form.processInstanceId"
  215. :id="form.processInstanceId"
  216. :businessId="form.id"
  217. ></bpmTask>
  218. <!-- 选择生产工单 -->
  219. <selectWorkOrder
  220. ref="selectWorkOrderRef"
  221. :where="workOrderWhere"
  222. :autoClose="false"
  223. @confirm="selectWorkOrderConfirm"
  224. ></selectWorkOrder>
  225. <!-- 选择用户 -->
  226. <SelectUser
  227. ref="SelectUserRef"
  228. v-model="showSelectUser"
  229. @selectUserFinished="selectUserFinished"
  230. ></SelectUser>
  231. </el-form>
  232. <template v-slot:footer>
  233. <el-button
  234. v-if="type != 'detail'"
  235. type="primary"
  236. @click="submit"
  237. :loading="butLoading"
  238. >提 交</el-button
  239. >
  240. <el-button
  241. v-if="type != 'detail'"
  242. type="primary"
  243. @click="submit('save')"
  244. :loading="butLoading"
  245. >保存</el-button
  246. >
  247. <el-button @click="handleClose">取 消</el-button>
  248. </template>
  249. </ele-modal>
  250. </template>
  251. <script>
  252. import dictMixins from '@/mixins/dictMixins';
  253. import selectWorkOrder from './selectWorkOrder.vue';
  254. import { checklisttemplateGetById } from '@/api/checklisttemplate/index';
  255. import SelectUser from '@/components/select/SelectUser/index.vue';
  256. import {
  257. checklistrecordSave,
  258. checklistrecordGetById,
  259. checklistrecordUpdate,
  260. checklistrecordKitCheck
  261. } from '@/api/checklistrecord/index';
  262. import bpmTask from '@/components/bpmTask/bpmTask.vue';
  263. import bpmDetail from '@/views/bpm/processInstance/detail.vue';
  264. export default {
  265. mixins: [dictMixins],
  266. components: { selectWorkOrder, SelectUser, bpmTask, bpmDetail },
  267. data() {
  268. const formBaseData = {
  269. id: null,
  270. approvalStatus: null,
  271. checklistType: 0,
  272. code: '',
  273. createUserName: '',
  274. details: [],
  275. name: '',
  276. orders: [],
  277. processInstanceId: '',
  278. qualityCheckTime: '',
  279. qualityCheckUserId: null,
  280. qualityCheckUserName: '',
  281. qualityConclution: null,
  282. templateId: 0,
  283. templateName: '',
  284. workCheckTime: '',
  285. workCheckUserId: null,
  286. workCheckUserName: '',
  287. workConclution: null
  288. };
  289. return {
  290. visible: false,
  291. title: '放行申请单',
  292. formBaseData,
  293. form: JSON.parse(JSON.stringify(formBaseData)),
  294. rules: {
  295. name: [
  296. { required: true, message: '请输入放行单名称', trigger: 'blur' },
  297. { required: true, message: '请输入放行单名称', trigger: 'change' }
  298. ]
  299. },
  300. // 类型 add / edit / detail
  301. type: '',
  302. // 生产工单查询条件
  303. workOrderWhere: {
  304. statusList: ['6'],
  305. queryTermination: 0
  306. },
  307. loading: false,
  308. butLoading: false,
  309. tabOptions: [
  310. { key: 'main', name: '放行单详情' },
  311. { key: 'bpm', name: '流程详情' }
  312. ],
  313. // 当前选项
  314. activeComp: 'main',
  315. showSelectUser: false,
  316. // 0 生产验收人 1 质检验收人
  317. selectUserType: 0
  318. };
  319. },
  320. watch: {
  321. 'form.details': {
  322. handler(details) {
  323. console.log('details', details);
  324. // 区分生产放行规则 质检放行规则
  325. // 根据 审核结果修改 结论
  326. const scDetails = details.filter((item) => item.checkType == 1);
  327. const zjDetails = details.filter((item) => item.checkType == 2);
  328. // 当workConclution全为1 则为1 否则为0
  329. if (scDetails.length > 0) {
  330. const allPass = scDetails
  331. .map((item) => item.isPass)
  332. .every((val) => val === 1);
  333. this.form.workConclution = allPass ? 1 : 0;
  334. } else {
  335. this.form.workConclution = null;
  336. }
  337. if (zjDetails.length > 0) {
  338. const allPass = zjDetails
  339. .map((item) => item.isPass)
  340. .every((val) => val == 1);
  341. this.form.qualityConclution = allPass ? 1 : 0;
  342. } else {
  343. this.form.qualityConclution = null;
  344. }
  345. },
  346. deep: true
  347. }
  348. },
  349. computed: {
  350. ordersColumns() {
  351. return [
  352. {
  353. width: 55,
  354. type: 'index',
  355. columnKey: 'index',
  356. label: '序号',
  357. align: 'center'
  358. },
  359. {
  360. prop: 'batchNo',
  361. label: '批次号',
  362. align: 'center',
  363. minWidth: 110,
  364. showOverflowTooltip: true
  365. },
  366. {
  367. prop: 'productCode',
  368. label: '产品编码',
  369. align: 'center',
  370. minWidth: 110,
  371. showOverflowTooltip: true
  372. },
  373. {
  374. prop: 'productName',
  375. label: '产品名称',
  376. align: 'center',
  377. minWidth: 110,
  378. showOverflowTooltip: true
  379. },
  380. {
  381. prop: 'workOrderCode',
  382. label: '生产工单号',
  383. align: 'center',
  384. minWidth: 110,
  385. showOverflowTooltip: true
  386. },
  387. {
  388. prop: 'formingNum',
  389. label: '要求生产数量',
  390. align: 'center',
  391. minWidth: 110,
  392. showOverflowTooltip: true
  393. },
  394. {
  395. prop: 'formedNum',
  396. label: '实际生产数量',
  397. align: 'center',
  398. minWidth: 110,
  399. showOverflowTooltip: true
  400. },
  401. {
  402. prop: 'specification',
  403. label: '规格',
  404. align: 'center',
  405. minWidth: 110,
  406. showOverflowTooltip: true
  407. },
  408. {
  409. prop: 'productModel',
  410. label: '型号',
  411. align: 'center',
  412. minWidth: 110,
  413. showOverflowTooltip: true
  414. },
  415. {
  416. label: '操作',
  417. columnKey: 'action',
  418. slot: 'action',
  419. minWidth: 120
  420. }
  421. ];
  422. },
  423. // 生产放行规则
  424. scDetails() {
  425. return this.form.details.filter((item) => item.checkType == 1);
  426. },
  427. // 质检放行规则
  428. zjDetails() {
  429. return this.form.details.filter((item) => item.checkType == 2);
  430. },
  431. detailsColumns() {
  432. return [
  433. {
  434. width: 55,
  435. type: 'index',
  436. columnKey: 'index',
  437. label: '序号',
  438. align: 'center'
  439. },
  440. {
  441. prop: 'mainIndicatorName',
  442. label: '指标名称',
  443. align: 'center',
  444. minWidth: 110,
  445. showOverflowTooltip: true
  446. },
  447. {
  448. prop: 'isPass',
  449. label: '审核结果',
  450. align: 'center',
  451. slot: 'isPass',
  452. minWidth: 110,
  453. showOverflowTooltip: true
  454. },
  455. {
  456. prop: 'remark',
  457. label: '备注',
  458. align: 'center',
  459. slot: 'remark',
  460. minWidth: 110,
  461. showOverflowTooltip: true
  462. }
  463. ];
  464. }
  465. },
  466. methods: {
  467. // 外部调用,打开弹窗
  468. open(type, data) {
  469. console.log('data , type', data, type);
  470. this.type = type;
  471. if (type == 'add') {
  472. this.title = '放行申请单';
  473. // 生产放心单名称 = 模版名称+年月日+3位数
  474. this.form.name = `${data.templateName}${new Date()
  475. .toLocaleDateString()
  476. .replace(/\//g, '')}${String(
  477. Math.floor(Math.random() * 1000)
  478. ).padStart(3, '0')}`;
  479. this.form.templateId = data.templateId;
  480. this.form.templateName = data.templateName;
  481. // 处理携带的生产工单
  482. if (data.workOrderList && data.workOrderList.length) {
  483. this.selectWorkOrderConfirm(data.workOrderList);
  484. }
  485. // 根据模版id 查询模版详情
  486. this.getTemplateDetails(data.templateId);
  487. } else if (type == 'edit') {
  488. this.title = '放行申请单';
  489. this.getCheckDetails(data.id);
  490. } else if (type == 'detail') {
  491. this.title = '放行单详情';
  492. this.getCheckDetails(data.id);
  493. } else {
  494. this.title = '审批';
  495. }
  496. this.visible = true;
  497. },
  498. // 关闭时清理表单
  499. handleClose() {
  500. this.form = JSON.parse(JSON.stringify(this.formBaseData));
  501. this.activeComp = 'main';
  502. this.$nextTick(() => {
  503. this.$refs.formRef.clearValidate();
  504. this.visible = false;
  505. });
  506. },
  507. // 提交
  508. submit(type) {
  509. console.log('this.form', this.form);
  510. this.$refs.formRef.validate(async (valid, invalidFields) => {
  511. if (valid) {
  512. // 必须要有物品清单
  513. if (this.form.orders.length == 0) {
  514. this.$message.warning('请添加物品清单');
  515. return;
  516. }
  517. this.butLoading = true;
  518. try {
  519. if (type == 'save') {
  520. // 存在id 则更新
  521. if (this.form.id) {
  522. await checklistrecordUpdate(this.form);
  523. } else {
  524. this.form.createUserName = this.$store.state.user.info.name;
  525. const data = await checklistrecordSave(this.form);
  526. this.form.id = data;
  527. this.getCheckDetails(data);
  528. }
  529. } else {
  530. }
  531. this.$message.success('操作成功');
  532. this.butLoading = false;
  533. this.$emit('reload');
  534. } catch (error) {
  535. this.butLoading = false;
  536. }
  537. if (type != 'save') {
  538. this.handleClose();
  539. }
  540. } else {
  541. // 转换为数组
  542. const firstErrorField = Object.values(invalidFields);
  543. if (firstErrorField.length > 0) {
  544. this.$message.warning(firstErrorField[0][0].message);
  545. }
  546. return false;
  547. }
  548. });
  549. },
  550. // 选择生产工单
  551. openAddModel() {
  552. this.$refs.selectWorkOrderRef?.open();
  553. },
  554. // 选择生产工单确认
  555. selectWorkOrderConfirm(selection) {
  556. const selectList = selection.map((i) => {
  557. return {
  558. batchNo: i.batchNo,
  559. createUserName: i.createUserName,
  560. formingNum: i.formingNum,
  561. produceRoutingId: i.produceRoutingId,
  562. produceRoutingName: i.produceRoutingName,
  563. productCode: i.productCode,
  564. productModel: i.productModel,
  565. productName: i.productName,
  566. recordId: i.recordId,
  567. specification: i.specification,
  568. workOrderCode: i.code,
  569. workOrderId: i.id
  570. };
  571. });
  572. console.log('selectList', selectList);
  573. // 判断是否同一产品 同一批次
  574. if (selectList.length != 0) {
  575. const productCode = selectList[0].productCode;
  576. const batchNo = selectList[0].batchNo;
  577. const isSame = selectList.every(
  578. (item) =>
  579. item.productCode === productCode && item.batchNo === batchNo
  580. );
  581. const isSameOrders = this.form.orders.every(
  582. (item) =>
  583. item.productCode === productCode && item.batchNo === batchNo
  584. );
  585. if (!isSame || !isSameOrders) {
  586. this.$message.warning('请选择同产品同批次号工单发起批量放行');
  587. return;
  588. }
  589. // 去重
  590. const existingWorkOrderIds = this.form.orders.map(
  591. (order) => order.workOrderId
  592. );
  593. const newOrders = selectList.filter(
  594. (item) => !existingWorkOrderIds.includes(item.workOrderId)
  595. );
  596. this.form.orders = [...this.form.orders, ...newOrders];
  597. }
  598. // 关闭弹窗
  599. this.$refs.selectWorkOrderRef?.handleClose();
  600. },
  601. // 删除行
  602. deleteRow(row) {
  603. this.form.orders = this.form.orders.filter(
  604. (item) => item.workOrderId !== row.workOrderId
  605. );
  606. },
  607. // 获取模板详情
  608. async getTemplateDetails(id) {
  609. this.loading = true;
  610. try {
  611. const data = await checklisttemplateGetById(id);
  612. console.log('模板详情', data);
  613. // 详情
  614. this.form.details = data.details;
  615. this.loading = false;
  616. this.setDefaultValue();
  617. } catch (error) {
  618. this.loading = false;
  619. }
  620. },
  621. // 获取放行单详情
  622. async getCheckDetails(id) {
  623. this.loading = true;
  624. try {
  625. const data = await checklistrecordGetById(id);
  626. this.$util.assignObject(this.form, data);
  627. console.log('this.form', this.form);
  628. if (this.type == 'edit' || this.type == 'add') {
  629. this.setDefaultValue();
  630. }
  631. this.loading = false;
  632. } catch (error) {
  633. this.loading = false;
  634. }
  635. },
  636. // 设置默认值
  637. setDefaultValue() {
  638. // 编辑时 设置默认值
  639. if (!this.form.qualityCheckUserId) {
  640. // 设置为当前用户
  641. this.form.qualityCheckUserId = this.$store.state.user.info.id;
  642. this.form.qualityCheckUserName = this.$store.state.user.info.name;
  643. }
  644. if (!this.form.workCheckUserId) {
  645. // 设置为当前用户
  646. this.form.workCheckUserId = this.$store.state.user.info.id;
  647. this.form.workCheckUserName = this.$store.state.user.info.name;
  648. }
  649. if (!this.form.qualityCheckTime) {
  650. this.form.qualityCheckTime = this.$util.toDateString(
  651. new Date(),
  652. 'yyyy-MM-dd HH:mm:ss'
  653. );
  654. }
  655. if (!this.form.workCheckTime) {
  656. this.form.workCheckTime = this.$util.toDateString(
  657. new Date(),
  658. 'yyyy-MM-dd HH:mm:ss'
  659. );
  660. }
  661. },
  662. // 规则齐套检查
  663. async getKitCheck() {
  664. // 判断 是否有需要自动检查的项
  665. const hasAutoCheck = this.form.details.some((item) => item.isAutoCheck);
  666. if (!hasAutoCheck) {
  667. console.log('this.form.details', this.form.details);
  668. this.$message.warning('当前没有需要自动检查的规则');
  669. return;
  670. }
  671. // 必须要有物品清单
  672. if (this.form.orders.length == 0) {
  673. this.$message.warning('请添加物品清单');
  674. return;
  675. }
  676. if (!this.form.id) {
  677. this.$message.warning('请先保存放行单');
  678. return;
  679. }
  680. try {
  681. this.butLoading = true;
  682. const data = await checklistrecordKitCheck(this.form.id);
  683. console.log('规则齐套检查', data);
  684. // 把检查结果赋值给对应的明细
  685. this.form.details = this.form.details.map((item) => {
  686. const checkItem = data.find((d) => d.id === item.id);
  687. console.log('checkItem 存在', checkItem);
  688. if (checkItem && item.isAutoCheck) {
  689. return {
  690. ...item,
  691. isPass: checkItem.isPass
  692. };
  693. }
  694. return item;
  695. });
  696. console.log('规则齐套检查', this.form.details);
  697. this.butLoading = false;
  698. this.$message.success('规则齐套检查完成!');
  699. } catch (error) {
  700. this.butLoading = false;
  701. }
  702. },
  703. // 打开选择用户
  704. openSelectUser(type) {
  705. this.selectUserType = type;
  706. this.showSelectUser = true;
  707. },
  708. selectUserFinished(userInfo) {
  709. console.log('userInfo', userInfo);
  710. console.log('this.selectUserType', this.selectUserType);
  711. if (this.selectUserType == 0) {
  712. this.form.workCheckUserId = userInfo.id;
  713. this.form.workCheckUserName = userInfo.name;
  714. } else {
  715. this.form.qualityCheckUserId = userInfo.id;
  716. this.form.qualityCheckUserName = userInfo.name;
  717. }
  718. }
  719. }
  720. };
  721. </script>
  722. <style scoped lang="scss">
  723. .detail-table {
  724. border: 1px solid #ebeef5;
  725. // 实线边框
  726. border-collapse: collapse;
  727. td {
  728. border: none;
  729. padding: 10px 15px;
  730. border: 1px solid #ebeef5;
  731. &:first-child {
  732. font-weight: 600;
  733. background: #f5f7fa;
  734. width: 130px;
  735. text-align: center;
  736. }
  737. }
  738. }
  739. .mask-box {
  740. position: relative;
  741. &::after {
  742. content: '';
  743. width: 100%;
  744. height: 100%;
  745. position: absolute;
  746. top: 0;
  747. left: 0;
  748. background: rgba(0, 0, 0, 0);
  749. cursor: pointer;
  750. }
  751. }
  752. </style>