MedicineAccord.vue 91 KB

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