血透系统pad前端

multipleSubMenu.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. <template>
  2. <div>
  3. <div v-if="visibility" class="Dialog">
  4. <div class="DialogTit">
  5. <span class="iconfont" @click="closeDialog()">&#xe720; 返回</span>
  6. <h1 class="name">透析耗材</h1>
  7. <span class="success" @click="success()">完成</span>
  8. </div>
  9. <div class="DialogContent" id="dialogTop">
  10. <div
  11. class="item"
  12. value="item"
  13. @click="itemClick(1, 'niprocart')"
  14. ref="niprocart"
  15. v-if="isShow('血液透析干粉')"
  16. >
  17. <label class="name">血液透析干粉</label>
  18. <div class="content">
  19. <span class="text" id="knjaa">{{
  20. getValue(this.dialysisPrescription.niprocart)
  21. }}</span>
  22. <span class="iconfont">&#xe6f9;</span>
  23. </div>
  24. </div>
  25. <div
  26. class="item"
  27. value="item"
  28. @click="itemClick(2, 'jms')"
  29. ref="jms"
  30. v-if="isShow('一次性使用动静脉穿刺针')"
  31. >
  32. <label class="name">一次性使用动静脉穿刺针</label>
  33. <div class="content">
  34. <span class="text" id="knjaa">{{
  35. getValue(this.dialysisPrescription.jms)
  36. }}</span>
  37. <span class="iconfont">&#xe6f9;</span>
  38. </div>
  39. </div>
  40. <div
  41. class="item"
  42. value="item"
  43. @click="itemClick(3, 'fistula_needle_set')"
  44. ref="fistula_needle_set"
  45. v-if="isShow('内瘘管翼状针')"
  46. >
  47. <label class="name">内瘘管翼状针</label>
  48. <div class="content">
  49. <span class="text" id="knjaa">{{
  50. getValue(this.dialysisPrescription.fistula_needle_set)
  51. }}</span>
  52. <span class="iconfont">&#xe6f9;</span>
  53. </div>
  54. </div>
  55. <div
  56. class="item"
  57. value="item"
  58. @click="itemClick(4, 'fistula_needle_set_16')"
  59. ref="fistula_needle_set_16"
  60. v-if="isShow('内瘘管翼状针16G')"
  61. >
  62. <label class="name">内瘘管翼状针16G</label>
  63. <div class="content">
  64. <span class="text" id="knjaa">{{
  65. getValue(this.dialysisPrescription.fistula_needle_set_16)
  66. }}</span>
  67. <span class="iconfont">&#xe6f9;</span>
  68. </div>
  69. </div>
  70. <div
  71. class="item"
  72. value="item"
  73. @click="itemClick(5, 'hemoperfusion')"
  74. ref="hemoperfusion"
  75. v-if="isShow('一次性使用血液灌流器')"
  76. >
  77. <label class="name">一次性使用血液灌流器</label>
  78. <div class="content">
  79. <span class="text" id="knjaa">{{
  80. getValue(this.dialysisPrescription.hemoperfusion)
  81. }}</span>
  82. <span class="iconfont">&#xe6f9;</span>
  83. </div>
  84. </div>
  85. <div
  86. class="item"
  87. value="item"
  88. @click="itemClick(6, 'dialyser_sterilised')"
  89. ref="dialyser_sterilised"
  90. v-if="isShow('空心纤维血液透析器')"
  91. >
  92. <label class="name">空心纤维血液透析器</label>
  93. <div class="content">
  94. <span class="text" id="knjaa">{{
  95. getValue(this.dialysisPrescription.dialyser_sterilised)
  96. }}</span>
  97. <span class="iconfont">&#xe6f9;</span>
  98. </div>
  99. </div>
  100. <div
  101. class="item"
  102. value="item"
  103. @click="itemClick(7, 'filtryzer')"
  104. ref="filtryzer"
  105. v-if="isShow('中空纤维透析器')"
  106. >
  107. <label class="name">中空纤维透析器</label>
  108. <div class="content">
  109. <span class="text" id="knjaa">{{
  110. getValue(this.dialysisPrescription.filtryzer)
  111. }}</span>
  112. <span class="iconfont">&#xe6f9;</span>
  113. </div>
  114. </div>
  115. <div
  116. class="item"
  117. value="item"
  118. @click="itemClick(8, 'dialyzers')"
  119. ref="dialyzers"
  120. v-if="isShow('透析器')"
  121. >
  122. <label class="name">透析器</label>
  123. <div class="content">
  124. <span class="text" id="knjaa">{{
  125. getValue(this.dialysisPrescription.dialyzers)
  126. }}</span>
  127. <span class="iconfont">&#xe6f9;</span>
  128. </div>
  129. </div>
  130. <div
  131. class="item"
  132. value="item"
  133. @click="itemClick(9, 'injector')"
  134. ref="injector"
  135. v-if="isShow('注射器')"
  136. >
  137. <label class="name">注射器</label>
  138. <div class="content">
  139. <span class="text" id="knjaa">{{
  140. getValue(this.dialysisPrescription.injector)
  141. }}</span>
  142. <span class="iconfont">&#xe6f9;</span>
  143. </div>
  144. </div>
  145. <div
  146. class="item"
  147. value="item"
  148. @click="itemClick(10, 'bloodlines')"
  149. ref="bloodlines"
  150. v-if="isShow('体外循环血路管')"
  151. >
  152. <label class="name">体外循环血路管</label>
  153. <div class="content">
  154. <span class="text" id="knjaa">{{
  155. getValue(this.dialysisPrescription.bloodlines)
  156. }}</span>
  157. <span class="iconfont">&#xe6f9;</span>
  158. </div>
  159. </div>
  160. <div
  161. class="item"
  162. value="item"
  163. @click="itemClick(11, 'tubing_hemodialysis')"
  164. ref="tubing_hemodialysis"
  165. v-if="isShow('血液净化补液管路(置换管)')"
  166. >
  167. <label class="name">血液净化补液管路(置换管)</label>
  168. <div class="content">
  169. <span class="text" id="knjaa">{{
  170. getValue(this.dialysisPrescription.tubing_hemodialysis)
  171. }}</span>
  172. <span class="iconfont">&#xe6f9;</span>
  173. </div>
  174. </div>
  175. <div
  176. class="item"
  177. value="item"
  178. @click="itemClick(12, 'package')"
  179. ref="package"
  180. v-if="isShow('护理包')"
  181. >
  182. <label class="name">护理包</label>
  183. <div class="content">
  184. <span class="text" id="knjaa">{{
  185. getValue(this.dialysisPrescription.package)
  186. }}</span>
  187. <span class="iconfont">&#xe6f9;</span>
  188. </div>
  189. </div>
  190. <div
  191. class="item"
  192. value="item"
  193. @click="itemClick(13, 'a_liquid')"
  194. ref="a_liquid"
  195. v-if="isShow('A液')"
  196. >
  197. <label class="name">A液</label>
  198. <div class="content">
  199. <span class="text" id="knjaa">{{
  200. getValue(this.dialysisPrescription.a_liquid)
  201. }}</span>
  202. <span class="iconfont">&#xe6f9;</span>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. <new-check-box-sub-menu
  208. :show="is_show"
  209. v-on:menu-cancle="menuCancle"
  210. v-on:menu-comfirm="menuComfirm"
  211. v-on:menu-empty="menuEmpty"
  212. :propsForm="propForm"
  213. ></new-check-box-sub-menu>
  214. </div>
  215. </template>
  216. <script>
  217. import { getWarehouseGoodInfo } from "@/api/stock";
  218. import NewCheckBoxSubMenu from "./newCheckBoxSubMenu";
  219. export default {
  220. name: "multipleSubMenu",
  221. components: { NewCheckBoxSubMenu },
  222. data() {
  223. return {
  224. is_show: false,
  225. propForm: {
  226. title: "",
  227. list: [],
  228. optionList: [],
  229. isMultiple: 2,
  230. result: [], //选中的值
  231. type: 1, //用来区分不同子菜单,方便对返回值进行赋值
  232. selectId: 0
  233. }
  234. };
  235. },
  236. props: {
  237. dialysisPrescription: {
  238. type: Object
  239. },
  240. info: {
  241. type: Array,
  242. default: function() {
  243. return new Array();
  244. }
  245. },
  246. visibility: {
  247. type: Boolean,
  248. default: false
  249. }
  250. },
  251. methods: {
  252. success: function() {
  253. this.$emit("menu-comfirm-two", this.dialysisPrescription);
  254. },
  255. closeDialog() {
  256. this.$emit("menu-cancel-two");
  257. },
  258. itemClick(type, name) {
  259. getWarehouseGoodInfo(type).then(response => {
  260. if (response.data.state == 0) {
  261. Toast.fail(response.data.msg);
  262. return false;
  263. } else {
  264. var goodInfoArray = [];
  265. for (let i = 0; i < response.data.data.list.length; i++) {
  266. let obj = {};
  267. obj["id"] = response.data.data.list[i].GoodInfo.id;
  268. obj["name"] =
  269. response.data.data.list[i].GoodInfo.specification_name;
  270. goodInfoArray.push(obj);
  271. }
  272. const obj = {};
  273. // 去重复
  274. goodInfoArray = goodInfoArray.reduce((cur, next) => {
  275. obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
  276. return cur;
  277. }, []);
  278. switch (name) {
  279. case "niprocart":
  280. this.propForm.type = 1;
  281. this.propForm.title = "血液透析干粉";
  282. this.propForm.list = [];
  283. this.propForm.optionList = [];
  284. this.propForm.optionList = goodInfoArray;
  285. this.propForm.isMultiple = 1;
  286. this.propForm.selectId = this.dialysisPrescription.niprocart;
  287. this.propForm.click_ref = "niprocart";
  288. this.is_show = true;
  289. this.visibility = false;
  290. break;
  291. case "jms":
  292. this.propForm.type = 2;
  293. this.propForm.title = "一次性使用动静脉穿刺针";
  294. this.propForm.list = [];
  295. this.propForm.optionList = [];
  296. this.propForm.optionList = goodInfoArray;
  297. this.propForm.isMultiple = 1;
  298. this.propForm.selectId = this.dialysisPrescription.jms;
  299. this.propForm.click_ref = "jms";
  300. this.is_show = true;
  301. this.visibility = false;
  302. break;
  303. case "fistula_needle_set":
  304. this.propForm.type = 3;
  305. this.is_show = true;
  306. this.visibility = false;
  307. this.propForm.title = "内瘘管翼状针";
  308. this.propForm.list = [];
  309. this.propForm.optionList = [];
  310. this.propForm.optionList = goodInfoArray;
  311. this.propForm.isMultiple = 1;
  312. this.propForm.selectId = this.dialysisPrescription.fistula_needle_set;
  313. this.propForm.click_ref = "perfusion_apparatus";
  314. break;
  315. case "fistula_needle_set_16":
  316. this.propForm.type = 4;
  317. this.is_show = true;
  318. this.visibility = false;
  319. this.propForm.title = "内瘘管翼状针16G";
  320. this.propForm.list = [];
  321. this.propForm.optionList = [];
  322. this.propForm.optionList = goodInfoArray;
  323. this.propForm.isMultiple = 1;
  324. this.propForm.selectId = this.dialysisPrescription.fistula_needle_set_16;
  325. this.propForm.click_ref = "fistula_needle_set_16";
  326. break;
  327. case "hemoperfusion":
  328. this.propForm.type = 5;
  329. this.propForm.title = "一次性使用血液灌流器";
  330. this.is_show = true;
  331. this.visibility = false;
  332. this.propForm.list = [];
  333. this.propForm.optionList = [];
  334. this.propForm.optionList = goodInfoArray;
  335. this.propForm.isMultiple = 1;
  336. this.propForm.selectId = this.dialysisPrescription.hemoperfusion;
  337. this.propForm.click_ref = "hemoperfusion";
  338. break;
  339. case "dialyser_sterilised":
  340. this.propForm.type = 6;
  341. this.propForm.title = "空心纤维血液透析器";
  342. this.is_show = true;
  343. this.visibility = false;
  344. this.propForm.list = [];
  345. this.propForm.optionList = [];
  346. this.propForm.optionList = goodInfoArray;
  347. this.propForm.isMultiple = 1;
  348. this.propForm.selectId = this.dialysisPrescription.dialyser_sterilised;
  349. this.propForm.click_ref = "dialyser_sterilised";
  350. break;
  351. case "filtryzer":
  352. this.propForm.type = 7;
  353. this.is_show = true;
  354. this.visibility = false;
  355. this.propForm.title = "中空纤维透析器";
  356. this.propForm.list = [];
  357. this.propForm.optionList = [];
  358. this.propForm.optionList = goodInfoArray;
  359. this.propForm.isMultiple = 1;
  360. this.propForm.selectId = this.dialysisPrescription.filtryzer;
  361. this.propForm.click_ref = "filtryzer";
  362. break;
  363. case "dialyzers":
  364. this.propForm.type = 8;
  365. this.is_show = true;
  366. this.visibility = false;
  367. this.propForm.title = "透析器";
  368. this.propForm.list = [];
  369. this.propForm.optionList = [];
  370. this.propForm.optionList = goodInfoArray;
  371. this.propForm.isMultiple = 1;
  372. this.propForm.selectId = this.dialysisPrescription.dialyzers;
  373. this.propForm.click_ref = "dialyzers";
  374. break;
  375. case "injector":
  376. this.propForm.type = 9;
  377. this.is_show = true;
  378. this.visibility = false;
  379. this.propForm.title = "注射器";
  380. this.propForm.list = [];
  381. this.propForm.optionList = [];
  382. this.propForm.optionList = goodInfoArray;
  383. this.propForm.isMultiple = 1;
  384. this.propForm.selectId = this.dialysisPrescription.injector;
  385. this.propForm.click_ref = "injector";
  386. break;
  387. case "bloodlines":
  388. this.propForm.type = 10;
  389. this.is_show = true;
  390. this.visibility = false;
  391. this.propForm.title = "体外循环血路管";
  392. this.propForm.list = [];
  393. this.propForm.optionList = [];
  394. this.propForm.optionList = goodInfoArray;
  395. this.propForm.isMultiple = 1;
  396. this.propForm.selectId = this.dialysisPrescription.bloodlines;
  397. this.propForm.click_ref = "bloodlines";
  398. break;
  399. case "tubing_hemodialysis":
  400. this.propForm.type = 11;
  401. this.is_show = true;
  402. this.visibility = false;
  403. this.propForm.title = "血液净化补液管路(置换管)";
  404. this.propForm.list = [];
  405. this.propForm.optionList = [];
  406. this.propForm.optionList = goodInfoArray;
  407. this.propForm.isMultiple = 1;
  408. this.propForm.selectId = this.dialysisPrescription.tubing_hemodialysis;
  409. this.propForm.click_ref = "tubing_hemodialysis";
  410. break;
  411. case "package":
  412. this.propForm.type = 12;
  413. this.is_show = true;
  414. this.visibility = false;
  415. this.propForm.title = "护理包";
  416. this.propForm.list = [];
  417. this.propForm.optionList = [];
  418. this.propForm.optionList = goodInfoArray;
  419. this.propForm.isMultiple = 1;
  420. this.propForm.selectId = this.dialysisPrescription.package;
  421. this.propForm.click_ref = "package";
  422. break;
  423. case "a_liquid":
  424. this.propForm.type = 13;
  425. this.is_show = true;
  426. this.visibility = false;
  427. this.propForm.title = "A液";
  428. this.propForm.list = [];
  429. this.propForm.optionList = [];
  430. this.propForm.optionList = goodInfoArray;
  431. this.propForm.isMultiple = 1;
  432. this.propForm.selectId = this.dialysisPrescription.a_liquid;
  433. this.propForm.click_ref = "a_liquid";
  434. break;
  435. }
  436. }
  437. });
  438. },
  439. getValue(id) {
  440. if (id == 0 || id == "") {
  441. return "";
  442. }
  443. for (let i = 0; i < this.info.length; i++) {
  444. if (this.info[i].id == id) {
  445. return this.info[i].specification_name;
  446. }
  447. }
  448. },
  449. menuCancle: function() {
  450. this.is_show = false;
  451. this.visibility = true;
  452. },
  453. menuComfirm: function(val) {
  454. console.log(val);
  455. this.is_show = false;
  456. this.visibility = true;
  457. this.$nextTick(() => {
  458. if (
  459. this.$refs[this.propForm.click_ref] != undefined &&
  460. this.$refs[this.propForm.click_ref] != null
  461. ) {
  462. this.$refs[this.propForm.click_ref].scrollIntoView();
  463. }
  464. });
  465. switch (val.type) {
  466. case 1:
  467. if (val.selectId != -2) {
  468. this.dialysisPrescription.niprocart = val.selectId;
  469. } else {
  470. this.dialysisPrescription.niprocart = 0;
  471. }
  472. break;
  473. case 2:
  474. if (val.selectId != -2) {
  475. this.dialysisPrescription.jms = val.selectId;
  476. } else {
  477. this.dialysisPrescription.jms = 0;
  478. }
  479. break;
  480. case 3:
  481. if (val.selectId != -2) {
  482. this.dialysisPrescription.fistula_needle_set = val.selectId;
  483. } else {
  484. this.dialysisPrescription.fistula_needle_set = 0;
  485. }
  486. break;
  487. case 4:
  488. if (val.selectId != -2) {
  489. this.dialysisPrescription.fistula_needle_set_16 = val.selectId;
  490. } else {
  491. this.dialysisPrescription.fistula_needle_set_16 = 0;
  492. }
  493. break;
  494. case 5:
  495. if (val.selectId != -2) {
  496. this.dialysisPrescription.hemoperfusion = val.selectId;
  497. } else {
  498. this.dialysisPrescription.hemoperfusion = 0;
  499. }
  500. break;
  501. case 6:
  502. if (val.selectId != -2) {
  503. this.dialysisPrescription.dialyser_sterilised = val.selectId;
  504. } else {
  505. this.dialysisPrescription.dialyser_sterilised = 0;
  506. }
  507. break;
  508. case 7:
  509. if (val.selectId != -2) {
  510. this.dialysisPrescription.filtryzer = val.selectId;
  511. } else {
  512. this.dialysisPrescription.filtryzer = 0;
  513. }
  514. break;
  515. case 8:
  516. if (val.selectId != -2) {
  517. this.dialysisPrescription.dialyzers = val.selectId;
  518. } else {
  519. this.dialysisPrescription.dialyzers = 0;
  520. }
  521. break;
  522. case 9:
  523. if (val.selectId != -2) {
  524. this.dialysisPrescription.injector = val.selectId;
  525. } else {
  526. this.dialysisPrescription.injector = 0;
  527. }
  528. break;
  529. case 10:
  530. if (val.selectId != -2) {
  531. this.dialysisPrescription.bloodlines = val.selectId;
  532. } else {
  533. this.dialysisPrescription.bloodlines = 0;
  534. }
  535. break;
  536. case 11:
  537. if (val.selectId != -2) {
  538. this.dialysisPrescription.tubing_hemodialysis = val.selectId;
  539. } else {
  540. this.dialysisPrescription.tubing_hemodialysis = 0;
  541. }
  542. break;
  543. case 12:
  544. if (val.selectId != -2) {
  545. this.dialysisPrescription.package = val.selectId;
  546. } else {
  547. this.dialysisPrescription.package = 0;
  548. }
  549. break;
  550. case 13:
  551. if (val.selectId != -2) {
  552. this.dialysisPrescription.a_liquid = val.selectId;
  553. } else {
  554. this.dialysisPrescription.a_liquid = 0;
  555. }
  556. break;
  557. }
  558. },
  559. isShow(name) {
  560. var filedList = this.$store.getters.user.fileds;
  561. for (let i = 0; i < filedList.length; i++) {
  562. if (
  563. filedList[i].module == 1 &&
  564. filedList[i].filed_name_cn == name &&
  565. filedList[i].is_show == 1
  566. ) {
  567. return true;
  568. }
  569. }
  570. return false;
  571. }
  572. }
  573. };
  574. </script>
  575. <style style="stylesheet/scss" scoped>
  576. .DialogContent {
  577. /* padding-bottom:2rem !important; */
  578. .textarea {
  579. width: 100%;
  580. height: 2.4rem;
  581. line-height: 0.6rem;
  582. color: $pgh-color;
  583. font-size: 0.28rem;
  584. padding-left: 0.36rem;
  585. border: none;
  586. border-bottom: 1px #e5e5e5 solid;
  587. }
  588. }
  589. </style>