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

labelPrint.vue 10KB

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