index.vue 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998
  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. style="width:160px"
  15. v-model="queryParams.yljgId"
  16. placeholder="请选择医疗机构"
  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="preNo">
  28. <el-input
  29. style="width:160px"
  30. v-model="queryParams.preNo"
  31. placeholder="请输入处方号"
  32. clearable
  33. size="small"
  34. @keyup.enter.native="handleQuery"
  35. />
  36. </el-form-item>
  37. <el-form-item label="" prop="name">
  38. <el-input
  39. style="width:160px"
  40. v-model="queryParams.name"
  41. placeholder="请输入患者姓名"
  42. clearable
  43. size="small"
  44. @keyup.enter.native="handleQuery"
  45. />
  46. </el-form-item>
  47. <el-form-item label="" prop="prescriptionTime">
  48. <el-date-picker
  49. style="width:260px"
  50. clearable
  51. size="small"
  52. v-model="queryParams.prescriptionTime"
  53. type="daterange"
  54. value-format="yyyy-MM-dd"
  55. start-placeholder="开方开始时间"
  56. end-placeholder="开方结束时间"
  57. >
  58. </el-date-picker>
  59. </el-form-item>
  60. <el-form-item label="" prop="thread">
  61. <el-select v-model="queryParams.thread" placeholder="请选择处方状态"
  62. style="width:160px">
  63. <el-option
  64. v-for="item in deployStateArr"
  65. :key="item.id"
  66. :value="item.id"
  67. :label="item.name"
  68. ></el-option>
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item>
  72. <el-button
  73. type="primary"
  74. icon="el-icon-search"
  75. size="mini"
  76. @click="handleQuery"
  77. >搜索</el-button
  78. >
  79. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  80. >重置</el-button
  81. >
  82. </el-form-item>
  83. </div>
  84. </div>
  85. </el-form>
  86. <el-table
  87. v-loading="loading"
  88. :data="prescriptionCoreList"
  89. @selection-change="handleSelectionChange"
  90. border
  91. size="mini"
  92. >
  93. <el-table-column type="index" width="55" align="center" label="序号"/>
  94. <el-table-column label="处方号" align="center" prop="preNo" />
  95. <el-table-column label="医疗机构" align="center" prop="yijgName" />
  96. <el-table-column label="门诊/住院" align="center" prop="premzzy">
  97. <template slot-scope="scope">{{scope.row.preMzZy==1?'门诊':'住院'}}</template>
  98. </el-table-column>
  99. <el-table-column label="患者姓名" align="center" prop="name" />
  100. <el-table-column label="性别" align="center" prop="sex" />
  101. <el-table-column label="临床诊断" align="center" prop="disName">
  102. <template slot-scope="scope">
  103. {{ scope.row.disName + "-" + scope.row.symName}}
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="开方医生" align="center" prop="doctor" />
  107. <el-table-column label="处方名称" align="center" prop="preName" />
  108. <el-table-column label="处方类型" align="center" prop="type">
  109. <template slot-scope="scope">
  110. {{ scope.row.type === 1 ? "中药制剂" : "中药处方" }}
  111. </template>
  112. </el-table-column>
  113. <el-table-column
  114. label="开方时间"
  115. align="center"
  116. prop="prescriptionTime"
  117. width="180"
  118. >
  119. <template slot-scope="scope">
  120. <!-- // parseTime(scope.row.prescriptionTime, "{y}-{m}-{d}")-->
  121. <span>{{
  122. scope.row.prescriptionTime
  123. }}</span>
  124. </template>
  125. </el-table-column>
  126. <el-table-column label="溯源状态" align="center" prop="thread">
  127. <template slot-scope="scope">
  128. <dict-tag :options="deployStateArr" :value="scope.row.thread" />
  129. </template>
  130. </el-table-column>
  131. <!-- <el-table-column label="备注" align="center" prop="remarks" />-->
  132. <el-table-column label="审核人" align="center" prop="checkBy" />
  133. <el-table-column label="审核时间" align="center" prop="checkTime" />
  134. <el-table-column
  135. label="操作"
  136. fixed="right"
  137. align="center"
  138. width="180"
  139. class-name="small-padding fixed-width"
  140. >
  141. <template slot-scope="scope">
  142. <el-button
  143. size="mini"
  144. type="primary"
  145. style="width: 40px"
  146. @click="handleUpdate(scope.row)"
  147. >详情</el-button
  148. >
  149. <el-button
  150. size="mini"
  151. class="printbtn"
  152. style="width: 40px"
  153. @click="consoleBtn(scope.row)"
  154. v-if="scope.row.checkState == 1"
  155. >打印</el-button
  156. >
  157. <!-- v-hasPermi="['prescription:prescriptionCore:edit']"-->
  158. </template>
  159. </el-table-column>
  160. </el-table>
  161. <pagination
  162. v-show="total > 0"
  163. :total="total"
  164. :page.sync="queryParams.pageNum"
  165. :limit.sync="queryParams.pageSize"
  166. @pagination="getList"
  167. />
  168. <!-- 添加或修改处方审核对话框 -->
  169. <el-dialog
  170. :title="title"
  171. :visible.sync="open"
  172. width="1280px"
  173. append-to-body
  174. >
  175. <div>
  176. <div style="display: flex; align-items: center;margin-bottom:20px;">
  177. <h3>处方信息</h3>
  178. <div style="margin: 0 0 0 30px">处方号:{{detailData.preNo}}</div>
  179. </div>
  180. <el-divider></el-divider>
  181. <el-row :gutter="20">
  182. <el-col :span="24">
  183. <el-descriptions title="" :column="5">
  184. <el-descriptions-item label="患者姓名">{{
  185. detailData.name
  186. }}</el-descriptions-item>
  187. <el-descriptions-item label="性别">{{
  188. detailData.sex
  189. }}</el-descriptions-item>
  190. <el-descriptions-item label="年龄">{{
  191. detailData.age
  192. }}</el-descriptions-item>
  193. <el-descriptions-item label="科室">{{
  194. detailData.department
  195. }}</el-descriptions-item>
  196. <el-descriptions-item label="临床诊断">
  197. {{detailData.disName}}-{{detailData.symName}}
  198. </el-descriptions-item>
  199. <el-descriptions-item label="开方医生">{{
  200. detailData.doctor
  201. }}</el-descriptions-item>
  202. <el-descriptions-item label="处方类型">{{
  203. detailData.type == 1 ? "中药处方" : "中药制剂"
  204. }}</el-descriptions-item>
  205. <el-descriptions-item label="发药状态">{{ detailData.fyState == 0 ? "未发药": detailData.fyState==1?'已发药' : "取消发药" }}</el-descriptions-item>
  206. <el-descriptions-item label="煎药方式">{{
  207. detailData.oralPre && detailData.oralPre.decoctingMethod
  208. }} <span v-if="detailData.oralPre && detailData.oralPre.decoctingMethod=='浓煎'">{{detailData.oralPre && detailData.oralPre.concentration}}</span></el-descriptions-item>
  209. <el-descriptions-item label="处方金额">{{
  210. detailData.type == 1
  211. ? detailData.oralPre &&
  212. detailData.oralPre.prescriptionTotleSum
  213. : detailData.solidPre &&
  214. detailData.solidPre.prescriptionTotleSum
  215. }}</el-descriptions-item>
  216. <el-descriptions-item label="剂型">{{
  217. detailData.oralPre && detailData.oralPre.dosageForm
  218. }}</el-descriptions-item>
  219. <el-descriptions-item label="剂数">{{
  220. detailData.oralPre && detailData.oralPre.number
  221. }}</el-descriptions-item>
  222. <el-descriptions-item label="代煎剂数">{{
  223. detailData.oralPre && detailData.oralPre.daijianNumber
  224. }}</el-descriptions-item>
  225. <el-descriptions-item label="代煎费用">{{
  226. detailData.oralPre && detailData.oralPre.daijianCost
  227. }}</el-descriptions-item>
  228. <el-descriptions-item label="处方用法">{{
  229. detailData.oralPre && detailData.oralPre.prescriptionusage
  230. }}</el-descriptions-item>
  231. <el-descriptions-item label="服药时间">{{
  232. detailData.oralPre && detailData.oralPre.medicationTime
  233. }}</el-descriptions-item>
  234. <el-descriptions-item label="频次">{{
  235. detailData.oralPre && detailData.oralPre.frequency
  236. }}</el-descriptions-item>
  237. <el-descriptions-item label="快递单号">{{
  238. detailData.expressCode
  239. }}</el-descriptions-item>
  240. <el-descriptions-item label="收件人">{{
  241. detailData.consignee
  242. }}</el-descriptions-item>
  243. <el-descriptions-item label="收货电话">{{
  244. detailData.contactNumber
  245. }}</el-descriptions-item>
  246. <el-descriptions-item label="配送费用">{{
  247. detailData.oralPre && detailData.oralPre.distributionCost
  248. }}</el-descriptions-item>
  249. <el-descriptions-item label="总金额">{{
  250. detailData.oralPre && detailData.oralPre.prescriptionTotleSum
  251. }}</el-descriptions-item>
  252. </el-descriptions>
  253. <el-descriptions>
  254. <el-descriptions-item label="嘱托">{{
  255. detailData.oralPre && detailData.oralPre.entrust
  256. }}</el-descriptions-item>
  257. </el-descriptions>
  258. <el-descriptions>
  259. <el-descriptions-item label="收货地址">{{
  260. detailData.address
  261. }}</el-descriptions-item>
  262. </el-descriptions>
  263. </el-col>
  264. <el-col :span="24">
  265. <el-table
  266. v-loading="loading"
  267. :data="detailData && detailData.oralPreItemList"
  268. @selection-change="handleSelectionChange"
  269. >
  270. <el-table-column type="index" width="55" align="center" />
  271. <el-table-column label="药品名称" align="center" prop="matName" />
  272. <el-table-column
  273. label="药品规格"
  274. align="center"
  275. prop="ypggCenter"
  276. />
  277. <el-table-column label="单位" align="center" prop="matUnitName" />
  278. <el-table-column label="用法" align="center" prop="matUsageName" />
  279. <el-table-column label="剂量" align="center" prop="matDose" />
  280. <el-table-column label="零售价" align="center" prop="matXsj" />
  281. <el-table-column label="产地" align="center" prop="matOrigin" />
  282. <el-table-column
  283. label="小计"
  284. align="center"
  285. prop="subtotalMoney"
  286. />
  287. <!-- <el-table-column label="库存数量" align="center" prop="stock" /> -->
  288. </el-table>
  289. </el-col>
  290. </el-row>
  291. <h3 style="margin: 60px 0 0 0">溯源记录</h3>
  292. <div style="display:flex;flex-wrap:wrap;align-items:center;margin-top:20px">
  293. <div style="display:flex;margin: 0 10px 5px 0" v-for="item in deployStateArr">
  294. <el-tag
  295. v-if="detailData && detailData[item.key] && detailData[item.key].length>0"
  296. :key="item.id"
  297. class="mx-1"
  298. :effect="item.key==currentDepoly?'dark':'plain'"
  299. @click.native="handleDeploy(item)"
  300. >
  301. {{ item.name }}
  302. </el-tag>
  303. <i v-if="detailData && detailData[item.key] && detailData[item.key].length" class="el-icon-arrow-right el-icon--right" style="display:flex;align-items:center;"></i>
  304. </div>
  305. </div>
  306. <el-divider></el-divider>
  307. <div class="deploy-record" v-if="depolyStatusObj.createTime">
  308. <div class="deploy">
  309. <div class="content" v-if="depolyStatusObj.createTime">
  310. <div class="title body">操作时间:</div>
  311. <div class="body">{{ depolyStatusObj.createTime }}</div>
  312. <!-- <div class="body" v-else> </div>-->
  313. </div>
  314. <div class="content" v-if="depolyStatusObj.operateType && currentDepoly">
  315. <div class="title body">操作模式:</div>
  316. <div class="body" v-if="depolyStatusObj.operateType">{{ (currentDepoly == 'audited' || currentDepoly == 'reviewed' || currentDepoly == 'cooked')?'人工':depolyStatusObj.operateType=='0'?'自动化':'人工' }}</div>
  317. <div class="body" v-else> </div>
  318. </div>
  319. <div class="content" v-if="(currentDepoly == 'audited' || currentDepoly == 'reviewed' || currentDepoly == 'cooked') || depolyStatusObj.operateType!=='0' && depolyStatusObj.createBy">
  320. <div class="title body">操作人:</div>
  321. <div class="body" v-if="depolyStatusObj.createBy">{{ depolyStatusObj.createBy }}</div>
  322. <div class="body" v-else> </div>
  323. </div>
  324. <div class="content" style="justify-content: flex-start;" v-if="currentDepoly == 'reviewed' && depolyStatusObj.dosage">
  325. <div class="title body">复核重量:</div>
  326. <div class="body" v-if="depolyStatusObj.dosage">{{ depolyStatusObj.dosage }}</div>
  327. <div class="body" v-else> </div>
  328. </div>
  329. <div class="content" style="justify-content: flex-start;" v-if="(currentDepoly !== 'audited' && currentDepoly !== 'reviewed' && currentDepoly !== 'cooked') && depolyStatusObj.operateType=='0' && depolyStatusObj.deviceNo">
  330. <div class="title body">设备编号:</div>
  331. <div class="body" v-if="depolyStatusObj.deviceNo">{{ depolyStatusObj.deviceNo }}</div>
  332. <div class="body" v-else> </div>
  333. </div>
  334. <div class="content" v-if="(currentDepoly == 'audited' || currentDepoly == 'allocated' || currentDepoly == 'reviewed' || currentDepoly == 'soaked' || currentDepoly == 'cooked') || depolyStatusObj.operateType!=='0' && depolyStatusObj.remarks">
  335. <div class="title body">备注信息:</div>
  336. <div class="body" v-if="depolyStatusObj.remarks">{{ depolyStatusObj.remarks }}</div>
  337. <div class="body" v-else> </div>
  338. </div>
  339. <div class="content" v-if="depolyStatusObj.dosage && depolyStatusObj.operateType=='0' && currentDepoly == 'startedConcentration' && depolyStatusObj.dosage">
  340. <div class="title body">开始浓缩药液量:</div>
  341. <div class="body" v-if="depolyStatusObj.dosage">{{ depolyStatusObj.dosage }}</div>
  342. <div class="body" v-else> </div>
  343. </div>
  344. <div class="content" v-if="depolyStatusObj.dosage && depolyStatusObj.operateType=='0' && currentDepoly == 'finishedConcentration' && depolyStatusObj.dosage">
  345. <div class="title body">结束浓缩药液量:</div>
  346. <div class="body" v-if="depolyStatusObj.dosage">{{ depolyStatusObj.dosage }}</div>
  347. <div class="body" v-else> </div>
  348. </div>
  349. </div>
  350. <div class="deploy" v-if="depolyStatusObj&& depolyStatusObj.imgs &&depolyStatusObj.imgs.length>0" style="justify-content:flex-start;"> <!-- v-if="depolyStatusObj&&depolyStatusObj.prescriptionFiles&&depolyStatusObj.prescriptionFiles.length>0"-->
  351. <div class="content">
  352. <div class="title body">照片:</div>
  353. <div class="body" style="height: 100px!important;" v-if="depolyStatusObj">
  354. <el-image v-for="img in depolyStatusObj.imgs"
  355. style="width: 100px; height: 100px; padding-right: 10px;"
  356. :src="img"
  357. fit="fill"></el-image>
  358. </div>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. <div slot="footer" class="dialog-footer">
  364. <el-button type="primary" @click="cancel">确 定</el-button>
  365. <el-button @click="cancel">取 消</el-button>
  366. </div>
  367. </el-dialog>
  368. <el-dialog
  369. :title="title"
  370. :visible.sync="openPrint"
  371. width="1280px"
  372. append-to-body
  373. >
  374. <div style="display: flex;padding: 10px;">
  375. <div style="display: flex;width: 170px;flex-direction: column;align-items: center;border-right: 1px solid #1ab394;">
  376. <div style="display: flex;justify-content: center;align-items: center;height: 50px;width: 150px;font-size: 25px;padding: 10px;color: #1ab394;"
  377. v-for="item in printType" :key="item.id"
  378. @click="handlePrintType(item)"
  379. :class="activePrint===item.name?'active':''" >{{item.name}}</div>
  380. </div>
  381. <div style="display: flex;flex-direction: column;justify-content:center;align-items:center;width: 1120px;">
  382. <div class="print" id="deloy">
  383. <!-- 20231219更改 -->
  384. <div style="display: flex;flex-direction: column;width:460px;height: 250px;" v-if="activePrint==='标签'">
  385. <div style="font-size: 25px;font-weight: 500;display: flex;justify-content:center;margin-top:20px;">{{detailData.yljgName || '默默事中医院取药标签打印(门诊)'}}(取药凭条)</div>
  386. <div style="display: flex;margin-top: 15px;">
  387. <div style="display: flex;flex-direction: column;justify-content:center;">
  388. <JsBarcode v-if="openPrint"
  389. :presno="curPreNo" style="margin-top:15px;"
  390. ></JsBarcode>
  391. </div>
  392. <div style="display: flex;flex-direction: column;margin-top:12px;">
  393. <div style="display: flex;font-size: 23px;">患者:<div style="font-weight: 500;">{{curName}},{{curSex}}</div></div>
  394. <div style="display: flex;font-size: 20px;margin-top:5px;">出生日期:<div style="font-weight: 500;">{{curPatientBirthday}}</div></div>
  395. <div style="display: flex;font-size: 20px;margin-top:5px;">类型:<div style="font-weight: 500;">{{curPreName}}</div></div>
  396. <div style="display: flex;font-size: 20px;margin-top:5px;">剂数:<div style="font-weight: 500;font-size:24px;margin-top:-1px;">{{curNumber}}</div></div>
  397. </div>
  398. </div>
  399. <div style="display: flex;justify-content:center;font-size: 20px;margin-top:30px;">打印时间:{{curPrintTime}}</div>
  400. </div>
  401. <div v-else style="display: flex;margin: 5px;background-color: #fff;flex-direction:column;align-items: center;height: 1030px;width: 680px;box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);">
  402. <div style="display: flex;flex-direction:column;width: 660px;">
  403. <div style="display: flex;flex-direction:row;justify-content: space-between;margin-top: 15px;">
  404. <div style="display: flex;align-items: flex-start;border-right:0!important;">
  405. <div style="display: flex;flex-direction:column;">
  406. <JsBarcode
  407. :presno="curPreNo"
  408. ></JsBarcode>
  409. </div>
  410. </div>
  411. <div style="display: flex;justify-content:center;align-items:center;margin-right: 150px;font-size: 23.75px;font-weight: 800;">
  412. 中药处方笺
  413. </div>
  414. <div style="display: flex;justify-content:center;font-size: 16px;width: 40px;font-weight: 300;">{{detailData.type=='1'?"中药处方":detailData.type=='2'?"中药制剂":""}}</div>
  415. </div>
  416. <div style="display: flex;flex-direction:column;margin: 20px 10px 10px;padding-bottom: 15px;border-bottom: 1px solid #979797;">
  417. <div style="display: flex;flex-direction:row;margin-bottom:5px;">
  418. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">姓名:</span>{{detailData.name}}</div>
  419. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">性别:</span>{{detailData.sex}}</div>
  420. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">年龄:</span>{{detailData.age}}岁</div>
  421. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">电话:</span>{{detailData.contactNumber}}</div>
  422. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">当前处方状态:</span>{{detailData.state=="1"?"配药":detailData.state=="2"?"煎药":detailData.state=="3"?"发药":detailData.state=="4"?"配送":""}}</div>
  423. </div>
  424. <div style="display: flex;flex-direction:row;margin-bottom:5px;">
  425. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">就诊科室:</span>{{detailData.department}}</div>
  426. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">临床诊断:</span>{{detailData.disName}}—{{detailData.symName}}</div>
  427. <div style="font-size: 12px;font-weight: 400;margin-right: 30px;"><span style="color:#999999;">开方时间:</span>{{detailData.prescriptionTime}}</div>
  428. </div>
  429. <div style="display: flex;flex-direction:row;font-size: 12px;"><span style="color:#999999;">联系地址:</span>{{detailData.address}}</div>
  430. </div>
  431. </div>
  432. <div style="display: flex;flex-direction:column;width: 640px;align-items:flex-start;border-bottom: 1px solid #5a5e66;margin:0px 10px 10px;">
  433. <div style="display: flex;font-size: 22px;">
  434. Rp:
  435. </div>
  436. <div style="display: flex;flex-wrap: wrap;flex-direction: row;justify-content:flex-start;align-content:flex-start;margin-left:20px;height: 515px;">
  437. <div style="display: flex;justify-content:center;width: 150px;align-items: center;margin: 0 0 10px 0;" v-for="(x, i) in detailData.detailList" :key="i">
  438. <div style="display: flex;font-size: 15px;width: 100px;word-wrap: break-word;z-index: 100;justify-content:center;align-items: center;padding: 2px 5px;">
  439. <!-- <el-tag effect="plain" >{{x.matName}} {{x.matDose}} {{x.matUnitName}}</el-tag>-->
  440. {{x.matName}}{{x.matDose}}{{x.matUnitName}}
  441. </div>
  442. <div style="display: flex;flex-direction:column;margin-left: 5.31px;z-index: 200;">
  443. <div style="font-size: 10px;height: 12.5px;"> {{x.matUsageName}}</div>
  444. <div style="font-size: 10px;height: 12.5px;"> {{x.sign}}</div>
  445. </div>
  446. </div>
  447. </div>
  448. <div style="margin: 0 10px 10px;display: flex;font-size: 15px;">
  449. <div style="display: flex;margin-right: 54.4px;">
  450. 剂数:{{detailData.number}}
  451. <div v-if="detailData.daijianCost!==''" class="pies_tips">
  452. (代煎)
  453. </div>
  454. </div>
  455. <div style="display: flex;margin-right: 54.4px;">{{detailData.dosageForm}}</div>
  456. <div style="display: flex;margin-right: 54.4px;">{{detailData.prescriptionUsage}}</div>
  457. <div style="display: flex;margin-right: 54.4px;">每次{{detailData.concentration}}</div>
  458. <div style="display: flex;margin-right: 54.4px;">{{detailData.frequency}}</div>
  459. <div >{{detailData.medicationTime}}</div>
  460. </div>
  461. <div style="display: flex;justify-content:flex-end;font-size: 15px;margin-right: 10px;">{{detailData.entrust}}</div>
  462. </div>
  463. <div style="display: flex;margin: 0 10px 0;padding-bottom: 5px;border-bottom: 1px solid #979797;">
  464. <div style="display: flex;flex-direction:column;">
  465. <div style="border: 1px solid #979797;font-size: 15px;width: 287.5px;display: flex;justify-content:center;align-items: center;height: 30px;">
  466. <div class="pijw">药品金额:{{detailData.prescriptionSum}}</div>
  467. </div>
  468. <div style="display: flex;justify-content:center;align-items: center;font-size: 15px;height: 30px;width: 287.5px;border-left: 1px solid #979797;border-right: 1px solid #979797;">
  469. <div style="width: 143.93px;display: flex;justify-content:center;align-items: center;height: 30px;">煎药费:{{detailData.daijianCost}}</div>
  470. <div style="border-left: 1px solid #979797;width: 143.93px;display: flex;justify-content:center;align-items: center;height: 30px;">配送费:{{detailData.distributionCost}}</div>
  471. </div>
  472. <div style="display: flex;justify-content:center;align-items: center;height: 30px;font-size: 15px;border: 1px solid #979797;">
  473. 总金额:{{detailData.prescriptionTotalSum}}
  474. <!-- <div class="zjw"></div> -->
  475. </div>
  476. </div>
  477. <div style="display: flex;flex-wrap: wrap;margin-left: 20px;">
  478. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">开方:</span>{{operateList[0].operater}}</div>
  479. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">审核:</span>{{operateList[1].operater}}</div>
  480. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">调配:</span>{{operateList[2].operater}}</div>
  481. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">复核:</span>{{operateList[3].operater}}</div>
  482. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">浸泡:</span>{{operateList[4].operater}}</div>
  483. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">煎煮:</span>{{operateList[5].operater}}</div>
  484. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">打包:</span>{{operateList[6].operater}}</div>
  485. <div style="font-size: 15px;margin-right: 60px;width:90px;"><span style="font-size: 15px;color:#999999;">发药:</span>{{operateList[7].operater}}</div>
  486. </div>
  487. </div>
  488. <div style="margin: 10px 16px 10px;font-size: 15px;display: flex;">
  489. <div class="z">注:</div>
  490. <div>{{entrust1111}}</div>
  491. </div>
  492. </div>
  493. </div>
  494. <el-button style="margin-top: 50px;display: flex;justify-content:center;align-items:center;background-color: #1ab394;color: #FFFFFF;font-size: 20px;margin-top: 40px;width: 300px;height: 50px;" v-print="'#deloy'">打 印</el-button>
  495. </div>
  496. </div>
  497. </el-dialog>
  498. </div>
  499. </template>
  500. <script>
  501. import {
  502. listPrescriptionCore,
  503. getPrescriptionCore,
  504. delPrescriptionCore,
  505. addPrescriptionCore,
  506. updatePrescriptionCore,
  507. exportPrescriptionCore,
  508. } from "@/api/prescription/prescriptionCore";
  509. import { listMedicalMechanism } from "@/api/medical/mechanism";
  510. import {selectOrderDetail} from "@/api/prescription/prescriptionAudit";
  511. import JsBarcode from "@/components/JsBarcode/index.vue";
  512. import Pres from "@/components/Pres/index.vue";
  513. import dayjs from 'dayjs'
  514. export default {
  515. name: "PrescriptionCore",
  516. components:{ JsBarcode,},
  517. data() {
  518. const now = dayjs().format('YYYY-MM-DD');
  519. return {
  520. curPreNo:'',
  521. curName:'',
  522. curSex:'',
  523. curAge:'',
  524. curPatientBirthday:'',
  525. //20231219新增三个字段
  526. curPreName:'',
  527. curNumber:'',
  528. curPrintTime:'',
  529. $baseUrl: this.$baseUrl,
  530. detailData: {
  531. oralPre: {
  532. oralPreItemList: []
  533. }
  534. },
  535. activeName: "first",
  536. // print相关
  537. openPrint: false,
  538. activePrint: '标签',
  539. printType:[
  540. {name:'标签', id:0},
  541. {name:'中药处方笺', id:1}
  542. ],
  543. operateList:[
  544. {py:'kf',title:'开方',operater:''},
  545. {py:'sh',title:'审核',operater:''},
  546. {py:'tp',title:'调配',operater:''},
  547. {py:'fh',title:'复核',operater:''},
  548. {py:'jp',title:'浸泡',operater:''},
  549. {py:'jz',title:'煎煮',operater:''},
  550. {py:'db',title:'打包',operater:''},
  551. {py:'fy',title:'发药',operater:''},
  552. ],
  553. entrust1111:'1、本处方当日有效\n 2、取药时请您当面核对。。。。 \n 3、延长处方用量时间原油:慢性病 其他老年病 外地 其他',
  554. state: {
  555. 1: "配药",
  556. 2: "煎药",
  557. 3: "发药",
  558. 4: "配送",
  559. },
  560. stateArr: [
  561. { name: "配药", id: 1 },
  562. { name: "煎药", id: 2 },
  563. { name: "发药", id: 3 },
  564. { name: "配送", id: 4 },
  565. ],
  566. deployStateArr: [
  567. { name: "已审核", id: 110, key: "audited" },
  568. // { name: "已审核不通过", id: 120, key: "---" },
  569. { name: "已调配", id: 130, key: "allocated" },
  570. { name: "已复核", id: 140, key: "reviewed" },
  571. { name: "已浸泡", id: 150, key: "soaked" },
  572. { name: "已煎煮", id: 160, key: "cooked" },
  573. { name: "已先煎", id: 161, key: "preCooked" },
  574. { name: "已开始煎煮", id: 162, key: "startedCooking" },
  575. { name: "已后下", id: 163, key: "lowered" },
  576. { name: "已结束煎煮", id: 164, key: "finishedCooking" },
  577. { name: "已开始浓缩", id: 165, key: "startedConcentration" },
  578. { name: "已结束浓缩", id: 166, key: "finishedConcentration" },
  579. { name: "已打包", id: 170, key: "packaged" },
  580. { name: "已上架", id: 171, key: "grounding" },
  581. { name: "已发药", id: 175, key: "send" },
  582. // { name: "煎药已作废", id: 999, key: "---" },
  583. ],
  584. depolyStatusObj:{
  585. type:'',
  586. createTime:'',
  587. operate:'',
  588. createBy:'',
  589. urls:'',
  590. remarks:'',
  591. deviceNo:'',
  592. dosage:''
  593. },
  594. effectStatus:'plain',
  595. currentDepoly:'audited',
  596. // 遮罩层
  597. loading: true,
  598. // 导出遮罩层
  599. exportLoading: false,
  600. // 选中数组
  601. ids: [],
  602. // 非单个禁用
  603. single: true,
  604. // 非多个禁用
  605. multiple: true,
  606. // 显示搜索条件
  607. showSearch: true,
  608. // 总条数
  609. total: 0,
  610. // 处方审核表格数据
  611. prescriptionCoreList: [],
  612. // 弹出层标题
  613. title: "",
  614. // 是否显示弹出层
  615. open: false,
  616. // 查询参数
  617. queryParams: {
  618. notCheckState: 0,
  619. pageNum: 1,
  620. pageSize: 10,
  621. state: null,
  622. thread: null,
  623. appId: null,
  624. yljgId: null,
  625. timeStamp: null,
  626. token: null,
  627. preNo: null,
  628. preName: null,
  629. name: null,
  630. sex: null,
  631. age: null,
  632. department: null,
  633. doctor: null,
  634. prescriptionTime: [now, now],
  635. disCode: null,
  636. disName: null,
  637. symCode: null,
  638. symName: null,
  639. westernDisease: null,
  640. westernCode: null,
  641. patientContent: null,
  642. nowDesc: null,
  643. pastDesc: null,
  644. fourDiagnosis: null,
  645. physical: null,
  646. auxiliaryExam: null,
  647. premzzy: null,
  648. visitNo: null,
  649. checkState: null,
  650. remarks: null,
  651. extendedTxt: null,
  652. address: null,
  653. contactNumber: null,
  654. consignee: null,
  655. takingMethod: null,
  656. yfId: window.localStorage.getItem("pharmacyId"),
  657. },
  658. // 表单参数
  659. form: {},
  660. // 表单校验
  661. rules: {},
  662. listMedicalMechanismArr: [],
  663. };
  664. },
  665. created() {
  666. this.getList();
  667. this.getListMedicalMechanism();
  668. this.currentDepoly = 'audited';
  669. },
  670. methods: {
  671. handleClick(tab, event) {
  672. //console.log(tab, event);
  673. },
  674. /** 查询处方审核列表 */
  675. getList() {
  676. this.loading = true;
  677. console.log('this.queryParams',this.queryParams)
  678. var form = Object.assign({}, this.queryParams)
  679. if (this.queryParams.prescriptionTime && this.queryParams.prescriptionTime.length) {
  680. form.startTime = this.queryParams.prescriptionTime[0]
  681. form.endTime = this.queryParams.prescriptionTime[1]
  682. } else {
  683. form.startTime = ''
  684. form.endTime = ''
  685. }
  686. delete form.prescriptionTime
  687. listPrescriptionCore(form).then((response) => {
  688. this.prescriptionCoreList = response.rows;
  689. this.total = response.total;
  690. this.loading = false;
  691. });
  692. },
  693. getListMedicalMechanism() {
  694. listMedicalMechanism().then((res) => {
  695. this.listMedicalMechanismArr = res.data;
  696. });
  697. },
  698. // 取消按钮
  699. cancel() {
  700. this.open = false;
  701. this.reset();
  702. },
  703. // 表单重置
  704. reset() {
  705. this.curPreNo = ''
  706. this.curName = ''
  707. this.curSex = ''
  708. this.curAge = ''
  709. this.curPatientBirthday = ''
  710. //20231219新增三个字段
  711. this.curPreName=''
  712. this.curNumber=''
  713. this.curPrintTime=''
  714. this.detailData = {
  715. oralPre: {
  716. oralPreItemList: []
  717. }
  718. },
  719. this.form = {
  720. id: null,
  721. appId: null,
  722. yljgId: null,
  723. yfId: null,
  724. timeStamp: null,
  725. token: null,
  726. preNo: null,
  727. preName: null,
  728. name: null,
  729. sex: null,
  730. age: null,
  731. department: null,
  732. doctor: null,
  733. prescriptionTime: null,
  734. disCode: null,
  735. disName: null,
  736. symCode: null,
  737. symName: null,
  738. westernDisease: null,
  739. westernCode: null,
  740. patientContent: null,
  741. nowDesc: null,
  742. pastDesc: null,
  743. fourDiagnosis: null,
  744. physical: null,
  745. auxiliaryExam: null,
  746. premzzy: null,
  747. visitNo: null,
  748. checkState: null,
  749. remarks: null,
  750. extendedTxt: null,
  751. address: null,
  752. contactNumber: null,
  753. consignee: null,
  754. takingMethod: null,
  755. };
  756. this.remarks = null;
  757. this.resetForm("form");
  758. },
  759. //打印
  760. consoleBtn(row) {
  761. this.reset();
  762. this.activePrint = '标签'
  763. const id = row.id;
  764. console.log('id>>>>',id)
  765. this.detailData = {}
  766. selectOrderDetail({id:id}).then((response) => {
  767. console.log('response.data>>>>', response.data)
  768. // debugger
  769. this.form = response.data;
  770. this.detailData = response.data;
  771. this.curPreNo = response.data.preNo;
  772. this.curName = response.data.name;
  773. this.curSex = response.data.sex;
  774. this.curAge = response.data.age;
  775. this.curPatientBirthday = response.data.patientBirthday;
  776. //20231219新增三个字段
  777. this.curPreName = response.data.preName;
  778. this.curNumber = response.data.number;
  779. this.curPrintTime = response.data.printTime;
  780. this.detailData.patientBirthday = this.detailData.patientBirthday?this.detailData.patientBirthday:'';
  781. this.detailData.presType = '普通处方'; //TODO neo
  782. console.log('handlePrint detailData', this.detailData)
  783. this.openPrint = true;
  784. this.operateList[0].operater = this.detailData.doctor|| '';
  785. this.operateList[1].operater = this.detailData.checkBy|| '';
  786. this.operateList[2].operater = this.detailData.tiaopeiName || '';
  787. const length = response.data.operateList
  788. if(length > 0){
  789. response.data.operateList.forEach((item)=>{
  790. switch(item.type){
  791. case '2':
  792. this.operateList[3].operater = item.createBy
  793. break
  794. case '3':
  795. this.operateList[4].operater = item.createBy
  796. break
  797. case '4':
  798. this.operateList[5].operater = item.createBy
  799. break
  800. case '5':
  801. this.operateList[6].operater = item.createBy
  802. break
  803. case '6':
  804. this.operateList[7].operater = item.createBy
  805. break
  806. defalut:console.log('处方签res.data.operateList数据异常',item.type)
  807. }
  808. })
  809. }
  810. // this.title = "查看处/**/方审核";
  811. //console.log(response);
  812. });
  813. },
  814. handlePrintType(e) {
  815. console.log('this.activePrint',this.activePrint)
  816. console.log('click>>>',e.name)
  817. if(e.name && e.name!==this.activePrint){
  818. this.activePrint = e.name
  819. console.log(' change this.activePrint',this.activePrint)
  820. } else {
  821. console.log('nochange this.activePrint',this.activePrint)
  822. }
  823. },
  824. /** 搜索按钮操作 */
  825. handleQuery() {
  826. this.queryParams.pageNum = 1;
  827. this.getList();
  828. },
  829. /** 重置按钮操作 */
  830. resetQuery() {
  831. this.resetForm("queryForm");
  832. const now = dayjs().format('YYYY-MM-DD');
  833. this.queryParams.prescriptionTime = [now, now];
  834. this.handleQuery();
  835. },
  836. // 多选框选中数据
  837. handleSelectionChange(selection) {
  838. this.ids = selection.map((item) => item.id);
  839. this.single = selection.length !== 1;
  840. this.multiple = !selection.length;
  841. },
  842. /** 新增按钮操作 */
  843. handleAdd() {
  844. this.reset();
  845. this.open = true;
  846. this.activeName = 'first'
  847. this.title = "添加处方审核";
  848. },
  849. /** 修改按钮操作 */
  850. handleUpdate(row) {
  851. this.reset();
  852. const id = row.id || this.ids;
  853. getPrescriptionCore(id).then((response) => {
  854. // this.form = response.data;
  855. this.detailData = response.data;
  856. this.open = true;
  857. this.activeName = 'first'
  858. this.title = "溯源详情";
  859. this.handleDeploy({ name: "已审核", id: 1, key: "audited" })
  860. console.log('$baseUrl', this.$baseUrl);
  861. });
  862. },
  863. handleDelete(row) {
  864. const ids = row.id || this.ids;
  865. this.$confirm(
  866. '是否确认删除处方审核编号为"' + ids + '"的数据项?',
  867. "警告",
  868. {
  869. confirmButtonText: "确定",
  870. cancelButtonText: "取消",
  871. type: "warning",
  872. }
  873. )
  874. .then(function () {
  875. return delPrescriptionCore(ids);
  876. })
  877. .then(() => {
  878. this.getList();
  879. this.msgSuccess("删除成功");
  880. })
  881. .catch(() => {});
  882. },
  883. /** 导出按钮操作 */
  884. handleExport() {
  885. const queryParams = this.queryParams;
  886. this.$confirm("是否确认导出所有处方审核数据项?", "警告", {
  887. confirmButtonText: "确定",
  888. cancelButtonText: "取消",
  889. type: "warning",
  890. })
  891. .then(() => {
  892. this.exportLoading = true;
  893. return exportPrescriptionCore(queryParams);
  894. })
  895. .then((response) => {
  896. this.download(response.msg);
  897. this.exportLoading = false;
  898. })
  899. .catch(() => {});
  900. },
  901. // 改变溯源记录的状态
  902. handleDeploy(item) {
  903. this.currentDepoly = item.key
  904. this.depolyStatusObj = this.detailData[this.currentDepoly][0] ||{}
  905. if(this.detailData[this.currentDepoly][0]&&this.detailData[this.currentDepoly][0].urls) {
  906. const urlss = this.detailData[this.currentDepoly][0].urls
  907. if( urlss){
  908. this.depolyStatusObj.imgs=urlss.split(',')
  909. }
  910. }
  911. }
  912. },
  913. };
  914. </script>
  915. <style scoped>
  916. h3 {
  917. margin: 0;
  918. }
  919. .el-divider--horizontal{
  920. margin: 8px 0;
  921. /*background: 0 0;*/
  922. /*border-top: 1px dashed #e8eaec;*/
  923. }
  924. .deploy-record{
  925. display: flex;
  926. }
  927. .deploy {
  928. display: flex;
  929. flex-direction:column;
  930. align-items:flex-end;
  931. justify-content:center;
  932. }
  933. .content{
  934. display: flex;
  935. width: 320px;
  936. justify-content:flex-start;
  937. }
  938. .body{
  939. display: flex;
  940. height: 30px;
  941. width: 200px;
  942. justify-content:flex-start;
  943. align-items: center;
  944. }
  945. .title{
  946. margin-bottom: 0;
  947. font-weight: bolder;
  948. justify-content: flex-end!important;
  949. width: 120px!important;
  950. /*justify-content:center;*/
  951. }
  952. .active{ background-color: #1ab394; color: #FFFFFF!important;}
  953. #qrcode {
  954. width: 160px;
  955. margin: 0 auto;
  956. }
  957. .printbtn { background: #409eff; color: #fff; }
  958. </style>