userInquiryOrderDetails.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  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 inquiryStatusOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  6. </el-tabs>
  7. <el-table v-loading="loading" :data="inquiryOrderList" @selection-change="handleSelectionChange">
  8. <el-table-column label="订单号" align="center" prop="orderSn" width="200px"/>
  9. <el-table-column label="问诊标题" align="center" prop="title" show-overflow-tooltip />
  10. <el-table-column label="病人名称" align="center" prop="patientName" />
  11. <el-table-column label="医生名称" align="center" prop="doctorName" />
  12. <el-table-column label="订单类型" align="center" prop="orderType">
  13. <template slot-scope="scope">
  14. <dict-tag :options="inquiryOrderOptions" :value="scope.row.orderType"/>
  15. </template>
  16. </el-table-column>
  17. <el-table-column label="订单金额" align="center" prop="money" />
  18. <el-table-column label="支付金额" align="center" prop="payMoney" />
  19. <el-table-column label="支付类型" align="center" prop="payType" >
  20. <template slot-scope="scope">
  21. <dict-tag :options="inquiryPayOptions" :value="scope.row.payType"/>
  22. </template>
  23. </el-table-column>
  24. <el-table-column label="是否支付" align="center" prop="isPay" >
  25. <template slot-scope="scope">
  26. <dict-tag :options="orOptions" :value="scope.row.isPay"/>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="支付时间" align="center" prop="payTime" width="180"/>
  30. <el-table-column label="状态" align="center" prop="status" >
  31. <template slot-scope="scope">
  32. <dict-tag :options="inquiryStatusOptions" :value="scope.row.status" />
  33. </template>
  34. </el-table-column>
  35. <el-table-column label="订单类型" align="center" prop="orderType">
  36. <template slot-scope="scope">
  37. <dict-tag :options="inquiryOrderOptions" :value="scope.row.orderType"/>
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="订单子类型" align="center" prop="inquirySubType">
  41. <template slot-scope="scope">
  42. <dict-tag :options="inquirySubTypeOptions" :value="scope.row.inquirySubType"/>
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="支付类型" align="center" prop="payType" >
  46. <template slot-scope="scope">
  47. <dict-tag :options="inquiryPayOptions" :value="scope.row.payType"/>
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="是否支付" align="center" prop="isPay" >
  51. <template slot-scope="scope">
  52. <dict-tag :options="orOptions" :value="scope.row.isPay"/>
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="订单金额" align="center" prop="money" />
  56. <el-table-column label="支付金额" align="center" prop="payMoney" />
  57. <el-table-column label="优惠金额" align="center" prop="discountMoney" />
  58. <el-table-column label="支付时间" align="center" prop="payTime" width="180"/>
  59. <el-table-column label="审核时间" align="center" prop="auditTime" width="180"/>
  60. <el-table-column label="审核人" align="center" prop="userName" width="180"/>
  61. <el-table-column label="问诊开始时间" align="center" prop="startTime" width="180" />
  62. <el-table-column label="结束时间" align="center" prop="finishTime" width="180" />
  63. <el-table-column label="是否评价" align="center" prop="isPing" >
  64. <template slot-scope="scope">
  65. <dict-tag :options="orOptions" :value="scope.row.isPing"/>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="评分" align="center" prop="pingStar" width="170px">
  69. <template slot-scope="scope" >
  70. <el-rate v-if="scope.row.pingStar!=null"
  71. v-model="scope.row.pingStar"
  72. disabled
  73. show-score
  74. text-color="#ff9900"
  75. score-template="{value}">
  76. </el-rate>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="科室名称" align="center" prop="deptName" />
  80. </el-table>
  81. <pagination
  82. v-show="total>0"
  83. :total="total"
  84. :page.sync="queryParams.pageNum"
  85. :limit.sync="queryParams.pageSize"
  86. @pagination="getList"
  87. />
  88. <!-- <el-drawer
  89. :with-header="false"
  90. size="75%"
  91. :title="show.title" :visible.sync="show.open">
  92. <oexpertDetails ref="Details" />
  93. </el-drawer> -->
  94. </div>
  95. </template>
  96. <script>
  97. import { listinquiryOrder, getinquiryOrder, delinquiryOrder, addinquiryOrder, updateinquiryOrder, exportinquiryOrder } from "@/api/his/inquiryOrder";
  98. export default {
  99. name: "inquiryOrderUser",
  100. data() {
  101. return {
  102. show:{
  103. title:"问诊详情",
  104. open:false,
  105. },
  106. startTime:null,
  107. // 遮罩层
  108. loading: true,
  109. actName:"10",
  110. // 导出遮罩层
  111. exportLoading: false,
  112. // 选中数组
  113. ids: [],
  114. // 非单个禁用
  115. single: true,
  116. // 非多个禁用
  117. multiple: true,
  118. // 显示搜索条件
  119. showSearch: true,
  120. // 总条数
  121. total: 0,
  122. // 问诊订单表格数据
  123. inquiryOrderList: [],
  124. // 弹出层标题
  125. title: "",
  126. // 是否显示弹出层
  127. open: false,
  128. // 查询参数
  129. queryParams: {
  130. pageNum: 1,
  131. pageSize: 10,
  132. orderSn: null,
  133. title: null,
  134. imgs: null,
  135. userId: null,
  136. patientId: null,
  137. orderType: null,
  138. money: null,
  139. payMoney: null,
  140. payType: null,
  141. isPay: null,
  142. doctorId: null,
  143. payTime: null,
  144. status: null,
  145. startTime: null,
  146. sTime:null,
  147. eTime:null,
  148. finishTime: null,
  149. isPing: null,
  150. pingStar: null,
  151. pingContent: null,
  152. departmentId: null,
  153. inquiryType: null,
  154. doctorName:null,
  155. patientName:null,
  156. },
  157. // 表单参数
  158. form: {},
  159. // 表单校验
  160. rules: {
  161. },
  162. inquiryStatusOptions:[],
  163. inquiryTypeOptions:[],
  164. inquiryPayOptions:[],
  165. inquiryOrderOptions:[],
  166. inquirySubTypeOptions:[],
  167. orOptions:[],
  168. };
  169. },
  170. created() {
  171. this.getDicts("sys_inquiry_status").then(response => {
  172. this.inquiryStatusOptions = response.data;
  173. });
  174. this.getDicts("sys_inquiry_type").then(response => {
  175. this.inquiryTypeOptions = response.data;
  176. });
  177. this.getDicts("sys_inquiry_pay").then(response => {
  178. this.inquiryPayOptions = response.data;
  179. });
  180. this.getDicts("sys_inquiry_order_type").then(response => {
  181. this.inquiryOrderOptions = response.data;
  182. });
  183. this.getDicts("sys_inquiry_sub_type").then(response => {
  184. this.inquirySubTypeOptions = response.data;
  185. });
  186. this.getDicts("sys_company_or").then(response => {
  187. this.orOptions = response.data;
  188. });
  189. },
  190. methods: {
  191. change(){
  192. if(this.startTime!=null){
  193. this.queryParams.sTime=this.startTime[0];
  194. this.queryParams.eTime=this.startTime[1];
  195. }else{
  196. this.queryParams.sTime=null;
  197. this.queryParams.eTime=null;
  198. }
  199. },
  200. // handledetails(row){
  201. // this.show.open=true;
  202. // setTimeout(() => {
  203. // this.$refs.Details.getDetails(row.orderId);
  204. // }, 1);
  205. // },
  206. /** 查询问诊订单列表 */
  207. /** 查询问诊订单列表 */
  208. getList() {
  209. this.loading = true;
  210. listinquiryOrder(this.queryParams).then(response => {
  211. this.inquiryOrderList = response.rows;
  212. this.total = response.total;
  213. this.loading = false;
  214. });
  215. },
  216. getInquiryDetails(id,o){
  217. if(o==1){
  218. this.queryParams.userId=id
  219. }else{
  220. this.queryParams.patientId=id
  221. }
  222. this.getList();
  223. },
  224. // 取消按钮
  225. cancel() {
  226. this.open = false;
  227. this.reset();
  228. },
  229. // 表单重置
  230. reset() {
  231. this.form = {
  232. orderId: null,
  233. orderSn: null,
  234. title: null,
  235. imgs: null,
  236. userId: null,
  237. patientId: null,
  238. orderType: null,
  239. money: null,
  240. payMoney: null,
  241. payType: null,
  242. isPay: null,
  243. doctorId: null,
  244. createTime: null,
  245. payTime: null,
  246. status: null,
  247. startTime: null,
  248. finishTime: null,
  249. remark: null,
  250. isPing: null,
  251. pingStar: null,
  252. pingContent: null,
  253. departmentId: null,
  254. inquiryType: 1,
  255. doctorName:null,
  256. patientName:null,
  257. sTime:null,
  258. eTime:null,
  259. };
  260. this.resetForm("form");
  261. },
  262. /** 搜索按钮操作 */
  263. handleQuery() {
  264. this.queryParams.pageNum = 1;
  265. this.getList();
  266. },
  267. /** 重置按钮操作 */
  268. resetQuery() {
  269. this.resetForm("queryForm");
  270. this.startTime=null;
  271. this.queryParams.sTime=null;
  272. this.queryParams.eTime=null;
  273. this.handleQuery();
  274. },
  275. // 多选框选中数据
  276. handleSelectionChange(selection) {
  277. this.ids = selection.map(item => item.orderId)
  278. this.single = selection.length!==1
  279. this.multiple = !selection.length
  280. },
  281. /** 新增按钮操作 */
  282. handleAdd() {
  283. this.reset();
  284. this.open = true;
  285. this.title = "添加问诊订单";
  286. },
  287. /** 修改按钮操作 */
  288. handleUpdate(row) {
  289. this.reset();
  290. const orderId = row.orderId || this.ids
  291. getOexpert(orderId).then(response => {
  292. this.form = response.data;
  293. this.open = true;
  294. this.title = "修改问诊订单";
  295. });
  296. },
  297. handleClickX(tab, event) {
  298. if(tab.name=="10"){
  299. this.queryParams.status=null;
  300. }else{
  301. this.queryParams.status=tab.name;
  302. }
  303. this.handleQuery();
  304. },
  305. /** 提交按钮 */
  306. submitForm() {
  307. this.$refs["form"].validate(valid => {
  308. if (valid) {
  309. if (this.form.orderId != null) {
  310. updateOexpert(this.form).then(response => {
  311. this.msgSuccess("修改成功");
  312. this.open = false;
  313. this.getList();
  314. });
  315. } else {
  316. addOexpert(this.form).then(response => {
  317. this.msgSuccess("新增成功");
  318. this.open = false;
  319. this.getList();
  320. });
  321. }
  322. }
  323. });
  324. },
  325. /** 删除按钮操作 */
  326. handleDelete(row) {
  327. const orderIds = row.orderId || this.ids;
  328. this.$confirm('是否确认删除问诊订单编号为"' + orderIds + '"的数据项?', "警告", {
  329. confirmButtonText: "确定",
  330. cancelButtonText: "取消",
  331. type: "warning"
  332. }).then(function() {
  333. return delOexpert(orderIds);
  334. }).then(() => {
  335. this.getList();
  336. this.msgSuccess("删除成功");
  337. }).catch(() => {});
  338. },
  339. /** 导出按钮操作 */
  340. handleExport() {
  341. const queryParams = this.queryParams;
  342. this.$confirm('是否确认导出所有问诊订单数据项?', "警告", {
  343. confirmButtonText: "确定",
  344. cancelButtonText: "取消",
  345. type: "warning"
  346. }).then(() => {
  347. this.exportLoading = true;
  348. return exportOexpert(queryParams);
  349. }).then(response => {
  350. this.download(response.msg);
  351. this.exportLoading = false;
  352. }).catch(() => {});
  353. }
  354. }
  355. };
  356. </script>