ChineseMedicine.vue 114 KB

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