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

newStatementPrintTwo.vue 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  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='dialysisPage' style="padding-top:40px;">
  15. <!--<printOne :info="info"></printOne>-->
  16. <print-one v-if="org_id != 10138" :info="info"></print-one>
  17. <print-two v-else :info="info"></print-two>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import { parseTime } from "@/utils";
  23. import { getDialysisRecord } from "@/api/dialysis";
  24. import { getDataConfig } from "@/utils/data";
  25. import { jsGetAge, uParseTime } from "@/utils/tools";
  26. import axios from 'axios'
  27. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  28. import print from "print-js";
  29. import printOne from "./newTreatTemplate/printOne"
  30. import printTwo from "./newTreatTemplate/printTwo"
  31. export default {
  32. name: "newStatementPrintTwo",
  33. components: {
  34. BreadCrumb,
  35. printOne,
  36. printTwo
  37. },
  38. props:{
  39. paramsObj:Object
  40. },
  41. data() {
  42. return {
  43. crumbs: [
  44. { path: false, name: '门诊医生站' },
  45. { path: false, name: '打印' }
  46. ],
  47. record_date:"",
  48. patientTableData:[],
  49. advicePrint:[],
  50. hisPatient:{},
  51. patient:{},
  52. search_input:"",
  53. loading:false,
  54. patient_id:0,
  55. prescription_id:0,
  56. ids:'',
  57. info:null,
  58. org_id:''
  59. };
  60. },
  61. methods:{
  62. printThisPage() {
  63. var ptime = Math.round(new Date().getTime() / 1000);
  64. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  65. if(this.org_id == 10138){
  66. const style =
  67. '@media print {#prescription-print{font-size:12px;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}}';
  68. printJS({
  69. printable: "prescription-print",
  70. type: "html",
  71. style: style,
  72. scanStyles: false
  73. });
  74. }else{
  75. const style =
  76. '@media print {.printTitle{font-size: 20px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;font-size:12px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;font-size:12px;}.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;font-size:12px;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;font-size:12px;}.actionBar div{width:150px;}}';
  77. printJS({
  78. printable: "prescription-print",
  79. type: "html",
  80. style: style,
  81. scanStyles: false
  82. });
  83. }
  84. // if (this.org_template_info.template_id == 1) {
  85. // printJS({
  86. // printable: "dialysis-print-box",
  87. // type: "html",
  88. // style: style,
  89. // scanStyles: false
  90. // });
  91. // }
  92. },
  93. searchAction(){
  94. },
  95. getInfo(obj) {
  96. if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || this.$store.getters.xt_user.org_id == 10138) {
  97. var that = this;
  98. axios.get('http://127.0.0.1:9532/sz/api/settle/query', {
  99. params: obj
  100. })
  101. .then(function (response) {
  102. if (response.data.state == 0) {
  103. this.$message.error(response.data.msg);
  104. return false
  105. } else {
  106. if (response.data.data.failed_code == -10) {
  107. // that.$message.error(response.data.data.msg)
  108. that.$confirm(response.data.data.msg, '医保错误信息', {
  109. confirmButtonText: '确 定',
  110. type: 'warning'
  111. }).then(() => {
  112. }).catch(() => {
  113. })
  114. } else {
  115. console.log("~~~~");
  116. that.info = response.data.data.result;
  117. console.log(that.info);
  118. that.info['patient_info']= response.data.data.patient_info
  119. that.info['dialysis_no'] = response.data.data.dialysis_no
  120. that.info['org_code'] = response.data.data.org_code;
  121. that.info['patient_name'] = response.data.data.patient_name;
  122. that.info['doctor_code'] = response.data.data.doctor_code;
  123. that.info['doctor_name'] = response.data.data.doctor_name;
  124. if(response.data.data.health_card_no_two.length == 0){
  125. that.info['health_card_no'] = response.data.data.health_card_no
  126. }else{
  127. that.info['health_card_no'] = response.data.data.health_card_no_two
  128. }
  129. that.info['order_number'] = response.data.data.order_number;
  130. that.info['department'] = response.data.data.department;
  131. that.info['yiliao_leibie'] = response.data.data.yiliao_leibie;
  132. that.info['before_money'] = response.data.data.before_money;
  133. that.info['after_money'] = response.data.data.after_money;
  134. that.info['org_name'] = that.$store.getters.xt_user.org.org_name;
  135. console.log("~~~~" + that.info);
  136. var name_arr = [];
  137. var spec_arr = [];
  138. var count_arr = [];
  139. var price_arr = [];
  140. var total_arr = [];
  141. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  142. name_arr.push(that.info.transBody.outputlist1[i].ake006);
  143. spec_arr.push(that.info.transBody.outputlist1[i].aka074);
  144. count_arr.push(that.info.transBody.outputlist1[i].akc226);
  145. price_arr.push(that.info.transBody.outputlist1[i].akc225);
  146. total_arr.push(that.info.transBody.outputlist1[i].akc264)
  147. }
  148. console.log("~~~" + that.info);
  149. that.info['name_arr'] = name_arr;
  150. that.info['spec_arr'] = spec_arr;
  151. that.info['count_arr'] = count_arr;
  152. that.info['price_arr'] = price_arr;
  153. that.info['total_arr'] = total_arr;
  154. that.info['record_date'] = obj.record_time;
  155. console.log("~~" + that.info)
  156. let type_arr = []
  157. for (let i = 0; i < that.info.transBody.outputlist1.length; i++) {
  158. type_arr.push(that.info.transBody.outputlist1[i].aka111)
  159. }
  160. let typeArr = this.unique(type_arr)
  161. that.info['new_detail_list'] = []
  162. for(let i = 0; i < typeArr.length; i++){
  163. let obj = {
  164. aka111:typeArr[i],
  165. details:[],
  166. total:0
  167. }
  168. for(let b = 0; b < that.info.transBody.outputlist1.length;b++){
  169. if(typeArr[i] == that.info.transBody.outputlist1[b]){
  170. obj.details.push(that.info.transBody.outputlist1[b])
  171. obj.total += that.info.transBody.outputlist1[b].akc264
  172. }
  173. }
  174. that.info.new_detail_list.push(obj)
  175. }
  176. }
  177. }
  178. })
  179. .catch(function (error) {
  180. });
  181. }
  182. }, unique(array) {
  183. // res用来存储结果
  184. var res = []
  185. for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
  186. for (var j = 0, resLen = res.length; j < resLen; j++) {
  187. if (array[i] === res[j] ) {
  188. break
  189. }
  190. }
  191. // 如果array[i]是唯一的,那么执行完循环,j等于resLen
  192. if (j === resLen) {
  193. res.push(array[i])
  194. }
  195. }
  196. return res
  197. },
  198. },
  199. created() {
  200. this.org_id = this.$store.getters.xt_user.org_id
  201. this.getInfo(this.paramsObj)
  202. },
  203. watch:{
  204. paramsObj:{//深度监听,可监听到对象、数组的变化
  205. handler(val, oldVal){
  206. this.paramsObj = val;
  207. this.getInfo(this.paramsObj)
  208. },
  209. deep:true
  210. }
  211. }
  212. };
  213. </script>
  214. <style>
  215. .dialysis-print-order {
  216. width: 960px;
  217. margin: 0 auto;
  218. }
  219. .dialysis-print-order .order-yy-name {
  220. margin: auto;
  221. text-align: center;
  222. font-size: 20px;
  223. letter-spacing: 5px;
  224. }
  225. .dialysis-print-order .order-title {
  226. margin: auto;
  227. font-weight: 600;
  228. text-align: center;
  229. font-size: 22px;
  230. padding: 10px;
  231. }
  232. .dialysis-print-order .table-box {
  233. width: 100%;
  234. line-height: 23px;
  235. font-size: 14px;
  236. }
  237. .dialysis-print-order .print-table {
  238. width: 100%;
  239. text-align: center;
  240. border-collapse: collapse;
  241. line-height: 40px;
  242. font-size: 14px;
  243. border-color: #000;
  244. }
  245. .dialysis-print-order .print-table-no {
  246. width: 100%;
  247. text-align: center;
  248. border-collapse: collapse;
  249. font-size: 14px;
  250. }
  251. .dialysis-print-order .under-line {
  252. border-bottom: 1px solid #999;
  253. width: 95%;
  254. text-align: center;
  255. margin-left: 2px;
  256. }
  257. .dialysis-print-order .title-box {
  258. text-align: center;
  259. font-size: 16px;
  260. }
  261. .dialysis-print-order .radio-lebel-box {
  262. font-weight: 400;
  263. cursor: pointer;
  264. }
  265. .dialysis-print-order .radio-no {
  266. opacity: 0;
  267. outline: none;
  268. position: absolute;
  269. margin: 0;
  270. width: 0;
  271. height: 0;
  272. z-index: -1;
  273. }
  274. .dialysis-print-order .radio-inner {
  275. white-space: nowrap;
  276. cursor: pointer;
  277. outline: none;
  278. display: inline-block;
  279. line-height: 1;
  280. position: relative;
  281. vertical-align: middle;
  282. }
  283. .dialysis-print-order .radio-fang {
  284. display: inline-block;
  285. position: relative;
  286. border: 1px solid #000;
  287. box-sizing: border-box;
  288. width: 14px;
  289. height: 14px;
  290. background-color: #fff;
  291. z-index: 1;
  292. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  293. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  294. }
  295. .dialysis-print-order .is-checked-radio::after {
  296. content: "√";
  297. font-size: 15px;
  298. }
  299. .dialysis-print-order .print-table-no tr td {
  300. padding: 8px 5px;
  301. line-height: 25px;
  302. }
  303. .dialysis-print-order .print-table tr td {
  304. padding: 1px 1px;
  305. /*line-height: 25px;*/
  306. }
  307. .es-img {
  308. height: 30px;
  309. }
  310. .advice-name {
  311. text-align: left;
  312. }
  313. .advice-children {
  314. display: flex;
  315. }
  316. .title-box-pro {
  317. border: 0 #fff;
  318. line-height: 25px;
  319. height: 25px;
  320. text-align: left;
  321. padding-left: 10px !important;
  322. }
  323. .title-box-pro-tr {
  324. border: 0 #fff;
  325. }
  326. .text-align-left {
  327. text-align: left !important;
  328. padding-left: 10px !important;
  329. font-size: 14px !important;
  330. line-height: 25px;
  331. }
  332. .print-table-tr-new td {
  333. line-height: 20px !important;
  334. }
  335. .border-top-solid {
  336. border: solid 1px #000;
  337. }
  338. .print-template-two tr {
  339. line-height: 30px;
  340. }
  341. .table-box1 {
  342. border: 1px solid #000;
  343. width: 100%;
  344. line-height: 30px;
  345. font-size: 14px;
  346. border-collapse: collapse;
  347. }
  348. .table-box1 tr {
  349. border-bottom: 1px solid #000;
  350. }
  351. </style>
  352. <style lang="scss">
  353. .newContainer{
  354. .dialysisPage::-webkit-scrollbar {
  355. height: 15px;
  356. }
  357. .el-date-editor{
  358. .el-input__inner{
  359. padding-right:0px;
  360. }
  361. }
  362. .el-table td, .el-table th{
  363. text-align: center;
  364. }
  365. }
  366. .newContainer::-webkit-scrollbar{
  367. height: 15px !important;
  368. }
  369. </style>