Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

PatientDispensing.vue 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834
  1. <template>
  2. <!--患者发药-->
  3. <div class="main-contain new-main-contain">
  4. <div class="position">
  5. <!-- <bread-crumb :crumbs='crumbs'></bread-crumb>-->
  6. <bread-crumb :crumbs="crumbs"></bread-crumb>
  7. </div>
  8. <div
  9. class="app-container"
  10. style="display: flex; flex: 1; padding: 10px 20px 0px 20px"
  11. >
  12. <div class="mainLeft">
  13. <div>
  14. <div class="list">
  15. <el-date-picker
  16. style="width: 200px"
  17. v-model="start_time"
  18. type="date"
  19. format="yyyy-MM-dd"
  20. value-format="yyyy-MM-dd"
  21. placeholder="选择日期"
  22. @change="changeTimes()"
  23. >
  24. </el-date-picker>
  25. </div>
  26. <!-- <el-button @click="testsss">调试1</el-button>-->
  27. <!-- <el-button @click="testsss2">调试2</el-button>-->
  28. <div class="list">
  29. <el-radio-group v-model="state" @change="lala()">
  30. <el-radio :label="1">待发药{{ waitmount }}人</el-radio>
  31. <el-radio :label="2">已发药{{ alreadmount }}人</el-radio>
  32. </el-radio-group>
  33. </div>
  34. <div
  35. class="list"
  36. style="display: flex; justify-content: space-between"
  37. >
  38. <el-input
  39. size="small"
  40. style="width: 130px"
  41. v-model="keywords"
  42. class="filter-item"
  43. placeholder="请输入患者名称"
  44. clearable
  45. />
  46. <el-button
  47. size="small"
  48. class="filter-item"
  49. type="primary"
  50. @click="searchAction"
  51. >搜索
  52. </el-button>
  53. </div>
  54. <el-table
  55. height="60vh"
  56. ref="table01"
  57. :data="waitmount_data"
  58. highlight-current-row
  59. @current-change="handleCurrentChange"
  60. border
  61. style="width: 100%"
  62. v-if="state == 1"
  63. :row-style="{ color: '#303133' }"
  64. :header-cell-style="{
  65. backgroundColor: 'rgb(245, 247, 250)',
  66. color: '#606266',
  67. }"
  68. >
  69. <el-table-column prop="date" label="患者姓名" width="100">
  70. <template slot-scope="scope">
  71. <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column prop="name" label="透析号" width="100">
  75. <template slot-scope="scope">
  76. <span>{{
  77. scope.row.DialysisNo ? scope.row.DialysisNo : ""
  78. }}</span>
  79. </template>
  80. </el-table-column>
  81. </el-table>
  82. <el-table
  83. :height="tableHeight"
  84. ref="table02"
  85. :data="alreadmount_data"
  86. highlight-current-row
  87. @current-change="handleCurrentChange"
  88. border
  89. :row-style="{ color: '#303133' }"
  90. :header-cell-style="{
  91. backgroundColor: 'rgb(245, 247, 250)',
  92. color: '#606266',
  93. }"
  94. style="width: 100%"
  95. v-if="state == 2"
  96. >
  97. <el-table-column prop="date" label="患者姓名" width="100">
  98. <template slot-scope="scope">
  99. <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
  100. </template>
  101. </el-table-column>
  102. <el-table-column prop="name" label="透析号" width="100">
  103. <template slot-scope="scope">
  104. <span>{{
  105. scope.row.DialysisNo ? scope.row.DialysisNo : ""
  106. }}</span>
  107. </template>
  108. </el-table-column>
  109. </el-table>
  110. </div>
  111. </div>
  112. <div class="mainRight">
  113. <div class="titlelist">
  114. <div>
  115. 班次:
  116. <el-select
  117. v-model="shift"
  118. placeholder="请选择"
  119. @change="searchAction"
  120. >
  121. <el-option
  122. v-for="item in banshift"
  123. :key="item.value"
  124. :label="item.text"
  125. :value="item.value"
  126. >
  127. </el-option>
  128. </el-select>
  129. 分区:
  130. <el-select
  131. v-model="partition"
  132. placeholder="请选择"
  133. @change="searchAction"
  134. >
  135. <el-option
  136. v-for="item in fen"
  137. :key="item.id"
  138. :label="item.name"
  139. :value="item.id"
  140. >
  141. </el-option>
  142. </el-select>
  143. </div>
  144. <div>
  145. <el-button type="primary" @click="toExport" v-if="state == 2"
  146. >导出</el-button
  147. >
  148. <el-button type="primary" @click="dispense" v-if="state == 1"
  149. >发药</el-button
  150. >
  151. <el-button type="primary" @click="endispense" v-if="state == 2"
  152. >退药</el-button
  153. >
  154. <el-button type="primary" @click="toPrint">打印</el-button>
  155. <!-- <el-button @click="tiaoshi">调试</el-button>-->
  156. <el-button type="primary" v-if="state == 1" @click="toSetting"
  157. >设置</el-button
  158. >
  159. </div>
  160. </div>
  161. <el-divider style="margin-top: 10px"></el-divider>
  162. <div>
  163. <el-table
  164. :height="tableHeight"
  165. :data="tableData"
  166. border
  167. style="width: 100%"
  168. :row-style="{ color: '#303133' }"
  169. :header-cell-style="{
  170. backgroundColor: 'rgb(245, 247, 250)',
  171. color: '#606266',
  172. }"
  173. >
  174. <el-table-column
  175. type="index"
  176. label="序号"
  177. width="120"
  178. align="center"
  179. >
  180. </el-table-column>
  181. <el-table-column label="名称" width="200" align="center">
  182. <template slot-scope="scope">
  183. <span>{{ scope.row.Name ? scope.row.Name : "" }}</span>
  184. </template>
  185. </el-table-column>
  186. <el-table-column label="单次用量" width="150" align="center">
  187. <template slot-scope="scope">
  188. <span>{{
  189. scope.row.SingleDosage ? scope.row.SingleDosage : ""
  190. }}</span>
  191. </template>
  192. </el-table-column>
  193. <el-table-column label="用法" width="160" align="center">
  194. <template slot-scope="scope">
  195. <span>{{ scope.row.Usage ? scope.row.Usage : "" }}</span>
  196. </template>
  197. </el-table-column>
  198. <el-table-column label="频率" width="160" align="center">
  199. <template slot-scope="scope">
  200. <span>{{
  201. scope.row.Frequency ? scope.row.Frequency : ""
  202. }}</span>
  203. </template>
  204. </el-table-column>
  205. <el-table-column label="天数" width="140" align="center">
  206. <template slot-scope="scope">
  207. <span>{{ scope.row.Days ? scope.row.Days : "" }}</span>
  208. </template>
  209. </el-table-column>
  210. <el-table-column label="总量" width="140" align="center">
  211. <template slot-scope="scope">
  212. <span>{{ scope.row.Total ? scope.row.Total : "" }}</span>
  213. </template>
  214. </el-table-column>
  215. <el-table-column label="生产厂商" width="140" align="center">
  216. <template slot-scope="scope">
  217. <span>{{ getManutuer(scope.row.DrugId) }}</span>
  218. </template>
  219. </el-table-column>
  220. <el-table-column label="开立医生" width="150" align="center">
  221. <template slot-scope="scope">
  222. <span>{{ scope.row.Doctor ? scope.row.Doctor : "" }}</span>
  223. </template>
  224. </el-table-column>
  225. <el-table-column label="数据来源" width="162" align="center">
  226. <template slot-scope="scope">
  227. <span>{{
  228. scope.row.DataSources ? scope.row.DataSources : ""
  229. }}</span>
  230. </template>
  231. </el-table-column>
  232. <el-table-column label="国家编码" width="162" align="center">
  233. <template slot-scope="scope">
  234. <span>{{getDrugName(scope.row.DrugId)}}</span>
  235. </template>
  236. </el-table-column>
  237. <el-table-column label="备注" width="170" align="center">
  238. <template slot-scope="scope">
  239. <span>{{ scope.row.Remarks ? scope.row.Remarks : "" }}</span>
  240. </template>
  241. </el-table-column>
  242. </el-table>
  243. </div>
  244. <!-- <div v-if="state == 2" style="margin-top: 25px">诊断时间:{{ timedate }}</div>-->
  245. </div>
  246. <el-dialog title="设置" :visible.sync="dialogVisible" width="30%">
  247. <span style="font-size: 17px">请选择药品是否要通过药房管理出库</span>
  248. <span style="display: block; padding: 18px 25px">
  249. <el-radio v-model="is_open" label="1">是</el-radio>
  250. <el-radio v-model="is_open" label="2">否</el-radio>
  251. </span>
  252. <div
  253. style="
  254. height: 50px;
  255. background: #c7ebfc;
  256. border-radius: 5px;
  257. padding: 7px;
  258. "
  259. >
  260. <i class="el-icon-info" style="color: #3399ff; font-size: 17px"></i>
  261. 若选择为是,则通过药房发药的药品都会在发药之后进行出库,否则按原来的方式进行出库管理
  262. </div>
  263. <span slot="footer" class="dialog-footer">
  264. <el-button @click="dialogVisible = false">取 消</el-button>
  265. <el-button type="primary" @click="SaveSetting">保 存</el-button>
  266. </span>
  267. </el-dialog>
  268. </div>
  269. <patient-print
  270. ref="patientprint"
  271. :visibility="isVisibility"
  272. :propsTable="propsTable"
  273. >
  274. </patient-print>
  275. </div>
  276. </template>
  277. <script>
  278. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  279. import patientPrint from "./print/patientPrint.vue";
  280. import { getPharmacyConfig, SaveSetting } from "@/api/his/advice";
  281. import {
  282. waitingdrug,
  283. issueddrugs,
  284. todaynumber,
  285. getpharmacycontent,
  286. dispensingmedicine,
  287. drugwithdrawal,
  288. getpartitionlist,
  289. } from "@/api/pharmacy";
  290. const moment = require("moment");
  291. export default {
  292. components: {
  293. BreadCrumb,
  294. patientPrint,
  295. },
  296. data() {
  297. return {
  298. patient_id: 0,
  299. crumbs: [
  300. { path: false, name: "药房管理" },
  301. { path: "/Pharmacy/patiantDispensing", name: "患者发药" },
  302. ],
  303. tableHeight: 400,
  304. start_time: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
  305. state: 1, //1待发药,2已发药
  306. waitmount: 0, //待发药人数
  307. waitmount_data: [],
  308. alreadmount: 0, //已发药人数
  309. alreadmount_data: [],
  310. keywords: "",
  311. tableData: [],
  312. propsTable: [],
  313. tableData_list: [],
  314. isVisibility: false,
  315. currentRow: null,
  316. dialogVisible: false,
  317. is_open: "2",
  318. banshift: [
  319. { value: 0, text: "全部班" },
  320. { value: 1, text: "上午" },
  321. { value: 2, text: "下午" },
  322. { value: 3, text: "晚上" },
  323. ],
  324. shift: 0, //班次
  325. fen: [],
  326. partition: 0, //分区
  327. drugList:[],
  328. baseList:[],
  329. };
  330. },
  331. watch: {},
  332. created() {
  333. this.init();
  334. this.gettodaynumber();
  335. this.fun3();
  336. this.getgetpartitionlist();
  337. // this.getwaitmount();//fun3
  338. // this.selectedbydefault();
  339. },
  340. methods: {
  341. getgetpartitionlist() {
  342. var params = {};
  343. getpartitionlist(params).then((res) => {
  344. if (res.data.state == 1) {
  345. this.fen = res.data.data.list;
  346. }
  347. });
  348. },
  349. tiaoshi() {
  350. console.log("this.shift", this.shift);
  351. console.log("this.partition", this.partition);
  352. console.log("this.waitmount_data", this.waitmount_data);
  353. console.log("this.alreadmount_data", this.alreadmount_data);
  354. console.log("this.waitmount", this.waitmount);
  355. console.log("this.alreadmount", this.alreadmount);
  356. },
  357. async fun3() {
  358. console.log("fun3");
  359. this.fun1().then((val) => {
  360. this.fun2();
  361. });
  362. },
  363. async fun4(tmp) {
  364. console.log("fun3");
  365. this.fun1().then((val) => {
  366. console.log("this.alreadmount_data", this.alreadmount_data);
  367. for (let i = 0; i < this.alreadmount_data.length; i++) {
  368. console.log("tmp = ", tmp);
  369. if (this.alreadmount_data[i].PatientID == tmp) {
  370. console.log("i = ", i);
  371. this.$refs.table02.setCurrentRow(this.alreadmount_data[i]);
  372. this.handleCurrentChange(this.alreadmount_data[i]);
  373. }
  374. }
  375. });
  376. },
  377. async fun5(tmp) {
  378. console.log("fun5555");
  379. this.fun1().then((val) => {
  380. console.log("this.alreadmount_data", this.waitmount_data);
  381. for (let i = 0; i < this.waitmount_data.length; i++) {
  382. console.log("tmp = ", tmp);
  383. if (this.waitmount_data[i].PatientID == tmp) {
  384. console.log("i = ", i);
  385. this.$refs.table01.setCurrentRow(this.waitmount_data[i]);
  386. this.handleCurrentChange(this.waitmount_data[i]);
  387. }
  388. }
  389. });
  390. },
  391. lala() {
  392. console.log("this.state!!!!!!", this.state);
  393. //初始化状态
  394. this.tableData = null;
  395. this.currentRow = null;
  396. this.selectedbydefault();
  397. },
  398. //选中行数
  399. handleCurrentChange(val) {
  400. this.currentRow = val;
  401. console.log("this.currentRow", this.currentRow);
  402. if (this.state == 1) {
  403. this.getpatientdetails(0);
  404. }
  405. if (this.state == 2) {
  406. this.getpatientdetails(1);
  407. }
  408. },
  409. init() {
  410. // console.log("初始化了")
  411. this.state = 1;
  412. this.tableData = null;
  413. this.currentRow = null;
  414. this.partition = 0;
  415. this.shift = 0;
  416. },
  417. testsss() {
  418. this.state = 1;
  419. },
  420. //默认选中的
  421. selectedbydefault() {
  422. if (this.state == 1 && this.waitmount_data.length > 0) {
  423. this.$refs.table01.setCurrentRow(this.waitmount_data[0]);
  424. this.handleCurrentChange(this.waitmount_data[0]);
  425. }
  426. if (this.state == 2 && this.alreadmount_data.length > 0) {
  427. this.$refs.table02.setCurrentRow(this.alreadmount_data[0]);
  428. this.handleCurrentChange(this.alreadmount_data[0]);
  429. }
  430. },
  431. //包装selectedbydefault
  432. fun2() {
  433. console.log("3333333this.waitmount_data", this.waitmount_data);
  434. // return new Promise((resolve, reject) => {
  435. if (this.state == 1 && this.waitmount_data.length > 0) {
  436. this.$refs.table01.setCurrentRow(this.waitmount_data[0]);
  437. this.handleCurrentChange(this.waitmount_data[0]);
  438. }
  439. if (this.state == 2 && this.alreadmount_data.length > 0) {
  440. this.$refs.table02.setCurrentRow(this.alreadmount_data[0]);
  441. this.handleCurrentChange(this.alreadmount_data[0]);
  442. }
  443. // });
  444. },
  445. changeTimes() {
  446. this.gettodaynumber();
  447. this.getwaitmount();
  448. this.fun3();
  449. },
  450. //获取当天发药的人数
  451. gettodaynumber() {
  452. console.log("aaa");
  453. var params = {
  454. time: this.start_time,
  455. };
  456. todaynumber(params).then((res) => {
  457. if (res.data.state == 1) {
  458. this.waitmount = res.data.data.itotal;
  459. this.alreadmount = res.data.data.wtotal;
  460. this.drugList = res.data.data.drug
  461. }
  462. });
  463. // console.log("2222222")
  464. },
  465. //获取发药人列表
  466. getwaitmount() {
  467. var params = {
  468. keyword: this.keywords,
  469. time: this.start_time,
  470. shift: this.shift,
  471. partition: this.partition,
  472. };
  473. console.log("班次---------------------",params)
  474. waitingdrug(params).then((res) => {
  475. if (res.data.state == 1) {
  476. this.waitmount_data = res.data.data.list;
  477. this.baseList =[]
  478. this.baseList = res.data.data.baseList
  479. if (this.shift != 0 || this.partition != 0) {
  480. if (this.waitmount_data == null) {
  481. this.waitmount = 0;
  482. } else {
  483. this.waitmount = this.waitmount_data.length;
  484. }
  485. }
  486. }
  487. });
  488. issueddrugs(params).then((res) => {
  489. if (res.data.state == 1) {
  490. this.alreadmount_data = res.data.data.list;
  491. if (this.shift != 0 || this.partition != 0) {
  492. if (this.alreadmount_data == null) {
  493. this.alreadmount = 0;
  494. } else {
  495. this.alreadmount = this.alreadmount_data.length;
  496. }
  497. }
  498. }
  499. });
  500. },
  501. //包装getwaitmount
  502. async fun1() {
  503. // return new Promise((resolve, reject) => {
  504. var params = {
  505. keyword: this.keywords,
  506. time: this.start_time,
  507. shift: this.shift,
  508. partition: this.partition,
  509. };
  510. await waitingdrug(params).then((res) => {
  511. if (res.data.state == 1) {
  512. this.waitmount_data = res.data.data.list;
  513. console.log("1111111");
  514. }
  515. });
  516. await issueddrugs(params).then((res) => {
  517. if (res.data.state == 1) {
  518. this.alreadmount_data = res.data.data.list;
  519. console.log("1111111s");
  520. }
  521. });
  522. console.log("222222222");
  523. // })
  524. },
  525. //获取患者信息详情
  526. getpatientdetails(val) {
  527. console.log("val2332323223",this.currentRow)
  528. var params = {
  529. patient_id: this.currentRow.PatientID,
  530. is_medicine: val,
  531. time: this.start_time,
  532. };
  533. getpharmacycontent(params).then((res) => {
  534. if (res.data.state == 1) {
  535. var list = res.data.data.list;
  536. console.log("hhhhawoowowow",list)
  537. this.baseList =[]
  538. this.baseList = res.data.data.baseList
  539. if(this.$store.getters.xt_user.org.id == 10188 || this.$store.getters.xt_user.org.id == 10217 || this.$store.getters.xt_user.org.id == 10387 || this.$store.getters.xt_user.org.id == 0 || this.$store.getters.xt_user.org.id == 10480 ){
  540. this.tableData = []
  541. if(list!=null && list.length >0){
  542. for(let i=0;i<list.length;i++){
  543. if(list[i].DataSources != "临时医嘱"){
  544. this.tableData.push(list[i])
  545. }
  546. }
  547. }
  548. }
  549. if(this.$store.getters.xt_user.org.id != 10188 && this.$store.getters.xt_user.org.id != 10217 && this.$store.getters.xt_user.org.id != 10387 && this.$store.getters.xt_user.org.id != 0 && this.$store.getters.xt_user.org.id != 10480 ){
  550. this.tableData = []
  551. this.tableData = list
  552. }
  553. } else {
  554. this.$message.error(res.data.msg);
  555. }
  556. });
  557. },
  558. // 跳转打印页面
  559. toPrint() {
  560. if (this.tableData == null) {
  561. this.$message.error("未选择任何数据");
  562. return;
  563. }
  564. this.$refs.patientprint.show(
  565. this.tableData,
  566. this.currentRow,
  567. this.state,
  568. this.start_time
  569. );
  570. },
  571. toExport() {
  572. import("@/vendor/Export2Excel").then((excel) => {
  573. for (let i = 0; i < this.tableData.length; i++) {
  574. this.tableData[i].index = i + 1;
  575. this.tableData[i].time = this.start_time;
  576. this.tableData[i].uname = this.currentRow.Name;
  577. }
  578. const tHeader = [
  579. "序号",
  580. "日期",
  581. "患者名称",
  582. "名称",
  583. "单次用量",
  584. "用法",
  585. "频率",
  586. "天数",
  587. "总量",
  588. "开立医生",
  589. "数据来源",
  590. "备注",
  591. ];
  592. const filterVal = [
  593. "index",
  594. "time",
  595. "uname",
  596. "Name",
  597. "SingleDosage",
  598. "Usage",
  599. "Frequency",
  600. "Days",
  601. "Total",
  602. "Doctor",
  603. "DataSources",
  604. "Remarks",
  605. ];
  606. const data = this.formatJson(filterVal, this.tableData);
  607. excel.export_json_to_excel({
  608. header: tHeader,
  609. data,
  610. filename: "领药单",
  611. });
  612. this.downloadLoading = false;
  613. });
  614. },
  615. formatJson(filterVal, jsonData) {
  616. return jsonData.map((v) => filterVal.map((j) => v[j]));
  617. },
  618. // 搜索患者
  619. searchAction() {
  620. this.tableData = null;
  621. this.getwaitmount();
  622. if (this.shift != 0 || this.partition != 0) {
  623. } else {
  624. this.gettodaynumber();
  625. }
  626. },
  627. // 药品发药
  628. dispense() {
  629. var tmp = this.currentRow.PatientID;
  630. var params = {
  631. patient_id: this.currentRow.PatientID,
  632. time: this.start_time,
  633. };
  634. this.$confirm("确定是否对该患者进行发药?", "患者发药", {
  635. confirmButtonText: "确 定",
  636. cancelButtonText: "取 消",
  637. type: "warning",
  638. })
  639. .then(() => {
  640. dispensingmedicine(params).then((res) => {
  641. if (res.data.state == 1) {
  642. this.$message.success("操作成功");
  643. this.gettodaynumber();
  644. this.searchAction();
  645. this.tableData = null;
  646. this.fun4(tmp);
  647. this.state = 2;
  648. // console.log("this.alreadmount_data",this.alreadmount_data)
  649. // for (let i = 0;i < this.alreadmount_data.length;i++){
  650. // console.log("tmp = ",tmp)
  651. // if (this.alreadmount_data[i].PatientID == tmp){
  652. // console.log("i = ",i)
  653. // this.$refs.table02.setCurrentRow(this.alreadmount_data[i]);
  654. // this.handleCurrentChange(this.alreadmount_data[i])
  655. // }
  656. // }
  657. } else {
  658. this.$message.error(res.data.msg);
  659. }
  660. });
  661. })
  662. .catch(() => {});
  663. },
  664. toSetting() {
  665. getPharmacyConfig().then((response) => {
  666. if (response.data.state == 1) {
  667. this.dialogVisible = true;
  668. var config = response.data.data.config;
  669. this.is_open = config.is_open.toString();
  670. }
  671. });
  672. },
  673. SaveSetting() {
  674. var params = {
  675. is_open: parseInt(this.is_open),
  676. };
  677. SaveSetting(params).then((response) => {
  678. if (response.data.state == 1) {
  679. var config = response.data.data.config;
  680. this.$message.success("保存成功!");
  681. this.dialogVisible = false;
  682. }
  683. });
  684. },
  685. // 药品退药
  686. endispense() {
  687. var tmp = this.currentRow.PatientID;
  688. var params = {
  689. patient_id: this.currentRow.PatientID,
  690. time: this.start_time,
  691. };
  692. this.$confirm("确定是否对该患者进行退药?", "患者退药", {
  693. confirmButtonText: "确 定",
  694. cancelButtonText: "取 消",
  695. type: "warning",
  696. })
  697. .then(() => {
  698. drugwithdrawal(params).then((res) => {
  699. if (res.data.state == 1) {
  700. this.$message.success("操作成功");
  701. this.gettodaynumber();
  702. this.searchAction();
  703. this.tableData = null;
  704. this.fun5(tmp);
  705. this.state = 1;
  706. } else {
  707. this.$message.error(res.data.msg);
  708. }
  709. });
  710. })
  711. .catch(() => {});
  712. },
  713. getDrugName(drug_id){
  714. var medical_insurance_number = ""
  715. for(let i=0;i<this.drugList.length;i++){
  716. if(drug_id == this.drugList[i].id){
  717. medical_insurance_number = this.drugList[i].medical_insurance_number
  718. }
  719. }
  720. return medical_insurance_number
  721. },
  722. getManutuer(drug_id){
  723. var manufacturer_name = ""
  724. for(let i=0;i<this.baseList.length;i++){
  725. if(drug_id == this.baseList[i].id){
  726. manufacturer_name = this.baseList[i].manufacturer_name
  727. }
  728. }
  729. return manufacturer_name
  730. }
  731. },
  732. };
  733. </script>
  734. <style rel="stylesheet/css" lang="scss" scoped>
  735. .new-main-contain {
  736. height: 100%;
  737. display: flex;
  738. flex-direction: column;
  739. }
  740. .app-container {
  741. height: 100%;
  742. }
  743. .mainLeft {
  744. width: 200px;
  745. height: 100%;
  746. display: flex;
  747. flex-direction: column;
  748. .el-radio {
  749. margin-right: 5px;
  750. }
  751. .list {
  752. margin: 10px 0;
  753. }
  754. }
  755. .mainRight {
  756. margin-left: 10px;
  757. flex: 1;
  758. height: 100%;
  759. display: flex;
  760. flex-direction: column;
  761. overflow-y: auto;
  762. .titlelist {
  763. display: flex;
  764. justify-content: space-between;
  765. white-space: nowrap;
  766. color: #909399;
  767. font-size: 14px;
  768. /deep/ .el-input__inner {
  769. font-size: 13px !important;
  770. }
  771. }
  772. .el-table {
  773. margin-top: -13px;
  774. }
  775. .el-button {
  776. height: 34px;
  777. width: 65px;
  778. }
  779. /deep/ .el-divider {
  780. height: 2px;
  781. margin-top: 10px;
  782. }
  783. /deep/ .el-table__body-wrapper {
  784. overflow-x: scroll !important;
  785. }
  786. }
  787. /deep/ .el-input__inner {
  788. padding-right: 15px;
  789. }
  790. /deep/ .el-table--scrollable-x .el-table__body-wrapper {
  791. overflow: auto;
  792. overflow-x: hidden;
  793. }
  794. /deep/ .gutter {
  795. width: 15px !important;
  796. display: inline-block !important;
  797. }
  798. /deep/ .el-table__fixed-right-patch {
  799. width: 15px !important;
  800. }
  801. /deep/ .el-table__fixed-right {
  802. bottom: 0 !important;
  803. left: auto;
  804. right: 0;
  805. }
  806. /deep/ .el-table__body-wrapper::-webkit-scrollbar {
  807. width: 15px !important;
  808. height: 15px !important;
  809. }
  810. </style>