receipt_infopage.vue 82 KB

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