index.vue 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <div class="query-box">
  11. <div class="query-box__left">
  12. <el-form-item label="" prop="yljgId">
  13. <el-select
  14. v-model="queryParams.yljgId"
  15. placeholder="请选择医疗机构"
  16. class="defwidth"
  17. >
  18. <el-option
  19. v-for="item in listMedicalMechanismArr"
  20. :key="item.id"
  21. :value="item.id"
  22. :label="item.name"
  23. :disabled="item.state == 1 ? false : true"
  24. ></el-option>
  25. </el-select>
  26. </el-form-item>
  27. <!-- <el-form-item label="" prop="thirdPartState">
  28. <el-select v-model="queryParams.thirdPartState" placeholder="三方状态"
  29. style="width:160px">
  30. <el-option
  31. v-for="item in thirdPartStateArr"
  32. :key="item.id"
  33. :value="item.id"
  34. :label="item.name"
  35. ></el-option>
  36. </el-select>
  37. </el-form-item> -->
  38. <el-form-item label="" prop="preMzZy">
  39. <el-select
  40. v-model="queryParams.preMzZy"
  41. placeholder="门诊/住院"
  42. style="width: 120px"
  43. >
  44. <el-option
  45. v-for="item in preMzZyArr"
  46. :key="item.id"
  47. :value="item.id"
  48. :label="item.name"
  49. ></el-option>
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item label="" prop="checkState">
  53. <el-select
  54. v-model="queryParams.checkState"
  55. placeholder="审核状态"
  56. style="width: 160px"
  57. >
  58. <el-option
  59. v-for="item in checkStateArr"
  60. :key="item.id"
  61. :value="item.id"
  62. :label="item.name"
  63. ></el-option>
  64. </el-select>
  65. </el-form-item>
  66. <el-form-item label="" prop="isPrint">
  67. <el-select
  68. v-model="queryParams.isPrint"
  69. placeholder="打印状态"
  70. style="width: 160px"
  71. >
  72. <el-option
  73. v-for="item in isPrintArr"
  74. :key="item.id"
  75. :value="item.id"
  76. :label="item.name"
  77. ></el-option>
  78. </el-select>
  79. </el-form-item>
  80. <el-form-item label="" prop="isBehalf">
  81. <el-select
  82. v-model="queryParams.isBehalf"
  83. placeholder="是否代煎"
  84. style="width: 160px"
  85. >
  86. <el-option
  87. v-for="item in isBehalfArr"
  88. :key="item.id"
  89. :value="item.id"
  90. :label="item.name"
  91. ></el-option>
  92. </el-select>
  93. </el-form-item>
  94. <el-form-item label="" prop="preNo">
  95. <el-input
  96. v-model="queryParams.preNo"
  97. class="defwidth"
  98. placeholder="请输入处方号"
  99. clearable
  100. size="small"
  101. @keyup.enter.native="handleQuery"
  102. />
  103. </el-form-item>
  104. <el-form-item label="" prop="name">
  105. <el-input
  106. v-model="queryParams.name"
  107. placeholder="请输入患者姓名"
  108. class="defwidth"
  109. clearable
  110. size="small"
  111. @keyup.enter.native="handleQuery"
  112. />
  113. </el-form-item>
  114. <el-form-item label="" prop="prescriptionTime">
  115. <el-date-picker
  116. style="width: 240px"
  117. clearable
  118. class="defwidth"
  119. size="small"
  120. v-model="queryParams.prescriptionTime"
  121. type="daterange"
  122. value-format="yyyy-MM-dd"
  123. start-placeholder="开方开始时间"
  124. end-placeholder="开方结束时间"
  125. >
  126. </el-date-picker>
  127. </el-form-item>
  128. <el-form-item>
  129. <el-button
  130. type="primary"
  131. icon="el-icon-search"
  132. size="mini"
  133. @click="handleQuery"
  134. >搜索</el-button
  135. >
  136. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  137. <el-button icon="el-icon-circle-plus-outline" v-hasPermi="['rescription:prescriptionCore:add']" size="mini" @click="handleUpdate(2, {});recipeEditMode='edit';">新增处方</el-button>
  138. </el-form-item>
  139. </div>
  140. </div>
  141. </el-form>
  142. <el-table
  143. v-loading="loading"
  144. :data="prescriptionCoreList"
  145. @selection-change="handleSelectionChange"
  146. border
  147. size="mini"
  148. class="prescriptionCore"
  149. :row-class-name="tableRowClassName"
  150. >
  151. <el-table-column type="index" width="55" align="center" label="序号" />
  152. <el-table-column label="处方号" align="center" prop="preNo" />
  153. <el-table-column label="医疗机构" align="center" prop="yijgName" show-overflow-tooltip/>
  154. <el-table-column label="就诊科室" align="center" prop="department" show-overflow-tooltip/>
  155. <el-table-column label="开方医生" align="center" prop="doctor" />
  156. <el-table-column label="患者姓名" align="center" prop="name" />
  157. <el-table-column label="性别" align="center" prop="sex" />
  158. <el-table-column label="审核状态" align="center" prop="checkState">
  159. <template slot-scope="scope">
  160. {{ {0: '待审核', 1: '审核通过', 2: '审核未通过',}[scope.row.checkState] }}
  161. </template>
  162. </el-table-column>
  163. <el-table-column label="是否代煎" align="center" prop="isBehalf">
  164. <template slot-scope="scope">
  165. {{ {0: '否', 1: '是'}[scope.row.isBehalf] }}
  166. </template>
  167. </el-table-column>
  168. <el-table-column label="配送方式" align="center" prop="expressExecutor" />
  169. <el-table-column label="收件地址" align="center" prop="address" show-overflow-tooltip/>
  170. <el-table-column label="门诊/住院" align="center" prop="preMzZy">
  171. <template slot-scope="scope">{{
  172. scope.row.preMzZy == 1 ? "门诊" : "住院"
  173. }}</template>
  174. </el-table-column>
  175. <el-table-column label="审核人" align="center" prop="checkBy" />
  176. <el-table-column label="审核时间" align="center" prop="checkTime" />
  177. <el-table-column
  178. label="操作"
  179. align="center"
  180. class-name="small-padding fixed-width"
  181. width="240"
  182. fixed="right"
  183. >
  184. <template slot-scope="scope">
  185. <el-button
  186. size="mini"
  187. type="primary"
  188. style="width: 40px"
  189. @click="handleUpdate(1, scope.row)"
  190. v-hasPermi="['rescription:prescriptionCore:query']"
  191. >详情</el-button
  192. >
  193. <el-button
  194. size="mini"
  195. type="primary"
  196. style="width: 40px"
  197. v-if="scope.row.checkState == 0"
  198. @click="handleUpdate(2, scope.row);recipeEditMode='check';"
  199. v-hasPermi="['rescription:prescriptionCore:check']"
  200. >审核</el-button
  201. >
  202. <el-button
  203. size="mini"
  204. type="primary"
  205. style="width: 40px"
  206. v-if="scope.row.checkState == 1"
  207. @click="handleUpdate(2, scope.row);recipeEditMode='edit';"
  208. v-hasPermi="['rescription:prescriptionCore:add']"
  209. >复制</el-button
  210. >
  211. <el-button
  212. size="mini"
  213. class="printbtn"
  214. style="width: 40px"
  215. @click="getRemark(scope.row)"
  216. >备注</el-button
  217. >
  218. <el-button
  219. size="mini"
  220. class="printbtn"
  221. style="width: 40px"
  222. @click="showPrintContentMethod(scope.row)"
  223. v-if="scope.row.checkState == 1"
  224. >打印</el-button
  225. >
  226. </template>
  227. </el-table-column>
  228. </el-table>
  229. <pagination
  230. v-show="total > 0"
  231. :total="total"
  232. :page.sync="queryParams.pageNum"
  233. :limit.sync="queryParams.pageSize"
  234. @pagination="getList"
  235. />
  236. <!-- 添加或修改处方审核对话框 -->
  237. <el-dialog
  238. :title="title"
  239. :visible.sync="open"
  240. width="1280px"
  241. append-to-body
  242. >
  243. <div class="display_f">
  244. <div class="_left">
  245. <div style="display: flex; align-items: center; margin-bottom: 20px">
  246. <h3>处方信息</h3>
  247. <div style="margin: 0 0 0 30px">处方号:{{ detailData.preNo }}</div>
  248. <div v-if="detailData.tzqyflag==1 && detailData.thread!=175" style="margin: 0 0 0 30px;color: red;">待取药</div>
  249. </div>
  250. <div style="display: flex; align-items: center">
  251. <h3>审核状态:</h3>
  252. <span
  253. style="color: #fff"
  254. :class="
  255. detailData.checkState == 0
  256. ? 'yellow-btn'
  257. : detailData.checkState == 1
  258. ? 'green-btn'
  259. : detailData.checkState == 2
  260. ? 'red-btn'
  261. : ''
  262. "
  263. >{{
  264. detailData.checkState == 0
  265. ? "待审核"
  266. : detailData.checkState == 1
  267. ? "审核通过"
  268. : detailData.checkState == 2
  269. ? "审核不通过"
  270. : ""
  271. }}</span
  272. >
  273. <h3 style="margin-left: 50px">审核人:</h3>
  274. <span>{{ detailData.checkBy }}</span>
  275. <h3 style="margin-left: 50px">审核时间:</h3>
  276. <span>{{ detailData.checkTime }}</span>
  277. </div>
  278. <el-divider></el-divider>
  279. <el-row :gutter="20">
  280. <el-col :span="24">
  281. <el-descriptions title="" :column="5">
  282. <el-descriptions-item label="患者姓名">{{
  283. detailData.name
  284. }}</el-descriptions-item>
  285. <el-descriptions-item label="性别">{{
  286. detailData.sex
  287. }}</el-descriptions-item>
  288. <el-descriptions-item label="年龄">{{
  289. detailData.age
  290. }}</el-descriptions-item>
  291. <el-descriptions-item label="科室">{{
  292. detailData.department
  293. }}</el-descriptions-item>
  294. <el-descriptions-item label="病床">{{
  295. detailData.bedNo||''
  296. }}</el-descriptions-item>
  297. <el-descriptions-item label="临床诊断">
  298. {{ detailData.disName }}
  299. <!-- -{{ detailData.symName }} -->
  300. </el-descriptions-item>
  301. <el-descriptions-item label="开方医生">{{
  302. detailData.doctor
  303. }}</el-descriptions-item>
  304. <el-descriptions-item label="处方类型">{{
  305. detailData.type == 1 ? "中药处方" : "中药制剂"
  306. }}</el-descriptions-item>
  307. <el-descriptions-item label="发药状态">{{
  308. detailData.fyState == 0
  309. ? "未发药"
  310. : detailData.fyState == 1
  311. ? "已发药"
  312. : "取消发药"
  313. }}</el-descriptions-item>
  314. <el-descriptions-item label="煎药方式"
  315. >{{
  316. detailData.oralPre && detailData.oralPre.decoctingMethod
  317. }}
  318. <span
  319. v-if="
  320. detailData.oralPre &&
  321. detailData.oralPre.decoctingMethod == '浓煎'
  322. "
  323. >{{
  324. detailData.oralPre && detailData.oralPre.concentration
  325. }}</span
  326. ></el-descriptions-item
  327. >
  328. <el-descriptions-item label="处方金额">{{
  329. detailData.type == 1
  330. ? detailData.oralPre && detailData.oralPre.prescriptionSum
  331. : detailData.solidPre && detailData.solidPre.prescriptionSum
  332. }}</el-descriptions-item>
  333. <el-descriptions-item label="剂型">{{
  334. detailData.oralPre && detailData.oralPre.dosageForm
  335. }}</el-descriptions-item>
  336. <el-descriptions-item label="剂数">{{
  337. detailData.oralPre && detailData.oralPre.number
  338. }}</el-descriptions-item>
  339. <el-descriptions-item label="代煎剂数">{{
  340. detailData.oralPre && detailData.oralPre.daijianNumber
  341. }}</el-descriptions-item>
  342. <el-descriptions-item label="代煎费用">{{
  343. detailData.oralPre && detailData.oralPre.daijianCost
  344. }}</el-descriptions-item>
  345. <el-descriptions-item label="处方用法">{{
  346. detailData.oralPre && detailData.oralPre.prescriptionusage
  347. }}</el-descriptions-item>
  348. <el-descriptions-item label="服药时间">{{
  349. detailData.oralPre && detailData.oralPre.medicationTime
  350. }}</el-descriptions-item>
  351. <el-descriptions-item label="频次">{{
  352. detailData.oralPre && detailData.oralPre.frequency
  353. }}</el-descriptions-item>
  354. <el-descriptions-item label="快递单号">{{
  355. detailData.expressCode
  356. }}</el-descriptions-item>
  357. <el-descriptions-item label="是否代煎">{{
  358. detailData.isBehalf == 0
  359. ? "否"
  360. : detailData.isBehalf == 1
  361. ? "是"
  362. : "未知"
  363. }}</el-descriptions-item>
  364. <el-descriptions-item label="配送费用">{{
  365. detailData.oralPre && detailData.oralPre.distributionCost
  366. }}</el-descriptions-item>
  367. <el-descriptions-item label="总金额">{{
  368. detailData.oralPre && detailData.oralPre.prescriptionTotleSum
  369. }}</el-descriptions-item>
  370. <el-descriptions-item label="嘱托">{{
  371. detailData.oralPre && detailData.oralPre.entrust
  372. }}</el-descriptions-item>
  373. </el-descriptions>
  374. <el-descriptions :column="5">
  375. <el-descriptions-item label="是否配送">{{
  376. detailData.takingMethod == 0
  377. ? "否"
  378. : detailData.takingMethod == 1
  379. ? "是"
  380. : "未知"
  381. }}</el-descriptions-item>
  382. <el-descriptions-item label="收件人">{{
  383. detailData.consignee
  384. }}</el-descriptions-item>
  385. <el-descriptions-item label="收货电话">{{
  386. detailData.contactNumber
  387. }}</el-descriptions-item>
  388. <el-descriptions-item label="收货地址">{{
  389. detailData.address
  390. }}</el-descriptions-item>
  391. </el-descriptions>
  392. <el-descriptions :column="5">
  393. <el-descriptions-item label="开方医生备注">{{
  394. detailData.extendedTxt
  395. }}</el-descriptions-item>
  396. </el-descriptions>
  397. <el-descriptions :column="5">
  398. <el-descriptions-item label="药师备注">{{
  399. detailData.pharmacistsremarks
  400. }}</el-descriptions-item>
  401. </el-descriptions>
  402. </el-col>
  403. <el-col :span="24">
  404. <el-table
  405. v-loading="loading"
  406. :data="detailData && detailData.oralPreItemList"
  407. @selection-change="handleSelectionChange"
  408. max-height="390"
  409. >
  410. <el-table-column type="index" width="55" align="center" />
  411. <el-table-column
  412. label="药品名称"
  413. align="center"
  414. prop="matName"
  415. />
  416. <el-table-column
  417. label="药品规格"
  418. align="center"
  419. prop="ypggCenter"
  420. />
  421. <el-table-column
  422. label="单位"
  423. align="center"
  424. prop="matUnitName"
  425. />
  426. <el-table-column
  427. label="用法"
  428. align="center"
  429. prop="matUsageName"
  430. />
  431. <el-table-column label="剂量" align="center" prop="matDose" />
  432. <el-table-column label="零售价" align="center" prop="matXsj" />
  433. <el-table-column label="产地" align="center" prop="matOrigin" />
  434. <el-table-column
  435. label="小计"
  436. align="center"
  437. prop="subtotalMoney"
  438. />
  439. </el-table>
  440. </el-col>
  441. </el-row>
  442. <div style="margin-top: 50px" v-if="btnState === 2">
  443. <span>备注</span>
  444. <el-input
  445. placeholder="请输入拒绝原因"
  446. style="margin-left: 13px; width: 800px"
  447. v-model="remarks"
  448. ></el-input>
  449. </div>
  450. </div>
  451. <!-- 安全合理用药检测 -->
  452. <div class="pre-title mr-t10 _right">
  453. <div class="flex-vertical-center-l title-container">
  454. <div>智能审方</div>
  455. </div>
  456. <div class="patiens-msg mr-t10" v-if="rationalMed.length > 0">
  457. <div class="p" v-if="raDoseShow">
  458. <div class="patiens-cate">超剂量药品:</div>
  459. <div
  460. class="patiens-desc"
  461. v-for="(item, index) in rationalMed10"
  462. :key="index"
  463. >
  464. <span v-if="item.showDose">
  465. <span class="matname">{{ item.matname }}</span>
  466. <span style="color: red"
  467. >({{ item.matmindosage }}-{{ item.matmaxdosage }})</span
  468. >
  469. </span>
  470. </div>
  471. </div>
  472. <div class="p" v-if="rationalMed2.length > 0">
  473. <div class="patiens-cate">慎忌禁用药:</div>
  474. <div
  475. class="patiens-desc"
  476. v-for="(item, index) in rationalMed2"
  477. :key="index"
  478. >
  479. <span v-if="item.matsjj">
  480. <span class="matname">{{ item.matname }}</span>
  481. ({{ item.matsjj | ftsjj }})
  482. </span>
  483. </div>
  484. </div>
  485. <div class="p" v-if="rationalMed3.length > 0">
  486. <div class="patiens-cate">孕妇慎忌禁:</div>
  487. <div
  488. class="patiens-desc"
  489. v-for="(item, index) in rationalMed3"
  490. :key="index"
  491. >
  492. <span v-if="item.matyfsjj">
  493. <span class="matname">{{ item.matname }}</span>
  494. <span :style="{ color: item.matyfsj == 3 ? 'red' : '' }"
  495. >({{ item.matyfsjj | fyfsjj }})</span
  496. >
  497. </span>
  498. </div>
  499. </div>
  500. <div class="p" v-if="rationalMed4.length > 0">
  501. <div class="patiens-cate">服药饮食禁忌:</div>
  502. <div
  503. class="patiens-desc"
  504. v-for="(item, index) in rationalMed4"
  505. :key="index"
  506. >
  507. <span v-if="item.matysjj">
  508. <span class="matname">{{ item.matname }}</span>
  509. ({{ item.matysjj ? item.matysjj : "无" }})
  510. </span>
  511. </div>
  512. </div>
  513. <div class="p" v-if="rationalMed5.length > 0">
  514. <div class="patiens-cate">药物毒性说明:</div>
  515. <div
  516. class="patiens-desc"
  517. v-for="(item, index) in rationalMed5"
  518. :key="index"
  519. >
  520. <span v-if="item.matdxsm">
  521. <span class="matname" style="color: red">{{
  522. item.matname
  523. }}</span>
  524. ({{ item.matdxsm ? item.matdxsm : "无" }})
  525. </span>
  526. </div>
  527. </div>
  528. <div class="p" v-if="rationalMed6.length > 0">
  529. <div class="patiens-cate">病证用药禁忌:</div>
  530. <div
  531. class="patiens-desc"
  532. v-for="(item, index) in rationalMed6"
  533. :key="index"
  534. >
  535. <span v-if="item.matbzjj">
  536. <span class="matname">{{ item.matname }}</span>
  537. ({{ item.matbzjj ? item.matbzjj : "无" }})
  538. </span>
  539. </div>
  540. </div>
  541. <div class="p" v-if="rationalMed7.length > 0">
  542. <div class="patiens-cate">十八反:</div>
  543. <div
  544. class="patiens-desc"
  545. v-for="(item, index) in rationalMed7"
  546. :key="index"
  547. >
  548. <span v-if="item.matsbf">
  549. <span style="color: red">{{ item.matname }}</span>
  550. 反{{ item.matsbf }}
  551. </span>
  552. </div>
  553. </div>
  554. <div class="p" v-if="rationalMed8.length > 0">
  555. <div class="patiens-cate">十九畏:</div>
  556. <div
  557. class="patiens-desc"
  558. v-for="(item, index) in rationalMed8"
  559. :key="index"
  560. >
  561. <span v-if="item.matsjw">
  562. <span style="color: red">{{ item.matname }}</span>
  563. 畏{{ item.matsjw }}
  564. </span>
  565. </div>
  566. </div>
  567. <div class="p" v-if="rationalMed9.length > 0">
  568. <div class="patiens-cate">用药不宜:</div>
  569. <div
  570. class="patiens-desc"
  571. v-for="(item, index) in rationalMed9"
  572. :key="index"
  573. >
  574. <span v-if="item.matby">{{
  575. fmatby(item.matby, item.matname)
  576. }}</span>
  577. </div>
  578. </div>
  579. </div>
  580. </div>
  581. </div>
  582. <div slot="footer" class="dialog-footer">
  583. <el-button type="primary" @click="checkBtn(1)" v-if="btnState === 2"
  584. >通 过</el-button
  585. >
  586. <el-popover placement="top" width="160" v-model="visible">
  587. <p>不通过理由未输入,确定现在提交?</p>
  588. <div style="text-align: right; margin: 0">
  589. <el-button size="mini" type="text" @click="visible = false"
  590. >取消</el-button
  591. >
  592. <el-button type="primary" size="mini" @click="checkBtn(2)"
  593. >确定</el-button
  594. >
  595. </div>
  596. <el-button
  597. slot="reference"
  598. v-if="btnState === 2"
  599. @click="remarks ? checkBtn(2) : (visible = true)"
  600. style="margin: 0 10px"
  601. >拒 绝</el-button
  602. >
  603. </el-popover>
  604. <el-button @click="cancel">取 消</el-button>
  605. </div>
  606. </el-dialog>
  607. <el-dialog
  608. :title="title"
  609. :visible.sync="openPrint"
  610. width="1280px"
  611. append-to-body
  612. @close="handleClose()"
  613. >
  614. <div style="display: flex; padding: 10px">
  615. <div
  616. style="
  617. display: flex;
  618. width: 170px;
  619. flex-direction: column;
  620. align-items: center;
  621. border-right: 1px solid #1ab394;
  622. "
  623. >
  624. <div
  625. style="
  626. display: flex;
  627. justify-content: center;
  628. align-items: center;
  629. height: 50px;
  630. width: 150px;
  631. font-size: 25px;
  632. padding: 10px;
  633. color: #1ab394;
  634. "
  635. v-for="item in printTypeList"
  636. :key="item.id"
  637. @click="handlePrintType(item)"
  638. :class="activePrint === item.name ? 'active' : ''"
  639. >
  640. {{ item.name }}
  641. </div>
  642. </div>
  643. <div
  644. style="
  645. display: flex;
  646. flex-direction: column;
  647. justify-content: center;
  648. align-items: center;
  649. width: 1120px;
  650. "
  651. >
  652. <div class="print" id="prescriptionCore">
  653. <div
  654. style="
  655. display: flex;
  656. flex-direction: column;
  657. width: 80mm;
  658. height: 50mm;
  659. border: 1px solid #000;
  660. "
  661. v-show="activePrint === '标签'"
  662. >
  663. <div
  664. style="
  665. font-size: 15px;
  666. font-weight: bold;
  667. display: flex;
  668. justify-content: center;
  669. margin-top: 3px;
  670. "
  671. >
  672. <span id="printTitle">
  673. {{
  674. detailData.yljgName || ''
  675. }}(中药房)
  676. </span>
  677. </div>
  678. <div
  679. style="
  680. font-size: 15px;
  681. font-weight: bold;
  682. display: flex;
  683. justify-content: space-between;
  684. margin: 5px 8px 0;
  685. "
  686. >
  687. <div>{{ curName }},{{ curSex }},{{ detailData.patientBirthday }}</div>
  688. <span v-if="detailData.preMzZy==1">门诊</span>
  689. <span v-else-if="detailData.preMzZy==2">住院</span>
  690. </div>
  691. <div style="display: flex; align-items: center; margin: 0px 0 0 5px;">
  692. <div
  693. style="
  694. display: flex;
  695. flex-direction: column;
  696. justify-content: center;
  697. "
  698. >
  699. <JsBarcode
  700. v-if="openPrint"
  701. :presno="curPreNo"
  702. style="margin-top: 0px"
  703. ></JsBarcode>
  704. </div>
  705. <div
  706. style="
  707. display: flex;
  708. flex-direction: column;
  709. margin: 0px 0 0 10px;
  710. flex: 1;
  711. "
  712. >
  713. <!-- <div style="display: flex; font-size: 13px">
  714. 患者:
  715. <div style="font-weight: 500">
  716. {{ curName }},{{ curSex }}
  717. </div>
  718. </div> -->
  719. <!-- <div style="display: flex; font-size: 10px; margin-top: 5px">
  720. 出生日期:
  721. <div style="font-weight: 500">{{ formattedDate }}</div>
  722. </div> -->
  723. <!-- <div style="display: flex; font-size: 13px; margin-top: 5px">
  724. 类型:
  725. <div style="font-weight: 500">{{ curPreNameText }}</div>
  726. </div> -->
  727. <div style="display: flex; font-size: 13px;">
  728. 手机号:
  729. <div>{{ detailData.contactNumber }}</div>
  730. </div>
  731. <div style="display: flex; font-size: 13px;margin-top: 5px;">
  732. 处方用法:
  733. <div>{{ detailData.prescriptionusage }}</div>
  734. </div>
  735. <div style="display: flex; font-size: 13px;font-weight: bold; margin: 5px 10px 0 0; align-items: center;justify-content: space-between;">
  736. <div style="display: flex; font-size: 13px;font-weight: bold; align-items: center;">
  737. 剂数:
  738. <div
  739. style=""
  740. >
  741. {{ curNumber }}
  742. </div>
  743. </div>
  744. <div
  745. style="display: flex; font-size: 13px;font-weight: bold; align-items: center;"
  746. >
  747. 是否代煎:
  748. <div
  749. style=""
  750. >
  751. {{ isBehalfText }}
  752. </div>
  753. </div>
  754. </div>
  755. </div>
  756. </div>
  757. <div
  758. style="
  759. font-size: 13px;
  760. margin: 0 10px 0;
  761. "
  762. >
  763. 科室/病房:{{ detailData.department }}
  764. </div>
  765. <div
  766. style="
  767. font-size: 13px;
  768. margin: 3px 10px 0;
  769. "
  770. >
  771. 药师备注:{{ detailData.pharmacistsremarks }}
  772. </div>
  773. <div
  774. style="
  775. display: flex;
  776. justify-content: center;
  777. font-size: 13px;
  778. margin: 3px 10px 0;
  779. "
  780. >
  781. 打印时间:{{ curPrintTime }}
  782. </div>
  783. </div>
  784. <div
  785. v-show="activePrint === '中药处方笺'"
  786. style="
  787. display: flex;
  788. margin: 5px;
  789. background-color: #fff;
  790. flex-direction: column;
  791. align-items: center;
  792. height: 1030px;
  793. width: 680px;
  794. box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  795. "
  796. >
  797. <div style="display: flex; flex-direction: column; width: 660px">
  798. <div
  799. style="
  800. display: flex;
  801. flex-direction: row;
  802. justify-content: space-between;
  803. margin-top: 15px;
  804. "
  805. >
  806. <div
  807. style="
  808. display: flex;
  809. align-items: flex-start;
  810. border-right: 0 !important;
  811. "
  812. >
  813. <div style="display: flex; flex-direction: column">
  814. <JsBarcode :presno="curPreNo"></JsBarcode>
  815. </div>
  816. </div>
  817. <div
  818. style="
  819. display: flex;
  820. justify-content: center;
  821. align-items: center;
  822. margin-right: 150px;
  823. font-size: 23.75px;
  824. font-weight: 800;
  825. "
  826. >
  827. 中药处方笺
  828. </div>
  829. <div
  830. style="
  831. display: flex;
  832. justify-content: center;
  833. font-size: 16px;
  834. width: 40px;
  835. font-weight: 300;
  836. "
  837. >
  838. {{
  839. detailData.type == "1"
  840. ? "中药处方"
  841. : detailData.type == "2"
  842. ? "中药制剂"
  843. : ""
  844. }}
  845. </div>
  846. </div>
  847. <div
  848. style="
  849. display: flex;
  850. flex-direction: column;
  851. margin: 20px 10px 10px;
  852. padding-bottom: 15px;
  853. border-bottom: 1px solid #979797;
  854. "
  855. >
  856. <div
  857. style="
  858. display: flex;
  859. flex-direction: row;
  860. margin-bottom: 5px;
  861. "
  862. >
  863. <div
  864. style="
  865. font-size: 12px;
  866. font-weight: 400;
  867. margin-right: 30px;
  868. "
  869. >
  870. <span style="color: #999999">姓名:</span
  871. >{{ detailData.name }}
  872. </div>
  873. <div
  874. style="
  875. font-size: 12px;
  876. font-weight: 400;
  877. margin-right: 30px;
  878. "
  879. >
  880. <span style="color: #999999">性别:</span
  881. >{{ detailData.sex }}
  882. </div>
  883. <div
  884. style="
  885. font-size: 12px;
  886. font-weight: 400;
  887. margin-right: 30px;
  888. "
  889. >
  890. <span style="color: #999999">年龄:</span
  891. >{{ detailData.age }}岁
  892. </div>
  893. <div
  894. style="
  895. font-size: 12px;
  896. font-weight: 400;
  897. margin-right: 30px;
  898. "
  899. >
  900. <span style="color: #999999">电话:</span
  901. >{{ detailData.contactNumber }}
  902. </div>
  903. <div
  904. style="
  905. font-size: 12px;
  906. font-weight: 400;
  907. margin-right: 30px;
  908. "
  909. >
  910. <span style="color: #999999">当前处方状态:</span
  911. >{{
  912. detailData.state == "1"
  913. ? "配药"
  914. : detailData.state == "2"
  915. ? "煎药"
  916. : detailData.state == "3"
  917. ? "发药"
  918. : detailData.state == "4"
  919. ? "配送"
  920. : ""
  921. }}
  922. </div>
  923. </div>
  924. <div
  925. style="
  926. display: flex;
  927. flex-direction: row;
  928. margin-bottom: 5px;
  929. "
  930. >
  931. <div
  932. style="
  933. font-size: 12px;
  934. font-weight: 400;
  935. margin-right: 30px;
  936. "
  937. >
  938. <span style="color: #999999">就诊科室:</span
  939. >{{ detailData.department }}
  940. </div>
  941. <div
  942. style="
  943. font-size: 12px;
  944. font-weight: 400;
  945. margin-right: 30px;
  946. "
  947. >
  948. <span style="color: #999999">临床诊断:</span
  949. >{{ detailData.disName }}
  950. <!-- —{{ detailData.symName }} -->
  951. </div>
  952. <div
  953. style="
  954. font-size: 12px;
  955. font-weight: 400;
  956. margin-right: 30px;
  957. "
  958. >
  959. <span style="color: #999999">开方时间:</span
  960. >{{ detailData.prescriptionTime }}
  961. </div>
  962. </div>
  963. <div
  964. style="display: flex; flex-direction: row; font-size: 12px"
  965. >
  966. <span style="color: #999999">联系地址:</span
  967. >{{ detailData.address }}
  968. </div>
  969. </div>
  970. </div>
  971. <div
  972. style="
  973. display: flex;
  974. flex-direction: column;
  975. width: 640px;
  976. align-items: flex-start;
  977. border-bottom: 1px solid #5a5e66;
  978. margin: 0px 10px 10px;
  979. "
  980. >
  981. <div style="display: flex; font-size: 22px">Rp:</div>
  982. <div
  983. style="
  984. display: flex;
  985. flex-wrap: wrap;
  986. flex-direction: row;
  987. justify-content: flex-start;
  988. align-content: flex-start;
  989. margin-left: 20px;
  990. height: 515px;
  991. "
  992. >
  993. <div
  994. style="
  995. display: flex;
  996. justify-content: center;
  997. width: 150px;
  998. align-items: center;
  999. margin: 0 0 10px 0;
  1000. "
  1001. v-for="(x, i) in detailData.detailList"
  1002. :key="i"
  1003. >
  1004. <div
  1005. style="
  1006. display: flex;
  1007. font-size: 15px;
  1008. width: 100px;
  1009. word-wrap: break-word;
  1010. z-index: 100;
  1011. justify-content: center;
  1012. align-items: center;
  1013. padding: 2px 5px;
  1014. "
  1015. >
  1016. <!-- <el-tag effect="plain" >{{x.matName}} {{x.matDose}} {{x.matUnitName}}</el-tag>-->
  1017. {{ x.matName }}{{ x.matDose }}{{ x.matUnitName }}
  1018. </div>
  1019. <div
  1020. style="
  1021. display: flex;
  1022. flex-direction: column;
  1023. margin-left: 5.31px;
  1024. z-index: 200;
  1025. "
  1026. >
  1027. <div style="font-size: 10px; height: 12.5px">
  1028. {{ x.matUsageName }}
  1029. </div>
  1030. <div style="font-size: 10px; height: 12.5px">
  1031. {{ x.sign }}
  1032. </div>
  1033. </div>
  1034. </div>
  1035. </div>
  1036. <div
  1037. style="margin: 0 10px 10px; display: flex; font-size: 15px"
  1038. >
  1039. <div style="display: flex; margin-right: 54.4px">
  1040. 剂数:{{ detailData.number }}
  1041. <div v-if="detailData.daijianCost !== ''" class="pies_tips">
  1042. (代煎)
  1043. </div>
  1044. </div>
  1045. <div style="display: flex; margin-right: 54.4px">
  1046. {{ detailData.dosageForm }}
  1047. </div>
  1048. <div style="display: flex; margin-right: 54.4px">
  1049. {{ detailData.prescriptionUsage }}
  1050. </div>
  1051. <div style="display: flex; margin-right: 54.4px">
  1052. 每次{{ detailData.concentration }}
  1053. </div>
  1054. <div style="display: flex; margin-right: 54.4px">
  1055. {{ detailData.frequency }}
  1056. </div>
  1057. <div>{{ detailData.medicationTime }}</div>
  1058. </div>
  1059. <div
  1060. style="
  1061. display: flex;
  1062. justify-content: flex-end;
  1063. font-size: 15px;
  1064. margin-right: 10px;
  1065. "
  1066. >
  1067. {{ detailData.entrust }}
  1068. </div>
  1069. </div>
  1070. <div
  1071. style="
  1072. display: flex;
  1073. margin: 0 10px 0;
  1074. padding-bottom: 5px;
  1075. border-bottom: 1px solid #979797;
  1076. "
  1077. >
  1078. <div style="display: flex; flex-direction: column">
  1079. <div
  1080. style="
  1081. border: 1px solid #979797;
  1082. font-size: 15px;
  1083. width: 287.5px;
  1084. display: flex;
  1085. justify-content: center;
  1086. align-items: center;
  1087. height: 30px;
  1088. "
  1089. >
  1090. <div class="pijw">
  1091. 药品金额:{{ detailData.prescriptionSum }}
  1092. </div>
  1093. </div>
  1094. <div
  1095. style="
  1096. display: flex;
  1097. justify-content: center;
  1098. align-items: center;
  1099. font-size: 15px;
  1100. height: 30px;
  1101. width: 287.5px;
  1102. border-left: 1px solid #979797;
  1103. border-right: 1px solid #979797;
  1104. "
  1105. >
  1106. <div
  1107. style="
  1108. width: 143.93px;
  1109. display: flex;
  1110. justify-content: center;
  1111. align-items: center;
  1112. height: 30px;
  1113. "
  1114. >
  1115. 煎药费:{{ detailData.daijianCost }}
  1116. </div>
  1117. <div
  1118. style="
  1119. border-left: 1px solid #979797;
  1120. width: 143.93px;
  1121. display: flex;
  1122. justify-content: center;
  1123. align-items: center;
  1124. height: 30px;
  1125. "
  1126. >
  1127. 配送费:{{ detailData.distributionCost }}
  1128. </div>
  1129. </div>
  1130. <div
  1131. style="
  1132. display: flex;
  1133. justify-content: center;
  1134. align-items: center;
  1135. height: 30px;
  1136. font-size: 15px;
  1137. border: 1px solid #979797;
  1138. "
  1139. >
  1140. 总金额:{{ detailData.prescriptionTotalSum }}
  1141. <!-- <div class="zjw"></div> -->
  1142. </div>
  1143. </div>
  1144. <div style="display: flex; flex-wrap: wrap; margin-left: 20px">
  1145. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1146. <span style="font-size: 15px; color: #999999">开方:</span
  1147. >{{ operateList[0].operater }}
  1148. </div>
  1149. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1150. <span style="font-size: 15px; color: #999999">审核:</span
  1151. >{{ operateList[1].operater }}
  1152. </div>
  1153. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1154. <span style="font-size: 15px; color: #999999">调配:</span
  1155. >{{ operateList[2].operater }}
  1156. </div>
  1157. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1158. <span style="font-size: 15px; color: #999999">复核:</span
  1159. >{{ operateList[3].operater }}
  1160. </div>
  1161. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1162. <span style="font-size: 15px; color: #999999">浸泡:</span
  1163. >{{ operateList[4].operater }}
  1164. </div>
  1165. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1166. <span style="font-size: 15px; color: #999999">煎煮:</span
  1167. >{{ operateList[5].operater }}
  1168. </div>
  1169. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1170. <span style="font-size: 15px; color: #999999">打包:</span
  1171. >{{ operateList[6].operater }}
  1172. </div>
  1173. <div style="font-size: 15px; margin-right: 60px; width: 90px">
  1174. <span style="font-size: 15px; color: #999999">发药:</span
  1175. >{{ operateList[7].operater }}
  1176. </div>
  1177. </div>
  1178. </div>
  1179. <div
  1180. style="margin: 10px 16px 10px; font-size: 15px; display: flex"
  1181. >
  1182. <div class="z">注:</div>
  1183. <div>{{ entrust1111 }}</div>
  1184. </div>
  1185. </div>
  1186. </div>
  1187. <el-button
  1188. style="
  1189. margin-top: 50px;
  1190. display: flex;
  1191. justify-content: center;
  1192. align-items: center;
  1193. background-color: #1ab394;
  1194. color: #ffffff;
  1195. font-size: 20px;
  1196. margin-top: 40px;
  1197. width: 300px;
  1198. height: 50px;
  1199. "
  1200. v-show="activePrint === '标签'"
  1201. @click="onHandleUpdatePrintStatus()"
  1202. >打 印</el-button
  1203. >
  1204. <el-button
  1205. style="
  1206. margin-top: 50px;
  1207. display: flex;
  1208. justify-content: center;
  1209. align-items: center;
  1210. background-color: #1ab394;
  1211. color: #ffffff;
  1212. font-size: 20px;
  1213. margin-top: 40px;
  1214. width: 300px;
  1215. height: 50px;
  1216. "
  1217. v-show="activePrint === '中药处方笺'"
  1218. v-print="'#prescriptionCore'"
  1219. @click="onHandleUpdatePrintStatus()"
  1220. >打 印</el-button
  1221. >
  1222. </div>
  1223. </div>
  1224. </el-dialog>
  1225. <el-dialog
  1226. title=""
  1227. :visible.sync="dialogFormVisible"
  1228. width="500px"
  1229. @close="closeRemark"
  1230. >
  1231. <el-form :model="formRemark" :rules="rules" ref="ruleForm">
  1232. <el-form-item label="备注:" prop="remark">
  1233. <el-input v-model="formRemark.remark"></el-input>
  1234. </el-form-item>
  1235. </el-form>
  1236. <div slot="footer" class="dialog-footer">
  1237. <el-button @click="closeRemark">取 消</el-button>
  1238. <el-button type="primary" @click="setRemark">确 定</el-button>
  1239. </div>
  1240. </el-dialog>
  1241. <el-dialog :fullscreen="true" :title="recipeEditTitle" :visible.sync="recipeEditOpen"
  1242. custom-class="prescription-core-edit-container" width="1180px" size="mini"
  1243. append-to-body destroy-on-close @closed="recipeEditId = null;recipeEditShow = false">
  1244. <edit v-if="recipeEditShow" :id="recipeEditId" :mode="recipeEditMode" @close="recipeEditOpen = false;$event && getList()"></edit>
  1245. </el-dialog>
  1246. <el-dialog title="打印预览" :visible.sync="showPrint" @closed="showPrintId = ''">
  1247. <print-container v-if="showPrintId" :id="showPrintId"
  1248. :load-express="showPrintExpressCom"
  1249. />
  1250. </el-dialog>
  1251. </div>
  1252. </template>
  1253. <script>
  1254. import printer from '@/utils/printer.js'
  1255. import axios from "axios";
  1256. const instance = axios.create({
  1257. // baseURL: 'http://47.118.22.101:8080',
  1258. baseURL: "http://10.250.11.48:8080",
  1259. timeout: 10000,
  1260. headers: { "Content-Type": "application/json;charset=utf-8" },
  1261. });
  1262. import {
  1263. listPrescriptionCore,
  1264. getPrescriptionCore,
  1265. delPrescriptionCore,
  1266. addPrescriptionCore,
  1267. updatePrescriptionCore,
  1268. exportPrescriptionCore,
  1269. check,
  1270. addNum,
  1271. } from "@/api/prescription/prescriptionCore";
  1272. import { listMedicalMechanism } from "@/api/medical/mechanism";
  1273. import QRCode from "qrcodejs2";
  1274. import {
  1275. releaseOrder,
  1276. selectOrderDetail,
  1277. remarkYS,
  1278. } from "@/api/prescription/prescriptionAudit";
  1279. import { updatePrintStatus } from "@/api/prescription/prescriptionCore";
  1280. import Pres from "@/components/Pres/index.vue";
  1281. import JsBarcode from "@/components/JsBarcode/index.vue";
  1282. import Edit from "./edit.vue";
  1283. import dayjs from "dayjs";
  1284. import PrintContainer from '@/views/rescription/prescriptionCore/printContainer.vue';
  1285. // import JsBarcode from "jsbarcode"
  1286. // 防抖函数
  1287. function debounce(fn, delay) {
  1288. let timeout = null;
  1289. return function() {
  1290. let context = this;
  1291. let args = arguments;
  1292. if (timeout) clearTimeout(timeout);
  1293. let callNow = !timeout;
  1294. timeout = setTimeout(() => {
  1295. timeout = null;
  1296. }, delay);
  1297. if (callNow) fn.apply(context, args);
  1298. };
  1299. }
  1300. export default {
  1301. name: "PrescriptionCore",
  1302. components: {PrintContainer, Pres, JsBarcode, Edit },
  1303. data() {
  1304. const now = dayjs().format("YYYY-MM-DD");
  1305. return {
  1306. recipeEditMode: 'edit',
  1307. recipeEditId: null,
  1308. recipeEditOpen: false,
  1309. recipeEditShow: false,
  1310. curPreNo: "",
  1311. curName: "",
  1312. curSex: "",
  1313. curAge: "",
  1314. curPatientBirthday: "",
  1315. //20231219新增三个字段
  1316. curPreName: "",
  1317. curNumber: "",
  1318. curPrintTime: "",
  1319. //20240229 新增是否代煎
  1320. isBehalf: "",
  1321. $baseUrl: this.$baseUrl,
  1322. operateList: [
  1323. { py: "kf", title: "开方", operater: "" },
  1324. { py: "sh", title: "审核", operater: "" },
  1325. { py: "tp", title: "调配", operater: "" },
  1326. { py: "fh", title: "复核", operater: "" },
  1327. { py: "jp", title: "浸泡", operater: "" },
  1328. { py: "jz", title: "煎煮", operater: "" },
  1329. { py: "db", title: "打包", operater: "" },
  1330. { py: "fy", title: "发药", operater: "" },
  1331. ],
  1332. thirdPartStateArr: [
  1333. { name: "已分配", id: 1 },
  1334. { name: "已传送", id: 2 },
  1335. ],
  1336. checkStateArr: [
  1337. { name: "待审核", id: 0 },
  1338. { name: "审核通过", id: 1 },
  1339. { name: "审核未通过", id: 2 },
  1340. ],
  1341. preMzZyArr: [
  1342. { name: "门诊", id: 1 },
  1343. { name: "住院", id: 2 },
  1344. ],
  1345. isPrintArr: [
  1346. { name: "未打印", id: 0 },
  1347. { name: "已打印", id: 1 },
  1348. ],
  1349. isBehalfArr: [
  1350. { name: "否", id: 0 },
  1351. { name: "是", id: 1 },
  1352. ],
  1353. deployStateArr: [
  1354. { name: "已审核", id: 110, key: "audited" },
  1355. // { name: "已审核不通过", id: 120, key: "---" },
  1356. { name: "已调配", id: 130, key: "allocated" },
  1357. { name: "已复核", id: 140, key: "reviewed" },
  1358. { name: "已浸泡", id: 150, key: "soaked" },
  1359. { name: "已煎煮", id: 160, key: "cooked" },
  1360. { name: "已先煎", id: 161, key: "preCooked" },
  1361. { name: "已开始煎煮", id: 162, key: "startedCooking" },
  1362. { name: "已后下", id: 163, key: "lowered" },
  1363. { name: "已结束煎煮", id: 164, key: "finishedCooking" },
  1364. { name: "已开始浓缩", id: 165, key: "startedConcentration" },
  1365. { name: "已结束浓缩", id: 166, key: "finishedConcentration" },
  1366. { name: "已打包", id: 170, key: "packaged" },
  1367. { name: "已上架", id: 171, key: "grounding" },
  1368. { name: "已发药", id: 175, key: "send" },
  1369. // { name: "煎药已作废", id: 999, key: "---" },
  1370. ],
  1371. entrust1111:
  1372. "1、本处方当日有效\n 2、取药时请您当面核对。。。。 \n 3、延长处方用量时间原油:慢性病 其他老年病 外地 其他",
  1373. visible: false,
  1374. remarks: "",
  1375. btnState: 1,
  1376. rowId: null,
  1377. detailData: {
  1378. oralPreItemList: [],
  1379. },
  1380. activeName: "first",
  1381. state: {
  1382. 1: "配药",
  1383. 2: "煎药",
  1384. 3: "发药",
  1385. 4: "配送",
  1386. },
  1387. openConsole: false,
  1388. // 遮罩层
  1389. loading: true,
  1390. // 导出遮罩层
  1391. exportLoading: false,
  1392. // 选中数组
  1393. ids: [],
  1394. // 非单个禁用
  1395. single: true,
  1396. // 非多个禁用
  1397. multiple: true,
  1398. // 显示搜索条件
  1399. showSearch: true,
  1400. // 总条数
  1401. total: 0,
  1402. // 处方审核表格数据
  1403. prescriptionCoreList: [],
  1404. // 弹出层标题
  1405. title: "",
  1406. // 是否显示弹出层
  1407. open: false,
  1408. // print相关
  1409. openPrint: false,
  1410. showPrint: false, // 打印页面弹窗
  1411. showPrintId: '', // 打印页面弹窗
  1412. showPrintExpressCom: false,
  1413. activePrint: "标签",
  1414. printTypeList: [
  1415. { name: "标签", id: 0 },
  1416. { name: "中药处方笺", id: 1 },
  1417. ],
  1418. // 查询参数
  1419. queryParams: {
  1420. pageNum: 1,
  1421. pageSize: 10,
  1422. //state: 1,
  1423. appId: null,
  1424. yljgId: null,
  1425. timeStamp: null,
  1426. token: null,
  1427. preNo: null,
  1428. preName: null,
  1429. name: null,
  1430. sex: null,
  1431. age: null,
  1432. department: null,
  1433. doctor: null,
  1434. prescriptionTime: [now, now],
  1435. disCode: null,
  1436. disName: null,
  1437. symCode: null,
  1438. symName: null,
  1439. westernDisease: null,
  1440. westernCode: null,
  1441. patientContent: null,
  1442. nowDesc: null,
  1443. pastDesc: null,
  1444. fourDiagnosis: null,
  1445. physical: null,
  1446. auxiliaryExam: null,
  1447. premzzy: null,
  1448. visitNo: null,
  1449. checkState: null,
  1450. remarks: null,
  1451. extendedTxt: null,
  1452. address: null,
  1453. contactNumber: null,
  1454. consignee: null,
  1455. takingMethod: null,
  1456. yfId: window.localStorage.getItem("pharmacyId"),
  1457. },
  1458. // 表单参数
  1459. form: {},
  1460. // 表单校验
  1461. rules: {},
  1462. listMedicalMechanismArr: [],
  1463. // 保存右侧合理用药信息
  1464. rationalMed: [],
  1465. // 从1-9 分别对应 超剂量 到 19反
  1466. rationalMed1: [],
  1467. rationalMed2: [],
  1468. rationalMed3: [],
  1469. rationalMed4: [],
  1470. rationalMed5: [],
  1471. rationalMed6: [],
  1472. rationalMed7: [],
  1473. rationalMed8: [],
  1474. rationalMed9: [],
  1475. rationalMed10: [],
  1476. raDoseShow: false,
  1477. dialogFormVisible: false, //药师备注
  1478. formRemark: {
  1479. remark: "",
  1480. },
  1481. rules: {
  1482. remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
  1483. },
  1484. };
  1485. },
  1486. created() {
  1487. this.getList();
  1488. this.getListMedicalMechanism();
  1489. },
  1490. mixins: [printer],
  1491. watch: {
  1492. rationalMed10: {
  1493. deep: true,
  1494. immediate: true,
  1495. handler: function () {
  1496. this.countDose();
  1497. },
  1498. },
  1499. },
  1500. computed: {
  1501. formattedDate() {
  1502. const dateObj = new Date(this.curPatientBirthday);
  1503. const year = dateObj.getFullYear();
  1504. const month = dateObj.getMonth() + 1;
  1505. const day = dateObj.getDate();
  1506. return `${year}年${month}月${day}日`;
  1507. },
  1508. curPreNameText() {
  1509. switch (this.curPreName) {
  1510. case "0":
  1511. return "散装饮片";
  1512. case "1":
  1513. return "散装颗粒";
  1514. case "2":
  1515. return "小包装饮片";
  1516. case "3":
  1517. return "小包装颗粒";
  1518. defalut: return this.curPreName;
  1519. }
  1520. },
  1521. isBehalfText() {
  1522. if (this.isBehalf == 1) {
  1523. return "是";
  1524. } else {
  1525. return "否";
  1526. }
  1527. },
  1528. recipeEditTitle() {
  1529. if (this.recipeEditMode === 'check') return '处方审核查看'
  1530. return this.recipeEditId ? '复制处方' : '新增处方';
  1531. }
  1532. },
  1533. methods: {
  1534. countDose() {
  1535. let show = false;
  1536. this.rationalMed10.forEach((item) => {
  1537. if (item.showDose) {
  1538. show = true;
  1539. }
  1540. });
  1541. this.$forceUpdate();
  1542. this.raDoseShow = show;
  1543. },
  1544. // 获取右侧合理用药信息展示
  1545. async getRationalMed(matCode) {
  1546. let matCodes = [];
  1547. matCodes.push(matCode);
  1548. instance
  1549. .post("/basis/knowlib/getMatInfoByMatCode", {
  1550. matCode: matCode,
  1551. matCodes: matCodes,
  1552. })
  1553. .then((res) => {
  1554. if (res.status == 200) {
  1555. let data = res.data;
  1556. if (data.code == 0 && data.message) {
  1557. this.rationalMed.push(data.data);
  1558. // 去重
  1559. const removeRepeat = (arr, key) => {
  1560. let obj = {};
  1561. arr = arr.reduce((pre, next) => {
  1562. obj[next[key]]
  1563. ? ""
  1564. : (obj[next[key]] = true && pre.push(next));
  1565. return pre;
  1566. }, []);
  1567. return arr;
  1568. };
  1569. this.rationalMed = removeRepeat(this.rationalMed, "matid");
  1570. this.resetRationalMed();
  1571. }
  1572. }
  1573. })
  1574. .catch((err) => {
  1575. console.log(123, err);
  1576. });
  1577. },
  1578. resetRationalMed() {
  1579. const removeRepeat = (arr, key) => {
  1580. let obj = {};
  1581. arr = arr.reduce((pre, next) => {
  1582. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  1583. return pre;
  1584. }, []);
  1585. return arr;
  1586. };
  1587. this.rationalMed1 = [];
  1588. this.rationalMed2 = [];
  1589. this.rationalMed3 = [];
  1590. this.rationalMed4 = [];
  1591. this.rationalMed5 = [];
  1592. this.rationalMed6 = [];
  1593. this.rationalMed7 = [];
  1594. this.rationalMed8 = [];
  1595. this.rationalMed9 = [];
  1596. this.rationalMed10 = [];
  1597. this.rationalMed = removeRepeat(this.rationalMed, "matid");
  1598. this.rationalMed.forEach((item) => {
  1599. item.showDose = item.showDose ? true : false;
  1600. if (item.matdosage) {
  1601. // 超剂量药品:
  1602. this.rationalMed1.push(item);
  1603. }
  1604. if (item.matsjj) {
  1605. // 慎忌禁用药:
  1606. this.rationalMed2.push(item);
  1607. }
  1608. if (item.matyfsjj) {
  1609. // 孕妇慎忌禁:
  1610. this.rationalMed3.push(item);
  1611. }
  1612. if (item.matysjj) {
  1613. // 服药饮食禁忌:
  1614. this.rationalMed4.push(item);
  1615. }
  1616. if (item.matdxsm) {
  1617. /// 药物毒性说明:
  1618. this.rationalMed5.push(item);
  1619. }
  1620. if (item.matbzjj) {
  1621. // 病证用药禁忌:
  1622. this.rationalMed6.push(item);
  1623. }
  1624. if (item.matsbf) {
  1625. // 18反
  1626. this.rationalMed7.push(item);
  1627. }
  1628. if (item.matsjw) {
  1629. // 十九畏:
  1630. this.rationalMed8.push(item);
  1631. }
  1632. if (item.matby) {
  1633. // 用药不宜:
  1634. this.rationalMed9.push(item);
  1635. }
  1636. if (item.matmaxdosage && item.matmindosage) {
  1637. this.rationalMed10.push(item);
  1638. }
  1639. });
  1640. this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
  1641. this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
  1642. this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
  1643. this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
  1644. this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
  1645. this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
  1646. this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
  1647. this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
  1648. this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
  1649. this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
  1650. },
  1651. tableRowClassName({ row, rowIndex }) {
  1652. if (row.checkState == 0) {
  1653. return "warning-row";
  1654. }
  1655. return "";
  1656. },
  1657. handleClose() {
  1658. console.log("123123");
  1659. this.getList();
  1660. },
  1661. onHandleUpdatePrintStatus() {
  1662. if(this.activePrint == '标签'){
  1663. const printWidth = 284
  1664. const px2mm = 3.75
  1665. const mm2dot = 8
  1666. const dom = document.getElementById('printTitle')
  1667. const titleWidth = (printWidth - dom.clientWidth * 0.8) / 2
  1668. let data = `
  1669. SIZE 80 mm,50 mm
  1670. GAP 2 mm,0 mm
  1671. OFFSET 0 mm
  1672. REFERENCE ${( 5 / px2mm + 1.5 ) * mm2dot},0
  1673. SPEED 4
  1674. DENSITY 8
  1675. DIRECTION 1
  1676. SET HEAD ON
  1677. SET PRINTKEY OFF
  1678. SET KEY1 ON
  1679. SET KEY2 ON
  1680. SHIFT 0
  1681. SET PEEL ON
  1682. SET TEAR ON
  1683. BACKFEED 0
  1684. CLS
  1685. TEXT ${titleWidth / px2mm * mm2dot},${ 8 / px2mm * mm2dot },"TSS24.BF2",0,1,2,"${this.detailData.yljgName}(中药房)"
  1686. TEXT 0,${ 38 / px2mm * 8 },"TSS24.BF2",0,1,2,"${this.curName}, ${this.curSex}, ${this.detailData.patientBirthday}"
  1687. TEXT ${(printWidth - 28) / px2mm * mm2dot},${38 / px2mm * mm2dot},"TSS24.BF2",0,1,2,"${this.detailData.preMzZy==1 ? '门诊' : '住院'}"
  1688. BARCODE 0,${67 / px2mm * mm2dot},"128",${50 / px2mm * mm2dot},1,0,3,5,"${this.detailData.preNo}"
  1689. TEXT ${(printWidth - 120) / px2mm * mm2dot},${(67 + 2) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"手机号:${this.detailData.contactNumber}"
  1690. TEXT ${(printWidth - 120) / px2mm * mm2dot},${(67 + 25) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"处方用法:${this.detailData.prescriptionusage}"
  1691. TEXT ${(printWidth - 120) / px2mm * mm2dot},${(67 + 48) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"剂数:${this.curNumber}"
  1692. TEXT ${(printWidth - 70) / px2mm * mm2dot},${(67 + 48) / px2mm * mm2dot},"TSS24.BF2",0,1,1,"是否代煎:${this.isBehalfText}"
  1693. TEXT 0,${137 / px2mm * mm2dot},"TSS24.BF2",0,1,1,"科室/病房:${this.detailData.department}"
  1694. TEXT 0,${155 / px2mm * mm2dot},"TSS24.BF2",0,1,1,"药师备注:${this.detailData.pharmacistsremarks||''}"
  1695. TEXT ${70 / px2mm * mm2dot},${173 / px2mm * mm2dot},"TSS24.BF2",0,1,1,"打印时间:${this.detailData.printTime}"
  1696. PRINT 1,1
  1697. `
  1698. this.auditId = this.detailData.id
  1699. this.modelChange(data, 'audit')
  1700. }else{
  1701. updatePrintStatus({
  1702. isPrint: "1",
  1703. id: this.detailData.id,
  1704. });
  1705. }
  1706. },
  1707. // 表单重置
  1708. reset() {
  1709. this.curPreNo = "";
  1710. this.curName = "";
  1711. this.curSex = "";
  1712. this.curAge = "";
  1713. this.curPatientBirthday = "";
  1714. //20231219新增三个字段
  1715. this.curPreName = "";
  1716. this.curNumber = "";
  1717. this.curPrintTime = "";
  1718. //20240229 新增是否代煎
  1719. (this.isBehalf = ""),
  1720. (this.form = {
  1721. id: null,
  1722. remarks: null,
  1723. });
  1724. this.remarks = null;
  1725. this.resetForm("form");
  1726. },
  1727. // 备注
  1728. getRemark(row) {
  1729. this.dialogFormVisible = true;
  1730. const id = row.id;
  1731. this.rowId = id;
  1732. },
  1733. setRemark() {
  1734. this.$refs.ruleForm.validate((valid) => {
  1735. if (valid) {
  1736. remarkYS({ id: this.rowId, remark: this.formRemark.remark }).then(
  1737. (res) => {
  1738. if (res.code === 200) {
  1739. this.dialogFormVisible = false;
  1740. this.msgSuccess("备注成功");
  1741. }
  1742. }
  1743. );
  1744. }
  1745. });
  1746. },
  1747. closeRemark() {
  1748. this.$refs.ruleForm.resetFields();
  1749. this.formRemark.remark = "";
  1750. this.dialogFormVisible = false;
  1751. },
  1752. //打印
  1753. showPrintContentMethod(row) {
  1754. this.showPrint = true;
  1755. this.showPrintId = row.id;
  1756. this.showPrintExpressCom = row.expressExecutor === '顺丰';
  1757. },
  1758. consoleBtn(row) {
  1759. this.reset();
  1760. this.activePrint = "标签";
  1761. const id = row.id;
  1762. console.log("id>>>>", id);
  1763. this.detailData = {};
  1764. selectOrderDetail({ id: id }).then((response) => {
  1765. console.log("response.data>>>>", response.data);
  1766. // debugger
  1767. this.form = response.data;
  1768. this.detailData = response.data;
  1769. this.curPreNo = response.data.preNo;
  1770. this.curName = response.data.name;
  1771. this.curSex = response.data.sex;
  1772. this.curAge = response.data.age;
  1773. this.curPatientBirthday = response.data.patientBirthday;
  1774. //20231219新增三个字段
  1775. // this.curPreName = response.data.preName;
  1776. //20240229 改成 中药处方类型
  1777. this.curPreName = response.data.oralPre.zhongyaoType;
  1778. //20240229 新增是否代煎
  1779. this.isBehalf = response.data.isBehalf;
  1780. this.curNumber = response.data.number;
  1781. this.curPrintTime = response.data.printTime;
  1782. this.detailData.patientBirthday = this.detailData.patientBirthday
  1783. ? this.detailData.patientBirthday
  1784. : "";
  1785. this.detailData.presType = "普通处方"; //TODO neo
  1786. console.log("handlePrint detailData", this.detailData);
  1787. this.openPrint = true;
  1788. this.operateList[0].operater = this.detailData.doctor || "";
  1789. this.operateList[1].operater = this.detailData.checkBy || "";
  1790. this.operateList[2].operater = this.detailData.tiaopeiName || "";
  1791. const length = response.data.operateList;
  1792. if (length > 0) {
  1793. response.data.operateList.forEach((item) => {
  1794. switch (item.type) {
  1795. case "2":
  1796. this.operateList[3].operater = item.createBy;
  1797. break;
  1798. case "3":
  1799. this.operateList[4].operater = item.createBy;
  1800. break;
  1801. case "4":
  1802. this.operateList[5].operater = item.createBy;
  1803. break;
  1804. case "5":
  1805. this.operateList[6].operater = item.createBy;
  1806. break;
  1807. case "6":
  1808. this.operateList[7].operater = item.createBy;
  1809. break;
  1810. defalut: console.log(
  1811. "处方签res.data.operateList数据异常",
  1812. item.type
  1813. );
  1814. }
  1815. });
  1816. }
  1817. // this.title = "查看处/**/方审核";
  1818. //console.log(response);
  1819. });
  1820. },
  1821. handlePrintType(e) {
  1822. console.log("this.activePrint", this.activePrint);
  1823. console.log("click>>>", e.name);
  1824. if (e.name && e.name !== this.activePrint) {
  1825. this.activePrint = e.name;
  1826. console.log(" change this.activePrint", this.activePrint);
  1827. } else {
  1828. console.log("nochange this.activePrint", this.activePrint);
  1829. }
  1830. },
  1831. /** 释放订单 */
  1832. handleRelease(row) {
  1833. const ids = row.id || this.ids;
  1834. this.$confirm(
  1835. '是否确认释放处方编号为"' + row.preNo + '"的数据项?',
  1836. "警告",
  1837. {
  1838. confirmButtonText: "确定",
  1839. cancelButtonText: "取消",
  1840. type: "warning",
  1841. }
  1842. )
  1843. .then(function () {
  1844. return releaseOrder({ ids: ids });
  1845. })
  1846. .then(() => {
  1847. this.getList();
  1848. this.msgSuccess("释放成功");
  1849. })
  1850. .catch(() => {});
  1851. },
  1852. payOrder() {
  1853. this.innerVisible = true;
  1854. // 二维码内容,一般是由后台返回的跳转链接,这里是写死的一个链接
  1855. this.qrcode = `https://yaofang.hzxunmai.com/doc#/input?id=${this.rowId}`;
  1856. // 使用$nextTick确保数据渲染
  1857. this.$nextTick(() => {
  1858. this.crateQrcode();
  1859. });
  1860. },
  1861. // 生成二维码
  1862. crateQrcode() {
  1863. this.qr = new QRCode("qrcode", {
  1864. width: 100,
  1865. height: 100, // 高度
  1866. text: this.qrcode, // 二维码内容
  1867. });
  1868. },
  1869. // 关闭弹框,清除已经生成的二维码
  1870. closeCode() {
  1871. this.$refs.qrcode.innerHTML = "";
  1872. },
  1873. handleClick(tab, event) {
  1874. //console.log(tab, event);
  1875. },
  1876. /** 查询处方审核列表 */
  1877. getList() {
  1878. this.loading = true;
  1879. var form = Object.assign({}, this.queryParams);
  1880. // form.isPrint = '0'
  1881. if (
  1882. this.queryParams.prescriptionTime &&
  1883. this.queryParams.prescriptionTime.length
  1884. ) {
  1885. form.startTime = this.queryParams.prescriptionTime[0];
  1886. form.endTime = this.queryParams.prescriptionTime[1];
  1887. } else {
  1888. form.startTime = "";
  1889. form.endTime = "";
  1890. }
  1891. delete form.prescriptionTime;
  1892. listPrescriptionCore(form).then((response) => {
  1893. this.prescriptionCoreList = response.rows;
  1894. this.total = response.total;
  1895. this.loading = false;
  1896. });
  1897. },
  1898. getListMedicalMechanism() {
  1899. listMedicalMechanism().then((res) => {
  1900. this.listMedicalMechanismArr = res.data;
  1901. });
  1902. },
  1903. // 取消按钮
  1904. cancel() {
  1905. this.open = false;
  1906. this.reset();
  1907. },
  1908. //审核拒绝
  1909. checkBtn: debounce(function(num) {
  1910. //console.log(num);
  1911. let params = {
  1912. checkState: num,
  1913. id: this.rowId,
  1914. remarks: this.remarks,
  1915. };
  1916. check(params).then((res) => {
  1917. //console.log(res);
  1918. if (res.code) {
  1919. this.msgSuccess("修改成功");
  1920. this.open = false;
  1921. this.visible = false;
  1922. this.getList();
  1923. }
  1924. });
  1925. }, 1000),
  1926. /** 搜索按钮操作 */
  1927. handleQuery() {
  1928. this.queryParams.pageNum = 1;
  1929. this.getList();
  1930. },
  1931. /** 重置按钮操作 */
  1932. resetQuery() {
  1933. this.resetForm("queryForm");
  1934. const now = dayjs().format("YYYY-MM-DD");
  1935. this.queryParams.prescriptionTime = [now, now];
  1936. this.handleQuery();
  1937. },
  1938. // 多选框选中数据
  1939. handleSelectionChange(selection) {
  1940. this.ids = selection.map((item) => item.id);
  1941. this.single = selection.length !== 1;
  1942. this.multiple = !selection.length;
  1943. },
  1944. /** 新增按钮操作 */
  1945. handleAdd() {
  1946. this.reset();
  1947. this.open = true;
  1948. this.title = "添加处方审核";
  1949. },
  1950. /** 修改按钮操作 */
  1951. handleUpdate(num, row) {
  1952. if (num === 2) {
  1953. this.recipeEditId = row.id;
  1954. this.recipeEditShow = true;
  1955. this.recipeEditOpen = true;
  1956. return;
  1957. }
  1958. this.reset();
  1959. const id = row.id || this.ids;
  1960. this.btnState = num;
  1961. this.rowId = id;
  1962. (this.rowId = id), (this.btnState = num);
  1963. getPrescriptionCore(id).then((response) => {
  1964. // this.form = response.data;
  1965. this.detailData = response.data;
  1966. this.open = true;
  1967. this.title = "查看处方审核";
  1968. let _this = this;
  1969. _this.rationalMed = [];
  1970. if (
  1971. response.data.oralPreItemList &&
  1972. response.data.oralPreItemList.length > 0
  1973. ) {
  1974. response.data.oralPreItemList.forEach((i) => {
  1975. _this.getRationalMed(i.matCode);
  1976. });
  1977. }
  1978. //console.log(response);
  1979. });
  1980. },
  1981. /** 提交按钮 */
  1982. submitForm() {
  1983. this.$refs["form"].validate((valid) => {
  1984. if (valid) {
  1985. if (this.form.id != null) {
  1986. updatePrescriptionCore(this.form).then((response) => {
  1987. this.msgSuccess("修改成功");
  1988. this.open = false;
  1989. this.getList();
  1990. });
  1991. } else {
  1992. addPrescriptionCore(this.form).then((response) => {
  1993. this.msgSuccess("新增成功");
  1994. this.open = false;
  1995. this.getList();
  1996. });
  1997. }
  1998. }
  1999. });
  2000. },
  2001. /** 删除按钮操作 */
  2002. handleDelete(row) {
  2003. const ids = row.id || this.ids;
  2004. this.$confirm("确定需要删除选中数据吗?", "警告", {
  2005. confirmButtonText: "确定",
  2006. cancelButtonText: "取消",
  2007. type: "warning",
  2008. })
  2009. .then(function () {
  2010. return delPrescriptionCore(ids);
  2011. })
  2012. .then(() => {
  2013. this.getList();
  2014. this.msgSuccess("删除成功");
  2015. })
  2016. .catch(() => {});
  2017. },
  2018. /** 导出按钮操作 */
  2019. handleExport() {
  2020. const queryParams = this.queryParams;
  2021. this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
  2022. confirmButtonText: "确定",
  2023. cancelButtonText: "取消",
  2024. type: "warning",
  2025. })
  2026. .then(() => {
  2027. this.exportLoading = true;
  2028. return exportPrescriptionCore(queryParams);
  2029. })
  2030. .then((response) => {
  2031. this.download(response.msg);
  2032. this.exportLoading = false;
  2033. })
  2034. .catch(() => {});
  2035. },
  2036. },
  2037. filters: {
  2038. ftsjj(value) {
  2039. if (value == 1) {
  2040. return "慎用";
  2041. }
  2042. if (value == 2) {
  2043. return "忌用";
  2044. }
  2045. if (value == 3) {
  2046. return "禁用";
  2047. }
  2048. },
  2049. fyfsjj(value) {
  2050. if (value == 1) {
  2051. return "孕妇慎用";
  2052. }
  2053. if (value == 2) {
  2054. return "孕妇忌用";
  2055. }
  2056. if (value == 3) {
  2057. return "孕妇禁用";
  2058. }
  2059. },
  2060. },
  2061. };
  2062. </script>
  2063. <style scoped>
  2064. h3 {
  2065. margin: 0;
  2066. }
  2067. #qrcode {
  2068. width: 160px;
  2069. margin: 0 auto;
  2070. }
  2071. .defwidth {
  2072. width: 160px;
  2073. }
  2074. .prescriptionCore >>> .warning-row,
  2075. .prescriptionCore >>> .el-table__body tr.warning-row.current-row > td,
  2076. .prescriptionCore >>> .el-table__body tr.warning-row.hover-row > td {
  2077. background: #e6a23c;
  2078. color: #fff;
  2079. }
  2080. .prescriptionCore >>> .el-table__body tr.hover-row > td,
  2081. .prescriptionCore >>> .el-table__body tr.hover-row.current-row > td,
  2082. .prescriptionCore >>> .el-table__body tr.hover-row.el-table__row--striped > td,
  2083. .prescriptionCore
  2084. >>> .el-table__body
  2085. tr.hover-row.el-table__row--striped.current-row
  2086. > td {
  2087. background-color: #3a5788;
  2088. color: #fff;
  2089. }
  2090. .printbtn {
  2091. background: #409eff;
  2092. color: #fff;
  2093. }
  2094. .flex {
  2095. display: flex;
  2096. align-items: center;
  2097. flex-wrap: wrap;
  2098. padding: 0 30px;
  2099. }
  2100. .flex-sub {
  2101. flex: 0 0 33.333333%;
  2102. margin-top: 6px;
  2103. }
  2104. .totaltip {
  2105. margin-bottom: 12px;
  2106. display: flex;
  2107. align-items: center;
  2108. justify-content: space-between;
  2109. }
  2110. .active {
  2111. background-color: #1ab394;
  2112. color: #ffffff !important;
  2113. }
  2114. </style>
  2115. <style scoped>
  2116. .display_f {
  2117. display: flex;
  2118. justify-content: space-between;
  2119. align-items: flex-start;
  2120. }
  2121. ._left {
  2122. flex: 1;
  2123. }
  2124. ._right {
  2125. width: 300px;
  2126. max-height: 610px;
  2127. padding: 0 30px;
  2128. overflow-y: scroll;
  2129. }
  2130. .title-container {
  2131. div {
  2132. font-size: 18px;
  2133. font-weight: 500;
  2134. color: #000000;
  2135. text-align: center;
  2136. margin-bottom: 20px;
  2137. }
  2138. }
  2139. .patiens-msg {
  2140. font-size: 14px;
  2141. font-family: PingFang SC;
  2142. font-weight: 400;
  2143. color: #333333;
  2144. .p {
  2145. margin-bottom: 5px;
  2146. cursor: default;
  2147. .patiens-name {
  2148. color: #17c7b1;
  2149. font-weight: bold;
  2150. font-size: 16px;
  2151. }
  2152. .patiens-desc {
  2153. display: inline-block;
  2154. .matname {
  2155. color: #17c7b1;
  2156. }
  2157. }
  2158. .patiens-cate {
  2159. font-weight: bold;
  2160. }
  2161. }
  2162. }
  2163. ::v-deep svg{
  2164. width: 32mm !important;
  2165. height: auto !important;
  2166. }
  2167. </style>