submitRecipe.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890
  1. <template>
  2. <div class="recipe">
  3. <Popup
  4. @cancle="closePopup"
  5. width="60%"
  6. title="处置方案"
  7. :showDialog.sync="show"
  8. distanceTop="3vh"
  9. :showBtns="false"
  10. :showBody="false"
  11. >
  12. <div slot="body">
  13. <div class="recipe-priview flex flex-col-top">
  14. <div class="left-table">
  15. <!-- 用户信息 -->
  16. <div class="message" v-if="msg">
  17. <div class="msg-title">
  18. <img src="../../../assets/new-icon/people.png" alt />
  19. <span>患者信息</span>
  20. </div>
  21. <div class="ms-row">
  22. <div class="row-item">
  23. <span>姓名:</span>
  24. <span>{{ msg.patient.name }}</span>
  25. </div>
  26. <div class="row-item">
  27. <span>性别:</span>
  28. <span>{{ msg.patient.sex }}</span>
  29. </div>
  30. <div class="row-item">
  31. <span>年龄:</span>
  32. <span>{{msg.patient.age}}岁</span>
  33. </div>
  34. </div>
  35. <div class="ms-row">
  36. <div class="row-item">
  37. <span>身份证:</span>
  38. <span>{{ msg.patient.idcard}}</span>
  39. </div>
  40. <div class="row-item">
  41. <span>电话:</span>
  42. <span>{{ msg.patient.phone }}</span>
  43. </div>
  44. </div>
  45. <!-- <div class="ms-row">
  46. <div class="row-item">
  47. <span>地址:</span>
  48. <span>{{ msg.patient.province}}{{ msg.patient.city}}{{msg.patient.district}}{{ msg.patient.detailadress }}</span>
  49. </div>
  50. </div>-->
  51. <div class="ms-row" v-if="recipes.length>0">
  52. <div class="row-item" style="font-weight:bold;" v-if=" recipes[0].recipeType==1">
  53. <span>是否代煎:</span>
  54. <span>{{ isDj?'是':'否'}}</span>
  55. </div>
  56. <div class="row-item">
  57. <span>是否快递:</span>
  58. <span>{{ isPs?'是':'否' }}</span>
  59. </div>
  60. </div>
  61. <!-- v-if="recipes.length>0 && isPs" -->
  62. <template v-if="false">
  63. <div class="ms-row">
  64. <div class="row-item">
  65. <span>收货人:</span>
  66. <span>{{ psMsg.name || ''}}</span>
  67. </div>
  68. <div class="row-item">
  69. <span>收货电话:</span>
  70. <span>{{ psMsg.phone || ''}}</span>
  71. </div>
  72. </div>
  73. <div class="ms-row">
  74. <div class="row-item" style="font-weight:bold;">
  75. <span>收货地址:</span>
  76. <span>{{ psMsg.address || ''}}</span>
  77. </div>
  78. </div>
  79. </template>
  80. <div class="msg-title" style="margin-top: 20px;">
  81. <img src="../../../assets/new-icon/book.png" alt />
  82. <span>就诊信息</span>
  83. </div>
  84. <div class="ms-row">
  85. <div class="row-item">
  86. <span>就诊日期:</span>
  87. <span>{{ msg.outpatientRecords.recordstime }}</span>
  88. </div>
  89. <div class="row-item">
  90. <span>就诊科室:</span>
  91. <span>{{ msg.outpatientRecords.departmentName}}</span>
  92. </div>
  93. </div>
  94. <div class="ms-row">
  95. <div class="row-item">
  96. <span>中医诊断:</span>
  97. <span>{{ msg.mainDiagnosis.namemedicine}}</span>
  98. </div>
  99. <div class="row-item">
  100. <span>治法:</span>
  101. <span>{{ msg.mainDiagnosis.treatment }}</span>
  102. </div>
  103. </div>
  104. <div class="ms-row">
  105. <div class="row-item">
  106. <span>其他诊断:</span>
  107. <div>
  108. <div
  109. v-for="(item,index) in msg.secondDiagnosis
  110. "
  111. :key="index"
  112. >{{ item.namemedicine?'中医诊断':'西医诊断' }}:{{ item.namemedicine || item.diagnosis}}</div>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="ms-row">
  117. <div class="row-item">
  118. <span>主诉:</span>
  119. <span>{{ msg.electronicmedicalrecord.chiefcomplaint }}</span>
  120. </div>
  121. </div>
  122. <div class="ms-row">
  123. <div class="row-item">
  124. <span>现病史:</span>
  125. <span>{{ msg.electronicmedicalrecord.historypresent }}</span>
  126. </div>
  127. </div>
  128. <div class="ms-row">
  129. <div class="row-item">
  130. <span>既往史:</span>
  131. <span>{{ msg.electronicmedicalrecord.pasthistory }}</span>
  132. </div>
  133. </div>
  134. <div class="ms-row">
  135. <div class="row-item">
  136. <span>中医四诊:</span>
  137. <span>{{ msg.electronicmedicalrecord. fourmedicine}}</span>
  138. </div>
  139. </div>
  140. <div class="ms-row">
  141. <div class="row-item">
  142. <span>体格检查:</span>
  143. <span>{{ msg.electronicmedicalrecord.physicalexamination }}</span>
  144. </div>
  145. </div>
  146. <div class="ms-row">
  147. <div class="row-item">
  148. <span>辅助检查:</span>
  149. <span>{{ msg.electronicmedicalrecord.supplementaryexamination }}</span>
  150. </div>
  151. </div>
  152. <div class="ms-row" v-if="msg.electronicmedicalrecord.image1.length">
  153. <div class="row-item">
  154. <span>报告照片:</span>
  155. <div class="img-body">
  156. <el-image
  157. class="img-item"
  158. :preview-src-list="msg.electronicmedicalrecord.image1"
  159. :src="item1"
  160. alt
  161. v-for="(item1,index1) in msg.electronicmedicalrecord.image1"
  162. :key="index1"
  163. z-index="99999"
  164. ></el-image>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <!-- 安全合理用药审查报告 -->
  170. <div class="report" v-if="false">
  171. <h3>安全合理用药审查报告</h3>
  172. <div class="patiens-msg mr-t10" v-if="rationalMed.length>0">
  173. <div class="p">
  174. <!-- {{item.matname}}({{item.matbzjj}}) -->
  175. <!-- <div class="patiens-name">{{item.matname}}</div> -->
  176. <div class="patiens-cate">超剂量药品:</div>
  177. <div class="patiens-desc" v-for="(item,index) in rationalMed10" :key="index">
  178. <span v-if="item.showDose">
  179. <span class="matname">{{item.matname}}</span>
  180. <span style="color:red;">({{item.matmindosage}}-{{item.matmaxdosage}})</span>
  181. </span>
  182. </div>
  183. </div>
  184. <div class="p" v-if="rationalMed2.length>0">
  185. <div class="patiens-cate">慎忌禁用药:</div>
  186. <div class="patiens-desc" v-for="(item,index) in rationalMed2" :key="index">
  187. <span v-if="item.matsjj">
  188. <span class="matname">{{item.matname}}</span>
  189. ({{item.matsjj |ftsjj}})
  190. </span>
  191. </div>
  192. </div>
  193. <div class="p" v-if="rationalMed3.length>0">
  194. <div class="patiens-cate">孕妇慎忌禁:</div>
  195. <div class="patiens-desc" v-for="(item,index) in rationalMed3" :key="index">
  196. <span v-if="item.matyfsjj">
  197. <span class="matname">{{item.matname}}</span>
  198. <span :style="{color:item.matyfsj==3?'red':''}">({{item.matyfsjj |fyfsjj}})</span>
  199. </span>
  200. </div>
  201. </div>
  202. <div class="p" v-if="rationalMed4.length>0">
  203. <div class="patiens-cate">服药饮食禁忌:</div>
  204. <div class="patiens-desc" v-for="(item,index) in rationalMed4" :key="index">
  205. <span v-if="item.matysjj">
  206. <span class="matname">{{item.matname}}</span>
  207. ({{item.matysjj?item.matysjj:'无'}})
  208. </span>
  209. </div>
  210. </div>
  211. <div class="p" v-if="rationalMed5.length>0">
  212. <div class="patiens-cate">药物毒性说明:</div>
  213. <div class="patiens-desc" v-for="(item,index) in rationalMed5" :key="index">
  214. <span v-if="item.matdxsm">
  215. <span class="matname" style="color:red;">{{item.matname}}</span>
  216. ({{item.matdxsm?item.matdxsm:'无'}})
  217. </span>
  218. </div>
  219. </div>
  220. <div class="p" v-if="rationalMed6.length>0">
  221. <div class="patiens-cate">病证用药禁忌:</div>
  222. <div class="patiens-desc" v-for="(item,index) in rationalMed6" :key="index">
  223. <span v-if="item.matbzjj">
  224. <span class="matname">{{item.matname}}</span>
  225. ({{item.matbzjj?item.matbzjj:'无'}})
  226. </span>
  227. </div>
  228. </div>
  229. <div class="p" v-if="rationalMed7.length>0">
  230. <div class="patiens-cate">十八反:</div>
  231. <div class="patiens-desc" v-for="(item,index) in rationalMed7" :key="index">
  232. <!-- <span v-if='item.matsbf'>{{fsbf(item.matsbf,item.matname)}}</span> -->
  233. <span v-if="item.matsbf">
  234. <span style="color:red;">{{item.matname}}</span>
  235. 反{{item.matsbf}}
  236. </span>
  237. </div>
  238. </div>
  239. <div class="p" v-if="rationalMed8.length>0">
  240. <div class="patiens-cate">十九畏:</div>
  241. <div class="patiens-desc" v-for="(item,index) in rationalMed8" :key="index">
  242. <!-- <span v-if="item.matsjw">{{fsjw(item.matsjw,item.matname)}}</span> -->
  243. <span v-if="item.matsjw">
  244. <span style="color:red;">{{item.matname}}</span>
  245. 畏{{item.matsjw}}
  246. </span>
  247. </div>
  248. </div>
  249. <div class="p" v-if="rationalMed9.length>0">
  250. <div class="patiens-cate">用药不宜:</div>
  251. <div class="patiens-desc" v-for="(item,index) in rationalMed9" :key="index">
  252. <span v-if="item.matby">{{fmatby(item.matby,item.matname) }}</span>
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. <!-- <div style="text-align:center;margin-top:10px;" v-if="recipeItem.showSign">
  258. <el-button size="small" type="primary" @click="signToRecipt">双签名</el-button>
  259. </div>-->
  260. </div>
  261. <!-- 右侧处方笺 -->
  262. <div class="right-pad">
  263. <!-- 处方标题 -->
  264. <div class="message">
  265. <div class="ms-row" style="margin-top: 0;">
  266. <div class="row-item msg-title">
  267. <img src="../../../assets/new-icon/book.png" alt />
  268. <span>处方信息</span>
  269. </div>
  270. <div class="row-item" style="justify-content: flex-end;">
  271. <span>合计金额:{{totalCount || 0}}元</span>
  272. </div>
  273. </div>
  274. </div>
  275. <!-- 处方tab -->
  276. <div class="recipe-tabs">
  277. <div
  278. :class="['tabs-item',recipeItem.pid==item.pid?'tabs-active':'']"
  279. v-for="(item,index) in recipes"
  280. :key="index"
  281. @click="leftChange(item)"
  282. >
  283. <span v-if="item.recipeType==1">中药处方{{index+1}}</span>
  284. <span v-if="item.recipeType==2">中药制剂处方</span>
  285. <span v-if="item.recipeType==3">适宜技术处方</span>
  286. <img src="~@/assets/new-icon/close.png" alt @click.self="deleteItem(index)" />
  287. </div>
  288. </div>
  289. <!-- 中药处方 -->
  290. <div v-if="recipeItem.recipeType==1">
  291. <chineseMedicinePad ref="chineseM" :recipeData="recipeItem"></chineseMedicinePad>
  292. </div>
  293. <!-- 中药制剂 -->
  294. <div v-if="recipeItem.recipeType==2">
  295. <chineseMadePad :recipeData="recipeItem"></chineseMadePad>
  296. </div>
  297. <!-- 适宜技术处方 -->
  298. <div v-if="recipeItem.recipeType==3">
  299. <suitMadePad :recipeData="recipeItem"></suitMadePad>
  300. </div>
  301. </div>
  302. </div>
  303. <div class="flex-center btns">
  304. <el-button size="small" @click="closePopup">取消</el-button>
  305. <el-button size="small" type="primary" @click="sureToSubmit">确认并提交</el-button>
  306. </div>
  307. </div>
  308. </Popup>
  309. </div>
  310. </template>
  311. <script>
  312. import { addRecipe, updateRecipe } from "@/api/diagnosis.js";
  313. import { mapGetters } from "vuex";
  314. import Popup from "@/components/Propup.vue";
  315. import chineseMedicinePad from "@/components/ui/chineseMedicinePad.vue";
  316. import chineseMadePad from "@/components/ui/chineseMadePad.vue";
  317. import suitMadePad from "@/components/ui/suitMadePad.vue";
  318. import { formatPicture } from "@/utils/picture";
  319. export default {
  320. components: {
  321. Popup,
  322. chineseMedicinePad,
  323. chineseMadePad,
  324. suitMadePad
  325. },
  326. props: {
  327. show: {
  328. type: Boolean,
  329. default: false
  330. },
  331. priviewData: {
  332. type: Object,
  333. default: () => {
  334. return {};
  335. }
  336. }
  337. },
  338. data() {
  339. return {
  340. showDialog: false,
  341. recipes: [], // 处方数据
  342. recipeItem: {}, // 右侧显示处方
  343. msg: null, // 用户信息
  344. // isDj: false, // 是否代煎
  345. // isPs: false, // 是否配送
  346. psMsg: {}, // 配送相关信息
  347. rationalMed: [],
  348. rationalMed1: [],
  349. rationalMed2: [],
  350. rationalMed3: [],
  351. rationalMed4: [],
  352. rationalMed5: [],
  353. rationalMed6: [],
  354. rationalMed7: [],
  355. rationalMed8: [],
  356. rationalMed9: [],
  357. rationalMed10: []
  358. };
  359. },
  360. watch: {
  361. show() {
  362. this.showDialog = this.show;
  363. if (!this.showDialog) {
  364. this.recipes = [];
  365. this.recipeItem = {};
  366. }
  367. },
  368. priviewData: {
  369. deep: false,
  370. handler: function() {
  371. if (!this.show) return;
  372. if (Object.keys(this.priviewData).length == 0) return;
  373. this.recipes = [];
  374. this.recipeItem = {};
  375. this.dealPriviewData();
  376. }
  377. }
  378. },
  379. computed: {
  380. totalCount() {
  381. let total = 0;
  382. this.recipes.forEach(item => {
  383. total += item.lumpSum;
  384. });
  385. return total.toFixed(2);
  386. },
  387. isDj() {
  388. let isDj = false;
  389. let item = this.recipeItem;
  390. if (item.recipeType == 1 && item.fried == "代煎") {
  391. isDj = true;
  392. }
  393. if (item.recipeType == 1 && item.fried == "") {
  394. isDj = false;
  395. }
  396. return isDj;
  397. },
  398. isPs() {
  399. let isPs = false;
  400. let item = this.recipeItem;
  401. if (item.isdelivery == 0 && item.recipeType != 3) {
  402. isPs = true;
  403. // this.psMsg = {
  404. // name: item.name,
  405. // phone: item.phone,
  406. // address: item.address
  407. // };
  408. }
  409. return isPs;
  410. },
  411. ...mapGetters(["getPatiensInfo", "getuserinfo", "getDrugInfo", "getIsSee", "getPreNo"])
  412. },
  413. created() {
  414. this.showDialog = this.show;
  415. this.dealPriviewData();
  416. },
  417. methods: {
  418. getEditPreNo() {
  419. return this.$route.query && this.$route.query.recipeType === "edit" ? this.$route.query.recipeID : this.getPreNo;
  420. },
  421. signToRecipt() {
  422. this.recipes.forEach(item => {
  423. if (item.pid == this.recipeItem.pid) {
  424. item.showSign = false;
  425. // this.recipeItem = item
  426. this.$set(this.recipeItem, "showSign", false);
  427. }
  428. });
  429. this.$forceUpdate();
  430. this.$refs.chineseM.showSign = true;
  431. },
  432. closePopup() {
  433. this.showDialog = !this.showDialog;
  434. // this.priviewData = {}
  435. this.recipes = []; // 处方数据
  436. this.recipeItem = {}; // 右侧显示处方
  437. this.$emit("update:show", this.showDialog);
  438. this.$emit("cancle", 1);
  439. },
  440. // 处理数据
  441. dealPriviewData() {
  442. // this.isPs = false;
  443. // this.isDj = false;
  444. // 中药处方
  445. if (this.priviewData.tcmPrescriptionFormVos.length > 0) {
  446. this.priviewData.tcmPrescriptionFormVos.forEach((item, index) => {
  447. item.showSign = true;
  448. item.recipeType = 1;
  449. this.recipes.push(item);
  450. if (index == 0) {
  451. this.getSvaeMed(item);
  452. }
  453. });
  454. }
  455. // 中药制剂
  456. if (this.priviewData.zhongyaozhijiFormVo) {
  457. if (this.priviewData.zhongyaozhijiFormVo.pid) {
  458. this.priviewData.zhongyaozhijiFormVo.recipeType = 2;
  459. this.recipes.push(this.priviewData.zhongyaozhijiFormVo);
  460. }
  461. }
  462. // 适宜技术处方
  463. if (this.priviewData.shiyijishuFormVo) {
  464. if (this.priviewData.shiyijishuFormVo.pid) {
  465. this.priviewData.shiyijishuFormVo.recipeType = 3;
  466. this.recipes.push(this.priviewData.shiyijishuFormVo);
  467. }
  468. }
  469. this.recipeItem = this.recipes[0];
  470. // this.recipes.forEach(item => {
  471. // if (item.recipeType == 1 && item.fried == "代煎") {
  472. // this.isDj = true;
  473. // }
  474. // if (item.recipeType == 1 && item.fried == "") {
  475. // this.isDj = false;
  476. // }
  477. // if (item.isdelivery == 0 && item.recipeType != 3) {
  478. // this.isPs = true;
  479. // this.psMsg = {
  480. // name: item.name,
  481. // phone: item.phone,
  482. // address: item.address
  483. // };
  484. // }
  485. // });
  486. if (this.priviewData.prescriptionVo) {
  487. this.msg = this.priviewData.prescriptionVo;
  488. this.msg.electronicmedicalrecord.image1 = formatPicture(this.msg.electronicmedicalrecord.image1);
  489. }
  490. },
  491. // 删除处方
  492. deleteItem(index) {
  493. this.$confirm("此操作将删除当前处方, 是否继续?", "提示", {
  494. confirmButtonText: "确定",
  495. cancelButtonText: "取消",
  496. type: "warning"
  497. })
  498. .then(() => {
  499. if (index == 0 && this.recipes.length == 1) {
  500. this.deleteRawData(this.recipes[index].recipeType, index);
  501. this.recipes.splice(index, 1);
  502. this.closePopup();
  503. return;
  504. }
  505. if (this.recipes[index].pid == this.recipeItem.pid) {
  506. this.deleteRawData(this.recipes[index].recipeType, index);
  507. this.recipes.splice(index, 1);
  508. this.recipeItem = this.recipes[0];
  509. } else {
  510. this.deleteRawData(this.recipes[index].recipeType, index);
  511. this.recipes.splice(index, 1);
  512. }
  513. })
  514. .catch(() => {});
  515. },
  516. // 左侧切换处方
  517. leftChange(item) {
  518. this.recipeItem = item;
  519. this.$refs.chineseM.showSign = !item.showSign;
  520. this.getSvaeMed(item);
  521. },
  522. // 获取安全合理用药信息
  523. getSvaeMed(data) {
  524. let father = this.$parent;
  525. data.prescriptiondetails.forEach(item1 => {
  526. if (item1.drugid.indexOf("-") != -1) {
  527. father.getRationalMed(item1.drugid);
  528. } else {
  529. father.getRationalMedForPlat(item1.drugid);
  530. }
  531. });
  532. setTimeout(() => {
  533. this.rationalMed = this.$parent.rationalMed;
  534. this.rationalMed1 = this.$parent.rationalMed1;
  535. this.rationalMed2 = this.$parent.rationalMed2;
  536. this.rationalMed3 = this.$parent.rationalMed3;
  537. this.rationalMed4 = this.$parent.rationalMed4;
  538. this.rationalMed5 = this.$parent.rationalMed5;
  539. this.rationalMed6 = this.$parent.rationalMed6;
  540. this.rationalMed7 = this.$parent.rationalMed7;
  541. this.rationalMed8 = this.$parent.rationalMed8;
  542. this.rationalMed9 = this.$parent.rationalMed9;
  543. this.rationalMed10 = this.$parent.rationalMed10;
  544. }, 200);
  545. },
  546. // 同时删除 缓存内保存的 提交数据
  547. deleteRawData(type, index) {
  548. let data = JSON.parse(sessionStorage.getItem("priviewRawData"));
  549. let zhongyao = data.zhongyao;
  550. let zhongchengyao = data.zhongchengyao;
  551. let technology = data.technology;
  552. if (type == 1) {
  553. zhongyao.splice(index, 1);
  554. }
  555. if (type == 2) {
  556. zhongchengyao = {};
  557. }
  558. if (type == 3) {
  559. technology = {};
  560. }
  561. sessionStorage.setItem(
  562. "priviewRawData",
  563. JSON.stringify({
  564. zhongchengyao,
  565. technology,
  566. zhongyao
  567. })
  568. );
  569. },
  570. sureToSubmit() {
  571. let data = JSON.parse(sessionStorage.getItem("priviewRawData"));
  572. let zhongyao = data.zhongyao;
  573. let zhongchengyao = data.zhongchengyao;
  574. let technology = data.technology;
  575. if (!!this.getEditPreNo()) {
  576. this.updateRecipe(zhongyao, zhongchengyao, technology);
  577. } else {
  578. this.addRecipe(zhongyao, zhongchengyao, technology);
  579. }
  580. },
  581. // 提交处方
  582. async addRecipe(zhongyao, zhongchengyao, technology) {
  583. const loading = this.$loading({
  584. lock: true,
  585. text: "正在提交",
  586. spinner: "el-icon-loading",
  587. background: "rgba(0, 0, 0, 0.7)"
  588. });
  589. let params = {
  590. recordid: this.getPatiensInfo.pid,
  591. technology: technology,
  592. zhongchengyao: zhongchengyao,
  593. zhongyao: zhongyao
  594. };
  595. let res = await addRecipe(params).catch(err => void 0);
  596. loading.close();
  597. if (res && res.ResultCode == 0) {
  598. this.$message.success("提交成功");
  599. let msg = {
  600. origin: "Recipe",
  601. msg: "刷新数据"
  602. };
  603. window.parent.postMessage(JSON.stringify(msg), "*");
  604. if (this.$route.query.from && this.$route.query.from == "validation") {
  605. setTimeout(() => {
  606. loading.close();
  607. this.$router.back();
  608. }, 3000);
  609. } else {
  610. setTimeout(() => {
  611. loading.close();
  612. this.$router.push({
  613. path: "/index/recipe"
  614. });
  615. }, 3000);
  616. }
  617. sessionStorage.setItem("priviewRawData", "");
  618. sessionStorage.removeItem("prescr" + this.getPatiensInfo.pid);
  619. }
  620. },
  621. // 审核不通过 修改处方
  622. async updateRecipe(zhongyao, zhongchengyao, technology) {
  623. const loading = this.$loading({
  624. lock: true,
  625. text: "正在修改",
  626. spinner: "el-icon-loading",
  627. background: "rgba(0, 0, 0, 0.7)"
  628. });
  629. const recipeID = this.getEditPreNo();
  630. zhongyao.forEach(item => {
  631. item.preId = recipeID;
  632. });
  633. zhongchengyao.preId = recipeID;
  634. technology.preId = recipeID;
  635. let params = {
  636. recordid: this.$route.query.recordsId || this.getPatiensInfo.pid,
  637. technology: technology,
  638. zhongchengyao: zhongchengyao,
  639. zhongyao: zhongyao
  640. };
  641. let res = await updateRecipe(params).catch(err => void 0);
  642. loading.close();
  643. if (res && res.ResultCode == 0) {
  644. let msg = {
  645. origin: "Recipe",
  646. msg: "刷新数据"
  647. };
  648. window.parent.postMessage(JSON.stringify(msg), "*");
  649. this.$message.success("修改成功");
  650. setTimeout(() => {
  651. loading.close();
  652. this.$router.push({
  653. path: "/index/recipe"
  654. });
  655. }, 3000);
  656. sessionStorage.setItem("priviewRawData", "");
  657. }
  658. }
  659. }
  660. };
  661. </script>
  662. <style scoped lang="scss">
  663. @import "~@/style/common.scss";
  664. .recipe-priview {
  665. // height: 400px;
  666. height: 70vh;
  667. .right-pad {
  668. width: 420px;
  669. // background: red;
  670. height: 100%;
  671. overflow-y: auto;
  672. overflow-x: hidden;
  673. }
  674. .report {
  675. margin-top: 40px;
  676. height: 400px;
  677. overflow: auto;
  678. background: rgba($color: #d7d7d7, $alpha: 0.3);
  679. padding: 10px;
  680. box-sizing: border-box;
  681. h3 {
  682. text-align: center;
  683. }
  684. }
  685. .left-table {
  686. flex: 1;
  687. // height: 100%;
  688. overflow: auto;
  689. margin-right: 10px;
  690. .table-body {
  691. border: 1px solid #d7d7d7;
  692. border-bottom: 0;
  693. }
  694. .table-title {
  695. font-size: 15px;
  696. font-weight: 600;
  697. text-align: center;
  698. padding: 8px;
  699. color: #fff;
  700. background: #5386f6;
  701. }
  702. .table-tr {
  703. border-bottom: 1px solid #d7d7d7;
  704. cursor: default;
  705. // line-height: 30px;;
  706. font-size: 14px;
  707. height: 33px;
  708. div:nth-child(1) {
  709. flex: 1;
  710. border-right: 1px solid #d7d7d7;
  711. }
  712. div:nth-child(2) {
  713. flex: 1;
  714. border-right: 1px solid #d7d7d7;
  715. color: red;
  716. }
  717. div:nth-child(3) {
  718. width: 30px;
  719. display: flex;
  720. align-items: center;
  721. justify-content: center;
  722. img {
  723. width: 60%;
  724. }
  725. }
  726. }
  727. .table-tr:last-child {
  728. div:nth-child(1) {
  729. font-weight: 600;
  730. }
  731. }
  732. .table-tr-active {
  733. background: #d7d7d7;
  734. }
  735. }
  736. .message {
  737. .msg-title {
  738. display: flex;
  739. align-items: center;
  740. justify-content: flex-start;
  741. img {
  742. width: 24px;
  743. margin-right: 5px;
  744. }
  745. span {
  746. font-size: 14px;
  747. font-weight: 600;
  748. }
  749. }
  750. .ms-row {
  751. margin-top: 10px;
  752. display: flex;
  753. align-items: flex-start;
  754. justify-content: flex-start;
  755. }
  756. .row-item {
  757. display: flex;
  758. flex: 1;
  759. align-items: flex-start;
  760. }
  761. .img-body {
  762. display: flex;
  763. align-items: flex-start;
  764. flex-wrap: wrap;
  765. }
  766. .img-item {
  767. width: 80px;
  768. height: 80px;
  769. margin-right: 10px;
  770. margin-bottom: 10px;
  771. }
  772. }
  773. }
  774. .btns {
  775. margin-top: 10px;
  776. }
  777. .patiens-msg {
  778. font-size: 14px;
  779. font-family: PingFang SC;
  780. font-weight: 400;
  781. color: #333333;
  782. .p {
  783. margin-bottom: 5px;
  784. cursor: default;
  785. .patiens-name {
  786. color: #5386f6;
  787. font-weight: bold;
  788. font-size: 16px;
  789. }
  790. .patiens-desc {
  791. display: inline-block;
  792. .matname {
  793. color: #5386f6;
  794. }
  795. }
  796. .patiens-cate {
  797. font-weight: bold;
  798. }
  799. }
  800. }
  801. .recipe-tabs {
  802. width: 100%;
  803. overflow-x: auto;
  804. display: flex;
  805. align-items: flex-start;
  806. margin-top: 10px;
  807. .tabs-item {
  808. cursor: pointer;
  809. min-width: 105px;
  810. padding: 2px 5px;
  811. font-size: 14px;
  812. display: flex;
  813. align-items: center;
  814. justify-content: center;
  815. border: 1px solid #000;
  816. border-right: 0;
  817. img {
  818. width: 15px;
  819. margin-left: 5px;
  820. }
  821. }
  822. .tabs-active {
  823. background: #d7d7d7;
  824. }
  825. .tabs-item:last-child {
  826. border-right: 1px solid #000;
  827. }
  828. }
  829. </style>