ChineseMedicine.vue 113 KB

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