ChineseMedicine.vue 114 KB

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