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

labelPrint.vue 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <div class="main-contain outpatientChargesManagement">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div>
  7. <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
  8. <div>
  9. <el-input size="small" style="width:150px;" v-model="keywords" @input="searchAction"
  10. @keyup.enter.native='searchAction'
  11. placeholder="请输入患者姓名"
  12. class="filter-item"/>
  13. <el-select size="small" v-model="item_type" placeholder="请选择"
  14. style="width:150px;margin-left:10px;" @change="changeItem">
  15. <el-option
  16. label="全部"
  17. value="0">
  18. </el-option>
  19. <el-option
  20. v-for="item,index in items"
  21. :key="index"
  22. :label="item.name"
  23. :value="item.id">
  24. </el-option>
  25. </el-select>
  26. <el-date-picker
  27. v-model="chargeDate"
  28. type="date"
  29. format="yyyy-MM-dd"
  30. value-format="yyyy-MM-dd"
  31. @change="changeDate"
  32. >
  33. </el-date-picker>
  34. </div>
  35. </div>
  36. <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
  37. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  38. highlight-current-row>
  39. <el-table-column align="center" prop="name" label="患者名字">
  40. <template slot-scope="scope">{{ scope.row.patient_name }}</template>
  41. </el-table-column>
  42. <el-table-column align="center" prop="name" label="处方号">
  43. <template slot-scope="scope">{{scope.row.number}}</template>
  44. </el-table-column>
  45. <el-table-column align="center" prop="name" label="创建时间">
  46. <template slot-scope="scope">{{getTime(scope.row.record_date, '{y}-{m}-{d}')}}</template>
  47. </el-table-column>
  48. <el-table-column align="center" prop="name" label="创建医生">
  49. <template slot-scope="scope">{{scope.row.doctor_name}}</template>
  50. </el-table-column>
  51. <el-table-column align="center" prop="name" label="项目名称">
  52. <template slot-scope="scope">
  53. <div>{{scope.row.project_name}}</div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column
  57. align="center"
  58. label="操作"
  59. width="180"
  60. class-name="small-padding fixed-width"
  61. >
  62. <template slot-scope="scope">
  63. <el-tooltip class="item" effect="dark" content="打印" placement="top">
  64. <el-button
  65. type="primary"
  66. size="small"
  67. icon="el-icon-edit-outline"
  68. @click="Print(scope.row, scope.$index)"
  69. >
  70. </el-button>
  71. </el-tooltip>
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. <el-pagination
  76. @size-change="handleSizeChange"
  77. @current-change="handleCurrentChange"
  78. :page-sizes="[10, 50, 100]"
  79. :page-size="10"
  80. background
  81. style="margin-top:20px;float: right"
  82. layout="total, sizes, prev, pager, next, jumper"
  83. :total="total"
  84. >
  85. </el-pagination>
  86. </div>
  87. <el-dialog title="打印" :visible.sync="labelVisible">
  88. <div>
  89. <el-row style="float:right;">
  90. <el-col :span="24">
  91. <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印
  92. </el-button>
  93. </el-col>
  94. </el-row>
  95. <div id="sign" class="signPrint">
  96. <div style="display:flex;margin-bottom:10px;">
  97. <div style="margin-left:15px;">
  98. <div style="font-weight:bold;font-size:24px;">C</div>
  99. <div>{{getTime(current_ctime,'{m}-{d}')}}</div>
  100. <div>{{getTime(current_ctime,'{h}:{i}')}}</div>
  101. </div>
  102. <img style="width:300px;height:200px;margin-left:10px;" id="barcode">
  103. </div>
  104. <div style="margin-bottom:5px;">{{current_number}}</div>
  105. <div style="display:flex;">
  106. <div style="padding-left:20px;">{{current_project_name}}</div>
  107. <div style="font-size:24px;margin-left:20px;">{{current_name}}</div>
  108. </div>
  109. </div>
  110. </div>
  111. <div slot="footer" class="dialog-footer">
  112. <el-button @click="labelVisible = false">取 消</el-button>
  113. <el-button type="primary" @click="labelVisible = false">确 定</el-button>
  114. </div>
  115. </el-dialog>
  116. </div>
  117. </template>
  118. <script>
  119. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  120. import { GetLabelList } from '@/api/his/his'
  121. import { uParseTime } from '@/utils/tools'
  122. import SignPrint from '../dialysis/signPrint'
  123. import JsBarcode from 'jsbarcode'
  124. // import NewStatementPrint from './newStatementPrint'
  125. const moment = require('moment')
  126. export default {
  127. components: {
  128. SignPrint,
  129. BreadCrumb
  130. },
  131. data() {
  132. return {
  133. current_ctime: 0,
  134. current_number: '',
  135. current_project_name: '',
  136. current_name: '',
  137. labelVisible: false,
  138. crumbs: [
  139. { path: false, name: 'HIS工具' },
  140. { path: false, name: '标签打印' }
  141. ],
  142. detail_loading: false,
  143. tempArr: [],
  144. pos: 0,
  145. page: 1,
  146. limit: 10,
  147. total: 0,
  148. current_id: 0,
  149. sameRowArr: [],
  150. keywords: '',
  151. tableData: [],
  152. chargeDate: moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
  153. item_type: '0',
  154. items: [
  155. { id: 1, name: '已打印' },
  156. { id: 2, name: '未打印' }
  157. ]
  158. }
  159. },
  160. methods: {
  161. printAction: function() {
  162. const style = '@media print { .sign{width:960px;margin: 0 auto;text-align: center;border-collapse: collapse;}.order_title_panl {text-align: center;.main_title {font-size: 18px;line-height: 40px;font-weight: 500;}}.dialysisTable tr{padding: 10px 0;}.dialysisTable th {color: #000;padding: 0;margin: 0;height: 30px;}.dialysisTable tr td {padding: 12px 0;}.subadvice_content {text-align: left;padding-left: 25px !important;padding-right: 5px !important;}.advice_content {text-align: left;padding-left: 5px !important;padding-right: 5px !important;padding: 15px 5px !important;} }'
  163. printJS({
  164. printable: 'sign',
  165. type: 'html',
  166. documentTitle: ' ',
  167. style: style,
  168. scanStyles: false
  169. })
  170. },
  171. getTime(value, temp) {
  172. if (value != undefined) {
  173. return uParseTime(value, temp)
  174. }
  175. return ''
  176. },
  177. Print(row, index) {
  178. this.labelVisible = true
  179. this.current_ctime = row.ctime
  180. this.current_number = row.number
  181. this.current_project_name = row.project_name
  182. this.current_name = row.patient_name
  183. this.$nextTick(() => {
  184. JsBarcode('#barcode',row.id, {
  185. format: 'CODE39',
  186. lineColor: '#000',
  187. background: '#EBEEF5',
  188. width: 3,
  189. height: 200,
  190. displayValue: false,
  191. fontOptions:"bold italic",//使文字加粗体或变斜体
  192. font:"fantasy",//设置文本的字体
  193. textAlign:"left",//设置文本的水平对齐方式
  194. textPosition:"top",//设置文本的垂直位置
  195. textMargin:5,//设置条形码和文本之间的间距
  196. fontSize:15,//设置文本的大小
  197. margin:15//设置条形码周围的空白边距
  198. })
  199. });
  200. },
  201. handleCurrentChange(page) {
  202. this.page = page
  203. this.getList()
  204. },
  205. handleSizeChange(limit) {
  206. this.limit = limit
  207. this.getList()
  208. },
  209. changeDate() {
  210. this.page = 1
  211. this.limit = 10
  212. this.getList()
  213. },
  214. changeItem() {
  215. this.page = 1
  216. this.limit = 10
  217. this.getList()
  218. },
  219. searchAction() {
  220. this.page = 1
  221. this.limit = 10
  222. this.getList()
  223. },
  224. getList() {
  225. let params = {
  226. record_date: this.chargeDate,
  227. is_print: this.item_type,
  228. keyword: this.keywords,
  229. page: this.page,
  230. limit: this.limit
  231. }
  232. GetLabelList(params).then(response => {
  233. if (response.data.state == 0) {
  234. this.$message.error(response.data.msg)
  235. return false
  236. } else {
  237. this.tableData = response.data.data.labels
  238. this.total = response.data.data.total
  239. }
  240. })
  241. }
  242. },
  243. created() {
  244. this.getList()
  245. }, mounted() {
  246. }
  247. }
  248. </script>