receipt_infopage.vue 79 KB

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