ZyChargeFeeModify.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <div class="layout_display_flex_y">
  3. <div>
  4. <el-input size="small" placeholder="在此输入住院号" @keyup.enter="query()" v-model="inpatientNo" clearable
  5. prefix-icon="Search" style="width: 300px">
  6. <template #prepend>住院号</template>
  7. </el-input>
  8. <el-input size="small" placeholder="输入收费项目码" @keyup.enter="query()" v-model="chargeCodeMx" clearable
  9. prefix-icon="Search" style="width: 300px">
  10. <template #prepend>收费项目码</template>
  11. </el-input>
  12. <el-divider direction="vertical"></el-divider>
  13. <el-button type="primary" icon="Search" @click="query">查询</el-button>
  14. </div>
  15. <div class="layout_flex_1-y layout_display_flex_y">
  16. <div class="layout_flex_1-y">
  17. <el-table :data="data.list" height="100%" stripe highlight-current-row>
  18. <el-table-column prop="opIdCode" fixed label="操作人员"></el-table-column>
  19. <el-table-column fixed label="描述">
  20. <template #default="scope">
  21. {{ describe(scope.row.serial) }}
  22. </template>
  23. </el-table-column>
  24. <el-table-column prop="chargeCode" fixed width="100" show-overflow-tooltip
  25. label="药品/项目"></el-table-column>
  26. <el-table-column width="50" label="金额">
  27. <template #default="scope">
  28. <span v-if="scope.row.chargeFee > 0" style="color: blue">{{ scope.row.chargeFee }}¥</span>
  29. <span v-else style="color: red">{{ scope.row.chargeFee }} ¥</span>
  30. </template>
  31. </el-table-column>
  32. <el-table-column prop="chargeAmount" width="50" label="数量"></el-table-column>
  33. <el-table-column width="50" label="状态">
  34. <template #default="socpe">
  35. {{ costState(socpe.row.chargeStatus) }}
  36. </template>
  37. </el-table-column>
  38. <el-table-column prop="admissTimes" width="50" label="住院次数"></el-table-column>
  39. <el-table-column prop="chargeDate" sortable width="80" label="收费日期"></el-table-column>
  40. <el-table-column prop="deptCode" label="科室"></el-table-column>
  41. <el-table-column prop="detailSn" width="50" label="流水号"></el-table-column>
  42. <el-table-column prop="execUnit" show-overflow-tooltip label="执行科室"></el-table-column>
  43. <el-table-column prop="genTime" sortable width="80" label="系统时间"></el-table-column>
  44. <el-table-column width="50" label="是否为婴儿">
  45. <template #default="socpe">
  46. {{ babyOrNot(socpe.row.infantFlag) }}
  47. </template>
  48. </el-table-column>
  49. <el-table-column prop="ledgerSn" width="50" label="结算次数"></el-table-column>
  50. <el-table-column prop="orderNo" label="医嘱号"></el-table-column>
  51. <el-table-column width="50" label="是否自费">
  52. <template #default="socpe">
  53. {{ aerYouSure(socpe.row.selfFlag) }}
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="wardCode" show-overflow-tooltip label="病房"></el-table-column>
  57. <el-table-column label="修改金额" width="60">
  58. <template #default="scope">
  59. <el-button text @click="tijiao(scope.row)" size="small" type="warning">修改</el-button>
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. </div>
  64. <div>
  65. <el-pagination
  66. @size-change="handleSizeChange"
  67. @current-change="handleCurrentChange"
  68. :current-page="searchCriteria.currentPage"
  69. :page-sizes="[20, 30, 40, 50, 100]"
  70. :page-size="searchCriteria.pageSize"
  71. layout="total, sizes, prev, pager, next, jumper"
  72. :total="data.totalSize"
  73. ></el-pagination>
  74. </div>
  75. </div>
  76. </div>
  77. </template>
  78. <script setup>
  79. import {reactive, ref} from 'vue'
  80. import {queryHospitalizationExpenses, totalModify} from '@/api/yz-data-mod/zy-charge-fee-modify'
  81. import {ElMessageBox, ElMessage, ElNotification} from 'element-plus'
  82. import {describe, costState, aerYouSure, babyOrNot} from '@/utils/computed'
  83. const searchCriteria = reactive({
  84. pageSize: 30,
  85. currentPage: 1,
  86. inpatientNo: '',
  87. chargeCodeMx: '',
  88. })
  89. const inpatientNo = ref('')
  90. const chargeCodeMx = ref('')
  91. const handleSizeChange = (val) => {
  92. searchCriteria.pageSize = val
  93. query()
  94. }
  95. const handleCurrentChange = (val) => {
  96. searchCriteria.currentPage = val
  97. query()
  98. }
  99. const data = reactive({
  100. list: [],
  101. data: '',
  102. totalSize: 0
  103. })
  104. const tijiao = (val) => {
  105. ElMessageBox.prompt('输入修改金额', '提示', {
  106. confirmButtonText: '确定',
  107. cancelButtonText: '取消',
  108. inputPattern: /^[-\+]?\d{0,8}\.{0,1}(\d{1,2})?$/,
  109. inputErrorMessage: '请输入正确的金额',
  110. inputValue: String(val.chargeFee),
  111. })
  112. .then(({value}) => {
  113. if (value === String(val.chargeFee)) {
  114. ElNotification.info({
  115. message: '数据没有变化,无需修改',
  116. })
  117. retuen
  118. }
  119. data.data = val
  120. data.data.newChargeFee = value
  121. totalModify(data.data)
  122. .then(() => {
  123. ElNotification({
  124. type: 'success',
  125. dangerouslyUseHTMLString: true,
  126. title: '金额修改成功',
  127. message: '修改前:' + data.data.chargeFee + '<br/>修改后: ' + value,
  128. })
  129. queryHospitalizationExpenses(searchCriteria).then((res) => {
  130. data.list = res.data
  131. })
  132. })
  133. .catch(() => {
  134. ElNotification({
  135. type: 'error',
  136. message: '修改失败',
  137. })
  138. })
  139. })
  140. .catch(() => {
  141. })
  142. }
  143. function query() {
  144. searchCriteria.inpatientNo = inpatientNo.value
  145. searchCriteria.chargeCodeMx = chargeCodeMx.value
  146. if (searchCriteria.inpatientNo !== '' && searchCriteria.chargeCodeMx !== '') {
  147. queryHospitalizationExpenses(searchCriteria)
  148. .then((res) => {
  149. data.list = res.data
  150. data.totalSize = res.total
  151. })
  152. .catch(() => {
  153. data.list = []
  154. })
  155. } else {
  156. ElMessage.error({
  157. message: '两项都需要填写',
  158. showClose: true,
  159. duration: 2000,
  160. })
  161. }
  162. }
  163. </script>