userPrescribeDetails.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <div class="aacontainer">
  3. <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
  4. <el-tab-pane label="全部订单" name="10"></el-tab-pane>
  5. <el-tab-pane v-for="(item,index) in prescribeStatusOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  6. </el-tabs>
  7. <el-table v-loading="loading" :data="prescribeList" @selection-change="handleSelectionChange">
  8. <el-table-column type="selection" width="55" align="center" />
  9. <el-table-column label="处方单编号" align="center" prop="prescribeCode" width="180px" />
  10. <el-table-column label="处方类型" align="center" prop="prescribeType" >
  11. <template slot-scope="scope">
  12. <dict-tag :options="prescribeType" :value="scope.row.prescribeType"/>
  13. </template>
  14. </el-table-column>
  15. <el-table-column label="患者年龄" align="center" prop="patientAge" />
  16. <el-table-column label="患者姓名" align="center" prop="patientName" />
  17. <el-table-column label="诊断" align="center" prop="diagnose" />
  18. <el-table-column label="医生名称" align="center" prop="doctorName" />
  19. <el-table-column label="状态" align="center" prop="status" >
  20. <template slot-scope="scope">
  21. <dict-tag :options="prescribeStatusOptions" :value="scope.row.status"/>
  22. </template>
  23. </el-table-column>
  24. <el-table-column label="审核时间" align="center" prop="auditTime" width="180" />
  25. <el-table-column label="创建时间" align="center" prop="createTime" width="180" />
  26. </el-table>
  27. <pagination
  28. v-show="total>0"
  29. :total="total"
  30. :page.sync="queryParams.pageNum"
  31. :limit.sync="queryParams.pageSize"
  32. @pagination="getList"
  33. />
  34. <!-- <el-drawer
  35. :with-header="false"
  36. size="75%"
  37. :title="show.title" :visible.sync="show.open">
  38. <orderDetails ref="Details" />
  39. </el-drawer> -->
  40. </div>
  41. </template>
  42. <script>
  43. import { listPrescribe, getPrescribe, delPrescribe, addPrescribe, updatePrescribe, exportPrescribe } from "@/api/his/prescribe";
  44. export default {
  45. name: "userPrescribeDetails",
  46. props:["data"],
  47. data() {
  48. return {
  49. createTime:null,
  50. pjtUrl: process.env.VUE_APP_BASE_API+"/",
  51. show:{
  52. title:"订单详情",
  53. open:false,
  54. },
  55. // 遮罩层
  56. loading: true,
  57. // 导出遮罩层
  58. exportLoading: false,
  59. // 选中数组
  60. ids: [],
  61. // 非单个禁用
  62. single: true,
  63. // 非多个禁用
  64. multiple: true,
  65. // 显示搜索条件
  66. showSearch: true,
  67. // 总条数
  68. total: 0,
  69. // 处方表格数据
  70. prescribeList: [],
  71. // 弹出层标题
  72. title: "",
  73. // 是否显示弹出层
  74. open: false,
  75. // 查询参数
  76. queryParams: {
  77. pageNum: 1,
  78. pageSize: 10,
  79. prescribeType: null,
  80. inquiryOrderId: null,
  81. storeOrderId: null,
  82. userId: null,
  83. patientId: null,
  84. prescribeCode: null,
  85. patientDescs: null,
  86. nowIllness: null,
  87. historyIllness: null,
  88. patientAge: null,
  89. patientName: null,
  90. weight: null,
  91. sTime:null,
  92. eTime:null,
  93. isHistoryAllergic: null,
  94. historyAllergic: null,
  95. liverUnusual: null,
  96. renalUnusual: null,
  97. isLactation: null,
  98. patientTel: null,
  99. patientGender: null,
  100. recordPic: null,
  101. prescribeImgUrl: null,
  102. auditReason: null,
  103. diagnose: null,
  104. doctorId: null,
  105. status: null,
  106. auditTime: null
  107. },
  108. actName:"10",
  109. // 表单参数
  110. form: {},
  111. // 表单校验
  112. rules: {
  113. },
  114. prescribeStatusOptions:[],
  115. prescribeType:[],
  116. orOptions:[],
  117. sexOptions:[],
  118. };
  119. },
  120. created() {
  121. this.getDicts("sys_prescribe_status").then(response => {
  122. this.prescribeStatusOptions = response.data;
  123. });
  124. this.getDicts("sys_prescribe_type").then(response => {
  125. this.prescribeType = response.data;
  126. });
  127. this.getDicts("sys_sex").then(response => {
  128. this.sexOptions = response.data;
  129. });
  130. this.getDicts("sys_company_or").then(response => {
  131. this.orOptions = response.data;
  132. });
  133. },
  134. methods: {
  135. handleClickX(tab, event) {
  136. if(tab.name=="10"){
  137. this.queryParams.status=null;
  138. }else{
  139. this.queryParams.status=tab.name;
  140. }
  141. this.handleQuery();
  142. },
  143. /** 查询处方列表 */
  144. getList() {
  145. this.loading = true;
  146. listPrescribe(this.queryParams).then(response => {
  147. this.prescribeList = response.rows;
  148. this.total = response.total;
  149. this.loading = false;
  150. });
  151. },
  152. // 取消按钮
  153. cancel() {
  154. this.open = false;
  155. this.reset();
  156. },
  157. PrescribeDetails(id){
  158. this.queryParams.patientId=id;
  159. this.getList();
  160. },
  161. change(){
  162. if(this.createTime!=null){
  163. this.queryParams.sTime=this.createTime[0];
  164. this.queryParams.eTime=this.createTime[1];
  165. }else{
  166. this.queryParams.sTime=null;
  167. this.queryParams.eTime=null;
  168. }
  169. },
  170. // 表单重置
  171. reset() {
  172. this.form = {
  173. prescribeId: null,
  174. prescribeType: null,
  175. inquiryOrderId: null,
  176. storeOrderId: null,
  177. userId: null,
  178. patientId: null,
  179. prescribeCode: null,
  180. patientDescs: null,
  181. nowIllness: null,
  182. historyIllness: null,
  183. patientAge: null,
  184. patientName: null,
  185. weight: null,
  186. isHistoryAllergic: null,
  187. historyAllergic: null,
  188. liverUnusual: null,
  189. renalUnusual: null,
  190. isLactation: null,
  191. patientTel: null,
  192. patientGender: null,
  193. recordPic: null,
  194. prescribeImgUrl: null,
  195. auditReason: null,
  196. diagnose: null,
  197. doctorId: null,
  198. createTime: null,
  199. status: 0,
  200. auditTime: null
  201. };
  202. this.resetForm("form");
  203. },
  204. /** 搜索按钮操作 */
  205. handleQuery() {
  206. this.queryParams.pageNum = 1;
  207. this.getList();
  208. },
  209. /** 重置按钮操作 */
  210. resetQuery() {
  211. this.resetForm("queryForm");
  212. this.createTime=null;
  213. this.queryParams.sTime=null;
  214. this.queryParams.eTime=null;
  215. this.handleQuery();
  216. },
  217. // 多选框选中数据
  218. handleSelectionChange(selection) {
  219. this.ids = selection.map(item => item.prescribeId)
  220. this.single = selection.length!==1
  221. this.multiple = !selection.length
  222. },
  223. /** 新增按钮操作 */
  224. handleAdd() {
  225. this.reset();
  226. this.open = true;
  227. this.title = "添加处方";
  228. },
  229. /** 修改按钮操作 */
  230. handleUpdate(row) {
  231. this.reset();
  232. const prescribeId = row.prescribeId || this.ids
  233. getPrescribe(prescribeId).then(response => {
  234. this.form = response.data;
  235. this.open = true;
  236. this.title = "修改处方";
  237. });
  238. },
  239. /** 提交按钮 */
  240. submitForm() {
  241. this.$refs["form"].validate(valid => {
  242. if (valid) {
  243. if (this.form.prescribeId != null) {
  244. updatePrescribe(this.form).then(response => {
  245. this.msgSuccess("修改成功");
  246. this.open = false;
  247. this.getList();
  248. });
  249. } else {
  250. addPrescribe(this.form).then(response => {
  251. this.msgSuccess("新增成功");
  252. this.open = false;
  253. this.getList();
  254. });
  255. }
  256. }
  257. });
  258. },
  259. /** 删除按钮操作 */
  260. handleDelete(row) {
  261. const prescribeIds = row.prescribeId || this.ids;
  262. this.$confirm('是否确认删除处方编号为"' + prescribeIds + '"的数据项?', "警告", {
  263. confirmButtonText: "确定",
  264. cancelButtonText: "取消",
  265. type: "warning"
  266. }).then(function() {
  267. return delPrescribe(prescribeIds);
  268. }).then(() => {
  269. this.getList();
  270. this.msgSuccess("删除成功");
  271. }).catch(() => {});
  272. },
  273. /** 导出按钮操作 */
  274. handleExport() {
  275. const queryParams = this.queryParams;
  276. this.$confirm('是否确认导出所有处方数据项?', "警告", {
  277. confirmButtonText: "确定",
  278. cancelButtonText: "取消",
  279. type: "warning"
  280. }).then(() => {
  281. this.exportLoading = true;
  282. return exportPrescribe(queryParams);
  283. }).then(response => {
  284. this.download(response.msg);
  285. this.exportLoading = false;
  286. }).catch(() => {});
  287. }
  288. }
  289. };
  290. </script>