inquiryOrderDetails.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  1. <template>
  2. <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
  3. <div style="padding: 20px; background-color: #fff;">
  4. 订单详情
  5. </div>
  6. <div class="contentx" v-if="item!=null">
  7. <div class="desct">
  8. </div>
  9. <div class="order-status" v-if="item!=null" >
  10. <el-steps :active="item.status==4?item.status:item.status-1" align-center finish-status="success">
  11. <el-step :title="item.dictLabel" v-for="(item,index) in inquiryStatusOptions" v-if="index<4"></el-step>
  12. </el-steps>
  13. </div>
  14. <el-card shadow="never" style="margin-top: 15px">
  15. <div class="operate-container" v-if="item!=null">
  16. <span style="margin-left: 20px" class="color-danger">订单状态:
  17. <el-tag prop="status" v-for="(ite, index) in inquiryStatusOptions" v-if="item.status==ite.dictValue">{{ite.dictLabel}}</el-tag>
  18. </span>
  19. <div class="operate-button-container" >
  20. <el-button size="mini" @click="cancelorder()" v-if="item.status==2 && item.packageOrderId==null">取消订单</el-button>
  21. </div>
  22. <div class="operate-button-container" >
  23. <el-button size="mini" @click="refundorder()" v-if="item.status<1" v-hasPermi="['his:inquiryOrder:refundOrder']" >退款</el-button>
  24. </div>
  25. <div class="operate-button-container" >
  26. <el-button size="mini" @click="editStatus()" v-hasPermi="['his:inquiryOrder:editStatus']">修改订单</el-button>
  27. </div>
  28. <div class="operate-button-container" >
  29. <el-button size="mini" @click="sendInquiryMsg()" v-if="item.status==3" v-hasPermi="['his:inquiryOrder:sendMsg']">发送消息</el-button>
  30. </div>
  31. <div class="operate-button-container" >
  32. <el-button size="mini" @click="handledetails()" v-hasPermi="['his:inquiryOrderReport:query']">咨询报告</el-button>
  33. </div>
  34. <div class="operate-button-container" >
  35. <el-button size="mini" @click="handlePatient()" v-hasPermi="['his:inquiryOrderReport:query']">患者诊断数据</el-button>
  36. </div>
  37. </div>
  38. <div class="desct">
  39. 基本信息
  40. </div>
  41. <el-descriptions title="" :column="3" border>
  42. <el-descriptions-item label="订单号" ><span v-if="item!=null">{{item.orderSn}}</span></el-descriptions-item>
  43. <el-descriptions-item label="订单类型" ><dict-tag :options="inquiryTypeOptions" :value="item.inquiryType"/></el-descriptions-item>
  44. <el-descriptions-item label="优惠金额" ><span v-if="item!=null">{{item.discountMoney}}</span></el-descriptions-item>
  45. <el-descriptions-item label="订单金额" ><span v-if="item!=null">{{item.money}}</span></el-descriptions-item>
  46. <el-descriptions-item label="支付金额" ><span v-if="item!=null">{{item.payMoney}}</span></el-descriptions-item>
  47. <el-descriptions-item label="支付类型" ><span v-if="item!=null">{{item.payType}}</span></el-descriptions-item>
  48. <el-descriptions-item label="是否支付" ><dict-tag :options="orOptions" :value="item.isPay"/></el-descriptions-item>
  49. <el-descriptions-item label="支付时间" ><span v-if="item!=null">{{item.payTime}}</span></el-descriptions-item>
  50. <el-descriptions-item label="状态" ><dict-tag :options="inquiryStatusOptions" :value="item.status"/></el-descriptions-item>
  51. <el-descriptions-item label="创建时间" ><span v-if="item!=null">{{item.createTime}}</span></el-descriptions-item>
  52. <el-descriptions-item :label="item.inquiryType==1?'问诊标题':'咨询标题'" ><span v-if="item!=null">{{item.title}}</span></el-descriptions-item>
  53. <el-descriptions-item label="患者姓名" ><span v-if="item!=null">{{item.patientName}}</span></el-descriptions-item>
  54. <el-descriptions-item label="科室" ><span v-if="item!=null">{{item.deptName}}</span></el-descriptions-item>
  55. <el-descriptions-item label="优惠劵发送人" ><span v-if="item!=null">{{item.sendName}}</span></el-descriptions-item>
  56. <el-descriptions-item label="咨询类型" ><dict-tag :options="inquiryTypeOptions" :value="item.inquiryType"/></el-descriptions-item>
  57. <el-descriptions-item label="审核人" ><span v-if="item!=null">{{item.userName}}</span></el-descriptions-item>
  58. <el-descriptions-item label="审核时间" ><span v-if="item!=null">{{item.auditTime}}</span></el-descriptions-item>
  59. <el-descriptions-item label="咨询开始时间" ><span v-if="item!=null">{{item.startTime}}</span></el-descriptions-item>
  60. <el-descriptions-item label="结束时间" ><span v-if="item!=null">{{item.finishTime}}</span></el-descriptions-item>
  61. <el-descriptions-item label="备注" ><span v-if="item!=null">{{item.companyUserRemark}}</span></el-descriptions-item>
  62. </el-descriptions>
  63. </el-card>
  64. <el-dialog
  65. title="聊天记录"
  66. :visible.sync="dialogVisible"
  67. width="80%"
  68. :before-close="handleClose1" append-to-body >
  69. <msgDetails ref="msgDetails" :msgDialogClose="msgDialogClose" />
  70. <span slot="footer" class="dialog-footer">
  71. <el-button @click="dialogVisible = false">取 消</el-button>
  72. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  73. </span>
  74. </el-dialog>
  75. <el-dialog
  76. title="处方单"
  77. :visible.sync="editStatusOpen"
  78. width="60%"
  79. append-to-body >
  80. <el-form ref="form" :model="statusForm" label-width="120px">
  81. <el-form-item label="订单状态" prop="status">
  82. <el-select v-model="statusForm.status" placeholder="订单状态">
  83. <el-option
  84. v-for="dict in inquiryStatusOptions"
  85. :key="dict.dictValue"
  86. :label="dict.dictLabel"
  87. :value="parseInt(dict.dictValue)"
  88. />
  89. </el-select>
  90. </el-form-item>
  91. </el-form>
  92. <span slot="footer" class="dialog-footer">
  93. <el-button @click="editStatusOpen = false">取 消</el-button>
  94. <el-button type="primary" @click="editStatusOpenOk">确 定</el-button>
  95. </span>
  96. </el-dialog>
  97. <el-dialog
  98. title="患者问诊数据"
  99. :visible.sync="patientOpen"
  100. width="1000px"
  101. append-to-body>
  102. <el-form ref="patientForm" :model="patientForm" label-width="110px" >
  103. <el-row>
  104. <el-col :span="12">
  105. <el-form-item label="患者姓名" prop="patientName">
  106. <el-input disabled v-model="item.patientName"></el-input>
  107. </el-form-item>
  108. </el-col>
  109. <el-col :span="12">
  110. <el-form-item label="患者性别" prop="sex">
  111. <el-select disabled v-model="JSON.parse(item.patientJson).sex">
  112. <el-option label="男" :value = "1"></el-option>
  113. <el-option label="女" :value = "0"></el-option>
  114. </el-select>
  115. </el-form-item>
  116. </el-col>
  117. </el-row>
  118. <el-row>
  119. <el-col :span="12">
  120. <el-form-item label="患者年龄" prop="age">
  121. <el-input disabled v-model="JSON.parse(item.patientJson).age"></el-input>
  122. </el-form-item>
  123. </el-col>
  124. <el-col :span="12">
  125. <el-form-item label="患者电话" prop="mobile">
  126. <el-input disabled v-model="JSON.parse(item.patientJson).mobile"></el-input>
  127. </el-form-item>
  128. </el-col>
  129. </el-row>
  130. <el-row>
  131. <el-col :span="12">
  132. <el-form-item label="患者会员电话" prop="userPhone">
  133. <el-input disabled v-model="patientForm.userPhone"></el-input>
  134. </el-form-item>
  135. </el-col>
  136. <el-col :span="12">
  137. <el-form-item label="客户标签" prop="tag">
  138. <el-input v-model="patientForm.tag"></el-input>
  139. </el-form-item>
  140. </el-col>
  141. </el-row>
  142. <el-row>
  143. <el-col :span="12">
  144. <el-form-item label="客服姓名" prop="companyUserName">
  145. <el-input disabled v-model="patientForm.companyUserName"></el-input>
  146. </el-form-item>
  147. </el-col>
  148. <el-col :span="12">
  149. <el-form-item label="课程档期" prop="courseName">
  150. <el-input v-model="patientForm.courseName"></el-input>
  151. </el-form-item>
  152. </el-col>
  153. </el-row>
  154. <el-row>
  155. <el-col :span="12">
  156. <el-form-item label="预约医生" prop="doctorName">
  157. <el-input disabled v-model="item.doctorName"></el-input>
  158. </el-form-item>
  159. </el-col>
  160. <el-col :span="12">
  161. <el-form-item label="会诊时间" prop="subTime">
  162. <el-date-picker
  163. v-model="patientForm.subTime"
  164. type="date"
  165. value-format="yyyy-MM-dd"
  166. placeholder="选择日期">
  167. </el-date-picker>
  168. </el-form-item>
  169. </el-col>
  170. </el-row>
  171. <el-row>
  172. <el-col :span="12">
  173. <el-form-item label="就诊状态" prop="sex">
  174. <el-select v-model="patientForm.diagnosisStatus">
  175. <el-option label="初诊" :value = "1"></el-option>
  176. <el-option label="复诊" :value = "2"></el-option>
  177. </el-select>
  178. </el-form-item>
  179. </el-col>
  180. <el-col :span="12">
  181. <el-form-item label="部门负责人" prop="deptManager">
  182. <el-input v-model="patientForm.deptManager"></el-input>
  183. </el-form-item>
  184. </el-col>
  185. </el-row>
  186. <el-form-item label="患者病情主诉">
  187. <el-input
  188. type="textarea"
  189. placeholder="请输入内容"
  190. v-model="patientForm.patientCondition">
  191. </el-input>
  192. </el-form-item>
  193. <div class="contentx">
  194. <div class="desct">
  195. 医生建议及处置
  196. </div>
  197. </div>
  198. <el-form-item label="诊断">
  199. <el-input
  200. type="textarea"
  201. placeholder="请输入内容"
  202. v-model="patientForm.doctorAdviceJson.diagnosis">
  203. </el-input>
  204. </el-form-item>
  205. <el-form-item label="饮食方面">
  206. <el-input
  207. type="textarea"
  208. placeholder="请输入内容"
  209. v-model="patientForm.doctorAdviceJson.foodAdvice">
  210. </el-input>
  211. </el-form-item>
  212. <el-form-item label="运动方面">
  213. <el-input
  214. type="textarea"
  215. placeholder="请输入内容"
  216. v-model="patientForm.doctorAdviceJson.sportAdvice">
  217. </el-input>
  218. </el-form-item>
  219. <el-form-item label="保健方面">
  220. <el-input
  221. type="textarea"
  222. placeholder="请输入内容"
  223. v-model="patientForm.doctorAdviceJson.healthAdvice">
  224. </el-input>
  225. </el-form-item>
  226. <el-form-item label="注意禁忌">
  227. <el-input
  228. type="textarea"
  229. placeholder="请输入内容"
  230. v-model="patientForm.taboo">
  231. </el-input>
  232. </el-form-item>
  233. <el-form-item label="客户需求">
  234. <el-input v-model="patientForm.customerRequire"></el-input>
  235. </el-form-item>
  236. <el-row>
  237. <el-col :span="12">
  238. <el-form-item label="职业医师" prop="age">
  239. <el-input v-model="patientForm.professionalDoctor"></el-input>
  240. </el-form-item>
  241. </el-col>
  242. <el-col :span="12">
  243. <el-form-item label="医生助理" prop="mobile">
  244. <el-input v-model="patientForm.assistantDoctor"></el-input>
  245. </el-form-item>
  246. </el-col>
  247. </el-row>
  248. <div class="contentx">
  249. <div class="desct">
  250. 治疗方面
  251. </div>
  252. </div>
  253. <div v-for="(i,index) in patientForm.doctorAdviceJson.treatmentAdvice" :key="index">
  254. <el-row>
  255. <el-col :span="8">
  256. <el-form-item label="诊断内容" prop="content">
  257. <el-input v-model="i.content"></el-input>
  258. </el-form-item>
  259. </el-col>
  260. <el-col :span="8">
  261. <el-form-item label="建议治疗" prop="advice">
  262. <el-input v-model="i.advice"></el-input>
  263. </el-form-item>
  264. </el-col>
  265. <el-col :span="8">
  266. <el-button style="margin: 5px;" v-if="index+1 == patientForm.doctorAdviceJson.treatmentAdvice.length" @click="addItem(patientForm.doctorAdviceJson.treatmentAdvice.length)" type="primary" size="mini">+</el-button>
  267. <el-button style="margin: 5px;" v-if="index !== 0" type="danger" size="mini" @click="delItem(i,index)">-</el-button>
  268. </el-col>
  269. </el-row>
  270. </div>
  271. </el-form>
  272. <span slot="footer" class="dialog-footer">
  273. <el-button @click="patientOpen = false">取 消</el-button>
  274. <el-button type="primary" @click="patientInquirySubmit">确 定</el-button>
  275. </span>
  276. </el-dialog>
  277. </div>
  278. <div class="contentx" v-if="item!=null">
  279. <div class="desct">
  280. 咨询内容
  281. </div>
  282. <el-descriptions title="" :column="3" border>
  283. <el-descriptions-item label="患者姓名" ><span v-if="item!=null">{{JSON.parse(item.patientJson).patientName}}</span></el-descriptions-item>
  284. <el-descriptions-item label="患者年龄" ><span v-if="item!=null">{{JSON.parse(item.patientJson).age}}</span></el-descriptions-item>
  285. <el-descriptions-item label="患者性别" ><span >{{JSON.parse(item.patientJson).sex==1?'男':'女'}}</span></el-descriptions-item>
  286. <el-descriptions-item label="身份证号" ><span >{{JSON.parse(item.patientJson).idCard}}</span></el-descriptions-item>
  287. <el-descriptions-item label="是否就诊" > <span >就诊过</span></el-descriptions-item>
  288. <el-descriptions-item label="电话" ><span v-if="item!=null">{{JSON.parse(item.patientJson).mobile}}</span></el-descriptions-item>
  289. <el-descriptions-item label="学习周期" ><span v-if="item!=null">{{JSON.parse(item.patientJson).study}}</span></el-descriptions-item>
  290. <el-descriptions-item label="期望咨询方式" ><span >语音咨询</span></el-descriptions-item>
  291. <el-descriptions-item label="用药情况" ><span v-if="item!=null">{{JSON.parse(item.patientJson).medication}}</span></el-descriptions-item>
  292. <el-descriptions-item label="咨询时间" ><span v-if="item!=null">{{item.startTime}}</span></el-descriptions-item>
  293. <el-descriptions-item :label="item.inquiryType==1?'主诉':'咨询问题'" span="3"><span v-if="item!=null">{{JSON.parse(item.patientJson).title}}</span></el-descriptions-item>
  294. <el-descriptions-item label="面部照片" span="3">
  295. <el-image v-if="faceImages!=null&&faceImages!=''" v-for="img in faceImages" :key="img.id"
  296. style="width: 100px"
  297. :src="img"
  298. :preview-src-list="[img]">
  299. </el-image>
  300. </el-descriptions-item>
  301. <el-descriptions-item label="舌苔照片" span="3">
  302. <el-image v-if="tongueImages!=null&&tongueImages!=''" v-for="img in tongueImages" :key="img.id"
  303. style="width: 100px"
  304. :src="img"
  305. :preview-src-list="[img]">
  306. </el-image>
  307. </el-descriptions-item>
  308. <el-descriptions-item label="检测报告或患病证书" span="3">
  309. <el-image v-if="imgs!=null&&imgs!=''" v-for="img in imgs" :key="img.id"
  310. style="width: 100px"
  311. :src="img"
  312. :preview-src-list="[img]">
  313. </el-image>
  314. </el-descriptions-item>
  315. </el-descriptions>
  316. </div>
  317. <div class="contentx" v-if="item!=null">
  318. <div class="desct">
  319. 评价信息
  320. </div>
  321. <el-descriptions title="" :column="3" border>
  322. <el-descriptions-item label="患者姓名" >
  323. <span v-if="item!=null">{{item.patientName}}</span>
  324. </el-descriptions-item>
  325. <el-descriptions-item label="是否评价" >
  326. <dict-tag :options="orOptions" :value="item.isPing"/>
  327. </el-descriptions-item>
  328. <el-descriptions-item label="评分" >
  329. <el-rate v-if="item.pingStar!=null"
  330. v-model="item.pingStar"
  331. disabled
  332. show-score
  333. text-color="#ff9900"
  334. score-template="{value}">
  335. </el-rate>
  336. </el-descriptions-item>
  337. <el-descriptions-item label="聊天记录" >
  338. <el-link type="primary" @click="getSerivceMsg" :underline="false" v-if="item.title=='服务问诊'">查看聊天记录</el-link>
  339. <el-link type="primary" disabled :underline="false" v-if="(msg==null || msg=='')&&item.title!='服务问诊' ">无聊天记录</el-link>
  340. <el-link type="primary" @click="getMsg" :underline="false" v-if="msg!=null && msg!='' ">查看聊天记录</el-link>
  341. </el-descriptions-item>
  342. <el-descriptions-item label="评价内容" >
  343. <span v-if="item!=null">{{item.pingContent}}</span>
  344. </el-descriptions-item>
  345. <el-descriptions-item label="医生回复" >
  346. <span v-if="item!=null">{{item.replyContent}}</span>
  347. </el-descriptions-item>
  348. </el-descriptions>
  349. </div>
  350. <div class="contentx" v-if="item!=null">
  351. <div class="desct">
  352. {{item.inquiryType==3?'药师信息':'医生信息'}}
  353. </div>
  354. <el-descriptions title="" :column="3" border >
  355. <el-descriptions-item :label="item.inquiryType==3?'药师姓名':'医生姓名'" >
  356. <span v-if="doctor!=null">{{doctor.doctorName}}</span>
  357. </el-descriptions-item>
  358. <el-descriptions-item label="工作照" >
  359. <el-popover v-if="doctor.avatar!=null"
  360. placement="right"
  361. title=""
  362. trigger="hover">
  363. <img slot="reference" :src="doctor.avatar" width="50px">
  364. <img :src="doctor.avatar" style="max-width: 150px;">
  365. </el-popover>
  366. </el-descriptions-item>
  367. <el-descriptions-item label="所属医院" >
  368. <span v-if="doctor!=null">{{doctor.hospitalName}}</span>
  369. </el-descriptions-item>
  370. <el-descriptions-item label="科室名称" >
  371. <span v-if="doctor!=null">{{doctor.deptName}}</span>
  372. </el-descriptions-item>
  373. <el-descriptions-item label="职务" >
  374. <span v-if="doctor!=null"><dict-tag :options="positionOptions" :value="doctor.position"/></span>
  375. </el-descriptions-item>
  376. <el-descriptions-item label="评分" >
  377. <span v-if="doctor!=null">
  378. <el-rate
  379. v-model="doctor.pingStar"
  380. disabled
  381. show-score
  382. text-color="#ff9900"
  383. score-template="{value}">
  384. </el-rate>
  385. </span>
  386. </el-descriptions-item>
  387. <el-descriptions-item label="平均响应速度" >
  388. <span v-if="doctor!=null">{{doctor.speed}}</span>
  389. </el-descriptions-item>
  390. <el-descriptions-item label="性别" >
  391. <dict-tag :options="sexOptions" :value="doctor.sex"/>
  392. </el-descriptions-item>
  393. <el-descriptions-item label="是否专家" >
  394. <dict-tag :options="orOptions" :value="doctor.isExpert"/>
  395. </el-descriptions-item>
  396. <el-descriptions-item :label="item.inquiryType==3?'药师简介':'医生简介'" >
  397. <span v-if="doctor!=null">{{doctor.introduction}}</span>
  398. </el-descriptions-item>
  399. </el-descriptions>
  400. </div>
  401. <div class="contentx" v-if="item!=null">
  402. <div class="desct">
  403. 操作信息
  404. </div>
  405. <el-table style="margin-top: 20px;width: 100%"
  406. ref="orderHistoryTable"
  407. :data="logs" border>
  408. <el-table-column label="操作时间" width="160" align="center">
  409. <template slot-scope="scope">
  410. {{scope.row.changeTime}}
  411. </template>
  412. </el-table-column>
  413. <el-table-column label="备注" align="center">
  414. <template slot-scope="scope">
  415. {{scope.row.changeMessage}}
  416. </template>
  417. </el-table-column>
  418. </el-table>
  419. </div>
  420. <el-drawer
  421. :with-header="false"
  422. :append-to-body="true"
  423. size="75%"
  424. :title="show.title" :visible.sync="show.open">
  425. <inquiryOrderReportDetails ref="Details" />
  426. </el-drawer>
  427. <el-dialog title="聊天记录" :visible.sync="msgServiceDetails.open" width="80%" append-to-body >
  428. <msgServiceDetails ref="msgServiceDetails" :msgServiceDetailsClose="msgServiceDetailsClose" />
  429. <span slot="footer" class="dialog-footer">
  430. <el-button @click="msgServiceDetailsClose">取 消</el-button>
  431. <el-button type="primary" @click="msgServiceDetailsClose">确 定</el-button>
  432. </span>
  433. </el-dialog>
  434. </div>
  435. </template>
  436. <script>
  437. import { msglist, sendMsg,listinquiryOrder,editStatus, logList,getinquiryOrder, delinquiryOrder, addinquiryOrder, updateinquiryOrder, exportinquiryOrder ,cancelOrder,refundOrder} from "@/api/his/inquiryOrder";
  438. import {addinquiryPatient, updateinquiryPatient, detail} from "@/api/his/inquiryPatient";
  439. import {getReportId} from "@/api/his/inquiryOrderReport";
  440. import msgDetails from '../../components/his/msgDetails.vue';
  441. import msgServiceDetails from '../../components/his/msgServiceDetails.vue';
  442. import {getDoctor} from '../../../api/his/doctor.js';
  443. import { getPatient } from "@/api/his/patient";
  444. import {getUser} from "@/api/his/user";
  445. import inquiryOrderReportDetails from '../../components/his/inquiryOrderReportDetails.vue';
  446. import {getPrescribe,getDrugInfo} from "@/api/his/prescribe";
  447. import { js } from "js-beautify";
  448. export default {
  449. name: "user",
  450. components: { inquiryOrderReportDetails,msgDetails ,msgServiceDetails},
  451. data() {
  452. return {
  453. patientOpen: false,
  454. logs:[],
  455. editStatusOpen:false,
  456. usageJson:{},
  457. show:{
  458. open:false,
  459. },
  460. prescribeItem:{},
  461. prod:[],
  462. prescribeDialog:false,
  463. imgs:[],
  464. msgForm:{
  465. pageNum: 1,
  466. pageSize: 10,
  467. orderId:null,
  468. },
  469. statusForm:{
  470. orderId: null,
  471. status: null,
  472. },
  473. msgServiceDetails:{
  474. title:"",
  475. open:false
  476. },
  477. // 总条数
  478. total: 0,
  479. faceImages:[],
  480. tongueImages:[],
  481. dialogVisible:false,
  482. msg:[],
  483. positionOptions: [],
  484. inquiryStatusOptions:[],
  485. inquiryTypeOptions:[],
  486. inquiryPayOptions:[],
  487. inquiryOrderOptions:[],
  488. orOptions:[],
  489. item:null,
  490. patient:[],
  491. doctor:[],
  492. user:[],
  493. sexOptions: [],
  494. patientForm: {
  495. doctorAdviceJson: {
  496. diagnosis: '',
  497. foodAdvice: '',
  498. sportAdvice: '',
  499. healthAdvice: '',
  500. treatmentAdvice: [
  501. //默认一条
  502. {
  503. content: '',
  504. advice: '',
  505. }
  506. ]
  507. }
  508. },
  509. }
  510. },
  511. created() {
  512. this.getDicts("sys_sex").then(response => {
  513. this.sexOptions = response.data;
  514. });
  515. this.getDicts("sys_doc_position").then(response => {
  516. this.positionOptions = response.data;
  517. });
  518. this.getDicts("sys_inquiry_status").then(response => {
  519. this.inquiryStatusOptions = response.data;
  520. });
  521. this.getDicts("sys_inquiry_type").then(response => {
  522. this.inquiryTypeOptions = response.data;
  523. });
  524. this.getDicts("sys_inquiry_pay").then(response => {
  525. this.inquiryPayOptions = response.data;
  526. });
  527. this.getDicts("sys_inquiry_order_type").then(response => {
  528. this.inquiryOrderOptions = response.data;
  529. });
  530. this.getDicts("sys_company_or").then(response => {
  531. this.orOptions = response.data;
  532. });
  533. },
  534. methods: {
  535. addItem(length){
  536. this.patientForm.doctorAdviceJson.treatmentAdvice.push({
  537. content:'',
  538. advice:'',
  539. })
  540. let ak = this.patientForm.doctorAdviceJson.treatmentAdvice.filter(obj => obj.content != '');
  541. },
  542. delItem(item,index){
  543. this.patientForm.doctorAdviceJson.treatmentAdvice.splice(index,1)
  544. },
  545. handlePatient(){
  546. this.patientOpen = true;
  547. detail(this.item.orderId).then(res => {
  548. this.patientForm = res.data;
  549. if(!this.patientForm.doctorAdviceJson) {
  550. this.patientForm.doctorAdviceJson = {
  551. diagnosis: '',
  552. foodAdvice: '',
  553. sportAdvice: '',
  554. healthAdvice: '',
  555. treatmentAdvice: [
  556. //默认一条
  557. {
  558. content: '',
  559. advice: '',
  560. }
  561. ]
  562. }
  563. }
  564. })
  565. },
  566. cancelorder(){
  567. var that=this;
  568. this.$confirm('是否确认取消订单?', "警告", {
  569. confirmButtonText: "确定",
  570. cancelButtonText: "取消",
  571. type: "warning"
  572. }).then(function() {
  573. var data={
  574. orderId:that.item.orderId
  575. }
  576. return cancelOrder(data);
  577. }).then(() => {
  578. this.msgSuccess("操作成功");
  579. getinquiryOrder(this.item.orderId).then(response => {
  580. this.item = response.data;
  581. this.getlogList(this.item.orderId);
  582. });
  583. }).catch(function() {});
  584. },
  585. editStatusOpenOk(){
  586. editStatus(this.statusForm).then(response => {
  587. this.msgSuccess("操作成功");
  588. getinquiryOrder(this.item.orderId).then(response => {
  589. this.item = response.data;
  590. this.getlogList(this.item.orderId);
  591. });
  592. });
  593. },
  594. patientInquirySubmit(){
  595. this.patientForm.patientId = this.item.patientId;
  596. this.patientForm.companyUserId = this.item.companyUserId;
  597. this.patientForm.userId = this.item.userId;
  598. this.patientForm.inquiryOrderId = this.item.orderId;
  599. this.patientForm.subDoctorId = this.item.doctorId;
  600. console.log(this.patientForm);
  601. if(this.patientForm.id != null) {
  602. updateinquiryPatient(this.patientForm).then(res => {
  603. this.msgSuccess("更新成功");
  604. this.patientOpen = false;
  605. })
  606. } else {
  607. addinquiryPatient(this.patientForm).then(res => {
  608. this.msgSuccess("添加成功");
  609. this.patientOpen = false;
  610. })
  611. }
  612. },
  613. msgServiceDetailsClose(){
  614. this.msgServiceDetails.open = false;
  615. },
  616. handledetails(row){
  617. getReportId(this.item.orderId).then(response => {
  618. var id = response.data
  619. if(id!=null){
  620. this.show.open=true;
  621. setTimeout(() => {
  622. this.$refs.Details.getDetails(id);
  623. }, 1);
  624. }else{
  625. this.$message('订单没有报告');
  626. }
  627. });
  628. },
  629. getMsg(row){
  630. const orderId = this.item.orderId;
  631. const doctorName = this.item.doctorName;
  632. const patientName = this.item.patientName;
  633. setTimeout(() => {
  634. this.$refs.msgDetails.getDetails(orderId,doctorName,patientName);
  635. }, 500);
  636. this.dialogVisible = true;
  637. },
  638. getSerivceMsg(){
  639. const doctorName = this.item.doctorName;
  640. const patientName = this.item.patientName;
  641. this.msgServiceDetails.open = true;
  642. setTimeout(() => {
  643. this.$refs.msgServiceDetails.getDetails(doctorName,patientName);
  644. }, 500);
  645. },
  646. msgDialogClose(){
  647. this.dialogVisible = false;
  648. },
  649. editStatus(){
  650. this.editStatusOpen=true;
  651. this.statusForm.status=this.item.status;
  652. this.statusForm.orderId=this.item.orderId;
  653. },
  654. prescribe(row){
  655. this.prescribeDialog=true;
  656. getPrescribe(row).then(response => {
  657. this.prescribeItem = response.data;
  658. this.usageJson=JSON.parse(this.prescribeItem.usageJson)
  659. });
  660. getDrugInfo(row).then(response => {
  661. this.prod = response.data;
  662. });
  663. },
  664. refundorder(){
  665. var that=this;
  666. this.$confirm('是否确认退款?', "警告", {
  667. confirmButtonText: "确定",
  668. cancelButtonText: "取消",
  669. type: "warning"
  670. }).then(function() {
  671. var data={
  672. orderId:that.item.orderId
  673. }
  674. return refundOrder(data);
  675. }).then(() => {
  676. this.msgSuccess("操作成功");
  677. getinquiryOrder(this.item.orderId).then(response => {
  678. this.item = response.data;
  679. this.getlogList(this.item.orderId);
  680. });
  681. }).catch(function() {});
  682. },
  683. sendInquiryMsg(){
  684. var that=this;
  685. this.$confirm('是否确认发送消息?', "警告", {
  686. confirmButtonText: "确定",
  687. cancelButtonText: "取消",
  688. type: "warning"
  689. }).then(function() {
  690. return sendMsg(that.item.orderId);
  691. }).then(() => {
  692. this.msgSuccess("操作成功");
  693. }).catch(function() {});
  694. },
  695. handleClose1(){
  696. this.dialogVisible=false;
  697. },
  698. handleClose2(){
  699. this.prescribeDialog=false;
  700. },
  701. getDetails(orderId) {
  702. this.imgs=null;
  703. this.tongueImages=null;
  704. this.faceImages=null;
  705. var that=this
  706. this.item=null;
  707. //获取问诊信息
  708. getinquiryOrder(orderId).then(response => {
  709. this.item = response.data;
  710. //获取医生信息
  711. if(this.item.doctorId!=null){
  712. getDoctor(this.item.doctorId).then(response => {
  713. this.doctor = response.data;
  714. });
  715. }
  716. this.msgForm.orderId=this.item.orderId;
  717. this.msgList();
  718. this.getlogList(this.item.orderId);
  719. var json=JSON.parse(this.item.patientJson);
  720. if(json!=null&&json!=""){
  721. if(json.reportImages!=null&&json.reportImages!=""){
  722. this.imgs= (json.reportImages).split(",");
  723. }
  724. if(json.tongueImages!=null&&json.tongueImages!=""){
  725. this.tongueImages=json.tongueImages.split(",")
  726. }
  727. if(json.faceImages!=null&&json.faceImages!=""){
  728. this.faceImages=json.faceImages.split(",")
  729. }
  730. }
  731. });
  732. },
  733. msgList(){
  734. msglist(this.msgForm).then(response => {
  735. this.msg = response.rows;
  736. this.total = response.total;
  737. });
  738. },
  739. getlogList(orderId){
  740. logList(orderId).then(response => {
  741. this.logs = response.rows;
  742. });
  743. },
  744. }
  745. }
  746. </script>
  747. <style>
  748. .contentx{
  749. height: 100%;
  750. background-color: #fff;
  751. padding: 0px 20px 20px;
  752. margin: 20px;
  753. }
  754. .el-descriptions-item__label.is-bordered-label{
  755. font-weight: normal;
  756. }
  757. .el-descriptions-item__content {
  758. max-width: 150px;
  759. min-width: 100px;
  760. }
  761. .desct{
  762. padding-top: 20px;
  763. padding-bottom: 20px;
  764. color: #524b4a;
  765. font-weight: bold;
  766. }
  767. </style>
  768. <style scoped>
  769. .chat-records {
  770. overflow-y: auto;
  771. }
  772. .timestamp {
  773. font-size: 12px;
  774. color: #A9A9A9;
  775. }
  776. .chat-record {
  777. margin: 10px;
  778. flex-direction: column;
  779. align-items: flex-start;
  780. }
  781. .sent {
  782. background-color: #fbfdff;
  783. color: #000839;
  784. }
  785. .right{
  786. float: right;
  787. }
  788. .received {
  789. background-color: #fbfdff;
  790. color: #000000;
  791. }
  792. .el-descriptions-item__content {
  793. max-width: 150px;
  794. min-width: 100px;
  795. }
  796. </style>
  797. <style scoped>
  798. .order-content{
  799. margin: 10px;
  800. }
  801. .operate-container {
  802. background: #F2F6FC;
  803. height: 60px;
  804. margin: -20px -20px 0;
  805. line-height: 60px;
  806. }
  807. .operate-button-container {
  808. float: right;
  809. margin-right: 20px
  810. }
  811. </style>