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.

177 lines
5.7 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
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 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
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div>
  3. <el-table :data="dataTransOpts.tableM.register_check_asbitem" border
  4. :height="window.pageHeight < 600 ? 124 : Math.floor((window.pageHeight - 228) / 3)" size="small"
  5. highlight-current-row :summary-method="getSummaries" show-summary ref="patientRegister.patientRegisterAbs">
  6. <el-table-column label="序号" width="50" align="center">
  7. <template slot-scope="scope">
  8. <div>
  9. <el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="left">
  10. <i v-if="scope.row.isBelongGroupPackage == 'Y'" class="el-icon-star-on" style="font-size: 16px;color: purple;" />
  11. </el-tooltip>
  12. {{ scope.$index + 1 }}
  13. </div>
  14. </template>
  15. </el-table-column>
  16. <el-table-column prop="asbitemName" label="已选组合项目" width="120" />
  17. <el-table-column prop="standardPrice" label="标准价" align="center" />
  18. <el-table-column prop="discount" label="折扣" align="center" />
  19. <el-table-column prop="amount" label="数量" width="50" align="center" />
  20. <el-table-column prop="chargePrice" label="价格" align="center" />
  21. <el-table-column prop="payTypeFlag" label="支付方式" align="center">
  22. <template slot-scope="scope">
  23. <div>{{ dddw(dict.payType, "id", scope.row.payTypeFlag, "displayName") }}</div>
  24. </template>
  25. </el-table-column>
  26. <el-table-column prop="isCharge" label="收费" min-width="50" align="center">
  27. <template slot-scope="scope">
  28. <el-checkbox :value="scope.row.isCharge == 'Y'" align="center" />
  29. </template>
  30. </el-table-column>
  31. <el-table-column prop="checkCompleteFlag" label="状态" min-width="50" align="center">
  32. <template slot-scope="scope">
  33. <div>
  34. {{
  35. dddw(
  36. dict.checkCompleteFlag,
  37. "id",
  38. scope.row.checkCompleteFlag,
  39. "displayName"
  40. )
  41. }}
  42. </div>
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="isLock" label="锁" min-width="50" align="center">
  46. <template slot-scope="scope">
  47. <el-checkbox :value="scope.row.isLock == 'Y'" align="center" />
  48. </template>
  49. </el-table-column>
  50. <el-table-column prop="creatorName" label="登记人" min-width="70" align="center" />
  51. <el-table-column prop="creationTime" label="登记日期" min-width="90" align="center">
  52. <template slot-scope="scope">
  53. <div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. </div>
  58. </template>
  59. <script>
  60. import moment from "moment";
  61. import { mapState } from "vuex";
  62. import { dddw } from "../../utlis/proFunc";
  63. import { getapi, postapi, putapi, deletapi } from "../../api/api";
  64. export default {
  65. components: {},
  66. data() {
  67. return {};
  68. },
  69. created() {
  70. },
  71. updated() {
  72. this.$nextTick(() => {
  73. this.$refs['patientRegister.patientRegisterAbs'].doLayout()
  74. })
  75. },
  76. //挂载完成
  77. mounted() { },
  78. computed: {
  79. ...mapState(["window", "dataTransOpts", "dict", "patientRegister"]),
  80. },
  81. methods: {
  82. dddw, moment,
  83. // 刷新登记的项目
  84. retrieveregister_check_asbitem(id) {
  85. this.dataTransOpts.tableM.register_check_asbitem = []
  86. if (!id) return
  87. getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
  88. .then(res => {
  89. console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
  90. if (res.code != -1) {
  91. res.data.forEach(e => {
  92. e.standTotal = e.amount * e.standardPrice
  93. e.total = e.amount * e.chargePrice
  94. });
  95. this.dataTransOpts.tableM.register_check_asbitem = res.data
  96. }
  97. })
  98. },
  99. // :row-class-name="tableRowClassName"
  100. // tableRowClassName({ row, rowIndex }) {
  101. // //console.log(row)
  102. // if (row.groupPackageId) {
  103. // //console.log('row.groupPackageId',row.groupPackageId)
  104. // return 'purple-row'; //分组或套餐
  105. // } else {
  106. // return '';
  107. // }
  108. // },
  109. //自定义计算列
  110. getSummaries(param) {
  111. const { columns, data } = param;
  112. const sumCol = [2, 5]; //需合计的列
  113. const sums = [];
  114. columns.forEach((column, index) => {
  115. //显示合计列
  116. if (index === 1) {
  117. sums[index] = "合计";
  118. return;
  119. }
  120. //不合计的列
  121. if (sumCol.indexOf(index) == -1) {
  122. sums[index] = "";
  123. return;
  124. }
  125. const values = data.map((item) => Number(item[column.property]));
  126. if (!values.every((value) => isNaN(value))) {
  127. sums[index] = values.reduce((prev, curr) => {
  128. const value = Number(curr);
  129. if (!isNaN(value)) {
  130. return prev + curr;
  131. } else {
  132. return prev;
  133. }
  134. }, 0);
  135. sums[index] = Math.round(sums[index], 2);
  136. sums[index] += " 元";
  137. } else {
  138. sums[index] = "N/A";
  139. }
  140. });
  141. return sums;
  142. },
  143. },
  144. //监听事件
  145. watch: {
  146. //人员ID未切换换时 也可以强制刷新数据
  147. "dataTransOpts.refresh.register_check_asbitem.M": {
  148. // immediate:true,
  149. handler(newVal, oldVal) {
  150. console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
  151. this.retrieveregister_check_asbitem(this.dataTransOpts.tableS.patient_register.id)
  152. }
  153. },
  154. }
  155. };
  156. </script>
  157. <style scoped>
  158. @import "../../assets/css/global.css";
  159. .box {
  160. display: flex;
  161. }
  162. </style>