receipt_infopage.vue 81 KB

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