123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626 |
- <template>
- <div>
- <div v-if="visibility" class="Dialog">
- <div class="DialogTit">
- <span class="iconfont" @click="closeDialog()"> 返回</span>
- <h1 class="name">透析耗材</h1>
- <span class="success" @click="success()">完成</span>
- </div>
- <div class="DialogContent" id="dialogTop">
- <div
- class="item"
- value="item"
- @click="itemClick(1, 'niprocart')"
- ref="niprocart"
- v-if="isShow('血液透析干粉')"
- >
- <label class="name">血液透析干粉</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.niprocart)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
- <div
- class="item"
- value="item"
- @click="itemClick(2, 'jms')"
- ref="jms"
- v-if="isShow('一次性使用动静脉穿刺针')"
- >
- <label class="name">一次性使用动静脉穿刺针</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.jms)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
- <div
- class="item"
- value="item"
- @click="itemClick(3, 'fistula_needle_set')"
- ref="fistula_needle_set"
- v-if="isShow('内瘘管翼状针')"
- >
- <label class="name">内瘘管翼状针</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.fistula_needle_set)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
- <div
- class="item"
- value="item"
- @click="itemClick(4, 'fistula_needle_set_16')"
- ref="fistula_needle_set_16"
- v-if="isShow('内瘘管翼状针16G')"
- >
- <label class="name">内瘘管翼状针16G</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.fistula_needle_set_16)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
- <div
- class="item"
- value="item"
- @click="itemClick(5, 'hemoperfusion')"
- ref="hemoperfusion"
- v-if="isShow('一次性使用血液灌流器')"
- >
- <label class="name">一次性使用血液灌流器</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.hemoperfusion)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
- <div
- class="item"
- value="item"
- @click="itemClick(6, 'dialyser_sterilised')"
- ref="dialyser_sterilised"
- v-if="isShow('空心纤维血液透析器')"
- >
- <label class="name">空心纤维血液透析器</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.dialyser_sterilised)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
- <div
- class="item"
- value="item"
- @click="itemClick(7, 'filtryzer')"
- ref="filtryzer"
- v-if="isShow('中空纤维透析器')"
- >
- <label class="name">中空纤维透析器</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.filtryzer)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
-
- <div
- class="item"
- value="item"
- @click="itemClick(8, 'dialyzers')"
- ref="dialyzers"
- v-if="isShow('透析器')"
- >
- <label class="name">透析器</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.dialyzers)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
-
- <div
- class="item"
- value="item"
- @click="itemClick(9, 'injector')"
- ref="injector"
- v-if="isShow('注射器')"
- >
- <label class="name">注射器</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.injector)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
-
- <div
- class="item"
- value="item"
- @click="itemClick(10, 'bloodlines')"
- ref="bloodlines"
- v-if="isShow('体外循环血路管')"
- >
- <label class="name">体外循环血路管</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.bloodlines)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
-
- <div
- class="item"
- value="item"
- @click="itemClick(11, 'tubing_hemodialysis')"
- ref="tubing_hemodialysis"
- v-if="isShow('血液净化补液管路(置换管)')"
- >
- <label class="name">血液净化补液管路(置换管)</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.tubing_hemodialysis)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
-
- <div
- class="item"
- value="item"
- @click="itemClick(12, 'package')"
- ref="package"
- v-if="isShow('护理包')"
- >
- <label class="name">护理包</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.package)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
-
- <div
- class="item"
- value="item"
- @click="itemClick(13, 'a_liquid')"
- ref="a_liquid"
- v-if="isShow('A液')"
- >
- <label class="name">A液</label>
- <div class="content">
- <span class="text" id="knjaa">{{
- getValue(this.dialysisPrescription.a_liquid)
- }}</span>
- <span class="iconfont"></span>
- </div>
- </div>
- </div>
- </div>
- <new-check-box-sub-menu
- :show="is_show"
- v-on:menu-cancle="menuCancle"
- v-on:menu-comfirm="menuComfirm"
- v-on:menu-empty="menuEmpty"
- :propsForm="propForm"
- ></new-check-box-sub-menu>
- </div>
- </template>
-
- <script>
- import { getWarehouseGoodInfo } from "@/api/stock";
-
- import NewCheckBoxSubMenu from "./newCheckBoxSubMenu";
-
- export default {
- name: "multipleSubMenu",
- components: { NewCheckBoxSubMenu },
- data() {
- return {
- is_show: false,
- propForm: {
- title: "",
- list: [],
- optionList: [],
- isMultiple: 2,
- result: [], //选中的值
- type: 1, //用来区分不同子菜单,方便对返回值进行赋值
- selectId: 0
- }
- };
- },
-
- props: {
- dialysisPrescription: {
- type: Object
- },
- info: {
- type: Array,
- default: function() {
- return new Array();
- }
- },
- visibility: {
- type: Boolean,
- default: false
- }
- },
- methods: {
- success: function() {
- this.$emit("menu-comfirm-two", this.dialysisPrescription);
- },
- closeDialog() {
- this.$emit("menu-cancel-two");
- },
- itemClick(type, name) {
- getWarehouseGoodInfo(type).then(response => {
- if (response.data.state == 0) {
- Toast.fail(response.data.msg);
- return false;
- } else {
- var goodInfoArray = [];
- for (let i = 0; i < response.data.data.list.length; i++) {
- let obj = {};
- obj["id"] = response.data.data.list[i].GoodInfo.id;
- obj["name"] =
- response.data.data.list[i].GoodInfo.specification_name;
- goodInfoArray.push(obj);
- }
- const obj = {};
- // 去重复
- goodInfoArray = goodInfoArray.reduce((cur, next) => {
- obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
- return cur;
- }, []);
-
- switch (name) {
- case "niprocart":
- this.propForm.type = 1;
- this.propForm.title = "血液透析干粉";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.niprocart;
- this.propForm.click_ref = "niprocart";
- this.is_show = true;
- this.visibility = false;
-
- break;
- case "jms":
- this.propForm.type = 2;
- this.propForm.title = "一次性使用动静脉穿刺针";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.jms;
- this.propForm.click_ref = "jms";
- this.is_show = true;
- this.visibility = false;
-
- break;
-
- case "fistula_needle_set":
- this.propForm.type = 3;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "内瘘管翼状针";
-
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.fistula_needle_set;
- this.propForm.click_ref = "perfusion_apparatus";
-
- break;
- case "fistula_needle_set_16":
- this.propForm.type = 4;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "内瘘管翼状针16G";
-
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.fistula_needle_set_16;
- this.propForm.click_ref = "fistula_needle_set_16";
-
- break;
-
- case "hemoperfusion":
- this.propForm.type = 5;
-
- this.propForm.title = "一次性使用血液灌流器";
- this.is_show = true;
- this.visibility = false;
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.hemoperfusion;
- this.propForm.click_ref = "hemoperfusion";
- break;
- case "dialyser_sterilised":
- this.propForm.type = 6;
-
- this.propForm.title = "空心纤维血液透析器";
- this.is_show = true;
- this.visibility = false;
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.dialyser_sterilised;
- this.propForm.click_ref = "dialyser_sterilised";
- break;
- case "filtryzer":
- this.propForm.type = 7;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "中空纤维透析器";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.filtryzer;
- this.propForm.click_ref = "filtryzer";
- break;
-
- case "dialyzers":
- this.propForm.type = 8;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "透析器";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.dialyzers;
- this.propForm.click_ref = "dialyzers";
- break;
-
- case "injector":
- this.propForm.type = 9;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "注射器";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.injector;
- this.propForm.click_ref = "injector";
- break;
-
- case "bloodlines":
- this.propForm.type = 10;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "体外循环血路管";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.bloodlines;
- this.propForm.click_ref = "bloodlines";
- break;
-
- case "tubing_hemodialysis":
- this.propForm.type = 11;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "血液净化补液管路(置换管)";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.tubing_hemodialysis;
- this.propForm.click_ref = "tubing_hemodialysis";
- break;
-
- case "package":
- this.propForm.type = 12;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "护理包";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.package;
- this.propForm.click_ref = "package";
- break;
-
- case "a_liquid":
- this.propForm.type = 13;
- this.is_show = true;
- this.visibility = false;
- this.propForm.title = "A液";
- this.propForm.list = [];
- this.propForm.optionList = [];
- this.propForm.optionList = goodInfoArray;
- this.propForm.isMultiple = 1;
- this.propForm.selectId = this.dialysisPrescription.a_liquid;
- this.propForm.click_ref = "a_liquid";
- break;
- }
- }
- });
- },
- getValue(id) {
- if (id == 0 || id == "") {
- return "";
- }
- for (let i = 0; i < this.info.length; i++) {
- if (this.info[i].id == id) {
- return this.info[i].specification_name;
- }
- }
- },
- menuCancle: function() {
- this.is_show = false;
- this.visibility = true;
- },
- menuComfirm: function(val) {
- console.log(val);
- this.is_show = false;
- this.visibility = true;
- this.$nextTick(() => {
- if (
- this.$refs[this.propForm.click_ref] != undefined &&
- this.$refs[this.propForm.click_ref] != null
- ) {
- this.$refs[this.propForm.click_ref].scrollIntoView();
- }
- });
- switch (val.type) {
- case 1:
- if (val.selectId != -2) {
- this.dialysisPrescription.niprocart = val.selectId;
- } else {
- this.dialysisPrescription.niprocart = 0;
- }
- break;
- case 2:
- if (val.selectId != -2) {
- this.dialysisPrescription.jms = val.selectId;
- } else {
- this.dialysisPrescription.jms = 0;
- }
- break;
- case 3:
- if (val.selectId != -2) {
- this.dialysisPrescription.fistula_needle_set = val.selectId;
- } else {
- this.dialysisPrescription.fistula_needle_set = 0;
- }
- break;
- case 4:
- if (val.selectId != -2) {
- this.dialysisPrescription.fistula_needle_set_16 = val.selectId;
- } else {
- this.dialysisPrescription.fistula_needle_set_16 = 0;
- }
- break;
- case 5:
- if (val.selectId != -2) {
- this.dialysisPrescription.hemoperfusion = val.selectId;
- } else {
- this.dialysisPrescription.hemoperfusion = 0;
- }
- break;
- case 6:
- if (val.selectId != -2) {
- this.dialysisPrescription.dialyser_sterilised = val.selectId;
- } else {
- this.dialysisPrescription.dialyser_sterilised = 0;
- }
- break;
- case 7:
- if (val.selectId != -2) {
- this.dialysisPrescription.filtryzer = val.selectId;
- } else {
- this.dialysisPrescription.filtryzer = 0;
- }
- break;
-
- case 8:
- if (val.selectId != -2) {
- this.dialysisPrescription.dialyzers = val.selectId;
- } else {
- this.dialysisPrescription.dialyzers = 0;
- }
- break;
-
- case 9:
- if (val.selectId != -2) {
- this.dialysisPrescription.injector = val.selectId;
- } else {
- this.dialysisPrescription.injector = 0;
- }
- break;
-
- case 10:
- if (val.selectId != -2) {
- this.dialysisPrescription.bloodlines = val.selectId;
- } else {
- this.dialysisPrescription.bloodlines = 0;
- }
- break;
-
- case 11:
- if (val.selectId != -2) {
- this.dialysisPrescription.tubing_hemodialysis = val.selectId;
- } else {
- this.dialysisPrescription.tubing_hemodialysis = 0;
- }
- break;
-
- case 12:
- if (val.selectId != -2) {
- this.dialysisPrescription.package = val.selectId;
- } else {
- this.dialysisPrescription.package = 0;
- }
- break;
-
- case 13:
- if (val.selectId != -2) {
- this.dialysisPrescription.a_liquid = val.selectId;
- } else {
- this.dialysisPrescription.a_liquid = 0;
- }
- break;
- }
- },
- isShow(name) {
- var filedList = this.$store.getters.user.fileds;
-
- for (let i = 0; i < filedList.length; i++) {
- if (
- filedList[i].module == 1 &&
- filedList[i].filed_name_cn == name &&
- filedList[i].is_show == 1
- ) {
- return true;
- }
- }
- return false;
- }
- }
- };
- </script>
-
- <style style="stylesheet/scss" scoped>
- .DialogContent {
- /* padding-bottom:2rem !important; */
-
- .textarea {
- width: 100%;
- height: 2.4rem;
- line-height: 0.6rem;
- color: $pgh-color;
- font-size: 0.28rem;
- padding-left: 0.36rem;
- border: none;
- border-bottom: 1px #e5e5e5 solid;
- }
- }
- </style>
|