MedicineAccord.vue 91 KB

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