detailsPop.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873
  1. <template>
  2. <div>
  3. <el-drawer
  4. title=""
  5. :visible.sync="drawer"
  6. v-if="drawer"
  7. :custom-class="isFullscreen ? 'not-fullscreen' : 'is-fullscreen'"
  8. :before-close="handleClose"
  9. :with-header="false"
  10. :append-to-body="true"
  11. >
  12. <!-- 自定义头部 -->
  13. <div class="custom-drawer-header" v-if="!isWt">
  14. <div class="radio_box rx-cc">
  15. <el-radio-group
  16. size="small"
  17. v-model="currentNodeData.bomType"
  18. @change="bomChange"
  19. >
  20. <el-radio-button
  21. :label="4"
  22. v-permissionccc="['main:bomcategory:ebom']"
  23. >EBOM
  24. </el-radio-button>
  25. <el-radio-button :label="1">PBOM </el-radio-button>
  26. <!-- v-if="
  27. searchObj.isProduct ||
  28. [1, 9].includes(searchObj.rootPathIdParent)
  29. " -->
  30. <el-radio-button
  31. :label="2"
  32. v-permissionccc="['main:bomcategory:mbom']"
  33. >MBOM
  34. </el-radio-button>
  35. <el-radio-button
  36. :label="3"
  37. v-permissionccc="['main:bomcategory:abom']"
  38. >ABOM
  39. </el-radio-button>
  40. </el-radio-group>
  41. <div style="margin-left: 100px">
  42. <el-button
  43. v-if="
  44. currentNodeData.bomType == 1 &&
  45. (currentNodeData.parentId == '0' || !currentNodeData.parentId)
  46. "
  47. type="primary"
  48. size="mini"
  49. icon="el-icon-download"
  50. plain
  51. >导出</el-button
  52. >
  53. <el-button
  54. type="primary"
  55. size="mini"
  56. @click="handleRefresh"
  57. v-if="currentNodeData.approvalStatus != 1"
  58. >
  59. 刷新
  60. </el-button>
  61. </div>
  62. </div>
  63. <div>
  64. <el-button
  65. type="text"
  66. @click="handleDetails()"
  67. v-if="isNotData && currentNodeData.approvalStatus == 1"
  68. :underline="false"
  69. >
  70. {{ approvalStatusOpt[+currentNodeData.approvalStatus] }}
  71. </el-button>
  72. <el-button
  73. type="text"
  74. style="color: #f56c6c"
  75. v-if="isNotData && currentNodeData.approvalStatus == 3"
  76. :underline="false"
  77. >
  78. {{ approvalStatusOpt[+currentNodeData.approvalStatus] }}
  79. </el-button>
  80. <el-button
  81. icon="el-icon-full-screen"
  82. type="text"
  83. @click="handleFull"
  84. >{{ isFullscreen ? '全屏' : '缩小' }}</el-button
  85. >
  86. <el-button
  87. icon="el-icon-circle-close"
  88. type="text"
  89. @click="handleClose"
  90. >关闭</el-button
  91. >
  92. </div>
  93. </div>
  94. <!-- 抽屉内容 -->
  95. <div class="drawer_content">
  96. <ele-split-layout
  97. width="260px"
  98. allow-collapse
  99. :resizable="true"
  100. :min-size="200"
  101. :max-size="-200"
  102. :left-style="{
  103. overflow: 'hidden',
  104. width: '100%'
  105. }"
  106. :right-style="{ overflow: 'hidden' }"
  107. :responsive="false"
  108. >
  109. <!-- // tree 组件 -->
  110. <div class="ele-border-lighter sys-organization-list">
  111. <div>
  112. 版本号: &nbsp; &nbsp;
  113. <el-select
  114. size="mini"
  115. style="width: 70%; margin: 6px 0"
  116. v-model="searchObj.versions"
  117. placeholder="请选择bom版本"
  118. @change="getTreeDataList"
  119. :disabled="isWt"
  120. >
  121. <el-option
  122. v-for="item in versList"
  123. :label="'V' + item.versions + '.0'"
  124. :value="item.versions"
  125. :key="item.id"
  126. >
  127. </el-option>
  128. </el-select>
  129. <br />
  130. 属性类型:
  131. <el-select
  132. size="mini"
  133. style="width: 70%; margin: 6px 0"
  134. v-model="searchObj.componentAttribute"
  135. filterable
  136. multiple
  137. placeholder="请选择属性类型"
  138. @change="getTreeDataList"
  139. :disabled="isWt"
  140. >
  141. <el-option
  142. v-for="item in sxtList"
  143. :key="item.value"
  144. :value="item.value"
  145. :label="item.label"
  146. ></el-option>
  147. </el-select>
  148. </div>
  149. <el-tree
  150. class="treeData"
  151. :data="treeList"
  152. :expand-on-click-node="false"
  153. :props="defaultProps"
  154. ref="treeRef"
  155. :default-expanded-keys="current && current.id ? [current.id] : []"
  156. :highlight-current="true"
  157. node-key="id"
  158. @node-click="handleNodeClick"
  159. >
  160. <span class="custom-tree-node" slot-scope="{ node, data }">
  161. {{ data.categoryCode }} / {{ node.label }}
  162. </span>
  163. </el-tree>
  164. </div>
  165. <template v-slot:content v-if="isNotData">
  166. <!-- 基本信息 -->
  167. <baseInfo
  168. :dataInfo="currentNodeData"
  169. @getNewBomData="getNewBomData"
  170. />
  171. <!-- table -->
  172. <el-tabs
  173. v-model="activeName"
  174. class="tab-box"
  175. type="border-card"
  176. @tab-click="handleClick"
  177. >
  178. <el-tab-pane label="属性" name="属性">
  179. <attribute
  180. :attributeData="currentNodeData"
  181. :isWt="isWt"
  182. ></attribute>
  183. </el-tab-pane>
  184. <el-tab-pane
  185. :label="
  186. currentNodeData.bomType == 1
  187. ? 'PBOM明细表'
  188. : currentNodeData.bomType == 2
  189. ? 'MBOM明细表'
  190. : currentNodeData.bomType == 3
  191. ? 'ABOM明细表'
  192. : 'EBOM明细表'
  193. "
  194. name="明细表"
  195. >
  196. <detailedList
  197. v-if="activeName == '明细表'"
  198. :isTemp="searchObj.isTemp"
  199. :attributeData="currentNodeData"
  200. :treeId="treeId"
  201. :isWt="isWt"
  202. ></detailedList>
  203. </el-tab-pane>
  204. <el-tab-pane
  205. label="工艺路线"
  206. name="工艺路线"
  207. v-if="currentNodeData.bomType != 4"
  208. >
  209. <routing
  210. v-if="activeName == '工艺路线'"
  211. ref="routingRef"
  212. :isWt="isWt"
  213. :attributeData="currentNodeData"
  214. :taskParam="currentNodeData"
  215. :resourceBomId="resourceBomId"
  216. ></routing>
  217. </el-tab-pane>
  218. <el-tab-pane
  219. label="工序配置"
  220. name="工序配置"
  221. v-if="currentNodeData.bomType != 4"
  222. >
  223. <!-- && (searchObj.isProduct ||
  224. [1, 9].includes(searchObj.rootPathIdParent)) -->
  225. <workmanship
  226. v-if="activeName == '工序配置'"
  227. ref="workmanshipRef"
  228. :attributeData="currentNodeData"
  229. :taskParam="currentNodeData"
  230. :resourceBomId="resourceBomId"
  231. ></workmanship>
  232. </el-tab-pane>
  233. </el-tabs>
  234. </template>
  235. <template v-slot:content v-else>
  236. <el-empty
  237. :image-size="200"
  238. :description="
  239. currentNodeData.bomType == 1
  240. ? 'PBOM 暂无数据,请先新建'
  241. : currentNodeData.bomType == 2
  242. ? 'MBOM 暂无数据,请先新建'
  243. : currentNodeData.bomType == 3
  244. ? 'ABOM 暂无数据,请先新建'
  245. : 'EBOM 暂无数据,请先新建'
  246. "
  247. ></el-empty>
  248. </template>
  249. </ele-split-layout>
  250. </div>
  251. </el-drawer>
  252. <baseInfoSave
  253. v-if="baseInfoShow"
  254. @close="baseClose"
  255. :categoryObj="currentNodeData"
  256. :categoryId="searchObj.categoryId"
  257. :categoryName="searchObj.categoryName"
  258. ></baseInfoSave>
  259. <importDialog
  260. :defModule="moudleName"
  261. ref="importDialogRef"
  262. :categoryId="searchObj.categoryId"
  263. @success="getTreeData"
  264. />
  265. <el-dialog
  266. title="发布"
  267. :visible.sync="isSubmit"
  268. v-if="isSubmit"
  269. width="30%"
  270. center
  271. >
  272. <div>
  273. <el-radio v-model="radioSubmit" :label="1">药品</el-radio>
  274. <el-radio v-model="radioSubmit" :label="2">器械</el-radio>
  275. </div>
  276. <span slot="footer" class="dialog-footer">
  277. <el-button @click="isSubmit = false">取 消</el-button>
  278. <el-button type="primary" @click="handJsSubmit()">确 定</el-button>
  279. </span>
  280. </el-dialog>
  281. <!-- <process-submit-dialog
  282. api-fun-name="purchaseinquiryStatusAPI"
  283. :processSubmitDialogFlag.sync="processSubmitDialogFlag"
  284. v-if="processSubmitDialogFlag"
  285. ref="processSubmitDialogRef"
  286. @reload="getTreeData"
  287. ></process-submit-dialog> -->
  288. <LCdetail ref="detailRef"></LCdetail>
  289. </div>
  290. </template>
  291. <script>
  292. import {
  293. getBomTreeList,
  294. versionList,
  295. getBomGetById,
  296. convert,
  297. convertABom,
  298. convertEBOM,
  299. convertEBomToPBOM,
  300. deleteBomTreeList,
  301. bomSubmit,
  302. jsBomSubmit,
  303. deviceBomSubmit,
  304. hasNewVersion
  305. } from '@/api/produce/bom.js';
  306. import baseInfo from './components/baseInfo.vue';
  307. import baseInfoSave from './components/baseInfoSave.vue';
  308. import attribute from './components/attribute.vue';
  309. import detailedList from './components/detailedList.vue';
  310. import importDialog from './qualityTesting/import-dialog.vue';
  311. import LCdetail from './components/LCdetail.vue';
  312. import routing from './components/routing.vue';
  313. import workmanship from './components/workmanship.vue';
  314. // import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
  315. import { mapGetters } from 'vuex';
  316. export default {
  317. name: 'bomDetailsPop',
  318. components: {
  319. baseInfo,
  320. baseInfoSave,
  321. attribute,
  322. detailedList,
  323. importDialog,
  324. LCdetail,
  325. routing,
  326. workmanship
  327. // processSubmitDialog
  328. },
  329. data() {
  330. return {
  331. drawer: false,
  332. isFullscreen: true,
  333. resourceBomId: '',
  334. currentNodeData: {
  335. bomType: 1,
  336. children: [],
  337. parentId: ''
  338. },
  339. processSubmitDialogFlag: false,
  340. current: {},
  341. treeList: [],
  342. versList: [],
  343. treeLoading: false,
  344. defaultProps: {
  345. children: 'children',
  346. label: 'name'
  347. },
  348. searchObj: {
  349. versions: '',
  350. categoryId: '',
  351. isProduct: false,
  352. componentAttribute: [],
  353. isTemp: 0
  354. },
  355. activeName: '属性',
  356. baseInfoShow: false,
  357. isNotData: true,
  358. moudleName: 'mainUser',
  359. isSubmit: false,
  360. radioSubmit: 1,
  361. treeId: null,
  362. approvalStatusOpt: {
  363. 0: '未提交',
  364. 1: '审核中',
  365. 2: '审核通过',
  366. 3: '审核不通过'
  367. },
  368. sxtList: [
  369. {
  370. label: '自制件',
  371. value: 1
  372. },
  373. {
  374. label: '采购件',
  375. value: 2
  376. },
  377. {
  378. label: '外协件',
  379. value: 3
  380. },
  381. {
  382. label: '受托件',
  383. value: 4
  384. }
  385. ],
  386. isWt: false
  387. };
  388. },
  389. computed: {
  390. clientEnvironmentId() {
  391. return this.$store.state.user.info.clientEnvironmentId;
  392. },
  393. ...mapGetters(['user'])
  394. },
  395. methods: {
  396. open(row) {
  397. this.searchObj = row;
  398. console.log(row, 'rowrowrowrowrow');
  399. if (Object.prototype.hasOwnProperty.call(row, 'isWt') && row.isWt) {
  400. this.isWt = row.isWt;
  401. this.isFullscreen = false;
  402. }
  403. if (Object.prototype.hasOwnProperty.call(row, 'bomType')) {
  404. this.currentNodeData.bomType = row.bomType;
  405. }
  406. this.drawer = true;
  407. this.treeList = [];
  408. // if (
  409. // (this.currentNodeData.bomType == 2 ||
  410. // this.currentNodeData.bomType == 3) &&
  411. // !this.isWt
  412. // ) {
  413. // this.searchObj.componentAttribute = [1];
  414. // } else {
  415. // this.searchObj.componentAttribute = [];
  416. // }
  417. // this.getTreeData();
  418. this.getVersion();
  419. },
  420. handleClose() {
  421. this.searchObj = {
  422. versions: '',
  423. categoryId: '',
  424. componentAttribute: [],
  425. isProduct: false,
  426. isTemp: 0
  427. };
  428. this.currentNodeData = {
  429. bomType: 1,
  430. children: [],
  431. parentId: ''
  432. };
  433. this.activeName = '属性';
  434. this.drawer = false;
  435. },
  436. getNewBomData(data) {
  437. let rowData = {
  438. categoryId: data.categoryId,
  439. categoryName: data.name,
  440. code: data.code,
  441. versions: data.resourceBomVersion,
  442. rootPathIdParent: data.categoryLevelPathIdParent,
  443. isProduct: true,
  444. bomType: Number(data.bomType),
  445. isTemp: data.isTemp
  446. };
  447. this.open(rowData);
  448. },
  449. handleFull() {
  450. this.isFullscreen = !this.isFullscreen;
  451. this.$forceUpdate();
  452. },
  453. bomChange(e) {
  454. this.searchObj.versions = '';
  455. this.searchObj.componentAttribute = [];
  456. this.treeList = [];
  457. // this.currentNodeData = {
  458. // children: [],
  459. // parentId: ''
  460. // };
  461. this.currentNodeData.bomType = e;
  462. if (
  463. (this.currentNodeData.bomType == 2 ||
  464. this.currentNodeData.bomType == 3) &&
  465. !this.isWt
  466. ) {
  467. this.searchObj.componentAttribute = [1];
  468. } else {
  469. this.searchObj.componentAttribute = [];
  470. }
  471. // this.getTreeData();
  472. this.getVersion();
  473. },
  474. getTreeDataList() {
  475. if (this.searchObj.versions) {
  476. this.getTreeData();
  477. } else {
  478. this.getVersion();
  479. }
  480. },
  481. async getTreeData() {
  482. try {
  483. this.treeLoading = true;
  484. let componentAttribute = '';
  485. if (
  486. this.searchObj.componentAttribute &&
  487. this.searchObj.componentAttribute.length != 0
  488. ) {
  489. componentAttribute = this.searchObj.componentAttribute.join(',');
  490. }
  491. const res = await getBomTreeList({
  492. categoryId: this.searchObj.categoryId,
  493. versions: this.searchObj.versions,
  494. bomType: this.currentNodeData.bomType,
  495. isTemp: this.searchObj.isTemp || 0,
  496. componentAttribute
  497. });
  498. this.treeLoading = false;
  499. if (res?.code === '0') {
  500. if (res.data?.length > 0) {
  501. this.treeList = res.data;
  502. this.$nextTick(() => {
  503. this.isNotData = true;
  504. // 默认高亮第一个
  505. this.$refs.treeRef.setCurrentKey(res.data[0].id);
  506. this.handleNodeClick(res.data[0]);
  507. });
  508. } else {
  509. this.isNotData = false;
  510. this.treeList = [];
  511. }
  512. return this.treeList;
  513. }
  514. } catch (error) {
  515. console.log(error);
  516. }
  517. this.treeLoading = false;
  518. },
  519. handleNodeClick(data) {
  520. this.treeId = data.id;
  521. this.resourceBomId =
  522. data.parentId != 0 ? data.resourceBomId || data.id : data.id;
  523. this.handBomDetails(this.treeId);
  524. },
  525. handBomDetails(id) {
  526. if (id) {
  527. getBomGetById(id).then((res) => {
  528. res.data.attributeType = res.data.category.attributeType;
  529. this.currentNodeData = res.data;
  530. this.searchObj.versions = this.currentNodeData.versions;
  531. this.$forceUpdate();
  532. console.log(this.currentNodeData, 'this.currentNodeData');
  533. });
  534. } else {
  535. this.currentNodeData = {
  536. bomType: 1,
  537. children: []
  538. };
  539. }
  540. },
  541. getVersion(type) {
  542. let param = {
  543. categoryId: this.searchObj.categoryId,
  544. bomType: this.currentNodeData.bomType,
  545. isTemp: this.searchObj.isTemp || 0
  546. };
  547. versionList(param).then((res) => {
  548. this.versList = res || [];
  549. if (type == 'del' || type == 'add') {
  550. if (this.versList.length >= 1) {
  551. // if (!this.searchObj.versions) {
  552. this.searchObj.versions =
  553. this.versList[this.versList.length - 1].versions;
  554. // }
  555. this.getTreeData();
  556. } else {
  557. this.searchObj.versions = '';
  558. this.isNotData = false;
  559. }
  560. } else {
  561. if (this.versList.length != 0) {
  562. this.getTreeData();
  563. } else {
  564. this.isNotData = false;
  565. }
  566. }
  567. });
  568. },
  569. handleClick(tab) {},
  570. remove() {
  571. if (this.currentNodeData.status == 1) {
  572. return this.$message.warning('已发布版本不能删除');
  573. }
  574. this.$confirm('是否确认删除?', '提示', {
  575. confirmButtonText: '确定',
  576. cancelButtonText: '取消',
  577. type: 'warning'
  578. })
  579. .then(() => {
  580. deleteBomTreeList([this.currentNodeData.id]).then((msg) => {
  581. this.$message.success('删除' + msg);
  582. this.getVersion('del');
  583. });
  584. })
  585. .finally(() => {});
  586. },
  587. async transformation(tt) {
  588. if (this.currentNodeData.status != 1) {
  589. return this.$message.warning('只有已发布版本才可以转换');
  590. }
  591. let _type = tt == 'P' ? 1 : tt == 'M' ? 2 : tt == 'A' ? 3 : 4;
  592. if (!this.isEdit) {
  593. let isHas = await this.hasVersionFn(_type);
  594. if (!isHas) return;
  595. }
  596. this.loadingInstance = this.$loading({
  597. lock: true,
  598. text: '转换中...',
  599. background: 'rgba(0, 0, 0, 0.7)'
  600. });
  601. let ULR =
  602. tt == 'M'
  603. ? convert
  604. : tt == 'A'
  605. ? convertABom
  606. : tt == 'E'
  607. ? convertEBOM
  608. : tt == 'P'
  609. ? convertEBomToPBOM
  610. : '';
  611. ULR({
  612. versions: this.searchObj.versions,
  613. categoryId: this.searchObj.categoryId
  614. })
  615. .then((data) => {
  616. if (data.code == '0') {
  617. this.loadingInstance.close();
  618. this.$message.success('转换成功');
  619. this.currentNodeData.bomType = _type;
  620. this.searchObj.versions = '';
  621. // this.getTreeData();
  622. this.getVersion();
  623. }
  624. })
  625. .catch((err) => {
  626. this.loadingInstance.close();
  627. });
  628. },
  629. handleAdd() {
  630. this.baseInfoShow = true;
  631. },
  632. baseClose(val) {
  633. if (val) {
  634. this.getVersion('add');
  635. }
  636. this.activeName = '属性';
  637. this.baseInfoShow = false;
  638. },
  639. uploadFile() {
  640. this.$refs.importDialogRef.open();
  641. },
  642. handleRefresh() {
  643. this.getVersion();
  644. // this.getTreeData();
  645. },
  646. handSubmit() {
  647. if (Number(this.currentNodeData.baseCount) <= 0) {
  648. this.$message.warning('基本用量需要大于0');
  649. return;
  650. }
  651. if (this.clientEnvironmentId == 5) {
  652. this.isSubmit = true;
  653. } else {
  654. this.submit();
  655. // this.$alert('确定要发布吗?', '提示', {
  656. // confirmButtonText: '确定',
  657. // cancelButtonText: '取消',
  658. // type: 'warning'
  659. // })
  660. // .then(() => {
  661. // bomSubmit({ businessId: this.currentNodeData.id }).then((res) => {
  662. // if (res?.code == 0) {
  663. // this.$message.success('发布成功');
  664. // this.getTreeData();
  665. // }
  666. // });
  667. // })
  668. // .catch(() => {});
  669. }
  670. },
  671. submit(businessKey) {
  672. this.processSubmitDialogFlag = true;
  673. this.$nextTick(() => {
  674. let params = {
  675. businessId: this.currentNodeData.id,
  676. businessKey: businessKey || 'bom_approver',
  677. formCreateUserId: this.user.info.userId,
  678. variables: {
  679. businessCode: this.currentNodeData.code,
  680. businessName: this.currentNodeData.name,
  681. businessType:
  682. this.currentNodeData.bomType == 1
  683. ? 'PBOM'
  684. : this.currentNodeData.bomType == 2
  685. ? 'MBOM'
  686. : this.currentNodeData.bomType == 3
  687. ? 'ABOM'
  688. : 'EBOM'
  689. }
  690. };
  691. this.$refs.processSubmitDialogRef.init(params);
  692. });
  693. },
  694. handJsSubmit() {
  695. this.submit(
  696. this.radioSubmit == 1 ? 'bom_release' : 'bom_release_device'
  697. );
  698. this.isSubmit = false;
  699. // let URL = this.radioSubmit == 1 ? jsBomSubmit : deviceBomSubmit;
  700. // this.$alert('确定要发布吗?', '提示', {
  701. // confirmButtonText: '确定',
  702. // cancelButtonText: '取消',
  703. // type: 'warning'
  704. // })
  705. // .then(() => {
  706. // URL({ businessId: this.currentNodeData.id }).then((res) => {
  707. // this.isSubmit = false;
  708. // this.$message.success('发布成功');
  709. // this.getTreeData();
  710. // });
  711. // })
  712. // .catch(() => {});
  713. },
  714. handleDetails() {
  715. if (!this.currentNodeData.processInstanceId) {
  716. this.$message.info('未提交没有审核流程');
  717. } else {
  718. this.$refs.detailRef.open(this.currentNodeData.processInstanceId);
  719. }
  720. },
  721. async hasVersionFn(bomType) {
  722. return new Promise((resolve) => {
  723. let param = {
  724. categoryId: this.searchObj.categoryId,
  725. bomType: bomType
  726. };
  727. hasNewVersion(param).then((res) => {
  728. if (res.data == 1) {
  729. this.$confirm('已经草稿版本存在,是否覆盖?', '提示', {
  730. confirmButtonText: '覆盖',
  731. cancelButtonText: '取消',
  732. type: 'warning'
  733. })
  734. .then(() => {
  735. resolve(true);
  736. })
  737. .catch(() => {
  738. resolve(false);
  739. });
  740. } else {
  741. resolve(true);
  742. }
  743. });
  744. });
  745. }
  746. }
  747. };
  748. </script>
  749. <style lang="scss" scoped>
  750. /* 自定义全屏样式 */
  751. ::v-deep .is-fullscreen {
  752. width: 100vw !important;
  753. height: 100vh !important;
  754. overflow: hidden !important;
  755. /* 隐藏滚动条 */
  756. }
  757. ::v-deep .not-fullscreen {
  758. width: calc(100vw - 260px) !important;
  759. height: 100vh !important;
  760. overflow: hidden !important;
  761. /* 隐藏滚动条 */
  762. }
  763. .custom-drawer-header {
  764. display: flex;
  765. justify-content: space-between;
  766. align-items: center;
  767. padding: 4px 15px;
  768. background-color: #f5f7fa;
  769. /* 自定义背景色 */
  770. border-bottom: 1px solid #ebeef5;
  771. /* 自定义边框,与抽屉内容分隔 */
  772. }
  773. .drawer_content {
  774. margin: 10px 20px;
  775. box-sizing: border-box;
  776. }
  777. .sys-organization-list {
  778. height: calc(100vh - 65px);
  779. box-sizing: border-box;
  780. border-width: 1px;
  781. border-style: solid;
  782. overflow: auto;
  783. padding: 0 10px;
  784. box-sizing: border-box;
  785. display: flex;
  786. flex-direction: column;
  787. overflow: hidden;
  788. .treeData {
  789. height: 0 1 auto;
  790. overflow-y: auto;
  791. height: calc(100vh - 125px);
  792. }
  793. }
  794. .tab-box {
  795. margin-top: 12px;
  796. }
  797. </style>