receipt_infopage.vue 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387
  1. <template>
  2. <view class="Receipt_infopage" v-if="Object.keys(infoDATA).length > 0">
  3. <view class="title">工单信息</view>
  4. <view class="page_item footerOtherMargin">
  5. <view class="page_item_top">
  6. <view class="page_item_top_L">
  7. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  8. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  9. <text>
  10. <text class="cubeic-star newicon newicon-shiwujiaoxing"></text>
  11. {{ infoDATA.emergencyType.name }}
  12. </text>
  13. </view>
  14. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  15. <text>
  16. <text class="cubeic-star newicon newicon-shiwujiaoxing"></text>
  17. {{ infoDATA.emergencyType.name }}
  18. </text>
  19. </view>
  20. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  21. <text>
  22. <text class="cubeic-star newicon newicon-shiwujiaoxing"></text>
  23. {{ infoDATA.emergencyType.name }}
  24. </text>
  25. </view>
  26. </view>
  27. <view class="page_item_top_R">
  28. <text class="L_iocn" v-if="
  29. !(
  30. infoDATA.gdState.value == 5 &&
  31. infoDATA.taskType.associationType.value == 'inspect'
  32. )
  33. ">{{ infoDATA.gdState.name }}</text>
  34. <text class="L_iocn" v-if="
  35. infoDATA.gdState.value == 5 &&
  36. infoDATA.taskType.associationType.value == 'inspect'
  37. ">待送回</text>
  38. </view>
  39. <view class="L"></view>
  40. <view class="R"></view>
  41. </view>
  42. <view class="page_item_cont">
  43. <view class="page_item_cont_T">
  44. <view class="page_item_cont_title">
  45. <text> <text class="starting">起</text> 点科室 </text>
  46. <text class="text_big">{{ infoDATA.startDept.dept }}</text>
  47. </view>
  48. </view>
  49. <view class="line"></view>
  50. <view class="page_item_cont_B">
  51. <view class="page_item_cont_title" v-for="(dept, index) of infoDATA.middleDept" :key="'ico' + index">
  52. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  53. <text> <text class="End">检</text> 查科室 </text>
  54. <text class="text_big">{{ dept.dept }}</text>
  55. <view></view>
  56. </view>
  57. </view>
  58. <template v-if="infoDATA.taskType.associationType.value != 'inspect'">
  59. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  60. <view>
  61. <text> <text class="End">终</text> 点科室 </text>
  62. <text class="text_big">{{ dept.dept }}</text>
  63. </view>
  64. </view>
  65. </template>
  66. <view v-if="
  67. infoDATA.taskType.associationType.value == 'inspect' ||
  68. infoDATA.taskType.associationType.value == 'patientTransport'
  69. ">
  70. <!-- 待抢单 -->
  71. <text class="red" v-if="infoDATA.gdState.value == 2">请扫描患者腕带,或者请扫描科室码</text>
  72. <!-- 待到达 -->
  73. <text class="red" v-if="infoDATA.gdState.value == 4">请扫描患者腕带</text>
  74. <!-- 执行中 -->
  75. <text class="red" v-if="infoDATA.gdState.value == 8">请扫描检查科室码,并扫描患者腕带</text>
  76. <!-- 待送达 -->
  77. <text class="red" v-if="infoDATA.gdState.value == 5">请扫描终点科室码,并扫描患者腕带</text>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="page_item_foot">
  82. <view class="page_item_foot_text">
  83. <text class="text1">状态</text>
  84. <text class="text2" v-if="
  85. !(
  86. infoDATA.gdState.value == 5 &&
  87. infoDATA.taskType.associationType.value == 'inspect'
  88. )
  89. ">{{ infoDATA.gdState.name }}</text>
  90. <text class="text2" v-if="
  91. infoDATA.gdState.value == 5 &&
  92. infoDATA.taskType.associationType.value == 'inspect'
  93. ">待送回</text>
  94. </view>
  95. <!-- <view class="page_item_foot_text">
  96. <text class="text1">关联类型</text>
  97. <text class="text2">{{ infoDATA.taskType.associationType.name }}</text>
  98. </view> -->
  99. <view class="page_item_foot_text">
  100. <text class="text1">任务类型</text>
  101. <text class="text2">{{ infoDATA.taskType.taskName }}<template
  102. v-if="infoDATA.goodsRemark">-{{infoDATA.goodsRemark}}</template></text>
  103. </view>
  104. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value==='inspect'">
  105. <text class="text1">是否半程陪检</text>
  106. <text class="text2">{{ infoDATA.isHalfInspect===1?'是':'否' }}</text>
  107. </view>
  108. <view class="page_item_foot_text">
  109. <text class="text1">执行人员</text>
  110. <text class="text2">{{ infoDATA.worker?infoDATA.worker.name:'-' }}</text>
  111. </view>
  112. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '2'">
  113. <text class="text1">预计响应时间</text>
  114. <text class="text2">{{ infoDATA.estimeResponseTime || '无' }}</text>
  115. </view>
  116. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '5'">
  117. <text class="text1" v-if="!(infoDATA.taskType.associationType.value == 'inspect')">预计送达时间</text>
  118. <text class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect'">预计送回时间</text>
  119. <text class="text2">{{ infoDATA.estimeCompleteTime || '无' }}</text>
  120. </view>
  121. <view class="page_item_foot_text" v-if="infoDATA.gdState.value == '4'">
  122. <text class="text1">预计到达时间</text>
  123. <text class="text2">{{ infoDATA.estimateArriveTime || '无' }}</text>
  124. </view>
  125. <view class="page_item_foot_text">
  126. <text class="text1">创建时间</text>
  127. <text class="text2">{{ infoDATA.startTime || '无' }}</text>
  128. </view>
  129. <view class="page_item_foot_text" v-if="!(infoDATA.taskType.associationType.value == 'ordinary' && (infoDATA.taskType.ordinaryField.value == 'drugsJpbag' || infoDATA.taskType.ordinaryField.value == 'drugsWestern' || infoDATA.taskType.ordinaryField.value == 'drugsReturn' || infoDATA.taskType.ordinaryField.value == 'drugsPoison' || infoDATA.taskType.ordinaryField.value == 'drugsHerbal'))">
  130. <text class="text1">预约时间</text>
  131. <text class="text2" v-if="infoDATA.taskType.associationType.value == 'inspect'">{{ infoDATA.yyTime }}</text>
  132. <text class="text2"
  133. v-if="infoDATA.taskType.associationType.value == 'patientTransport' || infoDATA.taskType.associationType.value == 'other'">{{ infoDATA.yyjdTime|yyTimeFilter }}</text>
  134. </view>
  135. <view class="page_item_foot_text" v-if="
  136. infoDATA.taskType.associationType.value == 'inspect' ||
  137. infoDATA.taskType.associationType.value == 'patientTransport'
  138. ">
  139. <text class="text1" v-if="infoDATA.patient.residenceNo">床号</text>
  140. <text class="text2" v-if="infoDATA.patient.residenceNo">{{
  141. infoDATA.patient ? infoDATA.patient.bedNum : "-"
  142. }}</text>
  143. <text class="text1" v-if="!infoDATA.patient.residenceNo">身份证号</text>
  144. <text class="text2" v-if="!infoDATA.patient.residenceNo">{{
  145. infoDATA.patient ? infoDATA.patient.identityCardNo : "-"
  146. }}</text>
  147. </view>
  148. <view class="page_item_foot_text" v-if="
  149. infoDATA.taskType.associationType.value == 'inspect' ||
  150. infoDATA.taskType.associationType.value == 'patientTransport'
  151. ">
  152. <text class="text1">携带设备</text>
  153. <text class="text2">{{ infoDATA.goods || "暂无" }}</text>
  154. </view>
  155. <view class="page_item_info" style="padding: 0;" v-if="infoDATA.workOrderRemark !== undefined">
  156. <view class="page_item_foot_text">
  157. <view class="text1" v-if="infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport'">注意事项</view>
  158. <view class="text1" v-else>工单备注</view>
  159. <view class="text2" style="float: none;word-break: break-all;">{{ infoDATA.workOrderRemark }}</view>
  160. </view>
  161. </view>
  162. <view class="page_item_foot_text" v-if="
  163. infoDATA.taskType.associationType.value == 'inspect' ||
  164. infoDATA.taskType.associationType.value == 'patientTransport'
  165. ">
  166. <text class="text1">患者姓名</text>
  167. <text class="text2">{{ infoDATA.patient.patientName }}
  168. <text v-if="infoDATA.patient.residenceNo">
  169. ({{
  170. infoDATA.patient.residenceNo
  171. }})
  172. </text>
  173. <text v-if="!infoDATA.patient.residenceNo">
  174. ({{
  175. infoDATA.patient.cardNo
  176. }})
  177. </text>
  178. </text>
  179. </view>
  180. <view class="page_item_foot_text" v-if="
  181. (infoDATA.taskType.associationType.value == 'inspect' ||
  182. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.careLevel
  183. ">
  184. <text class="text1">{{infoDATA.patient.careLevel.desc}}</text>
  185. <text class="text2"
  186. :class="[(infoDATA.patient.careLevel.value==0||infoDATA.patient.careLevel.value==1)?'red':'green']">{{infoDATA.patient.careLevel.name}}</text>
  187. </view>
  188. <view class="page_item_foot_text" v-if="
  189. (infoDATA.taskType.associationType.value == 'inspect' ||
  190. infoDATA.taskType.associationType.value == 'patientTransport')&&infoDATA.patient.illnessState
  191. ">
  192. <text class="text1">{{infoDATA.patient.illnessState.desc}}</text>
  193. <text class="text2"
  194. :class="{red:infoDATA.patient.illnessState.value==2||infoDATA.patient.illnessState.value==3}">{{infoDATA.patient.illnessState.name}}</text>
  195. </view>
  196. <view class="page_item_foot_text"
  197. v-if="
  198. (infoDATA.taskType.associationType.value == 'inspect' ||
  199. infoDATA.taskType.associationType.value == 'patientTransport')&&(infoDATA.isAccompany===1||infoDATA.isAccompany===0)">
  200. <text class="text1">陪同情况</text>
  201. <text class="text2"
  202. :class="{red:infoDATA.isAccompany===1}">{{ infoDATA.isAccompany===1?'需要医护陪同':'无需医护陪同'}}</text>
  203. </view>
  204. <view class="page_item_foot_text"
  205. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectScore">
  206. <text class="text1">陪检方式</text>
  207. <text class="text2">{{ infoDATA.inspectScore.inspectMode }}</text>
  208. </view>
  209. <view class="page_item_foot_text"
  210. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsers">
  211. <text class="text1">陪检人员</text>
  212. <text class="text2">{{ infoDATA.inspectUsers }}</text>
  213. </view>
  214. <view class="page_item_foot_text"
  215. v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.inspectUsersNum">
  216. <text class="text1">陪检人数</text>
  217. <text class="text2">{{ infoDATA.inspectUsersNum }}</text>
  218. </view>
  219. <view class="page_item_foot_text" v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.inspectUsers">
  220. <text class="text1">执行人员</text>
  221. <text class="text2">{{ infoDATA.inspectUsers }}</text>
  222. </view>
  223. <view class="page_item_foot_text"
  224. v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.inspectUsersNum">
  225. <text class="text1">执行人数</text>
  226. <text class="text2">{{ infoDATA.inspectUsersNum }}</text>
  227. </view>
  228. </view>
  229. <!-- 药包 -->
  230. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">
  231. <text class="page_item_info_title">药包编码</text>
  232. <text class="text">{{ infoDATA.drugs?infoDATA.drugs.packid:'无' }}</text>
  233. </view>
  234. <!-- 血制品 -->
  235. <view class="page_item_info" v-if="
  236. infoDATA.taskType.associationType.value == 'ordinary' &&
  237. infoDATA.taskType.ordinaryField.value == 'blood'
  238. ">
  239. <view>
  240. <text class="page_item_info_title">·</text>
  241. <text class="text">
  242. 送达数量
  243. <text class="page_item_info_txt">{{infoDATA.deliveryNum || '无'}}</text>
  244. </text>
  245. <text class="text">
  246. 实收数量
  247. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  248. </text>
  249. <text class="text">
  250. 应收数量
  251. <text class="page_item_info_txt">{{infoDATA.expectReceiveNum || '无'}}</text>
  252. </text>
  253. </view>
  254. </view>
  255. <!-- 标本 -->
  256. <view class="page_item_info" v-if="
  257. infoDATA.taskType.associationType.value == 'specimen' ||
  258. infoDATA.taskType.associationType.value == 'specimenPlan'
  259. ">
  260. <view>
  261. <text class="page_item_info_title">标本信息</text>
  262. <text class="text">
  263. 预计接收
  264. <text class="page_item_info_txt">{{
  265. infoDATA.expectReceiveNum || '无'
  266. }}</text>
  267. </text>
  268. <text class="text"
  269. v-if="infoDATA.gdState.value == 5 || infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  270. 扫描接收
  271. <text class="page_item_info_txt">{{infoDATA.actualReceiveNum || '无'}}</text>
  272. </text>
  273. <text class="text" v-if="infoDATA.gdState.value == 6 || infoDATA.gdState.value == 7">
  274. 实际送达
  275. <text class="page_item_info_txt">{{actualDelivery || '无'}}</text>
  276. </text>
  277. </view>
  278. <view v-for="spe in infoDATA.specimenSet" :key="spe.id" class="spe_list">
  279. <view>
  280. <text class="page_item_info_title">标本类型</text>
  281. <text class="text">{{ spe.stype ? spe.stype.name : "-" }}({{
  282. spe.urgent == 1 ? "急" : "普"
  283. }})</text>
  284. </view>
  285. <view>
  286. <text class="page_item_info_title">标本编码</text>
  287. <text class="text">{{ spe.scode }}</text>
  288. </view>
  289. <view>
  290. <text class="page_item_info_title">患者姓名</text>
  291. <text class="text">{{ spe.patientName }}<text v-if="spe.bedNum">({{spe.bedNum}})</text></text>
  292. </view>
  293. <view>
  294. <text class="page_item_info_title">目标科室</text>
  295. <text class="text">{{
  296. spe.checkDept ? spe.checkDept.dept : "-"
  297. }}</text>
  298. </view>
  299. </view>
  300. </view>
  301. <!-- 静配 -->
  302. <view class="page_item_info" v-if="infoDATA.taskType.associationType.value == 'jPBag'">
  303. <text class="page_item_info_title">药包编码</text>
  304. <text class="text">{{ infoDATA.staticDistri?infoDATA.staticDistri.packid:'无' }}</text>
  305. </view>
  306. <!-- 陪检 -->
  307. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  308. <view class="page_item_info">
  309. <text class="page_item_info_title">检查信息</text>
  310. </view>
  311. <view id="infos" :animation="animationData">
  312. <view class="page_item_infos" v-for="(item, index) of infoDATA.checkList" :key="index">
  313. <view class="page_item_info2">
  314. <view class="page_item_foot_text">
  315. <text class="text1">检查科室</text>
  316. <text class="text2">{{ item.execDept?item.execDept.dept:'-' }}</text>
  317. </view>
  318. <view class="page_item_foot_text">
  319. <text class="text1">检查项</text>
  320. <text class="text2">{{ item.inspectName||'-' }}</text>
  321. </view>
  322. <view class="page_item_foot_text">
  323. <text class="text1">叫号信息</text>
  324. <text class="text2">{{ item.reservationNumber||'-' }}</text>
  325. </view>
  326. <view class="page_item_foot_text">
  327. <text class="text1">预约时间</text>
  328. <text class="text2">{{ item.yyTime || "-" }}</text>
  329. </view>
  330. <!-- <view class="page_item_foot_text"
  331. v-show="item.inspectState.value==1||item.inspectState.value==2||item.inspectState.value==4">
  332. <view class="btn" @click.stop="remove(item)">移除</view>
  333. </view> -->
  334. <view class="page_item_foot_text" v-if="item.inspectState.value!=3">
  335. <view class="btn" @click.stop="remove(item)">移除</view>
  336. </view>
  337. </view>
  338. </view>
  339. </view>
  340. <view id="pulldown" @click="show('show')" v-if="showType == 'hiddle'">
  341. 点击可查看检查详情
  342. <text class="cubeic-pulldown newicon newicon-paixujiantouxia"></text>
  343. </view>
  344. <view id="pullup" @click="show('hiddle')" v-if="showType == 'show'">
  345. 点击可收起检查详情
  346. <text class="cubeic-pullup newicon newicon-paixujiantoushang"></text>
  347. </view>
  348. </view>
  349. </view>
  350. <view class="foot_btn2 footerPadding" style="flex-wrap: wrap;">
  351. <view class="btn2" @click="showAlert" v-if="infoDATA.gdState.value == 2">接单</view>
  352. <!-- 如果不是静配,药配,标本配送,标本轮巡,万能交接 -->
  353. <template
  354. v-if="((!infoDATA.worker)||(infoDATA.worker&&infoDATA.worker.id == currentUserId))&&infoDATA.gdState.value != 6&&infoDATA.gdState.value != 7&&infoDATA.gdState.value != 11">
  355. <!-- <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  356. (hideInspectScan != 1 || (hideInspectScan == 1 && infoDATA.gdState.value == 4)) &&
  357. infoDATA.gdState.value != 2 &&
  358. infoDATA.taskType.associationType.value != 'jPBag' &&
  359. infoDATA.taskType.associationType.value != 'drugsBag' &&
  360. infoDATA.taskType.associationType.value != 'specimen' &&
  361. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  362. infoDATA.taskType.associationType.value != 'ordinary' &&
  363. !(infoDATA.taskType.associationType.value == 'other' && (infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].actionsSwitch || infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch))
  364. " hover-class="seimin-btn-hover">
  365. <smallScreen :sData="infoDATA" :sType="1">扫码</smallScreen>
  366. </view> -->
  367. <!-- 其他临床服务-完成工单-待到达 -->
  368. <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].actionsSwitch" class="btn2 page_item_btn" @click="otherCompleteOrder(infoDATA)" hover-class="seimin-btn-hover">确认到达</view>
  369. <!-- 其他临床服务-完成工单-待送达 -->
  370. <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 5 && infoDATA.taskType.carryingCourses[1].actionsSwitch" class="btn2 page_item_btn" @click="otherCompleteOrder(infoDATA)" hover-class="seimin-btn-hover">完成工单</view>
  371. <!-- 其他临床服务-拍照 -->
  372. <!-- <view v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.gdState.value == 4 && infoDATA.taskType.carryingCourses[0].photoSwitch" class="btn2 page_item_btn" @click="photographToOther(infoDATA, 'start')" hover-class="seimin-btn-hover">拍照</view> -->
  373. <!-- <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" @click="photograph(infoDATA)" v-if="
  374. infoDATA.taskType.associationType.value != 'jPBag' &&
  375. infoDATA.taskType.associationType.value != 'drugsBag' &&
  376. infoDATA.taskType.associationType.value != 'specimen' &&
  377. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  378. infoDATA.taskType.associationType.value != 'other' &&
  379. infoDATA.taskType.associationType.value != 'ordinary' &&
  380. infoDATA.gdState.value == 4
  381. " hover-class="seimin-btn-hover">拍照</view> -->
  382. <view class="btn3" @click="specialCloseClick()" v-if="
  383. infoDATA.gdState.value != 2 &&
  384. infoDATA.taskType.associationType.value != 'jPBag' &&
  385. infoDATA.taskType.associationType.value != 'drugsBag' &&
  386. infoDATA.taskType.associationType.value != 'specimen' &&
  387. infoDATA.taskType.associationType.value != 'specimenPlan' &&
  388. infoDATA.taskType.associationType.value != 'ordinary' &&
  389. infoDATA.taskType.specialCloseButton == 1
  390. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  391. </template>
  392. <!-- 如果不是患者陪检或患者转运或其他,万能交接 -->
  393. <!-- <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']" v-if="
  394. infoDATA.gdState.value != 2 &&
  395. infoDATA.taskType.associationType.value != 'patientTransport' &&
  396. infoDATA.taskType.associationType.value != 'inspect' &&
  397. infoDATA.taskType.associationType.value != 'other' &&
  398. infoDATA.taskType.associationType.value != 'ordinary'
  399. " hover-class="seimin-btn-hover">
  400. <smallScreen :sData="infoDATA" :sType="2">扫码</smallScreen>
  401. </view> -->
  402. <!-- 如果是万能交接 -->
  403. <view :class="[infoDATA.taskType.specialCloseButton == 1 ? 'btn3' : 'btn2']"
  404. v-if="infoDATA.taskType.associationType.value == 'ordinary'"
  405. hover-class="seimin-btn-hover" @click="goBack()">
  406. 返回
  407. </view>
  408. <view class="btn3" @click="specialCloseClick()" v-if="
  409. infoDATA.gdState.value != 2 &&
  410. infoDATA.taskType.associationType.value != 'patientTransport' &&
  411. infoDATA.taskType.associationType.value != 'inspect' &&
  412. infoDATA.taskType.associationType.value != 'other' &&
  413. infoDATA.taskType.specialCloseButton == 1
  414. " hover-class="seimin-btn-hover">特殊情况关闭</view>
  415. <view class="btn3" @click="viewSpecimen(infoDATA)" v-if="
  416. infoDATA.taskType.associationType.value == 'specimen' ||
  417. infoDATA.taskType.associationType.value == 'specimenPlan'
  418. " hover-class="seimin-btn-hover">查看标本</view>
  419. <view class="btn3" @click="redeployScan(infoDATA)" v-if="(infoDATA.taskType.associationType.value == 'specimen' ||
  420. infoDATA.taskType.associationType.value == 'specimenPlan') && sPehandoverOrder==1 && (infoDATA.gdState.value==4 || infoDATA.gdState.value==5 || infoDATA.gdState.value==8)" hover-class="seimin-btn-hover">转派</view>
  421. <view class="btn3" @click="viewDrugsBag(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'drugsBag'" hover-class="seimin-btn-hover">查看业务流程</view>
  422. <view class="btn3" @click="toDrugBatches(infoDATA.drugs.batchNo)" v-if="infoDATA.taskType.associationType.value == 'drugsBag' && taskTypeConfig.drugsBatchInfo == 1" hover-class="seimin-btn-hover">药品批次</view>
  423. <view class="btn3" @click="viewBlood(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'ordinary' && infoDATA.taskType.ordinaryField.value == 'blood'" hover-class="seimin-btn-hover">查看血制品</view>
  424. <view class="btn3" @click="viewNewDrugsBag(infoDATA, infoDATA.taskType.ordinaryField.value)" v-if="infoDATA.taskType.associationType.value == 'ordinary' && (infoDATA.taskType.ordinaryField.value == 'drugsJpbag' || infoDATA.taskType.ordinaryField.value == 'drugsWestern' || infoDATA.taskType.ordinaryField.value == 'drugsReturn' || infoDATA.taskType.ordinaryField.value == 'drugsPoison' || infoDATA.taskType.ordinaryField.value == 'drugsHerbal')" hover-class="seimin-btn-hover">业务数据</view>
  425. <view class="btn3" @click="additionalUser(infoDATA)" v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.worker && infoDATA.worker.id && multiplayerMode === 1" hover-class="seimin-btn-hover">追加陪检人员</view>
  426. <view class="btn3" @click="additionalUser(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'other' && infoDATA.worker && infoDATA.worker.id && clinicalMultiplayerMode === 1 && clinicalTaskIdsFlag && !infoDATA.copyBy" hover-class="seimin-btn-hover">追加执行人员</view>
  427. <view class="btn3" style="flex-basis: 100%;" @click="patientHandover(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'patientTransport' && infoDATA.worker && infoDATA.worker.id && handoverOrder === 1" hover-class="seimin-btn-hover">扫描交接</view>
  428. </view>
  429. <!-- 弹窗 -->
  430. <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
  431. @know="know" :operate="models.operate" @ok="ok" @cancel="cancel" :textareaFlag="textareaFlag"
  432. @textareaInput="textareaInput"></showModel>
  433. <!-- 弹窗 -->
  434. <inspectRemoveModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor"
  435. :content="models1.content" @know="know1" :operate="models1.operate" @ok="ok1" @cancel="cancel1" :remove="true">
  436. </inspectRemoveModel>
  437. <!-- 弹窗 -->
  438. <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
  439. :operate="models2.operate" @ok="ok2" @cancel="cancel2"></showModel>
  440. <!-- 填写交接人工号弹窗 -->
  441. <selectAccount v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
  442. @cancel="hosCancel">
  443. </selectAccount>
  444. <!-- 手动查询弹窗 -->
  445. <checkboxModal v-if="checkboxModels.disjunctor" :content="checkboxModels.content" :disjunctor="checkboxModels.disjunctor"
  446. @ok="checkboxOk" @cancel="checkboxCancel">
  447. </checkboxModal>
  448. <!-- PDA扫描 -->
  449. <scanner></scanner>
  450. <!-- 标本转派 -->
  451. <uni-popup ref="alertDialog" type="dialog" :mask-click="false">
  452. <uni-popup-dialog type="info" cancelText="否" confirmText="是" title="提示" @confirm="dialogConfirm"
  453. @close="dialogClose">
  454. <text v-html="speContent"></text>
  455. </uni-popup-dialog>
  456. </uni-popup>
  457. </view>
  458. </template>
  459. <script>
  460. import scanner from "../../components/scanner/scanner.vue";
  461. import selectAccount from "../../components/selectAccount/selectAccount.vue";
  462. import smallScreen from "../../components/smallScreen/smallScreen.vue";
  463. import {
  464. get,
  465. post,
  466. SM,
  467. webHandle
  468. } from "../../http/http.js";
  469. import {
  470. pathUrl,
  471. photographTool
  472. } from "../../tools/photograph.js";
  473. export default {
  474. components: {
  475. selectAccount,
  476. scanner
  477. },
  478. data() {
  479. return {
  480. patientHandoverData: {},
  481. patientHandoverCode: '',
  482. other: {
  483. user: {},
  484. data: {},
  485. },
  486. // 手动查询弹窗model
  487. checkboxModels: {
  488. disjunctor: false,
  489. },
  490. taskTypeConfig: {},
  491. // 填写交接人工号弹窗model
  492. hosModels: {
  493. disjunctor: false,
  494. },
  495. currentCode: '', //当前拍照使用的科室二维码
  496. currentData: {}, //当前小扫描的工单对象
  497. multiplayerMode: 0,
  498. handoverOrder: 0,
  499. hideInspectScan: 0,
  500. clinicalMultiplayerMode: 0,
  501. clinicalTaskIdsFlag: false,
  502. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  503. SMFlag:true,
  504. actualDelivery: 0,
  505. currentUserId: 0,
  506. // 弹窗model
  507. models: {
  508. disjunctor: false,
  509. },
  510. // 弹窗model1
  511. models1: {
  512. disjunctor: false,
  513. },
  514. // 弹窗model1
  515. models2: {
  516. disjunctor: false,
  517. },
  518. currentInspect: null,
  519. showType: "show",
  520. infoDATA: {},
  521. dataId: "",
  522. animationData: {},
  523. // 特殊情况关闭原因开关
  524. textareaFlag: false,
  525. textareaText: "",
  526. tasktype: null,
  527. sPehandoverOrder: null ,//是否转派
  528. speContent: null,
  529. };
  530. },
  531. filters: {
  532. // 自定义管道 yyTime
  533. yyTimeFilter: function(data) {
  534. if (data) {
  535. let nDate = null;
  536. if (typeof data == 'string') {
  537. let arr = data.split(/[-:\s]/);
  538. nDate = new Date(
  539. arr[0] - 0,
  540. arr[1] - 1,
  541. arr[2] - 0,
  542. arr[3] - 0,
  543. arr[4] - 0,
  544. 0
  545. );
  546. } else if (typeof data == 'number') {
  547. nDate = new Date(data);
  548. }
  549. const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
  550. const date = nDate.getDate().toString().padStart(2, 0);
  551. const hour = nDate.getHours().toString().padStart(2, 0);
  552. const minute = nDate.getMinutes().toString().padStart(2, 0);
  553. return `${month}-${date} ${hour}:${minute}`;
  554. } else {
  555. return "-";
  556. }
  557. },
  558. },
  559. methods: {
  560. ok2() {
  561. uni.showLoading({
  562. title: "加载中",
  563. mask: true,
  564. });
  565. post("/patient/patientHandover", {
  566. id: this.patientHandoverCode.id,
  567. patientCodes: this.patientHandoverData.patient.patientCode,
  568. }).then((result) => {
  569. this.models2.disjunctor = false;
  570. if (result.state == 200) {
  571. uni.hideLoading();
  572. uni.showToast({
  573. icon: "none",
  574. mask: true,
  575. title: "交接成功!",
  576. });
  577. setTimeout(() => {
  578. uni.navigateTo({
  579. url: `/pages/receiptpage/receiptpage`,
  580. });
  581. },300)
  582. } else {
  583. uni.hideLoading();
  584. uni.showToast({
  585. icon: "none",
  586. title: result.msg || "接口获取数据失败!",
  587. });
  588. }
  589. });
  590. },
  591. cancel2() {
  592. this.models2.disjunctor = false;
  593. },
  594. // 门诊患者交接
  595. patientHandover(infoDATA){
  596. console.log(infoDATA);
  597. this.patientHandoverData = infoDATA;
  598. if (!this.SMFlag) {
  599. return;
  600. }
  601. this.SMFlag = false;
  602. SM().then((content) => {
  603. uni.showLoading({
  604. title: "加载中",
  605. mask: true,
  606. });
  607. //检验二维码的有效性(扫码前必须验证)
  608. post("/dept/scanning", {
  609. content,
  610. })
  611. .then((result) => {
  612. try{
  613. this.patientHandoverCode = JSON.parse(result.code);
  614. }catch(e){
  615. this.patientHandoverCode = '';
  616. }
  617. this.SMFlag = true;
  618. // 200检测通过,201没有有效期也通过。
  619. if (result.state == 200 || result.state == 201) {
  620. uni.hideLoading();
  621. if(Object.prototype.toString.call(this.patientHandoverCode) === '[object Object]' && this.patientHandoverCode.name){
  622. this.models2 = {
  623. disjunctor: true,
  624. title: "提示",
  625. content: `您确认要与<span class="red">${this.patientHandoverCode.name}</span>交接吗?`,
  626. icon: "warn",
  627. operate: {
  628. ok: "确定",
  629. cancel: "取消",
  630. },
  631. };
  632. }else{
  633. uni.showToast({
  634. icon: "none",
  635. title: "请扫描正确的二维码!",
  636. });
  637. }
  638. } else {
  639. uni.hideLoading();
  640. uni.showToast({
  641. icon: "none",
  642. title: result.info || "接口获取数据失败!",
  643. });
  644. }
  645. })
  646. }).catch(err => {
  647. this.SMFlag = true;
  648. });
  649. },
  650. // 手动查询-确认
  651. checkboxOk(bulkCopy) {
  652. console.log(bulkCopy);
  653. this.checkboxModels.disjunctor = false;
  654. let { user, data } = this.other;
  655. this.additionalUserCommon(user, data.id, data.worker.id, bulkCopy);
  656. },
  657. // 手动查询-取消
  658. checkboxCancel() {
  659. this.checkboxModels.disjunctor = false;
  660. },
  661. // 手动查询弹窗
  662. showCheckboxModal(user, data) {
  663. this.other = {
  664. user,
  665. data,
  666. };
  667. this.checkboxModels = {
  668. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  669. disjunctor: true,
  670. }
  671. },
  672. // 判断药品页面控制-是否显示关联批次药品
  673. isShowDrugsBatchInfo(){
  674. post("/simple/data/fetchDataList/taskType", {
  675. "idx": 0,
  676. "sum": 10,
  677. "taskType": {
  678. "simpleQuery": true,
  679. "hosId": {
  680. "id": this.hosId
  681. },
  682. "associationType": {
  683. "key": "association_types",
  684. "value": "drugsBag"
  685. }
  686. }
  687. }).then((res) => {
  688. if (res.status == 200) {
  689. res.list = res.list || [];
  690. let taskType = res.list[0] || {};
  691. if(taskType.id){
  692. post("/simple/data/fetchDataList/taskTypeConfig", {
  693. "idx": 0,
  694. "sum": 10,
  695. "taskTypeConfig": {
  696. "taskTypeDTO": {
  697. "hosId": {
  698. "id": this.hosId
  699. },
  700. "associationType": taskType.associationType
  701. }
  702. }
  703. }).then((res) => {
  704. if (res.status == 200) {
  705. res.list = res.list || [];
  706. this.taskTypeConfig = res.list[0] || {};
  707. } else {
  708. uni.showToast({
  709. icon: "none",
  710. title: res.msg || "接口获取数据失败!",
  711. });
  712. }
  713. });
  714. }else{
  715. uni.showToast({
  716. icon: "none",
  717. title: "请配置药品任务类型!",
  718. });
  719. }
  720. } else {
  721. uni.showToast({
  722. icon: "none",
  723. title: res.msg || "接口获取数据失败!",
  724. });
  725. }
  726. });
  727. },
  728. // 跳转到药品批次页面
  729. toDrugBatches(batchNo){
  730. uni.navigateTo({
  731. url: `../drugBatches/drugBatches?batchNo=${batchNo}`,
  732. });
  733. },
  734. // 前往其他临床服务完成工单确认页面
  735. otherCompleteOrder(data){
  736. console.log(data);
  737. uni.navigateTo({
  738. url: `../otherCompleteOrder/otherCompleteOrder?orderId=${data.id}&taskType=${data.taskType ? encodeURIComponent(JSON.stringify(data.taskType)) : ''}&order=${data ? encodeURIComponent(JSON.stringify(data)) : ''}`,
  739. });
  740. },
  741. // 如果不是静配,药配,标本配送,标本轮巡
  742. // 科室签到(小扫描)-拍照
  743. nextDeptOrder_ss(data, accountObj) {
  744. console.log(this.currentCode);
  745. let isKs = 0;
  746. let ids = [];
  747. let id = data.id;
  748. ids.push(id);
  749. let list = {
  750. code: "",
  751. ids: ids,
  752. };
  753. let code = "";
  754. let type = "";
  755. if (this.currentCode) {
  756. let gdStateValue = data.gdState.value; //工单状态value
  757. let associationTypeValue = data.taskType.associationType.value; //关联类型value
  758. // 其他临床服务,并且工单状态是待到达||工单状态待送达
  759. if (
  760. (associationTypeValue == "other" &&
  761. gdStateValue == "4") ||
  762. gdStateValue == "5"
  763. ) {
  764. code = this.currentCode;
  765. type = "orderSign/" + code;
  766. list = {
  767. ids
  768. };
  769. if (accountObj) {
  770. list.handover = [accountObj.accountId];
  771. }
  772. isKs = 1;
  773. }
  774. uni.showLoading({
  775. title: "加载中",
  776. mask: true,
  777. });
  778. post("/workerOrder/" + type, list).then((res) => {
  779. uni.hideLoading();
  780. if (res) {
  781. if (res.status == 200) {
  782. if (
  783. gdStateValue == "4" &&
  784. associationTypeValue == "other"
  785. ) {
  786. uni.navigateTo({
  787. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  788. });
  789. }
  790. if (gdStateValue == "5") {
  791. uni.navigateTo({
  792. url: `../../pages/scanning_code/scanning_code?type=${associationTypeValue}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
  793. });
  794. }
  795. } else {
  796. uni.navigateTo({
  797. url: `../../pages/scanning_Result/scanning_Result?type=${
  798. associationTypeValue
  799. }&type1=${res.type}&id=${data.id}&status=600&msg=${
  800. res.msg
  801. }&isKs=${isKs}&model=${encodeURIComponent(
  802. JSON.stringify(res)
  803. )}&qrcode=${this.currentCode}`,
  804. });
  805. }
  806. } else {
  807. uni.navigateTo({
  808. url: `../../pages/scanning_Result/scanning_Result?id=${data.id}&status=600&msg=扫码失败!请扫描正确的二维码!&isKs=${isKs}&qrcode=${this.currentCode}`,
  809. });
  810. }
  811. });
  812. }
  813. },
  814. // 填写交接人工号-确认
  815. hosOk(data) {
  816. console.log(data);
  817. const {
  818. accountName,
  819. account,
  820. accountId
  821. } = data;
  822. if (!accountName && !account) {
  823. //没有填写交接人
  824. uni.showModal({
  825. title: '提示',
  826. content: "请填写交接人工号!",
  827. showCancel: false,
  828. success: function(res) {
  829. if (res.confirm) {
  830. console.log('用户点击确定');
  831. } else if (res.cancel) {
  832. console.log('用户点击取消');
  833. }
  834. }
  835. });
  836. return;
  837. } else if (!accountName && account || accountName && !account) {
  838. //没有填写交接人
  839. uni.showModal({
  840. title: '提示',
  841. content: "请填写正确的交接人工号!",
  842. showCancel: false,
  843. success: function(res) {
  844. if (res.confirm) {
  845. console.log('用户点击确定');
  846. } else if (res.cancel) {
  847. console.log('用户点击取消');
  848. }
  849. }
  850. });
  851. return;
  852. }
  853. this.hosModels.disjunctor = false;
  854. let associationTypeValue = this.currentData.taskType.associationType.value;
  855. console.log(associationTypeValue)
  856. this.uploadToOther(this.currentData, data, 'start');
  857. },
  858. // 填写交接人工号-取消
  859. hosCancel() {
  860. this.hosModels.disjunctor = false;
  861. },
  862. // 填写交接人工号弹窗
  863. showSelectAccount() {
  864. this.hosModels = {
  865. disjunctor: true,
  866. }
  867. },
  868. // 拍照-上传
  869. uploadToOther(data, accountObj, type){
  870. // 其他临床服务拍照签到
  871. console.log(data, 1111);
  872. let id_seimin;
  873. let asTypeValue_seimin;
  874. let gdStateValue_seimin;
  875. if (data.status != 200 && data.status !== undefined) {
  876. id_seimin = data.id;
  877. asTypeValue_seimin = data.type;
  878. gdStateValue_seimin = JSON.parse(data.model).gdstate2; //type改成gdstate
  879. } else {
  880. id_seimin = data.id;
  881. asTypeValue_seimin = data.taskType.associationType.value;
  882. gdStateValue_seimin = data.gdState.value;
  883. }
  884. //#ifdef H5
  885. uni.chooseImage({
  886. count: 1,
  887. sourceType: ['camera'],
  888. success: (chooseImageRes) => {
  889. console.log(chooseImageRes, pathUrl)
  890. const tempFilePaths = chooseImageRes.tempFilePaths;
  891. const tempFiles = chooseImageRes.tempFiles;
  892. let tp = tempFilePaths[0];
  893. uni.showLoading({
  894. mask: true,
  895. title: '加载中'
  896. });
  897. post('/workerOrder/findRecordInfoByOrderId', {
  898. orderId: id_seimin,
  899. gdOperate: 21,
  900. }).then(result => {
  901. console.log(result)
  902. if (result.state == 200) {
  903. uni.getImageInfo({
  904. src: tp,
  905. success: (res) => {
  906. console.log('压缩前', res)
  907. let canvasWidth = res.width //图片原始长宽
  908. let canvasHeight = res.height
  909. let img = new Image()
  910. img.src = res.path
  911. let canvas = document.createElement('canvas');
  912. let ctx = canvas.getContext('2d')
  913. canvas.width = canvasWidth
  914. canvas.height = canvasHeight
  915. ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
  916. canvas.toBlob((fileSrc) => {
  917. tp = window.URL.createObjectURL(fileSrc)
  918. console.log('压缩后', tp);
  919. uni.uploadFile({
  920. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  921. filePath: tp,
  922. name: 'file',
  923. formData: {
  924. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  925. 0].path.split(
  926. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  927. },
  928. success: (uploadFileRes) => {
  929. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  930. this.nextDeptOrder_ss(data, accountObj, type);
  931. },
  932. fail: err => {
  933. console.error(err);
  934. uni.hideLoading();
  935. uni.showToast({
  936. icon: 'none',
  937. title: '上传失败',
  938. duration: 2000
  939. });
  940. }
  941. });
  942. }, 'image/jpeg', 0.3)
  943. },
  944. fail: function () {
  945. uni.hideLoading();
  946. uni.showToast({
  947. icon: 'none',
  948. title: '上传失败',
  949. duration: 2000
  950. });
  951. }
  952. })
  953. } else {
  954. uni.hideLoading();
  955. uni.showToast({
  956. icon: "none",
  957. title: result.msg || "接口获取数据失败!",
  958. });
  959. }
  960. })
  961. }
  962. });
  963. //#endif
  964. //#ifdef APP-PLUS
  965. uni.chooseImage({
  966. count: 1,
  967. sourceType: ['camera'],
  968. sizeType: ['compressed'],
  969. success: (chooseImageRes) => {
  970. console.log(chooseImageRes, pathUrl)
  971. const tempFilePaths = chooseImageRes.tempFilePaths;
  972. const tempFiles = chooseImageRes.tempFiles;
  973. let tp = tempFilePaths[0];
  974. uni.showLoading({
  975. mask: true,
  976. title: '加载中'
  977. });
  978. post('/workerOrder/findRecordInfoByOrderId', {
  979. orderId: id_seimin,
  980. gdOperate: 21,
  981. }).then(result => {
  982. console.log(result)
  983. if (result.state == 200) {
  984. uni.compressImage({
  985. src: tp,
  986. quality: 30,
  987. success: (res) => {
  988. console.log('压缩前', res)
  989. tp = res.tempFilePath;
  990. console.log('压缩后', tp);
  991. uni.uploadFile({
  992. url: pathUrl + '/common/common/uploadAttachment/'+(type == 'start' ? 'orderStartPhoto' : 'orderEndPhoto')+'/' + id_seimin + '/' + result.recordId,
  993. filePath: tp,
  994. name: 'file',
  995. formData: {
  996. 'filename': tempFiles[0].name ? tempFiles[0].name.split('.')[0] + '.jpg' : tempFiles[
  997. 0].path.split(
  998. /[\\/]/).reverse()[0].split('.')[0] + '.jpg'
  999. },
  1000. success: (uploadFileRes) => {
  1001. console.log(uploadFileRes, 10086, asTypeValue_seimin);
  1002. this.nextDeptOrder_ss(data, accountObj, type);
  1003. },
  1004. fail: err => {
  1005. console.error(err);
  1006. uni.hideLoading();
  1007. uni.showToast({
  1008. icon: 'none',
  1009. title: '上传失败',
  1010. duration: 2000
  1011. });
  1012. }
  1013. });
  1014. },
  1015. fail: function () {
  1016. uni.hideLoading();
  1017. uni.showToast({
  1018. icon: 'none',
  1019. title: '上传失败',
  1020. duration: 2000
  1021. });
  1022. }
  1023. })
  1024. } else {
  1025. uni.hideLoading();
  1026. uni.showToast({
  1027. icon: "none",
  1028. title: result.msg || "接口获取数据失败!",
  1029. });
  1030. }
  1031. })
  1032. }
  1033. });
  1034. //#endif
  1035. },
  1036. // 拍照-其他
  1037. async photographToOther(data, type) {
  1038. this.currentData = data;
  1039. uni.showLoading({
  1040. title: "加载中",
  1041. mask: true,
  1042. });
  1043. // 其他临床服务
  1044. let result = await post("/dept/scanning", {
  1045. content: type === 'start' ? data.startDept.qrcode : data.endDepts[0].qrcode,
  1046. taskTypeId: data.taskType.id,
  1047. gdState: data.gdState.id,
  1048. });
  1049. uni.hideLoading();
  1050. this.currentCode = result.code;
  1051. if (result.state == 200 || result.state == 201) {
  1052. uni.showModal({
  1053. title: '提示',
  1054. content: '请尽量拍摄角度覆盖清洁区域?',
  1055. success: (res) => {
  1056. if (res.confirm) {
  1057. if (result.account) {
  1058. this.uploadToOther(data, {
  1059. account: result.account,
  1060. accountName: result.name,
  1061. accountId: result.id,
  1062. }, type);
  1063. } else {
  1064. this.uploadToOther(data, undefined, type);
  1065. }
  1066. } else if (res.cancel) {
  1067. console.log('用户点击取消');
  1068. }
  1069. }
  1070. });
  1071. } else if (result.state == '0000') {
  1072. this.showSelectAccount();
  1073. } else {
  1074. uni.showToast({
  1075. icon: "none",
  1076. title: result.info || "接口获取数据失败!",
  1077. });
  1078. }
  1079. },
  1080. goBack() {
  1081. uni.navigateTo({
  1082. url: "../receiptpage/receiptpage",
  1083. });
  1084. },
  1085. // 转派
  1086. redeployScan(workOrder){
  1087. if (!this.SMFlag) {
  1088. return;
  1089. }
  1090. this.SMFlag = false;
  1091. SM().then((content) => {
  1092. uni.showLoading({
  1093. title: "加载中",
  1094. mask: true,
  1095. });
  1096. // let content = '3262'
  1097. post("/workerOrder/transfer ", {
  1098. handoverId: content,
  1099. orderId: workOrder.id
  1100. })
  1101. .then((result) => {
  1102. this.SMFlag = true;
  1103. uni.hideLoading();
  1104. if (result.state == 205) {
  1105. this.speContent = result.msg
  1106. this.handoverId = content
  1107. this.$refs.alertDialog.open()
  1108. }else{
  1109. uni.showToast({
  1110. icon: "none",
  1111. title: result.msg,
  1112. });
  1113. }
  1114. })
  1115. }).catch(err => {
  1116. this.SMFlag = true;
  1117. });
  1118. },
  1119. dialogConfirm() {
  1120. uni.showLoading({
  1121. title: "加载中",
  1122. mask: true,
  1123. });
  1124. post("/workerOrder/transfer ", {
  1125. handoverId: this.handoverId,
  1126. orderId: this.infoDATA.id,
  1127. transferOrder: 1
  1128. })
  1129. .then((result) => {
  1130. this.SMFlag = true;
  1131. uni.hideLoading();
  1132. if (result.state == 200) {
  1133. uni.showToast({
  1134. icon: "none",
  1135. title: result.info || "转派成功",
  1136. });
  1137. setTimeout(_=>{
  1138. this.goBack()
  1139. },2000)
  1140. }
  1141. })
  1142. },
  1143. dialogClose() {
  1144. this.$refs.alertDialog.close()
  1145. this.speContent = null
  1146. },
  1147. // 查看标本
  1148. viewSpecimen(workOrder) {
  1149. uni.navigateTo({
  1150. url: `../specimenDetail/specimenDetail?workOrderId=${workOrder.id}&associationTypeValue=${workOrder.taskType.associationType.value}`,
  1151. });
  1152. },
  1153. // 查看药品业务数据
  1154. viewDrugsBag(workOrder) {
  1155. uni.navigateTo({
  1156. url: `../drugsBagHistory/drugsBagHistory?id=${workOrder.drugs.id}&packid=${workOrder.drugs.packid}`,
  1157. });
  1158. },
  1159. // 查看血制品
  1160. viewBlood(workOrder) {
  1161. uni.showLoading({
  1162. title: "加载中",
  1163. mask: true,
  1164. });
  1165. post('/transflow/checkData', {
  1166. "type": "blood",
  1167. "orderId": workOrder.id
  1168. }).then(res => {
  1169. uni.hideLoading();
  1170. if(res.state == 200){
  1171. uni.navigateTo({
  1172. url: `../blood_list/blood_list?bloods=${encodeURIComponent(JSON.stringify(res.data.all))}`,
  1173. });
  1174. }else{
  1175. uni.showToast({
  1176. icon: "none",
  1177. title: res.msg || "接口获取数据失败!",
  1178. });
  1179. }
  1180. })
  1181. },
  1182. // 查看新药品
  1183. viewNewDrugsBag(workOrder, type) {
  1184. uni.showLoading({
  1185. title: "加载中",
  1186. mask: true,
  1187. });
  1188. let postData = {
  1189. "idx": 0,
  1190. "sum": 1,
  1191. "taskTypeConfig": {
  1192. "taskTypeDTO": {
  1193. "hosId": {
  1194. "id": this.hosId
  1195. },
  1196. "ordinaryField": {
  1197. "key": "ordinary_field",
  1198. "value": type
  1199. }
  1200. }
  1201. }
  1202. };
  1203. post('/simple/data/fetchDataList/taskTypeConfig', postData).then(res => {
  1204. uni.hideLoading();
  1205. if(res.status == 200){
  1206. let list = res.list || [];
  1207. if(list.length){
  1208. let config = list[0];
  1209. if(config.drugsModel === 1){
  1210. uni.navigateTo({
  1211. url: `/pages/newDrug/detail?drugsBagType=${type}&orderId=${workOrder.id}&showPatientInfo=${config.showPatientInfo}`,
  1212. });
  1213. } else if(config.drugsModel === 2){
  1214. uni.navigateTo({
  1215. url: `/pages/newDrug/list?drugsBagType=${type}&orderId=${workOrder.id}&showPatientInfo=${config.showPatientInfo}`,
  1216. });
  1217. }
  1218. }else{
  1219. uni.showToast({
  1220. icon: "none",
  1221. title: "未查询到配置!",
  1222. });
  1223. }
  1224. }else{
  1225. uni.showToast({
  1226. icon: "none",
  1227. title: res.msg || "接口获取数据失败!",
  1228. });
  1229. }
  1230. })
  1231. },
  1232. // 移除检查->返回
  1233. know1() {
  1234. this.models1.disjunctor = false;
  1235. // this.getInfo(this.dataId);
  1236. uni.navigateTo({
  1237. url: '../receiptpage/receiptpage',
  1238. });
  1239. },
  1240. // 移除检查->确定
  1241. ok1(data) {
  1242. console.log(data);
  1243. const {
  1244. value,
  1245. yyTime
  1246. } = data;
  1247. if (!value) {
  1248. //没有选择移除原因
  1249. uni.showModal({
  1250. title: "提示",
  1251. content: "请选择移除原因!",
  1252. showCancel: false,
  1253. success: function(res) {
  1254. if (res.confirm) {
  1255. console.log("用户点击确定");
  1256. } else if (res.cancel) {
  1257. console.log("用户点击取消");
  1258. }
  1259. },
  1260. });
  1261. return;
  1262. } else if (value == 2 && !yyTime) {
  1263. //没有填写预约时间
  1264. uni.showModal({
  1265. title: "提示",
  1266. content: "请填写预约时间!",
  1267. showCancel: false,
  1268. success: function(res) {
  1269. if (res.confirm) {
  1270. console.log("用户点击确定");
  1271. } else if (res.cancel) {
  1272. console.log("用户点击取消");
  1273. }
  1274. },
  1275. });
  1276. return;
  1277. }
  1278. this.models1.disjunctor = false;
  1279. let postData = {
  1280. gdId: this.infoDATA.id,
  1281. inspectId: this.currentInspect.id,
  1282. reason: value == 1 ? 'checkDone' : value == 2 ? 'modificationTime' : 'wrongOrder',
  1283. yyTime: value == 2 ? yyTime : undefined,
  1284. };
  1285. uni.showLoading({
  1286. title: '移除中',
  1287. mask: true,
  1288. })
  1289. post('/workerOrder/removeInspectByOderId', postData).then(res => {
  1290. uni.hideLoading();
  1291. if (res.state == 200) {
  1292. uni.showToast({
  1293. icon: 'none',
  1294. title: '移除成功!',
  1295. success() {
  1296. setTimeout(() => {
  1297. uni.navigateTo({
  1298. url: '../receiptpage/receiptpage',
  1299. });
  1300. }, 1500)
  1301. }
  1302. })
  1303. } else {
  1304. uni.showToast({
  1305. icon: 'none',
  1306. title: '移除失败!',
  1307. })
  1308. }
  1309. })
  1310. },
  1311. // 移除检查->取消
  1312. cancel1() {
  1313. this.models1.disjunctor = false;
  1314. },
  1315. // 移除
  1316. remove(item) {
  1317. this.currentInspect = item;
  1318. this.models1 = {
  1319. disjunctor: true,
  1320. content: "请选择您移除检查的原因?检查移除后将会自动完成或删除工单!",
  1321. icon: "warn",
  1322. operate: {
  1323. ok: "确定",
  1324. cancel: "取消",
  1325. },
  1326. };
  1327. },
  1328. // 拍照
  1329. photograph(data) {
  1330. photographTool(data);
  1331. },
  1332. // 特殊情况输入文字
  1333. textareaInput(value) {
  1334. this.textareaText = value;
  1335. if (value.trim().length >= 5) {
  1336. this.models.operate = {
  1337. ok: "确定",
  1338. cancel: "取消",
  1339. };
  1340. } else {
  1341. this.models.operate = {
  1342. cancel: "取消",
  1343. };
  1344. }
  1345. },
  1346. // 追加陪检人/执行人按钮
  1347. additionalUser(data) {
  1348. if (!this.SMFlag) {
  1349. return;
  1350. }
  1351. this.SMFlag = false;
  1352. console.log(data, 'data');
  1353. SM().then((ress1) => {
  1354. uni.showLoading({
  1355. title: "加载中",
  1356. mask: true,
  1357. });
  1358. //检验二维码的有效性
  1359. post("/dept/scanning", {
  1360. content: ress1,
  1361. taskTypeId: data.taskType.id,
  1362. gdState: data.gdState.id,
  1363. }).then((result) => {
  1364. this.SMFlag = true;
  1365. // this.currentCode = result.code;
  1366. if (result.state == 200 || result.state == 201) {
  1367. console.log(result);
  1368. let user;
  1369. try{
  1370. // json对象字符串
  1371. user = JSON.parse(result.code);
  1372. // 不是json对象字符串
  1373. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() !== 'object'){
  1374. user = result.code;
  1375. }
  1376. }catch(e){
  1377. user = result.code;
  1378. }
  1379. if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'object' && user.type == 'myQrCode' && user.id && user.name){
  1380. user.qrcode = ress1;
  1381. uni.hideLoading();
  1382. if(data.taskType.associationType.value == 'other'){
  1383. this.showCheckboxModal(user, data);
  1384. }else{
  1385. uni.showModal({
  1386. title: "提示",
  1387. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1388. success: (res) => {
  1389. if (res.confirm) {
  1390. console.log("用户点击确定");
  1391. this.additionalUserCommon(user, data.id, data.worker.id, false);
  1392. } else if (res.cancel) {
  1393. console.log("用户点击取消");
  1394. }
  1395. },
  1396. });
  1397. }
  1398. }else if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'string'){
  1399. let identityCardNumber = user;
  1400. // 根据身份证获取name
  1401. // todo
  1402. post("/data/fetchDataList/user", {idx: 0, sum: 1, user: { identityCardNumber }}).then((result) => {
  1403. uni.hideLoading();
  1404. if(result.status == 200){
  1405. result.list = result.list || [];
  1406. if(result.list.length){
  1407. let user = {name: result.list[0].name, identityCardNumber, qrcode: ress1};
  1408. if(data.taskType.associationType.value == 'other'){
  1409. this.showCheckboxModal(user, data);
  1410. }else{
  1411. uni.showModal({
  1412. title: "提示",
  1413. content: `您要最追加的人员为${user.name},您确认要追加吗?`,
  1414. success: (res) => {
  1415. if (res.confirm) {
  1416. console.log("用户点击确定");
  1417. this.additionalUserCommon(user, data.id, data.worker.id, false);
  1418. } else if (res.cancel) {
  1419. console.log("用户点击取消");
  1420. }
  1421. },
  1422. });
  1423. }
  1424. }else{
  1425. uni.navigateTo({
  1426. url: `../result_error/result_error?qrcode=${ress1}&msg=扫描二维码无法找到用户!`,
  1427. });
  1428. }
  1429. }else{
  1430. uni.navigateTo({
  1431. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  1432. });
  1433. }
  1434. })
  1435. }else{
  1436. uni.hideLoading();
  1437. uni.navigateTo({
  1438. url: `../result_error/result_error?qrcode=${ress1}&msg=请扫描正确的二维码!`,
  1439. });
  1440. }
  1441. } else {
  1442. uni.hideLoading();
  1443. uni.navigateTo({
  1444. url: `../result_error/result_error?qrcode=${ress1}&msg=${result.info || '接口获取数据失败!'}`,
  1445. });
  1446. }
  1447. });
  1448. }).catch(err=>{
  1449. this.SMFlag = true;
  1450. });
  1451. },
  1452. // 追加陪检人/执行人
  1453. additionalUserCommon(user, gdId, workerId, bulkCopy) {
  1454. console.log(user, gdId, workerId, bulkCopy);
  1455. uni.showLoading({
  1456. title: "加载中",
  1457. mask: true,
  1458. });
  1459. // 二维码里有id则传userid,没有则传identityCardNumber
  1460. post("/workerOrder/additionalAccompanyingPersonnel", {
  1461. userId: user.id || undefined,
  1462. identityCardNumber: !user.id ? user.identityCardNumber : undefined,
  1463. gdId,
  1464. workerId,
  1465. bulkCopy: bulkCopy ? 1 : undefined,
  1466. }).then((result) => {
  1467. uni.hideLoading();
  1468. if (result.state == 200) {
  1469. this.getInfo(gdId);
  1470. uni.showToast({
  1471. icon: 'none',
  1472. duration: 4000,
  1473. title: '操作成功!'
  1474. })
  1475. } else {
  1476. uni.navigateTo({
  1477. url: `../result_error/result_error?qrcode=${user.qrcode}&msg=${result.msg || '接口获取数据失败!'}`,
  1478. });
  1479. }
  1480. });
  1481. },
  1482. // 特殊情况关闭按钮
  1483. specialCloseClick() {
  1484. this.textareaFlag = true;
  1485. this.models = {
  1486. title: "特殊情况关闭",
  1487. disjunctor: true,
  1488. content: "",
  1489. icon: "",
  1490. operate: {
  1491. cancel: "取消",
  1492. },
  1493. };
  1494. },
  1495. ok() {
  1496. uni.showLoading({
  1497. title: "加载中",
  1498. mask: true,
  1499. });
  1500. post("/workerOrder/specialCaseClose", {
  1501. workOrderId: this.dataId,
  1502. reason: this.textareaText.trim(),
  1503. }).then((result) => {
  1504. this.models.disjunctor = false;
  1505. this.textareaFlag = false;
  1506. this.textareaText = "";
  1507. if (result.state == 200) {
  1508. uni.hideLoading();
  1509. this.models = {
  1510. disjunctor: true,
  1511. content: "工单关闭成功",
  1512. icon: "success",
  1513. operate: {
  1514. know: "返回",
  1515. },
  1516. };
  1517. } else {
  1518. uni.hideLoading();
  1519. this.models = {
  1520. disjunctor: true,
  1521. content: "工单关闭失败",
  1522. icon: "error",
  1523. operate: {
  1524. know: "返回",
  1525. },
  1526. };
  1527. }
  1528. });
  1529. },
  1530. cancel() {
  1531. this.models.disjunctor = false;
  1532. this.textareaFlag = false;
  1533. this.textareaText = "";
  1534. },
  1535. // 点击可查看检查详情
  1536. show(type) {
  1537. this.showType = type;
  1538. if (type === "show") {
  1539. //展开
  1540. // 计算高度
  1541. const query = uni.createSelectorQuery().in(this);
  1542. query
  1543. .selectAll(".page_item_infos")
  1544. .boundingClientRect((data) => {
  1545. let len = data.reduce((prev, current) => {
  1546. return prev + current.height;
  1547. }, 0);
  1548. this.animation.height(len).step();
  1549. this.animationData = this.animation.export();
  1550. })
  1551. .exec();
  1552. } else if (type === "hiddle") {
  1553. this.animation.height(0).step();
  1554. this.animationData = this.animation.export();
  1555. }
  1556. },
  1557. // 抢单->返回
  1558. know() {
  1559. this.models.disjunctor = false;
  1560. uni.navigateTo({
  1561. url: "../receiptpage/receiptpage",
  1562. });
  1563. },
  1564. // 抢单
  1565. showAlert() {
  1566. get("/workerOrder/takeOrder/" + this.infoDATA.id).then((res) => {
  1567. if (res.status == 200) {
  1568. this.models = {
  1569. disjunctor: true,
  1570. content: "接单成功",
  1571. icon: "success",
  1572. operate: {
  1573. know: "返回",
  1574. },
  1575. };
  1576. } else {
  1577. uni.showToast({
  1578. icon: "none",
  1579. title: res.msg || "接口获取数据失败!",
  1580. });
  1581. }
  1582. });
  1583. },
  1584. // 请求详细页面的数据(除标本轮巡和标本配送)
  1585. getInfo(id) {
  1586. uni.showLoading({
  1587. title: "加载中",
  1588. mask: true,
  1589. });
  1590. get("/api/fetchData/workOrder/" + id).then((res) => {
  1591. uni.hideLoading();
  1592. if (res.status == 200) {
  1593. this.infoDATA = res.data;
  1594. // 计算高度
  1595. setTimeout(() => {
  1596. const query = uni.createSelectorQuery().in(this);
  1597. query
  1598. .selectAll(".page_item_infos")
  1599. .boundingClientRect((data) => {
  1600. let len = data.reduce((prev, current) => {
  1601. return prev + current.height;
  1602. }, 0);
  1603. this.animation.height(len).step();
  1604. this.animationData = this.animation.export();
  1605. })
  1606. .exec();
  1607. }, 500)
  1608. } else {
  1609. uni.showToast({
  1610. icon: "none",
  1611. title: res.msg || "接口获取数据失败!",
  1612. });
  1613. }
  1614. });
  1615. },
  1616. // 请求详细页面的数据
  1617. getInfoBySpecimen(id) {
  1618. uni.showLoading({
  1619. title: "加载中",
  1620. mask: true,
  1621. });
  1622. post("/api/getWechatItem", {
  1623. id
  1624. }).then((res) => {
  1625. uni.hideLoading();
  1626. if (res.state == 200) {
  1627. this.actualDelivery = res.actualDelivery;
  1628. this.infoDATA = res.data;
  1629. // 计算高度
  1630. setTimeout(() => {
  1631. const query = uni.createSelectorQuery().in(this);
  1632. query
  1633. .selectAll(".page_item_infos")
  1634. .boundingClientRect((data) => {
  1635. let len = data.reduce((prev, current) => {
  1636. return prev + current.height;
  1637. }, 0);
  1638. this.animation.height(len).step();
  1639. this.animationData = this.animation.export();
  1640. })
  1641. .exec();
  1642. }, 500)
  1643. } else {
  1644. uni.showToast({
  1645. icon: "none",
  1646. title: res.msg || "接口获取数据失败!",
  1647. });
  1648. }
  1649. });
  1650. },
  1651. // 获取标本是否转派配置
  1652. getSpeTaskConfig(){
  1653. let postData = {
  1654. idx: 0,
  1655. sum: 10,
  1656. taskType: {
  1657. simpleQuery: true,
  1658. hosId: {
  1659. id: this.hosId
  1660. },
  1661. ordinaryField: {
  1662. key:"ordinary_field",
  1663. value: "specimenPackage"
  1664. }
  1665. }
  1666. };
  1667. post("/simple/data/fetchDataList/taskType", postData).then((result) => {
  1668. if (result.status == 200) {
  1669. this.tasktype = result.list[0] || {};
  1670. this.getSpeConfig();
  1671. }
  1672. });
  1673. },
  1674. // 获取配置
  1675. getSpeConfig() {
  1676. let postData = {
  1677. idx: 0,
  1678. sum: 10,
  1679. taskTypeConfig: {
  1680. taskTypeDTO: {
  1681. hosId: {
  1682. id: this.hosId
  1683. },
  1684. ordinaryField: this.tasktype.ordinaryField
  1685. }
  1686. }
  1687. };;
  1688. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((result) => {
  1689. if (result.status == 200) {
  1690. this.configs = result.list[0] || {};
  1691. this.sPehandoverOrder = this.configs.handoverOrder || null;
  1692. }
  1693. });
  1694. },
  1695. // 获取检查页面控制开关
  1696. getTaskConfig(){
  1697. post("/simple/data/fetchDataList/taskTypeConfig", {
  1698. "idx": 0,
  1699. "sum": 10,
  1700. "taskTypeConfig": {
  1701. "taskTypeDTO": {
  1702. "hosId": {
  1703. "id": this.hosId
  1704. },
  1705. "associationType": {
  1706. "key": "association_types",
  1707. "value": "inspect"
  1708. }
  1709. }
  1710. }
  1711. }).then((result) => {
  1712. if (result.status == 200) {
  1713. if(result.list && result.list[0]){
  1714. this.multiplayerMode = result.list[0].multiplayerMode;
  1715. this.handoverOrder = result.list[0].handoverOrder;
  1716. this.hideInspectScan = result.list[0].hideInspectScan;
  1717. }else{
  1718. this.multiplayerMode = 0;
  1719. this.handoverOrder = 0;
  1720. this.hideInspectScan = 0;
  1721. }
  1722. } else {
  1723. this.multiplayerMode = 0;
  1724. this.handoverOrder = 0;
  1725. this.hideInspectScan = 0;
  1726. }
  1727. });
  1728. },
  1729. // 获取临床服务页面控制开关
  1730. getTaskOtherConfig(options){
  1731. post("/simple/data/fetchDataList/taskTypeConfig", {
  1732. "idx": 0,
  1733. "sum": 10,
  1734. "taskTypeConfig": {
  1735. "hosId": this.hosId,
  1736. "associationType": options.associationTypeId,
  1737. }
  1738. }).then((result) => {
  1739. if (result.status == 200) {
  1740. if(result.list && result.list[0]){
  1741. this.clinicalMultiplayerMode = result.list[0].clinicalMultiplayerMode;
  1742. let clinicalTaskIds = result.list[0].clinicalTaskIds ? result.list[0].clinicalTaskIds.split(',') : [] ;
  1743. this.clinicalTaskIdsFlag = clinicalTaskIds.includes(options.taskTypeId);
  1744. console.log(clinicalTaskIds, options.taskTypeId)
  1745. }else{
  1746. this.clinicalMultiplayerMode = 0;
  1747. this.clinicalTaskIdsFlag = false;
  1748. }
  1749. } else {
  1750. this.clinicalMultiplayerMode = 0;
  1751. this.clinicalTaskIdsFlag = false;
  1752. }
  1753. });
  1754. },
  1755. // 获取是否需要选择陪检方式
  1756. getInspectAndPatientTransform(content){
  1757. let sData = this.infoDATA
  1758. let sType = null
  1759. if(((!sData.worker)||(sData.worker&&sData.worker.id == this.currentUserId))&&sData.gdState.value != 6&&sData.gdState.value != 7&&sData.gdState.value != 11){
  1760. if(sData.gdState.value != 2 &&
  1761. sData.taskType.associationType.value != 'jPBag' &&
  1762. sData.taskType.associationType.value != 'drugsBag' &&
  1763. sData.taskType.associationType.value != 'specimen' &&
  1764. sData.taskType.associationType.value != 'specimenPlan' &&
  1765. sData.taskType.associationType.value != 'ordinary' &&
  1766. !(sData.taskType.associationType.value == 'other' && (sData.gdState.value == 4 && sData.taskType.carryingCourses[0].actionsSwitch || sData.gdState.value == 5 && sData.taskType.carryingCourses[1].actionsSwitch))){
  1767. sType = 1
  1768. }
  1769. }
  1770. if(sData.gdState.value != 2 &&
  1771. sData.taskType.associationType.value != 'patientTransport' &&
  1772. sData.taskType.associationType.value != 'inspect' &&
  1773. sData.taskType.associationType.value != 'other' &&
  1774. sData.taskType.associationType.value != 'ordinary'){
  1775. sType = 2
  1776. }
  1777. // 患者陪检,患者其他服务,工单状态是待到达
  1778. if((sData.taskType.associationType.value === 'inspect' || sData.taskType.associationType.value === 'patientTransport') && sData.gdState.value == 4){
  1779. const postData = {
  1780. "idx":0,
  1781. "sum":1,
  1782. "taskTypeConfig":{
  1783. "taskTypeDTO":{
  1784. "hosId": {"id": this.hosId},
  1785. "associationType": {
  1786. "key": "association_types",
  1787. "value":"inspect",
  1788. },
  1789. },
  1790. },
  1791. };
  1792. uni.showLoading({
  1793. mask: true,
  1794. title: '加载中'
  1795. })
  1796. post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
  1797. console.log(res)
  1798. if (res.status == 200) {
  1799. res.list = res.list || [];
  1800. if(res.list[0] && res.list[0].signTypeIds){
  1801. // 如果开启
  1802. const postData = {
  1803. "idx":0,
  1804. "sum":9999,
  1805. "workOrderInspectScore":{
  1806. "hosId": this.hosId,
  1807. },
  1808. };
  1809. post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
  1810. console.log(res)
  1811. uni.hideLoading();
  1812. if (res.status == 200) {
  1813. res.list = res.list || [];
  1814. let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
  1815. console.log(radioInspectionDistanceItem)
  1816. this.models4 = {
  1817. disjunctor: true,
  1818. title: "请选择陪检方式",
  1819. radioInspectionDistanceItem,
  1820. icon: "",
  1821. operate: {
  1822. ok: "确定",
  1823. cancel: "取消",
  1824. },
  1825. };
  1826. } else {
  1827. uni.showToast({
  1828. icon: "none",
  1829. title: res.msg || "接口获取数据失败!",
  1830. });
  1831. }
  1832. })
  1833. }else{
  1834. uni.hideLoading();
  1835. this.Scan_ss(content,sData,sType);
  1836. }
  1837. } else {
  1838. uni.hideLoading();
  1839. uni.showToast({
  1840. icon: "none",
  1841. title: res.msg || "接口获取数据失败!",
  1842. });
  1843. }
  1844. })
  1845. }else{
  1846. this.Scan_ss(content,sData,sType);
  1847. }
  1848. },
  1849. Scan_ss(content, data, type) {
  1850. if (!this.SMFlag) {
  1851. return;
  1852. }
  1853. this.SMFlag = false;
  1854. this.currentData = data;
  1855. if(content){
  1856. content = content.replace('\n','')
  1857. uni.showLoading({
  1858. title: "加载中",
  1859. mask: true,
  1860. });
  1861. //检验二维码的有效性
  1862. post("/dept/scanning", {
  1863. content: content,
  1864. taskTypeId: data.taskType.id,
  1865. gdState: data.gdState.id,
  1866. }).then((result) => {
  1867. this.SMFlag = true;
  1868. this.currentCode = result.code;
  1869. if (result.state == 200 || result.state == 201) {
  1870. if (result.account) {
  1871. if (type == 1) {
  1872. this.isOpenTransportationProcessRemarks(this.currentData, {
  1873. account: result.account,
  1874. accountName: result.name,
  1875. accountId: result.id,
  1876. }, 'nextDeptOrder_ss');
  1877. } else if (type == 2) {
  1878. this.nextDeptOrder_s(this.currentData, {
  1879. account: result.account,
  1880. accountName: result.name,
  1881. accountId: result.id,
  1882. });
  1883. }
  1884. } else {
  1885. if (type == 1) {
  1886. this.isOpenTransportationProcessRemarks(this.currentData, undefined, 'nextDeptOrder_ss');
  1887. } else if (type == 2) {
  1888. this.nextDeptOrder_s(this.currentData);
  1889. }
  1890. }
  1891. } else if (result.state == '0000') {
  1892. uni.hideLoading();
  1893. // this.showSelectAccount(); //yeye
  1894. } else {
  1895. uni.hideLoading();
  1896. uni.showToast({
  1897. icon: "none",
  1898. title: result.info || "接口获取数据失败!",
  1899. });
  1900. }
  1901. });
  1902. }
  1903. },
  1904. // 其他临床服务-运输过程-终点科室是否开通备注填写
  1905. isOpenTransportationProcessRemarks(data, accountObj, funName){
  1906. const tasktype = data.taskType;
  1907. console.log(tasktype, data);
  1908. if(tasktype.associationType.value === 'other' && tasktype.carryingCourses[1].logSwitch && data.gdState.value == 5){
  1909. uni.navigateTo({
  1910. url: `../../pages/transportationProcessRemarks/transportationProcessRemarks?data=${data ? encodeURIComponent(JSON.stringify(data)) : ''}&accountObj=${accountObj ? encodeURIComponent(JSON.stringify(accountObj)) : ''}&currentCode=${this.currentCode}&funName=${funName}&actions=${this.actions ? encodeURIComponent(JSON.stringify(this.actions)) : ''}&imageValue=${this.imageValue ? encodeURIComponent(JSON.stringify(this.imageValue)) : ''}`
  1911. })
  1912. }else{
  1913. this[funName](data, accountObj);
  1914. }
  1915. },
  1916. // 如果不是患者陪检或患者转运或其他
  1917. // 科室签到
  1918. nextDeptOrder_s(data, accountObj) {
  1919. console.log(this.currentCode);
  1920. let ids = [];
  1921. let id = data.id;
  1922. ids.push(id);
  1923. let code = "";
  1924. let postData = {
  1925. ids
  1926. };
  1927. if (accountObj) {
  1928. postData.handover = [accountObj.accountId];
  1929. }
  1930. if (this.currentCode) {
  1931. code = this.currentCode;
  1932. // 科室签到
  1933. post("/workerOrder/orderSign/" + code, postData).then((res) => {
  1934. uni.hideLoading();
  1935. if (res.status == 200) {
  1936. // 跳转到扫描科室
  1937. // type1: res.type, //type类型
  1938. // id: data.id, //工单ID
  1939. // deptCode: code, //二维码
  1940. // dept: res.dept //科室名称
  1941. console.log(data,'工单')
  1942. let endDepts = data.endDepts.map(v=>v.id).toString();
  1943. console.log(endDepts,'smallScreen');
  1944. uni.navigateTo({
  1945. url: `../../pages/scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}&endDepts=${endDepts}`,
  1946. });
  1947. } else {
  1948. uni.navigateTo({
  1949. url: `../../pages/scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}&isKs=1&qrcode=${this.currentCode}`,
  1950. });
  1951. }
  1952. });
  1953. }
  1954. },
  1955. },
  1956. onShow(){
  1957. this.SMFlag = true;
  1958. let that = this
  1959. // #ifdef APP-PLUS
  1960. uni.$off('scan') // 每次进来先 移除全局自定义事件监听器
  1961. uni.$on('scan', function(data) {
  1962. that.getInspectAndPatientTransform(data)
  1963. })
  1964. // #endif
  1965. },
  1966. onLoad(options) {
  1967. console.log(options, 'options');
  1968. options.associationTypeValue === 'drugsBag' && this.isShowDrugsBatchInfo();
  1969. this.currentUserId = uni.getStorageSync('userData').user.id;
  1970. let id = options.id;
  1971. this.dataId = id;
  1972. if (
  1973. options.associationTypeValue == 'specimen' ||
  1974. options.associationTypeValue == 'specimenPlan'
  1975. ) {
  1976. // 到达 送达 执行中
  1977. this.getSpeTaskConfig();
  1978. this.getInfoBySpecimen(id);
  1979. } else {
  1980. this.getInfo(id);
  1981. }
  1982. if (
  1983. options.associationTypeValue == 'inspect' ||
  1984. options.associationTypeValue == 'patientTransport'
  1985. ) {
  1986. this.getTaskConfig();
  1987. }else if(options.associationTypeValue == 'other'){
  1988. this.getTaskOtherConfig(options);
  1989. }
  1990. // 创建动画
  1991. this.animation = uni.createAnimation({
  1992. duration: 500,
  1993. timingFunction: "ease",
  1994. });
  1995. // #ifdef APP-PLUS
  1996. webHandle("no", "app");
  1997. // #endif
  1998. // #ifdef H5
  1999. webHandle("no", "wx");
  2000. // #endif
  2001. },
  2002. onUnload() {
  2003. // 页面关闭后清空数据
  2004. this.animationData = {};
  2005. },
  2006. };
  2007. </script>
  2008. <style lang="less">
  2009. .Receipt_infopage {
  2010. padding: 0 20rpx;
  2011. overflow: hidden;
  2012. .red {
  2013. color: red !important;
  2014. font-weight: bold !important;
  2015. }
  2016. .green {
  2017. color: #49b856 !important;
  2018. font-weight: bold !important;
  2019. }
  2020. .title {
  2021. font-size: 48rpx;
  2022. margin-top: 24rpx;
  2023. margin-bottom: 24rpx;
  2024. text-align: center;
  2025. }
  2026. .page_item {
  2027. margin-top: 16rpx;
  2028. margin-bottom: 124rpx;
  2029. background: #fff;
  2030. border-radius: 8rpx;
  2031. padding: 0 16rpx;
  2032. border: 2rpx solid #e5e9ed;
  2033. .L {
  2034. width: 40rpx;
  2035. height: 40rpx;
  2036. border-radius: 50%;
  2037. background: #f9fafb;
  2038. position: relative;
  2039. left: -50rpx;
  2040. top: 66rpx;
  2041. }
  2042. .R {
  2043. width: 40rpx;
  2044. height: 40rpx;
  2045. border-radius: 50%;
  2046. background: #f9fafb;
  2047. position: relative;
  2048. float: right;
  2049. right: -50rpx;
  2050. top: 26rpx;
  2051. }
  2052. .starting {
  2053. width: 50rpx;
  2054. height: 50rpx;
  2055. color: #fff;
  2056. background: #49b856;
  2057. display: inline-block;
  2058. border-radius: 50%;
  2059. text-align: center;
  2060. line-height: 46rpx;
  2061. font-size: 32rpx;
  2062. margin-right: 6rpx;
  2063. }
  2064. .End {
  2065. width: 50rpx;
  2066. height: 50rpx;
  2067. color: #fff;
  2068. background: #39b199;
  2069. display: inline-block;
  2070. border-radius: 50%;
  2071. text-align: center;
  2072. line-height: 46rpx;
  2073. font-size: 32rpx;
  2074. margin-right: 6rpx;
  2075. }
  2076. .page_item_top {
  2077. height: 86rpx;
  2078. border-bottom: 2rpx dashed #666;
  2079. padding: 0 16rpx;
  2080. .page_item_top_L {
  2081. height: 100%;
  2082. float: left;
  2083. line-height: 88rpx;
  2084. .emergencys {
  2085. background: #ff3b53 !important;
  2086. width: 124rpx !important;
  2087. }
  2088. .emergency {
  2089. background: #ff3b53 !important;
  2090. }
  2091. .emergency1 {
  2092. background: #49b856 !important;
  2093. }
  2094. .page_item_cont_start {
  2095. text-align: center;
  2096. height: 44rpx;
  2097. width: 104rpx;
  2098. line-height: 44rpx;
  2099. border-radius: 8rpx;
  2100. background: #49b856;
  2101. color: #fff;
  2102. display: inline-block;
  2103. font-size: 28rpx;
  2104. .cubeic-star {
  2105. margin-right: 8rpx;
  2106. }
  2107. }
  2108. .L_time {
  2109. color: #6cc076;
  2110. font-size: 32rpx;
  2111. }
  2112. .L_text {
  2113. font-size: 32rpx;
  2114. display: inline-block;
  2115. font-weight: 700;
  2116. margin-right: 16rpx;
  2117. }
  2118. }
  2119. .page_item_top_R {
  2120. height: 60rpx;
  2121. float: right;
  2122. padding-top: 20rpx;
  2123. font-size: 32rpx;
  2124. position: absolute;
  2125. right: 50rpx;
  2126. .L_iocn {
  2127. display: inline-block;
  2128. height: 52rpx;
  2129. line-height: 48rpx;
  2130. color: rgb(7, 134, 60);
  2131. font-size: 36rpx;
  2132. font-weight: 700;
  2133. }
  2134. }
  2135. }
  2136. .page_item_cont {
  2137. min-height: 180rpx;
  2138. // max-height: 424rpx;
  2139. padding: 0 16rpx;
  2140. text-align: left;
  2141. position: relative;
  2142. .text_big {
  2143. font-size: 32rpx;
  2144. position: absolute;
  2145. right: 16rpx;
  2146. font-weight: 700;
  2147. margin-top: 10rpx;
  2148. }
  2149. .text_big2 {
  2150. font-size: 32rpx;
  2151. position: absolute;
  2152. right: 16rpx;
  2153. font-weight: 700;
  2154. }
  2155. .line {
  2156. height: 20rpx;
  2157. width: 2rpx;
  2158. border-left: 2rpx solid #666;
  2159. position: absolute;
  2160. top: 82rpx;
  2161. left: 40rpx;
  2162. }
  2163. .lines {
  2164. height: 40%;
  2165. width: 2rpx;
  2166. border-left: 2rpx solid #666;
  2167. position: absolute;
  2168. top: 23%;
  2169. left: 36rpx;
  2170. }
  2171. .page_item_cont_T {
  2172. padding-top: 28rpx;
  2173. font-size: 28rpx;
  2174. .page_item_cont_title {
  2175. height: 100%;
  2176. font-size: 32rpx;
  2177. }
  2178. }
  2179. .page_item_cont_B {
  2180. padding-top: 28rpx;
  2181. margin-bottom: 28rpx;
  2182. .page_item_cont_title {
  2183. height: 60rpx;
  2184. font-size: 32rpx;
  2185. }
  2186. .page_item_cont_title1 {
  2187. height: 60rpx;
  2188. line-height: 60rpx;
  2189. font-size: 32rpx;
  2190. padding-left: 64rpx;
  2191. }
  2192. }
  2193. }
  2194. .page_item_foot {
  2195. border-top: 2rpx dashed #666;
  2196. border-bottom: 2rpx dashed #666;
  2197. padding: 28rpx 16rpx;
  2198. text-align: left;
  2199. .page_item_foot_text {
  2200. font-size: 32rpx;
  2201. margin-bottom: 20rpx;
  2202. .text1 {
  2203. color: rgb(102, 102, 102);
  2204. }
  2205. .text2 {
  2206. float: right;
  2207. font-weight: 700;
  2208. }
  2209. }
  2210. }
  2211. .page_item_info {
  2212. padding: 20rpx 16rpx;
  2213. text-align: left;
  2214. line-height: 60rpx;
  2215. font-size: 32rpx;
  2216. .spe_list {
  2217. padding: 32rpx 0;
  2218. border-top: 2rpx solid #666;
  2219. .page_item_info_title {
  2220. color: #666;
  2221. }
  2222. }
  2223. .page_item_info_title {
  2224. font-weight: 700;
  2225. }
  2226. .text {
  2227. float: right;
  2228. font-weight: 700;
  2229. .page_item_info_txt {
  2230. color: #49b856;
  2231. margin-left: 8rpx;
  2232. margin-right: 8rpx;
  2233. }
  2234. }
  2235. }
  2236. #infos {
  2237. height: 0;
  2238. overflow: hidden;
  2239. }
  2240. .page_item_infos {
  2241. padding-top: 20rpx;
  2242. padding-bottom: 20rpx;
  2243. border-bottom: 2rpx dashed #666;
  2244. .page_item_info2 {
  2245. text-align: left;
  2246. line-height: 60rpx;
  2247. font-size: 32rpx;
  2248. padding-left: 16rpx;
  2249. .page_item_foot_text {
  2250. font-size: 32rpx;
  2251. margin-bottom: 20rpx;
  2252. &:last-of-type {
  2253. margin-bottom: 0;
  2254. }
  2255. .text1 {
  2256. color: rgb(102, 102, 102);
  2257. }
  2258. .text2 {
  2259. float: right;
  2260. font-weight: 700;
  2261. }
  2262. .btn {
  2263. height: 66rpx;
  2264. width: 132rpx;
  2265. margin: 0 auto;
  2266. background-color: #49b856;
  2267. color: #fff;
  2268. border-radius: 8rpx;
  2269. font-size: 32rpx;
  2270. margin-top: 20rpx;
  2271. text-align: center;
  2272. }
  2273. }
  2274. }
  2275. }
  2276. #pulldown {
  2277. color: #49b856;
  2278. font-size: 36rpx;
  2279. height: 60rpx;
  2280. text-align: center;
  2281. .cubeic-pulldown {
  2282. font-size: 48rpx;
  2283. position: relative;
  2284. bottom: 6rpx;
  2285. }
  2286. }
  2287. #pullup {
  2288. color: #49b856;
  2289. font-size: 36rpx;
  2290. height: 60rpx;
  2291. text-align: center;
  2292. .cubeic-pullup {
  2293. font-size: 48rpx;
  2294. position: relative;
  2295. top: 12rpx;
  2296. }
  2297. }
  2298. }
  2299. .foot_btn2 {
  2300. position: fixed;
  2301. bottom: 0;
  2302. right: 20rpx;
  2303. left: 20rpx;
  2304. line-height: 66rpx;
  2305. height: 100rpx;
  2306. border-top: 2rpx solid #e5e9ed;
  2307. background: #f9fafb;
  2308. display: flex;
  2309. justify-content: space-between;
  2310. .btn2,
  2311. .btn3 {
  2312. height: 66rpx;
  2313. flex: 1;
  2314. margin: 0 1%;
  2315. background-image: linear-gradient(to right, #72c172, #3bb197);
  2316. color: #fff;
  2317. border-radius: 8rpx;
  2318. font-size: 28rpx;
  2319. margin-top: 8rpx;
  2320. margin-bottom: 8rpx;
  2321. text-align: center;
  2322. }
  2323. }
  2324. }
  2325. </style>