printOne.vue 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <div id='prescription-print' class="prescription-print">
  3. <div class="printTitle">血液透析中心医药费收据及收费项目清单</div>
  4. <div class="infoMain">
  5. <p class="infoP">医院(药店)编号:</p>
  6. <p class="infoP">名称:血液透析中心</p>
  7. <p class="infoP">医生工号:</p>
  8. <p class="infoP">门诊流水号:</p>
  9. <p class="infoP">科别:{{list.p_info.departments}}</p>
  10. <p class="infoP">处方单据号:</p>
  11. <p class="infoP">姓名:{{patient.name}}</p>
  12. <p class="infoP">医疗账号:</p>
  13. <p class="infoP">医疗类别:普通</p>
  14. </div>
  15. <div class="chargeBox">
  16. <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;">
  17. <div class="chargeUl" style="width:20%;">
  18. <p style="width:50%;border-right:1px solid #000;">费用类型</p>
  19. <p style="width:50%;border-right:1px solid #000;">金额</p>
  20. </div>
  21. <div class="chargeUl" style="width:80%;">
  22. <p style="width:40%;border-right:1px solid #000;">明细名称</p>
  23. <p style="width:15%;border-right:1px solid #000;">规格</p>
  24. <p style="width:15%;border-right:1px solid #000;">数量</p>
  25. <p style="width:15%;border-right:1px solid #000;">单价</p>
  26. <p style="width:15%;">金额</p>
  27. </div>
  28. </div>
  29. <div style="display:flex;justify-content: space-between;">
  30. <div style="width:20%;">
  31. <div class="chargeUl" v-for="(item,index) in 1" :key="index">
  32. <p style="width:50%;">材料费</p>
  33. <p style="width:50%;"></p>
  34. </div>
  35. <div class="chargeUl" style="border-top:1px solid #000;">
  36. <p style="width:50%;">费用合计</p>
  37. <p style="width:50%;"></p>
  38. </div>
  39. <div class="chargeUl" style="border-top:1px solid #000;">
  40. <p style="width:50%;">记账支付</p>
  41. <p style="width:50%;"></p>
  42. </div>
  43. <div class="chargeUl" style="border-top:1px solid #000;">
  44. <p style="width:50%;">个人账号</p>
  45. <p style="width:50%;"></p>
  46. </div>
  47. <div class="chargeUl" style="border-top:1px solid #000;border-bottom:1px solid #000;">
  48. <p style="width:50%;">现金支付</p>
  49. <p style="width:50%;">{{list.order_info.psn_cash_pay}}</p>
  50. </div>
  51. </div>
  52. <div style="width:80%;display:flex;height:600px;">
  53. <div style="border-left:1px solid #000;border-right:1px solid #000;width:40%;text-align:center;">
  54. <p v-for="(item,i) in prescription[0].advices" :key="i" class="chargeP">{{item.advice_name}}</p>
  55. </div>
  56. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  57. <p v-for="(item,y) in prescription[0].advices" :key="y" class="chargeP">{{item.advice_desc}}</p>
  58. </div>
  59. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  60. <p v-for="(item,z) in prescription[0].advices" :key="z" class="chargeP">{{item.single_dose}}个</p>
  61. </div>
  62. <div style="border-right:1px solid #000;width:15%;text-align:center;">
  63. <p v-for="(item,f) in prescription[0].advices" :key="f" class="chargeP">{{item.price}}</p>
  64. </div>
  65. <div style="width:15%;text-align:center;">
  66. <p v-for="(item,d) in prescription[0].advices" :key="d" class="chargeP">{{item.single_dose * item.price}}</p>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="moneyBox">
  72. <p>实收金:{{list.order_info.medfee_sumamt}}</p>
  73. <p>记账前金额:{{list.order_info.preselfpay_amt}}</p>
  74. <p>扣款金额:</p>
  75. <p>记账后金额:</p>
  76. <p>找赎金:</p>
  77. </div>
  78. <div class="actionBar">
  79. <p>收费员:</p>
  80. <p>日期:{{this.$route.query.record_date}}</p>
  81. </div>
  82. </div>
  83. </template>
  84. <script>
  85. import { getChargePrint } from "@/api/project/project"
  86. export default {
  87. data(){
  88. return{
  89. list:{},
  90. prescription:[],
  91. patient:{},
  92. }
  93. },
  94. props:{
  95. paramsObj:Object
  96. },
  97. methods:{
  98. getChargePrint(record_date,patient_id,prescription_id){
  99. var params = {
  100. record_date:record_date,
  101. patient_id:patient_id,
  102. prescription_id:prescription_id
  103. }
  104. console.log("params",params)
  105. getChargePrint(params).then(response=>{
  106. if(response.data.state == 1){
  107. var list = response.data.data.list
  108. console.log("list9999999999",list)
  109. this.list = list
  110. var prescription = response.data.data.prescription
  111. console.log("prescription",prescription)
  112. this.prescription = prescription
  113. var patient = response.data.data.patient
  114. console.log("patient",patient)
  115. this.patient = patient
  116. }
  117. })
  118. }
  119. },
  120. created(){
  121. var record_date = this.paramsObj.record_date
  122. console.log("record_date",record_date)
  123. var patient_id = this.paramsObj.patient_id
  124. console.log("patient_id",patient_id)
  125. var prescription_id = this.paramsObj.prescription_id
  126. this.getChargePrint(record_date,patient_id,prescription_id)
  127. },
  128. watch:{
  129. paramsObj:{//深度监听,可监听到对象、数组的变化
  130. handler(val, oldVal){
  131. this.paramsObj = val
  132. this.patient_id = this.paramsObj.patient_id
  133. var record_date = this.paramsObj.record
  134. this.record_date = record_date
  135. var prescription_id = this.paramsObj.prescription_id
  136. this.prescription_id = prescription_id
  137. },
  138. deep:true
  139. }
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .prescription-print{
  145. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  146. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  147. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  148. margin-bottom: 20px;
  149. padding:20px 10px;
  150. }
  151. .printTitle{
  152. font-size: 22px;
  153. text-align: center;
  154. font-weight: bold;
  155. }
  156. .infoMain{
  157. display: flex;
  158. flex-wrap: wrap;
  159. padding:0 10px;
  160. margin-top:10px;
  161. }
  162. .infoMain .infoP{
  163. width: 33%;
  164. line-height: 24px;
  165. }
  166. .chargeBox{
  167. border: 1px solid #000;
  168. }
  169. .chargeUl{
  170. display:flex;
  171. justify-content: space-between;
  172. text-align: center;
  173. }
  174. .chargeUl p{
  175. height:40px;
  176. line-height: 40px;
  177. }
  178. .chargeP{
  179. height:40px;
  180. line-height: 40px;
  181. }
  182. .moneyBox{
  183. display: flex;
  184. justify-content: space-between;
  185. padding: 0 10px;
  186. background: #eee;
  187. height: 40px;
  188. align-items: center;
  189. border:1px solid #000;
  190. border-top:none
  191. }
  192. .actionBar{
  193. display: flex;
  194. justify-content: space-between;
  195. line-height: 24px;
  196. padding:0 10px;
  197. }
  198. .actionBar p{
  199. width:150px;
  200. }
  201. </style>