ChineseMedicine.vue 113 KB

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