You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

219 lines
8.0 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div style="margin-top: -10px;">
  3. <div>
  4. <el-tabs v-model="tabChoosed" style="margin-top: 0px;">
  5. <el-tab-pane label="待收费项目" name="1">
  6. <el-table :data="tableData" border style="width: 100%" row-key="id" height="450" highlight-current-row
  7. size="small" @selection-change="handleSelectionChange" :row-style="{ height: '25px' }">
  8. <el-table-column type="selection" align="center" width="40" />
  9. <el-table-column type="index" label="序号" align="center" width="40" />
  10. <el-table-column label="组合项目" min-width="150" prop="asbitemName"></el-table-column>
  11. <el-table-column label="标准价格" prop="standardPrice" min-width="70" align="center" />
  12. <el-table-column label="数量" prop="amount" min-width="50" align="center"></el-table-column>
  13. <el-table-column label="实收价格" prop="chargePrice" min-width="70" align="center"></el-table-column>
  14. <el-table-column prop="total" label="金额" min-width="70" align="center" />
  15. <el-table-column prop="standardPrice" label="标准金额" min-width="70" align="center" />
  16. </el-table>
  17. </el-tab-pane>
  18. <el-tab-pane label="已收费项目" name="2">
  19. <el-table :data="hisRequestData" border style="width: 100%" row-key="id"
  20. height="160" highlight-current-row size="small" @row-click="rowClick" :row-style="{ height: '25px' }">
  21. <el-table-column type="index" label="序号" align="center" width="40" />
  22. <el-table-column label="申请单号" min-width="100" prop="chargeRequestNo"></el-table-column>
  23. <el-table-column prop="hisChargeNo" label="his收费单" min-width="80" align="center" />
  24. <el-table-column prop="charges" label="金额" min-width="80" align="center" />
  25. <el-table-column prop="chargeRequestFlag" label="收费状态" width="70" align="center">
  26. <template slot-scope="scope">
  27. <div>{{ scope.row.chargeRequestFlag }}</div>
  28. </template>
  29. </el-table-column>
  30. <el-table-column prop="ch" label="收费人员" min-width="80" align="center" />
  31. <el-table-column prop="creationTime" label="申请时间" min-width="150" align="center" />
  32. <el-table-column label="操作" width="150" align="center">
  33. <template slot-scope="scope">
  34. <div style="display: flex;justify-content: space-between;">
  35. <div>
  36. <el-button class="commonbutton" @click="cancelRequest(scope.row)" style="width:80px;" :disabled="setBtnDisabled(scope.row,'cancel')">撤消申请</el-button>
  37. </div>
  38. <div>
  39. <el-button class="commonbutton" @click="chargeBack(scope.row)" style="width:50px;" :disabled="setBtnDisabled(scope.row,'chargeBack')">退费申请</el-button>
  40. </div>
  41. </div>
  42. </template>
  43. </el-table-column>
  44. </el-table>
  45. <div style="padding: 10px 0 5px 0;">申请单包含项目</div>
  46. <el-table :data="hisRequestDataDetails" border style="width: 100%" row-key="id"
  47. height="256" highlight-current-row size="small" :row-style="{ height: '25px' }">
  48. <el-table-column type="index" label="序号" align="center" width="40" />
  49. <el-table-column label="组合项目" min-width="150" prop="asbitemName"></el-table-column>
  50. <el-table-column label="数量" prop="amount" min-width="50" align="center"></el-table-column>
  51. <el-table-column label="实收价格" prop="chargePrice" min-width="70" align="center"></el-table-column>
  52. <el-table-column prop="total" label="金额" min-width="70" align="center" />
  53. </el-table>
  54. </el-tab-pane>
  55. </el-tabs>
  56. </div>
  57. <!-- 按钮区域 -->
  58. <div style="display: flex; margin-top: 10px; justify-content: space-between;">
  59. <div></div>
  60. <div style="display: flex;">
  61. <div style="margin-left: 10px" v-show="tabChoosed == '1'">
  62. <el-button class="commonbutton" @click="btnSubmit">收费申请</el-button>
  63. </div>
  64. <div style="margin-left: 10px">
  65. <el-button class="commonbutton" @click="dialogWin.AsbChargeRequest = false">关闭</el-button>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </template>
  71. <script>
  72. import { mapState } from "vuex";
  73. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  74. import { dddw, arrayExistObj, deepCopy } from "../../utlis/proFunc";
  75. // import
  76. export default {
  77. props: ["patientRegister"],
  78. data() {
  79. return {
  80. tabChoosed: '1',
  81. tableData: [], //组合项目数据 过滤后显示的数据
  82. selectedData: [], //选中的组合项目
  83. hisRequestData: [], //收费申请单
  84. hisRequestDataDetails: [], //收费申请单明细
  85. };
  86. },
  87. created() {
  88. },
  89. mounted() {
  90. this.initData(this.patientRegister.id);
  91. },
  92. computed: {
  93. ...mapState(["dict", "dataTransOpts", "dialogWin"]),
  94. },
  95. methods: {
  96. initData(patientRegisterId) {
  97. this.tableData = []
  98. this.hisRequestData = []
  99. if (!patientRegisterId) return
  100. //待收费项目
  101. postapi('/api/app/registerasbitem/GetCanChargeAsbitemsByPatientRegisterId', { patientRegisterId })
  102. .then(res => {
  103. if (res.code > -1) {
  104. res.data.forEach(e => {
  105. e.total = Number(e.chargePrice * e.amount)
  106. this.tableData.push(e)
  107. });
  108. }
  109. })
  110. // 收费申请单
  111. postapi('/api/app/ChargeRequest/GetChargeRequestsByPatientRegisterId', { patientRegisterId })
  112. .then(res => {
  113. if (res.code > -1) {
  114. this.hisRequestData = res.data
  115. }
  116. })
  117. },
  118. handleSelectionChange(v) {
  119. this.selectedData = v;
  120. },
  121. setBtnDisabled(row,oprType){
  122. let ret = true
  123. if(oprType == 'chargeBack'){
  124. }else{
  125. }
  126. },
  127. // 获取申请单明细
  128. rowClick(row){
  129. this.hisRequestDataDetails = []
  130. postapi('/api/app/ChargeRequest/GetChargeRequestAsbitemsByChargeQuestId', { chargeRequestId: row.id })
  131. .then(res => {
  132. if (res.code > -1) {
  133. res.data.forEach(e => {
  134. e.total = Number(e.chargePrice*e.amount)
  135. this.hisRequestDataDetails.push(e)
  136. });
  137. }
  138. })
  139. },
  140. // 撤消申请
  141. cancelRequest(row) {
  142. postapi('/api/app/ChargeRequest/CancelChargeRequest', { chargeRequestId: row.id })
  143. .then(res => {
  144. if (res.code > -1) {
  145. //
  146. }
  147. })
  148. },
  149. // 退费
  150. chargeBack(row) {
  151. postapi('/api/app/ChargeRequest/RefundChargeRequest', { chargeRequestId: row.id })
  152. .then(res => {
  153. if (res.code > -1) {
  154. //
  155. }
  156. })
  157. },
  158. btnSubmit() {
  159. if (this.selectedData.length == 0) {
  160. this.$message.warning({ showClose: true, message: `请勾选要发送收费申请的检查项目!` });
  161. return;
  162. }
  163. let body = {
  164. patientRegisterId: this.patientRegister.id,
  165. registerCheckAsbitems: []
  166. }
  167. this.selectedData.forEach(e => {
  168. body.registerCheckAsbitems.push({ registerCheckAsbitemId: e.registerCheckAsbitemId })
  169. });
  170. postapi("/api/app/ChargeRequest/Create", body)
  171. .then(res => {
  172. if (res.code > -1) {
  173. this.initData(this.patientRegister.id)
  174. }
  175. });
  176. },
  177. },
  178. //监听事件
  179. watch: {
  180. //
  181. "dataTransOpts.refresh.charge.S": {
  182. // immediate: true, // 立即执行
  183. // // deep: true, // 深度监听复杂类型内变化
  184. handler(newVal, oldVal) {
  185. console.log(`watch: 收费 newVal: ${newVal}, oldVal: ${oldVal}, 人员条码号: `, this.patientRegister.id)
  186. if (newVal != oldVal) this.initData(this.patientRegister.id)
  187. }
  188. },
  189. },
  190. };
  191. </script>
  192. <style scoped>
  193. @import "../../assets/css/global_input.css";
  194. @import "../../assets/css/global_table.css";
  195. @import "../../assets/css/global.css";
  196. </style>