newDoctorAdvice.vue 113KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <div>
  6. <el-button
  7. size="small"
  8. icon="el-icon-printer"
  9. :disabled="selecting_schs.length == 0"
  10. @click="signPrintAction"
  11. type="primary"
  12. style="margin-right:10"
  13. >标签打印
  14. </el-button>
  15. <el-button
  16. size="small"
  17. icon="el-icon-printer"
  18. :disabled="selecting_schs.length == 0"
  19. @click="batchPrintAction"
  20. type="primary"
  21. >医嘱打印
  22. </el-button>
  23. <el-button
  24. size="small"
  25. icon="el-icon-printer"
  26. :disabled="selecting_schs.length == 0"
  27. @click="batchPrintActionFour"
  28. type="primary"
  29. >项目打印
  30. </el-button>
  31. <el-button
  32. size="small"
  33. icon="el-icon-printer"
  34. :disabled="selecting_schs.length == 0"
  35. @click="batchPrintActionFive"
  36. type="primary"
  37. >化验打印
  38. </el-button>
  39. </div>
  40. </div>
  41. <div class="app-container">
  42. <div class="filter-container">
  43. <div style="display: flex;">
  44. <div style="flex: 1;">
  45. <el-autocomplete
  46. class="checkSearch"
  47. popper-class="my-autocomplete"
  48. v-model.trim="listQuery.keyword"
  49. :fetch-suggestions="querySearchAsync"
  50. :trigger-on-focus="false"
  51. placeholder="患者姓名"
  52. @select="handleSelect"
  53. >
  54. <i class="el-icon-search el-input__icon" slot="suffix"></i>
  55. <template slot-scope="{ item }">
  56. <div class="name">{{ item.name }}</div>
  57. </template>
  58. </el-autocomplete>
  59. <el-button type="primary" @click="toSeach">搜索</el-button>
  60. <el-input style="width:200px" placeholder="请输入药品名称" v-model="keyword"></el-input>
  61. <el-button type="primary" @click="toSeachOne">搜索</el-button>
  62. </div>
  63. <div style="flex: 1;text-align: right;">
  64. <el-button type="primary" size="small" @click="toStatic" v-if="org_id!=10340">药品统计</el-button>
  65. <el-button type="primary" size="small" @click="toStaticOne" v-if="org_id==10340">药品统计</el-button>
  66. <el-button type="primary" size="small" @click="toStaticThree">药品月统计</el-button>
  67. <el-button type="primary" size="small" @click="toStaticTwo">耗材统计</el-button>
  68. <el-button type="primary" size="small" @click="toStaticFour">耗材月统计</el-button>
  69. </div>
  70. </div>
  71. </div>
  72. <!-- <div class="filter-container">
  73. <el-input style="width:200px" placeholder="请输入药品名称" v-model="keyword"></el-input>
  74. <el-button type="primary" @click="toSeachOne">搜索</el-button>
  75. </div> -->
  76. <div class="cell clearfix">
  77. <label class="title">
  78. <span class="name">日期查询:</span>
  79. </label>
  80. <el-date-picker
  81. v-model="time"
  82. prefix-icon="el-icon-date"
  83. @change="changeTime"
  84. :editable="false"
  85. style="width: 180px;margin-right: 10px;"
  86. type="date"
  87. placeholder="选择日期时间"
  88. align="right"
  89. format="yyyy-MM-dd"
  90. value-format="timestamp"
  91. ></el-date-picker>
  92. <label class="title">
  93. <span class="name">排序:</span>
  94. </label>
  95. <el-select v-model="sort" placeholder="请选择" @change="selectSortType">
  96. <el-option
  97. v-for="item in options"
  98. :key="item.name"
  99. :label="item.name"
  100. :value="item.id"
  101. >
  102. </el-option>
  103. </el-select>
  104. </div>
  105. <!-- <div class="cell clearfix">
  106. <label class="title">
  107. <span class="name">排序:</span>
  108. </label>
  109. <el-select v-model="sort" placeholder="请选择" @change="selectSortType">
  110. <el-option
  111. v-for="item in options"
  112. :key="item.name"
  113. :label="item.name"
  114. :value="item.id"
  115. >
  116. </el-option>
  117. </el-select>
  118. </div> -->
  119. <div class="cell clearfix">
  120. <label class="title"> <span class="name">排班班次</span> : </label>
  121. <div class="time">
  122. <ul class>
  123. <li
  124. :class="item.value == schedulType ? 'active' : ''"
  125. @click="selectSchedulType(item.value)"
  126. v-for="item in schedulArr"
  127. :key="item.value"
  128. >
  129. {{ item.label }}
  130. </li>
  131. </ul>
  132. </div>
  133. </div>
  134. <div class="cell clearfix">
  135. <label class="title"><span class="name">收费状态</span> : </label>
  136. <div class="time">
  137. <ul class>
  138. <li
  139. :class="item.id == costType ? 'active' : ''"
  140. @click="selectCostType(item.id)"
  141. v-for="item in costArr"
  142. :key="item.id"
  143. >
  144. {{ item.name }}
  145. </li>
  146. </ul>
  147. </div>
  148. </div>
  149. <div class="cell clearfix">
  150. <label class="title"><span class="name">分区</span> : </label>
  151. <div class="time">
  152. <ul class>
  153. <li
  154. :class="item.id == partitionType ? 'active' : ''"
  155. @click="selectPartitionType(item.id)"
  156. v-for="item in partitionArr"
  157. :key="item.id"
  158. >
  159. {{ item.name }}
  160. </li>
  161. </ul>
  162. </div>
  163. </div>
  164. <div class="cell clearfix">
  165. <label class="title"> <span class="name">给药途径</span> : </label>
  166. <div class="time" style="width: 90%;">
  167. <ul class>
  168. <li
  169. :class="item.id == delivery_way ? 'active' : ''"
  170. @click="selectDeliveryWay(item.id)"
  171. v-for="item in deliveryWay"
  172. :key="item.id"
  173. >
  174. {{ item.name }}
  175. </li>
  176. </ul>
  177. </div>
  178. </div>
  179. <div class="cell clearfix">
  180. <label class="title"> <span class="name">执行频率</span> : </label>
  181. <div class="time" style="width: 90%;">
  182. <ul class>
  183. <li
  184. :class="item.id == execution_frequency ? 'active' : ''"
  185. @click="selectFrequencyWay(item.id)"
  186. v-for="item in excutList"
  187. :key="item.id"
  188. >
  189. {{ item.name }}
  190. </li>
  191. </ul>
  192. </div>
  193. </div>
  194. <div class="cell clearfix">
  195. <label class="title"> <span class="name">执行状态</span> : </label>
  196. <div class="time">
  197. <ul class>
  198. <li
  199. :class="item.id == excution_way ? 'active' : ''"
  200. @click="selectExcutionWay(item.id)"
  201. v-for="item in executionList"
  202. :key="item.id"
  203. >
  204. {{ item.name }}
  205. </li>
  206. </ul>
  207. </div>
  208. </div>
  209. <!-- <div style="margin-top: 10px;margin-left:600px;margin-bottom:10px">
  210. <el-button type="primary" size="small" @click="toExcution">执行医嘱</el-button>
  211. <el-button type="primary" size="small" @click="toCheck">医嘱核对</el-button>
  212. <el-button type="primary" size="small" @click="toSettle">收费</el-button>
  213. </div> -->
  214. <!-- <div style="margin-top: 10px;margin-bottom:10px">
  215. <el-button type="primary" size="small" @click="toStatic" v-if="org_id!=9671 && org_id!=10340">药品统计</el-button>
  216. <el-button type="primary" size="small" @click="toStaticOne" v-if="org_id == 9671 || org_id==10340">药品统计</el-button>
  217. <el-button type="primary" size="small" @click="toStaticThree">药品月统计</el-button>
  218. <el-button type="primary" size="small" @click="toStaticTwo">耗材统计</el-button>
  219. <el-button type="primary" size="small" @click="toStaticFour">耗材月统计</el-button>
  220. </div> -->
  221. <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  222. @selection-change="handleSelectionChange"
  223. :span-method="objectSpanMethod"
  224. :cell-class-name="adviceNameShow"
  225. :modal-append-to-body="false"
  226. highlight-current-row
  227. @current-change="handleCurrentChangeList"
  228. v-show="show"
  229. @row-click="handleRowClick">
  230. <el-table-column type="selection" width="55" align="center"></el-table-column>
  231. <el-table-column prop="date" label="姓名" align="center" min-width="26px">
  232. <template slot-scope="scope">
  233. <span>{{ scope.row.name }}</span>
  234. <br>
  235. ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
  236. <br>
  237. <span v-if="scope.row.mode_id == 1">(HD)</span>
  238. <span v-if="scope.row.mode_id == 2">(HDF)</span>
  239. <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
  240. <span v-if="scope.row.mode_id == 4">(HP)</span>
  241. <span v-if="scope.row.mode_id == 5">(HF)</span>
  242. <span v-if="scope.row.mode_id == 6">(SCUF)</span>
  243. <span v-if="scope.row.mode_id == 7">(IUF)</span>
  244. <span v-if="scope.row.mode_id == 8">(HFHD)</span>
  245. <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
  246. <span v-if="scope.row.mode_id == 10">(PHF)</span>
  247. <span v-if="scope.row.mode_id == 11">(HFR)</span>
  248. <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
  249. <span v-if="scope.row.mode_id == 13">(CRRT)</span>
  250. <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
  251. <span v-if="scope.row.mode_id == 24">I-HDF</span>
  252. </br>
  253. <span v-if="scope.row.anticoagulant == 1" style="color:red">无肝素</span>
  254. </template>
  255. </el-table-column>
  256. <el-table-column label="分区床位" width="100">
  257. <template slot-scope="scope" >
  258. {{scope.row.zone_name}}/{{scope.row.number}}
  259. </template>
  260. </el-table-column>
  261. <el-table-column prop="date" label="透析器" align="center" min-width="26px">
  262. <template slot-scope="scope">
  263. <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
  264. <span v-if="scope.row.dialysis_dialyszers!=''">{{scope.row.dialysis_dialyszers}}</span>
  265. <span v-if="scope.row.dialysis_irrigation!=''">{{scope.row.dialysis_irrigation}}</span>
  266. </template>
  267. </el-table-column>
  268. <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
  269. <template slot-scope="scope">
  270. <span>
  271. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  272. </span>
  273. </template>
  274. </el-table-column>
  275. <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
  276. <template slot-scope="scope">
  277. <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
  278. <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
  279. {{ getAdviceContent(scope.row, 1)}}
  280. </span>
  281. </el-dropdown>
  282. <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
  283. <span class="el-dropdown-link">
  284. &emsp;{{ getAdviceContent(scope.row, 2)}}
  285. </span>
  286. </el-dropdown>
  287. </template>
  288. </el-table-column>
  289. <el-table-column prop="start_time" min-width="30px" label="执行时间" align="center" sortable>
  290. <template slot-scope="scope">
  291. <span v-if="scope.row.execution_time != 0">
  292. {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
  293. </span>
  294. <span v-else></span>
  295. </template>
  296. </el-table-column>
  297. <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
  298. <template slot-scope="scope">
  299. <span v-if="scope.row.parent_id == 0">
  300. {{getXuserName(scope.row.execution_staff)}}
  301. </span>
  302. <span v-else>{{getXuserName(scope.row.execution_staff)}}</span>
  303. </template>
  304. </el-table-column>
  305. <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
  306. <template slot-scope="scope">
  307. <span v-if="scope.row.parent_id == 0">
  308. {{getXuserName(scope.row.checker)}}
  309. </span>
  310. <span v-else>{{getXuserName(scope.row.checker)}}</span>
  311. </template>
  312. </el-table-column>
  313. <el-table-column prop="check_time" align="center" label="校对时间" min-width="30px" sortable>
  314. <template slot-scope="scope">
  315. <span v-if="scope.row.check_time != 0 && org_id!=10460">
  316. {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
  317. </span>
  318. <span v-else>
  319. </span>
  320. </template>
  321. </el-table-column>
  322. <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
  323. <template slot-scope="scope">
  324. <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
  325. </template>
  326. </el-table-column>
  327. <el-table-column prop="created_time" align="center" min-width="30px" label="校对时间" sortable>
  328. <template slot-scope="scope">
  329. <span v-if="scope.row.created_time != 0 && org_id!=10460">
  330. {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
  331. </span>
  332. <span v-else></span>
  333. </template>
  334. </el-table-column>
  335. <el-table-column prop="created_time" align="center" min-width="30px" label="收费状态" sortable>
  336. <template slot-scope="scope">
  337. <span v-if="scope.row.is_settle == 1">
  338. 已收费
  339. </span>
  340. <span v-if="scope.row.is_settle == 2 || scope.row.is_settle == 0">
  341. 未收费
  342. </span>
  343. <span v-else></span>
  344. </template>
  345. </el-table-column>
  346. </el-table>
  347. <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  348. @selection-change="handleSelectionChangeOne"
  349. @current-change="handleCurrentChangeList"
  350. :span-method="objectSpanMethod"
  351. :cell-class-name="adviceNameShow"
  352. highlight-current-row
  353. :modal-append-to-body="false"
  354. v-show="showOne">
  355. <el-table-column type="selection" width="50" align="center"></el-table-column>
  356. <el-table-column prop="date" label="姓名" align="center" min-width="26px">
  357. <template slot-scope="scope">
  358. <span>{{ scope.row.name }}</span>
  359. <br>
  360. ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
  361. <br>
  362. <span v-if="scope.row.mode_id == 1">(HD)</span>
  363. <span v-if="scope.row.mode_id == 2">(HDF)</span>
  364. <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
  365. <span v-if="scope.row.mode_id == 4">(HP)</span>
  366. <span v-if="scope.row.mode_id == 5">(HF)</span>
  367. <span v-if="scope.row.mode_id == 6">(SCUF)</span>
  368. <span v-if="scope.row.mode_id == 7">(IUF)</span>
  369. <span v-if="scope.row.mode_id == 8">(HFHD)</span>
  370. <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
  371. <span v-if="scope.row.mode_id == 10">(PHF)</span>
  372. <span v-if="scope.row.mode_id == 11">(HFR)</span>
  373. <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
  374. <span v-if="scope.row.mode_id == 13">(CRRT)</span>
  375. <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
  376. <span v-if="scope.row.mode_id == 24">I-HDF</span>
  377. </template>
  378. </el-table-column>
  379. <el-table-column prop="date" label="透析器" align="center" min-width="26px">
  380. <template slot-scope="scope">
  381. <span>
  382. {{ scope.row.dialyzer_perfusion_apparatus }}
  383. <span v-if="scope.row.dialysis_dialyszers!=''">{{scope.row.dialysis_dialyszers}}</span>
  384. <span v-if="scope.row.dialysis_irrigation!=''">{{scope.row.dialysis_irrigation}}</span>
  385. </span>
  386. </template>
  387. </el-table-column>
  388. <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
  389. <template slot-scope="scope">
  390. <span>
  391. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  392. </span>
  393. </template>
  394. </el-table-column>
  395. <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
  396. <template slot-scope="scope">
  397. <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
  398. <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
  399. {{ getAdviceContent(scope.row, 1)}}
  400. </span>
  401. </el-dropdown>
  402. <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
  403. <span class="el-dropdown-link">
  404. &emsp;{{ getAdviceContent(scope.row, 2)}}
  405. </span>
  406. </el-dropdown>
  407. </template>
  408. </el-table-column>
  409. <el-table-column prop="start_time" align="center" min-width="30px" label="执行时间" sortable>
  410. <template slot-scope="scope">
  411. <span v-if="scope.row.execution_time != 0">
  412. {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
  413. </span>
  414. <span v-else></span>
  415. </template>
  416. </el-table-column>
  417. <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
  418. <template slot-scope="scope">
  419. <span v-if="scope.row.parent_id == 0">
  420. {{getXuserName(scope.row.execution_staff)}}
  421. </span>
  422. <span v-else></span>
  423. </template>
  424. </el-table-column>
  425. <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
  426. <template slot-scope="scope">
  427. <span v-if="scope.row.parent_id == 0">
  428. {{getXuserName(scope.row.checker)}}
  429. </span>
  430. <span v-else></span>
  431. </template>
  432. </el-table-column>
  433. <el-table-column prop="check_time" align="center" min-width="30px" label="校对时间" sortable>
  434. <template slot-scope="scope">
  435. <span v-if="scope.row.check_time != 0">
  436. {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
  437. </span>
  438. <span v-else></span>
  439. </template>
  440. </el-table-column>
  441. <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
  442. <template slot-scope="scope">
  443. <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
  444. </template>
  445. </el-table-column>
  446. <el-table-column prop="created_time" align="center" min-width="30px" label="校对时间" sortable>
  447. <template slot-scope="scope">
  448. <span v-if="scope.row.created_time != 0">
  449. {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
  450. </span>
  451. <span v-else></span>
  452. </template>
  453. </el-table-column>
  454. <el-table-column prop="created_time" align="center" min-width="30px" label="收费状态" sortable>
  455. <template slot-scope="scope">
  456. <span v-if="scope.row.is_settle == 1">
  457. 已收费
  458. </span>
  459. <span v-if="scope.row.is_settle == 2 || scope.row.is_settle == 0">
  460. 未收费
  461. </span>
  462. <span v-else></span>
  463. </template>
  464. </el-table-column>
  465. </el-table>
  466. <el-dialog
  467. title="选择执行时间"
  468. :visible.sync="execTimeDialogVisible"
  469. width="400px"
  470. :modal-append-to-body="false"
  471. >
  472. <el-date-picker
  473. v-model="execTime"
  474. format="yyyy-MM-dd HH:mm:00"
  475. value-format="yyyy-MM-dd HH:mm:00"
  476. type="datetime"
  477. placeholder="选择执行时间"
  478. style="width:100%"
  479. ></el-date-picker>
  480. <span slot="footer" class="dialog-footer">
  481. <el-button @click="execTimeDialogVisible = false">取 消</el-button>
  482. <el-button type="primary" @click="excutionDoctorAdvice" :loading="exceLoading">保 存</el-button>
  483. </span>
  484. </el-dialog>
  485. <el-dialog
  486. title="选择执行时间"
  487. :visible.sync="execTimeDialogVisibleOne"
  488. width="400px"
  489. :modal-append-to-body="false"
  490. >
  491. <el-date-picker
  492. v-model="execTime"
  493. format="yyyy-MM-dd HH:mm:00"
  494. value-format="yyyy-MM-dd HH:mm:00"
  495. type="datetime"
  496. placeholder="选择执行时间"
  497. style="width:100%"
  498. ></el-date-picker>
  499. <span slot="footer" class="dialog-footer">
  500. <el-button @click="execTimeDialogVisibleOne = false">取 消</el-button>
  501. <el-button type="primary" @click="excutionDoctorAdviceOne" :loading="exceLoading">保 存</el-button>
  502. </span>
  503. </el-dialog>
  504. <!-- 药品统计表 -->
  505. <el-dialog
  506. title="药品统计表"
  507. :visible.sync="startdialogVisible"
  508. width="60%">
  509. <span>
  510. <div class="eldialog" style="margin-bottom:10px">
  511. <div>
  512. <label class="title"> <span class="name">排班班次</span> : </label>
  513. <el-select v-model="schedule_type" placeholder="请选择"
  514. @change="changeScheduleType" style="width: 120px;">
  515. <el-option
  516. v-for="item in schedulArr"
  517. :key="item.value"
  518. :label="item.label"
  519. :value="item.value">
  520. </el-option>
  521. </el-select>
  522. <label class="title"> <span class="name">病区选择</span> : </label>
  523. <el-select v-model="partion_type" placeholder="请选择"
  524. @change="changePartionType" multiple style="width: 120px;"
  525. >
  526. <el-option
  527. v-for="item in partitionArr"
  528. :key="item.id"
  529. :label="item.name"
  530. :value="item.id">
  531. </el-option>
  532. </el-select>
  533. </div>
  534. <div>
  535. <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
  536. <el-button size="small" @click="toExportListOne" type="primary">导出</el-button>
  537. </div>
  538. </div>
  539. <el-table
  540. :data="tableList"
  541. border
  542. :row-style="{ color: '#303133' }"
  543. :header-cell-style="{
  544. backgroundColor: 'rgb(245, 247, 250)',
  545. color: '#606266'
  546. }"
  547. >
  548. <el-table-column align="center" label="序号">
  549. <template slot-scope="scope">
  550. {{scope.$index+1}}
  551. </template>
  552. </el-table-column>
  553. <el-table-column align="center" label="药品名称">
  554. <template slot-scope="scope">
  555. {{scope.row.advice_name}}
  556. </template>
  557. </el-table-column>
  558. <el-table-column align="center" label="规格">
  559. <template slot-scope="scope">
  560. {{scope.row.specification_name}}
  561. </template>
  562. </el-table-column>
  563. <el-table-column align="center" label="数量">
  564. <template slot-scope="scope">
  565. <span v-if="config.is_open!=1">{{getCount(scope.row.child)}}</span>
  566. <span v-if="config.is_open ==1">{{getHisCount(scope.row.child,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
  567. </template>
  568. </el-table-column>
  569. <el-table-column align="center" label="厂家">
  570. <template slot-scope="scope">
  571. {{scope.row.manufacturer_name}}
  572. </template>
  573. </el-table-column>
  574. </el-table>
  575. </span>
  576. <span slot="footer" class="dialog-footer">
  577. <el-button @click="startdialogVisible = false">取 消</el-button>
  578. <el-button type="primary" @click="startdialogVisible = false">确 定</el-button>
  579. </span>
  580. </el-dialog>
  581. <!-- 长沙南雅 -->
  582. <el-dialog
  583. title="药品统计表"
  584. :visible.sync="startdialogVisibleOne"
  585. width="70%">
  586. <span>
  587. <div class="eldialog" style="margin-bottom:10px">
  588. <div>
  589. <label class="title"> <span class="name">排班班次</span> : </label>
  590. <el-select v-model="schedule_type" placeholder="请选择"
  591. @change="changeScheduleTypeOne" style="width: 120px;">
  592. <el-option
  593. v-for="item in schedulArr"
  594. :key="item.value"
  595. :label="item.label"
  596. :value="item.value">
  597. </el-option>
  598. </el-select>
  599. <label class="title"> <span class="name">病区选择</span> : </label>
  600. <el-select v-model="partion_type" placeholder="请选择"
  601. @change="changePartionTypeOne" multiple style="width: 120px;">
  602. <el-option
  603. v-for="item in partitionArr"
  604. :key="item.id"
  605. :label="item.name"
  606. :value="item.id">
  607. </el-option>
  608. </el-select>
  609. </div>
  610. <div>
  611. <el-button size="small" icon="el-icon-printer" @click="toPrintTwo" type="primary">打印</el-button>
  612. </div>
  613. <!-- <el-button size="small" @click="toExportListOne" type="primary">导出</el-button> -->
  614. <!-- <el-button @click="toJiao()">脚本</el-button> -->
  615. </div>
  616. <el-table
  617. :data="tableDataList"
  618. border
  619. :row-style="{ color: '#303133' }"
  620. :header-cell-style="{
  621. backgroundColor: 'rgb(245, 247, 250)',
  622. color: '#606266'
  623. }"
  624. >
  625. <el-table-column
  626. align="center"
  627. prop="name"
  628. label="序号"
  629. width="60"
  630. >
  631. <template slot-scope="scope" >
  632. <span v-if="scope.row.is_total == 1">{{scope.$index+1}}</span>
  633. <span v-if="scope.row.is_total == 0">总计</span>
  634. </template>
  635. </el-table-column>
  636. <el-table-column
  637. align="center"
  638. prop="name"
  639. label="区域"
  640. width="100"
  641. >
  642. <template slot-scope="scope" >
  643. <span v-if="scope.row.is_total ==1">
  644. <!-- {{getZoneName(scope.row.child)}} -->
  645. {{scope.row.zone_name }}
  646. </span>
  647. </template>
  648. </el-table-column>
  649. <!-- <el-table-column
  650. align="center"
  651. prop="name"
  652. label="责护"
  653. width="100"
  654. >
  655. <template slot-scope="scope">
  656. <span v-if="scope.row.is_total ==1">
  657. {{getAdminUserName(scope.row.execution_staff)}}
  658. </span>
  659. </template>
  660. </el-table-column> -->
  661. <el-table-column
  662. align="center"
  663. prop="name"
  664. label="透析模式"
  665. width="130"
  666. >
  667. <template slot-scope="scope">
  668. <span v-if="scope.row.is_total == 1">
  669. {{getModeId(scope.row.child)}}
  670. </span>
  671. </template>
  672. </el-table-column>
  673. <el-table-column
  674. align="center"
  675. prop="name"
  676. v-for="(item,index) in tabHead"
  677. :key="index"
  678. :label="item.advice_name"
  679. >
  680. <template slot-scope="scope">
  681. <span v-if="scope.row.is_total ==1">
  682. <span v-if="scope.row.child[index]!=null">{{getDrugCount(scope.row.child,item.advice_name)}}</span>
  683. <span v-if="item&&item.advice_name == '肝素钠注射剂'">
  684. {{getDrugAdviceCount(item.advice_name,scope.row.zone_name)}}
  685. </span>
  686. <span v-if="scope.row.child[index]==null && getDrugCount(scope.row.child,item.advice_name)>0">
  687. {{getDrugCount(scope.row.child,item.advice_name)}}
  688. <span v-if="item&&item.advice_name == '肝素钠注射剂'">
  689. {{getDrugAdviceCount(item.advice_name,scope.row.zone_name)}}
  690. </span>
  691. </span>
  692. </span>
  693. <span v-if="scope.row.is_total == 0">
  694. {{getAllSumCount(item.advice_name)}}
  695. </span>
  696. </template>
  697. </el-table-column>
  698. </el-table>
  699. </span>
  700. <span slot="footer" class="dialog-footer">
  701. <el-button @click="startdialogVisibleOne = false">取 消</el-button>
  702. <el-button type="primary" @click="startdialogVisibleOne = false">确 定</el-button>
  703. </span>
  704. </el-dialog>
  705. <!-- 耗材统计表 -->
  706. <el-dialog
  707. title="耗材统计表"
  708. :visible.sync="startdialogVisibleTwo"
  709. width="60%">
  710. <span>
  711. <div class="eldialog" style="margin-bottom:10px">
  712. <div>
  713. <label class="title"> <span class="name">排班班次</span> : </label>
  714. <el-select v-model="schedule_type" placeholder="请选择"
  715. @change="changeScheduleTypeTwo" style="width: 120px;">
  716. <el-option
  717. v-for="item in schedulArr"
  718. :key="item.value"
  719. :label="item.label"
  720. :value="item.value">
  721. </el-option>
  722. </el-select>
  723. <label class="title"> <span class="name">病区选择</span> : </label>
  724. <el-select v-model="partion_type" placeholder="请选择"
  725. @change="changePartionTypeTwo" multiple style="width: 120px;">
  726. <el-option
  727. v-for="item in partitionArr"
  728. :key="item.id"
  729. :label="item.name"
  730. :value="item.id">
  731. </el-option>
  732. </el-select>
  733. </div>
  734. <div>
  735. <el-button size="small" icon="el-icon-printer" @click="toPrintThree" type="primary">打印</el-button>
  736. <el-button size="small" @click="toExportListTwo" type="primary">导出</el-button>
  737. </div>
  738. </div>
  739. <el-table
  740. :data="tableProjectList"
  741. border
  742. :row-style="{ color: '#303133' }"
  743. :header-cell-style="{
  744. backgroundColor: 'rgb(245, 247, 250)',
  745. color: '#606266'
  746. }"
  747. >
  748. <el-table-column align="center" label="序号">
  749. <template slot-scope="scope">
  750. {{scope.$index+1}}
  751. </template>
  752. </el-table-column>
  753. <el-table-column align="center" label="耗材名称">
  754. <template slot-scope="scope">
  755. {{scope.row.good_name}}
  756. </template>
  757. </el-table-column>
  758. <el-table-column align="center" label="规格">
  759. <template slot-scope="scope">
  760. {{scope.row.specification_name}}
  761. </template>
  762. </el-table-column>
  763. <el-table-column align="center" label="数量">
  764. <template slot-scope="scope">
  765. {{scope.row.count}}
  766. </template>
  767. </el-table-column>
  768. </el-table>
  769. </span>
  770. <span slot="footer" class="dialog-footer">
  771. <el-button @click="startdialogVisibleTwo = false">取 消</el-button>
  772. <el-button type="primary" @click="startdialogVisibleTwo = false">确 定</el-button>
  773. </span>
  774. </el-dialog>
  775. <!-- 药品月统计表 -->
  776. <el-dialog
  777. title="药品月统计表"
  778. :visible.sync="startMothdialogVisible"
  779. width="60%">
  780. <span>
  781. <div class="eldialog" style="margin-bottom:10px">
  782. <div>
  783. <label class="title"> <span class="name">日期查询</span> : </label>
  784. <el-date-picker
  785. v-model="start_time"
  786. prefix-icon="el-icon-date"
  787. :editable="false"
  788. style="width: 150px;"
  789. type="date"
  790. placeholder="选择日期时间"
  791. align="right"
  792. format="yyyy-MM-dd"
  793. value-format="yyyy-MM-dd"
  794. ></el-date-picker>
  795. <span>-</span>
  796. <el-date-picker
  797. v-model="end_time"
  798. prefix-icon="el-icon-date"
  799. :editable="false"
  800. style="width: 150px;"
  801. type="date"
  802. placeholder="选择日期时间"
  803. align="right"
  804. format="yyyy-MM-dd"
  805. value-format="yyyy-MM-dd"
  806. ></el-date-picker>
  807. </div>
  808. <div>
  809. <el-button size="small" @click="getAllQuery" type="primary">查询</el-button>
  810. <el-button size="small" icon="el-icon-printer" @click="toPrintTen" type="primary">打印</el-button>
  811. <el-button size="small" @click="toExportListThree" type="primary">导出</el-button>
  812. </div>
  813. </div>
  814. <el-table
  815. :data="tableMonthList"
  816. border
  817. :row-style="{ color: '#303133' }"
  818. :header-cell-style="{
  819. backgroundColor: 'rgb(245, 247, 250)',
  820. color: '#606266'
  821. }"
  822. >
  823. <el-table-column align="center" label="序号">
  824. <template slot-scope="scope">
  825. {{scope.$index+1}}
  826. </template>
  827. </el-table-column>
  828. <el-table-column align="center" label="药品名称">
  829. <template slot-scope="scope">
  830. {{scope.row.advice_name}}
  831. </template>
  832. </el-table-column>
  833. <el-table-column align="center" label="规格">
  834. <template slot-scope="scope">
  835. {{scope.row.specification_name}}
  836. </template>
  837. </el-table-column>
  838. <el-table-column align="center" label="数量">
  839. <template slot-scope="scope">
  840. <span v-if="config.is_open!=1">{{getCount(scope.row.child)}}</span>
  841. <span v-if="config.is_open ==1">{{getHisCount(scope.row.child,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
  842. </template>
  843. </el-table-column>
  844. <el-table-column align="center" label="厂家">
  845. <template slot-scope="scope">
  846. {{scope.row.manufacturer_name}}
  847. </template>
  848. </el-table-column>
  849. </el-table>
  850. </span>
  851. <span slot="footer" class="dialog-footer">
  852. <el-button @click="startMothdialogVisible = false">取 消</el-button>
  853. <el-button type="primary" @click="startMothdialogVisible = false">确 定</el-button>
  854. </span>
  855. </el-dialog>
  856. <!-- 耗材统计表 -->
  857. <el-dialog
  858. title="耗材统计表"
  859. :visible.sync="startMonthdialogVisible"
  860. width="60%">
  861. <span>
  862. <div class="eldialog" style="margin-bottom:10px">
  863. <div>
  864. <label class="title"> <span class="name">日期查询</span> : </label>
  865. <el-date-picker
  866. v-model="start_time"
  867. prefix-icon="el-icon-date"
  868. :editable="false"
  869. style="width: 150px;"
  870. type="date"
  871. placeholder="选择日期时间"
  872. align="right"
  873. format="yyyy-MM-dd"
  874. value-format="yyyy-MM-dd"
  875. ></el-date-picker>
  876. <span>-</span>
  877. <el-date-picker
  878. v-model="end_time"
  879. prefix-icon="el-icon-date"
  880. :editable="false"
  881. style="width: 150px;"
  882. type="date"
  883. placeholder="选择日期时间"
  884. align="right"
  885. format="yyyy-MM-dd"
  886. value-format="yyyy-MM-dd"
  887. ></el-date-picker>
  888. </div>
  889. <div>
  890. <el-button size="small" @click="getGoodAllQuery" type="primary">查询</el-button>
  891. <el-button size="small" icon="el-icon-printer" @click="toExportListFour" type="primary">打印</el-button>
  892. <el-button size="small" @click="toExportListFour" type="primary">导出</el-button>
  893. </div>
  894. </div>
  895. <el-table
  896. :data="tableProjectList"
  897. border
  898. :row-style="{ color: '#303133' }"
  899. :header-cell-style="{
  900. backgroundColor: 'rgb(245, 247, 250)',
  901. color: '#606266'
  902. }"
  903. >
  904. <el-table-column align="center" label="序号">
  905. <template slot-scope="scope">
  906. {{scope.$index+1}}
  907. </template>
  908. </el-table-column>
  909. <el-table-column align="center" label="耗材名称">
  910. <template slot-scope="scope">
  911. {{scope.row.good_name}}
  912. </template>
  913. </el-table-column>
  914. <el-table-column align="center" label="规格">
  915. <template slot-scope="scope">
  916. {{scope.row.specification_name}}
  917. </template>
  918. </el-table-column>
  919. <el-table-column align="center" label="数量">
  920. <template slot-scope="scope">
  921. {{scope.row.count}}
  922. </template>
  923. </el-table-column>
  924. </el-table>
  925. </span>
  926. <span slot="footer" class="dialog-footer">
  927. <el-button @click="startMonthdialogVisible = false">取 消</el-button>
  928. <el-button type="primary" @click="startMonthdialogVisible = false">确 定</el-button>
  929. </span>
  930. </el-dialog>
  931. </div>
  932. </div>
  933. </template>
  934. <script>
  935. const moment = require('moment')
  936. import { getSchedualPatient, GetAllZone,getDialysisAdviceToday,getDialysisProject } from "@/api/dialysis";
  937. import { parseTime } from "@/utils";
  938. import { uParseTime } from '@/utils/tools'
  939. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  940. import { getPrintTemplate } from "@/api/data";
  941. import { getNewSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice,excutionDoctorAdviceById,GetMobileScheduleList,getDoctorAdviceMonthList,getHisPrescrptionProjectMonthList } from '@/api/advice'
  942. import { PostSearch } from '@/api/patient'
  943. export default {
  944. name: "Patient",
  945. data() {
  946. return {
  947. crumbs: [
  948. { path: false, name: "透析管理" },
  949. { path: false, name: "透析监测" }
  950. ],
  951. loading: false,
  952. time: "",
  953. search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
  954. patient_search_keyword: "",
  955. SchedualPatientsTableData: [],
  956. active: true,
  957. schedulType: 0,
  958. schedulArr: [
  959. { value: 0, label: "全部" },
  960. { value: 1, label: "上午" },
  961. { value: 2, label: "下午" },
  962. { value: 3, label: "晚上" }
  963. ],
  964. template_id: 0,
  965. partitionType: 0,
  966. costType:0,
  967. total: 0,
  968. listQuery: {
  969. page: 1,
  970. limit: 10,
  971. schedul_type: 0,
  972. partition_type: 0,
  973. schedul_time: "",
  974. keywords: "",
  975. },
  976. selecting_schs: [],
  977. partitionArr: [],
  978. scheduleMap:[],
  979. show:true,
  980. showOne:false,
  981. deliveryWay:[],
  982. executionList:[
  983. {id:0,name:"全部"},
  984. {id:1,name:"已执行"},
  985. {id:2,name:"未执行"},
  986. ],
  987. delivery_way:0,
  988. patient_id:0,
  989. org_id:0,
  990. excution_way:0,
  991. options:[
  992. {id:0,name:"请选择"},
  993. {id:1,name:"按床位排序"},
  994. {id:2,name:"按签到时间排序"},
  995. ],
  996. costArr:[
  997. {id:0,name:"全部"},
  998. {id:1,name:"已收费"},
  999. {id:2,name:"未收费"}
  1000. ],
  1001. sort:0,
  1002. config:{},
  1003. execTime: '',
  1004. execTimeDialogVisible:false,
  1005. exceLoading:false,
  1006. is_sort:0,
  1007. hoverOrderArr:[],
  1008. is_status:0,
  1009. execTimeDialogVisibleOne:false,
  1010. current_row:{},
  1011. tableList:[],
  1012. startdialogVisible:false,
  1013. startdialogVisibleOne:false,
  1014. startdialogVisibleTwo:false,
  1015. startMonthdialogVisible:false,
  1016. schedule_type:0,
  1017. partion_type:0,
  1018. druglist:[],
  1019. config:{},
  1020. tabHead:[],
  1021. tableDataList:[],
  1022. adminUserList:[],
  1023. doctorMap:[],
  1024. excutList:[],
  1025. execution_frequency:"",
  1026. zoneIdList:[],
  1027. partion_str:"",
  1028. keyword:"",
  1029. tableProjectList:[],
  1030. manufacturerList:[],
  1031. start_time: moment().startOf('month').format('YYYY-MM-DD'),
  1032. end_time: moment().endOf('month').format('YYYY-MM-DD'),
  1033. startMothdialogVisible:false,
  1034. adviceMonthList:[],
  1035. hisAdviceMonthList:[],
  1036. tableMonthList:[]
  1037. };
  1038. },
  1039. created() {
  1040. var date = new Date();
  1041. this.time = date;
  1042. var year = date.getFullYear();
  1043. var month = date.getMonth() + 1;
  1044. var day = date.getDate();
  1045. if (month < 10) {
  1046. month = "0" + month;
  1047. }
  1048. if (day < 10) {
  1049. day = "0" + day;
  1050. }
  1051. var nowDate = year + "-" + month + "-" + day;
  1052. var date = new Date(nowDate + " 00:00:00");
  1053. this.listQuery.schedul_time = date.getTime();
  1054. this.getAllZone();
  1055. this.getTemplateInfo();
  1056. this.requestSchedualDoctors(this.time)
  1057. this.org_id = this.$store.getters.xt_user.template_info.org_id;
  1058. },
  1059. methods: {
  1060. getTemplateInfo() {
  1061. getPrintTemplate().then(response => {
  1062. if (response.data.state == 0) {
  1063. this.$message.error(response.data.msg);
  1064. return false;
  1065. } else {
  1066. var template = response.data.data.template;
  1067. this.template_id = template.template_id;
  1068. }
  1069. });
  1070. },
  1071. clickCurrent(val) {
  1072. //console.log(val);
  1073. this.$router.push({
  1074. path: "/dialysis/details",
  1075. query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
  1076. });
  1077. },
  1078. selectSchedulType(scheduleType) {
  1079. this.schedulType = scheduleType;
  1080. this.listQuery.schedul_type = scheduleType;
  1081. this.requestSchedualDoctors(this.time);
  1082. },
  1083. selectPartitionType(partitionType) {
  1084. this.partitionType = partitionType;
  1085. this.listQuery.partition_type = partitionType;
  1086. this.requestSchedualDoctors(this.time);
  1087. },
  1088. selectCostType(costType){
  1089. this.costType = costType
  1090. this.requestSchedualDoctors(this.time);
  1091. },
  1092. selectDeliveryWay(val){
  1093. this.delivery_way = val
  1094. this.requestSchedualDoctors(this.time)
  1095. },
  1096. selectFrequencyWay(val){
  1097. this.execution_frequency = val
  1098. this.requestSchedualDoctors(this.time)
  1099. },
  1100. selectExcutionWay(val){
  1101. this.excution_way = val
  1102. this.requestSchedualDoctors(this.time)
  1103. },
  1104. changeTime() {
  1105. this.listQuery.schedul_time = this.time;
  1106. this.requestSchedualDoctors(this.time)
  1107. },
  1108. getAllZone: function() {
  1109. GetAllZone().then(response => {
  1110. if (response.data.state == 0) {
  1111. this.$message.error(response.data.msg);
  1112. return false;
  1113. } else {
  1114. this.partitionArr = response.data.data.zone;
  1115. for(let i=0;i<this.partitionArr.length;i++){
  1116. this.zoneIdList.push(this.partitionArr[i].id)
  1117. }
  1118. // this.partitionArr.unshift({ id: 0, name: "全部" });
  1119. var dics = response.data.data.dics
  1120. var obj = {id:0,name:"全部"}
  1121. this.deliveryWay.push(obj)
  1122. this.deliveryWay.push(...dics)
  1123. var objOne = {id:0,name:"全部"}
  1124. this.excutList.push(objOne)
  1125. var efs = response.data.data.efs
  1126. this.excutList.push(...efs)
  1127. console.log("执行瓶绿",this.excutList)
  1128. }
  1129. });
  1130. },
  1131. requestSchedualDoctors (time) {
  1132. var name = ""
  1133. for(let i=0;i<this.deliveryWay.length;i++){
  1134. if(this.delivery_way == this.deliveryWay[i].id){
  1135. name = this.deliveryWay[i].name
  1136. }
  1137. }
  1138. if(name == '全部'){
  1139. name = ""
  1140. }
  1141. var nameOne = ""
  1142. for(let i=0;i<this.excutList.length;i++){
  1143. if(this.execution_frequency == this.excutList[i].id){
  1144. nameOne = this.excutList[i].name
  1145. }
  1146. }
  1147. if(nameOne == '全部'){
  1148. nameOne = ""
  1149. }
  1150. let newTime = moment(time).format('YYYY-MM-DD')
  1151. var schedule_type = this.listQuery.schedul_type
  1152. var partition_type = this.listQuery.partition_type
  1153. getNewSchedualDoctors({date: newTime,patient_type: 0,advice_type: 2,delivery_way:name,schedule_type:schedule_type,partition_type:partition_type,patient_id:this.patient_id,excution_way:this.excution_way,cost_type:this.costType,execution_frequency:nameOne,keyword:this.keyword}).then(rs => {
  1154. var resp = rs.data
  1155. if (resp.state == 1) {
  1156. this.admin_users = resp.data.adminUser
  1157. var config = resp.data.config
  1158. this.config = config
  1159. let project_config = resp.data.project_config
  1160. if(project_config.is_open == 1){
  1161. this.project = resp.data.project
  1162. console.log("wode 2o2o3o3o23o32o32o23o32o32o", this.project)
  1163. let projectArr = []
  1164. if(this.org_id!= 10318 && this.org_id!=10265){
  1165. this.project.map(item => {
  1166. resp.data.hisAdvices.map(it => {
  1167. if(item.patient_id == it.patient_id){
  1168. projectArr.push(item)
  1169. }
  1170. })
  1171. })
  1172. console.log("projectArr2332323232323232",projectArr)
  1173. resp.data.hisAdvices.map((item,index) => {
  1174. if(projectArr[index].project && projectArr[index].project.length > 0){
  1175. projectArr[index].project.map(it => {
  1176. let obj = {
  1177. advice_doctor: it.doctor,
  1178. start_time:it.start_time,
  1179. advice_name:it.team_id > 0 && it.is_check_team == 1 ? it.team.project_team : it.type == 2 ? it.project.project_name+' '+it.count + it.project.unit : it.good_info.good_name +' '+it.count+ it.good_info.packing_unit,
  1180. execution_time:it.execution_time,
  1181. execution_state:it.execution_state,
  1182. execution_staff:it.execution_staff,
  1183. check_time:it.check_time,
  1184. check_state:it.check_state,
  1185. checker:it.checker,
  1186. created_time:it.ctime,
  1187. delivery_way:'',
  1188. execution_frequency:'',
  1189. remark:'',
  1190. id:it.id,
  1191. patient_id:it.patient_id,
  1192. parent_id:0,
  1193. groupno:0,
  1194. sort:item.device_number.sort,
  1195. assess_time:item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  1196. }
  1197. item.doctor_advice.push(obj)
  1198. })
  1199. }
  1200. })
  1201. console.log("中国人民名份反反复复方法 ",resp.data.hisAdvices)
  1202. }
  1203. }
  1204. if(config.is_open == 0 || config.is_open == 2){
  1205. var schedules = resp.data.scheduals
  1206. var newList = []
  1207. if(this.is_sort == 0){
  1208. newList = schedules
  1209. }
  1210. if(this.is_sort == 0 || this.is_sort == 1){
  1211. schedules.map(item => {
  1212. item.is_sort = item.device_number.sort
  1213. item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  1214. })
  1215. newList = schedules.sort(this.compare('is_sort'))
  1216. }
  1217. if(this.is_sort == 2){
  1218. schedules.map(item => {
  1219. item.is_sort = item.device_number.sort
  1220. item.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  1221. })
  1222. newList = schedules.sort(this.compare('assess_time'))
  1223. }
  1224. this.show = true
  1225. this.showOne = false
  1226. let arr = []
  1227. let newArr = []
  1228. let newSchedules = []
  1229. newList.map(item => {
  1230. item.doctor_advice.map(it =>{
  1231. it.name = item.patient.name
  1232. if(item.prescription != null){
  1233. it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
  1234. it.dialysis_dialyszers = item.prescription.dialysis_dialyszers
  1235. it.dialysis_irrigation = item.prescription.dialysis_irrigation
  1236. it.anticoagulant = item.prescription.anticoagulant
  1237. }
  1238. it.schedule_type = item.schedule_type
  1239. it.zoneId = item.device_number.zone.id
  1240. it.dialysis_no = item.patient.dialysis_no
  1241. it.mode_id = item.mode_id
  1242. it.number = item.device_number.number
  1243. it.zone_name = item.device_number.zone.name
  1244. it.sort = item.device_number.sort,
  1245. arr.push(it)
  1246. })
  1247. item.is_sort = item.device_number.sort
  1248. item.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  1249. })
  1250. console.log("schedules9999999998888888888",schedules)
  1251. if(this.schedulType == 0){
  1252. newSchedules = arr
  1253. }else{
  1254. arr.map(item => {
  1255. if (item.schedule_type == this.schedulType) {
  1256. newSchedules.push(item)
  1257. }
  1258. })
  1259. }
  1260. if(this.partitionType == 0){
  1261. this.scheduleMap = newSchedules
  1262. }else {
  1263. let a = []
  1264. arr.map(item => {
  1265. if(this.partitionType == item.zoneId){
  1266. a.push(item)
  1267. }
  1268. })
  1269. this.scheduleMap = a
  1270. }
  1271. this.scheduleMap.map(ele => {
  1272. let firstIndex = this.scheduleMap.findIndex(item => {
  1273. return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
  1274. })
  1275. if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
  1276. newArr.push({
  1277. length: this.scheduleMap.filter(item => {
  1278. return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
  1279. }).length,
  1280. firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
  1281. })
  1282. }
  1283. })
  1284. this.indexInfoList = newArr
  1285. console.log("this.scheduleMap", this.scheduleMap)
  1286. }
  1287. if(config.is_open == 1){
  1288. this.show = false
  1289. this.showOne = true
  1290. var schedules = resp.data.hisAdvices
  1291. let arr = []
  1292. let newArr = []
  1293. let newSchedules = []
  1294. var newList = []
  1295. if(this.is_sort == 0){
  1296. newList = schedules
  1297. }
  1298. if(this.is_sort == 1){
  1299. schedules.map(item => {
  1300. item.is_sort = item.device_number.sort
  1301. item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  1302. })
  1303. newList = schedules.sort(this.compare('is_sort'))
  1304. }
  1305. if(this.is_sort == 2){
  1306. schedules.map(item => {
  1307. item.is_sort = item.device_number.sort
  1308. item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  1309. })
  1310. newList = schedules.sort(this.compare('assess_time'))
  1311. }
  1312. newList.map(item => {
  1313. item.doctor_advice.map(it =>{
  1314. it.name = item.patient.name
  1315. if(item.prescription != null){
  1316. it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
  1317. it.dialysis_dialyszers = item.prescription.dialysis_dialyszers
  1318. it.dialysis_irrigation = item.prescription.dialysis_irrigation
  1319. it.anticoagulant = item.prescription.anticoagulant
  1320. }
  1321. it.schedule_type = item.schedule_type
  1322. it.zoneId = item.device_number.zone.id
  1323. it.dialysis_no = item.patient.dialysis_no
  1324. it.mode_id = item.mode_id
  1325. it.number = item.device_number.number
  1326. it.zone_name = item.device_number.zone.name
  1327. it.sort = item.device_number.sort,
  1328. arr.push(it)
  1329. })
  1330. item.is_sort = item.device_number.sort
  1331. item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
  1332. })
  1333. if(this.schedulType == 0){
  1334. newSchedules = arr
  1335. }else{
  1336. arr.map(item => {
  1337. if (item.schedule_type == this.schedulType) {
  1338. newSchedules.push(item)
  1339. }
  1340. })
  1341. }
  1342. if(this.partitionType == 0){
  1343. this.scheduleMap = newSchedules
  1344. }else {
  1345. let a = []
  1346. arr.map(item => {
  1347. if(this.partitionType == item.zoneId){
  1348. a.push(item)
  1349. }
  1350. })
  1351. this.scheduleMap = a
  1352. }
  1353. this.scheduleMap.map(ele => {
  1354. let firstIndex = this.scheduleMap.findIndex(item => {
  1355. return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
  1356. })
  1357. if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
  1358. newArr.push({
  1359. length: this.scheduleMap.filter(item => {
  1360. return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
  1361. }).length,
  1362. firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
  1363. })
  1364. }
  1365. })
  1366. this.indexInfoList = newArr
  1367. }
  1368. }
  1369. })
  1370. },
  1371. compare:function (k) {
  1372. return function (a, b) {
  1373. var M = a[k];
  1374. var N = b[k];
  1375. return M - N; // 从低向高排
  1376. // return N - M; // 从高向低排
  1377. }
  1378. },
  1379. getValue: function(val) {
  1380. if (val != undefined) {
  1381. return val.value;
  1382. } else {
  1383. return "";
  1384. }
  1385. },
  1386. handleCurrentChange(val) {
  1387. this.listQuery.page = val;
  1388. this.getSchedualPatientList();
  1389. },
  1390. changeSearchMode: function() {
  1391. if (this.search_mode == 1) {
  1392. this.search_mode = 2;
  1393. } else {
  1394. this.search_mode = 1;
  1395. }
  1396. },
  1397. searchPatientAction: function() {
  1398. this.listQuery.keywords = this.patient_search_keyword;
  1399. console.log(this.patient_search_keyword);
  1400. if (this.patient_search_keyword.length == 0) {
  1401. return;
  1402. }
  1403. this.getSchedualPatientList();
  1404. },
  1405. handleSizeChange(val) {
  1406. this.listQuery.limit = val;
  1407. this.getSchedualPatientList();
  1408. },
  1409. batchPrintAction: function() {
  1410. if (this.selecting_schs.length === 0) {
  1411. this.$message.error("请至少选择一条需要打印的内容");
  1412. return false;
  1413. }
  1414. // 模板ID为6
  1415. var sch_ids = [];
  1416. for (let index = 0; index < this.selecting_schs.length; index++) {
  1417. sch_ids.push(this.selecting_schs[index].patient_id);
  1418. }
  1419. this.$store.dispatch("SetAdviceIDs", sch_ids);
  1420. var name = ""
  1421. for(let i=0;i<this.deliveryWay.length;i++){
  1422. if(this.delivery_way == this.deliveryWay[i].id){
  1423. name = this.deliveryWay[i].name
  1424. }
  1425. }
  1426. if(name == '全部'){
  1427. name = ""
  1428. }
  1429. if(this.org_id == 9671 || this.org_id == 10340){
  1430. this.$router.push({ path: "/dialysis/doctorAdvicePrint/one",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way,schedulType:this.schedulType,partitionType:this.partitionType} });
  1431. }
  1432. if(this.org_id == 10721 || this.org_id == 0){
  1433. this.$router.push({ path: "/dialysis/doctorAdvicePrint/two",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way,schedulType:this.schedulType,partitionType:this.partitionType} });
  1434. }
  1435. if(this.org_id != 9671 && this.org_id != 10340 && this.org_id!=10721){
  1436. this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way} });
  1437. }
  1438. },
  1439. batchPrintActionFour:function(){
  1440. console.log("处方哈回复奥回复的话啊哈地方h")
  1441. if(this.selecting_schs.length === 0) {
  1442. this.$message.error("请至少选择一条需要打印的内容");
  1443. return false;
  1444. }
  1445. // 模板ID为6
  1446. var sch_ids = [];
  1447. for (let index = 0; index < this.selecting_schs.length; index++) {
  1448. sch_ids.push(this.selecting_schs[index].patient_id);
  1449. }
  1450. this.$store.dispatch("SetAdviceIDs", sch_ids);
  1451. var name = ""
  1452. for(let i=0;i<this.deliveryWay.length;i++){
  1453. if(this.delivery_way == this.deliveryWay[i].id){
  1454. name = this.deliveryWay[i].name
  1455. }
  1456. }
  1457. if(name == '全部'){
  1458. name = ""
  1459. }
  1460. this.$router.push({ path: "/dialysis/doctocInspection/print",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way,schedulType:this.schedulType,partitionType:this.partitionType} });
  1461. },
  1462. batchPrintActionFive:function(){
  1463. console.log("处方哈回复奥回复的话啊哈地方h")
  1464. if(this.selecting_schs.length === 0) {
  1465. this.$message.error("请至少选择一条需要打印的内容");
  1466. return false;
  1467. }
  1468. // 模板ID为6
  1469. var sch_ids = [];
  1470. for (let index = 0; index < this.selecting_schs.length; index++) {
  1471. sch_ids.push(this.selecting_schs[index].patient_id);
  1472. }
  1473. this.$store.dispatch("SetAdviceIDs", sch_ids);
  1474. var name = ""
  1475. for(let i=0;i<this.deliveryWay.length;i++){
  1476. if(this.delivery_way == this.deliveryWay[i].id){
  1477. name = this.deliveryWay[i].name
  1478. }
  1479. }
  1480. if(name == '全部'){
  1481. name = ""
  1482. }
  1483. this.$router.push({ path: "/dialysis/nurseInspection/print",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way,schedulType:this.schedulType,partitionType:this.partitionType} });
  1484. },
  1485. signPrintAction:function(){
  1486. if (this.selecting_schs.length === 0) {
  1487. this.$message.error("请至少选择一条需要打印的内容");
  1488. return false;
  1489. }
  1490. // 模板ID为6
  1491. var sch_ids = [];
  1492. for (let index = 0; index < this.selecting_schs.length; index++) {
  1493. sch_ids.push(this.selecting_schs[index].patient_id);
  1494. }
  1495. this.$store.dispatch("SetAdviceIDs", sch_ids);
  1496. var name = ""
  1497. for(let i=0;i<this.deliveryWay.length;i++){
  1498. if(this.delivery_way == this.deliveryWay[i].id){
  1499. name = this.deliveryWay[i].name
  1500. }
  1501. }
  1502. if(name == '全部'){
  1503. name = ""
  1504. }
  1505. var nameOne = ""
  1506. for(let i=0;i<this.excutList.length;i++){
  1507. if(this.execution_frequency == this.excutList[i].id){
  1508. nameOne = this.excutList[i].name
  1509. }
  1510. }
  1511. if(nameOne == '全部'){
  1512. nameOne = ""
  1513. }
  1514. this.$router.push({ path: "/dialysis/signPrint",query:{time: new Date(this.time).getTime(),delivery_way:name,execution_frequency:nameOne,patient_id:this.patient_id,keyword:this.keyword,excution_way:this.excution_way} });
  1515. },
  1516. batchPrintActionOne: function() {
  1517. if (this.selecting_schs.length === 0) {
  1518. this.$message.error("请至少选择一条需要打印的内容");
  1519. return false;
  1520. }
  1521. var sch_ids = [];
  1522. for (let index = 0; index < this.selecting_schs.length; index++) {
  1523. sch_ids.push(this.selecting_schs[index].sch_id);
  1524. }
  1525. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  1526. if (this.template_id == 2 || this.template_id == 0) {
  1527. this.$router.push({ path: "/dialysis/print/batch/otherone" });
  1528. } else if (this.template_id == 1) {
  1529. this.$router.push({ path: "/dialysis/print/batch" });
  1530. } else if (this.template_id == 5) {
  1531. this.$router.push({ path: "/dialysis/print/batch/fiveone" });
  1532. } else if (this.template_id == 22) {
  1533. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
  1534. }
  1535. },
  1536. batchPrintActionTwo: function() {
  1537. if (this.selecting_schs.length === 0) {
  1538. this.$message.error("请至少选择一条需要打印的内容");
  1539. return false;
  1540. }
  1541. var sch_ids = [];
  1542. for (let index = 0; index < this.selecting_schs.length; index++) {
  1543. sch_ids.push(this.selecting_schs[index].sch_id);
  1544. }
  1545. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  1546. if (this.template_id == 2 || this.template_id == 0) {
  1547. this.$router.push({ path: "/dialysis/print/batch/othertwo" });
  1548. } else if (this.template_id == 1) {
  1549. this.$router.push({ path: "/dialysis/print/batch" });
  1550. } else if (this.template_id == 5) {
  1551. this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
  1552. } else if (this.template_id == 22) {
  1553. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
  1554. }
  1555. },
  1556. compare (property) {
  1557. return function (a, b) {
  1558. var value1 = a[property]
  1559. var value2 = b[property]
  1560. return value1 - value2
  1561. }
  1562. },
  1563. // tableRowClassName({ row, rowIndex }) {
  1564. // if (row.stop_state == 1 || row.execution_state == 1) {
  1565. // return 'stoped-row';
  1566. // }
  1567. // return 'success-rows'
  1568. // row.index = rowIndex
  1569. // const arr = this.hoverOrderArr
  1570. // for (let i = 0; i < arr.length; i++) {
  1571. // if (rowIndex == arr[i]) {
  1572. // return 'success-row'
  1573. // }
  1574. // }
  1575. // },
  1576. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  1577. if (columnIndex === 0) {
  1578. let index = this.indexInfoList.findIndex(item => { //遍历数组
  1579. return item.firstIndex === rowIndex
  1580. })
  1581. if (index > -1) {
  1582. return {
  1583. rowspan: this.indexInfoList[index].length,
  1584. colspan: 1
  1585. }
  1586. } else {
  1587. return {
  1588. rowspan: 0,
  1589. colspan: 0
  1590. }
  1591. }
  1592. }
  1593. if (columnIndex === 1) {
  1594. let index = this.indexInfoList.findIndex(item => { //遍历数组
  1595. return item.firstIndex === rowIndex
  1596. })
  1597. if (index > -1) {
  1598. return {
  1599. rowspan: this.indexInfoList[index].length,
  1600. colspan: 1
  1601. }
  1602. } else {
  1603. return {
  1604. rowspan: 0,
  1605. colspan: 0
  1606. }
  1607. }
  1608. }
  1609. if (columnIndex === 2) {
  1610. let index = this.indexInfoList.findIndex(item => { //遍历数组
  1611. return item.firstIndex === rowIndex
  1612. })
  1613. if (index > -1) {
  1614. return {
  1615. rowspan: this.indexInfoList[index].length,
  1616. colspan: 1
  1617. }
  1618. } else {
  1619. return {
  1620. rowspan: 0,
  1621. colspan: 0
  1622. }
  1623. }
  1624. }
  1625. },
  1626. adviceNameShow({ row, column, rowIndex, columnIndex }) {
  1627. if (columnIndex == 2) {
  1628. return 'dialysisadvicenamedisplay'
  1629. } else {
  1630. return ''
  1631. }
  1632. },
  1633. getXuserName(id) {
  1634. if (id <= 0) {
  1635. return ''
  1636. }
  1637. var name = ''
  1638. if (
  1639. this.admin_users == null ||
  1640. typeof this.admin_users.length === 'undefined'
  1641. ) {
  1642. return name
  1643. }
  1644. var leng = this.admin_users.length
  1645. if (leng == 0) {
  1646. return name
  1647. }
  1648. for (let index = 0; index < leng; index++) {
  1649. if (this.admin_users[index].id == id) {
  1650. name = this.admin_users[index].name
  1651. break
  1652. }
  1653. }
  1654. return name
  1655. },
  1656. getAdviceContent(row, isChild) {
  1657. console.log("rwoo22222222222222333",row)
  1658. let tempSingleDoseDesc = ''
  1659. let tempDrugSpecDesc = ''
  1660. let tempPrescribingNumberDesc = ''
  1661. if (row.prescribing_number) {
  1662. tempPrescribingNumberDesc = row.prescribing_number + '' + row.prescribing_number_unit
  1663. }
  1664. if (row.single_dose) {
  1665. if (this.template_id != 6) {
  1666. tempSingleDoseDesc =' 单次用量 ' + ' ' + row.single_dose + '' + row.single_dose_unit
  1667. } else {
  1668. tempSingleDoseDesc = row.single_dose + row.single_dose_unit
  1669. }
  1670. }
  1671. if (row.advice_desc) {
  1672. tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
  1673. }
  1674. if (isChild == 1) {
  1675. // 不是子药
  1676. // console.log(tempDrugSpecDesc)
  1677. // console.log(tempPrescribingNumberDesc)
  1678. // console.log(tempSingleDoseDesc)
  1679. // console.log(11,row.delivery_way)
  1680. // console.log(22,row.execution_frequency)
  1681. return (row.advice_name + tempDrugSpecDesc + ' ' + tempPrescribingNumberDesc + tempSingleDoseDesc +' ' + row.delivery_way +' ' +row.execution_frequency)
  1682. } else {
  1683. // 是子药
  1684. return (row.advice_name +tempDrugSpecDesc +' ' + tempPrescribingNumberDesc + tempSingleDoseDesc)
  1685. }
  1686. },
  1687. handleSelectionChange(val){
  1688. this.selecting_schs = val;
  1689. this.is_status = 1
  1690. },
  1691. handleSelectionChangeOne(val){
  1692. this.selecting_schs = val;
  1693. this.is_status = 1
  1694. console.log("val32323323223",val)
  1695. },
  1696. querySearchAsync(keyword, cb) {
  1697. let key = '';
  1698. if (keyword != undefined) {
  1699. key = keyword
  1700. }
  1701. let searchArray = []
  1702. PostSearch(key).then(response => {
  1703. if (response.data.state == 1) {
  1704. searchArray = response.data.data.patient
  1705. console.log('searcharrya', searchArray)
  1706. cb(searchArray)
  1707. }
  1708. })
  1709. return searchArray
  1710. },
  1711. handleSelect(val) {
  1712. this.patient_id = val.id
  1713. this.listQuery.keyword = val.name
  1714. this.requestSchedualDoctors(this.time)
  1715. },
  1716. toSeach(){
  1717. this.patient_id = 0
  1718. this.requestSchedualDoctors(this.time)
  1719. },
  1720. toSeachOne(){
  1721. this.requestSchedualDoctors(this.time)
  1722. },
  1723. toExcution(){
  1724. if(this.selecting_schs.length ==0){
  1725. this.$message.error("请勾选需要执行的医嘱")
  1726. return false
  1727. }
  1728. console.log("hhhahhhahhh",this.is_status)
  1729. if(this.is_status == 1){
  1730. this.execTimeDialogVisible = true
  1731. }
  1732. if(this.is_status == 2){
  1733. this.execTimeDialogVisibleOne = true
  1734. }
  1735. },
  1736. excutionDoctorAdvice(){
  1737. if (this.execTime.length == 0) {
  1738. this.$message.error('请选择执行时间!')
  1739. return false
  1740. }
  1741. var execTime = Math.round(new Date(this.execTime).getTime() / 1000)
  1742. var ids=[]
  1743. if(this.selecting_schs!=null && this.selecting_schs.length >0){
  1744. for(let i=0;i<this.selecting_schs.length;i++){
  1745. ids.push(this.selecting_schs[i].patient_id)
  1746. }
  1747. }
  1748. var str = ids.join(",")
  1749. var params = {
  1750. str:str,
  1751. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1752. is_open:this.config.is_open,
  1753. exec_time:execTime
  1754. }
  1755. console.log("params232322323wo",params)
  1756. this.exceLoading = true
  1757. excutionDoctorAdvice(params).then(response=>{
  1758. if(response.data.state == 1){
  1759. if(response.data.data.msg == 2){
  1760. var drug_name = response.data.data.drug.drug_name
  1761. var dose = response.data.data.drug.dose
  1762. var dose_unit = response.data.data.drug.dose_unit
  1763. var min_number = response.data.data.drug.min_number
  1764. var max_unit = response.data.data.drug.max_unit
  1765. var min_unit = response.data.data.drug.min_unit
  1766. var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
  1767. this.$message.error(str +"库存不足,执行失败!")
  1768. this.exceLoading = false
  1769. this.execTimeDialogVisible = false
  1770. this.requestSchedualDoctors(this.time)
  1771. }
  1772. if(response.data.data.msg == 3){
  1773. this.$message.error("执行人和核对人不能是同一个人,执行失败!")
  1774. }
  1775. }
  1776. })
  1777. },
  1778. toCheck(){
  1779. if(this.selecting_schs.length ==0){
  1780. this.$message.error("请勾选需要执行的医嘱")
  1781. return false
  1782. }
  1783. var ids=[]
  1784. if(this.selecting_schs!=null && this.selecting_schs.length >0){
  1785. for(let i=0;i<this.selecting_schs.length;i++){
  1786. ids.push(this.selecting_schs[i].patient_id)
  1787. }
  1788. }
  1789. var str = ids.join(",")
  1790. var params = {
  1791. str:str,
  1792. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1793. is_open:this.config.is_open,
  1794. }
  1795. checkNewDoctorAdvice(params).then(response=>{
  1796. if(response.data.state == 1){
  1797. if(response.data.data.msg == 2){
  1798. var advice = response.data.data.advice
  1799. this.$message.error(advice.advice_name +"执行人和核对人不能是同一个人,核对失败!")
  1800. this.requestSchedualDoctors(this.time)
  1801. }else{
  1802. this.$message.success("核对成功!")
  1803. this.requestSchedualDoctors(this.time)
  1804. }
  1805. }
  1806. })
  1807. },
  1808. toSettle(){
  1809. if(this.selecting_schs.length ==0){
  1810. this.$message.error("请勾选需要执行的医嘱")
  1811. return false
  1812. }
  1813. var ids=[]
  1814. if(this.selecting_schs!=null && this.selecting_schs.length >0){
  1815. for(let i=0;i<this.selecting_schs.length;i++){
  1816. ids.push(this.selecting_schs[i].patient_id)
  1817. }
  1818. }
  1819. var str = ids.join(",")
  1820. var params = {
  1821. str:str,
  1822. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1823. is_open:this.config.is_open,
  1824. }
  1825. settleNewDoctorAdvice(params).then(response=>{
  1826. if(response.data.state == 1){
  1827. this.$message.success("收费成功!")
  1828. this.requestSchedualDoctors(this.time)
  1829. }
  1830. })
  1831. },
  1832. selectSortType(id){
  1833. this.is_sort = id
  1834. this.requestSchedualDoctors(this.time);
  1835. },
  1836. handleRowClick (row) {
  1837. },
  1838. tableRowClassName({row, rowIndex}) {
  1839. row.index = rowIndex
  1840. if(row.index = rowIndex){
  1841. return 'success-row'
  1842. }
  1843. },
  1844. handleCurrentChangeList(row){
  1845. this.selecting_schs.push(row)
  1846. this.current_row= row
  1847. this.is_status = 2
  1848. },
  1849. excutionDoctorAdviceOne(){
  1850. if(this.current_row.execution_state == 1){
  1851. this.$message.error("所选医嘱已核对,无需再核对!")
  1852. return false
  1853. }
  1854. if (this.execTime.length == 0) {
  1855. this.$message.error('请选择执行时间!')
  1856. return false
  1857. }
  1858. var execTime = Math.round(new Date(this.execTime).getTime() / 1000)
  1859. var params= {
  1860. advice_id:this.current_row.id,
  1861. advice_date: moment(this.time).format('YYYY-MM-DD'),
  1862. exec_time:execTime,
  1863. }
  1864. excutionDoctorAdviceById(params).then(response=>{
  1865. if(response.data.state == 1){
  1866. if(response.data.data.msg == 2){
  1867. var drug_name = response.data.data.drug.drug_name
  1868. var dose = response.data.data.drug.dose
  1869. var dose_unit = response.data.data.drug.dose_unit
  1870. var min_number = response.data.data.drug.min_number
  1871. var max_unit = response.data.data.drug.max_unit
  1872. var min_unit = response.data.data.drug.min_unit
  1873. var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
  1874. this.$message.error(str +"库存不足,执行失败!")
  1875. this.exceLoading = false
  1876. this.execTimeDialogVisibleOne = false
  1877. this.requestSchedualDoctors(this.time)
  1878. }
  1879. if(response.data.data.msg == 1){
  1880. var msg = response.data.data.msg
  1881. this.$message.success("执行成功!")
  1882. this.exceLoading = false
  1883. this.execTimeDialogVisibleOne = false
  1884. this.requestSchedualDoctors(this.time)
  1885. }
  1886. if(response.data.data.msg == 3){
  1887. this.$message.error("执行人与核对人不能是同一个人,执行失败!")
  1888. }
  1889. }
  1890. })
  1891. },
  1892. toStatic() {
  1893. var str = ""
  1894. if(this.partion_type==0){
  1895. str = this.zoneIdList.join(",")
  1896. }
  1897. if(this.partion_type!=0){
  1898. str = this.partion_type.join(",")
  1899. }
  1900. this.partion_str = ""
  1901. this.partion_str = str
  1902. this.tableList = []
  1903. var params = {
  1904. schedule_type:this.schedule_type,
  1905. partion_type:str,
  1906. selected_date: moment(this.time).format('YYYY-MM-DD'),
  1907. }
  1908. console.log("params2332232wo",params)
  1909. getDialysisAdviceToday(params).then(response=>{
  1910. if(response.data.state == 1){
  1911. var doctorList = []
  1912. var druglist = response.data.data.drug
  1913. this.druglist = druglist
  1914. this.startdialogVisible = true
  1915. var list = response.data.data.list
  1916. var config = response.data.data.config
  1917. this.manufacturerList = response.data.data.manufacturerList
  1918. console.log("dcotor---------------",this.manufacturerList)
  1919. if(list!=null && list.length > 0){
  1920. for(let i=0;i<list.length;i++){
  1921. for(let j=0;j<list[i].xt_doctor_advice.length;j++){
  1922. doctorList.push(list[i].xt_doctor_advice[j])
  1923. }
  1924. }
  1925. }
  1926. if(config.is_open!=1){
  1927. if(doctorList!=null && doctorList.length > 0){
  1928. let dataInfo = {}
  1929. doctorList.forEach((item, index) => {
  1930. let { advice_name } = item
  1931. if (!dataInfo[advice_name]) {
  1932. dataInfo[advice_name] = {
  1933. advice_name:item.advice_name.replace(/\s+/g, ''),
  1934. child: [],
  1935. count:0,
  1936. drug_id:item.drug_id,
  1937. specification_name:item.advice_desc +item.drug_spec_unit,
  1938. patient_id:item.patient_id,
  1939. delivery_way:"",
  1940. }
  1941. }
  1942. })
  1943. let arr = Object.values(dataInfo)
  1944. // console.log("arr23332323232",arr)
  1945. if(arr.length > 0){
  1946. for(let i=0;i<doctorList.length;i++){
  1947. for(let j=0;j<arr.length;j++){
  1948. if(doctorList[i].advice_name.replace(/\s+/g, '') == arr[j].advice_name){
  1949. arr[j].child.push(doctorList[i])
  1950. }
  1951. }
  1952. }
  1953. }
  1954. this.tableList = []
  1955. for(let i=0;i<list.length;i++){
  1956. for(let j=0;j<arr.length;j++){
  1957. if(list[i].patient_id == arr[j].patient_id){
  1958. this.tableList.push(arr[j])
  1959. }
  1960. }
  1961. }
  1962. }
  1963. }
  1964. var his_doctor_advice = []
  1965. for(let i=0;i<list.length;i++){
  1966. for(let j=0;j<list[i].his_doctor_advice.length;j++){
  1967. his_doctor_advice.push(list[i].his_doctor_advice[j])
  1968. }
  1969. }
  1970. console.log("his_doctor_advice",his_doctor_advice)
  1971. var newHisArr = []
  1972. for(let i=0;i<his_doctor_advice.length;i++){
  1973. his_doctor_advice[i].count_one = 0
  1974. if(his_doctor_advice[i].prescribing_number_unit == his_doctor_advice[i].drug.max_unit){
  1975. his_doctor_advice[i].prescribing_number = parseInt(his_doctor_advice[i].prescribing_number) * his_doctor_advice[i].drug.min_number
  1976. his_doctor_advice[i].count_one = parseInt(his_doctor_advice[i].prescribing_number) * his_doctor_advice[i].drug.min_number
  1977. }
  1978. }
  1979. for(let i=0;i<his_doctor_advice.length;i++){
  1980. for(let j=0;j<druglist.length;j++){
  1981. if(his_doctor_advice[i].drug_id == druglist[j].id){
  1982. newHisArr.push(his_doctor_advice[i])
  1983. }
  1984. }
  1985. }
  1986. console.log("下盘子3223323223",newHisArr)
  1987. if(config.is_open == 1){
  1988. if(newHisArr!=null && newHisArr.length > 0){
  1989. let dataInfoOne = {}
  1990. newHisArr.forEach((item, index) => {
  1991. let { drug_id } = item
  1992. if (!dataInfoOne[drug_id]) {
  1993. dataInfoOne[drug_id] = {
  1994. advice_name:item.advice_name,
  1995. child: [],
  1996. count:0,
  1997. specification_name:this.getSpecification(item.drug_id),
  1998. drug_id:item.drug_id,
  1999. patient_id:item.patient_id,
  2000. min_number:item.drug.min_number,
  2001. max_unit:item.drug.max_unit,
  2002. min_unit:item.drug.min_unit,
  2003. delivery_way:item.delivery_way,
  2004. manufacturer_name:this.getManufacturer(item.drug.manufacturer) ,
  2005. }
  2006. }
  2007. })
  2008. let hisarr = Object.values(dataInfoOne)
  2009. console.log("hisarr233232233232",hisarr)
  2010. if(hisarr.length > 0){
  2011. for(let i=0;i<newHisArr.length;i++){
  2012. for(let j=0;j<hisarr.length;j++){
  2013. if(newHisArr[i].drug_id == hisarr[j].drug_id){
  2014. hisarr[j].child.push(newHisArr[i])
  2015. }
  2016. }
  2017. }
  2018. }
  2019. if(this.org_id == 0 || this.org_id ==10644){
  2020. var newArr = []
  2021. var arr_one = []
  2022. for(let i=0;i<hisarr.length;i++){
  2023. if(hisarr[i].delivery_way.indexOf('口服')!=-1){
  2024. newArr.push(hisarr[i])
  2025. }
  2026. }
  2027. for(let i=0;i<hisarr.length;i++){
  2028. if(hisarr[i].delivery_way.indexOf('口服')==-1){
  2029. newArr.push(hisarr[i])
  2030. }
  2031. }
  2032. this.tableList = []
  2033. this.tableList = newArr
  2034. }else{
  2035. this.tableList = []
  2036. this.tableList = hisarr
  2037. }
  2038. }
  2039. }
  2040. }
  2041. })
  2042. },
  2043. arraySort(property) {
  2044. return function (a, b) {
  2045. var value1 = a[property];
  2046. var value2 = b[property];
  2047. return value1 - value2;
  2048. };
  2049. },
  2050. toStaticOne() {
  2051. var str = ""
  2052. if(this.partion_type==0){
  2053. str = this.zoneIdList.join(",")
  2054. }
  2055. if(this.partion_type!=0){
  2056. str = this.partion_type.join(",")
  2057. }
  2058. this.partion_str = ""
  2059. this.partion_str = str
  2060. this.tableList = []
  2061. var params = {
  2062. schedule_type:this.schedule_type,
  2063. partion_type:str,
  2064. selected_date: moment(this.time).format('YYYY-MM-DD'),
  2065. }
  2066. getDialysisAdviceToday(params).then(response=>{
  2067. if(response.data.state == 1){
  2068. var doctorList = []
  2069. var druglist = response.data.data.drug
  2070. this.druglist = druglist
  2071. this.startdialogVisibleOne = true
  2072. var list = response.data.data.list
  2073. var config = response.data.data.config
  2074. this.adminUserList = response.data.data.doctorList
  2075. if(list!=null && list.length > 0){
  2076. for(let i=0;i<list.length;i++){
  2077. for(let j=0;j<list[i].xt_doctor_advice.length;j++){
  2078. list[i].xt_doctor_advice[j].mode_id = list[i].mode_id
  2079. list[i].xt_doctor_advice[j].zone_name = list[i].device_number.zone.name
  2080. list[i].xt_doctor_advice[j].sort = list[i].device_number.zone.sort
  2081. doctorList.push(list[i].xt_doctor_advice[j])
  2082. }
  2083. }
  2084. }
  2085. if(config.is_open!=1){
  2086. if(doctorList!=null && doctorList.length > 0){
  2087. let dataInfo = {}
  2088. doctorList.forEach((item, index) => {
  2089. item.advice_name = item.advice_name.replace(/\s/g,"")
  2090. let { advice_name } = item
  2091. if (!dataInfo[advice_name]) {
  2092. dataInfo[advice_name] = {
  2093. advice_name:item.advice_name,
  2094. child: [],
  2095. count:0,
  2096. execution_staff:item.execution_staff,
  2097. specification_name:item.advice_desc +item.drug_spec_unit,
  2098. patient_id:item.patient_id,
  2099. }
  2100. }
  2101. })
  2102. let arr = Object.values(dataInfo)
  2103. for(let i=0;i<arr.length;i++){
  2104. for(let j=0;j<doctorList.length;j++){
  2105. if(arr[i].advice_name == doctorList[j].advice_name){
  2106. arr[i].child.push(doctorList[j])
  2107. }
  2108. }
  2109. }
  2110. this.tabHead = arr
  2111. console.log("tabHead",this.tabHead)
  2112. }
  2113. this.doctorMap = []
  2114. if(doctorList!=null && doctorList.length > 0){
  2115. let dataInfoOne = {}
  2116. doctorList.forEach((item, index) => {
  2117. if(item.advice_name == "肝素钠注射剂"){
  2118. this.doctorMap.push(item)
  2119. }
  2120. let { zone_name } = item
  2121. if (!dataInfoOne[zone_name]) {
  2122. dataInfoOne[zone_name] = {
  2123. zone_name:item.zone_name,
  2124. child: [],
  2125. count:0,
  2126. sort:item.sort,
  2127. }
  2128. }
  2129. })
  2130. let newArr = Object.values(dataInfoOne)
  2131. if(newArr!=null && newArr.length >0){
  2132. for(let i=0;i<newArr.length;i++){
  2133. for(let j=0;j<doctorList.length;j++){
  2134. if(newArr[i].zone_name == doctorList[j].zone_name){
  2135. newArr[i].child.push(doctorList[j])
  2136. }
  2137. }
  2138. }
  2139. }
  2140. var newList = newArr.sort(this.compareList('sort'))
  2141. if(newList!=null && newList.length >0){
  2142. for(let i=0;i<newList.length;i++){
  2143. newList[i].is_total = 1
  2144. }
  2145. }
  2146. var obj = {is_total:0,count:0,execution_staff:0,child:[],zone_name:""}
  2147. newList.push(obj)
  2148. this.tableDataList = newList
  2149. console.log("999999999999999999-------",this.tableDataList)
  2150. }
  2151. }
  2152. }
  2153. })
  2154. },
  2155. toStaticTwo(){
  2156. var str = ""
  2157. if(this.partion_type==0){
  2158. str = this.zoneIdList.join(",")
  2159. }
  2160. if(this.partion_type!=0){
  2161. str = this.partion_type.join(",")
  2162. }
  2163. this.partion_str = ""
  2164. this.partion_str = str
  2165. this.tableList = []
  2166. var params = {
  2167. schedule_type:this.schedule_type,
  2168. partion_type:str,
  2169. selected_date: moment(this.time).format('YYYY-MM-DD'),
  2170. }
  2171. getDialysisProject(params).then(response=>{
  2172. if(response.data.state ==1){
  2173. var list = response.data.data.list
  2174. var newArr = []
  2175. if(list!=null && list.length>0){
  2176. for(let i=0;i<list.length;i++){
  2177. for(let j=0;j<list[i].his_doctor_project.length;j++){
  2178. newArr.push(list[i].his_doctor_project[j])
  2179. }
  2180. }
  2181. }
  2182. let dataInfo = {}
  2183. newArr.forEach((item, index) => {
  2184. let { project_id } = item
  2185. if (!dataInfo[project_id]) {
  2186. dataInfo[project_id] = {
  2187. project_id:item.project_id,
  2188. good_name:item.good.good_name,
  2189. specification_name:item.good.specification_name,
  2190. child: [],
  2191. count:0,
  2192. }
  2193. }
  2194. })
  2195. let arr = Object.values(dataInfo)
  2196. if(arr!=null && arr.length >0){
  2197. for(let i =0;i<arr.length;i++){
  2198. for(let j=0;j<newArr.length;j++){
  2199. if(arr[i].project_id == newArr[j].project_id){
  2200. arr[i].child.push(newArr[j])
  2201. }
  2202. }
  2203. }
  2204. for(let i =0;i<arr.length;i++){
  2205. for(let j=0;j<arr[i].child.length;j++){
  2206. arr[i].count += parseInt(arr[i].child[j].count)
  2207. }
  2208. }
  2209. console.log("arr0000000000000000000000",arr)
  2210. this.startdialogVisibleTwo = true
  2211. this.tableProjectList = []
  2212. this.tableProjectList = arr
  2213. }
  2214. }
  2215. })
  2216. },
  2217. getAllQuery(){
  2218. this.toStaticThree()
  2219. },
  2220. toStaticThree(){
  2221. var params = {
  2222. start_time:this.start_time,
  2223. end_time:this.end_time
  2224. }
  2225. this.startMothdialogVisible = true
  2226. getDoctorAdviceMonthList(params).then(response=>{
  2227. if(response.data.state == 1){
  2228. this.startMothdialogVisible = true
  2229. var config = response.data.data.config
  2230. this.config = {}
  2231. this.config = config
  2232. var drugs = response.data.data.drugs
  2233. this.druglist = []
  2234. this.druglist = drugs
  2235. var manufacturerList = response.data.data.manufacturerList
  2236. this.manufacturerList = []
  2237. this.manufacturerList = manufacturerList
  2238. var adviceMonthList = response.data.data.adviceList
  2239. var hisAdviceMonthList = response.data.data.hisAdviceList
  2240. for(let i=0;i<hisAdviceMonthList.length;i++){
  2241. hisAdviceMonthList[i].count_one = 0
  2242. if(hisAdviceMonthList[i].prescribing_number_unit == hisAdviceMonthList[i].drug.max_unit){
  2243. hisAdviceMonthList[i].prescribing_number = parseInt(hisAdviceMonthList[i].prescribing_number) * hisAdviceMonthList[i].drug.min_number
  2244. hisAdviceMonthList[i].count_one = parseInt(hisAdviceMonthList[i].prescribing_number) * hisAdviceMonthList[i].drug.min_number
  2245. }
  2246. }
  2247. if(config.is_open == 1){
  2248. if(hisAdviceMonthList!=null && hisAdviceMonthList.length>0){
  2249. let dataInfo = {}
  2250. hisAdviceMonthList.forEach((item, index) => {
  2251. let { drug_id } = item
  2252. if (!dataInfo[drug_id]) {
  2253. dataInfo[drug_id] = {
  2254. drug_id:item.drug_id,
  2255. advice_name:item.advice_name,
  2256. manufacturer_name:this.getManufacturer(item.drug.manufacturer),
  2257. specification_name:item.drug.dose + item.drug.dose_unit +"*"+item.drug.min_number+item.drug.min_unit+"/"+item.drug.max_unit,
  2258. max_unit:item.drug.max_unit,
  2259. min_unit:item.drug.min_unit,
  2260. min_number:item.drug.min_number,
  2261. child: [],
  2262. }
  2263. }
  2264. })
  2265. let newArr = Object.values(dataInfo)
  2266. console.log("newArr----------------",newArr)
  2267. if(newArr!=null && newArr.length>0){
  2268. for(let i=0;i<newArr.length;i++){
  2269. for(let j=0;j<hisAdviceMonthList.length;j++){
  2270. if(newArr[i].drug_id == hisAdviceMonthList[j].drug_id){
  2271. newArr[i].child.push(hisAdviceMonthList[j])
  2272. }
  2273. }
  2274. }
  2275. }
  2276. this.tableMonthList = []
  2277. this.tableMonthList = newArr
  2278. }
  2279. }
  2280. if(config.is_open == 2 || config.is_open ==0){
  2281. if(adviceMonthList!=null && adviceMonthList.length>0){
  2282. if(adviceMonthList!=null && adviceMonthList.length > 0){
  2283. let dataInfo = {}
  2284. adviceMonthList.forEach((item, index) => {
  2285. item.advice_name = item.advice_name.replace(/\s/g,"")
  2286. let { advice_name } = item
  2287. if (!dataInfo[advice_name]) {
  2288. dataInfo[advice_name] = {
  2289. advice_name:item.advice_name,
  2290. child: [],
  2291. count:0,
  2292. specification_name:item.advice_desc +item.drug_spec_unit,
  2293. manufacturer_name:""
  2294. }
  2295. }
  2296. })
  2297. let arr = Object.values(dataInfo)
  2298. for(let i=0;i<arr.length;i++){
  2299. for(let j=0;j<adviceMonthList.length;j++){
  2300. if(arr[i].advice_name == adviceMonthList[j].advice_name){
  2301. arr[i].child.push(adviceMonthList[j])
  2302. }
  2303. }
  2304. }
  2305. this.tableMonthList = []
  2306. this.tableMonthList = arr
  2307. console.log("hhhhhhhhhhhhhh",this.tableMonthList)
  2308. }
  2309. }
  2310. }
  2311. }
  2312. })
  2313. console.log("params-=----",params)
  2314. },
  2315. toStaticFour(){
  2316. var params = {
  2317. start_time:this.start_time,
  2318. end_time:this.end_time
  2319. }
  2320. getHisPrescrptionProjectMonthList(params).then(response=>{
  2321. if(response.data.state ==1){
  2322. var projectMonthList = response.data.data.projectMonthList
  2323. console.log("projectMonthList",projectMonthList)
  2324. if(projectMonthList!=null && projectMonthList.length>0){
  2325. let dataInfo = {}
  2326. projectMonthList.forEach((item, index) => {
  2327. let { project_id } = item
  2328. if (!dataInfo[project_id]) {
  2329. dataInfo[project_id] = {
  2330. project_id:item.project_id,
  2331. good_name:item.good_info.good_name,
  2332. specification_name:item.good_info.specification_name,
  2333. child: [],
  2334. count:0,
  2335. }
  2336. }
  2337. })
  2338. let arr = Object.values(dataInfo)
  2339. if(arr!=null && arr.length >0){
  2340. for(let i =0;i<arr.length;i++){
  2341. for(let j=0;j<projectMonthList.length;j++){
  2342. if(arr[i].project_id == projectMonthList[j].project_id){
  2343. arr[i].child.push(projectMonthList[j])
  2344. }
  2345. }
  2346. }
  2347. for(let i =0;i<arr.length;i++){
  2348. for(let j=0;j<arr[i].child.length;j++){
  2349. arr[i].count += parseInt(arr[i].child[j].count)
  2350. }
  2351. }
  2352. console.log("arr0000000000000000000000",arr)
  2353. this.startMonthdialogVisible = true
  2354. this.tableProjectList = []
  2355. this.tableProjectList = arr
  2356. }
  2357. }
  2358. }
  2359. })
  2360. },
  2361. getDrugAdviceCount(advice_name,zone_name){
  2362. var str = ""
  2363. var arr =[]
  2364. var arrOne = []
  2365. if(this.doctorMap!=null && this.doctorMap.length>0){
  2366. for(let i=0;i<this.doctorMap.length;i++){
  2367. if(this.doctorMap[i].advice_name!="" || this.doctorMap[i].advice_name!=undefined){
  2368. this.doctorMap[i].advice_name = this.doctorMap[i].advice_name.replace(/\s/g,"")
  2369. }
  2370. if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way =="导管封管"){
  2371. arr.push(this.doctorMap[i])
  2372. }
  2373. if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way.indexOf("泵入")!=-1){
  2374. arrOne.push(this.doctorMap[i])
  2375. }
  2376. }
  2377. }
  2378. if(arr!=null && arr.length >0){
  2379. var total = 0
  2380. for(let i=0;i<arr.length;i++){
  2381. total +=arr[i].prescribing_number
  2382. }
  2383. str = "封管" +"("+total+")"
  2384. }
  2385. if(arrOne!=null && arrOne.length >0){
  2386. var total_one = 0
  2387. for(let i=0;i<arrOne.length;i++){
  2388. total_one +=arrOne[i].prescribing_number
  2389. }
  2390. str = str + "泵入" +"("+total_one+")"
  2391. }
  2392. return str
  2393. },
  2394. getSpecification(id){
  2395. var specification_name = ""
  2396. for(let i=0;i<this.druglist.length;i++){
  2397. if(id == this.druglist[i].id){
  2398. specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
  2399. }
  2400. }
  2401. return specification_name
  2402. },
  2403. getCount(val){
  2404. var count = 0
  2405. if(val!=null && val.length > 0){
  2406. for(let i=0;i<val.length;i++){
  2407. count += parseInt(val[i].prescribing_number)
  2408. }
  2409. }
  2410. if(count > 0){
  2411. return count
  2412. }else{
  2413. return 0
  2414. }
  2415. },
  2416. getHisCount(val,max_unit,min_unit,min_number){
  2417. var total = 0
  2418. var max_str = "";
  2419. var min_str = "";
  2420. for(let i=0;i<val.length;i++){
  2421. total+=parseInt(val[i].prescribing_number)
  2422. }
  2423. if (total < min_number) {
  2424. min_str = total + min_unit;
  2425. }
  2426. if (total == 0) {
  2427. min_str = "";
  2428. max_str = "";
  2429. }
  2430. if (total >= min_number) {
  2431. if (parseInt(total / min_number) != 0) {
  2432. max_str = parseInt(total / min_number) + max_unit;
  2433. }
  2434. if (total % min_number != 0) {
  2435. min_str = (total % min_number) + min_unit;
  2436. }
  2437. }
  2438. return max_str + min_str;
  2439. },
  2440. toPrintOne(){
  2441. var schedule_date = moment(this.time).format('YYYY-MM-DD')
  2442. this.$router.push({path:"/dialysis/doctorAdviceStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
  2443. },
  2444. toPrintTwo(){
  2445. var schedule_date = moment(this.time).format('YYYY-MM-DD')
  2446. this.$router.push({path:"/dialysis/doctorNewAdviceStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
  2447. },
  2448. toPrintThree(){
  2449. var schedule_date = moment(this.time).format('YYYY-MM-DD')
  2450. this.$router.push({path:"/dialysis/doctorNewProjectStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
  2451. },
  2452. toExportListOne(){
  2453. import('@/vendor/Export2Excel').then(excel => {
  2454. if(this.tableList!=null && this.tableList.length > 0){
  2455. for(let i=0;i<this.tableList.length;i++){
  2456. this.tableList[i].index = i+1
  2457. if(this.config.is_open == 1){
  2458. this.tableList[i].total_count = this.getHisCount(this.tableList[i].child,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
  2459. }
  2460. if(this.config.is_open!=1){
  2461. this.tableList[i].total_count = this.getCount(this.tableList[i].child)
  2462. }
  2463. }
  2464. }
  2465. const tHeader = ['序号','药品名称','规格','数量']
  2466. const filterVal = ['index','advice_name','specification_name','total_count']
  2467. const data = this.formatJson(filterVal, this.tableList)
  2468. excel.export_json_to_excel({
  2469. header: tHeader,
  2470. data,
  2471. filename: '药品统计'
  2472. })
  2473. this.downloadLoading = false
  2474. })
  2475. },
  2476. toExportListTwo(){
  2477. import('@/vendor/Export2Excel').then(excel => {
  2478. if(this.tableProjectList!=null && this.tableProjectList.length > 0){
  2479. for(let i=0;i<this.tableProjectList.length;i++){
  2480. this.tableProjectList[i].index = i+1
  2481. }
  2482. }
  2483. const tHeader = ['序号','耗材名称','规格','数量']
  2484. const filterVal = ['index','good_name','specification_name','count']
  2485. const data = this.formatJson(filterVal, this.tableProjectList)
  2486. excel.export_json_to_excel({
  2487. header: tHeader,
  2488. data,
  2489. filename: '耗材统计'
  2490. })
  2491. this.downloadLoading = false
  2492. })
  2493. },
  2494. toExportListThree(){
  2495. import('@/vendor/Export2Excel').then(excel => {
  2496. if(this.tableMonthList!=null && this.tableMonthList.length > 0){
  2497. for(let i=0;i<this.tableMonthList.length;i++){
  2498. this.tableMonthList[i].index = i+1
  2499. if(this.config.is_open == 1){
  2500. this.tableMonthList[i].total_count = this.getHisCount(this.tableMonthList[i].child,this.tableMonthList[i].max_unit,this.tableMonthList[i].min_unit,this.tableMonthList[i].min_number)
  2501. }
  2502. if(this.config.is_open!=1){
  2503. this.tableMonthList[i].total_count = this.getCount(this.tableMonthList[i].child)
  2504. }
  2505. }
  2506. }
  2507. const tHeader = ['序号','药品名称','规格','数量','厂家']
  2508. const filterVal = ['index','advice_name','specification_name','total_count','manufacturer_name']
  2509. const data = this.formatJson(filterVal, this.tableMonthList)
  2510. excel.export_json_to_excel({
  2511. header: tHeader,
  2512. data,
  2513. filename: '药品月统计'
  2514. })
  2515. this.downloadLoading = false
  2516. })
  2517. },
  2518. toExportListFour(){
  2519. import('@/vendor/Export2Excel').then(excel => {
  2520. if(this.tableProjectList!=null && this.tableProjectList.length > 0){
  2521. for(let i=0;i<this.tableProjectList.length;i++){
  2522. this.tableProjectList[i].index = i+1
  2523. }
  2524. }
  2525. const tHeader = ['序号','耗材名称','规格','数量']
  2526. const filterVal = ['index','good_name','specification_name','count']
  2527. const data = this.formatJson(filterVal, this.tableProjectList)
  2528. excel.export_json_to_excel({
  2529. header: tHeader,
  2530. data,
  2531. filename: '耗材统计'
  2532. })
  2533. this.downloadLoading = false
  2534. })
  2535. },
  2536. getGoodAllQuery(){
  2537. this.toStaticFour()
  2538. },
  2539. formatJson(filterVal, jsonData) {
  2540. return jsonData.map(v => filterVal.map(j => v[j]));
  2541. },
  2542. changeScheduleType(){
  2543. this.tableList = []
  2544. this.toStatic()
  2545. },
  2546. changePartionType(){
  2547. this.tableList = []
  2548. this.toStatic()
  2549. },
  2550. changeScheduleTypeOne(){
  2551. this.tableDataList = []
  2552. this.toStaticOne()
  2553. },
  2554. changePartionTypeOne(){
  2555. this.tableDataList = []
  2556. this.toStaticOne()
  2557. },
  2558. changeScheduleTypeTwo(){
  2559. this.tableProjectList = []
  2560. this.toStaticTwo()
  2561. },
  2562. changePartionTypeTwo(){
  2563. this.tableProjectList=[]
  2564. this.toStaticTwo()
  2565. },
  2566. getModeId(val){
  2567. if(val!=null && val.length > 0){
  2568. let dataInfo = {}
  2569. val.forEach((item, index) => {
  2570. let { patient_id } = item
  2571. if (!dataInfo[patient_id]) {
  2572. dataInfo[patient_id] = {
  2573. patient_id:item.patient_id,
  2574. child: [],
  2575. count:0,
  2576. mode_id:item.mode_id,
  2577. }
  2578. }
  2579. })
  2580. let newArr = Object.values(dataInfo)
  2581. if(newArr!=null && newArr.length >0){
  2582. let dataInfo = {}
  2583. newArr.forEach((item, index) => {
  2584. let { mode_id } = item
  2585. if (!dataInfo[mode_id]) {
  2586. dataInfo[mode_id] = {
  2587. mode_id:item.mode_id,
  2588. child: [],
  2589. count:0,
  2590. }
  2591. }
  2592. })
  2593. let hisNewArr = Object.values(dataInfo)
  2594. if(hisNewArr!=null && hisNewArr.length >0){
  2595. for(let i=0;i<hisNewArr.length;i++){
  2596. for(let j=0;j<newArr.length;j++){
  2597. if(hisNewArr[i].mode_id == newArr[j].mode_id){
  2598. hisNewArr[i].child.push(newArr[j])
  2599. }
  2600. }
  2601. }
  2602. }
  2603. var str = ""
  2604. for(let i=0;i<hisNewArr.length;i++){
  2605. if(hisNewArr[i].mode_id == 1){
  2606. hisNewArr[i].mode_id = "HD"
  2607. }
  2608. if(hisNewArr[i].mode_id == 2){
  2609. hisNewArr[i].mode_id = "HDF"
  2610. }
  2611. if(hisNewArr[i].mode_id == 3){
  2612. hisNewArr[i].mode_id = "HD+HP"
  2613. }
  2614. if(hisNewArr[i].mode_id == 4){
  2615. hisNewArr[i].mode_id = "HP"
  2616. }
  2617. if(hisNewArr[i].mode_id == 5){
  2618. hisNewArr[i].mode_id = "HF"
  2619. }
  2620. if(hisNewArr[i].mode_id == 6){
  2621. hisNewArr[i].mode_id = "SCUF"
  2622. }
  2623. if(hisNewArr[i].mode_id == 7){
  2624. hisNewArr[i].mode_id = "IUF"
  2625. }
  2626. if(hisNewArr[i].mode_id == 8){
  2627. hisNewArr[i].mode_id = "HFHD"
  2628. }
  2629. if(hisNewArr[i].mode_id == 9){
  2630. hisNewArr[i].mode_id = "HFHD+HP"
  2631. }
  2632. if(hisNewArr[i].mode_id == 10){
  2633. hisNewArr[i].mode_id = "PHF"
  2634. }
  2635. if(hisNewArr[i].mode_id == 11){
  2636. hisNewArr[i].mode_id = "HFR"
  2637. }
  2638. if(hisNewArr[i].mode_id == 12){
  2639. hisNewArr[i].mode_id = "HDF+HP"
  2640. }
  2641. if(hisNewArr[i].mode_id == 13){
  2642. hisNewArr[i].mode_id = "CRRT"
  2643. }
  2644. if(hisNewArr[i].mode_id == 14){
  2645. hisNewArr[i].mode_id = "腹水回输"
  2646. }
  2647. if(hisNewArr[i].mode_id == 15){
  2648. hisNewArr[i].mode_id = "IUF+HD"
  2649. }
  2650. if(hisNewArr[i].mode_id == 20){
  2651. hisNewArr[i].mode_id = "UF"
  2652. }
  2653. if(hisNewArr[i].mode_id == 21){
  2654. hisNewArr[i].mode_id = "HD+"
  2655. }
  2656. if(hisNewArr[i].mode_id == 22){
  2657. hisNewArr[i].mode_id = "血浆胆红素吸附+HDF"
  2658. }
  2659. if(hisNewArr[i].mode_id == 23){
  2660. hisNewArr[i].mode_id = "血浆胆红素吸附"
  2661. }
  2662. if(hisNewArr[i].mode_id == 24){
  2663. hisNewArr[i].mode_id = "I-HDF"
  2664. }
  2665. if(hisNewArr[i].mode_id == 25){
  2666. hisNewArr[i].mode_id = "HD高通"
  2667. }
  2668. if(hisNewArr[i].mode_id == 26){
  2669. hisNewArr[i].mode_id = "CVVH"
  2670. }
  2671. if(hisNewArr[i].mode_id == 27){
  2672. hisNewArr[i].mode_id = "CVVHD"
  2673. }
  2674. if(hisNewArr[i].mode_id == 28){
  2675. hisNewArr[i].mode_id = "CVVHDF"
  2676. }
  2677. if(hisNewArr[i].mode_id == 29){
  2678. hisNewArr[i].mode_id = "PE"
  2679. }
  2680. if(hisNewArr[i].mode_id == 30){
  2681. hisNewArr[i].mode_id = "血浆胆红素吸附+HP"
  2682. }
  2683. if(hisNewArr[i].mode_id == 31){
  2684. hisNewArr[i].mode_id = "HPD"
  2685. }
  2686. if(hisNewArr[i].mode_id == 32){
  2687. hisNewArr[i].mode_id = "HDP"
  2688. }
  2689. if(hisNewArr[i].mode_id == 33){
  2690. hisNewArr[i].mode_id = "HFD"
  2691. }
  2692. if(hisNewArr[i].mode_id == 34){
  2693. hisNewArr[i].mode_id = "HDF100"
  2694. }
  2695. if(hisNewArr[i].mode_id == 35){
  2696. hisNewArr[i].mode_id = "HDF600"
  2697. }
  2698. if(hisNewArr[i].mode_id == 36){
  2699. hisNewArr[i].mode_id = "HDF800"
  2700. }
  2701. if(hisNewArr[i].mode_id == 37){
  2702. hisNewArr[i].mode_id = "HDF1000"
  2703. }
  2704. str += hisNewArr[i].mode_id +"("+hisNewArr[i].child.length+")" +"\n"
  2705. }
  2706. return str
  2707. }
  2708. // return newArr.length
  2709. }
  2710. },
  2711. getDrugCount(val,advice_name){
  2712. if(val!=null){
  2713. for(let i=0;i<val.length;i++){
  2714. val[i].advice_name = val[i].advice_name.replace(/\s/g,"")
  2715. }
  2716. }
  2717. if(val!=null && val.length >0){
  2718. let dataInfo = {}
  2719. val.forEach((item, index) => {
  2720. let { advice_name } = item
  2721. if (!dataInfo[advice_name]) {
  2722. dataInfo[advice_name] = {
  2723. advice_name:item.advice_name,
  2724. child: [],
  2725. count:0,
  2726. }
  2727. }
  2728. })
  2729. let newArr = Object.values(dataInfo)
  2730. if(newArr!=null && newArr.length >0){
  2731. for(let i=0;i<newArr.length;i++){
  2732. for(let j=0;j<val.length;j++){
  2733. if(newArr[i].advice_name == val[j].advice_name){
  2734. newArr[i].child.push(val[j])
  2735. }
  2736. }
  2737. }
  2738. }
  2739. var total = 0
  2740. var newHisArr =[]
  2741. if(newArr!=null && newArr.length >0){
  2742. for(let i=0;i<newArr.length;i++){
  2743. if(newArr[i].advice_name == advice_name){
  2744. newHisArr.push(newArr[i])
  2745. }
  2746. }
  2747. }
  2748. if(newHisArr!=null && newHisArr.length>0){
  2749. for(let i=0;i<newHisArr.length;i++){
  2750. for(let j=0;j<newHisArr[i].child.length;j++){
  2751. total += parseInt(newHisArr[i].child[j].prescribing_number)
  2752. }
  2753. }
  2754. }
  2755. return total
  2756. }
  2757. },
  2758. getAdminUserName(id){
  2759. var name = ""
  2760. for(let i=0;i<this.adminUserList.length;i++){
  2761. if(id == this.adminUserList[i].id){
  2762. name = this.adminUserList[i].name
  2763. }
  2764. }
  2765. return name
  2766. },
  2767. getZoneName(val){
  2768. var zone_name = ""
  2769. if(val!=null && val.length >0){
  2770. zone_name = val[0].zone_name
  2771. }
  2772. return zone_name
  2773. },
  2774. compareList: function (k) {
  2775. return function (a, b) {
  2776. var M = a[k]
  2777. var N = b[k]
  2778. return M - N // 从低向高排
  2779. // return N - M; // 从高向低排
  2780. }
  2781. },
  2782. getSummaries(param) {
  2783. const { columns, data } = param;
  2784. const sums = [];
  2785. columns.forEach((column, index) => {
  2786. if (index === 0) {
  2787. sums[index] = '总数';
  2788. return;
  2789. }
  2790. if(index > 2){
  2791. const values = data.map(item => item[column.property]);
  2792. }
  2793. });
  2794. return sums;
  2795. },
  2796. getAllSumCount(advice_name){
  2797. var hisNewArr =[]
  2798. if(this.tabHead.length!=null && this.tabHead.length >0){
  2799. for(let i=0;i<this.tabHead.length;i++){
  2800. if(this.tabHead[i].advice_name == advice_name){
  2801. hisNewArr.push(this.tabHead[i])
  2802. }
  2803. }
  2804. }
  2805. var total = 0
  2806. if(hisNewArr!=null && hisNewArr.length > 0){
  2807. for(let i=0;i<hisNewArr.length;i++){
  2808. for(let j=0;j<hisNewArr[i].child.length;j++){
  2809. total += parseInt(hisNewArr[i].child[j].prescribing_number)
  2810. }
  2811. }
  2812. }
  2813. if (total > 0) {
  2814. return total
  2815. }else{
  2816. return 0
  2817. }
  2818. },
  2819. getTimeSix(val) {
  2820. if(val == ""){
  2821. return ""
  2822. }else {
  2823. return uParseTime(val, '{y}-{m}-{d}')
  2824. }
  2825. },
  2826. toJiao(){
  2827. GetMobileScheduleList().then(response=>{
  2828. if(response.data.state == 1){
  2829. var schedule = response.data.data.schedule
  2830. this.$message.success("保存成功!")
  2831. // console.log("schedule---------------",schedule)
  2832. // var arr = []
  2833. // for(let i=0;i<schedule.length;i++){
  2834. // if(schedule[i].monitor_record.ultrafiltration_volume!=schedule[i].xt_assesment_after_dislysis.actual_ultrafiltration){
  2835. // arr.push(schedule[i])
  2836. // }
  2837. // }
  2838. // import('@/vendor/Export2Excel').then(excel => {
  2839. // if(arr!=null && arr.length > 0){
  2840. // for(let i=0;i<arr.length;i++){
  2841. // arr[i].patient_name = arr[i].patient.name
  2842. // arr[i].target_ultrafiltration = arr[i].dialysis_prescription.target_ultrafiltration
  2843. // arr[i].ultrafiltration_volume = arr[i].monitor_record.ultrafiltration_volume
  2844. // arr[i].actual_ultrafiltration = arr[i].xt_assesment_after_dislysis.actual_ultrafiltration
  2845. // arr[i].start_time = this.getTimeSix(arr[i].schedule_date)
  2846. // }
  2847. // }
  2848. // const tHeader = ['序号','日期','患者姓名','目标超滤量','监测超滤量','实际超滤量']
  2849. // const filterVal = ['index','start_time','patient_name','target_ultrafiltration','ultrafiltration_volume','actual_ultrafiltration']
  2850. // const data = this.formatJson(filterVal, arr)
  2851. // excel.export_json_to_excel({
  2852. // header: tHeader,
  2853. // data,
  2854. // filename: '监测数据统计'
  2855. // })
  2856. // })
  2857. }
  2858. })
  2859. },
  2860. getManufacturer(id){
  2861. var manufacturer_name = ""
  2862. for(let i=0;i<this.manufacturerList.length;i++){
  2863. if(id== this.manufacturerList[i].id){
  2864. manufacturer_name = this.manufacturerList[i].manufacturer_name
  2865. }
  2866. }
  2867. return manufacturer_name
  2868. },
  2869. getDrugName(drug_id,drugs){
  2870. var drug_name = ""
  2871. for(let i=0;i<drugs.length;i++){
  2872. if(drug_id == drugs[i].id){
  2873. drug_name = drugs[i].drug_name
  2874. }
  2875. }
  2876. return drug_name
  2877. },
  2878. getMonthManufacturer(drug_id,drugs,manufacturerList){
  2879. var manufacturer = 0
  2880. for(let i=0;i<drugs.length;i++){
  2881. if(drug_id == drugs[i].id){
  2882. manufacturer = drugs[i].manufacturer
  2883. }
  2884. }
  2885. var manufacturer_name = ""
  2886. for(let i=0;i<manufacturerList.length;i++){
  2887. if(manufacturer== manufacturerList[i].id){
  2888. manufacturer_name = manufacturerList[i].manufacturer_name
  2889. }
  2890. }
  2891. return manufacturer_name
  2892. },
  2893. toPrintTen(){
  2894. this.$router.push("/dialysis/doctorMonthAdviceStaticPrint?start_time="+this.start_time+"&end_time="+this.end_time)
  2895. },
  2896. toPrintTenOne(){
  2897. this.$router.push("/dialysis/doctocAdviceProjectPrint?start_time="+this.start_time+"&end_time="+this.end_time)
  2898. }
  2899. },
  2900. components: {
  2901. BreadCrumb
  2902. }
  2903. };
  2904. </script>
  2905. <style rel="stylesheet/scss" lang="scss" scoped>
  2906. .app-container {
  2907. // margin: 20px;
  2908. font-size: 15px;
  2909. .filter-container {
  2910. padding-bottom: 5px;
  2911. }
  2912. .cqd-dataTitle {
  2913. color: #303133;
  2914. font-size: 14px;
  2915. border-bottom: 2px #e4e7ed solid;
  2916. height: 36px;
  2917. line-height: 36px;
  2918. margin: 0 0 25px 0;
  2919. position: relative;
  2920. }
  2921. .cqd-dataTitle::before {
  2922. position: absolute;
  2923. left: 0;
  2924. bottom: -2px;
  2925. content: "";
  2926. width: 42px;
  2927. height: 2px;
  2928. background: #409eff;
  2929. }
  2930. .search-component {
  2931. width: 500px;
  2932. .searchBox {
  2933. width: 300px;
  2934. height: 36px;
  2935. line-height: 36px;
  2936. padding-left: 15px;
  2937. border: 1px #dcdfe6 solid;
  2938. border-right: none;
  2939. outline: none;
  2940. float: left;
  2941. border-radius: 6px 0 0 6px;
  2942. font-size: 14px;
  2943. color: #333;
  2944. background: #fff;
  2945. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  2946. }
  2947. .searchBtn {
  2948. background-color: #409eff;
  2949. color: #fff;
  2950. font-size: 15px;
  2951. text-align: center;
  2952. height: 36px;
  2953. line-height: 36px;
  2954. float: left;
  2955. outline: none;
  2956. width: 70px;
  2957. border: none;
  2958. border-radius: 0 6px 6px 0;
  2959. font-family: "Microsoft Yahei";
  2960. cursor: pointer;
  2961. }
  2962. }
  2963. .amount {
  2964. font-weight: normal;
  2965. padding: 10px 0 0 0;
  2966. color: #606266;
  2967. font-size: 14px;
  2968. span {
  2969. color: #ef2525;
  2970. font-family: "Arial";
  2971. padding: 0 2px;
  2972. }
  2973. }
  2974. .el-table td .cell{
  2975. white-space: pre-wrap;
  2976. }
  2977. .eldialog{
  2978. display: flex;
  2979. justify-content: space-between;
  2980. }
  2981. }
  2982. .el-table td,
  2983. .el-table th.is-leaf,
  2984. .el-table--border,
  2985. .el-table--group {
  2986. border-color: #d0d3da;
  2987. }
  2988. .el-table--border::after,
  2989. .el-table--group::after,
  2990. .el-table::before {
  2991. background-color: #d0d3da;
  2992. }
  2993. .el-checkbox__inner::after {
  2994. height: 10px;
  2995. left: 7px;
  2996. }
  2997. .el-checkbox__inner {
  2998. width: 20px;
  2999. height: 20px;
  3000. }
  3001. </style>