ExperienceAdd copy.vue 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263
  1. <template>
  2. <div class="accordEdit">
  3. <!-- <div class="flex-center back" @click="$router.back()" v-if='showBtn'>返回</div> -->
  4. <div style="margin-bottom:10px;">
  5. <el-button type="primary" size="mini" @click="$router.back()" v-if="showBtn">返回</el-button>
  6. </div>
  7. <div class="flex-vertical-center-l flex-wrap">
  8. <div class="item flex-vertical-center-l">
  9. <span>*</span>
  10. <div class="name">方名:</div>
  11. <div class="input">
  12. <el-input size="mini" v-model="form.name" placeholder="请输入" :disabled="type=='find'"></el-input>
  13. </div>
  14. </div>
  15. <div class="item flex-vertical-center-l">
  16. <span></span>
  17. <div class="name">功效与适应症:</div>
  18. <div class="input">
  19. <el-input size="mini" v-model="form.efficacy" placeholder="请输入" :disabled="type=='find'"></el-input>
  20. </div>
  21. </div>
  22. <div class="item flex-vertical-center-l">
  23. <span>*</span>
  24. <div class="name">剂型:</div>
  25. <div class="input">
  26. <el-select size="mini" v-model="form.doseType" placeholder="请选择" :disabled="type=='find'">
  27. <el-option
  28. :label="item.value"
  29. :value="item.key"
  30. v-for="(item,index) in doseTypeList"
  31. :key="index"
  32. ></el-option>
  33. </el-select>
  34. </div>
  35. </div>
  36. <div class="item flex-vertical-center-l">
  37. <span>*</span>
  38. <div class="name">中医病名:</div>
  39. <div class="input">
  40. <el-select
  41. size="mini"
  42. v-model="form.cmName"
  43. @change="cNameChange"
  44. placeholder="请选择"
  45. :disabled="type=='find'"
  46. filterable
  47. remote
  48. :filter-method="filterMethod"
  49. >
  50. <el-option
  51. :label="item.disname"
  52. :value="item.disname"
  53. v-for="(item,index) in cmNameList"
  54. :key="index"
  55. ></el-option>
  56. </el-select>
  57. </div>
  58. </div>
  59. <div class="item flex-vertical-center-l">
  60. <span>*</span>
  61. <div class="name">证型:</div>
  62. <div class="input">
  63. <el-autocomplete
  64. size="mini"
  65. v-model="form.cardType"
  66. :fetch-suggestions="searchZhengxing"
  67. :trigger-on-focus="true"
  68. @select="selectZX($event)"
  69. ref="zhengxing"
  70. :id="'zhengxing'"
  71. placeholder="请输入"
  72. :disabled="type=='find'"
  73. ></el-autocomplete>
  74. </div>
  75. </div>
  76. <div class="item flex-vertical-center-l">
  77. <span></span>
  78. <div class="name">方解:</div>
  79. <div class="input">
  80. <el-input
  81. size="mini"
  82. v-model="form.solution"
  83. type="textarea"
  84. placeholder="请输入"
  85. :disabled="type=='find'"
  86. ></el-input>
  87. </div>
  88. </div>
  89. <div class="item flex-vertical-center-l">
  90. <span>*</span>
  91. <div class="name">选择药房:</div>
  92. <div class="input">
  93. <el-select
  94. size="mini"
  95. v-model="pharmacyID"
  96. placeholder="请选择"
  97. :disabled="type=='find'"
  98. @change="changePharmacy(form.lastType)"
  99. >
  100. <el-option
  101. :label="item.pharmacyName"
  102. :value="item.pid"
  103. v-for="(item,index) in pharmacyList"
  104. :key="index"
  105. ></el-option>
  106. </el-select>
  107. </div>
  108. </div>
  109. <!-- @change="getPharmacyID" -->
  110. <div class="item flex-vertical-center-l">
  111. <span>*</span>
  112. <div class="name">选择类型:</div>
  113. <div class="input">
  114. <el-select
  115. size="mini"
  116. v-model="form.cMedType"
  117. placeholder="请选择"
  118. :disabled="type=='find'"
  119. @change="changePharmacy(form.lastType)"
  120. >
  121. <el-option
  122. :label="item.pharmacyName"
  123. :value="item.pid"
  124. v-for="(item,index) in cMedType"
  125. :key="index"
  126. ></el-option>
  127. </el-select>
  128. </div>
  129. </div>
  130. <div class="item flex-vertical-center-l">
  131. <span></span>
  132. <div class="name">专家:</div>
  133. <div class="input">
  134. <el-input size="mini" v-model="form.experts" placeholder="请输入" :disabled="type=='find'"></el-input>
  135. </div>
  136. </div>
  137. <div class="item flex-vertical-center-l">
  138. <span></span>
  139. <div class="name">专家名衔:</div>
  140. <div class="input">
  141. <el-select size="mini" v-model="form.titles" placeholder="请选择" :disabled="type=='find'">
  142. <el-option
  143. :label="item.value"
  144. :value="item.value"
  145. v-for="(item,index) in titlesList"
  146. :key="index"
  147. ></el-option>
  148. </el-select>
  149. </div>
  150. </div>
  151. <div class="item flex-vertical-center-l">
  152. <span></span>
  153. <div class="name">修改限制:</div>
  154. <div class="input">
  155. <el-switch
  156. size="mini"
  157. :disabled="type=='find'"
  158. v-model="form.switch"
  159. active-color="#5EC7B1"
  160. inactive-color="#ff4949"
  161. ></el-switch>
  162. </div>
  163. </div>
  164. </div>
  165. <div class="pre-detail">处方明细:</div>
  166. <!-- 表格 -->
  167. <div class="table-show flex-plane-t-between flex-wrap">
  168. <!-- 表一和表二 -->
  169. <div class="table-left-body">
  170. <div class="table-left" v-if="true">
  171. <el-table
  172. :data="tableData"
  173. style="width:100%;"
  174. :span-method="arraySpanMethod1"
  175. id="table1"
  176. >
  177. <el-table-column prop="id" label width="40" fixed="left">
  178. <template slot-scope="scope">
  179. <!-- width:110px -->
  180. <!-- v-model="scope.row.key" -->
  181. <div v-if="!scope.row.name" class="flex-vertical-between">
  182. <div style="width:110px;" class="operate2" id="operate2">
  183. <el-input
  184. :value="scope.row.key"
  185. :id="'searchD'+scope.row.id"
  186. size="mini"
  187. placeholder="请输入..."
  188. @input="searchDrug($event,scope)"
  189. @blur="drugBlur($event,scope)"
  190. @keydown.down.native="drugDown($event,scope)"
  191. @keydown.up.native="drugUp($event,scope)"
  192. @keydown.enter.native="drugEnter(scope)"
  193. :disabled="type=='find'"
  194. ></el-input>
  195. <div class="table-choose3" v-if="scope.row.key">
  196. <div class="table-choose-h flex-vertical-between">
  197. <div class="flex-center">药品名称</div>
  198. <div class="flex-center">规格</div>
  199. <div class="flex-center">产地</div>
  200. <div class="flex-center">库存</div>
  201. </div>
  202. <div
  203. class="t-c-b infinite-list"
  204. v-infinite-scroll="load"
  205. :infinite-scroll-immediate="false"
  206. :id="'infiniteList'+scope.row.id"
  207. :ref="'infiniteList'+scope.row.id"
  208. style="overflow:auto"
  209. >
  210. <div
  211. class="infinite-list-item flex-vertical-between"
  212. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  213. @click="chooseDis1(scope,index1,item1)"
  214. v-for="(item1,index1) in scope.row.drugList"
  215. :key="index1"
  216. >
  217. <p class="flex-center">{{item1.ypmc}}</p>
  218. <p class="flex-center">{{item1.gg}}</p>
  219. <p class="flex-center">{{item1.cdmc}}</p>
  220. <p class="flex-center">{{item1.kc}}</p>
  221. </div>
  222. </div>
  223. </div>
  224. </div>
  225. <div class="operate1" v-if="scope.row.id!==totalTableD.length && !scope.row.name">
  226. <img src="~@/assets/delete1.png" alt @click="deleteDis1(scope)" />
  227. </div>
  228. </div>
  229. <!-- -->
  230. <div v-else>{{scope.row.id}}</div>
  231. </template>
  232. </el-table-column>
  233. <el-table-column prop="name" label="药品名称" width="80" fixed="left">
  234. <template slot-scope="scope" v-if="scope.row.name">
  235. <div
  236. @click="clickName(scope)"
  237. v-if="!scope.row.showSearch"
  238. :style="{'color':scope.row.color?scope.row.color:''}"
  239. >{{scope.row.name}}</div>
  240. <div v-else class="flex-vertical-between">
  241. <div style="width:110px;">
  242. <el-input
  243. :value="scope.row.key"
  244. :id="'searchD'+scope.row.id"
  245. size="mini"
  246. :placeholder="scope.row.name"
  247. @input="searchDrug($event,scope)"
  248. @blur="drugBlur1($event,scope)"
  249. @keydown.down.native="drugDown($event,scope)"
  250. @keydown.up.native="drugUp($event,scope)"
  251. @keydown.enter.native="drugEnter(scope)"
  252. :disabled="type=='find'"
  253. ></el-input>
  254. <!-- v-model="scope.row.key" -->
  255. <div class="table-choose3" v-if="scope.row.key">
  256. <div class="table-choose-h flex-vertical-between">
  257. <div class="flex-center">药品名称</div>
  258. <div class="flex-center">规格</div>
  259. <div class="flex-center">产地</div>
  260. <div class="flex-center">库存</div>
  261. </div>
  262. <!-- -->
  263. <div
  264. class="t-c-b infinite-list"
  265. v-infinite-scroll="load"
  266. :infinite-scroll-immediate="false"
  267. :id="'infiniteList'+scope.row.id"
  268. :ref="'infiniteList'+scope.row.id"
  269. style="overflow:auto"
  270. >
  271. <div
  272. class="infinite-list-item flex-vertical-between"
  273. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  274. @click="chooseDis1(scope,index1,item1)"
  275. v-for="(item1,index1) in scope.row.drugList"
  276. :key="index1"
  277. >
  278. <p class="flex-center">{{item1.ypmc}}</p>
  279. <p class="flex-center">{{item1.gg}}</p>
  280. <p class="flex-center">{{item1.cdmc}}</p>
  281. <p class="flex-center">{{item1.kc}}</p>
  282. </div>
  283. </div>
  284. </div>
  285. </div>
  286. </div>
  287. </template>
  288. </el-table-column>
  289. <!-- fixed="left" -->
  290. <el-table-column prop="spec" label="规格" width="50"></el-table-column>
  291. <el-table-column prop="dose" label="剂量" width="50">
  292. <template slot-scope="scope" v-if="scope.row.name">
  293. <div class="t_dose">
  294. <el-input
  295. :value="scope.row.dose"
  296. size="mini"
  297. :id="'dose'+scope.row.id"
  298. @keydown.enter.native="doseEnter(scope)"
  299. @input="countDoseMoney($event,scope)"
  300. :disabled="type=='find'"
  301. ></el-input>
  302. </div>
  303. </template>
  304. </el-table-column>
  305. <el-table-column prop="unit" label="单位" width="50"></el-table-column>
  306. <!-- <el-table-column prop="inventory" label="库存" width="80"> -->
  307. <!-- </el-table-column> -->
  308. <el-table-column prop="usage" label="用法">
  309. <template slot-scope="scope" v-if="scope.row.name">
  310. <el-select
  311. v-model="scope.row.usage"
  312. placeholder="请选择"
  313. size="mini"
  314. @change="usageC($event,scope)"
  315. :disabled="type=='find'"
  316. >
  317. <el-option
  318. :label="item.value"
  319. :value="item.key"
  320. v-for="(item,index) in scope.row.usageList"
  321. :key="index"
  322. ></el-option>
  323. </el-select>
  324. </template>
  325. </el-table-column>
  326. <!-- <el-table-column prop="price" label="单价" width="50">
  327. </el-table-column>-->
  328. <!-- <el-table-column prop="total" label="计价总额" width="80">
  329. <template slot-scope="scope" v-if="scope.row.name">
  330. <div>{{scope.row.total | formatTotal}}</div>
  331. </template>
  332. </el-table-column>-->
  333. <el-table-column label="操作" fixed="right" width="150">
  334. <template slot-scope="scope">
  335. <div class="operate" v-if="scope.row.name">
  336. <div v-if="type!='find'">
  337. <img src="~@/assets/add.png" alt @click="addDis1(scope)" />
  338. </div>
  339. <div v-if="type!='find'">
  340. <img src="~@/assets/delete1.png" alt @click="deleteDis1(scope)" />
  341. </div>
  342. <div>
  343. <img src="~@/assets/find.png" alt @click="findDrug(scope)" />
  344. </div>
  345. </div>
  346. <div
  347. class="operate"
  348. v-else-if="scope.row.id==totalTableD.length && !scope.row.name"
  349. >
  350. <div style="opacity:0;">
  351. <img src="~@/assets/find.png" alt />
  352. </div>
  353. </div>
  354. <div v-else class="operate">
  355. <div v-if="scope.row.id!==totalTableD.length">
  356. <img src="~@/assets/delete1.png" alt @click="deleteDis1(scope)" />
  357. </div>
  358. </div>
  359. </template>
  360. </el-table-column>
  361. <div slot="empty"></div>
  362. </el-table>
  363. </div>
  364. </div>
  365. <div class="table-left-body">
  366. <div class="table-left" v-if="true">
  367. <el-table
  368. :data="tableData1"
  369. style="width:100%;"
  370. :span-method="arraySpanMethod1"
  371. id="table1"
  372. >
  373. <el-table-column prop="id" label width="40" fixed="left">
  374. <template slot-scope="scope">
  375. <!-- width:110px -->
  376. <!-- v-model="scope.row.key" -->
  377. <div v-if="!scope.row.name" class="flex-vertical-between">
  378. <div style="width:110px;" class="operate2" id="operate2">
  379. <el-input
  380. :value="scope.row.key"
  381. :id="'searchD'+scope.row.id"
  382. size="mini"
  383. placeholder="请输入..."
  384. @input="searchDrug($event,scope)"
  385. @blur="drugBlur($event,scope)"
  386. @keydown.down.native="drugDown($event,scope)"
  387. @keydown.up.native="drugUp($event,scope)"
  388. @keydown.enter.native="drugEnter(scope)"
  389. :disabled="type=='find'"
  390. ></el-input>
  391. <div class="table-choose3" v-if="scope.row.key">
  392. <div class="table-choose-h flex-vertical-between">
  393. <div class="flex-center">药品名称</div>
  394. <div class="flex-center">规格</div>
  395. <div class="flex-center">产地</div>
  396. <div class="flex-center">库存</div>
  397. </div>
  398. <div
  399. class="t-c-b infinite-list"
  400. v-infinite-scroll="load"
  401. :infinite-scroll-immediate="false"
  402. :id="'infiniteList'+scope.row.id"
  403. :ref="'infiniteList'+scope.row.id"
  404. style="overflow:auto"
  405. >
  406. <div
  407. class="infinite-list-item flex-vertical-between"
  408. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  409. @click="chooseDis1(scope,index1,item1)"
  410. v-for="(item1,index1) in scope.row.drugList"
  411. :key="index1"
  412. >
  413. <p class="flex-center">{{item1.ypmc}}</p>
  414. <p class="flex-center">{{item1.gg}}</p>
  415. <p class="flex-center">{{item1.cdmc}}</p>
  416. <p class="flex-center">{{item1.kc}}</p>
  417. </div>
  418. </div>
  419. </div>
  420. </div>
  421. <div class="operate1" v-if="scope.row.id!==totalTableD.length && !scope.row.name">
  422. <img src="~@/assets/delete1.png" alt @click="deleteDis1(scope)" />
  423. </div>
  424. </div>
  425. <!-- -->
  426. <div v-else>{{scope.row.id}}</div>
  427. </template>
  428. </el-table-column>
  429. <el-table-column prop="name" label="药品名称" width="80" fixed="left">
  430. <template slot-scope="scope" v-if="scope.row.name">
  431. <div
  432. @click="clickName(scope)"
  433. v-if="!scope.row.showSearch"
  434. :style="{'color':scope.row.color?scope.row.color:''}"
  435. >{{scope.row.name}}</div>
  436. <div v-else class="flex-vertical-between">
  437. <div style="width:110px;">
  438. <el-input
  439. :value="scope.row.key"
  440. :id="'searchD'+scope.row.id"
  441. size="mini"
  442. :placeholder="scope.row.name"
  443. @input="searchDrug($event,scope)"
  444. @blur="drugBlur1($event,scope)"
  445. @keydown.down.native="drugDown($event,scope)"
  446. @keydown.up.native="drugUp($event,scope)"
  447. @keydown.enter.native="drugEnter(scope)"
  448. :disabled="type=='find'"
  449. ></el-input>
  450. <!-- v-model="scope.row.key" -->
  451. <div class="table-choose3" v-if="scope.row.key">
  452. <div class="table-choose-h flex-vertical-between">
  453. <div class="flex-center">药品名称</div>
  454. <div class="flex-center">规格</div>
  455. <div class="flex-center">产地</div>
  456. <div class="flex-center">库存</div>
  457. </div>
  458. <!-- -->
  459. <div
  460. class="t-c-b infinite-list"
  461. v-infinite-scroll="load"
  462. :infinite-scroll-immediate="false"
  463. :id="'infiniteList'+scope.row.id"
  464. :ref="'infiniteList'+scope.row.id"
  465. style="overflow:auto"
  466. >
  467. <div
  468. class="infinite-list-item flex-vertical-between"
  469. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  470. @click="chooseDis1(scope,index1,item1)"
  471. v-for="(item1,index1) in scope.row.drugList"
  472. :key="index1"
  473. >
  474. <p class="flex-center">{{item1.ypmc}}</p>
  475. <p class="flex-center">{{item1.gg}}</p>
  476. <p class="flex-center">{{item1.cdmc}}</p>
  477. <p class="flex-center">{{item1.kc}}</p>
  478. </div>
  479. </div>
  480. </div>
  481. </div>
  482. </div>
  483. </template>
  484. </el-table-column>
  485. <!-- fixed="left" -->
  486. <el-table-column prop="spec" label="规格" width="50"></el-table-column>
  487. <el-table-column prop="dose" label="剂量" width="50">
  488. <template slot-scope="scope" v-if="scope.row.name">
  489. <div class="t_dose">
  490. <el-input
  491. :value="scope.row.dose"
  492. size="mini"
  493. :id="'dose'+scope.row.id"
  494. @keydown.enter.native="doseEnter(scope)"
  495. @input="countDoseMoney($event,scope)"
  496. :disabled="type=='find'"
  497. ></el-input>
  498. </div>
  499. </template>
  500. </el-table-column>
  501. <el-table-column prop="unit" label="单位" width="50"></el-table-column>
  502. <!-- <el-table-column prop="inventory" label="库存" width="80"> -->
  503. <!-- </el-table-column> -->
  504. <el-table-column prop="usage" label="用法">
  505. <template slot-scope="scope" v-if="scope.row.name">
  506. <el-select
  507. v-model="scope.row.usage"
  508. placeholder="请选择"
  509. size="mini"
  510. @change="usageC($event,scope)"
  511. :disabled="type=='find'"
  512. >
  513. <el-option
  514. :label="item.value"
  515. :value="item.key"
  516. v-for="(item,index) in scope.row.usageList"
  517. :key="index"
  518. ></el-option>
  519. </el-select>
  520. </template>
  521. </el-table-column>
  522. <!-- <el-table-column prop="price" label="单价" width="50">
  523. </el-table-column>-->
  524. <!-- <el-table-column prop="total" label="计价总额" width="80">
  525. <template slot-scope="scope" v-if="scope.row.name">
  526. <div>{{scope.row.total | formatTotal}}</div>
  527. </template>
  528. </el-table-column>-->
  529. <el-table-column label="操作" fixed="right" width="150">
  530. <template slot-scope="scope">
  531. <div class="operate" v-if="scope.row.name">
  532. <div v-if="type!='find'">
  533. <img src="~@/assets/add.png" alt @click="addDis1(scope)" />
  534. </div>
  535. <div v-if="type!='find'">
  536. <img src="~@/assets/delete1.png" alt @click="deleteDis1(scope)" />
  537. </div>
  538. <div>
  539. <img src="~@/assets/find.png" alt @click="findDrug(scope)" />
  540. </div>
  541. </div>
  542. <div
  543. class="operate"
  544. v-else-if="scope.row.id==totalTableD.length && !scope.row.name"
  545. >
  546. <div style="opacity:0;">
  547. <img src="~@/assets/find.png" alt />
  548. </div>
  549. </div>
  550. <div v-else class="operate">
  551. <div v-if="scope.row.id!==totalTableD.length">
  552. <img src="~@/assets/delete1.png" alt @click="deleteDis1(scope)" />
  553. </div>
  554. </div>
  555. </template>
  556. </el-table-column>
  557. <div slot="empty"></div>
  558. </el-table>
  559. </div>
  560. </div>
  561. </div>
  562. <div
  563. class="save flex-center"
  564. v-if="(type=='edit' &&showBtn) || (type=='add' && showBtn)"
  565. @click="save()"
  566. >保存</div>
  567. <!-- 药品详情 -->
  568. <Popup
  569. width="80%"
  570. :showDialog="showDrug"
  571. @cancle="showDrug=false"
  572. title="药品详情"
  573. :showBtns="false"
  574. >
  575. <div class="drug-body" slot="body">
  576. <div class="drug-item flex-plane-center-l">
  577. <span>名称:</span>
  578. <div>{{drugInfo.matname}}</div>
  579. </div>
  580. <div class="drug-item flex-plane-center-l">
  581. <span>别名:</span>
  582. <div>{{drugInfo.matsynonyms}}</div>
  583. </div>
  584. <div class="drug-item flex-plane-center-l">
  585. <span>剂量区间:</span>
  586. <div>{{drugInfo.matmindosage}}-{{drugInfo.matmindosage}}{{drugInfo.unit}}</div>
  587. </div>
  588. <div class="drug-item flex-plane-center-l">
  589. <span>单位:</span>
  590. <div>{{drugInfo.unit}}</div>
  591. </div>
  592. <div class="drug-item flex-plane-center-l">
  593. <span>用法:</span>
  594. <div>{{drugInfo.matusage}}</div>
  595. </div>
  596. <div class="drug-item flex-plane-center-l">
  597. <span>用法禁忌:</span>
  598. <div>{{drugInfo.matsjj}}</div>
  599. </div>
  600. <div class="drug-item flex-plane-center-l">
  601. <span>性味:</span>
  602. <div>{{drugInfo.matflavour}}</div>
  603. </div>
  604. <div class="drug-item flex-plane-center-l">
  605. <span>归经:</span>
  606. <div>{{drugInfo.matmeridian}}</div>
  607. </div>
  608. <div class="drug-item flex-plane-center-l">
  609. <span>功效:</span>
  610. <div>{{drugInfo.matefficacy}}</div>
  611. </div>
  612. <div class="drug-item flex-plane-center-l">
  613. <span>应用:</span>
  614. <div>{{drugInfo.matapplication}}</div>
  615. </div>
  616. <div class="drug-item flex-plane-center-l">
  617. <span>使用注意:</span>
  618. <div>
  619. <div>{{drugInfo.mattaboo}}</div>
  620. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  621. </div>
  622. </div>
  623. <div class="drug-item flex-plane-center-l">
  624. <span>图示:</span>
  625. <div class="flex-plane-center-l" v-for="(item,index) in drugInfo.matphoto" :key="index">
  626. <img :src="item" alt />
  627. </div>
  628. </div>
  629. <div class="flex-vertical-center-l flex-wrap">
  630. <div class="drug-item1 flex-plane-center-l">
  631. <span>相似中药鉴别使用:</span>
  632. <div>
  633. <div v-for="(item,index) in drugInfo.xiangsi" :key="index">
  634. <span
  635. class="mad-cy"
  636. v-for="(item1,index1) in item.relmats"
  637. :key="index1"
  638. >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
  639. <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
  640. </div>
  641. </div>
  642. </div>
  643. </div>
  644. <div class="flex-vertical-center-l flex-wrap">
  645. <div class="drug-item1 flex-plane-center-l">
  646. <span>常用药对:</span>
  647. <div>
  648. <div v-for="(item,index) in drugInfo.changyong" :key="index">
  649. <span
  650. class="mad-cy"
  651. v-for="(item1,index1) in item.relmats"
  652. :key="index1"
  653. >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
  654. <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
  655. </div>
  656. </div>
  657. </div>
  658. </div>
  659. </div>
  660. </Popup>
  661. </div>
  662. </template>
  663. <script>
  664. import Popup from "@/components/Propup.vue";
  665. import { debounce } from "@/utils/format.js";
  666. import {
  667. getTableDrug,
  668. getAddressForHospital,
  669. getPharmacyID,
  670. changePharmacy,
  671. getDrugDetail,
  672. customerQuery
  673. } from "@/api/diagnosis.js";
  674. import { getSelectType } from "@/api/city.js";
  675. import {
  676. getCDiseaseName,
  677. getXDiseaseName,
  678. getCCardType
  679. } from "@/api/knowledge.js";
  680. import {
  681. addExperince,
  682. getExperinceDetail,
  683. editExperince
  684. } from "@/api/business";
  685. export default {
  686. components: {
  687. Popup
  688. },
  689. props: {
  690. showBtn: {
  691. type: Boolean,
  692. default: true
  693. }
  694. },
  695. data() {
  696. return {
  697. showDrug: false,
  698. drugInfo: {},
  699. form: {
  700. name: "", // 方名
  701. efficacy: "", // 功效
  702. doseType: "", //剂型
  703. cmName: "", // 中医病名
  704. cmNameID: "", // 中医病名id
  705. cardType: "", // 证型
  706. cardTypeID: "", // 证型id
  707. solution: "", // 方解
  708. cMedType: "", // 中药类型
  709. experts: "", // 专家
  710. titles: "", // 专家头衔
  711. switch: false // 修改限制
  712. },
  713. cmNameList: [], // 中医病名列表
  714. doseTypeList: [], // 剂型选择器
  715. cardTypeList: [], // 中医证型
  716. titlesList: [
  717. {
  718. key: "1",
  719. value: "国医大师"
  720. },
  721. {
  722. key: "2",
  723. value: "国家级名老中医"
  724. },
  725. {
  726. key: "3",
  727. value: "省级名老中医"
  728. },
  729. {
  730. key: "4",
  731. value: "名医"
  732. }
  733. ],
  734. pharmacyID: "", // 药房id
  735. pharmacyList: [],
  736. cMedType: [
  737. {
  738. pharmacyName: "散装饮片",
  739. pid: "0"
  740. },
  741. {
  742. pharmacyName: "散装颗粒",
  743. pid: "1"
  744. },
  745. {
  746. pharmacyName: "小包装饮片",
  747. pid: "2"
  748. },
  749. {
  750. pharmacyName: "小包装颗粒",
  751. pid: "3"
  752. }
  753. ], // 中药类型 pharmacyName /pharmacyId
  754. /*---------顶部字段信息 结束-------------*/
  755. /*---------底部字段信息 开始-------------*/
  756. totalTableD: [
  757. {
  758. id: 1,
  759. name: "",
  760. spec: "", // 规格
  761. dose: "", // 剂量
  762. unit: "", // 单位
  763. usage: "", // 用法
  764. key: "",
  765. search_i: 0,
  766. // price: '12',
  767. // total: 12,
  768. // inventory: '999', // 库存
  769. usageList: [], // 用法
  770. drugList: [],
  771. loadMore: true,
  772. page: 1
  773. }
  774. ],
  775. tableData: [
  776. {
  777. id: 1,
  778. key: "",
  779. drugList: [],
  780. page: 1,
  781. loadMore: true,
  782. usageList: [],
  783. search_i: 0,
  784. showSearch: false
  785. }
  786. ],
  787. tableData1: [],
  788. index: 1,
  789. pid: "", // 协定方id
  790. type: "add" // 是否是 查看
  791. };
  792. },
  793. created() {
  794. this.getSelectType("剂型", 0);
  795. this.customerQuery();
  796. if (this.$route.query.type) {
  797. this.type = this.$route.query.type;
  798. this.getExperinceDetail();
  799. } else {
  800. this.getSelectType("中药药品用法", 0);
  801. }
  802. },
  803. methods: {
  804. // 保存按钮点击
  805. save() {
  806. if (!this.form.name) {
  807. this.$message({
  808. type: "error",
  809. message: "请输入方名",
  810. showClose: true
  811. });
  812. return;
  813. }
  814. if (!this.form.doseType) {
  815. this.$message({
  816. type: "error",
  817. message: "请选择剂型",
  818. showClose: true
  819. });
  820. return;
  821. }
  822. if (!this.form.cmNameID) {
  823. this.$message({
  824. type: "error",
  825. message: "请输入中医病名",
  826. showClose: true
  827. });
  828. return;
  829. }
  830. if (!this.form.cardTypeID) {
  831. this.$message({
  832. type: "error",
  833. message: "请输入证型",
  834. showClose: true
  835. });
  836. return;
  837. }
  838. if (!this.form.cMedType) {
  839. this.$message({
  840. type: "error",
  841. message: "请选择中药类型",
  842. showClose: true
  843. });
  844. return;
  845. }
  846. let hasDrug = false;
  847. this.totalTableD.forEach(item => {
  848. if (item.name) {
  849. hasDrug = true;
  850. }
  851. });
  852. if (!hasDrug) {
  853. this.$message({
  854. type: "error",
  855. message: "请完善处方明细信息",
  856. showClose: true
  857. });
  858. return;
  859. }
  860. if (this.type == "add") {
  861. this.addExperince();
  862. } else {
  863. this.editExperince();
  864. }
  865. },
  866. cNameChange() {
  867. // let id = ''
  868. this.cmNameList.forEach(item => {
  869. if (item.disname == this.form.cmName) {
  870. // id = item.disid
  871. this.form.cmNameID = item.disid;
  872. }
  873. });
  874. this.form.cardType = "";
  875. this.form.cardTypeID = "";
  876. this.getCCardType(this.form.cmNameID);
  877. setTimeout(() => {
  878. this.$refs.zhengxing.focus();
  879. }, 200);
  880. },
  881. filterMethod(e) {
  882. let pinyin = /^[A-Za-z]+$/g;
  883. if (pinyin.test(e)) {
  884. this.getCDiseaseName(e, "1");
  885. } else {
  886. this.getCDiseaseName(e, "");
  887. }
  888. },
  889. selectZX(e) {
  890. this.form.cardType = e.value;
  891. this.form.cardTypeID = e.id;
  892. },
  893. async customerQuery() {
  894. let res = await customerQuery({
  895. type: 0
  896. });
  897. if (res.ResultCode == 0) {
  898. // this.pharmacyID = res.Data[0].pid
  899. this.pharmacyList = res.Data;
  900. }
  901. },
  902. // 获取药品详细信息并展示
  903. async getDrugDetail(id) {
  904. let res = await getDrugDetail({
  905. stiDrugId: id
  906. });
  907. if (res.ResultCode == 0) {
  908. res.Data.matphoto = res.Data.matphoto.split(",");
  909. // res.data.matphoto = res.data.matphoto.split(',')
  910. res.Data.xiangsi = res.Data.relativedata.filter(item => {
  911. return item.relativetype == 1;
  912. });
  913. res.Data.changyong = res.Data.relativedata.filter(item => {
  914. return item.relativetype == 2;
  915. });
  916. this.drugInfo = res.Data;
  917. this.showDrug = true;
  918. }
  919. },
  920. // 获取详情
  921. async getExperinceDetail() {
  922. let res = await getExperinceDetail({
  923. pid: this.$route.query.pid
  924. });
  925. if (res.ResultCode == 0) {
  926. this.form = {
  927. name: res.Data.name, // 方名
  928. efficacy: res.Data.effect, // 功效
  929. doseType: res.Data.curetype, //剂型
  930. cmName: res.Data.diseasename, // 中医病名
  931. cmNameID: res.Data.diseaseid, // 中医病名id
  932. cardType: res.Data.symptomname, // 证型
  933. cardTypeID: res.Data.symptomid, // 证型id
  934. solution: res.Data.solution, // 方解
  935. cMedType: res.Data.prescriptiontype, // 中药类型
  936. experts: res.Data.expert, // 专家
  937. titles: res.Data.experttitle, // 专家头衔
  938. switch: res.Data.isupdate == 0 ? true : false // 修改限制
  939. };
  940. this.getCCardType(this.form.cmNameID);
  941. this.totalTableD = [];
  942. res.Data.prescriptionDetailVos.forEach((item, index) => {
  943. if (item.drugname) {
  944. let obj = {
  945. id: index,
  946. name: item.drugname,
  947. spec: item.specification, // 规格
  948. dose: item.dose, // 剂量
  949. unit: item.unit, // 单位
  950. // usage: item.usagestr, // 用法
  951. usage: item.usagestr,
  952. // price: item.lsjg,
  953. price: 0,
  954. total: 0,
  955. inventory: 0, // 库存
  956. key: "",
  957. search_i: 0,
  958. medid: item.drugid, // 药品id
  959. originname: "", // 产地名称
  960. showSearch: false,
  961. usageList: []
  962. };
  963. this.totalTableD.push(obj);
  964. }
  965. this.totalTableD.filter((item, index) => {
  966. if (item.usageList.length == 0) {
  967. this.getSelectType("中药药品用法", index, "detail");
  968. }
  969. return (item.id = index + 1);
  970. });
  971. this.tableData = this.totalTableD.filter((item, index) => {
  972. return item.id % 2 != 0;
  973. });
  974. this.tableData1 = this.totalTableD.filter((item, index) => {
  975. return item.id % 2 == 0;
  976. });
  977. });
  978. }
  979. },
  980. // 修改专家经验
  981. async editExperince() {
  982. let prescriptionDetailVos = [];
  983. this.totalTableD.forEach((item, index) => {
  984. if (item.name) {
  985. let obj = {
  986. dose: item.dose,
  987. drugid: item.medid,
  988. drugname: item.name,
  989. seqn: item.id,
  990. specification: item.spec,
  991. unit: item.unit,
  992. usagestr: item.usage
  993. };
  994. prescriptionDetailVos.push(obj);
  995. }
  996. });
  997. let params = {
  998. curetype: this.form.doseType,
  999. diseaseid: this.form.cmNameID,
  1000. diseasename: this.form.cmName,
  1001. effect: this.form.efficacy,
  1002. expert: this.form.experts,
  1003. experttitle: this.form.titles,
  1004. isupdate: this.form.switch ? 0 : 1,
  1005. name: this.form.name,
  1006. pharmacyid: this.pharmacyID,
  1007. prescriptiontype: this.form.cMedType,
  1008. solution: this.form.solution,
  1009. symptomid: this.form.cardTypeID,
  1010. symptomname: this.form.cardType,
  1011. prescriptionDetailVos,
  1012. pid: this.$route.query.pid
  1013. };
  1014. let res = await editExperince(params);
  1015. if (res.ResultCode == 0) {
  1016. this.$message({
  1017. type: "success",
  1018. message: "修改成功",
  1019. showClose: true
  1020. });
  1021. setTimeout(() => {
  1022. this.$router.back();
  1023. }, 2000);
  1024. } else {
  1025. this.$message({
  1026. type: "error",
  1027. message: res.ResultInfo,
  1028. showClose: true
  1029. });
  1030. }
  1031. },
  1032. // 添加专家经验
  1033. async addExperince() {
  1034. let prescriptionDetailVos = [];
  1035. this.totalTableD.forEach((item, index) => {
  1036. if (item.name) {
  1037. let obj = {
  1038. dose: item.dose,
  1039. drugid: item.medid,
  1040. drugname: item.name,
  1041. seqn: item.id,
  1042. specification: item.spec,
  1043. unit: item.unit,
  1044. usagestr: item.usage
  1045. };
  1046. prescriptionDetailVos.push(obj);
  1047. }
  1048. });
  1049. let params = {
  1050. curetype: this.form.doseType,
  1051. diseaseid: this.form.cmNameID,
  1052. diseasename: this.form.cmName,
  1053. effect: this.form.efficacy,
  1054. expert: this.form.experts,
  1055. experttitle: this.form.titles,
  1056. isupdate: this.form.switch ? 0 : 1,
  1057. name: this.form.name,
  1058. pharmacyid: this.pharmacyID,
  1059. prescriptiontype: this.form.cMedType,
  1060. solution: this.form.solution,
  1061. symptomid: this.form.cardTypeID,
  1062. symptomname: this.form.cardType,
  1063. prescriptionDetailVos
  1064. };
  1065. let res = await addExperince(params);
  1066. if (res.ResultCode == 0) {
  1067. this.$message({
  1068. type: "success",
  1069. message: "保存成功",
  1070. showClose: true
  1071. });
  1072. setTimeout(() => {
  1073. this.$router.back();
  1074. }, 2000);
  1075. } else {
  1076. this.$message({
  1077. type: "error",
  1078. message: res.ResultInfo,
  1079. showClose: true
  1080. });
  1081. }
  1082. },
  1083. // 通过中药类型获取药房id
  1084. async getPharmacyID() {
  1085. let res = await getPharmacyID({
  1086. type: this.form.cMedType
  1087. });
  1088. if (res.ResultCode == 0) {
  1089. if (res.ResultInfo == "") {
  1090. this.$message({
  1091. showClose: true,
  1092. message: "当前类型无法开药,请切换类型",
  1093. type: "error"
  1094. });
  1095. return;
  1096. }
  1097. this.pharmacyID = res.ResultInfo;
  1098. }
  1099. },
  1100. // 获取中医病名数据
  1101. async getCDiseaseName(key, serchtype = "") {
  1102. let params = {
  1103. pageid: 1,
  1104. pagesize: 9999,
  1105. serchtype,
  1106. keyword: key
  1107. };
  1108. let res = await getCDiseaseName(params);
  1109. if (res.code == 0) {
  1110. this.cmNameList = res.data.diseases;
  1111. }
  1112. },
  1113. // 主诊断证型搜索
  1114. async searchZhengxing(key, cb) {
  1115. let pinyin = /^[A-Za-z]+$/g;
  1116. if (pinyin.test(key)) {
  1117. await this.getCCardType(this.form.cmNameID, "", key, "1");
  1118. } else {
  1119. await this.getCCardType(this.form.cmNameID, "", key, "");
  1120. }
  1121. if (this.cardTypeList.length > 0) {
  1122. let resault = [];
  1123. this.cardTypeList.forEach(item => {
  1124. let obj = {
  1125. value: item.symname,
  1126. id: item.symid,
  1127. therapys: item.therapys
  1128. };
  1129. resault.push(obj);
  1130. });
  1131. cb(resault);
  1132. } else {
  1133. cb([
  1134. {
  1135. value: "搜索不到数据"
  1136. }
  1137. ]);
  1138. }
  1139. },
  1140. // 获取中医证型
  1141. async getCCardType(id, index = "", key = "", serchtype = "") {
  1142. let params = {
  1143. pageid: 1,
  1144. pagesize: 9999,
  1145. disid: serchtype == 1 ? "" : id,
  1146. serchtype,
  1147. keyword: key
  1148. };
  1149. let res = await getCCardType(params);
  1150. if (res.code == 0) {
  1151. if (index === "") {
  1152. this.cardTypeList = res.data.sysptoms;
  1153. }
  1154. }
  1155. },
  1156. // 切换中药类型时 切换 药房 获取 药品里面有没有这条数据
  1157. async changePharmacy(type) {
  1158. let drugIds = [];
  1159. this.totalTableD.forEach(item => {
  1160. if (item.name) {
  1161. let idDose = item.medid + "&" + item.dose;
  1162. // drugIds.push(item.medid)
  1163. drugIds.push(idDose);
  1164. }
  1165. });
  1166. let pharmacyName = "";
  1167. let type1 = 0;
  1168. this.pharmacyList.forEach(item => {
  1169. if (item.pid == this.pharmacyID) {
  1170. pharmacyName = item.pharmacyName;
  1171. }
  1172. });
  1173. if (this.form.cMedType == 0) {
  1174. if (pharmacyName.indexOf("饮片") != -1) {
  1175. type1 = 0;
  1176. } else if (pharmacyName.indexOf("颗粒") != -1) {
  1177. type1 = 1;
  1178. }
  1179. } else {
  1180. if (pharmacyName.indexOf("饮片") != -1) {
  1181. type1 = 2;
  1182. } else if (pharmacyName.indexOf("颗粒") != -1) {
  1183. type1 = 3;
  1184. }
  1185. }
  1186. let params = {
  1187. type: type1,
  1188. pharmacyid: this.pharmacyID,
  1189. drugIds,
  1190. preType: "",
  1191. oldType: type
  1192. };
  1193. let res = await changePharmacy(params);
  1194. if (res.ResultCode == 0) {
  1195. this.totalTableD.forEach((item1, index1) => {
  1196. if (item1.name) {
  1197. res.Data.forEach((item, index) => {
  1198. if (item == item1.medid) {
  1199. item1.color = "red";
  1200. }
  1201. // console.log(item instanceof Object);
  1202. if (item instanceof Object && item.oldYpid == item1.medid) {
  1203. item1.id = 2;
  1204. item1.name = item.ypmc;
  1205. item1.spec = item.gg; // 规格
  1206. item1.dose = item.dose; // 剂量
  1207. item1.unit = item.dw; // 单位
  1208. // usage: item.usagestr, // 用法
  1209. item1.usage = "";
  1210. item1.price = item.lsjg;
  1211. item1.total = 0;
  1212. item1.inventory = item.kc; // 库存
  1213. item1.key = "";
  1214. item1.search_i = index;
  1215. item1.medid = item.pid; // 药品id
  1216. item1.originname = item.cdmc; // 产地名称
  1217. item1.showSearch = false;
  1218. item1.color = "#000";
  1219. }
  1220. this.$set(this.totalTableD, index1, item1);
  1221. });
  1222. }
  1223. });
  1224. this.totalTableD.filter((item, index) => {
  1225. this.getSelectType("中药药品用法", index);
  1226. return (item.id = index + 1);
  1227. });
  1228. this.totalTableD.filter((item, index) => {
  1229. return item.id % 2 != 0;
  1230. });
  1231. this.totalTableD.filter((item, index) => {
  1232. return item.id % 2 == 0;
  1233. });
  1234. // this.form.lastType = this.form.cMedType // 存储这一次的 药房类型
  1235. this.form.lastType = type1;
  1236. // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD);
  1237. }
  1238. },
  1239. /*-----------表格处理事件---------*/
  1240. usageC(e, scope) {
  1241. let totalData = this.totalTableD;
  1242. this.totalTableD[scope.row.id - 1].usage = e;
  1243. this.tableData = totalData.filter((item, index) => {
  1244. return item.id % 2 != 0;
  1245. });
  1246. this.tableData1 = totalData.filter((item, index) => {
  1247. return item.id % 2 == 0;
  1248. });
  1249. },
  1250. // 输入剂量计算 当前药品总价格
  1251. countDoseMoney(e, scope) {
  1252. let totalData = this.totalTableD;
  1253. let price = this.totalTableD[scope.row.id - 1].price;
  1254. this.totalTableD[scope.row.id - 1].dose = e;
  1255. let dose = this.totalTableD[scope.row.id - 1].dose;
  1256. let total = 0;
  1257. // 计算方式2
  1258. if (this.countWay == "2") {
  1259. total = (Number(price) * Number(dose)).toFixed(2);
  1260. } else {
  1261. total = Number(price) * Number(dose);
  1262. }
  1263. this.totalTableD[scope.row.id - 1].total = total;
  1264. this.tableData = totalData.filter((item, index) => {
  1265. return item.id % 2 != 0;
  1266. });
  1267. this.tableData1 = totalData.filter((item, index) => {
  1268. return item.id % 2 == 0;
  1269. });
  1270. },
  1271. doseEnter(scope) {
  1272. if (scope.row.id == this.totalTableD.length - 1) {
  1273. // console.log(document.querySelectorAll('#searchD' + (scope.row.id + 1)), '啦啦啦')
  1274. document.querySelectorAll("#searchD" + (scope.row.id + 1))[1].focus();
  1275. } else {
  1276. try {
  1277. this.totalTableD.forEach(item => {
  1278. if (item.name && !item.dose && scope.row.id < item.id) {
  1279. document.querySelectorAll("#dose" + item.id)[0].focus();
  1280. throw Error();
  1281. }
  1282. if (!item.name) {
  1283. // console.log(document.querySelectorAll('#searchD' + item.id), '啦啦啦')
  1284. document.querySelectorAll("#searchD" + item.id)[1].focus();
  1285. throw Error();
  1286. }
  1287. });
  1288. } catch (error) {}
  1289. }
  1290. },
  1291. // 修改剂数
  1292. doseNumC() {
  1293. let doseNum = this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum;
  1294. this.countNowRecipeMoney();
  1295. },
  1296. // 表一和表二 数据添加
  1297. addDis1(scope) {
  1298. let totalData = this.totalTableD;
  1299. let index = scope.row.id;
  1300. // totalData[index + 1].id && totalData[index + 1].name
  1301. if (index != totalData.length - 2) {
  1302. // 插入到 数据中间
  1303. let data = totalData.splice(scope.row.id);
  1304. totalData.push({
  1305. id: 2,
  1306. drugList: [],
  1307. page: 1,
  1308. loadMore: true,
  1309. usageList: [],
  1310. showSearch: false,
  1311. key: "",
  1312. search_i: 0
  1313. });
  1314. totalData = totalData.concat(data);
  1315. // this.totalTableD = totalData;
  1316. } else if (totalData[index + 1].id && !totalData[index + 1].name) {
  1317. totalData.push({
  1318. id: 2,
  1319. drugList: [],
  1320. page: 1,
  1321. loadMore: true,
  1322. usageList: [],
  1323. showSearch: false,
  1324. key: "",
  1325. search_i: 0
  1326. });
  1327. }
  1328. totalData.filter((item, index1) => {
  1329. if (item.usageList.length == 0) {
  1330. this.getSelectType("中药药品用法", index);
  1331. }
  1332. return (item.id = index1 + 1);
  1333. });
  1334. this.totalTableD = totalData;
  1335. this.tableData = totalData.filter((item, index) => {
  1336. return item.id % 2 != 0;
  1337. });
  1338. this.tableData1 = totalData.filter((item, index) => {
  1339. return item.id % 2 == 0;
  1340. });
  1341. setTimeout(() => {
  1342. if (scope.row.id == this.totalTableD.length - 1) {
  1343. document.querySelectorAll("#searchD" + (scope.row.id + 1))[0].focus();
  1344. } else {
  1345. try {
  1346. this.totalTableD.forEach(item => {
  1347. if (!item.name) {
  1348. // console.log(document.querySelectorAll('#searchD' + item.id), '啦啦啦')
  1349. document.querySelectorAll("#searchD" + item.id)[0].focus();
  1350. throw Error();
  1351. }
  1352. });
  1353. } catch (error) {}
  1354. }
  1355. }, 500);
  1356. },
  1357. // 表一 和表二 查看药品数据
  1358. findDrug(scope) {
  1359. this.getDrugDetail(scope.row.medid);
  1360. },
  1361. // 表一和表二 数据删除
  1362. deleteDis1(scope) {
  1363. let totalData = this.totalTableD;
  1364. let index = scope.row.id - 1;
  1365. this.totalTableD.splice(index, 1);
  1366. totalData.filter((item, index) => {
  1367. // 调用 父级合理用药接口
  1368. // father.getRationalMed(item.medid)
  1369. return (item.id = index + 1);
  1370. });
  1371. this.tableData = totalData.filter((item, index) => {
  1372. return item.id % 2 != 0;
  1373. });
  1374. this.tableData1 = totalData.filter((item, index) => {
  1375. return item.id % 2 == 0;
  1376. });
  1377. },
  1378. clickName(scope) {
  1379. if (this.type == "find") return;
  1380. // 隐藏滚动条
  1381. if (scope.row.id % 2 == 0) {
  1382. document.getElementsByClassName(
  1383. "el-table__body-wrapper"
  1384. )[1].style.overflow = "hidden";
  1385. } else {
  1386. document.getElementsByClassName(
  1387. "el-table__body-wrapper"
  1388. )[0].style.overflow = "hidden";
  1389. }
  1390. this.totalTableD[scope.row.id - 1].showSearch = !this.totalTableD[
  1391. scope.row.id - 1
  1392. ].showSearch;
  1393. this.totalTableD[scope.row.id - 1].key = scope.row.name;
  1394. this.totalTableD[scope.row.id - 1].search_i = 0;
  1395. debounce(this.getTableDrug(scope.row.key, 1, scope.row.id - 1), 10000);
  1396. setTimeout(() => {
  1397. console.log(document.querySelectorAll("#searchD" + scope.row.id));
  1398. document.querySelectorAll("#searchD" + scope.row.id)[1].focus();
  1399. }, 500);
  1400. },
  1401. // 合并表一 表二
  1402. arraySpanMethod1({ row, column, rowIndex, columnIndex }) {
  1403. // if (!row.name) {
  1404. // // document.getElementById('table1')
  1405. // return [1, 8];
  1406. // }
  1407. },
  1408. // 输入框获取 药品列表
  1409. searchDrug(e, scope) {
  1410. if (!this.pharmacyID) {
  1411. this.$message({
  1412. type: "error",
  1413. message: "请先选择药房",
  1414. showClose: true
  1415. });
  1416. return;
  1417. }
  1418. if (!this.form.cMedType) {
  1419. this.$message({
  1420. type: "error",
  1421. message: "请先选择类型",
  1422. showClose: true
  1423. });
  1424. return;
  1425. }
  1426. // 隐藏滚动条
  1427. if (scope.row.id % 2 == 0) {
  1428. document.getElementsByClassName(
  1429. "el-table__body-wrapper"
  1430. )[1].style.overflow = "hidden";
  1431. } else {
  1432. document.getElementsByClassName(
  1433. "el-table__body-wrapper"
  1434. )[0].style.overflow = "hidden";
  1435. }
  1436. this.totalTableD[scope.row.id - 1].key = e;
  1437. let ids = document.querySelectorAll("#operate2");
  1438. ids.forEach((item, index) => {
  1439. item.style["z-index"] = "auto";
  1440. });
  1441. // if (e != '') {
  1442. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1443. // scope.row.id - 1
  1444. // ].showSearch = true
  1445. // } else {
  1446. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1447. // scope.row.id - 1
  1448. // ].showSearch = false
  1449. // }
  1450. this.tableData = this.totalTableD.filter((item, index) => {
  1451. return item.id % 2 != 0;
  1452. });
  1453. this.tableData1 = this.totalTableD.filter((item, index) => {
  1454. return item.id % 2 == 0;
  1455. });
  1456. this.index = scope.row.id - 1;
  1457. // this.getTableDrug(scope.row.key, 1, scope.row.id - 1)
  1458. debounce(this.getTableDrug(scope.row.key, 1, scope.row.id - 1), 10000);
  1459. },
  1460. load() {
  1461. console.log("进入");
  1462. let key = this.totalTableD[this.index].key;
  1463. let page = this.totalTableD[this.index].page;
  1464. let loadMore = this.totalTableD[this.index].loadMore;
  1465. if (loadMore) {
  1466. page += 1;
  1467. }
  1468. // if (!loadMore == 1) return;
  1469. this.getTableDrug(key, page, this.index, loadMore);
  1470. },
  1471. drugBlur(e, scope) {
  1472. // 失去焦点 释放滚动条
  1473. if (scope.row.id % 2 == 0) {
  1474. document.getElementsByClassName(
  1475. "el-table__body-wrapper"
  1476. )[1].style.overflow = "auto";
  1477. } else {
  1478. document.getElementsByClassName(
  1479. "el-table__body-wrapper"
  1480. )[0].style.overflow = "auto";
  1481. }
  1482. setTimeout(() => {
  1483. this.totalTableD[scope.row.id - 1].key = "";
  1484. let ids = document.querySelectorAll("#operate2");
  1485. ids.forEach((item, index) => {
  1486. item.style["z-index"] = "99";
  1487. });
  1488. this.totalTableD.forEach(item => {
  1489. item.drugList = [];
  1490. });
  1491. this.tableData = this.totalTableD.filter((item, index) => {
  1492. return item.id % 2 != 0;
  1493. });
  1494. this.tableData1 = this.totalTableD.filter((item, index) => {
  1495. return item.id % 2 == 0;
  1496. });
  1497. }, 500);
  1498. },
  1499. drugBlur1(e, scope) {
  1500. // 失去焦点 展示滚动条
  1501. if (scope.row.id % 2 == 0) {
  1502. document.getElementsByClassName(
  1503. "el-table__body-wrapper"
  1504. )[1].style.overflow = "auto";
  1505. } else {
  1506. document.getElementsByClassName(
  1507. "el-table__body-wrapper"
  1508. )[0].style.overflow = "auto";
  1509. }
  1510. setTimeout(() => {
  1511. this.totalTableD[scope.row.id - 1].key = "";
  1512. this.totalTableD[scope.row.id - 1].showSearch = false;
  1513. let ids = document.querySelectorAll("#operate2");
  1514. ids.forEach((item, index) => {
  1515. item.style["z-index"] = "99";
  1516. });
  1517. this.totalTableD.forEach(item => {
  1518. item.drugList = [];
  1519. });
  1520. this.tableData = this.totalTableD.filter((item, index) => {
  1521. return item.id % 2 != 0;
  1522. });
  1523. this.tableData1 = this.totalTableD.filter((item, index) => {
  1524. return item.id % 2 == 0;
  1525. });
  1526. }, 500);
  1527. },
  1528. // 表一 选中药品
  1529. chooseDis1(scope, index, item) {
  1530. let totalData = this.totalTableD;
  1531. let obj = {
  1532. color: "#000",
  1533. id: scope.row.id,
  1534. name: item.ypmc,
  1535. spec: item.gg, // 规格
  1536. dose: "", // 剂量
  1537. unit: item.dw, // 单位
  1538. // usage: item.usagestr, // 用法
  1539. usage: "",
  1540. // price: item.lsjg,
  1541. price: item.price,
  1542. total: 0,
  1543. inventory: item.kc, // 库存
  1544. key: "",
  1545. search_i: index,
  1546. medid: item.pid, // 药品id
  1547. originname: item.cdmc, // 产地名称
  1548. showSearch: false
  1549. };
  1550. Object.assign(totalData[scope.row.id - 1], obj);
  1551. if (scope.row.id == totalData.length) {
  1552. totalData.push({
  1553. id: 2,
  1554. drugList: [],
  1555. page: 1,
  1556. loadMore: true,
  1557. usageList: [],
  1558. search_i: 0,
  1559. showSearch: false
  1560. });
  1561. }
  1562. this.totalTableD = totalData;
  1563. totalData.filter((item, index) => {
  1564. if (item.usageList.length == 0) {
  1565. this.getSelectType("中药药品用法", index);
  1566. }
  1567. return (item.id = index + 1);
  1568. });
  1569. this.tableData = totalData.filter((item, index) => {
  1570. return item.id % 2 != 0;
  1571. });
  1572. this.tableData1 = totalData.filter((item, index) => {
  1573. return item.id % 2 == 0;
  1574. });
  1575. setTimeout(() => {
  1576. let ids = document.querySelectorAll("#dose" + scope.row.id);
  1577. document.querySelectorAll("#dose" + scope.row.id)[0].focus();
  1578. }, 500);
  1579. },
  1580. // 监听键盘事件
  1581. drugDown(e, scope) {
  1582. let totalData = this.totalTableD;
  1583. // 如果到最后一个 判断是否需要分页
  1584. if (
  1585. totalData[scope.row.id - 1].search_i ==
  1586. totalData[scope.row.id - 1].drugList.length - 1
  1587. ) {
  1588. // totalData[scope.$index].search_i
  1589. if (totalData[scope.row.id - 1].loadMore) {
  1590. totalData[scope.row.id - 1].page += 1;
  1591. this.getTableDrug(
  1592. totalData[scope.row.id - 1].key,
  1593. totalData[scope.row.id - 1].page,
  1594. scope.row.id - 1,
  1595. totalData[scope.row.id - 1].loadMore
  1596. );
  1597. totalData[scope.row.id - 1].search_i += 1;
  1598. }
  1599. } else {
  1600. totalData[scope.row.id - 1].search_i += 1;
  1601. }
  1602. // 表格 fixed 时 去 下标 为 1
  1603. if (totalData[scope.row.id - 1].drugList.length > 5) {
  1604. document.querySelectorAll(
  1605. `#infiniteList${scope.row.id}`
  1606. )[1].scrollTop += 36;
  1607. console.log(
  1608. document.querySelectorAll(`#infiniteList${scope.row.id}`)[1]
  1609. .scrollTop,
  1610. "top"
  1611. );
  1612. }
  1613. this.totalTableD = totalData;
  1614. totalData.filter((item, index) => {
  1615. if (item.usageList.length == 0) {
  1616. this.getSelectType("中药药品用法", index);
  1617. }
  1618. return (item.id = index + 1);
  1619. });
  1620. this.tableData = totalData.filter((item, index) => {
  1621. return item.id % 2 != 0;
  1622. });
  1623. this.tableData1 = totalData.filter((item, index) => {
  1624. return item.id % 2 == 0;
  1625. });
  1626. this.$forceUpdate();
  1627. },
  1628. drugUp(e, scope) {
  1629. let totalData = this.totalTableD;
  1630. // 如果到最后一个 判断是否需要分页
  1631. if (totalData[scope.row.id - 1].search_i == 0) {
  1632. // totalData[scope.$index].search_i
  1633. } else {
  1634. totalData[scope.row.id - 1].search_i -= 1;
  1635. }
  1636. if (
  1637. document.querySelectorAll(`#infiniteList${scope.row.id}`)[1].scrollTop >
  1638. 0
  1639. ) {
  1640. document.querySelectorAll(
  1641. `#infiniteList${scope.row.id}`
  1642. )[1].scrollTop -= 36;
  1643. }
  1644. this.totalTableD = totalData;
  1645. totalData.filter((item, index) => {
  1646. // this.getSelectType('中药药品用法', index)
  1647. if (item.usageList.length == 0) {
  1648. this.getSelectType("中药药品用法", index);
  1649. }
  1650. return (item.id = index + 1);
  1651. });
  1652. this.tableData = totalData.filter((item, index) => {
  1653. return item.id % 2 != 0;
  1654. });
  1655. this.tableData1 = totalData.filter((item, index) => {
  1656. return item.id % 2 == 0;
  1657. });
  1658. },
  1659. drugEnter(scope) {
  1660. this.chooseDis1(
  1661. scope,
  1662. scope.row.search_i,
  1663. scope.row.drugList[scope.row.search_i]
  1664. );
  1665. },
  1666. // 获取表格药品列表
  1667. async getTableDrug(key, page, index, load = true) {
  1668. if (!load) return;
  1669. let pharmacyName = "";
  1670. let type1 = 0;
  1671. this.pharmacyList.forEach(item => {
  1672. if (item.pid == this.pharmacyID) {
  1673. pharmacyName = item.pharmacyName;
  1674. }
  1675. });
  1676. if (this.form.cMedType == 0) {
  1677. if (pharmacyName.indexOf("饮片") != -1) {
  1678. type1 = 0;
  1679. } else if (pharmacyName.indexOf("颗粒") != -1) {
  1680. type1 = 1;
  1681. }
  1682. } else {
  1683. if (pharmacyName.indexOf("饮片") != -1) {
  1684. type1 = 2;
  1685. } else if (pharmacyName.indexOf("颗粒") != -1) {
  1686. type1 = 3;
  1687. }
  1688. }
  1689. let params = {
  1690. key: key,
  1691. limit: 5,
  1692. page: page,
  1693. type: type1, //this.form.cMedType,
  1694. pharmacyid: this.pharmacyID
  1695. };
  1696. let res = await getTableDrug(params);
  1697. if (res.ResultCode == 0) {
  1698. // 计算方式3
  1699. if (this.countWay == "3") {
  1700. res.Data.Items.filter(item => {
  1701. return (item.price = Number(item.price).toFixed(2));
  1702. });
  1703. }
  1704. if (page <= res.Data.TotalPageCount) {
  1705. if (page == 1) {
  1706. this.totalTableD[index].drugList = res.Data.Items;
  1707. this.$forceUpdate();
  1708. } else {
  1709. this.totalTableD[index].drugList = [
  1710. ...this.totalTableD[index].drugList,
  1711. ...res.Data.Items
  1712. ];
  1713. this.totalTableD[index].page += 1;
  1714. }
  1715. if (
  1716. this.totalTableD[index].drugList.length == res.Data.TotalRecordCount
  1717. ) {
  1718. // this.totalTableD[index].loadMore = false
  1719. }
  1720. this.totalTableD.filter((item, index) => {
  1721. return (item.id = index + 1);
  1722. });
  1723. this.tableData = this.totalTableD.filter((item, index) => {
  1724. return item.id % 2 != 0;
  1725. });
  1726. this.tableData1 = this.totalTableD.filter((item, index) => {
  1727. return item.id % 2 == 0;
  1728. });
  1729. } else {
  1730. this.totalTableD[index].loadMore = false;
  1731. }
  1732. }
  1733. },
  1734. // 根据表格获取数据类型
  1735. async getSelectType(data, index, type = "") {
  1736. let res = await getSelectType(data);
  1737. if (data == "中药药品用法") {
  1738. if (this.totalTableD[index].usage) {
  1739. let isSame = false;
  1740. if (!type) {
  1741. res.Data.forEach(item => {
  1742. if (item.value === this.totalTableD[index].usage) {
  1743. this.totalTableD[index].usage = item.key;
  1744. } else {
  1745. this.totalTableD[index].usage = "";
  1746. }
  1747. });
  1748. } else {
  1749. res.Data.forEach(item => {
  1750. if (item.value === this.totalTableD[index].usage) {
  1751. this.totalTableD[index].usage = item.key;
  1752. }
  1753. });
  1754. }
  1755. }
  1756. this.totalTableD[index].usageList = res.Data;
  1757. } else if (data == "剂型") {
  1758. this.doseTypeList = res.Data;
  1759. }
  1760. }
  1761. /*-----------表格处理事件---------*/
  1762. },
  1763. filters: {
  1764. formatTotal(val) {
  1765. if (val == 0) return val;
  1766. // console.log(val, 'val');
  1767. let v = String(val).split(".");
  1768. if (v[1].length > 3) {
  1769. return val.toFixed(3);
  1770. } else {
  1771. return val;
  1772. }
  1773. }
  1774. }
  1775. };
  1776. </script>
  1777. <style lang="scss" scoped>
  1778. @import "../../style/common.scss";
  1779. .accordEdit {
  1780. padding: 33px 46px;
  1781. background: #ffffff;
  1782. border-radius: 5px;
  1783. .back {
  1784. width: 74px;
  1785. height: 36px;
  1786. background: #5386f6;
  1787. border-radius: 4px;
  1788. font-size: 14px;
  1789. font-family: PingFang SC;
  1790. font-weight: 400;
  1791. color: #ffffff;
  1792. margin-bottom: 49px;
  1793. cursor: pointer;
  1794. }
  1795. .item {
  1796. font-size: 16px;
  1797. font-family: PingFang SC;
  1798. font-weight: 400;
  1799. color: #333;
  1800. margin-right: 62px;
  1801. margin-bottom: 20px;
  1802. span {
  1803. color: #ff3a3a;
  1804. }
  1805. .input {
  1806. width: 260px;
  1807. }
  1808. }
  1809. .bottom {
  1810. .title {
  1811. margin-bottom: 15px;
  1812. }
  1813. }
  1814. .save {
  1815. width: 74px;
  1816. height: 36px;
  1817. background: #ffae45;
  1818. border-radius: 4px;
  1819. font-size: 14px;
  1820. font-family: PingFang SC;
  1821. font-weight: 400;
  1822. color: #ffffff;
  1823. cursor: pointer;
  1824. }
  1825. }
  1826. .table-show {
  1827. width: 100%;
  1828. margin: 0 auto;
  1829. // background: #5386F6;
  1830. // overflow: hidden;
  1831. .table-left-body {
  1832. width: 49.8%;
  1833. position: relative;
  1834. perspective: 100px;
  1835. padding-bottom: 53px;
  1836. }
  1837. .table-left {
  1838. width: 100%;
  1839. overflow-y: auto;
  1840. border: 1px solid #dedede;
  1841. box-sizing: border-box;
  1842. .table-l-hader {
  1843. white-space: nowrap;
  1844. div {
  1845. display: inline-block;
  1846. // padding: 15px 10px;
  1847. background: #f3fffb;
  1848. text-align: center;
  1849. height: 48px;
  1850. line-height: 48px;
  1851. border: 1px solid #dedede;
  1852. border-bottom: 0 !important;
  1853. // border-top: 0 !important;
  1854. }
  1855. .med-name {
  1856. margin-left: 50px;
  1857. }
  1858. .kucun {
  1859. padding-right: 120px;
  1860. }
  1861. .fixed-r {
  1862. position: fixed;
  1863. right: 0;
  1864. }
  1865. .fixed-left {
  1866. position: fixed;
  1867. left: 0;
  1868. }
  1869. }
  1870. .table-l-item {
  1871. white-space: nowrap;
  1872. .bg-green {
  1873. .div1 {
  1874. background: #f3fffb;
  1875. border: 1px solid #dedede;
  1876. }
  1877. }
  1878. .div1 {
  1879. display: inline-block;
  1880. // padding: 15px 10px;
  1881. background: #ffffff;
  1882. text-align: center;
  1883. height: 53px;
  1884. line-height: 53px;
  1885. border: 1px solid #dedede;
  1886. z-index: 9999;
  1887. border-top: 0 !important;
  1888. }
  1889. .med-name {
  1890. margin-left: 50px;
  1891. }
  1892. .kucun {
  1893. padding-right: 120px;
  1894. border-right: 1px solid #dedede;
  1895. }
  1896. .fixed-r {
  1897. position: fixed;
  1898. right: 0;
  1899. }
  1900. .fixed-left {
  1901. position: fixed;
  1902. left: 0;
  1903. // border-left: 1px solid #DEDEDE;
  1904. }
  1905. .no-data {
  1906. width: 100%;
  1907. box-sizing: border-box;
  1908. // border-top: 1px solid #DEDEDE;
  1909. position: relative;
  1910. left: 0;
  1911. right: 0;
  1912. bottom: 0px;
  1913. // float: left;
  1914. }
  1915. }
  1916. }
  1917. }
  1918. .operate {
  1919. width: 100%;
  1920. height: 100%;
  1921. display: flex;
  1922. align-items: center;
  1923. justify-content: space-around;
  1924. img {
  1925. width: 16px;
  1926. }
  1927. }
  1928. .operate2 {
  1929. position: absolute;
  1930. z-index: 99;
  1931. }
  1932. .operate1 {
  1933. position: fixed;
  1934. width: 50px;
  1935. // background: red;
  1936. right: 15px;
  1937. // top: 63px;
  1938. z-index: 99999 !important;
  1939. text-align: right;
  1940. img {
  1941. width: 16px;
  1942. }
  1943. }
  1944. .bottom-input {
  1945. background: #fff;
  1946. padding: 12.5px 30px 12.5px 52px;
  1947. position: relative;
  1948. // z-index: 999;
  1949. // perspective: 100px;
  1950. .div {
  1951. width: 154px;
  1952. }
  1953. .table-choose {
  1954. z-index: 9999;
  1955. width: 332px;
  1956. height: 221px;
  1957. background: #ffffff;
  1958. border: 2px solid #d8d8d8;
  1959. position: fixed;
  1960. top: 18px;
  1961. left: 200px;
  1962. overflow: auto;
  1963. .table-choose-h {
  1964. background: #f3fffb;
  1965. div {
  1966. height: 36px;
  1967. width: 73px;
  1968. }
  1969. div:first-child {
  1970. width: 115px;
  1971. }
  1972. }
  1973. .t-c-b {
  1974. cursor: pointer;
  1975. .td {
  1976. background: #f3fffb;
  1977. }
  1978. p {
  1979. border: 1px solid #ededed;
  1980. height: 36px;
  1981. width: 73px;
  1982. // flex: 1;
  1983. box-sizing: border-box;
  1984. }
  1985. p:first-child {
  1986. width: 115px;
  1987. }
  1988. }
  1989. }
  1990. }
  1991. .input::v-deep .el-select {
  1992. width: 100%;
  1993. box-sizing: border-box;
  1994. }
  1995. .table-show::v-deep .el-table .cell {
  1996. text-align: center;
  1997. }
  1998. .table-show ::v-deep .el-select input {
  1999. padding: 0 15px 0 5px;
  2000. }
  2001. .t_dose::v-deep .el-input__inner {
  2002. // text-align: left;
  2003. padding: 0 5px !important;
  2004. }
  2005. .table-choose3 {
  2006. z-index: 99999;
  2007. width: 332px;
  2008. height: 221px;
  2009. background: #ffffff;
  2010. border: 2px solid #d8d8d8;
  2011. // position: absolute;
  2012. position: fixed;
  2013. margin-top: 33px;
  2014. // left: -4px;
  2015. overflow: auto;
  2016. .table-choose-h {
  2017. background: #f3fffb;
  2018. div {
  2019. height: 36px;
  2020. width: 73px;
  2021. }
  2022. div:first-child {
  2023. width: 115px;
  2024. }
  2025. }
  2026. .t-c-b {
  2027. cursor: pointer;
  2028. height: 180px;
  2029. .td {
  2030. background: #f3fffb;
  2031. }
  2032. p {
  2033. border: 1px solid #ededed;
  2034. height: 36px;
  2035. width: 73px;
  2036. // flex: 1;
  2037. box-sizing: border-box;
  2038. }
  2039. p:first-child {
  2040. width: 115px;
  2041. }
  2042. }
  2043. }
  2044. .pre-detail {
  2045. margin: 20px 0;
  2046. }
  2047. .drug-body {
  2048. padding: 0 99px;
  2049. height: 600px;
  2050. overflow: auto;
  2051. .drug-item {
  2052. font-size: 16px;
  2053. font-family: PingFang SC;
  2054. font-weight: 400;
  2055. color: #333333;
  2056. margin-bottom: 20px;
  2057. span {
  2058. display: inline-block;
  2059. width: 100px;
  2060. text-align-last: justify;
  2061. }
  2062. div {
  2063. flex: 1;
  2064. img {
  2065. width: 126px;
  2066. height: 126px;
  2067. background: red;
  2068. margin-right: 32px;
  2069. }
  2070. span {
  2071. text-align-last: left;
  2072. }
  2073. }
  2074. .detail {
  2075. flex: 1;
  2076. .btns {
  2077. width: 80px;
  2078. height: 30px;
  2079. background: #5386f6;
  2080. border-radius: 2px 2px 2px 2px;
  2081. font-size: 14px;
  2082. font-family: PingFang SC;
  2083. font-weight: 400;
  2084. color: #ffffff;
  2085. cursor: pointer;
  2086. margin-bottom: 20px;
  2087. }
  2088. .drug-detail {
  2089. span {
  2090. text-align-last: left;
  2091. margin-right: 10px;
  2092. margin-bottom: 10px;
  2093. }
  2094. }
  2095. }
  2096. }
  2097. .drug-item1 {
  2098. font-size: 16px;
  2099. font-family: PingFang SC;
  2100. font-weight: 400;
  2101. color: #333333;
  2102. margin-bottom: 15px;
  2103. margin-right: 50px;
  2104. div {
  2105. flex: 1;
  2106. }
  2107. }
  2108. .mad-cy {
  2109. color: #5386f6;
  2110. font-weight: bold;
  2111. }
  2112. }
  2113. </style>