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.

315 lines
10 KiB

1 month ago
  1. <template>
  2. <div>
  3. <div class="middlebox">
  4. <div class="contenttitle">
  5. 体检查询 /
  6. <span class="contenttitleBold">短信随访记录</span>
  7. </div>
  8. </div>
  9. <div
  10. style="display: flex;justify-content: space-between; padding: 10px;background-color: #fff;border-radius: 8px;margin-bottom: 10px;">
  11. <div style="display:block;">
  12. <div style="display: flex;flex-wrap: wrap;height: 32px;align-items: center;">
  13. <div class="query">
  14. <el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small">
  15. <el-option label="随访日期" :value="'1'" />
  16. </el-select>
  17. <el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" style="width:90px;"
  18. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  19. <span class="spanClass"></span>
  20. <el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width:90px;"
  21. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  22. </div>
  23. <div class="query">
  24. <span class="spanClass">完成状态</span>
  25. <el-select v-model="query.isComplete" placeholder="完成状态" style="width: 80px" size="small" clearable>
  26. <el-option label="已完成" value="Y" />
  27. <el-option label="未完成" value="N" />
  28. </el-select>
  29. </div>
  30. <div class="query">
  31. <span class="spanClass">条码号</span>
  32. <el-input placeholder="条码号" v-model="query.patientRegisterNo" size="small" clearable style="width: 140px"/>
  33. </div>
  34. <div class="query">
  35. <span class="spanClass">档案号</span>
  36. <el-input placeholder="档案号" v-model="query.patientNo" size="small" clearable style="width: 140px"/>
  37. </div>
  38. </div>
  39. <div style="display: flex;flex-wrap: wrap;margin-top: 2px; height: 32px;align-items: center;">
  40. <div class="query">
  41. <span class="spanClass">身份证号</span>
  42. <el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 160px"/>
  43. </div>
  44. <div class="query">
  45. <span class="spanClass">姓名</span>
  46. <el-input placeholder="姓名" v-model="query.patientName" size="small" clearable style="width: 80px"/>
  47. </div>
  48. <div class="query">
  49. <span class="spanClass">其他关键字</span>
  50. <el-input placeholder="其他关键字" v-model="query.keyWord" size="small" clearable style="width: 80px"/>
  51. </div>
  52. </div>
  53. </div>
  54. <div style="display: block;width: 110px;">
  55. <div>
  56. <el-button type="primary" class="commonbutton" @click="btnQuery" size="small">查询</el-button>
  57. </div>
  58. <div style="margin-top: 5px;">
  59. <el-button class="commonbutton" @click="btnExport('tableData')" size="small">导出</el-button>
  60. </div>
  61. </div>
  62. </div>
  63. <div id="tableData">
  64. <el-table :data="tableData" border :height="window.pageHeight - 192" highlight-current-row size="small"
  65. row-key="id" show-summary ref="refTable"> <!-- :summary-method="getSummaries" -->
  66. <el-table-column type="index" label="序号" width="50" align="center" />
  67. <el-table-column prop="followUpTypeName" label="随访类型" min-width="80" align="center" filterable/>
  68. <el-table-column prop="followUpSourceName" label="随访来源" min-width="80" align="center" filterable/>
  69. <el-table-column prop="followUpContent" label="随访内容" min-width="250" filterable/>
  70. <el-table-column prop="replyContent" label="回复内容" min-width="200" align="center" filterable/>
  71. <el-table-column prop="isComplete" label="完成" min-width="40" align="center">
  72. <template slot-scope="scope">
  73. <el-checkbox v-model="scope.row.isComplete" true-label="Y" false-label="N" disabled />
  74. </template>
  75. </el-table-column>
  76. <el-table-column prop="planFollowDate" label="随访日期" min-width="100" align="center" filterable>
  77. <template slot-scope="scope">
  78. <div>
  79. {{ moment(scope.row.planFollowDate).format("yyyy-MM-DD") }}
  80. </div>
  81. </template>
  82. </el-table-column>
  83. <el-table-column prop="lastModifierName" label="修改人" min-width="80" align="center" />
  84. <el-table-column prop="lastModificationTime" label="修改日期" min-width="100" align="center">
  85. <template slot-scope="scope">
  86. <div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
  87. </template>
  88. </el-table-column>
  89. <el-table-column prop="creatorName" label="登记人" min-width="80" align="center" />
  90. <el-table-column prop="creationTime" label="登记日期" min-width="100" align="center">
  91. <template slot-scope="scope">
  92. <div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. </div>
  97. </div>
  98. </template>
  99. <script>
  100. import { mapState } from "vuex";
  101. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  102. import { deepCopy } from "../../utlis/proFunc"
  103. import moment from "moment";
  104. import FileSaver from 'file-saver';
  105. export default {
  106. components: {
  107. },
  108. props: ["orgEnable"],
  109. data() {
  110. return {
  111. query: {
  112. dateType: '1',
  113. startDate: '',
  114. endDate: '',
  115. patientName: '',
  116. idNo: '',
  117. patientRegisterNo: '',
  118. patientNo: '',
  119. keyWord:'',
  120. isComplete: 'Y',
  121. },
  122. tableData: [],
  123. };
  124. },
  125. created() {
  126. },
  127. //挂载完成
  128. mounted() {
  129. this.dictInit()
  130. },
  131. updated() {
  132. // this.$nextTick(() => {
  133. // this.$refs['refTable'].doLayout()
  134. // })
  135. },
  136. computed: {
  137. ...mapState(["pickerOptions","window", "dict"]),
  138. },
  139. methods: {
  140. //获取初始数据
  141. dictInit() {
  142. let today = moment(new Date()).format("YYYY-MM-DD")
  143. this.query.startDate = today
  144. this.query.endDate = today
  145. // //获取单位列表
  146. // getapi("/api/app/customer-org/parent-all").then((res) => {
  147. // if (res.code != -1) {
  148. // this.customerOrgAll = res.data;
  149. // this.customerOrg = deepCopy(this.customerOrgAll).slice(0,100);
  150. // }
  151. // });
  152. // // 体检类别
  153. // getapi("/api/app/medical-type/in-filter").then((res) => {
  154. // if (res.code > -1) {
  155. // this.dict.medicalType = res.data;
  156. // this.medicalType = res.data
  157. // }
  158. // });
  159. // //人员类别
  160. // getapi("/api/app/personnel-type/in-filter").then((res) => {
  161. // if (res.code == 1) {
  162. // this.dict.personnelType = res.data;
  163. // this.personnelType = res.data;
  164. // }
  165. // });
  166. // // 业务员 {
  167. // postapi('/api/identity/users/GetUserListBySaleRole')
  168. // .then(res => {
  169. // if (res.code > -1) {
  170. // this.dictSalesman = res.data
  171. // }
  172. // })
  173. },
  174. //通用导出
  175. btnExport(elId) {
  176. let table = document.getElementById(elId);
  177. let tableData = table.innerHTML
  178. let fileName = moment(new Date()).format('yyyyMMDDHHmmss') + '.xls'
  179. let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
  180. FileSaver.saveAs(blob, fileName);
  181. },
  182. // // 单位过滤
  183. // filterMethod(keyWords) {
  184. // if (keyWords) {
  185. // this.customerOrg = [];
  186. // let customerOrgFilter = []
  187. // this.customerOrgAll.forEach((item) => {
  188. // if (
  189. // item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
  190. // item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  191. // // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  192. // ) {
  193. // customerOrgFilter.push(item);
  194. // }
  195. // });
  196. // this.customerOrg = customerOrgFilter.slice(0,100)
  197. // } else {
  198. // this.customerOrg = deepCopy(this.customerOrgAll).slice(0,100);
  199. // }
  200. // },
  201. // 查询
  202. btnQuery() {
  203. //let body = deepCopy(this.query)
  204. this.tableData = []
  205. let body = Object.assign({},this.query)
  206. Object.keys(this.query).forEach(key => {
  207. console.log(key,this.query[key])
  208. if(!this.query[key]) delete body[key]
  209. });
  210. postapi("/api/app/SmsSend/GetList", body).then(res => {
  211. if (res.code > -1) {
  212. this.tableData = res.data
  213. }
  214. })
  215. },
  216. //合计
  217. getSummaries(param) {
  218. console.log('getSummaries param', param)
  219. // if(!param){
  220. // param = {
  221. // columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
  222. // data:this.customerOrgGroupAsbitems
  223. // }
  224. // }
  225. const { columns, data } = param;
  226. const sumCol = [2, 3, 4, 7, 8, 9] //需合计的列
  227. const sums = [];
  228. columns.forEach((column, index) => {
  229. //console.log('column, index,data',column, index,data)
  230. //显示合计列
  231. if (index === 1) {
  232. sums[index] = '合计';
  233. return;
  234. }
  235. //不合计的列
  236. if (sumCol.indexOf(index) == -1) {
  237. sums[index] = '';
  238. return;
  239. }
  240. sums[index] = 0
  241. data.forEach(e => {
  242. if (!isNaN(e[column.property])) sums[index] += Number(e[column.property])// * e['amount']
  243. })
  244. sums[index] = sums[index].toFixed(2) //+ ' 元';
  245. });
  246. // this.groupPrice = sums[7];
  247. // console.log('getSummaries',sums)
  248. // if (!this.totalFoucs) this.total = sums[5];
  249. // if (!this.discountFoucs) this.discount = Number(this.total * 100 / this.totalStand).toFixed(2);
  250. return sums;
  251. },
  252. },
  253. };
  254. </script>
  255. <style scoped>
  256. @import '../../assets/css/global.css';
  257. @import '../../assets/css/global_font.css';
  258. ::v-deep .el-input__inner {
  259. /*text-align: center;*/
  260. padding-left: 5px;
  261. padding-right: 15px;
  262. }
  263. ::v-deep .el-input__icon {
  264. width: 15px;
  265. /* 输入框下拉箭头或清除图标 默认 25 */
  266. }
  267. ::v-deep .el-input-group__append {
  268. padding: 0 5px;
  269. /* 控件默认 0 20px;*/
  270. }
  271. ::v-deep .el-icon-search:before {
  272. color: #00F;
  273. }
  274. .query {
  275. margin-left: 10px;
  276. font-size: 14px;
  277. color: #232748;
  278. font-weight: 400;
  279. font-family: "NotoSansSC-Regular";
  280. }
  281. .spanClass {
  282. padding: 0 2px 0 0;
  283. }
  284. </style>