ChineseMedicine.vue 114 KB

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