MedicineAccord copy.vue 91 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079
  1. <template>
  2. <div class="med-accord">
  3. <div class="table-container">
  4. <div class="t-con-header flex-vertical-between">
  5. <div class="t-con-radio flex-vertical-center-l" v-if="false">
  6. <span class="t-radio-title">选择药房:</span>
  7. <div class="t-radio-group">
  8. <el-select
  9. v-model="recipe_tabs[recipe_tabs_c].pharmacyID"
  10. :disabled="recipe_tabs[recipe_tabs_c].disable"
  11. placeholder="请选择"
  12. @change="changePharmacy(recipe_tabs[recipe_tabs_c].lastType)"
  13. >
  14. <el-option
  15. :label="item.pharmacyName"
  16. :value="item.pid"
  17. v-for="(item,index) in pharmacyList"
  18. :key="'b'+index"
  19. ></el-option>
  20. </el-select>
  21. </div>
  22. </div>
  23. <!-- @change="getPharmacyID" -->
  24. <div class="t-con-radio flex-vertical-center-l">
  25. <div class="t-radio-group">
  26. <el-radio-group
  27. v-model="recipe_tabs[recipe_tabs_c].radio"
  28. :disabled="recipe_tabs[recipe_tabs_c].disable"
  29. @change="changePharmacy(recipe_tabs[recipe_tabs_c].lastType)"
  30. >
  31. <el-radio
  32. :label="item.ptype"
  33. v-for="(item,index) in pharmacyTypes"
  34. :key="index"
  35. >{{item.name}}</el-radio>
  36. </el-radio-group>
  37. </div>
  38. </div>
  39. <!-- <div class="add-presc1 flex-center" @click="clearRecipe()">清空处方</div> -->
  40. </div>
  41. <!-- 表格 -->
  42. <div class="table-show flex-plane-t-between flex-wrap">
  43. <!-- 表一和表二 -->
  44. <div class="table-left-body">
  45. <div class="table-left" v-if="true">
  46. <el-table
  47. :data="recipe_tabs[recipe_tabs_c].tableData"
  48. style="width:100%;"
  49. :span-method="arraySpanMethod1"
  50. id="table1"
  51. >
  52. <el-table-column prop="id" label width="20">
  53. <template slot-scope="scope">
  54. <!-- width:110px -->
  55. <!-- v-model="scope.row.key" -->
  56. <div v-if="!scope.row.name" class="flex-vertical-between">
  57. <div style="width:80px;" class="operate2" id="operate2">
  58. <el-input
  59. :value="scope.row.key"
  60. :id="'searchD'+scope.row.id"
  61. size="mini"
  62. placeholder="请输入..."
  63. @input="searchDrug($event,scope)"
  64. @focus="drugFocus(scope)"
  65. @blur="drugBlur($event,scope)"
  66. @keydown.down.native="drugDown($event,scope)"
  67. @keydown.up.native="drugUp($event,scope)"
  68. @keydown.enter.native="drugEnter(scope)"
  69. :disabled="recipe_tabs[recipe_tabs_c].disable"
  70. ></el-input>
  71. <div
  72. class="table-choose3"
  73. v-if="scope.row.key"
  74. :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
  75. >
  76. <div class="table-choose-h flex-vertical-between">
  77. <div class="flex-center">药品名称</div>
  78. <div class="flex-center">规格</div>
  79. <div class="flex-center">产地</div>
  80. <div class="flex-center">单价</div>
  81. <div class="flex-center">库存</div>
  82. </div>
  83. <div
  84. class="t-c-b infinite-list"
  85. v-infinite-scroll="load"
  86. :infinite-scroll-immediate="false"
  87. :id="'infiniteList'+scope.row.id"
  88. :ref="'infiniteList'+scope.row.id"
  89. style="overflow:auto"
  90. >
  91. <div
  92. class="infinite-list-item flex-vertical-between"
  93. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  94. @click="chooseDis1(scope,index1,item1)"
  95. v-for="(item1,index1) in scope.row.drugList"
  96. :key="scope.row.id+'f'+index1"
  97. >
  98. <p class="flex-center">{{item1.ypmc}}</p>
  99. <p class="flex-center">{{item1.gg}}</p>
  100. <p class="flex-center">{{item1.cdmc}}</p>
  101. <p class="flex-center">{{item1.price}}</p>
  102. <p class="flex-center">{{item1.kc}}</p>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <!-- <div class="operate1"
  108. v-if="scope.row.id!==recipe_tabs[recipe_tabs_c].totalTableD.length && !scope.row.name">
  109. <img src="../assets/delete1.png" alt="" @click="deleteDis1(scope)" />
  110. </div>-->
  111. </div>
  112. <!-- -->
  113. <div v-else>{{scope.row.id}}</div>
  114. </template>
  115. </el-table-column>
  116. <el-table-column prop="name" label="药品名称" width="80">
  117. <template slot-scope="scope" v-if="scope.row.name">
  118. <div
  119. @click="clickName(scope)"
  120. v-if="!scope.row.showSearch"
  121. :style="{'color':scope.row.color?scope.row.color:''}"
  122. >{{scope.row.name}}</div>
  123. <div v-else class="flex-vertical-between">
  124. <div style="width:110px;">
  125. <el-input
  126. :value="scope.row.key"
  127. :id="'searchD'+scope.row.id"
  128. size="mini"
  129. :placeholder="scope.row.name"
  130. @input="searchDrug($event,scope)"
  131. @blur="drugBlur1($event,scope)"
  132. @keydown.down.native="drugDown($event,scope)"
  133. @keydown.up.native="drugUp($event,scope)"
  134. @keydown.enter.native="drugEnter(scope)"
  135. :disabled="recipe_tabs[recipe_tabs_c].disable"
  136. ></el-input>
  137. <!-- v-model="scope.row.key" -->
  138. <div
  139. class="table-choose3"
  140. v-if="scope.row.key"
  141. :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
  142. >
  143. <div class="table-choose-h flex-vertical-between">
  144. <div class="flex-center">药品名称</div>
  145. <div class="flex-center">规格</div>
  146. <div class="flex-center">产地</div>
  147. <div class="flex-center">单价</div>
  148. <div class="flex-center">库存</div>
  149. </div>
  150. <!-- -->
  151. <div
  152. class="t-c-b infinite-list"
  153. v-infinite-scroll="load"
  154. :infinite-scroll-immediate="false"
  155. :id="'infiniteList'+scope.row.id"
  156. :ref="'infiniteList'+scope.row.id"
  157. style="overflow:auto"
  158. v-if="scope.row.drugList.length>0"
  159. >
  160. <div
  161. class="infinite-list-item flex-vertical-between"
  162. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  163. @click="chooseDis1(scope,index1,item1)"
  164. v-for="(item1,index1) in scope.row.drugList"
  165. :key="scope.row.id+'g'+index1"
  166. >
  167. <p class="flex-center">{{item1.ypmc}}</p>
  168. <p class="flex-center">{{item1.gg}}</p>
  169. <p class="flex-center">{{item1.cdmc}}</p>
  170. <p class="flex-center">{{item1.price}}</p>
  171. <p class="flex-center">{{item1.kc}}</p>
  172. </div>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. </template>
  178. </el-table-column>
  179. <el-table-column prop="spec" label="规格" width="40"></el-table-column>
  180. <el-table-column prop="dose" label="剂量" width="40">
  181. <template slot-scope="scope" v-if="scope.row.name">
  182. <div class="t_dose">
  183. <el-input
  184. :value="scope.row.dose"
  185. size="mini"
  186. @blur="doseBlur(scope)"
  187. @focus="doseFocus(scope)"
  188. @input="countDoseMoney($event,scope)"
  189. :id="'dose'+scope.row.id"
  190. :disabled="recipe_tabs[recipe_tabs_c].disable"
  191. :placeholder="scope.row.oldDose?'原'+scope.row.oldDose+'克':''"
  192. @keydown.enter.native="doseEnter(scope)"
  193. ></el-input>
  194. <div
  195. class="dose-section"
  196. :style="{top:scope.$index==0?'':((scope.$index)*35)+'px'}"
  197. v-if="minDose && maxDose && doseId == scope.row.medid"
  198. >
  199. <span>{{minDose}}</span>~
  200. <span>{{maxDose}}</span>
  201. </div>
  202. </div>
  203. </template>
  204. </el-table-column>
  205. <el-table-column prop="unit" label="单位" width="40"></el-table-column>
  206. <!-- <el-table-column prop="inventory" label="库存" width="80">
  207. </el-table-column>-->
  208. <!-- width="80" -->
  209. <el-table-column prop="usage" label="用法">
  210. <template slot-scope="scope" v-if="scope.row.name">
  211. <el-select
  212. v-model="scope.row.usage"
  213. placeholder="请选择"
  214. size="mini"
  215. @change="usageC($event,scope)"
  216. :disabled="recipe_tabs[recipe_tabs_c].disable"
  217. >
  218. <el-option
  219. :label="item.value"
  220. :value="item.key"
  221. v-for="(item,index) in usageList"
  222. :key="scope.row.id+'h'+index"
  223. ></el-option>
  224. </el-select>
  225. </template>
  226. </el-table-column>
  227. <!-- <el-table-column prop="price" label="单价" width="50">
  228. </el-table-column>-->
  229. <el-table-column prop="total" label="小计" width="50">
  230. <template slot-scope="scope" v-if="scope.row.name">
  231. <div>{{scope.row.total | formatTotal}}</div>
  232. </template>
  233. </el-table-column>
  234. <el-table-column label="操作" width="64">
  235. <template slot-scope="scope">
  236. <div class="operate" v-if="scope.row.name">
  237. <div>
  238. <img
  239. src="../assets/add.png"
  240. alt
  241. @click="addDis1(scope)"
  242. v-if="!recipe_tabs[recipe_tabs_c].disable"
  243. />
  244. </div>
  245. <div>
  246. <img
  247. src="../assets/delete1.png"
  248. alt
  249. @click="deleteDis1(scope)"
  250. v-if="!recipe_tabs[recipe_tabs_c].disable"
  251. />
  252. </div>
  253. <div>
  254. <img src="../assets/find.png" alt @click="findDrug(scope)" />
  255. </div>
  256. </div>
  257. <div
  258. class="operate"
  259. v-else-if="scope.row.id==recipe_tabs[recipe_tabs_c].totalTableD.length && !scope.row.name"
  260. >
  261. <div style="opacity:0;">
  262. <img src="../assets/find.png" alt />
  263. </div>
  264. </div>
  265. <div v-else class="operate">
  266. <div v-if="scope.row.id!==recipe_tabs[recipe_tabs_c].totalTableD.length">
  267. <img
  268. src="../assets/delete1.png"
  269. alt
  270. @click="deleteDis1(scope)"
  271. v-if="!recipe_tabs[recipe_tabs_c].disable"
  272. />
  273. </div>
  274. </div>
  275. </template>
  276. </el-table-column>
  277. <div slot="empty"></div>
  278. </el-table>
  279. </div>
  280. </div>
  281. <div class="table-left-body">
  282. <div class="table-left" v-if="true">
  283. <el-table
  284. :data="recipe_tabs[recipe_tabs_c].tableData1"
  285. :span-method="arraySpanMethod1"
  286. id="table1"
  287. >
  288. <el-table-column prop="id" label width="20">
  289. <template slot-scope="scope">
  290. <!-- width:110px -->
  291. <!-- v-model="scope.row.key" -->
  292. <div v-if="!scope.row.name" class="flex-vertical-between">
  293. <div style="width:80px;" class="operate2" id="operate2">
  294. <el-input
  295. :value="scope.row.key"
  296. :id="'searchD'+scope.row.id"
  297. size="mini"
  298. placeholder="请输入..."
  299. @input="searchDrug($event,scope)"
  300. @focus="drugFocus(scope)"
  301. @blur="drugBlur($event,scope)"
  302. @keydown.down.native="drugDown($event,scope)"
  303. @keydown.up.native="drugUp($event,scope)"
  304. @keydown.enter.native="drugEnter(scope)"
  305. :disabled="recipe_tabs[recipe_tabs_c].disable"
  306. ></el-input>
  307. <div
  308. class="table-choose3"
  309. v-if="scope.row.key"
  310. :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
  311. >
  312. <div class="table-choose-h flex-vertical-between">
  313. <div class="flex-center">药品名称</div>
  314. <div class="flex-center">规格</div>
  315. <div class="flex-center">产地</div>
  316. <div class="flex-center">单价</div>
  317. <div class="flex-center">库存</div>
  318. </div>
  319. <div
  320. class="t-c-b infinite-list"
  321. v-infinite-scroll="load"
  322. :infinite-scroll-immediate="false"
  323. :id="'infiniteList'+scope.row.id"
  324. :ref="'infiniteList'+scope.row.id"
  325. style="overflow:auto"
  326. >
  327. <div
  328. class="infinite-list-item flex-vertical-between"
  329. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  330. @click="chooseDis1(scope,index1,item1)"
  331. v-for="(item1,index1) in scope.row.drugList"
  332. :key="scope.row.id+'f'+index1"
  333. >
  334. <p class="flex-center">{{item1.ypmc}}</p>
  335. <p class="flex-center">{{item1.gg}}</p>
  336. <p class="flex-center">{{item1.cdmc}}</p>
  337. <p class="flex-center">{{item1.price}}</p>
  338. <p class="flex-center">{{item1.kc}}</p>
  339. </div>
  340. </div>
  341. </div>
  342. </div>
  343. <!-- <div class="operate1"
  344. v-if="scope.row.id!==recipe_tabs[recipe_tabs_c].totalTableD.length && !scope.row.name">
  345. <img src="../assets/delete1.png" alt="" @click="deleteDis1(scope)" />
  346. </div>-->
  347. </div>
  348. <!-- -->
  349. <div v-else>{{scope.row.id}}</div>
  350. </template>
  351. </el-table-column>
  352. <el-table-column prop="name" label="药品名称" width="80">
  353. <template slot-scope="scope" v-if="scope.row.name">
  354. <div
  355. @click="clickName(scope)"
  356. v-if="!scope.row.showSearch"
  357. :style="{'color':scope.row.color?scope.row.color:''}"
  358. >{{scope.row.name}}</div>
  359. <div v-else class="flex-vertical-between">
  360. <div style="width:110px;">
  361. <el-input
  362. :value="scope.row.key"
  363. :id="'searchD'+scope.row.id"
  364. size="mini"
  365. :placeholder="scope.row.name"
  366. @input="searchDrug($event,scope)"
  367. @blur="drugBlur1($event,scope)"
  368. @keydown.down.native="drugDown($event,scope)"
  369. @keydown.up.native="drugUp($event,scope)"
  370. @keydown.enter.native="drugEnter(scope)"
  371. :disabled="recipe_tabs[recipe_tabs_c].disable"
  372. ></el-input>
  373. <!-- v-model="scope.row.key" -->
  374. <div
  375. class="table-choose3"
  376. v-if="scope.row.key"
  377. :style="medIndex==0?'':{top:(medIndex*35)+'px'}"
  378. >
  379. <div class="table-choose-h flex-vertical-between">
  380. <div class="flex-center">药品名称</div>
  381. <div class="flex-center">规格</div>
  382. <div class="flex-center">产地</div>
  383. <div class="flex-center">单价</div>
  384. <div class="flex-center">库存</div>
  385. </div>
  386. <!-- -->
  387. <div
  388. class="t-c-b infinite-list"
  389. v-infinite-scroll="load"
  390. :infinite-scroll-immediate="false"
  391. :id="'infiniteList'+scope.row.id"
  392. :ref="'infiniteList'+scope.row.id"
  393. style="overflow:auto"
  394. v-if="scope.row.drugList.length>0"
  395. >
  396. <div
  397. class="infinite-list-item flex-vertical-between"
  398. :style="scope.row.search_i===index1?'background:#F3FFFB;':''"
  399. @click="chooseDis1(scope,index1,item1)"
  400. v-for="(item1,index1) in scope.row.drugList"
  401. :key="scope.row.id+'g'+index1"
  402. >
  403. <p class="flex-center">{{item1.ypmc}}</p>
  404. <p class="flex-center">{{item1.gg}}</p>
  405. <p class="flex-center">{{item1.cdmc}}</p>
  406. <p class="flex-center">{{item1.price}}</p>
  407. <p class="flex-center">{{item1.kc}}</p>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </template>
  414. </el-table-column>
  415. <!-- fixed="left" -->
  416. <el-table-column prop="spec" label="规格" width="40"></el-table-column>
  417. <el-table-column prop="dose" label="剂量" width="40">
  418. <template slot-scope="scope" v-if="scope.row.name">
  419. <div class="t_dose">
  420. <el-input
  421. :value="scope.row.dose"
  422. size="mini"
  423. @blur="doseBlur(scope)"
  424. @focus="doseFocus(scope)"
  425. @input="countDoseMoney($event,scope)"
  426. :id="'dose'+scope.row.id"
  427. :disabled="recipe_tabs[recipe_tabs_c].disable"
  428. :placeholder="scope.row.oldDose?'原'+scope.row.oldDose+'克':''"
  429. @keydown.enter.native="doseEnter(scope)"
  430. ></el-input>
  431. <div
  432. class="dose-section"
  433. :style="{top:scope.$index==0?'':((scope.$index)*35)+'px'}"
  434. v-if="minDose && maxDose && doseId == scope.row.medid"
  435. >
  436. <span>{{minDose}}</span>~
  437. <span>{{maxDose}}</span>
  438. </div>
  439. </div>
  440. </template>
  441. </el-table-column>
  442. <el-table-column prop="unit" label="单位" width="40"></el-table-column>
  443. <!-- <el-table-column prop="inventory" label="库存" width="80">
  444. </el-table-column>-->
  445. <el-table-column prop="usage" label="用法">
  446. <template slot-scope="scope" v-if="scope.row.name">
  447. <el-select
  448. v-model="scope.row.usage"
  449. placeholder="请选择"
  450. size="mini"
  451. @change="usageC($event,scope)"
  452. :disabled="recipe_tabs[recipe_tabs_c].disable"
  453. >
  454. <el-option
  455. :label="item.value"
  456. :value="item.key"
  457. v-for="(item,index) in scope.row.usageList"
  458. :key="scope.row.id+'h'+index"
  459. ></el-option>
  460. </el-select>
  461. </template>
  462. </el-table-column>
  463. <!-- <el-table-column prop="price" label="单价" width="50">
  464. </el-table-column>-->
  465. <el-table-column prop="total" label="小计" width="50">
  466. <template slot-scope="scope" v-if="scope.row.name">
  467. <div>{{scope.row.total | formatTotal}}</div>
  468. </template>
  469. </el-table-column>
  470. <el-table-column label="操作" width="64">
  471. <template slot-scope="scope">
  472. <div class="operate" v-if="scope.row.name">
  473. <div>
  474. <img
  475. src="../assets/add.png"
  476. alt
  477. @click="addDis1(scope)"
  478. v-if="!recipe_tabs[recipe_tabs_c].disable"
  479. />
  480. </div>
  481. <div>
  482. <img
  483. src="../assets/delete1.png"
  484. alt
  485. @click="deleteDis1(scope)"
  486. v-if="!recipe_tabs[recipe_tabs_c].disable"
  487. />
  488. </div>
  489. <div>
  490. <img src="../assets/find.png" alt @click="findDrug(scope)" />
  491. </div>
  492. </div>
  493. <div
  494. class="operate"
  495. v-else-if="scope.row.id==recipe_tabs[recipe_tabs_c].totalTableD.length && !scope.row.name"
  496. >
  497. <div style="opacity:0;">
  498. <img src="../assets/find.png" alt />
  499. </div>
  500. </div>
  501. <div v-else class="operate">
  502. <div v-if="scope.row.id!==recipe_tabs[recipe_tabs_c].totalTableD.length">
  503. <img
  504. src="../assets/delete1.png"
  505. alt
  506. @click="deleteDis1(scope)"
  507. v-if="!recipe_tabs[recipe_tabs_c].disable"
  508. />
  509. </div>
  510. </div>
  511. </template>
  512. </el-table-column>
  513. <div slot="empty"></div>
  514. </el-table>
  515. </div>
  516. </div>
  517. </div>
  518. </div>
  519. </div>
  520. </template>
  521. <script>
  522. import { addAccordData, getAccordShareList } from "@/api/business.js";
  523. import { getDataByKey } from "@/api/system.js";
  524. import accordEdit from "@/views/business/AccordEdit.vue";
  525. import { getRationalMed, getRationalMedForPlat } from "@/api/knowledge";
  526. import {
  527. getProver,
  528. getArea,
  529. getSelectType,
  530. getPharmacyMsg,
  531. getPatAddress
  532. } from "@/api/city.js";
  533. import {
  534. getTableDrug,
  535. getAddressForHospital,
  536. getPharmacyID,
  537. changePharmacy,
  538. customerQuery,
  539. getPharmacyIDS
  540. } from "@/api/diagnosis.js";
  541. import { debounce } from "@/utils/format.js";
  542. import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
  543. import popup from "@/components/Propup.vue";
  544. import accompanied from "./ui/accompanied.vue";
  545. export default {
  546. components: {
  547. popup,
  548. accordEdit,
  549. accompanied
  550. },
  551. props: {
  552. container_i: {
  553. type: Number,
  554. default: 0
  555. },
  556. showSubmit: {
  557. type: Boolean,
  558. default: true
  559. }
  560. // totalAllMoney: Number,
  561. },
  562. data() {
  563. return {
  564. totalAllMoney: 0,
  565. preData: [],
  566. showDialog: false,
  567. shareSelect: [], // 共享至选择器数据
  568. share: "",
  569. name: "中药处方",
  570. recipe_tabs: [
  571. {
  572. isMyMade: true,
  573. name: "处方1",
  574. pharmacyID: "", // 药房id
  575. isPay: false, // 是否支付
  576. prescribed: 0, // 是否开方 0 否 1是
  577. totalTableD: [
  578. {
  579. id: 1,
  580. key: "",
  581. drugList: [],
  582. page: 1,
  583. loadMore: true,
  584. usageList: [],
  585. search_i: 0,
  586. showSearch: false
  587. }
  588. ],
  589. tableData: [
  590. {
  591. id: 1,
  592. key: "",
  593. drugList: [],
  594. page: 1,
  595. loadMore: true,
  596. usageList: [],
  597. search_i: 0,
  598. showSearch: false
  599. }
  600. ],
  601. radio: "1",
  602. lastType: "1", // 上一次的 药房类型
  603. tableData1: [],
  604. bottom_form: {
  605. preType: "", // 协定方的时候 切换 中药类型带入
  606. disable: false, // 协定方 配方转方 为 true
  607. doseNum: "",
  608. doseType: "",
  609. doseTypeList: [],
  610. usegeList: [],
  611. usege: "",
  612. num: "",
  613. numList: [], // 频次后台数据
  614. daijian: "",
  615. nongjian: "200ml",
  616. time: "",
  617. timeList: [], // 服药时间后台数据
  618. caozuo: "",
  619. zhutuo: "",
  620. radio: "1",
  621. isDaiJian: "1",
  622. provinceList: [],
  623. cityList: [],
  624. areaList: [],
  625. province: "",
  626. city: "",
  627. area: "",
  628. address: "",
  629. phone: "",
  630. doseType1: "zc",
  631. doseNum1: "",
  632. savename: "",
  633. nowRecipeMoney: 0, //单剂金额
  634. nowRecipeMoney1: 0, //当前处方金额
  635. allMoney: 0, // 合计金额
  636. moneyMsg: {} // 价格数据
  637. }
  638. }
  639. ], // 处方 tabs
  640. recipe_tabs_c: 0, // 处方 tabs 下标
  641. index: 0, // 全局index 下拉加载时使用
  642. provinceList1: [], // 全局省列表 赋值用
  643. countWay: "1", // 计算方式
  644. pharmacyList: [], // 药房选择器 数据
  645. pharmacyTypes: [],
  646. clickPid: "", // 点击的药品id
  647. maxDose: null,
  648. minDose: null,
  649. doseId: "", // 要展示的 剂量id
  650. medIndex: 0, // 点击的 药品下标
  651. usageList: [] // 用法列表
  652. };
  653. },
  654. created() {
  655. // setTimeout(() => {
  656. // this.getDataByKey()
  657. // }, 200);
  658. // this.getAccordShareList()
  659. // this.getPharmacyID()
  660. // this.getTableDrug('', 1, 0)
  661. this.customerQuery();
  662. // this._getPharmacyIDS();
  663. this.getProver();
  664. this.getSelectType("中药药品用法", 0);
  665. this.getSelectType("剂型", 0);
  666. this.getSelectType("处方用法");
  667. this.getSelectType("中药服药时间");
  668. this.getSelectType("中药频次");
  669. },
  670. mounted() {},
  671. methods: {
  672. getRadioName(val) {
  673. if (val == 1) {
  674. return "散装饮片";
  675. }
  676. if (val == 2) {
  677. return "散装颗粒";
  678. }
  679. if (val == 3) {
  680. return "小包装饮片";
  681. }
  682. if (val == 4) {
  683. return "小包装颗粒";
  684. }
  685. if (val == 5) {
  686. return "膏方";
  687. }
  688. if (val == 6) {
  689. return "中药制剂";
  690. }
  691. },
  692. // 配送点击
  693. changePeiSong() {
  694. this.recipe_tabs[this.recipe_tabs_c].bottom_form.radio =
  695. this.recipe_tabs[this.recipe_tabs_c].bottom_form.radio == 1 ? 0 : 1;
  696. this.countNowRecipeMoney();
  697. this.getaddress(this.recipe_tabs[this.recipe_tabs_c].bottom_form.radio);
  698. },
  699. // 代煎选项点击
  700. changeDaijian() {
  701. this.recipe_tabs[this.recipe_tabs_c].bottom_form.isDaiJian =
  702. this.recipe_tabs[this.recipe_tabs_c].bottom_form.isDaiJian == 1 ? 0 : 1;
  703. if (this.recipe_tabs[this.recipe_tabs_c].bottom_form.isDaiJian == 0) {
  704. this.recipe_tabs[this.recipe_tabs_c].bottom_form.daijian = "";
  705. } else {
  706. this.recipe_tabs[
  707. this.recipe_tabs_c
  708. ].bottom_form.daijian = this.recipe_tabs[
  709. this.recipe_tabs_c
  710. ].bottom_form.doseNum;
  711. }
  712. this.countNowRecipeMoney();
  713. },
  714. // 是否配送
  715. getaddress(e) {
  716. if (e == 1) {
  717. this.recipe_tabs[this.recipe_tabs_c].bottom_form.address = "";
  718. this.recipe_tabs[this.recipe_tabs_c].bottom_form.savename = "";
  719. this.recipe_tabs[this.recipe_tabs_c].bottom_form.phone = "";
  720. this.recipe_tabs[this.recipe_tabs_c].bottom_form.province = "";
  721. this.recipe_tabs[this.recipe_tabs_c].bottom_form.city = "";
  722. this.recipe_tabs[this.recipe_tabs_c].bottom_form.area = "";
  723. } else {
  724. this.getPatAddress();
  725. }
  726. this.countNowRecipeMoney();
  727. },
  728. scroll(e) {
  729. // console.log("滚动", e);
  730. },
  731. // 监听键盘事件
  732. drugDown(e, scope) {
  733. let index = scope.row.id ? scope.row.id - 1 : 0;
  734. let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  735. // 如果到最后一个 判断是否需要分页
  736. if (totalData[index].search_i == totalData[index].drugList.length - 1) {
  737. // totalData[scope.$index].search_i
  738. if (totalData[index].loadMore) {
  739. totalData[index].page += 1;
  740. this.getTableDrug(
  741. totalData[index].key,
  742. totalData[index].page,
  743. index,
  744. totalData[index].loadMore
  745. );
  746. totalData[index].search_i += 1;
  747. }
  748. } else {
  749. totalData[index].search_i += 1;
  750. }
  751. // 表格 fixed 时 去 下标 为 1
  752. if (totalData[index].drugList.length > 5) {
  753. document.querySelectorAll(
  754. `#infiniteList${scope.row.id}`
  755. )[1].scrollTop += 36;
  756. console.log(
  757. document.querySelectorAll(`#infiniteList${scope.row.id}`)[1]
  758. .scrollTop,
  759. "top"
  760. );
  761. }
  762. this.recipe_tabs[this.recipe_tabs_c].totalTableD = totalData;
  763. totalData.filter((item, index) => {
  764. // this.getSelectType('中药药品用法', index)
  765. return (item.id = index + 1);
  766. });
  767. this.recipe_tabs[this.recipe_tabs_c].tableData = totalData.filter(
  768. (item, index) => {
  769. return item.id % 2 != 0;
  770. }
  771. );
  772. this.recipe_tabs[this.recipe_tabs_c].tableData1 = totalData.filter(
  773. (item, index) => {
  774. return item.id % 2 == 0;
  775. }
  776. );
  777. this.$forceUpdate();
  778. },
  779. drugUp(e, scope) {
  780. let index = scope.row.id ? scope.row.id - 1 : 0;
  781. let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  782. // 如果到最后一个 判断是否需要分页
  783. if (totalData[index].search_i == 0) {
  784. // totalData[scope.$index].search_i
  785. } else {
  786. totalData[index].search_i -= 1;
  787. }
  788. if (
  789. document.querySelectorAll(`#infiniteList${scope.row.id}`)[1].scrollTop >
  790. 0
  791. ) {
  792. document.querySelectorAll(
  793. `#infiniteList${scope.row.id}`
  794. )[1].scrollTop -= 36;
  795. }
  796. this.recipe_tabs[this.recipe_tabs_c].totalTableD = totalData;
  797. totalData.filter((item, index) => {
  798. // this.getSelectType('中药药品用法', index)
  799. return (item.id = index + 1);
  800. });
  801. this.recipe_tabs[this.recipe_tabs_c].tableData = totalData.filter(
  802. (item, index) => {
  803. return item.id % 2 != 0;
  804. }
  805. );
  806. this.recipe_tabs[this.recipe_tabs_c].tableData1 = totalData.filter(
  807. (item, index) => {
  808. return item.id % 2 == 0;
  809. }
  810. );
  811. },
  812. drugEnter(scope) {
  813. this.chooseDis1(
  814. scope,
  815. scope.row.search_i,
  816. scope.row.drugList[scope.row.search_i]
  817. );
  818. },
  819. usageC(e, scope) {
  820. let index = scope.row.id ? scope.row.id - 1 : 0;
  821. let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  822. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].usage = e;
  823. this.recipe_tabs[this.recipe_tabs_c].tableData = totalData.filter(
  824. (item, index) => {
  825. return item.id % 2 != 0;
  826. }
  827. );
  828. this.recipe_tabs[this.recipe_tabs_c].tableData1 = totalData.filter(
  829. (item, index) => {
  830. return item.id % 2 == 0;
  831. }
  832. );
  833. },
  834. doseFocus(scope) {
  835. console.log(scope, "scope");
  836. if (scope.row.id % 2 == 0) {
  837. document.getElementsByClassName(
  838. "el-table__body-wrapper"
  839. )[1].style.overflow = "hidden";
  840. } else {
  841. document.getElementsByClassName(
  842. "el-table__body-wrapper"
  843. )[0].style.overflow = "hidden";
  844. }
  845. if (scope.row.medid.indexOf("-") != -1) {
  846. this._getRationalMed(scope.row.medid);
  847. } else {
  848. this._getRationalMedForPlat(scope.row.medid);
  849. }
  850. },
  851. doseBlur(scope) {
  852. let parent = this.$parent;
  853. if (scope.row.dose === "") {
  854. this.$message.error("请输入剂量");
  855. parent.rationalMed10.forEach(item => {
  856. if (item.reqID == scope.row.medid) {
  857. item.showDose = false;
  858. }
  859. });
  860. parent.countDose();
  861. this.maxDose = null;
  862. this.minDose = null;
  863. this.doseId = "";
  864. return;
  865. }
  866. if (
  867. Number(scope.row.dose) > Number(this.maxDose) ||
  868. Number(scope.row.dose) < Number(this.minDose)
  869. ) {
  870. parent.rationalMed10.forEach(item => {
  871. if (item.reqID == scope.row.medid) {
  872. item.showDose = true;
  873. }
  874. });
  875. }
  876. if (
  877. Number(scope.row.dose) <= Number(this.maxDose) &&
  878. Number(scope.row.dose) >= Number(this.minDose)
  879. ) {
  880. parent.rationalMed10.forEach(item => {
  881. if (item.reqID == scope.row.medid) {
  882. item.showDose = false;
  883. }
  884. });
  885. }
  886. parent.countDose();
  887. this.maxDose = null;
  888. this.minDose = null;
  889. this.doseId = "";
  890. },
  891. doseEnter(scope) {
  892. if (
  893. scope.row.id ==
  894. this.recipe_tabs[this.recipe_tabs_c].totalTableD.length - 1
  895. ) {
  896. // console.log(document.querySelectorAll('#searchD' + (scope.row.id + 1)), '啦啦啦')
  897. document.querySelectorAll("#searchD" + (scope.row.id + 1))[0].focus();
  898. } else {
  899. try {
  900. this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
  901. if (item.name && !item.dose && scope.row.id < item.id) {
  902. document.querySelectorAll("#dose" + item.id)[0].focus();
  903. throw Error();
  904. }
  905. if (!item.name) {
  906. // console.log(document.querySelectorAll('#searchD' + item.id), '啦啦啦')
  907. document.querySelectorAll("#searchD" + item.id)[0].focus();
  908. throw Error();
  909. }
  910. });
  911. } catch (error) {}
  912. }
  913. },
  914. // 修改剂数
  915. doseNumC() {
  916. let doseNum = this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum;
  917. var regu = /^[1-9]\d*$/;
  918. if (!regu.test(Number(doseNum))) {
  919. this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum = 1;
  920. doseNum = 1;
  921. }
  922. if (this.recipe_tabs[this.recipe_tabs_c].bottom_form.isDaiJian == 1) {
  923. this.recipe_tabs[this.recipe_tabs_c].bottom_form.daijian = doseNum;
  924. }
  925. this.countNowRecipeMoney();
  926. },
  927. // 计算中药处方总金额
  928. countMdAllMoney() {
  929. let totalAllMoney = 0;
  930. this.recipe_tabs.forEach(item => {
  931. totalAllMoney += Number(item.bottom_form.allMoney);
  932. });
  933. // this.totalAllMoney = totalAllMoney;
  934. this.$emit("update:totalAllMoney", totalAllMoney);
  935. },
  936. // 计算当前处方金额
  937. countNowRecipeMoney() {
  938. let data = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  939. let total = 0;
  940. data.forEach(item => {
  941. if (item.total) {
  942. total += Number(item.total);
  943. }
  944. });
  945. // console.log(total, '几家总额');
  946. this.recipe_tabs[this.recipe_tabs_c].bottom_form.nowRecipeMoney = total;
  947. // 计算当前处方金额
  948. if (this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum) {
  949. if (this.countWay == "1") {
  950. this.recipe_tabs[this.recipe_tabs_c].bottom_form.nowRecipeMoney1 = (
  951. total *
  952. Number(this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum)
  953. ).toFixed(2);
  954. total = (
  955. total *
  956. Number(this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum)
  957. ).toFixed(2);
  958. } else {
  959. this.recipe_tabs[this.recipe_tabs_c].bottom_form.nowRecipeMoney1 = (
  960. total *
  961. Number(this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum)
  962. ).toFixed(3); // 3
  963. total = (
  964. total *
  965. Number(this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum)
  966. ).toFixed(3); // 3
  967. }
  968. } else {
  969. this.recipe_tabs[this.recipe_tabs_c].bottom_form.nowRecipeMoney1 = 0;
  970. }
  971. // 膏剂类型
  972. let doseType = this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseType;
  973. // 是否配送
  974. let isDelivery = this.recipe_tabs[this.recipe_tabs_c].bottom_form.radio;
  975. // 制膏费
  976. let systemOfCreamPrice =
  977. doseType == "0"
  978. ? this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg
  979. .systemOfCreamPrice
  980. ? this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg
  981. .systemOfCreamPrice
  982. : 0
  983. : 0;
  984. // 代煎费
  985. let agencyPrice = 0;
  986. if (
  987. doseType == "1" &&
  988. this.recipe_tabs[this.recipe_tabs_c].bottom_form.isDaiJian == 1
  989. ) {
  990. agencyPrice = this.recipe_tabs[this.recipe_tabs_c].bottom_form.daijian
  991. ? this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg
  992. .agencyPrice *
  993. Number(this.recipe_tabs[this.recipe_tabs_c].bottom_form.daijian)
  994. : 0;
  995. }
  996. // 特殊调配费
  997. let specialDeploymentPrice =
  998. doseType == "2" || doseType == "3"
  999. ? this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg
  1000. .specialDeploymentPrice
  1001. : 0;
  1002. //配送费
  1003. let deliveryPrice =
  1004. isDelivery == 0
  1005. ? this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg
  1006. .deliveryPrice
  1007. : 0;
  1008. this.recipe_tabs[this.recipe_tabs_c].bottom_form.allMoney =
  1009. Number(Number(total).toFixed(2)) + //3
  1010. Number(systemOfCreamPrice) +
  1011. Number(agencyPrice) +
  1012. Number(specialDeploymentPrice) +
  1013. Number(deliveryPrice);
  1014. this.recipe_tabs[
  1015. this.recipe_tabs_c
  1016. ].bottom_form.allMoney = this.recipe_tabs[
  1017. this.recipe_tabs_c
  1018. ].bottom_form.allMoney.toFixed(2);
  1019. this.countMdAllMoney();
  1020. },
  1021. // 清空处方
  1022. clearRecipe() {
  1023. this.index = 0;
  1024. this.recipe_tabs[this.recipe_tabs_c].disable = false;
  1025. this.recipe_tabs[this.recipe_tabs_c].isMyMade = true;
  1026. this.recipe_tabs[this.recipe_tabs_c].totalTableD.splice(
  1027. this.recipe_tabs[this.recipe_tabs_c].totalTableD.length - 1,
  1028. 1
  1029. );
  1030. let father = this.$parent;
  1031. this.recipe_tabs[this.recipe_tabs_c].totalTableD = [
  1032. {
  1033. drugList: [],
  1034. page: 1,
  1035. loadMore: true,
  1036. key: "",
  1037. search_i: 0
  1038. }
  1039. ];
  1040. this.recipe_tabs[this.recipe_tabs_c].tableData = [
  1041. {
  1042. drugList: [],
  1043. page: 1,
  1044. id: 1,
  1045. loadMore: true,
  1046. key: "",
  1047. search_i: 0
  1048. }
  1049. ];
  1050. this.recipe_tabs[this.recipe_tabs_c].tableData1 = [];
  1051. this.recipe_tabs[this.recipe_tabs_c].radio = this.pharmacyTypes[0].ptype;
  1052. this.recipe_tabs[
  1053. this.recipe_tabs_c
  1054. ].lastType = this.pharmacyTypes[0].ptype;
  1055. let moneyMsg = this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg;
  1056. this.recipe_tabs[this.recipe_tabs_c].bottom_form = {
  1057. preType: "", // 协定方的时候 切换 中药类型带入
  1058. disable: false, // 协定方 配方转方 为 true
  1059. doseNum: "",
  1060. doseType: "",
  1061. doseTypeList: [],
  1062. usegeList: [],
  1063. usege: "",
  1064. num: "",
  1065. numList: [], // 频次后台数据
  1066. daijian: "",
  1067. nongjian: "200ml",
  1068. time: "",
  1069. timeList: [], // 服药时间后台数据
  1070. caozuo: "",
  1071. zhutuo: "",
  1072. radio: "1",
  1073. isDaiJian: "1",
  1074. provinceList: [],
  1075. cityList: [],
  1076. areaList: [],
  1077. province: "",
  1078. city: "",
  1079. area: "",
  1080. address: "",
  1081. phone: "",
  1082. doseType1: "zc",
  1083. doseNum1: "",
  1084. savename: "",
  1085. nowRecipeMoney: 0, //单剂金额
  1086. nowRecipeMoney1: 0, //当前处方金额
  1087. allMoney: 0, // 合计金额
  1088. moneyMsg: moneyMsg // 价格数据
  1089. };
  1090. this.nowRecipeMoney = 0;
  1091. this.getProver();
  1092. this.getSelectType("中药药品用法", 0);
  1093. this.getSelectType("剂型", 0);
  1094. this.getSelectType("处方用法");
  1095. this.getSelectType("中药服药时间");
  1096. this.getSelectType("中药频次");
  1097. sessionStorage.setItem("isupdateExpre", "0");
  1098. this.countNowRecipeMoney();
  1099. },
  1100. load() {
  1101. console.log("进入");
  1102. let key = this.recipe_tabs[this.recipe_tabs_c].totalTableD[this.index]
  1103. .key;
  1104. let page = this.recipe_tabs[this.recipe_tabs_c].totalTableD[this.index]
  1105. .page;
  1106. let loadMore = this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1107. this.index
  1108. ].loadMore;
  1109. if (loadMore) {
  1110. page += 1;
  1111. }
  1112. // if (!loadMore == 1) return;
  1113. this.getTableDrug(key, page, this.index, loadMore);
  1114. },
  1115. // 新增处方 tab
  1116. addRecipeTba() {
  1117. let obj = this.recipe_tabs[this.recipe_tabs_c].bottom_form;
  1118. this.recipe_tabs.push({
  1119. prescribed: 0,
  1120. isMyMade: true,
  1121. name: `处方${this.recipe_tabs.length + 1}`,
  1122. pharmacyID: this.recipe_tabs[this.recipe_tabs_c].pharmacyID,
  1123. isPay: false,
  1124. totalTableD: [
  1125. {
  1126. id: 1,
  1127. key: "",
  1128. drugList: [],
  1129. page: 1,
  1130. loadMore: true,
  1131. usageList: [],
  1132. search_i: 0,
  1133. showSearch: false
  1134. }
  1135. ],
  1136. tableData: [
  1137. {
  1138. id: 1,
  1139. key: "",
  1140. drugList: [],
  1141. page: 1,
  1142. loadMore: true,
  1143. usageList: [],
  1144. search_i: 0,
  1145. showSearch: false
  1146. }
  1147. ],
  1148. radio: "1",
  1149. lastType: "1",
  1150. tableData1: [],
  1151. bottom_form: {
  1152. doseNum: "",
  1153. doseType: "",
  1154. doseTypeList: [],
  1155. usegeList: [],
  1156. usege: "",
  1157. num: "",
  1158. numList: [], // 频次后台数据
  1159. daijian: "",
  1160. nongjian: "200ml",
  1161. time: "",
  1162. timeList: [], // 服药时间后台数据
  1163. caozuo: "",
  1164. zhutuo: "",
  1165. radio: "1",
  1166. isDaiJian: "1",
  1167. pro: "",
  1168. city: "",
  1169. area: "",
  1170. address: "",
  1171. phone: "",
  1172. doseType1: "",
  1173. doseNum1: "",
  1174. provinceList: this.provinceList1,
  1175. cityList: [],
  1176. areaList: [],
  1177. province: "",
  1178. city: "",
  1179. area: "",
  1180. moneyMsg: obj.moneyMsg, // 价格数据
  1181. nowRecipeMoney: 0, //单剂金额
  1182. nowRecipeMoney1: 0, //当前处方金额
  1183. allMoney: 0, // 合计金额
  1184. disable: false
  1185. }
  1186. });
  1187. this.recipe_tabs_c = this.recipe_tabs.length - 1;
  1188. // this.getPharmacyID()
  1189. this.recipeChange(this.recipe_tabs_c);
  1190. },
  1191. // 处方 tab 点击改变
  1192. recipeChange(index) {
  1193. this.recipe_tabs_c = index;
  1194. this.getSelectType("剂型");
  1195. this.getSelectType("处方用法");
  1196. this.getSelectType("中药服药时间");
  1197. this.getSelectType("中药频次");
  1198. // 调用 父级合理用药接口
  1199. // let father = this.$parent;
  1200. this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
  1201. if (item.name) {
  1202. if (item.medid.indexOf("-") != -1) {
  1203. father.getRationalMed(item.medid);
  1204. } else {
  1205. father.getRationalMedForPlat(item.medid);
  1206. }
  1207. }
  1208. });
  1209. },
  1210. recipeDelete(index) {
  1211. if (this.recipe_tabs.length == 1) return;
  1212. this.recipe_tabs.splice(index, 1);
  1213. this.recipe_tabs_c = this.recipe_tabs.length - 1;
  1214. this.recipe_tabs.filter((item, index) => {
  1215. return (item.name = "处方" + (index + 1));
  1216. });
  1217. this.countNowRecipeMoney();
  1218. // this.$forceUpdate()
  1219. },
  1220. // 输入剂量计算 当前药品总价格
  1221. countDoseMoney(e, scope) {
  1222. let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  1223. let kucun = scope.row.inventory; // 药品库存
  1224. if (Number(e) > Number(kucun)) {
  1225. this.$message.warning("当前库存不足");
  1226. document.querySelectorAll("#dose" + scope.row.id)[0].style.border =
  1227. "1px solid red";
  1228. document.querySelectorAll("#dose" + scope.row.id)[0].style.color =
  1229. "red";
  1230. } else {
  1231. document.querySelectorAll("#dose" + scope.row.id)[0].style.border = "";
  1232. document.querySelectorAll("#dose" + scope.row.id)[0].style.color = "";
  1233. }
  1234. let price = this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1235. scope.row.id - 1
  1236. ].price;
  1237. this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1238. scope.row.id - 1
  1239. ].dose = e;
  1240. let dose = this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1241. scope.row.id - 1
  1242. ].dose;
  1243. let total = 0;
  1244. // 计算方式2
  1245. if (this.countWay == "2") {
  1246. total = (Number(price) * Number(dose)).toFixed(2);
  1247. } else {
  1248. total = Number(price) * Number(dose);
  1249. }
  1250. this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1251. scope.row.id - 1
  1252. ].total = total;
  1253. this.recipe_tabs[this.recipe_tabs_c].tableData = totalData.filter(
  1254. (item, index) => {
  1255. return item.id % 2 != 0;
  1256. }
  1257. );
  1258. this.recipe_tabs[this.recipe_tabs_c].tableData1 = totalData.filter(
  1259. (item, index) => {
  1260. return item.id % 2 == 0;
  1261. }
  1262. );
  1263. if (this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseNum) {
  1264. this.countNowRecipeMoney();
  1265. }
  1266. },
  1267. // 表一 选中药品
  1268. chooseDis1(scope, index, item, from = "now") {
  1269. let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  1270. let isHas = false;
  1271. totalData.forEach(item1 => {
  1272. if (item1.medid === item.pid) {
  1273. isHas = true;
  1274. }
  1275. });
  1276. if (isHas) {
  1277. this.$message.warning("请勿重复添加药品");
  1278. return;
  1279. }
  1280. let obj = {
  1281. color: "#000",
  1282. id: scope.row.id,
  1283. name: item.ypmc,
  1284. spec: item.gg, // 规格
  1285. dose: "", // 剂量
  1286. unit: item.dw, // 单位
  1287. // usage: item.usagestr, // 用法
  1288. usage: "",
  1289. // price: item.lsjg,
  1290. price: item.price,
  1291. total: 0,
  1292. inventory: item.kc, // 库存
  1293. key: "",
  1294. search_i: index,
  1295. medid: item.pid, // 药品id
  1296. originname: item.cdmc, // 产地名称
  1297. showSearch: false,
  1298. showDoseSection: false // 展示剂量区间
  1299. };
  1300. Object.assign(totalData[scope.row.id - 1], obj);
  1301. // 调用 父级合理用药接口
  1302. let father = this.$parent;
  1303. if (obj.medid.indexOf("-") != -1) {
  1304. father.getRationalMed(obj.medid);
  1305. } else {
  1306. father.getRationalMedForPlat(obj.medid);
  1307. }
  1308. if (scope.row.id == totalData.length) {
  1309. totalData.push({
  1310. id: 2,
  1311. drugList: [],
  1312. page: 1,
  1313. loadMore: true,
  1314. usageList: [],
  1315. search_i: 0,
  1316. showSearch: false
  1317. });
  1318. }
  1319. this.recipe_tabs[this.recipe_tabs_c].totalTableD = totalData;
  1320. totalData.filter((item, index) => {
  1321. this.getSelectType("中药药品用法", index);
  1322. return (item.id = index + 1);
  1323. });
  1324. this.recipe_tabs[this.recipe_tabs_c].tableData = totalData.filter(
  1325. (item, index) => {
  1326. return item.id % 2 != 0;
  1327. }
  1328. );
  1329. this.recipe_tabs[this.recipe_tabs_c].tableData1 = totalData.filter(
  1330. (item, index) => {
  1331. return item.id % 2 == 0;
  1332. }
  1333. );
  1334. if (form != "now") return;
  1335. setTimeout(() => {
  1336. let ids = document.querySelectorAll("#dose" + scope.row.id);
  1337. document.querySelectorAll("#dose" + scope.row.id)[0].focus();
  1338. }, 500);
  1339. },
  1340. // 表一和表二 数据添加
  1341. addDis1(scope, type = "click") {
  1342. let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  1343. let index = scope.row.id;
  1344. // totalData[index + 1].id && totalData[index + 1].name
  1345. if (index != totalData.length - 2) {
  1346. // 插入到 数据中间
  1347. let data = totalData.splice(scope.row.id);
  1348. totalData.push({
  1349. id: 2,
  1350. drugList: [],
  1351. page: 1,
  1352. loadMore: true,
  1353. usageList: [],
  1354. showSearch: false,
  1355. key: "",
  1356. search_i: 0
  1357. });
  1358. totalData = totalData.concat(data);
  1359. // this.totalTableD = totalData;
  1360. } else if (totalData[index + 1].id && !totalData[index + 1].name) {
  1361. totalData.push({
  1362. id: 2,
  1363. drugList: [],
  1364. page: 1,
  1365. loadMore: true,
  1366. usageList: [],
  1367. showSearch: false,
  1368. key: "",
  1369. search_i: 0
  1370. });
  1371. }
  1372. totalData.filter((item, index1) => {
  1373. this.getSelectType("中药药品用法", index1);
  1374. return (item.id = index1 + 1);
  1375. });
  1376. this.recipe_tabs[this.recipe_tabs_c].totalTableD = totalData;
  1377. this.recipe_tabs[this.recipe_tabs_c].tableData = totalData.filter(
  1378. (item, index) => {
  1379. return item.id % 2 != 0;
  1380. }
  1381. );
  1382. this.recipe_tabs[this.recipe_tabs_c].tableData1 = totalData.filter(
  1383. (item, index) => {
  1384. return item.id % 2 == 0;
  1385. }
  1386. );
  1387. if (type != "click") return;
  1388. setTimeout(() => {
  1389. if (
  1390. scope.row.id ==
  1391. this.recipe_tabs[this.recipe_tabs_c].totalTableD.length - 1
  1392. ) {
  1393. document.querySelectorAll("#searchD" + (scope.row.id + 1))[0].focus();
  1394. } else {
  1395. try {
  1396. this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
  1397. if (!item.name) {
  1398. // console.log(document.querySelectorAll('#searchD' + item.id), '啦啦啦')
  1399. document.querySelectorAll("#searchD" + item.id)[0].focus();
  1400. throw Error();
  1401. }
  1402. });
  1403. } catch (error) {}
  1404. }
  1405. }, 500);
  1406. },
  1407. // 表一 和表二 查看药品数据
  1408. findDrug(scope) {
  1409. this.$emit("find", scope);
  1410. },
  1411. // 表一和表二 数据删除
  1412. deleteDis1(scope) {
  1413. let father = this.$parent;
  1414. let totalData = this.recipe_tabs[this.recipe_tabs_c].totalTableD;
  1415. let index = scope.row.id - 1;
  1416. this.recipe_tabs[this.recipe_tabs_c].totalTableD.splice(index, 1);
  1417. totalData.filter((item, index) => {
  1418. // 调用 父级合理用药接口
  1419. // father.getRationalMed(item.medid)
  1420. return (item.id = index + 1);
  1421. });
  1422. this.recipe_tabs[this.recipe_tabs_c].tableData = totalData.filter(
  1423. (item, index) => {
  1424. return item.id % 2 != 0;
  1425. }
  1426. );
  1427. this.recipe_tabs[this.recipe_tabs_c].tableData1 = totalData.filter(
  1428. (item, index) => {
  1429. return item.id % 2 == 0;
  1430. }
  1431. );
  1432. this.countNowRecipeMoney();
  1433. },
  1434. clickName(scope) {
  1435. // 隐藏滚动条
  1436. if (scope.row.id % 2 == 0) {
  1437. document.getElementsByClassName(
  1438. "el-table__body-wrapper"
  1439. )[1].style.overflow = "hidden";
  1440. } else {
  1441. document.getElementsByClassName(
  1442. "el-table__body-wrapper"
  1443. )[0].style.overflow = "hidden";
  1444. }
  1445. this.medIndex = scope.$index;
  1446. this.clickPid = scope.row.medid;
  1447. this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1448. scope.row.id - 1
  1449. ].showSearch = !this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1450. scope.row.id - 1
  1451. ].showSearch;
  1452. this.recipe_tabs[this.recipe_tabs_c].totalTableD[scope.row.id - 1].key =
  1453. scope.row.name;
  1454. this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1455. scope.row.id - 1
  1456. ].search_i = 0;
  1457. debounce(this.getTableDrug(scope.row.key, 1, scope.row.id - 1), 10000);
  1458. setTimeout(() => {
  1459. // console.log(document.querySelectorAll('#searchD' + scope.row.id));
  1460. document.querySelectorAll("#searchD" + scope.row.id)[0].focus();
  1461. }, 800);
  1462. },
  1463. // 输入框获取 药品列表
  1464. searchDrug(e, scope) {
  1465. // 隐藏滚动条
  1466. if (scope.row.id % 2 == 0) {
  1467. document.getElementsByClassName(
  1468. "el-table__body-wrapper"
  1469. )[1].style.overflow = "hidden";
  1470. } else {
  1471. document.getElementsByClassName(
  1472. "el-table__body-wrapper"
  1473. )[0].style.overflow = "hidden";
  1474. }
  1475. let index = scope.row.id ? scope.row.id - 1 : 0;
  1476. // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD[index], '我是key')
  1477. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].key = e;
  1478. let ids = document.querySelectorAll("#operate2");
  1479. ids.forEach((item, index) => {
  1480. item.style["z-index"] = "auto";
  1481. });
  1482. // if (e != '') {
  1483. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1484. // scope.row.id - 1
  1485. // ].showSearch = true
  1486. // } else {
  1487. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1488. // scope.row.id - 1
  1489. // ].showSearch = false
  1490. // }
  1491. this.recipe_tabs[this.recipe_tabs_c].tableData = this.recipe_tabs[
  1492. this.recipe_tabs_c
  1493. ].totalTableD.filter((item, index) => {
  1494. return item.id % 2 != 0;
  1495. });
  1496. this.recipe_tabs[this.recipe_tabs_c].tableData1 = this.recipe_tabs[
  1497. this.recipe_tabs_c
  1498. ].totalTableD.filter((item, index) => {
  1499. return item.id % 2 == 0;
  1500. });
  1501. this.index = scope.row.id - 1;
  1502. // this.getTableDrug(scope.row.key, 1, scope.row.id - 1)
  1503. debounce(this.getTableDrug(scope.row.key, 1, index), 10000);
  1504. },
  1505. drugFocus(scope) {
  1506. this.medIndex = scope.$index;
  1507. },
  1508. drugBlur(e, scope) {
  1509. // 调用 父级合理用药接口
  1510. // father.getRationalMedForPlat(scope.row.medid)
  1511. // 失去焦点 释放滚动条
  1512. if (scope.row.id % 2 == 0) {
  1513. document.getElementsByClassName(
  1514. "el-table__body-wrapper"
  1515. )[1].style.overflow = "auto";
  1516. } else {
  1517. document.getElementsByClassName(
  1518. "el-table__body-wrapper"
  1519. )[0].style.overflow = "auto";
  1520. }
  1521. setTimeout(() => {
  1522. let index = scope.row.id ? scope.row.id - 1 : 0;
  1523. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].key = "";
  1524. let ids = document.querySelectorAll("#operate2");
  1525. ids.forEach((item, index) => {
  1526. item.style["z-index"] = "99";
  1527. });
  1528. this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
  1529. item.drugList = [];
  1530. });
  1531. this.recipe_tabs[this.recipe_tabs_c].tableData = this.recipe_tabs[
  1532. this.recipe_tabs_c
  1533. ].totalTableD.filter((item, index) => {
  1534. return item.id % 2 != 0;
  1535. });
  1536. this.recipe_tabs[this.recipe_tabs_c].tableData1 = this.recipe_tabs[
  1537. this.recipe_tabs_c
  1538. ].totalTableD.filter((item, index) => {
  1539. return item.id % 2 == 0;
  1540. });
  1541. }, 500);
  1542. },
  1543. drugBlur1(e, scope) {
  1544. // 调用 父级合理用药接口
  1545. // 失去焦点 展示滚动条
  1546. if (scope.row.id % 2 == 0) {
  1547. document.getElementsByClassName(
  1548. "el-table__body-wrapper"
  1549. )[1].style.overflow = "auto";
  1550. } else {
  1551. document.getElementsByClassName(
  1552. "el-table__body-wrapper"
  1553. )[0].style.overflow = "auto";
  1554. }
  1555. setTimeout(() => {
  1556. let index = scope.row.id ? scope.row.id - 1 : 0;
  1557. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].key = "";
  1558. this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  1559. index
  1560. ].showSearch = false;
  1561. let ids = document.querySelectorAll("#operate2");
  1562. ids.forEach((item, index) => {
  1563. item.style["z-index"] = "99";
  1564. });
  1565. this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
  1566. item.drugList = [];
  1567. });
  1568. this.recipe_tabs[this.recipe_tabs_c].tableData = this.recipe_tabs[
  1569. this.recipe_tabs_c
  1570. ].totalTableD.filter((item, index) => {
  1571. return item.id % 2 != 0;
  1572. });
  1573. this.recipe_tabs[this.recipe_tabs_c].tableData1 = this.recipe_tabs[
  1574. this.recipe_tabs_c
  1575. ].totalTableD.filter((item, index) => {
  1576. return item.id % 2 == 0;
  1577. });
  1578. }, 500);
  1579. },
  1580. // 合并表一 表二
  1581. arraySpanMethod1({ row, column, rowIndex, columnIndex }) {
  1582. // if (!row.name) {
  1583. // // document.getElementById('table1')
  1584. // return [1, 8];
  1585. // }
  1586. },
  1587. // 存为我的 协定方 提交
  1588. submitAgree() {
  1589. this.$refs.accordEdit.save();
  1590. return;
  1591. if (this.share == "") {
  1592. this.$message.error({
  1593. message: "请选择共享信息",
  1594. showClose: false,
  1595. type: "error"
  1596. });
  1597. return;
  1598. }
  1599. // 处理数据
  1600. let data = this.recipe_tabs;
  1601. let index = this.recipe_tabs_c;
  1602. let obj = {
  1603. rangtype: this.share,
  1604. curetype: data[index].bottom_form.doseType,
  1605. density: data[index].bottom_form.nongjian,
  1606. deploymentfree: data[index].bottom_form.specialDeploymentPrice,
  1607. frequency: data[index].bottom_form.num,
  1608. medicationtime: data[index].bottom_form.time,
  1609. fryingfee: data[index].bottom_form.agencyPrice,
  1610. markfree: data[index].bottom_form.systemOfCreamPrice,
  1611. name: this.getuserinfo.userid + new Date().toDateString(),
  1612. prescriptionDetailVos: [],
  1613. prescriptiontype: data[index].radio,
  1614. type: "0",
  1615. usrage: data[index].usege
  1616. };
  1617. data[index].totalTableD.forEach((item, index) => {
  1618. if (item.name) {
  1619. let obj1 = {
  1620. dose: item.dose,
  1621. drugid: item.medid,
  1622. drugname: item.name,
  1623. seqn: item.id,
  1624. specification: item.spec,
  1625. unit: item.unit,
  1626. usagestr: item.usage
  1627. };
  1628. obj.prescriptionDetailVos.push(obj1);
  1629. }
  1630. });
  1631. this.recipe_tabs[this.recipe_tabs_c].preType = "";
  1632. this.addAccordData(obj);
  1633. },
  1634. // 存为我的 协定方
  1635. saveToMine() {
  1636. this.getAccordShareList();
  1637. let hasDoseNum = true; // 是否有剂数
  1638. let hasData = true; // 是否有处方药品数据
  1639. let hasUse = true;
  1640. this.recipe_tabs.forEach(item => {
  1641. if (item.totalTableD.length < 2) {
  1642. hasData = false;
  1643. }
  1644. item.totalTableD.forEach(item1 => {
  1645. if (!item1.dose && item1.name) {
  1646. hasDoseNum = false;
  1647. }
  1648. if (!item1.usage && item1.name) {
  1649. hasUse = false;
  1650. }
  1651. });
  1652. });
  1653. if (!hasData) {
  1654. this.$message.error("请完善中药处方药品信息");
  1655. return false;
  1656. }
  1657. // if (!hasDoseNum) {
  1658. // this.$message.error("请完善中药处方剂量信息");
  1659. // return false;
  1660. // }
  1661. // if (!hasUse) {
  1662. // this.$message.error('请完善中药处方用法信息')
  1663. // return false
  1664. // }
  1665. this.showDialog = true;
  1666. let that = this;
  1667. setTimeout(() => {
  1668. let arr = that.deepCopy(
  1669. this.recipe_tabs[this.recipe_tabs_c].totalTableD
  1670. );
  1671. this.$refs.accordEdit.assignTableData(arr, "saveToMy");
  1672. // 剂型
  1673. this.$refs.accordEdit.form.doseType = this.recipe_tabs[
  1674. this.recipe_tabs_c
  1675. ].bottom_form.doseType;
  1676. // 剂数
  1677. this.$refs.accordEdit.form.doseNum = this.recipe_tabs[
  1678. this.recipe_tabs_c
  1679. ].bottom_form.doseNum;
  1680. // 处方用法
  1681. this.$refs.accordEdit.form.recipeUse = this.recipe_tabs[
  1682. this.recipe_tabs_c
  1683. ].bottom_form.usege;
  1684. // 每次
  1685. this.$refs.accordEdit.form.nongjian = this.recipe_tabs[
  1686. this.recipe_tabs_c
  1687. ].bottom_form.nongjian;
  1688. // 频次
  1689. this.$refs.accordEdit.form.times = this.recipe_tabs[
  1690. this.recipe_tabs_c
  1691. ].bottom_form.num;
  1692. // 服药时间
  1693. this.$refs.accordEdit.form.useTime = this.recipe_tabs[
  1694. this.recipe_tabs_c
  1695. ].bottom_form.time;
  1696. return;
  1697. this.$refs.accordEdit.totalTableD = arr;
  1698. this.$refs.accordEdit.form.cMedType = this.recipe_tabs[
  1699. this.recipe_tabs_c
  1700. ].radio;
  1701. this.$refs.accordEdit.form.doseType = this.recipe_tabs[
  1702. this.recipe_tabs_c
  1703. ].bottom_form.doseType;
  1704. console.log(this.$refs.accordEdit, "acc");
  1705. this.$refs.accordEdit.tableData = this.$refs.accordEdit.totalTableD.filter(
  1706. item => {
  1707. return item.id % 2 != 0;
  1708. }
  1709. );
  1710. this.$refs.accordEdit.tableData1 = this.$refs.accordEdit.totalTableD.filter(
  1711. item => {
  1712. return item.id % 2 == 0;
  1713. }
  1714. );
  1715. }, 200);
  1716. return;
  1717. },
  1718. deepCopy(source) {
  1719. if (!source instanceof Object) return source; //如果不是对象的话直接返回
  1720. let target = Array.isArray(source) ? [] : {}; //数组兼容
  1721. for (var k in source) {
  1722. if (source.hasOwnProperty(k)) {
  1723. if (typeof source[k] === "object") {
  1724. target[k] = this.deepCopy(source[k]);
  1725. } else {
  1726. target[k] = source[k];
  1727. }
  1728. }
  1729. }
  1730. return target;
  1731. },
  1732. // 提交处方
  1733. submit() {
  1734. this.$emit("submit");
  1735. },
  1736. // 修改省的数据
  1737. proC(e) {
  1738. // console.log(e)
  1739. this.recipe_tabs[this.recipe_tabs_c].bottom_form.city = "";
  1740. this.recipe_tabs[this.recipe_tabs_c].bottom_form.area = "";
  1741. this.getArea(e, 1);
  1742. },
  1743. cityC(e) {
  1744. this.recipe_tabs[this.recipe_tabs_c].bottom_form.area = "";
  1745. this.getArea(e, 2);
  1746. },
  1747. // 获取 合理用药数据
  1748. async _getRationalMed(id) {
  1749. let ids = [];
  1750. let child = this;
  1751. child.recipe_tabs[child.recipe_tabs_c].totalTableD.forEach(item => {
  1752. if (item.name) {
  1753. ids.push(item.medid);
  1754. }
  1755. });
  1756. let idsIndex = 0;
  1757. ids.forEach((item, index) => {
  1758. if (item == id) {
  1759. idsIndex = index;
  1760. }
  1761. });
  1762. ids.splice(idsIndex, 1);
  1763. let res = await getRationalMed({
  1764. matID: id,
  1765. orgId: this.getuserinfo.organizationid,
  1766. matIds: ids
  1767. });
  1768. if (res.code == 0 && res.message) {
  1769. this.maxDose = res.data.matmaxdosage;
  1770. this.minDose = res.data.matmindosage;
  1771. this.doseId = id;
  1772. }
  1773. },
  1774. // 获取平台合理用药数据
  1775. async _getRationalMedForPlat(id) {
  1776. let ids = [];
  1777. let child = this;
  1778. child.recipe_tabs[child.recipe_tabs_c].totalTableD.forEach(item => {
  1779. if (item.name) {
  1780. ids.push(item.medid);
  1781. }
  1782. });
  1783. let idsIndex = 0;
  1784. ids.forEach((item, index) => {
  1785. if (item == id) {
  1786. idsIndex = index;
  1787. }
  1788. });
  1789. ids.splice(idsIndex, 1);
  1790. let res = await getRationalMedForPlat({
  1791. matID: id,
  1792. orgId: this.getuserinfo.organizationid,
  1793. matIds: ids
  1794. });
  1795. if (res.code == 0 && res.message) {
  1796. this.maxDose = res.data.matmaxdosage;
  1797. this.minDose = res.data.matmindosage;
  1798. this.doseId = id;
  1799. }
  1800. },
  1801. //添加协定方数据
  1802. async addAccordData(data) {
  1803. const loading = this.$loading({
  1804. lock: true,
  1805. text: "正在保存",
  1806. spinner: "el-icon-loading",
  1807. background: "rgba(0, 0, 0, 0.7)"
  1808. });
  1809. let res = await addAccordData(data).catch(err => {
  1810. loading.close();
  1811. });
  1812. if (res.ResultCode == 0) {
  1813. loading.close();
  1814. this.$message({
  1815. type: "success",
  1816. message: "保存成功",
  1817. showClose: true
  1818. });
  1819. this.showDialog = false;
  1820. setTimeout(() => {
  1821. this.$router.push({
  1822. path: "/index/accord"
  1823. });
  1824. }, 2000);
  1825. }
  1826. },
  1827. // 通过中药类型获取药房id
  1828. async getPharmacyID() {
  1829. return;
  1830. let res = await getPharmacyID({
  1831. type: this.recipe_tabs[this.recipe_tabs_c].radio.split("@")[1]
  1832. });
  1833. if (res.ResultCode == 0) {
  1834. if (res.ResultInfo == "") {
  1835. this.$message({
  1836. showClose: false,
  1837. message: "当前类型无法开药,请切换类型",
  1838. type: "error"
  1839. });
  1840. return;
  1841. }
  1842. this.recipe_tabs[this.recipe_tabs_c].pharmacyID = res.ResultInfo;
  1843. this.changePharmacy(this.recipe_tabs[this.recipe_tabs_c].lastType);
  1844. this.getPharmacyMsg(res.ResultInfo);
  1845. }
  1846. },
  1847. // 选择药房
  1848. async customerQuery() {
  1849. let res = await customerQuery({
  1850. type: 0
  1851. });
  1852. if (res.ResultCode == 0) {
  1853. let pharmacyTypes = [];
  1854. res.Data.forEach(item => {
  1855. item.dosageForms = item.dosageForms.split(",");
  1856. item.dosageForms.forEach(item1 => {
  1857. pharmacyTypes.push({
  1858. type: item1,
  1859. ptype: item.pid + "@" + item1,
  1860. name: item.displayName // + this.getRadioName(item1)
  1861. });
  1862. });
  1863. });
  1864. this.recipe_tabs[this.recipe_tabs_c].pharmacyID = res.Data[0].pid;
  1865. this.recipe_tabs[this.recipe_tabs_c].radio = pharmacyTypes[0].ptype;
  1866. this.recipe_tabs[this.recipe_tabs_c].lastType = pharmacyTypes[0].ptype;
  1867. this.pharmacyList = res.Data;
  1868. this.pharmacyTypes = pharmacyTypes;
  1869. this.$forceUpdate();
  1870. this.getPharmacyMsg(res.Data[0].pid);
  1871. }
  1872. },
  1873. // 获取药房id
  1874. async _getPharmacyIDS() {
  1875. let res = await getPharmacyIDS();
  1876. if (res.ResultCode == 0) {
  1877. this.pharmacyList = res.Data;
  1878. res.Data.forEach(item => {
  1879. if (item.key.indexOf("共享") != -1) {
  1880. this.recipe_tabs[this.recipe_tabs_c].pharmacyID = item.value;
  1881. this.getPharmacyMsg(item.value);
  1882. }
  1883. });
  1884. this.$forceUpdate();
  1885. }
  1886. },
  1887. // 切换中药类型时 切换 药房 获取 药品里面有没有这条数据
  1888. async changePharmacy(type) {
  1889. let drugIds = [];
  1890. const loading = this.$loading({
  1891. lock: true,
  1892. text: "处理中,请稍后....",
  1893. spinner: "el-icon-loading",
  1894. background: "rgba(0, 0, 0, 0.7)"
  1895. });
  1896. this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(item => {
  1897. if (item.name) {
  1898. let idDose = item.medid + "&" + (item.dose || item.oldDose);
  1899. // drugIds.push(item.medid)
  1900. item.oldDose = item.dose;
  1901. drugIds.push(idDose);
  1902. }
  1903. });
  1904. let pharmacyName = "";
  1905. let type1 = this.recipe_tabs[this.recipe_tabs_c].radio.split("@")[1];
  1906. type = type.split("@")[1];
  1907. this.recipe_tabs[this.recipe_tabs_c].pharmacyID = this.recipe_tabs[
  1908. this.recipe_tabs_c
  1909. ].radio.split("@")[0];
  1910. let params = {
  1911. type: type1,
  1912. pharmacyid: this.recipe_tabs[this.recipe_tabs_c].pharmacyID,
  1913. drugIds,
  1914. preType: this.recipe_tabs[this.recipe_tabs_c].preType,
  1915. oldType: type
  1916. };
  1917. let res = await changePharmacy(params).catch(err => {
  1918. loading.close();
  1919. });
  1920. if (res.ResultCode == 0) {
  1921. this.recipe_tabs[this.recipe_tabs_c].totalTableD.forEach(
  1922. (item1, index1) => {
  1923. if (item1.name) {
  1924. res.Data.forEach((item, index) => {
  1925. if (item == item1.medid) {
  1926. item1.color = "red";
  1927. item1.oldDose = item1.oldDose;
  1928. }
  1929. // console.log(item instanceof Object);
  1930. if (item instanceof Object && item.oldYpid == item1.medid) {
  1931. item1 = {
  1932. id: 2,
  1933. name: item.ypmc,
  1934. spec: item.gg, // 规格
  1935. dose: item.dose, // 剂量
  1936. unit: item.dw, // 单位
  1937. usage: item1.usagestr || item1.usage || "", // 用法
  1938. // usage: "",
  1939. // price: item.lsjg,
  1940. price: item.price,
  1941. total: (item.price * item.dose).toFixed(2),
  1942. inventory: item.kc, // 库存
  1943. key: "",
  1944. search_i: index,
  1945. medid: item.pid, // 药品id
  1946. originname: item.cdmc, // 产地名称
  1947. showSearch: false,
  1948. usageList: [],
  1949. oldDose: item1.oldDose
  1950. };
  1951. item1.color = "#000";
  1952. }
  1953. this.$set(
  1954. this.recipe_tabs[this.recipe_tabs_c].totalTableD,
  1955. index1,
  1956. item1
  1957. );
  1958. });
  1959. }
  1960. }
  1961. );
  1962. this.recipe_tabs[this.recipe_tabs_c].totalTableD.filter(
  1963. (item, index) => {
  1964. this.getSelectType("中药药品用法", index);
  1965. return (item.id = index + 1);
  1966. }
  1967. );
  1968. this.recipe_tabs[this.recipe_tabs_c].tableData = this.recipe_tabs[
  1969. this.recipe_tabs_c
  1970. ].totalTableD.filter((item, index) => {
  1971. return item.id % 2 != 0;
  1972. });
  1973. this.recipe_tabs[this.recipe_tabs_c].tableData1 = this.recipe_tabs[
  1974. this.recipe_tabs_c
  1975. ].totalTableD.filter((item, index) => {
  1976. return item.id % 2 == 0;
  1977. });
  1978. // this.recipe_tabs[this.recipe_tabs_c].lastType = this.recipe_tabs[this.recipe_tabs_c]
  1979. // .radio // 存储这一次的 药房类型
  1980. this.recipe_tabs[this.recipe_tabs_c].lastType = this.recipe_tabs[
  1981. this.recipe_tabs_c
  1982. ].radio; // 存储这一次的 药房类型
  1983. loading.close();
  1984. // console.log(this.recipe_tabs[this.recipe_tabs_c].totalTableD);
  1985. this.getPharmacyMsg(this.recipe_tabs[this.recipe_tabs_c].pharmacyID);
  1986. setTimeout(() => {
  1987. this.countNowRecipeMoney();
  1988. }, 200);
  1989. }
  1990. },
  1991. // 获取寄到本院地址数据
  1992. async getAddressForHospital() {
  1993. let res = await getAddressForHospital({});
  1994. if (res.ResultCode == 0) {
  1995. this.recipe_tabs[this.recipe_tabs_c].bottom_form.province =
  1996. res.Data.province;
  1997. this.recipe_tabs[this.recipe_tabs_c].bottom_form.city = res.Data.city;
  1998. this.recipe_tabs[this.recipe_tabs_c].bottom_form.area =
  1999. res.Data.district;
  2000. this.getArea(res.Data.province, 1);
  2001. this.getArea(res.Data.city, 2);
  2002. this.recipe_tabs[this.recipe_tabs_c].bottom_form.address =
  2003. res.Data.adressdetail;
  2004. }
  2005. },
  2006. // 获取表格药品列表
  2007. async getTableDrug(key, page, index, load = true) {
  2008. if (!load) return;
  2009. let pharmacyName = "";
  2010. // let type = 0
  2011. let type = this.recipe_tabs[this.recipe_tabs_c].radio.split("@")[1];
  2012. this.pharmacyList.forEach(item => {
  2013. if (item.pid == this.recipe_tabs[this.recipe_tabs_c].pharmacyID) {
  2014. pharmacyName = item.pharmacyName;
  2015. }
  2016. });
  2017. let params = {
  2018. key: key,
  2019. limit: 5,
  2020. page: page,
  2021. type: type,
  2022. pharmacyid: this.recipe_tabs[this.recipe_tabs_c].pharmacyID
  2023. };
  2024. let res = await getTableDrug(params);
  2025. if (res.ResultCode == 0) {
  2026. // 计算方式3
  2027. if (this.countWay == "3") {
  2028. res.Data.Items.filter(item => {
  2029. return (item.price = Number(item.price).toFixed(2));
  2030. });
  2031. }
  2032. if (page <= res.Data.TotalPageCount) {
  2033. if (page == 1) {
  2034. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList =
  2035. res.Data.Items;
  2036. } else {
  2037. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList = [
  2038. ...this.recipe_tabs[this.recipe_tabs_c].totalTableD[index]
  2039. .drugList,
  2040. ...res.Data.Items
  2041. ];
  2042. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].page += 1;
  2043. }
  2044. if (
  2045. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].drugList
  2046. .length == res.Data.TotalRecordCount
  2047. ) {
  2048. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].loadMore = false
  2049. }
  2050. this.recipe_tabs[this.recipe_tabs_c].totalTableD.filter(
  2051. (item, index) => {
  2052. return (item.id = index + 1);
  2053. }
  2054. );
  2055. this.recipe_tabs[this.recipe_tabs_c].tableData = this.recipe_tabs[
  2056. this.recipe_tabs_c
  2057. ].totalTableD.filter((item, index) => {
  2058. return item.id % 2 != 0;
  2059. });
  2060. this.recipe_tabs[this.recipe_tabs_c].tableData1 = this.recipe_tabs[
  2061. this.recipe_tabs_c
  2062. ].totalTableD.filter((item, index) => {
  2063. return item.id % 2 == 0;
  2064. });
  2065. } else {
  2066. this.recipe_tabs[this.recipe_tabs_c].totalTableD[
  2067. index
  2068. ].loadMore = false;
  2069. }
  2070. }
  2071. },
  2072. // 获取省数据
  2073. async getProver() {
  2074. let res = await getProver();
  2075. if (res.ResultCode == 0) {
  2076. this.recipe_tabs[this.recipe_tabs_c].bottom_form.provinceList =
  2077. res.Data;
  2078. this.provinceList1 = res.Data;
  2079. }
  2080. },
  2081. // 获取市数据
  2082. async getArea(code, type) {
  2083. let res = await getArea(code);
  2084. if (res.ResultCode == 0) {
  2085. if (type == 1) {
  2086. this.recipe_tabs[this.recipe_tabs_c].bottom_form.cityList = res.Data;
  2087. } else {
  2088. this.recipe_tabs[this.recipe_tabs_c].bottom_form.areaList = res.Data;
  2089. }
  2090. }
  2091. },
  2092. // 根据表格获取数据类型
  2093. async getSelectType(data, index) {
  2094. let res = await getSelectType(data);
  2095. if (data == "中药药品用法") {
  2096. if (this.recipe_tabs[this.recipe_tabs_c].totalTableD[index]["usage"]) {
  2097. // res.Data.forEach(item => {
  2098. // if (
  2099. // item.value ===
  2100. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[index]['usage']
  2101. // ) {
  2102. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[index]['usage'] =
  2103. // item.key;
  2104. // } else {
  2105. // this.recipe_tabs[this.recipe_tabs_c].totalTableD[index]['usage'] =
  2106. // "";
  2107. // }
  2108. // });
  2109. }
  2110. this.recipe_tabs[this.recipe_tabs_c].totalTableD[index].usageList =
  2111. res.Data;
  2112. this.usageList = res.Data;
  2113. } else if (data == "剂型") {
  2114. this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseTypeList =
  2115. res.Data;
  2116. if (this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseType) return;
  2117. this.recipe_tabs[this.recipe_tabs_c].bottom_form.doseType =
  2118. res.Data[0].key;
  2119. } else if (data == "处方用法") {
  2120. this.recipe_tabs[this.recipe_tabs_c].bottom_form.usegeList = res.Data;
  2121. if (this.recipe_tabs[this.recipe_tabs_c].bottom_form.usege) return;
  2122. this.recipe_tabs[this.recipe_tabs_c].bottom_form.usege =
  2123. res.Data[0].key;
  2124. } else if (data == "中药服药时间") {
  2125. this.recipe_tabs[this.recipe_tabs_c].bottom_form.timeList = res.Data;
  2126. } else if (data == "中药频次") {
  2127. this.recipe_tabs[this.recipe_tabs_c].bottom_form.numList = res.Data;
  2128. }
  2129. // this.$forceUpdate()
  2130. },
  2131. // 获取制膏费用
  2132. async getPharmacyMsg(data) {
  2133. let res = await getPharmacyMsg(data);
  2134. if (res.ResultCode == 0) {
  2135. res.Data.agencyPrice = res.Data.agencyPrice ? res.Data.agencyPrice : 0;
  2136. res.Data.deliveryPrice = res.Data.deliveryPrice
  2137. ? res.Data.deliveryPrice
  2138. : 0;
  2139. res.Data.specialDeploymentPrice = res.Data.specialDeploymentPrice
  2140. ? res.Data.specialDeploymentPrice
  2141. : 0;
  2142. res.Data.systemOfCreamPrice = res.Data.systemOfCreamPrice
  2143. ? res.Data.systemOfCreamPrice
  2144. : 0;
  2145. this.recipe_tabs[this.recipe_tabs_c].bottom_form.moneyMsg = res.Data;
  2146. }
  2147. },
  2148. // 获取共享至信息
  2149. async getAccordShareList() {
  2150. let res = await getAccordShareList();
  2151. if (res.ResultCode == 0) {
  2152. this.shareSelect = res.Data;
  2153. }
  2154. },
  2155. // 获取医共体计算方式配置
  2156. async getDataByKey() {
  2157. let res = await getDataByKey({
  2158. key: "countMenthod ",
  2159. organizationid: this.getuserinfo.organizationid
  2160. });
  2161. if (res.ResultCode == 0) {
  2162. if (res.ResultInfo == "0") {
  2163. this.countWay = "1";
  2164. } else if (res.ResultInfo == "1") {
  2165. this.countWay = "2";
  2166. } else if (res.ResultInfo == "2") {
  2167. this.countWay = "3";
  2168. }
  2169. }
  2170. },
  2171. // 获取患者地址信息
  2172. async getPatAddress() {
  2173. if (!this.getPatiensInfo.basisPatient.pid) return;
  2174. let res = await getPatAddress({
  2175. patId: this.getPatiensInfo.basisPatient.pid
  2176. });
  2177. if (res.ResultCode == 0) {
  2178. this.recipe_tabs[this.recipe_tabs_c].bottom_form.address =
  2179. res.Data.detailadress;
  2180. this.recipe_tabs[this.recipe_tabs_c].bottom_form.savename =
  2181. res.Data.name;
  2182. this.recipe_tabs[this.recipe_tabs_c].bottom_form.phone = res.Data.phone;
  2183. this.recipe_tabs[this.recipe_tabs_c].bottom_form.province =
  2184. res.Data.province;
  2185. this.recipe_tabs[this.recipe_tabs_c].bottom_form.city = res.Data.city;
  2186. this.recipe_tabs[this.recipe_tabs_c].bottom_form.area =
  2187. res.Data.district;
  2188. this.getArea(res.Data.province, 1);
  2189. this.getArea(res.Data.city, 2);
  2190. }
  2191. }
  2192. },
  2193. filters: {
  2194. formatTotal(val) {
  2195. if (val == 0) return val;
  2196. // console.log(val, 'val');
  2197. if (parseInt(val) === parseFloat(val)) {
  2198. return val;
  2199. } else {
  2200. let v = String(val).split(".");
  2201. if (v[1].length > 2) {
  2202. // 2
  2203. return val.toFixed(2); //
  2204. } else {
  2205. return val;
  2206. }
  2207. }
  2208. }
  2209. },
  2210. computed: {
  2211. ...mapGetters(["getuserinfo", "getPatiensInfo"])
  2212. },
  2213. watch: {
  2214. getuserinfo: {
  2215. deep: true,
  2216. handler() {
  2217. if (this.getuserinfo.organizationid) {
  2218. this.getDataByKey();
  2219. }
  2220. }
  2221. }
  2222. }
  2223. };
  2224. </script>
  2225. <style lang="scss" scoped>
  2226. @import "../style/common.scss";
  2227. .med-accord {
  2228. .table-container {
  2229. min-height: 200px !important;
  2230. }
  2231. .table-show {
  2232. height: auto !important;
  2233. }
  2234. }
  2235. .table-header {
  2236. border-bottom: 2px solid #dedede;
  2237. padding: 0px 0;
  2238. .table-label {
  2239. .label-item {
  2240. cursor: pointer;
  2241. width: 104px;
  2242. border-right: 2px solid #eaeaea;
  2243. div {
  2244. color: #666;
  2245. // transform: rotate(45deg);
  2246. font-size: 16px;
  2247. margin-left: 8px;
  2248. margin-top: 1px;
  2249. font-weight: 600;
  2250. }
  2251. img {
  2252. width: 20px;
  2253. margin-left: 8px;
  2254. }
  2255. }
  2256. span {
  2257. font-size: 14px;
  2258. font-family: PingFang SC;
  2259. font-weight: 400;
  2260. color: #666666;
  2261. }
  2262. .l_active {
  2263. color: #5386f6;
  2264. }
  2265. }
  2266. }
  2267. .add-presc {
  2268. width: 70px;
  2269. height: 26px;
  2270. background: #ffae45;
  2271. border-radius: 4px;
  2272. font-size: 12px;
  2273. font-family: PingFang SC;
  2274. font-weight: 400;
  2275. color: #ffffff;
  2276. cursor: pointer;
  2277. margin-right: 10px;
  2278. }
  2279. #chineseM {
  2280. .table-container {
  2281. padding: 5px 0px;
  2282. height: 340px;
  2283. overflow: auto;
  2284. .t-con-header {
  2285. margin-bottom: 0px;
  2286. .t-con-radio {
  2287. flex: 1;
  2288. padding-bottom: 5px;
  2289. border-bottom: 1px solid #eaeaea;
  2290. }
  2291. .t-radio-title {
  2292. width: 82px;
  2293. font-size: 16px;
  2294. font-family: PingFang SC;
  2295. font-weight: 400;
  2296. color: #333333;
  2297. }
  2298. .t-radio-group {
  2299. flex: 1;
  2300. }
  2301. .add-presc1 {
  2302. width: 84px;
  2303. height: 34px;
  2304. background: #ffae45;
  2305. border-radius: 4px;
  2306. font-size: 14px;
  2307. font-family: PingFang SC;
  2308. font-weight: bold;
  2309. color: #ffffff;
  2310. cursor: pointer;
  2311. }
  2312. }
  2313. }
  2314. }
  2315. .table-show {
  2316. width: 100%;
  2317. min-height: 212px;
  2318. overflow: auto;
  2319. // background: #5386F6;
  2320. // overflow: hidden;
  2321. z-index: 999;
  2322. position: relative;
  2323. .table-left-body {
  2324. width: 50%;
  2325. position: relative;
  2326. perspective: 100px;
  2327. // padding-bottom: 10px;
  2328. }
  2329. .table-left {
  2330. width: 100%;
  2331. overflow-y: auto;
  2332. border: 1px solid #dedede;
  2333. box-sizing: border-box;
  2334. .table-l-hader {
  2335. white-space: nowrap;
  2336. div {
  2337. display: inline-block;
  2338. // padding: 15px 10px;
  2339. background: #f3fffb;
  2340. text-align: center;
  2341. height: 48px;
  2342. line-height: 48px;
  2343. border: 1px solid #dedede;
  2344. border-bottom: 0 !important;
  2345. // border-top: 0 !important;
  2346. }
  2347. .med-name {
  2348. margin-left: 50px;
  2349. }
  2350. .kucun {
  2351. padding-right: 120px;
  2352. }
  2353. .fixed-r {
  2354. position: fixed;
  2355. right: 0;
  2356. }
  2357. .fixed-left {
  2358. position: fixed;
  2359. left: 0;
  2360. }
  2361. }
  2362. .table-l-item {
  2363. white-space: nowrap;
  2364. .bg-green {
  2365. .div1 {
  2366. background: #f3fffb;
  2367. border: 1px solid #dedede;
  2368. }
  2369. }
  2370. .div1 {
  2371. display: inline-block;
  2372. // padding: 15px 10px;
  2373. background: #ffffff;
  2374. text-align: center;
  2375. height: 53px;
  2376. line-height: 53px;
  2377. border: 1px solid #dedede;
  2378. z-index: 9999;
  2379. border-top: 0 !important;
  2380. }
  2381. .med-name {
  2382. margin-left: 50px;
  2383. }
  2384. .kucun {
  2385. padding-right: 120px;
  2386. border-right: 1px solid #dedede;
  2387. }
  2388. .fixed-r {
  2389. position: fixed;
  2390. right: 0;
  2391. }
  2392. .fixed-left {
  2393. position: fixed;
  2394. left: 0;
  2395. // border-left: 1px solid #DEDEDE;
  2396. }
  2397. .no-data {
  2398. width: 100%;
  2399. box-sizing: border-box;
  2400. // border-top: 1px solid #DEDEDE;
  2401. position: relative;
  2402. left: 0;
  2403. right: 0;
  2404. bottom: 0px;
  2405. // float: left;
  2406. }
  2407. }
  2408. }
  2409. }
  2410. .operate {
  2411. width: 100%;
  2412. height: 100%;
  2413. display: flex;
  2414. align-items: center;
  2415. justify-content: space-around;
  2416. img {
  2417. width: 16px;
  2418. }
  2419. }
  2420. .bottom-input {
  2421. background: #fff;
  2422. padding: 12.5px 30px 12.5px 52px;
  2423. position: relative;
  2424. // z-index: 999;
  2425. // perspective: 100px;
  2426. .div {
  2427. width: 154px;
  2428. }
  2429. .table-choose {
  2430. z-index: 9999;
  2431. width: 332px;
  2432. height: 221px;
  2433. background: #ffffff;
  2434. border: 2px solid #d8d8d8;
  2435. position: relative;
  2436. top: 2px;
  2437. left: -48px;
  2438. overflow: auto;
  2439. .table-choose-h {
  2440. background: #f3fffb;
  2441. div {
  2442. height: 36px;
  2443. width: 73px;
  2444. }
  2445. div:first-child {
  2446. width: 115px;
  2447. }
  2448. }
  2449. .t-c-b {
  2450. cursor: pointer;
  2451. height: 180px;
  2452. .td {
  2453. background: #f3fffb;
  2454. }
  2455. p {
  2456. border: 1px solid #ededed;
  2457. height: 36px;
  2458. width: 73px;
  2459. // flex: 1;
  2460. box-sizing: border-box;
  2461. }
  2462. p:first-child {
  2463. width: 115px;
  2464. }
  2465. }
  2466. }
  2467. }
  2468. .table-bottom {
  2469. // position: absolute;
  2470. // bottom: 80px;
  2471. // right: 0;
  2472. // left: 0;
  2473. padding: 0 10px;
  2474. // margin-top: 241px;
  2475. margin-top: 5px;
  2476. z-index: -1;
  2477. .header-about {
  2478. .item {
  2479. margin-right: 5px;
  2480. margin-bottom: 8px;
  2481. span {
  2482. font-size: 14px;
  2483. font-family: PingFang SC;
  2484. font-weight: 400;
  2485. color: #333333;
  2486. }
  2487. .div1 {
  2488. width: 40px;
  2489. }
  2490. .div2 {
  2491. width: 60px;
  2492. }
  2493. .city1 {
  2494. width: 80px;
  2495. }
  2496. .div3 {
  2497. width: 70px;
  2498. }
  2499. .div4 {
  2500. width: 160px;
  2501. }
  2502. .div5 {
  2503. width: 88px;
  2504. }
  2505. .input-suffix {
  2506. line-height: 28px;
  2507. }
  2508. }
  2509. .right {
  2510. width: 62px;
  2511. height: 26px;
  2512. background: #ffae45;
  2513. border-radius: 4px;
  2514. font-size: 12px;
  2515. font-family: PingFang SC;
  2516. font-weight: 400;
  2517. color: #ffffff;
  2518. margin-bottom: 10px;
  2519. cursor: pointer;
  2520. }
  2521. }
  2522. }
  2523. .table-b-bottom {
  2524. padding: 5px 5px;
  2525. border-top: 2px solid #dedede;
  2526. margin-top: 10px;
  2527. // position: absolute;
  2528. // bottom: 0;
  2529. // left: 0;
  2530. // right: 0;
  2531. .t-b-l-item {
  2532. font-size: 14px;
  2533. font-family: PingFang SC;
  2534. font-weight: 400;
  2535. color: #333333;
  2536. margin-right: 8px;
  2537. span {
  2538. color: #ff6245;
  2539. }
  2540. }
  2541. .t-b-b-right {
  2542. div {
  2543. width: 130px;
  2544. height: 46px;
  2545. background: #ffae45;
  2546. border-radius: 4px;
  2547. font-size: 16px;
  2548. font-family: PingFang SC;
  2549. font-weight: 500;
  2550. color: #ffffff;
  2551. cursor: pointer;
  2552. }
  2553. .bg-green {
  2554. background: #5386f6;
  2555. margin-left: 20px;
  2556. }
  2557. }
  2558. }
  2559. // 中成药 和适宜技术配方
  2560. .chinese_medicine {
  2561. padding: 0 37px;
  2562. .clearer {
  2563. width: 84px;
  2564. height: 34px;
  2565. background: #ffae45;
  2566. border-radius: 4px;
  2567. font-size: 14px;
  2568. font-family: PingFang SC;
  2569. font-weight: bold;
  2570. color: #ffffff;
  2571. cursor: pointer;
  2572. margin-bottom: 20px;
  2573. }
  2574. .c-m-table {
  2575. width: 100%;
  2576. overflow: hidden;
  2577. .unit {
  2578. font-size: 14px;
  2579. font-family: PingFang SC;
  2580. font-weight: 400;
  2581. color: #000000;
  2582. // margin-left: 10px;
  2583. }
  2584. .input {
  2585. width: 40px;
  2586. }
  2587. }
  2588. }
  2589. .operate {
  2590. width: 100%;
  2591. height: 100%;
  2592. display: flex;
  2593. align-items: center;
  2594. justify-content: space-around;
  2595. img {
  2596. width: 16px;
  2597. }
  2598. }
  2599. .operate2 {
  2600. position: absolute;
  2601. z-index: 99;
  2602. }
  2603. .operate1 {
  2604. position: fixed;
  2605. width: 50px;
  2606. // background: red;
  2607. right: 15px;
  2608. // top: 63px;
  2609. text-align: right;
  2610. img {
  2611. width: 16px;
  2612. }
  2613. }
  2614. .bottom-input {
  2615. background: #fff;
  2616. padding: 12.5px 30px 12.5px 52px;
  2617. position: relative;
  2618. // z-index: 999;
  2619. // perspective: 100px;
  2620. .div {
  2621. width: 154px;
  2622. }
  2623. .table-choose {
  2624. // z-index: 9999;
  2625. width: 332px;
  2626. height: 221px;
  2627. background: #ffffff;
  2628. border: 2px solid #d8d8d8;
  2629. position: relative;
  2630. top: 2px;
  2631. left: -48px;
  2632. overflow: auto;
  2633. .table-choose-h {
  2634. background: #f3fffb;
  2635. div {
  2636. height: 36px;
  2637. width: 73px;
  2638. }
  2639. div:first-child {
  2640. width: 115px;
  2641. }
  2642. }
  2643. .t-c-b {
  2644. cursor: pointer;
  2645. height: 180px;
  2646. .td {
  2647. background: #f3fffb;
  2648. }
  2649. p {
  2650. border: 1px solid #ededed;
  2651. height: 36px;
  2652. width: 73px;
  2653. // flex: 1;
  2654. box-sizing: border-box;
  2655. }
  2656. p:first-child {
  2657. width: 115px;
  2658. }
  2659. }
  2660. }
  2661. }
  2662. .t_dose {
  2663. position: relative;
  2664. // perspective: 100px;
  2665. .dose-section {
  2666. z-index: 999999 !important;
  2667. position: fixed;
  2668. width: 50px;
  2669. left: 136px;
  2670. // right: 0;
  2671. top: 8px;
  2672. height: 22px;
  2673. line-height: 22px;
  2674. border-radius: 4px;
  2675. background: rgba($color: #000000, $alpha: 0.7);
  2676. color: #fff;
  2677. span {
  2678. font-size: 12px;
  2679. }
  2680. }
  2681. }
  2682. .table-choose3 {
  2683. z-index: 999999 !important;
  2684. width: 332px;
  2685. height: 221px;
  2686. background: #ffffff;
  2687. border: 2px solid #d8d8d8;
  2688. // position: absolute;
  2689. position: fixed;
  2690. top: 44px;
  2691. // left: 0px;
  2692. left: 84px;
  2693. // top: 0;
  2694. // top: 40px;
  2695. // left: 0px;
  2696. margin-top: 19px;
  2697. // left: 0px;
  2698. // top: 0px;
  2699. overflow: auto;
  2700. // z-index: 999 !important;
  2701. .table-choose-h {
  2702. background: #f3fffb;
  2703. div {
  2704. height: 36px;
  2705. width: 73px;
  2706. }
  2707. div:first-child {
  2708. width: 115px;
  2709. }
  2710. }
  2711. .t-c-b {
  2712. cursor: pointer;
  2713. height: 180px;
  2714. .td {
  2715. background: #f3fffb;
  2716. }
  2717. p {
  2718. border: 1px solid #ededed;
  2719. height: 36px;
  2720. width: 73px;
  2721. // flex: 1;
  2722. box-sizing: border-box;
  2723. }
  2724. p:first-child {
  2725. width: 115px;
  2726. }
  2727. }
  2728. }
  2729. .header-about::v-deep .el-input__inner {
  2730. padding: 0 5px;
  2731. }
  2732. .header-about::v-deep .el-checkbox {
  2733. margin-right: 5px;
  2734. }
  2735. .header-about::v-deep .el-checkbox__label {
  2736. padding-left: 5px;
  2737. }
  2738. .table-container::v-deep .el-radio {
  2739. margin-right: 5px;
  2740. }
  2741. .table-container::v-deep .el-radio__label {
  2742. padding-left: 2px;
  2743. font-size: 12px;
  2744. }
  2745. .table-show::v-deep .el-table {
  2746. // z-index: 999;
  2747. }
  2748. .table-show::v-deep .el-table th {
  2749. padding: 2px 0;
  2750. }
  2751. .table-show::v-deep .el-table td {
  2752. padding: 2px 0;
  2753. }
  2754. .table-show::v-deep .el-table__empty-block {
  2755. min-height: 29px;
  2756. }
  2757. .table-left-body::v-deep .el-table th {
  2758. background: rgba($color: #5386f6, $alpha: 0.1);
  2759. }
  2760. .collapse ::v-deep .el-collapse-item__content {
  2761. padding-bottom: 5px;
  2762. }
  2763. .c-m-table::v-deep .el-table .cell {
  2764. text-align: center;
  2765. }
  2766. .table-show::v-deep .el-table .cell {
  2767. text-align: center;
  2768. padding: 0 0;
  2769. }
  2770. .c-m-table::v-deep .el-select input {
  2771. padding: 0 15px 0 5px;
  2772. }
  2773. .table-show ::v-deep .el-select input {
  2774. padding: 0 15px 0 5px;
  2775. }
  2776. .t_dose::v-deep .el-input__inner {
  2777. // text-align: left;
  2778. padding: 0 5px !important;
  2779. }
  2780. .city::v-deep .el-select input {
  2781. padding: 0 20px 0 10px;
  2782. // height: 32px;
  2783. }
  2784. .xuewei::v-deep .el-select {
  2785. width: 100%;
  2786. }
  2787. .form-item {
  2788. margin-bottom: 20px;
  2789. span {
  2790. font-size: 16px;
  2791. font-family: PingFang SC;
  2792. font-weight: 400;
  2793. color: #ff3a3a;
  2794. display: inline-block;
  2795. width: 8px;
  2796. }
  2797. .name {
  2798. font-size: 16px;
  2799. font-family: PingFang SC;
  2800. font-weight: 400;
  2801. color: #333;
  2802. }
  2803. .input {
  2804. width: 260px;
  2805. }
  2806. }
  2807. .operate2::v-deep .el-input__inner {
  2808. padding: 0 5px;
  2809. }
  2810. .daijiao-check {
  2811. margin-right: 8px;
  2812. .img-body {
  2813. width: 16px;
  2814. height: 16px;
  2815. box-sizing: border-box;
  2816. border: 1px solid #dcdfe6;
  2817. font-size: 0;
  2818. img {
  2819. width: 14px;
  2820. height: 14px;
  2821. }
  2822. }
  2823. .active {
  2824. border: 0px solid #5386f6;
  2825. img {
  2826. width: 17px;
  2827. height: 17px;
  2828. }
  2829. }
  2830. span {
  2831. font-size: 14px;
  2832. margin-left: 5px;
  2833. cursor: pointer;
  2834. }
  2835. }
  2836. </style>