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

settlementPrint.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <div>
  3. <template>
  4. <el-button
  5. style="position:fixed;right:25px;z-index:999"
  6. :loading="loading"
  7. size="small"
  8. icon="el-icon-printer"
  9. @click="printThisPage"
  10. type="primary"
  11. >打印</el-button
  12. >
  13. </template>
  14. <div class="app-container" style="padding-top:40px;">
  15. <div class='dialysisPage'>
  16. <printOne v-bind:childResponse="childResponse" :info="info" :p_admin="p_admin" :charge_admin="charge_admin" :paramsObj="paramsObj"></printOne>
  17. </div>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import { jsGetAge, uParseTime } from "@/utils/tools";
  23. // import LabelBox from "./printItem/LabelBox";
  24. import print from "print-js";
  25. import printOne from "./settlementTemplate/printOne"
  26. import axios from 'axios'
  27. export default {
  28. name: "dialysisPrintOrder",
  29. components: {
  30. printOne
  31. },
  32. props:{
  33. paramsObj:Object
  34. },
  35. data() {
  36. return {
  37. crumbs: [
  38. { path: false, name: "透析管理" },
  39. { path: false, name: "打印单" }
  40. ],
  41. childResponse: {},
  42. paramsObj:{},
  43. info:null,
  44. p_admin:{},
  45. charge_admin:{},
  46. };
  47. },
  48. methods: {
  49. getAdminUser(id) {
  50. if (id == 0) {
  51. return "";
  52. }
  53. if (id == undefined) {
  54. return "";
  55. }
  56. for (let i = 0; i < this.adminUser.length; i++) {
  57. if (this.adminUser[i].id == id) {
  58. return this.adminUser[i].name;
  59. }
  60. }
  61. },
  62. getTime(value, temp) {
  63. if (value == 0) {
  64. return "";
  65. }
  66. if (value != undefined) {
  67. return uParseTime(value, temp);
  68. }
  69. return "";
  70. },
  71. printThisPage() {
  72. var ptime = Math.round(new Date().getTime() / 1000);
  73. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  74. const style =
  75. '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
  76. const style1 = "@media print{#prescription-print{font-size:14px;}.title{text-align: center;font-size: 22px;font-weight: bold;}.row{display: flex;justify-content: space-between;}.under_line{border-bottom: 1px solid #999;width: 95%;text-align: center;margin-left: 2px;display: inline-block;}.inline_block{display: inline-block;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 14px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; /* 解决边框冲突 */border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid;text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}}";
  77. printJS({
  78. printable: "prescription-print",
  79. type: "html",
  80. style: style1,
  81. scanStyles: false
  82. });
  83. // if (this.org_template_info.template_id == 1) {
  84. // printJS({
  85. // printable: "dialysis-print-box",
  86. // type: "html",
  87. // style: style,
  88. // scanStyles: false
  89. // });
  90. // }
  91. },
  92. getAllDoctorList(){
  93. getAllDoctorList().then(response=>{
  94. if(response.data.state == 1){
  95. var doctor = response.data.data.doctor;
  96. this.doctorList = doctor
  97. }
  98. })
  99. },
  100. getAllHisPatientList(){
  101. const params = {
  102. record_date:this.record_date
  103. };
  104. getAllHisPatientList(params).then(response=>{
  105. if(response.data.state == 1){
  106. this.patientTableData = response.data.data.list;
  107. this.patientTableDataTwo = response.data.data.list;
  108. console.log('222', this.patientTableData);
  109. let cal_one = 0;
  110. let cal_two = 0;
  111. for (let i = 0; i < response.data.data.list.length; i++) {
  112. if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  113. cal_one = cal_one + 1
  114. }
  115. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  116. cal_two = cal_two + 1
  117. }
  118. }
  119. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  120. // console.log(this.patientTableData[0])
  121. // this.choosePatient(this.patientTableData[0])
  122. this.cal_one = cal_one;
  123. this.cal_two = cal_two
  124. }
  125. })
  126. },
  127. changePatient(row){
  128. console.log("row",row);
  129. this.patient_id = row.patient_id;
  130. this.record_date = this.record_date;
  131. this.prescription_id = this.prescription_id
  132. // var params = {
  133. // patient_id:row.patient_id,
  134. // record_date:this.record_date,
  135. // prescription_id:this.prescription_id,
  136. // }
  137. // getPrescriptionPrint(params).then(response=>{
  138. // if(response.data.state == 1){
  139. // var advicePrint = response.data.data.advicePrint
  140. // console.log("adviceprint",advicePrint)
  141. // this.advicePrint = advicePrint
  142. // // var hisPatient = response.data.data.hisPatient
  143. // // console.log("hispatient",hisPatient)
  144. // // this.hisPatient = hisPatient
  145. // var patient = response.data.data.patient
  146. // console.log("patient",patient)
  147. // this.patient = patient
  148. // var doctorPorject = response.data.data.doctorPorject
  149. // console.log("doctorporject",doctorPorject)
  150. // }
  151. // })
  152. },
  153. searchAction(){
  154. },
  155. getInfo(order_id) {
  156. var that = this;
  157. axios.get('http://127.0.0.1:9532/api/settle/query', {
  158. params: {
  159. order_id: order_id,
  160. admin_user_id:this.$store.getters.xt_user.user.id,
  161. }
  162. })
  163. .then(function (response) {
  164. if (response.data.state == 0) {
  165. this.$message.error(response.data.msg);
  166. return false
  167. } else {
  168. console.log("logloglog");
  169. console.log(response.data.data.info);
  170. that.info = response.data.data.info;
  171. that.p_admin = response.data.data.printor_admin;
  172. that.charge_admin = response.data.data.charge_admin;
  173. console.log(that.info);
  174. // that.info['bed_cost_total'] = response.data.data.bedCostTotal
  175. that.info['bed_cost_total'] = response.data.data.bedCostTotal;
  176. that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;
  177. that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal;
  178. that.info['operation_cost_total'] = response.data.data.operationCostTotal;
  179. that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal;
  180. that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal;
  181. that.info['other_cost_total'] = response.data.data.otherCostTotal;
  182. that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal;
  183. that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal;
  184. that.info['material_cost_total'] = response.data.data.materialCostTotal;
  185. that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal;
  186. that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal;
  187. that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal;
  188. that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal;
  189. that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal;
  190. that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal;
  191. that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal;
  192. that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
  193. that.info['check_cost_total'] = response.data.data.checkCostTotal;
  194. that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal;
  195. that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal;
  196. that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal;
  197. that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal;
  198. that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal;
  199. that.info['treat_cost_total'] = response.data.data.treatCostTotal;
  200. that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
  201. that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
  202. that.info['date'] = response.data.data.date;
  203. that.info['number'] = response.data.data.number;
  204. that.info['order_infos'] = response.data.data.order_infos;
  205. that.info['diagnosis'] = response.data.data.diagnosis
  206. }
  207. })
  208. .catch(function (error) {
  209. });
  210. }
  211. },
  212. created() {
  213. this.getInfo(this.paramsObj.order_id);
  214. this.org_id = this.$store.getters.xt_user.org_id
  215. },
  216. watch:{
  217. paramsObj:{//深度监听,可监听到对象、数组的变化
  218. handler(val, oldVal){
  219. this.paramsObj = val;
  220. this.getInfo(this.paramsObj.order_id)
  221. },
  222. deep:true
  223. }
  224. }
  225. };
  226. </script>
  227. <style lang="scss" scoped>
  228. .printTitle{
  229. font-size: 22px;
  230. text-align: center;
  231. font-weight: bold;
  232. }
  233. .infoMain{
  234. display: flex;
  235. flex-wrap: wrap;
  236. border-bottom: 2px solid #000;
  237. padding:0 10px;
  238. }
  239. .infoMain .infoP{
  240. width: 33%;
  241. line-height: 24px;
  242. }
  243. .prescriptionBox{
  244. padding:0 10px;
  245. height:600px;
  246. }
  247. .Rp{
  248. font-size: 22px;
  249. font-weight: bold;
  250. }
  251. .drugsBox{
  252. padding-left: 40px;
  253. margin-bottom: 10px;
  254. }
  255. .drugsBox p{
  256. line-height: 30px;
  257. }
  258. .drugsOne{
  259. line-height: 24px;
  260. }
  261. .drugsOne span{
  262. margin-right: 20px;
  263. }
  264. .doctorBox{
  265. display: flex;
  266. justify-content: space-between;
  267. padding:0 10px;
  268. line-height: 24px;
  269. border-bottom: 2px solid #000;
  270. }
  271. .actionBar{
  272. display: flex;
  273. justify-content: space-between;
  274. line-height: 24px;
  275. padding:0 10px;
  276. }
  277. .actionBar p{
  278. width:150px;
  279. }
  280. </style>