ChineseMedicine.vue 114 KB

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