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.

264 lines
8.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
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
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>
  3. <div style="position: relative">
  4. <div class="middlebox">
  5. <div class="contenttitle">
  6. 收费 /
  7. <span class="contenttitleBold"
  8. >会员卡记账记录</span
  9. >
  10. </div>
  11. </div>
  12. <div style="margin-top:7px">
  13. <div style="background-color: #fff; padding: 15px; border-radius: 8px;display: flex;flex-wrap: wrap; margin-bottom: 10px;height:80px;margin-top: 7px;">
  14. <div class="query">
  15. <span>记账日期</span>
  16. <el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" />
  17. <span>--</span>
  18. <el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small"/>
  19. </div>
  20. <div class="query">
  21. <span>记账标志</span>
  22. <el-select v-model="query.billFlag" placeholder="请选择" filterable clearable size="small">
  23. <el-option v-for="item in dict.billFlag" :key="item.id" :label="item.displayName" :value="item.id" />
  24. </el-select>
  25. </div>
  26. <div class="query">
  27. <span>支付方式</span>
  28. <el-select v-model="query.payModeId" placeholder="请选择" filterable clearable size="small">
  29. <el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" />
  30. </el-select>
  31. </div>
  32. <div class="query">
  33. <span>卡号</span>
  34. <el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 190px"/>
  35. </div>
  36. <div class="query">
  37. <span>卡主姓名</span>
  38. <el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 190px"/>
  39. </div>
  40. <div class="query">
  41. <span>身份证号</span>
  42. <el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 190px"/>
  43. </div>
  44. <div class="query">
  45. <span>电话</span>
  46. <el-input placeholder="手机号/电话" v-model="query.mobileTelephone" size="small" clearable style="width: 190px"/>
  47. </div>
  48. <div class="query">
  49. <el-button class="commonbutton" @click="btnQuery">查询</el-button>
  50. </div>
  51. </div>
  52. <div style="background-color: #fff; padding: 15px; border-radius: 8px;">
  53. <el-table :data="dataList" width="100%" :height="window.pageHeight < 600 ? 330 : window.pageHeight - 250"
  54. row-key="id" highlight-current-row ref="dataList">
  55. <el-table-column prop="cardNo" label="会员卡号" width="150" />
  56. <el-table-column prop="customerName" label="卡主姓名" />
  57. <el-table-column prop="mobileTelephone" label="手机号" />
  58. <el-table-column prop="payModeId" label="支付方式">
  59. <template slot-scope="scope">
  60. <div>{{ dddw(dict.payMode, "id", scope.row.payModeId, "displayName") }}</div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column prop="billMoney" label="记账金额" />
  64. <el-table-column prop="billFlag" label="记账标志">
  65. <template slot-scope="scope">
  66. <div>{{ dddw(dict.billFlag, "id", scope.row.billFlag, "displayName") }}</div>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="creatorName" label="创建人员" />
  70. <el-table-column prop="creationTime" label="创建日期" width="150">
  71. <template slot-scope="scope">
  72. <div v-if="scope.row.creationTime">
  73. {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}
  74. </div>
  75. </template>
  76. </el-table-column>
  77. <el-table-column prop="lastModifierName" label="修改人员" />
  78. <el-table-column prop="lastModificationTime" label="修改日期" width="150">
  79. <template slot-scope="scope">
  80. <div v-if="scope.row.lastModificationTime">
  81. {{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }}
  82. </div>
  83. </template>
  84. </el-table-column>
  85. </el-table>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </template>
  91. <script>
  92. import moment from "moment";
  93. import { mapState, mapActions } from "vuex";
  94. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  95. import { dddw, objCopy, arrayReduce, arrayExistObj } from "@/utlis/proFunc";
  96. export default {
  97. components: {
  98. },
  99. data() {
  100. return {
  101. query: {
  102. startDate:'',
  103. endDate:'',
  104. billFlag:'',
  105. payModeId:'',
  106. cardNo:'',
  107. customerName:'',
  108. idNo:'',
  109. mobileTelephone:''
  110. }, //查询条件
  111. dataList: [], //列表数据
  112. };
  113. },
  114. created() {
  115. this.query.startDate = new Date();
  116. this.query.endDate = this.query.startDate;
  117. },
  118. //挂载完成
  119. mounted() {
  120. this.dicInit();
  121. },
  122. computed: {
  123. ...mapState(["window", "dict"]),
  124. },
  125. methods: {
  126. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  127. dddw, moment,
  128. //查询
  129. btnQuery(queryType) {
  130. let body = {}
  131. switch (queryType) {
  132. case 'idNo':
  133. if(!this.query.idNo) return;
  134. body = { idNo: this.query.idNo };
  135. break;
  136. case 'cardNo':
  137. if(!this.query.cardNo) return;
  138. body = { cardNo: this.query.cardNo };
  139. break;
  140. default:
  141. if(this.query.idNo){
  142. body = { idNo: this.query.idNo };
  143. }else if(this.query.cardNo){
  144. body = { cardNo: this.query.cardNo };
  145. }else{
  146. // if(!this.query.startDate) this.query.startDate = moment(new Date()).format('yyyy-MM-DD');
  147. // if(!this.query.endDate) this.query.endDate = moment(new Date()).format('yyyy-MM-DD');
  148. if(this.query.startDate > this.query.endDate){
  149. this.$message.error("数据不合法,起始日期不能大于截止日期!");
  150. return;
  151. }
  152. body.startDate = moment(this.query.startDate).format('yyyy-MM-DD');
  153. body.endDate = moment(this.query.endDate).format('yyyy-MM-DD');
  154. if(this.query.cardModeId) body.cardModeId = this.query.cardModeId;
  155. if(this.query.cardTypeId) body.cardTypeId = this.query.cardTypeId;
  156. if(this.query.customerName) body.customerName = this.query.customerName;
  157. if(this.query.cardFlag) body.cardFlag = this.query.cardFlag;
  158. if(this.query.mobileTelephone) body.mobileTelephone = this.query.mobileTelephone;
  159. }
  160. break;
  161. }
  162. // {
  163. // "cardNo": "string",
  164. // "customerName": "string",
  165. // "idNo": "string",
  166. // "mobileTelephone": "string",
  167. // "billFlag": "string",
  168. // "startDate": "string",
  169. // "endDate": "string"
  170. // }
  171. postapi('/api/app/cardbill/getcardbilllist', body)
  172. .then((res) => {
  173. if (res.code != -1) {
  174. this.dataList = res.data;
  175. }
  176. });
  177. },
  178. dicInit(){
  179. //支付方式
  180. getapi("/api/app/pay-mode").then((res) => {
  181. if (res.code == 1) {
  182. this.dict.payMode = res.data;
  183. }
  184. });
  185. }
  186. },
  187. //监听事件
  188. watch: {
  189. //触发查询事件
  190. "patientRegister.query.times"(newVal, oldVal) {
  191. if (newVal != oldVal) {
  192. //alert('触发查询事件')
  193. this.query();
  194. }
  195. },
  196. },
  197. };
  198. </script>
  199. <style scoped>
  200. @import "../../assets/css/global_button.css";
  201. @import "../../assets/css/global_dialog.css";
  202. @import "../../assets/css/global_table.css";
  203. @import "../../assets/css/global_form.css";
  204. @import "../../assets/css/global_input.css";
  205. @import "../../assets/css/global.css";
  206. ::v-deep .el-input__inner {
  207. /*text-align: center;*/
  208. padding-left: 5px;
  209. padding-right: 25px;
  210. }
  211. ::v-deep .el-icon-date:before {
  212. content: ""
  213. }
  214. .query{
  215. margin-right: 15px;
  216. display: flex;
  217. justify-content: center;
  218. align-items: center;
  219. font-size: 14px;
  220. color: #232748;
  221. font-size: 400;
  222. font-family: "NotoSansSC-Regular";
  223. }
  224. .box {
  225. display: flex;
  226. flex-direction: column;
  227. }
  228. :deep .el-form-item {
  229. margin-bottom: 14px;
  230. }
  231. /* el-dialog的头部样式 */
  232. :deep .el-dialog__header {
  233. padding: 11px 20px 11px;
  234. }
  235. /* el-dialog的主体样式 */
  236. :deep .el-dialog__body {
  237. padding: 0px 20px 0px;
  238. }
  239. /* el-divider样式 */
  240. :deep .el-divider--horizontal {
  241. margin: 0px 0 12px;
  242. }
  243. /* el-dialog的底部样式 */
  244. :deep .el-dialog__footer {
  245. padding: 0px 20px 14px;
  246. }
  247. .query:last-child{
  248. margin-right: 0;
  249. }
  250. </style>